2008-06-27 Emmanuele Bassi <ebassi@openedhand.com>
+ * clutter/clutter-event.h:
+ * clutter/clutter-main.c:
+ * clutter/x11/clutter-backend-x11.c: Add further documentation,
+ and increase the coverage to 94%.
+
+2008-06-27 Emmanuele Bassi <ebassi@openedhand.com>
+
* configure.ac: Post release bump to 0.7.7.
======== Release 0.7.6 ========================================================
ClutterInputDevice *device; /* Future use */
};
+/**
+ * ClutterCrossingEvent:
+ * @type: event type
+ * @time: event time
+ * @flags: event flags
+ * @stage: event source stage
+ * @source: event source actor
+ * @x: event X coordinate
+ * @y: event Y coordinate
+ * @related: actor related to the crossing
+ *
+ * Event for the movement of the pointer across different actors
+ *
+ * Since: 0.2
+ */
struct _ClutterCrossingEvent
{
ClutterEventType type;
ClutterActor *related;
};
-
+/**
+ * ClutterMotionEvent:
+ * @type: event type
+ * @time: event time
+ * @flags: event flags
+ * @stage: event source stage
+ * @source: event source actor
+ * @x: event X coordinate
+ * @y: event Y coordinate
+ * @modifier_state: button modifiers
+ * @axes: reserved for future use
+ * @device: reserved for future use
+ *
+ * Event for the pointer motion
+ *
+ * Since: 0.2
+ */
struct _ClutterMotionEvent
{
ClutterEventType type;
ClutterInputDevice *device; /* Future use */
};
+/**
+ * ClutterScrollEvent:
+ * @type: event type
+ * @time: event time
+ * @flags: event flags
+ * @stage: event source stage
+ * @source: event source actor
+ * @x: event X coordinate
+ * @y: event Y coordinate
+ * @direction: direction of the scrolling
+ * @modifier_state: button modifiers
+ * @axes: reserved for future use
+ * @device: reserved for future use
+ *
+ * Scroll wheel (or similar device) event
+ *
+ * Since: 0.2
+ */
struct _ClutterScrollEvent
{
ClutterEventType type;
ClutterInputDevice *device; /* future use */
};
+/**
+ * ClutterStageStateEvent:
+ * @type: event type
+ * @time: event time
+ * @flags: event flags
+ * @stage: event source stage
+ * @source: event source actor (unused)
+ * @changed_mask: bitwise OR of the changed flags
+ * @new_state: bitwise OR of the current state flags
+ *
+ * Event signalling a change in the #ClutterStage state.
+ *
+ * Since: 0.2
+ */
struct _ClutterStageStateEvent
{
ClutterEventType type;
ClutterStageState new_state;
};
+/**
+ * ClutterEvent:
+ * @type: event type
+ *
+ * Generic event wrapper.
+ *
+ * Since: 0.2
+ */
union _ClutterEvent
{
ClutterEventType type;
-
+
ClutterAnyEvent any;
ClutterButtonEvent button;
ClutterKeyEvent key;
* actor directly. The source set in the event will be the actor that would
* have received the event if the pointer grab was not in effect.
*
+ * If you wish to grab all the pointer events for a specific input device,
+ * you should use clutter_grab_pointer_for_device().
+ *
* Since: 0.6
*/
void
}
}
+/**
+ * clutter_grab_pointer_for_device:
+ * @actor: a #ClutterActor
+ * @id: a device id, or -1
+ *
+ * Grabs all the pointer events coming from the device @id for @actor.
+ *
+ * If @id is -1 then this function is equivalent to clutter_grab_pointer().
+ *
+ * Since: 0.8
+ */
void
-clutter_grab_pointer_for_device (ClutterActor *actor,
- gint id)
+clutter_grab_pointer_for_device (ClutterActor *actor,
+ gint id)
{
ClutterInputDevice *dev;
clutter_grab_pointer (NULL);
}
+/**
+ * clutter_ungrab_pointer_for_device:
+ * @id: a device id
+ *
+ * Removes an existing grab of the pointer events for device @id.
+ *
+ * Since: 0.8
+ */
void
clutter_ungrab_pointer_for_device (gint id)
{
return FALSE;
}
-ClutterInputDevice*
+/**
+ * clutter_get_input_device_for_id:
+ * @id: a device id
+ *
+ * Retrieves the #ClutterInputDevice from its id.
+ *
+ * Return value: a #ClutterInputDevice, or %NULL
+ *
+ * Since: 0.8
+ */
+ClutterInputDevice *
clutter_get_input_device_for_id (gint id)
{
GSList *item;
item != NULL;
item = item->next)
{
- device = (ClutterInputDevice *)item->data;
+ device = item->data;
if (device->id == id)
return device;
}
}
-ClutterX11XInputDevice*
+ClutterX11XInputDevice *
_clutter_x11_get_device_for_xid (XID id)
{
GSList *list_it;
#endif
}
+/**
+ * clutter_x11_get_input_device_type:
+ * @device: a #ClutterX11XInputDevice
+ *
+ * Retrieves the type of @device.
+ *
+ * Return value: the type of the device
+ *
+ * Since: 0.8
+ */
ClutterX11InputDeviceType
clutter_x11_get_input_device_type (ClutterX11XInputDevice *device)
{
return device->type;
}
+/**
+ * clutter_x11_has_xinput:
+ *
+ * Gets whether Clutter has XInput support.
+ *
+ * Return value: %TRUE if Clutter was compiled with XInput support
+ * and XInput support is available at run time.
+ *
+ * Since: 0.8
+ */
gboolean
clutter_x11_has_xinput (void)
{