Top |
void | click-event | Run Last |
void | keyboard-press-event | Run Last |
void | move-cursor-event | Run Last |
void | request-quit-event | Run Last |
void xrd_client_add_window (XrdClient *self
,XrdWindow *window
,gboolean draggable
,gpointer lookup_key
);
self |
The XrdClient |
|
window |
The XrdWindow to add |
|
draggable |
Desktop windows should set this to true. This will enable the expected interaction of being able to grab windows and drag them around. It should be set to false for example for
|
|
lookup_key |
If looking up the XrdWindow by a key with
|
void xrd_client_remove_window (XrdClient *self
,XrdWindow *window
);
Removes an XrdWindow from the management of the XrdClient and the XrdWindowManager. Note that the XrdWindow will not be destroyed by this function.
void xrd_client_add_button (XrdClient *self
,XrdWindow *button
,graphene_point3d_t *position
,GCallback press_callback
,gpointer press_callback_data
);
Buttons are special windows that can not be grabbed and dragged around. Instead a button's press_callback is called on the grab action.
void xrd_client_emit_keyboard_press (XrdClient *self
,GdkEventKey *event
);
void xrd_client_emit_move_cursor (XrdClient *self
,XrdMoveCursorEvent *event
);
void xrd_client_emit_system_quit (XrdClient *self
,OpenVRQuitEvent *event
);
XrdWindow *
xrd_client_get_synth_hovered (XrdClient *self
);
If the controller used for synthesizing input is hovering over an XrdWindow, return this window, else NULL.
void xrd_client_submit_cursor_texture (XrdClient *self
,GulkanClient *client
,GulkanTexture *texture
,int hotspot_x
,int hotspot_y
);
A hotspot of (x, y) means that the hotspot is at x pixels right, y pixels down from the top left corner of the texture.
self |
The XrdClient |
|
client |
A GulkanClient, for example an OpenVROverlayUploader. |
|
texture |
A GulkanTexture that is created and owned by the caller. For performance reasons it is a good idea for the caller to reuse this texture. |
|
hotspot_x |
The x component of the hotspot. |
|
hotspot_y |
The x component of the hotspot. |
void xrd_client_add_button_callbacks (XrdClient *self
,XrdWindow *button
);
void xrd_client_add_container (XrdClient *self
,XrdContainer *container
);
For a container to start behaving according to its layout and attachment, it must be added to the client.
Note: windows in the container must be added to the client separately with
xrd_client_add_window()
, preferably with draggable set to false.
void xrd_client_add_window_callbacks (XrdClient *self
,XrdWindow *window
);
XrdWindow * xrd_client_button_new_from_icon (XrdClient *self
,float width
,float height
,float ppm
,const gchar *url
);
XrdWindow * xrd_client_button_new_from_text (XrdClient *self
,float width
,float height
,float ppm
,int label_count
,gchar **label
);
Creates a button and submits a Cairo rendered text label to it.
self |
The XrdClient |
|
width |
Width in meters. |
|
height |
Height in meters. |
|
ppm |
Density in pixels per meter |
|
label_count |
The number of text lines given in |
|
label |
One or more lines of text that will be displayed on the button. |
XrdDesktopCursor *
xrd_client_get_desktop_cursor (XrdClient *self
);
XrdPointerTip * xrd_client_get_pointer_tip (XrdClient *self
,uint32_t id
);
void xrd_client_init_controller (XrdClient *self
,XrdController *controller
);
void xrd_client_remove_container (XrdClient *self
,XrdContainer *container
);
void xrd_client_set_desktop_cursor (XrdClient *self
,XrdDesktopCursor *cursor
);
void xrd_client_set_pointer (XrdClient *self
,XrdPointer *pointer
,uint32_t id
);
void xrd_client_set_pointer_tip (XrdClient *self
,XrdPointerTip *pointer
,uint32_t id
);
void xrd_client_set_upload_layout (XrdClient *self
,VkImageLayout layout
);
void xrd_client_show_pinned_only (XrdClient *self
,gboolean pinned_only
);
struct _XrdClient *
xrd_client_switch_mode (XrdClient *self
);
References to gulkan, gxr and xrdesktop objects (like XrdWindow) will be invalid after calling this function.
xrd_client_switch_mode() replaces each XrdWindow with an appropriate new one, preserving its transformation matrix, scaling, pinned status, etc.
The caller is responsible for reconnecting callbacks to XrdClient signals. The caller is responsible to not use references to any previous XrdWindow. Pointers to XrdWindowData will remain valid, however XrdWindowData->xrd_window will point to a new XrdWindow.
XrdWindow * xrd_client_window_new_from_meters (XrdClient *client
,const char *title
,float width
,float height
,float ppm
);
XrdWindow * xrd_client_window_new_from_native (XrdClient *client
,const gchar *title
,gpointer native
,uint32_t width_pixels
,uint32_t height_pixels
,float ppm
);
struct XrdClientClass { GObjectClass parent; gboolean (*add_button) (XrdClient *self, XrdWindow **button, int label_count, gchar **label, graphene_point3d_t *position, GCallback press_callback, gpointer press_callback_data); GulkanClient * (*get_uploader) (XrdClient *self); void (*init_controller) (XrdClient *self, XrdController *controller); };
GObjectClass |
The object class structure needs to be the first element in the widget class structure in order for the class mechanism to work correctly. This allows a XrdClientClass pointer to be cast to a GObjectClass pointer. |
|
Create a label button. |
||
Get a GulkanClient from the XrdClient. |
||
Initialize a XrdController. |
“click-event”
signalvoid user_function (XrdClient *xrdclient, GdkEvent *arg1, gpointer user_data)
Flags: Run Last
“keyboard-press-event”
signalvoid user_function (XrdClient *xrdclient, GdkEvent *arg1, gpointer user_data)
Flags: Run Last
“move-cursor-event”
signalvoid user_function (XrdClient *xrdclient, GdkEvent *arg1, gpointer user_data)
Flags: Run Last