Update Clutter event structures to use the ModifierType enum

This commit is contained in:
Emmanuele Bassi 2007-06-11 09:02:40 +00:00
parent 32f04a6dc8
commit c22543be1f
2 changed files with 18 additions and 18 deletions

View File

@ -114,7 +114,7 @@ struct _ClutterKeyEvent
{
ClutterEventType type;
guint32 time;
guint modifier_state;
ClutterModifierType modifier_state;
guint keyval;
guint16 hardware_keycode;
};
@ -125,7 +125,7 @@ struct _ClutterButtonEvent
guint32 time;
gint x;
gint y;
guint32 modifier_state;
ClutterModifierType modifier_state;
guint32 button;
gdouble *axes; /* Future use */
ClutterInputDevice *device; /* Future use */
@ -137,7 +137,7 @@ struct _ClutterMotionEvent
guint32 time;
gint x;
gint y;
guint32 modifier_state;
ClutterModifierType modifier_state;
gdouble *axes; /* Future use */
ClutterInputDevice *device; /* Future use */
};
@ -149,7 +149,7 @@ struct _ClutterScrollEvent
gint x;
gint y;
ClutterScrollDirection direction;
guint32 modifier_state;
ClutterModifierType modifier_state;
gdouble *axes; /* future use */
ClutterInputDevice *device; /* future use */
};
@ -184,7 +184,7 @@ ClutterEvent * clutter_event_copy (ClutterEvent *event);
void clutter_event_free (ClutterEvent *event);
ClutterEventType clutter_event_type (ClutterEvent *event);
guint32 clutter_event_get_time (ClutterEvent *event);
guint clutter_event_get_state (ClutterEvent *event);
ClutterModifierType clutter_event_get_state (ClutterEvent *event);
void clutter_event_get_coords (ClutterEvent *event,
gint *x,
gint *y);

View File

@ -242,7 +242,7 @@ translate_key_event (ClutterBackend *backend,
event->key.type = (xevent->xany.type == KeyPress) ? CLUTTER_KEY_PRESS
: CLUTTER_KEY_RELEASE;
event->key.time = xevent->xkey.time;
event->key.modifier_state = xevent->xkey.state; /* FIXME: handle modifiers */
event->key.modifier_state = (ClutterModifierType) xevent->xkey.state;
event->key.hardware_keycode = xevent->xkey.keycode;
event->key.keyval = XKeycodeToKeysym (xevent->xkey.display,
xevent->xkey.keycode,