XrdContainer

XrdContainer

Functions

Types and Values

Object Hierarchy

    GObject
    ╰── XrdContainer

Includes

#include <xrdesktop.h>

Description

Functions

xrd_container_add_window ()

void
xrd_container_add_window (XrdContainer *self,
                          XrdWindow *window,
                          graphene_matrix_t *relative_transform);

Parameters

self

The container

 

window

The window to add

 

relative_transform

the transform of the window's center relative to the container's center when XRD_CONTAINER_RELATIVE is used, ignored else (may be NULL then).

 

xrd_container_center_view ()

void
xrd_container_center_view (XrdContainer *self,
                           float distance);

Places the container in the center of the FOV at the given distance.

Parameters

self

The container.

 

distance

The distance from the HMD the container should have.

 

xrd_container_get_distance ()

float
xrd_container_get_distance (XrdContainer *self);

xrd_container_get_windows ()

GSList *
xrd_container_get_windows (XrdContainer *self);

Parameters

self

The container

 

Returns

A list of XrdWindow contained in this container. The list must be destroyed by the caller.


xrd_container_hide ()

void
xrd_container_hide (XrdContainer *self);

xrd_container_is_visible ()

gboolean
xrd_container_is_visible (XrdContainer *self);

xrd_container_new ()

XrdContainer *
xrd_container_new (void);

xrd_container_remove_window ()

void
xrd_container_remove_window (XrdContainer *self,
                             XrdWindow *window);

xrd_container_set_attachment ()

void
xrd_container_set_attachment (XrdContainer *self,
                              XrdContainerAttachment attachment,
                              XrdController *controller);

Parameters

self

The container.

 

attachment

The attachment to set.

 

controller

A controller used for XRD_CONTAINER_ATTACHMENT_HAND. May be NULL for other attachments.

 

xrd_container_set_distance ()

void
xrd_container_set_distance (XrdContainer *self,
                            float distance);

xrd_container_set_layout ()

void
xrd_container_set_layout (XrdContainer *self,
                          XrdContainerLayout layout);

xrd_container_show ()

void
xrd_container_show (XrdContainer *self);

xrd_container_step ()

gboolean
xrd_container_step (XrdContainer *self);

Updates the container's position based on its attachment.

Parameters

self

The XrdContainer

 

Returns

A gboolean if that is TRUE the step was successful.

Types and Values

XrdContainer

typedef struct _XrdContainer XrdContainer;

enum XrdContainerLayout

Defines how the children of a XrdContainer are layed out.

Members

XRD_CONTAINER_NO_LAYOUT

No layout is set.

 

XRD_CONTAINER_HORIZONTAL

A horizontal linear layout.

 

XRD_CONTAINER_VERTICAL

A vertical linear layout.

 

XRD_CONTAINER_RELATIVE

A relative layout.

 

enum XrdContainerAttachment

Enum that defines if the container is moving with user input.

Members

XRD_CONTAINER_ATTACHMENT_NONE

The XrdContainer is not attached.

 

XRD_CONTAINER_ATTACHMENT_HEAD

The container is tracking the head.

 

XRD_CONTAINER_ATTACHMENT_HAND

The container is tracking a hand.

 

XRD_TYPE_CONTAINER

#define XRD_TYPE_CONTAINER xrd_container_get_type()