Next: , Previous: ClutterEntry, Up: Top


19 Events

User and window system events

19.1 Overview

Windowing events handled by Clutter.

19.2 Usage

— Class: <clutter-button-event>

Derives from <gboxed>.

This class defines no direct slots.

— Class: <clutter-key-event>

Derives from <gboxed>.

This class defines no direct slots.

— Class: <clutter-motion-event>

Derives from <gboxed>.

This class defines no direct slots.

— Class: <clutter-scroll-event>

Derives from <gboxed>.

This class defines no direct slots.

— Class: <clutter-stage-state-event>

Derives from <gboxed>.

This class defines no direct slots.

— Class: <clutter-crossing-event>

Derives from <gboxed>.

This class defines no direct slots.

— Function: clutter-event-new (type <clutter-event-type>)   (ret <clutter-event>)

Creates a new <clutter-event> of the specified type.

type
The type of event.
ret
A newly allocated <clutter-event>.
— Function: clutter-event-type (self <clutter-event>)   (ret <clutter-event-type>)
— Method: type

Retrieves the type of the event.

event
a <clutter-event>
ret
a <clutter-event-type>
— Function: clutter-event-get-coords (self <clutter-event>)   (int) (int)
— Method: get-coords

Retrieves the coordinates of event and puts them into x and y.

event
a <clutter-event>
x
return location for the X coordinate
y
return location for the Y coordinate

Since 0.4

— Function: clutter-event-get-state (self <clutter-event>)   (ret <clutter-modifier-type>)
— Method: get-state

Retrieves the modifier state of the event.

event
a <clutter-event>
ret
the modifier state parameter, or 0

Since 0.4

— Function: clutter-event-get-time (self <clutter-event>)   (ret unsigned-int32)
— Method: get-time

Retrieves the time of the event.

event
a <clutter-event>
ret
the time of the event, or ‘CLUTTER_CURRENT_TIME

Since 0.4

— Function: clutter-event-get-source (self <clutter-event>)   (ret <clutter-actor>)
— Method: get-source

Retrieves the source <clutter-actor> the event originated from, or NULL if the event has no source.

event
a <clutter-event>
ret
a <clutter-actor>

Since 0.6

— Function: clutter-event-get-stage (self <clutter-event>)   (ret <clutter-stage>)
— Method: get-stage

Retrieves the source <clutter-stage> the event originated for, or NULL if the event has no stage.

event
a <clutter-event>
ret
a <clutter-stage>

Since 0.8

— Function: clutter-event-get   (ret <clutter-event>)

Pops an event off the event queue. Applications should not need to call this.

ret
A <clutter-event> or NULL if queue empty

Since 0.4

— Function: clutter-event-peek   (ret <clutter-event>)

Returns a pointer to the first event from the event queue but does not remove it.

ret
A <clutter-event> or NULL if queue empty.

Since 0.4

— Function: clutter-event-put (self <clutter-event>)
— Method: put

Puts a copy of the event on the back of the event queue. The event will have the <clutter-event-flag-synthetic> flag set. If the source is set event signals will be emitted for this source and capture/bubbling for it's ancestors. If the source is not set it will be generated by picking or use the actor that currently has keyboard focus.

event
a <clutter-event>

Since 0.6

— Function: clutter-events-pending   (ret bool)

Checks if events are pending in the event queue.

ret
TRUE if there are pending events, FALSE otherwise.

Since 0.4

— Function: clutter-button-event-button (self <clutter-button-event>)   (ret unsigned-int32)
— Method: button

Retrieve the button number of the event.

buttev
a <clutter-button-event>
ret
the button number.

Since 0.4

— Function: clutter-key-event-symbol (self <clutter-key-event>)   (ret unsigned-int)
— Method: symbol

Retrieves the value of the key that caused keyev.

keyev
A <clutter-key-event>
ret
The keysym representing the key
— Function: clutter-key-event-code (self <clutter-key-event>)   (ret unsigned-int16)
— Method: code

Retrieves the keycode of the key that caused keyev.

keyev
A <clutter-key-event>
ret
The keycode representing the key
— Function: clutter-key-event-unicode (self <clutter-key-event>)   (ret unsigned-int32)
— Method: unicode

Retrieves the unicode value for the key that caused keyev.

keyev
A <clutter-key-event>
ret
The unicode value representing the key
— Function: clutter-keysym-to-unicode (keyval unsigned-int)   (ret unsigned-int32)

Convert from a Clutter key symbol to the corresponding ISO10646 (Unicode) character.

keyval
a clutter key symbol
ret
the corresponding unicode character, or 0 if there is no corresponding character.
— Function: clutter-event-get-device-id (self <clutter-event>)   (ret int)
— Method: get-device-id

Retrieves the events device id if set.

event
a clutter event
ret
A unique identifier for the device or -1 if the event has no specific device set.