XrdInputSynth

XrdInputSynth

Functions

Signals

Types and Values

Object Hierarchy

    GObject
    ╰── XrdInputSynth

Includes

#include <xrdesktop.h>

Description

Functions

xrd_input_synth_new ()

XrdInputSynth *
xrd_input_synth_new (void);

xrd_input_synth_hand_off_to_controller ()

void
xrd_input_synth_hand_off_to_controller
                               (XrdInputSynth *self,
                                guint64 controller_handle);

Parameters

self

The XrdInputSynth

 

controller_handle

The index of the controller that will be used for input synth.

 

xrd_input_synth_move_cursor ()

void
xrd_input_synth_move_cursor (XrdInputSynth *self,
                             XrdWindow *window,
                             graphene_matrix_t *controller_pose,
                             graphene_point3d_t *intersection);

xrd_input_synth_poll_events ()

gboolean
xrd_input_synth_poll_events (XrdInputSynth *self);

Must be called periodically to receive input events.

Parameters

self

The XrdInputSynth

 

xrd_input_synth_reset_press_state ()

void
xrd_input_synth_reset_press_state (XrdInputSynth *self);

Issue a button release event for every button that previously was used for a button press event, but has not been released yet.

When calling this function, also consider xrd_input_synth_reset_scroll().

Parameters

self

The XrdInputSynth

 

xrd_input_synth_reset_scroll ()

void
xrd_input_synth_reset_scroll (XrdInputSynth *self);

Resets the internal state of the scrolling, so the in-flight scroll distance on the touchpad is discarded.

When calling this function, also consider xrd_input_synth_reset_press_state()

Parameters

self

The XrdInputSynth

 

xrd_input_synth_synthing_controller ()

guint64
xrd_input_synth_synthing_controller (XrdInputSynth *self);

Parameters

self

The XrdInputSynth

 

Returns

The index of the controller that is used for input synth.

Types and Values

XrdInputSynth

typedef struct _XrdInputSynth XrdInputSynth;

XRD_TYPE_INPUT_SYNTH

#define XRD_TYPE_INPUT_SYNTH xrd_input_synth_get_type()

XrdClickEvent

typedef struct {
  XrdWindow        *window;
  graphene_point_t *position;
  int               button;
  gboolean          state;
  guint64           controller_handle;
} XrdClickEvent;

A 2D mouse click event.

Members

XrdWindow *window;

The XrdWindow that was clicked.

 

graphene_point_t *position;

A graphene_point_t 2D screen position for the click.

 

int button;

The int identifier of the mouse button.

 

gboolean state;

A gboolean that is TRUE when pressed and FALSE when released.

 

guint64 controller_handle;

A guint64 with the OpenVR handle to the controller.

 

XrdMoveCursorEvent

typedef struct {
  XrdWindow *window;
  graphene_point_t *position;
  gboolean ignore;
} XrdMoveCursorEvent;

A 2D mouse move event.

Ignoring this events means only updating the cursor position in VR so it does not appear frozen, but don't actually synthesize mouse move events.

Members

XrdWindow *window;

The XrdWindow on which the cursor was moved.

 

graphene_point_t *position;

A graphene_point_t with the current 2D screen position.

 

gboolean ignore;

A gboolean wheather the synthesis should be ignored.

 

Signal Details

The “click-event” signal

void
user_function (XrdInputSynth *xrdinputsynth,
               GdkEvent      *arg1,
               gpointer       user_data)

Flags: Run Last


The “move-cursor-event” signal

void
user_function (XrdInputSynth *xrdinputsynth,
               GdkEvent      *arg1,
               gpointer       user_data)

Flags: Run Last