![]() |
![]() |
![]() |
V_Sim API - Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
#define TOOL_BUTTON_TYPE_PRESS #define TOOL_BUTTON_TYPE_RELEASE struct ToolSimplifiedEvents; enum ToolSpecialKeyStroke;
These definitions are used to give a library and plateform independent simplified event handlers.
#define TOOL_BUTTON_TYPE_PRESS 1
Value that can be put into field buttonType of structure _ToolSimplifiedEvents.
#define TOOL_BUTTON_TYPE_RELEASE 2
Value that can be put into field buttonType of structure _ToolSimplifiedEvents.
struct ToolSimplifiedEvents { int x, y; int root_x, root_y; guint button; int buttonType; int shiftMod, controlMod; int motion; char letter; ToolSpecialKeyStroke specialKey; };
This structure is a common interface for events (inspired from X). We don't use the one introduced by GDK because we don't want this dependency be a limitation.
the position x (on parent) for the event ; | |
the position y (on parent) for the event ; | |
the position x (in root window) for the event ; | |
the position y (in root window) for the event ; | |
guint |
the number of the button, 0 if not a button event ; |
TOOL_BUTTON_TYPE_PRESS or TOOL_BUTTON_TYPE_RELEASE ; | |
TRUE if Shift key is pressed during the event ; | |
TRUE if Control key is pressed during the event ; | |
TRUE if the event is a motion ; | |
The value of the letter if the event is a key stroke '\0' if not ; | |
ToolSpecialKeyStroke |
the value of a special key if the event is a key stroke but not with an ascii letter. |
typedef enum { Key_None, Key_Page_Up, Key_Page_Down, Key_Arrow_Left, Key_Arrow_Right, Key_Arrow_Up, Key_Arrow_Down, Key_Menu } ToolSpecialKeyStroke;
Possible non ascii keys used in ToolSimplifiedEvents.