/// <summary> /// <p> /// Instantiate an interface extension for the given wl_surface to /// crop and scale its content. If the given wl_surface already has /// a wp_viewport object associated, the viewport_exists /// protocol error is raised. /// </p> /// </summary> /// <param name="id">the new viewport interface id</param> /// <param name="surface">the surface</param> public static wp_viewport *wp_viewporter_get_viewport(wp_viewporter *pointer, wl_surface *surface) { var args = stackalloc wl_argument[2]; args[0] = 0; args[1] = surface; var ptr = WaylandClient.wl_proxy_marshal_array_constructor((wl_proxy *)pointer, 1, args, wp_viewport.Interface); return((wp_viewport *)ptr); }
private void WlSetFocus(wl_surface *surface, bool newFocus) { var w = GetWindowBySurface(surface); if (w != null) { SetFocus(w, newFocus); } else { LogWarning("Could not find window by surface. The window might have been destroyed after the event was sent from the server."); } }
private void KeyboardLeaveCallback(void *data, wl_keyboard *proxy, uint serial, wl_surface *surface) => WlSetFocus(surface, false);
private void KeyboardEnterCallback(void *data, wl_keyboard *proxy, uint serial, wl_surface *surface, wl_array *keys) => WlSetFocus(surface, true);
public static extern wl_egl_window *wl_egl_window_create(wl_surface *surface, int width, int height);