User and window system events
Windowing events handled by Clutter.
The events usually come from the windowing backend, but can also be synthesized by Clutter itself or by the application code.
<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>
.
<clutter-event>
) ⇒ (ret <clutter-event-type>
)Retrieves the type of the event.
- event
- a
<clutter-event>
- ret
- a
<clutter-event-type>
<clutter-event>
) (x float
) (y float
)Sets the coordinates of the event.
- event
- a
<clutter-event>
- x
- the X coordinate of the event
- y
- the Y coordinate of the event
Since 1.8
<clutter-event>
) ⇒ (x float
) (y float
)Retrieves the coordinates of event and puts them into x and y.
- event
- a
<clutter-event>
- x
- return location for the X coordinate, or ‘
#f
’.- y
- return location for the Y coordinate, or ‘
#f
’.Since 0.4
<clutter-event>
) (state <clutter-modifier-type>
)Sets the modifier state of the event.
- event
- a
<clutter-event>
- state
- the modifier state to set
Since 1.8
<clutter-event>
) ⇒ (ret <clutter-modifier-type>
)Retrieves the modifier state of the event.
- event
- a
<clutter-event>
- ret
- the modifier state parameter, or 0
Since 0.4
<clutter-event>
) (time_ unsigned-int32
)Sets the time of the event.
- event
- a
<clutter-event>
- time
- the time of the event
Since 1.8
<clutter-event>
) ⇒ (ret unsigned-int32
)Retrieves the time of the event.
- event
- a
<clutter-event>
- ret
- the time of the event, or ‘CLUTTER_CURRENT_TIME’
Since 0.4
<clutter-event>
) (actor <clutter-actor>
)Sets the source
<clutter-actor>
of event.
- event
- a
<clutter-event>
- actor
- a
<clutter-actor>
, or ‘#f
’.Since 1.8
<clutter-event>
) ⇒ (ret <clutter-actor>
)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
<clutter-event>
) (stage <clutter-stage>
)Sets the source
<clutter-stage>
of the event.
- event
- a
<clutter-event>
- stage
- a
<clutter-stage>
, or ‘#f
’.Since 1.8
<clutter-event>
) ⇒ (ret <clutter-stage>
)Retrieves the source
<clutter-stage>
the event originated for, or ‘#f
’ if the event has no stage.
- event
- a
<clutter-event>
- ret
- a
<clutter-stage>
.Since 0.8
<clutter-event>
) (flags <clutter-event-flags>
)Sets the
<clutter-event-flags>
of event
- event
- a
<clutter-event>
- flags
- a binary OR of
<clutter-event-flags>
valuesSince 1.8
<clutter-event>
) ⇒ (ret <clutter-event-flags>
)Retrieves the
<clutter-event-flags>
of event
- event
- a
<clutter-event>
- ret
- the event flags
Since 1.0
<clutter-event>
) ⇒ (ret <clutter-event-sequence*>
)Retrieves the
<clutter-event-sequence>
of event.
- event
- a
<clutter-event>
of type ‘CLUTTER_TOUCH_BEGIN’, ‘CLUTTER_TOUCH_UPDATE’, ‘CLUTTER_TOUCH_END’, or ‘CLUTTER_TOUCH_CANCEL’- ret
- the event sequence, or ‘
#f
’.Since 1.10
<clutter-event>
)Pops an event off the event queue. Applications should not need to call this.
- ret
- A
<clutter-event>
or NULL if queue emptySince 0.4
<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
<clutter-event>
)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 its 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
bool
)Checks if events are pending in the event queue.
- ret
- TRUE if there are pending events, FALSE otherwise.
Since 0.4
<clutter-event>
) (button unsigned-int32
)Sets the button number of event
- event
- a
<clutter-event>
or type ‘CLUTTER_BUTTON_PRESS’ or of type ‘CLUTTER_BUTTON_RELEASE’- button
- the button number
Since 1.8
<clutter-event>
) ⇒ (ret unsigned-int32
)Retrieves the button number of event
- event
- a
<clutter-event>
of type ‘CLUTTER_BUTTON_PRESS’ or of type ‘CLUTTER_BUTTON_RELEASE’- ret
- the button number
Since 1.0
<clutter-event>
) ⇒ (ret unsigned-int
)Retrieves the number of clicks of event
- event
- a
<clutter-event>
of type ‘CLUTTER_BUTTON_PRESS’ or of type ‘CLUTTER_BUTTON_RELEASE’- ret
- the click count
Since 1.0
<clutter-event>
) (key_sym unsigned-int
)Sets the key symbol of event.
- event
- a
<clutter-event>
of type ‘CLUTTER_KEY_PRESS’ or ‘CLUTTER_KEY_RELEASE’- key-sym
- the key symbol representing the key
Since 1.8
<clutter-event>
) ⇒ (ret unsigned-int
)Retrieves the key symbol of event
- event
- a
<clutter-event>
of type ‘CLUTTER_KEY_PRESS’ or of type ‘CLUTTER_KEY_RELEASE’- ret
- the key symbol representing the key
Since 1.0
<clutter-event>
) (key_code unsigned-int16
)Sets the keycode of the event.
- event
- a
<clutter-event>
of type ‘CLUTTER_KEY_PRESS’ or ‘CLUTTER_KEY_RELEASE’- key-code
- the keycode representing the key
Since 1.8
<clutter-event>
) ⇒ (ret unsigned-int16
)Retrieves the keycode of the key that caused event
- event
- a
<clutter-event>
of type ‘CLUTTER_KEY_PRESS’ or of type ‘CLUTTER_KEY_RELEASE’- ret
- The keycode representing the key
Since 1.0
<clutter-event>
) (key_unicode unsigned-int32
)Sets the Unicode value of event.
- event
- a
<clutter-event>
of type ‘CLUTTER_KEY_PRESS’ or ‘CLUTTER_KEY_RELEASE’- key-unicode
- the Unicode value representing the key
Since 1.8
<clutter-event>
) ⇒ (ret unsigned-int32
)Retrieves the unicode value for the key that caused keyev.
- event
- a
<clutter-event>
of type ‘CLUTTER_KEY_PRESS’ or ‘CLUTTER_KEY_RELEASE’- ret
- The unicode value representing the key
unsigned-int
) ⇒ (ret unsigned-int32
)Converts keyval from a Clutter key symbol to the corresponding ISO10646 (Unicode) character.
- keyval
- a key symbol
- ret
- a Unicode character, or 0 if there is no corresponding character.
unsigned-int32
) ⇒ (ret unsigned-int
)Convert from a ISO10646 character to a key symbol.
- wc
- a ISO10646 encoded character
- ret
- the corresponding Clutter key symbol, if one exists. or, if there is no corresponding symbol, wc | 0x01000000
Since 1.10
<clutter-event>
) (actor <clutter-actor>
)Sets the related actor of a crossing event
- event
- a
<clutter-event>
of type ‘CLUTTER_ENTER’ or ‘CLUTTER_LEAVE’- actor
- a
<clutter-actor>
or ‘#f
’.Since 1.8
<clutter-event>
) ⇒ (ret <clutter-actor>
)Retrieves the related actor of a crossing event.
- event
- a
<clutter-event>
of type ‘CLUTTER_ENTER’ or of type ‘CLUTTER_LEAVE’- ret
- the related
<clutter-actor>
, or ‘#f
’.Since 1.0
<clutter-event>
) (direction <clutter-scroll-direction>
)Sets the direction of the scrolling of event
- event
- a
<clutter-event>
- direction
- the scrolling direction
Since 1.8
<clutter-event>
) ⇒ (dx double
) (dy double
)Retrieves the precise scrolling information of event.
The event has to have a
<clutter-scroll-event.direction>
value of ‘CLUTTER_SCROLL_SMOOTH’.
- event
- a
<clutter-event>
of type ‘CLUTTER_SCROLL’- dx
- return location for the delta on the horizontal axis.
- dy
- return location for the delta on the vertical axis.
Since 1.10
<clutter-event>
) (dx double
) (dy double
)Sets the precise scrolling information of event.
- event
- a
<clutter-event>
of type ‘CLUTTER_SCROLL’- dx
- delta on the horizontal axis
- dy
- delta on the vertical axis
Since 1.10
<clutter-event>
) (device <clutter-input-device*>
)Sets the device for event.
- event
- a
<clutter-event>
- device
- a
<clutter-input-device>
, or ‘#f
’.Since 1.6
<clutter-event>
) ⇒ (ret <clutter-input-device*>
)Retrieves the
<clutter-input-device>
for the event.The
<clutter-input-device>
structure is completely opaque and should be cast to the platform-specific implementation.
- event
- a
<clutter-event>
- ret
- the
<clutter-input-device>
or ‘#f
’. The returned device is owned by the<clutter-event>
and it should not be unreferenced.Since 1.0
<clutter-event>
) (device <clutter-input-device*>
)Sets the source
<clutter-input-device>
for event.The
<clutter-event>
must have been created usingclutter-event-new
.
- event
- a
<clutter-event>
- device
- a
<clutter-input-device>
.Since 1.8
<clutter-event>
) ⇒ (ret <clutter-input-device*>
)Retrieves the hardware device that originated the event.
If you need the virtual device, use
clutter-event-get-device
.If no hardware device originated this event, this function will return the same device as
clutter-event-get-device
.
- event
- a
<clutter-event>
- ret
- a pointer to a
<clutter-input-device>
or ‘#f
’.Since 1.6
<clutter-event>
) ⇒ (ret int
)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.
<clutter-event>
) ⇒ (ret <clutter-input-device-type>
)Retrieves the type of the device for event
- event
- a
<clutter-event>
- ret
- the
<clutter-input-device-type>
for the device, if any is setSince 1.0
unsigned-int32
)Retrieves the timestamp of the last event, if there is an event or if the event has a timestamp.
- ret
- the event timestamp, or ‘CLUTTER_CURRENT_TIME’
Since 1.0
<clutter-event>
)If an event is currently being processed, return that event. This function is intended to be used to access event state that might not be exposed by higher-level widgets. For example, to get the key modifier state from a Button 'clicked' event.
- ret
- The current ClutterEvent, or ‘
#f
’ if none.Since 1.2