XrdInputSynth

XrdInputSynth

Functions

Signals

Types and Values

Object Hierarchy

    GObject
    ╰── XrdInputSynth

Includes

#include <xrd.h>

Description

Functions

xrd_input_synth_new ()

XrdInputSynth *
xrd_input_synth_new (void);

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_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_move_cursor ()

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

xrd_input_synth_create_action_set ()

GxrActionSet *
xrd_input_synth_create_action_set (XrdInputSynth *self,
                                   GxrContext *context);

Parameters

self

the XrdInputSynth

 

context

A GxrContext

 

Returns

an ActionSet that will be centrally owned by, updated in and destroyed in XrdClient.

Types and Values

XRD_TYPE_INPUT_SYNTH

#define XRD_TYPE_INPUT_SYNTH xrd_input_synth_get_type()

enum InputSynthButton

Members

LEFT_BUTTON

   

MIDDLE_BUTTON

   

RIGHT_BUTTON

   

SCROLL_UP

   

SCROLL_DOWN

   

SCROLL_LEFT

   

SCROLL_RIGHT

   

XrdClickEvent

typedef struct {
  XrdWindow        *window;
  graphene_point_t *position;
  InputSynthButton  button;
  gboolean          state;
  GxrController    *controller;
} 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.

 

InputSynthButton button;

The int identifier of the mouse button.

 

gboolean state;

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

 

GxrController *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.

 

XrdInputSynth

typedef struct _XrdInputSynth XrdInputSynth;

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