Exemple #1
0
 public TestServices(
     IAssetLoader assetLoader                      = null,
     IFocusManager focusManager                    = null,
     IInputManager inputManager                    = null,
     Func <IKeyboardDevice> keyboardDevice         = null,
     IKeyboardNavigationHandler keyboardNavigation = null,
     Func <IMouseDevice> mouseDevice               = null,
     IRuntimePlatform platform                     = null,
     IPlatformRenderInterface renderInterface      = null,
     IRenderTimer renderLoop = null,
     IScheduler scheduler    = null,
     IStandardCursorFactory standardCursorFactory = null,
     IStyler styler      = null,
     Func <Styles> theme = null,
     IPlatformThreadingInterface threadingInterface = null,
     IWindowImpl windowImpl = null,
     IWindowingPlatform windowingPlatform = null)
 {
     AssetLoader           = assetLoader;
     FocusManager          = focusManager;
     InputManager          = inputManager;
     KeyboardDevice        = keyboardDevice;
     KeyboardNavigation    = keyboardNavigation;
     MouseDevice           = mouseDevice;
     Platform              = platform;
     RenderInterface       = renderInterface;
     Scheduler             = scheduler;
     StandardCursorFactory = standardCursorFactory;
     Styler             = styler;
     Theme              = theme;
     ThreadingInterface = threadingInterface;
     WindowImpl         = windowImpl;
     WindowingPlatform  = windowingPlatform;
 }
Exemple #2
0
 public TestServices With(
     IAssetLoader assetLoader                      = null,
     IFocusManager focusManager                    = null,
     IInputManager inputManager                    = null,
     Func <IKeyboardDevice> keyboardDevice         = null,
     IKeyboardNavigationHandler keyboardNavigation = null,
     Func <IMouseDevice> mouseDevice               = null,
     IRuntimePlatform platform                     = null,
     IPlatformRenderInterface renderInterface      = null,
     IRenderTimer renderLoop = null,
     IScheduler scheduler    = null,
     IStandardCursorFactory standardCursorFactory = null,
     IStyler styler      = null,
     Func <Styles> theme = null,
     IPlatformThreadingInterface threadingInterface = null,
     IWindowImpl windowImpl = null,
     IWindowingPlatform windowingPlatform = null)
 {
     return(new TestServices(
                assetLoader: assetLoader ?? AssetLoader,
                focusManager: focusManager ?? FocusManager,
                inputManager: inputManager ?? InputManager,
                keyboardDevice: keyboardDevice ?? KeyboardDevice,
                keyboardNavigation: keyboardNavigation ?? KeyboardNavigation,
                mouseDevice: mouseDevice ?? MouseDevice,
                platform: platform ?? Platform,
                renderInterface: renderInterface ?? RenderInterface,
                scheduler: scheduler ?? Scheduler,
                standardCursorFactory: standardCursorFactory ?? StandardCursorFactory,
                styler: styler ?? Styler,
                theme: theme ?? Theme,
                threadingInterface: threadingInterface ?? ThreadingInterface,
                windowingPlatform: windowingPlatform ?? WindowingPlatform,
                windowImpl: windowImpl ?? WindowImpl));
 }
Exemple #3
0
 void InitializeMonoMac()
 {
     if (s_monoMacInitialized)
     {
         return;
     }
     NSApplication.Init();
     ThreadHelper.InitializeCocoaThreadingLocks();
     App = NSApplication.SharedApplication;
     UpdateActivationPolicy();
     s_renderLoop         = new RenderLoop();
     s_renderTimer        = new RenderTimer(60); //TODO: use CVDisplayLink
     s_monoMacInitialized = true;
 }
Exemple #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RenderLoop"/> class.
 /// </summary>
 /// <param name="timer">The render timer.</param>
 /// <param name="dispatcher">The UI thread dispatcher.</param>
 public RenderLoop(IRenderTimer timer, IDispatcher dispatcher)
 {
     _timer      = timer;
     _dispatcher = dispatcher;
 }