Top |
gfloat | initial-height-meters | Read / Write / Construct |
gfloat | initial-width-meters | Read / Write / Construct |
gpointer | native | Read / Write / Construct |
gfloat | scale | Read / Write / Construct |
guint | texture-height | Read / Write / Construct |
guint | texture-width | Read / Write / Construct |
gchar * | title | Read / Write / Construct Only |
void | button-press-event | Run Last |
void | button-release-event | Run Last |
void | destroy | No Hooks |
void | grab-event | Run First |
void | grab-start-event | Run First |
void | hover-end-event | Run Last |
void | hover-event | Run Last |
void | hover-start-event | Run Last |
void | keyboard-close-event | Run First |
void | keyboard-press-event | Run Last |
void | motion-notify-event | Run Last |
void | release-event | Run First |
void | scroll-event | Run Last |
void | show | Run First |
XrdWindow is implemented by XrdOverlayWindow, XrdSceneDesktopCursor, XrdScenePointerTip and XrdSceneWindow.
void xrd_window_add_child (XrdWindow *self
,XrdWindow *child
,graphene_point_t *offset_center
);
x axis points right, y axis points up.
self |
The XrdWindow |
|
child |
An already existing window. |
|
offset_center |
The offset of the child window's center to the parent window's center in pixels. |
void xrd_window_emit_grab_start (XrdWindow *self
,XrdControllerIndexEvent *event
);
void xrd_window_emit_hover_end (XrdWindow *self
,XrdControllerIndexEvent *event
);
void xrd_window_emit_hover_start (XrdWindow *self
,XrdControllerIndexEvent *event
);
void xrd_window_emit_release (XrdWindow *self
,XrdControllerIndexEvent *event
);
gboolean xrd_window_get_transformation (XrdWindow *self
,graphene_matrix_t *mat
);
gboolean xrd_window_intersects (XrdWindow *self
,XrdPointer *pointer
,graphene_matrix_t *pointer_transformation
,graphene_point3d_t *intersection
);
self |
The XrdWindow |
|
pointer |
The XrdPointer. |
|
pointer_transformation |
pose of a pointer ray (like a controller). |
|
intersection |
The intersection point if there is an intersection. |
void
xrd_window_poll_event (XrdWindow *self
);
Must be called periodically to receive events from this window.
gboolean xrd_window_set_transformation (XrdWindow *self
,graphene_matrix_t *mat
);
void xrd_window_submit_texture (XrdWindow *self
,GulkanClient *client
,GulkanTexture *texture
);
self |
The XrdWindow |
|
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. |
float
xrd_window_get_current_height_meters (XrdWindow *self
);
void xrd_window_get_intersection_2d (XrdWindow *self
,graphene_point3d_t *intersection_3d
,graphene_point_t *intersection_2d
);
Calculates the offset of the intersection relative to the overlay's center, in overlay-relative coordinates, in meters
self |
The XrdWindow |
|
intersection_3d |
A graphene_point3d_t intersection point in meters. |
|
intersection_2d |
Intersection in window coordinates with origin at center in meters. |
void xrd_window_get_intersection_2d_pixels (XrdWindow *self
,graphene_point3d_t *intersection_3d
,graphene_point_t *intersection_pixels
);
self |
The XrdWindow |
|
intersection_3d |
A graphene_point3d_t intersection point in meters. |
|
intersection_pixels |
Intersection in window coordinates with the origin at top/left in pixels. |
void xrd_window_get_reset_transformation (XrdWindow *self
,graphene_matrix_t *transform
);
gboolean xrd_window_get_transformation_no_scale (XrdWindow *self
,graphene_matrix_t *mat
);
void xrd_window_set_pin (XrdWindow *self
,gboolean pinned
,gboolean hide_unpinned
);
self |
The XrdWindow |
|
pinned |
The pin status to set this window to |
|
hide_unpinned |
If true, the window will be hidden if it is unpinned, and
shown if it is pinned. This corresponds to the "show only pinned windows"
mode set up in XrdClient.
If false, windows are always shown.
Note that |
void xrd_window_set_reset_transformation (XrdWindow *self
,graphene_matrix_t *transform
);
void
xrd_window_save_reset_transformation (XrdWindow *self
);
Flags for the window manager.
struct XrdWindowInterface { GTypeInterface parent; gboolean (*set_transformation) (XrdWindow *self, graphene_matrix_t *mat); gboolean (*get_transformation) (XrdWindow *self, graphene_matrix_t *mat); gboolean (*get_transformation_no_scale) (XrdWindow *self, graphene_matrix_t *mat); void (*submit_texture) (XrdWindow *self, GulkanClient *client, GulkanTexture *texture); void (*poll_event) (XrdWindow *self); void (*emit_grab_start) (XrdWindow *self, XrdControllerIndexEvent *event); void (*emit_grab) (XrdWindow *self, XrdGrabEvent *event); void (*emit_release) (XrdWindow *self, XrdControllerIndexEvent *event); void (*emit_hover_end) (XrdWindow *self, XrdControllerIndexEvent *event); void (*emit_hover) (XrdWindow *self, XrdHoverEvent *event); void (*emit_hover_start) (XrdWindow *self, XrdControllerIndexEvent *event); void (*add_child) (XrdWindow *self, XrdWindow *child, graphene_point_t *offset_center); void (*set_color) (XrdWindow *self, const graphene_vec3_t *color); void (*set_flip_y) (XrdWindow *self, gboolean flip_y); void (*show) (XrdWindow *self); void (*hide) (XrdWindow *self); gboolean (*is_visible) (XrdWindow *self); void (*constructed) (GObject *object); XrdWindowData* (*get_data) (XrdWindow *self); guint windows_created; };
GTypeInterface |
parent |
|
Set a graphene_matrix_t transformation. |
||
Get a graphene_matrix_t transformation including scale. |
||
Get a graphene_matrix_t transformation without scale. |
||
Submit a new texture to the window. |
||
Poll events on the window. |
||
Emit an event when the grab action was started. |
||
Emit a continous event during the grab action. |
||
Emit an event when the grab action was finished. |
||
Emit an event when hovering the window was finished. |
||
Emit a continous event when the window is hovered. |
||
Emit an event when hovering the window started. |
||
Add a child window. |
||
Set a color that is multiplied to the texture. |
||
Flip the y axis of the texture. |
||
Show the window. |
||
Hide the window. |
||
Check if the window is currently visible. |
||
Common constructor. |
||
Get common data struct. |
||
guint |
Static counter how many windows were created, used for creating automatic overlay names. |
typedef struct { gpointer native; uint32_t texture_width; uint32_t texture_height; GString *title; gboolean selected; graphene_point_t initial_size_meters; float scale; graphene_matrix_t transform; struct XrdWindowData *child_window; struct XrdWindowData *parent_window; graphene_point_t child_offset_center; graphene_matrix_t reset_transform; gboolean pinned; GulkanTexture *texture; XrdWindow *xrd_window; } XrdWindowData;
Common struct for scene and overlay windows.
gpointer |
A native pointer to a window struct from a window manager. |
|
The width of the last submitted texture in pixels. |
||
The height of the last submitted texture in pixels. |
||
GString * |
A window title. |
|
gboolean |
A gboolean used in selection mode. |
|
graphene_point_t |
The window dimensions in meters without scale. |
|
A user applied scale. |
||
graphene_matrix_t |
The transformation graphene_matrix_t of the window. |
|
struct XrdWindowData * |
A window that is pinned on top of this window and follows this window's position and scaling. |
|
struct XrdWindowData * |
The parent window, |
|
graphene_point_t |
If the window is a child, this stores the 2D offset to the parent in meters. |
|
graphene_matrix_t |
The transformation that the window will be reset to. |
|
gboolean |
Whether the window will be visible in pinned only mode. |
|
GulkanTexture * |
Cache of the currently rendered texture. |
|
XrdWindow * |
A pointer to the XrdWindow this XrdWindowData belongs to. After switching the overlay/scene mode, it will point to a new XrdWindow. |
typedef struct { guint64 controller_handle; } XrdControllerIndexEvent;
An event that carries a controller handle.
typedef struct { graphene_point3d_t point; graphene_matrix_t pose; float distance; guint64 controller_handle; } XrdHoverEvent;
An event that gets emitted when a controller hovers a window.
graphene_point3d_t |
The point in 3D world space. |
|
graphene_matrix_t |
A graphene_matrix_t pose. |
|
Distance from the controller. |
||
guint64 |
The controller the event was captured on. |
typedef struct { graphene_matrix_t pose; guint64 controller_handle; } XrdGrabEvent;
An event that gets emitted when a window get grabbed.
graphene_matrix_t |
A graphene_matrix_t pose. |
|
guint64 |
The controller the event was captured on. |
“initial-height-meters”
property“initial-height-meters” gfloat
Initial window height in meters.
Flags: Read / Write / Construct
Allowed values: [0.01,1000]
Default value: 1
“initial-width-meters”
property“initial-width-meters” gfloat
Initial window width in meters.
Flags: Read / Write / Construct
Allowed values: [0.01,1000]
Default value: 1
“native”
property“native” gpointer
A pointer to an (opaque) native window struct.
Flags: Read / Write / Construct
“scale”
property“scale” gfloat
Scaling Factor of this Window.
Flags: Read / Write / Construct
Allowed values: [0.05,15]
Default value: 1
“texture-height”
property“texture-height” guint
The height of the set texture.
Flags: Read / Write / Construct
Allowed values: <= 32768
Default value: 0
“texture-width”
property“texture-width” guint
The width of the set texture.
Flags: Read / Write / Construct
Allowed values: <= 32768
Default value: 0
“title”
property“title” gchar *
Title of the Window.
Flags: Read / Write / Construct Only
Default value: "Untitled"
“button-press-event”
signalvoid user_function (XrdWindow *xrdwindow, GdkEvent *arg1, gpointer user_data)
Flags: Run Last
“button-release-event”
signalvoid user_function (XrdWindow *xrdwindow, GdkEvent *arg1, gpointer user_data)
Flags: Run Last
“grab-event”
signalvoid user_function (XrdWindow *xrdwindow, GdkEvent *arg1, gpointer user_data)
Flags: Run First
“grab-start-event”
signalvoid user_function (XrdWindow *xrdwindow, GdkEvent *arg1, gpointer user_data)
Flags: Run First
“hover-end-event”
signalvoid user_function (XrdWindow *xrdwindow, GdkEvent *arg1, gpointer user_data)
Flags: Run Last
“hover-event”
signalvoid user_function (XrdWindow *xrdwindow, GdkEvent *arg1, gpointer user_data)
Flags: Run Last
“hover-start-event”
signalvoid user_function (XrdWindow *xrdwindow, GdkEvent *arg1, gpointer user_data)
Flags: Run Last
“keyboard-close-event”
signalvoid user_function (XrdWindow *xrdwindow, gpointer user_data)
Flags: Run First
“keyboard-press-event”
signalvoid user_function (XrdWindow *xrdwindow, GdkEvent *arg1, gpointer user_data)
Flags: Run Last
“motion-notify-event”
signalvoid user_function (XrdWindow *xrdwindow, GdkEvent *arg1, gpointer user_data)
Flags: Run Last
“release-event”
signalvoid user_function (XrdWindow *xrdwindow, GdkEvent *arg1, gpointer user_data)
Flags: Run First
“scroll-event”
signalvoid user_function (XrdWindow *xrdwindow, GdkEvent *arg1, gpointer user_data)
Flags: Run Last