static gboolean toggle_grab_pointer_cb (ClutterActor *actor, ClutterEvent *event, gpointer data) { /* we only deal with the event if the source is ourself */ if (event->button.source == actor) { if (clutter_get_pointer_grab () != NULL) clutter_ungrab_pointer (); else clutter_grab_pointer (actor); } return FALSE; }
IO_METHOD(IoClutter, getPointerGrab) { return IoClutterActor_newWithActor(IOSTATE, clutter_get_pointer_grab()); }