/// <summary> /// Create a new <see cref="WindowingService"/> with a specific backend. /// If the backend is not active this method will throw an exception. /// </summary> public static WindowingService Create(WindowingBackend type) { WindowingService service; switch (type) { case WindowingBackend.Win32: service = new Backends.Windows.Win32WindowingService(); break; case WindowingBackend.X: service = new Backends.X.XWindowingService(); break; case WindowingBackend.Wayland: service = new Backends.Wayland.WaylandWindowingService(); break; case WindowingBackend.Quartz: throw new NotImplementedException(); default: throw new InvalidOperationException(); } LogDebug("Created WindowingService."); service.Initialize(); LogDebug("Initialized WindowingService."); return(service); }
/// <summary> /// Create a <see cref="WindowingService"/>. /// </summary> protected WindowingService(WindowingBackend backend) { _keyboardState = new KeyboardState(); _mouseState = new MouseState(); GlSettings = new OpenGlSurfaceSettings(); Backend = backend; LogInfo($"Created WindowingService with backend '{Backend}'."); }
/// <summary> /// Create a new <see cref="WindowingServiceData"/> instance. /// </summary> protected WindowingServiceData(WindowingBackend backend) { Backend = backend; }
/// <summary> /// Create a new <see cref="WindowData"/> instance. /// </summary> protected WindowData(WindowingBackend backend) { Backend = backend; }