![]() |
![]() |
![]() |
Hippo-Canvas Reference Manual | ![]() |
---|---|---|---|---|
#include <hippo/hippo-event.h> #define HIPPO_TYPE_EVENT enum HippoEventType; enum HippoMotionDetail; HippoEvent; enum HippoKey; enum HippoModifier; GType hippo_event_get_type (void); HippoEvent* hippo_event_copy (HippoEvent *event); void hippo_event_free (HippoRectangle *event);
typedef enum { HIPPO_EVENT_BUTTON_PRESS, HIPPO_EVENT_BUTTON_RELEASE, HIPPO_EVENT_MOTION_NOTIFY, HIPPO_EVENT_KEY_PRESS, HIPPO_EVENT_SCROLL } HippoEventType;
typedef enum { HIPPO_MOTION_DETAIL_ENTER, HIPPO_MOTION_DETAIL_LEAVE, HIPPO_MOTION_DETAIL_WITHIN } HippoMotionDetail;
typedef struct { HippoEventType type; int x; int y; union { struct { HippoMotionDetail detail; } motion; struct { int button; int count; /* we pass these through for gtk_window_begin_resize_drag() */ int x11_x_root; int x11_y_root; guint32 x11_time; guint modifiers; } button; struct { HippoKey key; gunichar character; /* 0 if no translation */ guint modifiers; } key; struct { HippoScrollDirection direction; } scroll; } u; } HippoEvent;
typedef enum { HIPPO_KEY_UNKNOWN, HIPPO_KEY_RETURN, HIPPO_KEY_ESCAPE, HIPPO_KEY_TAB, HIPPO_KEY_LEFTTAB } HippoKey;
typedef enum { HIPPO_MODIFIER_SHIFT = 1 << 0, HIPPO_MODIFIER_CTRL = 1 << 1, HIPPO_MODIFIER_ALT = 1 << 2 } HippoModifier;