5 Model-to-Simulator Interfaces abs_pointer_activate
API Reference Manual  /  5 Model-to-Simulator Interfaces  / 

abs_pointer

Description
Interface implemented by tablet devices. Used by consoles to send touchpad events to the controller. The set_state function is called when something changes in the console. The coordinates are given as scaled absolute scaled values, where (0, 0) is the upper-left corner and (0xffff, 0xffff) is the lower-right corner.

typedef enum {
        Abs_Pointer_Button_Left   = 0x20,
        Abs_Pointer_Button_Right  = 0x10,
        Abs_Pointer_Button_Middle = 0x08
} abs_pointer_buttons_t;

typedef struct {
        abs_pointer_buttons_t buttons;
        uint16 x;
        uint16 y;
        uint16 z;
} abs_pointer_state_t;

SIM_INTERFACE(abs_pointer) {
        void (*set_state)(conf_object_t *obj, abs_pointer_state_t state);
};

#define ABS_POINTER_INTERFACE "abs_pointer"

Execution Context
Cell Context for all methods.

5 Model-to-Simulator Interfaces abs_pointer_activate