gi-clutter-1.0.5: clutter GObject bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Clutter.Unions.Event

Description

Generic event wrapper.

Since: 0.2

Synopsis

Exported types

newtype Event Source #

Memory-managed wrapper type.

Constructors

Event (ManagedPtr Event) 

Instances

Instances details
Eq Event Source # 
Instance details

Defined in GI.Clutter.Unions.Event

Methods

(==) :: Event -> Event -> Bool #

(/=) :: Event -> Event -> Bool #

GBoxed Event Source # 
Instance details

Defined in GI.Clutter.Unions.Event

ManagedPtrNewtype Event Source # 
Instance details

Defined in GI.Clutter.Unions.Event

Methods

toManagedPtr :: Event -> ManagedPtr Event

TypedObject Event Source # 
Instance details

Defined in GI.Clutter.Unions.Event

Methods

glibType :: IO GType

HasParentTypes Event Source # 
Instance details

Defined in GI.Clutter.Unions.Event

tag ~ 'AttrSet => Constructible Event tag Source # 
Instance details

Defined in GI.Clutter.Unions.Event

Methods

new :: MonadIO m => (ManagedPtr Event -> Event) -> [AttrOp Event tag] -> m Event

IsGValue (Maybe Event) Source #

Convert Event to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Clutter.Unions.Event

Methods

gvalueGType_ :: IO GType

gvalueSet_ :: Ptr GValue -> Maybe Event -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe Event)

type ParentTypes Event Source # 
Instance details

Defined in GI.Clutter.Unions.Event

type ParentTypes Event = '[] :: [Type]

newZeroEvent :: MonadIO m => m Event Source #

Construct a Event struct initialized to zero.

Methods

addFilter

eventAddFilter Source #

Arguments

:: (HasCallStack, MonadIO m, IsStage a) 
=> Maybe a

stage: The Stage to capture events for

-> EventFilterFunc

func: The callback function which will be passed all events.

-> m Word32

Returns: an identifier for the event filter, to be used with eventRemoveFilter.

Adds a function which will be called for all events that Clutter processes. The function will be called before any signals are emitted for the event and it will take precedence over any grabs.

Since: 1.18

copy

eventCopy Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Event

event: A Event.

-> m Event

Returns: A newly allocated Event

Copies event.

free

eventFree Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Event

event: A Event.

-> m () 

Frees all resources used by event.

get

eventGet Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m Event

Returns: A Event or NULL if queue empty

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

Since: 0.4

getAngle

eventGetAngle Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Event

source: a Event

-> Event

target: a Event

-> m Double

Returns: the angle between two Event

Retrieves the angle relative from source to target.

The direction of the angle is from the position X axis towards the positive Y axis.

Since: 1.12

getAxes

eventGetAxes Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Event

event: a Event

-> m (Double, Word32)

Returns: an array of axis values

Retrieves the array of axes values attached to the event.

Since: 1.6

getButton

eventGetButton Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Event

event: a Event of type EventTypeButtonPress or of type EventTypeButtonRelease

-> m Word32

Returns: the button number

Retrieves the button number of event

Since: 1.0

getClickCount

eventGetClickCount Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Event

event: a Event of type EventTypeButtonPress or of type EventTypeButtonRelease

-> m Word32

Returns: the click count

Retrieves the number of clicks of event

Since: 1.0

getCoords

eventGetCoords Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Event

event: a Event

-> m (Float, Float) 

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

Since: 0.4

getDevice

eventGetDevice Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Event

event: a Event

-> m InputDevice

Returns: the InputDevice or Nothing. The returned device is owned by the Event and it should not be unreferenced

Retrieves the InputDevice for the event. If you want the physical device the event originated from, use eventGetSourceDevice.

The InputDevice structure is completely opaque and should be cast to the platform-specific implementation.

Since: 1.0

getDeviceId

eventGetDeviceId Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Event

event: a clutter event

-> m Int32

Returns: A unique identifier for the device or -1 if the event has no specific device set.

Retrieves the events device id if set.

getDeviceType

eventGetDeviceType Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Event

event: a Event

-> m InputDeviceType

Returns: the InputDeviceType for the device, if any is set

Retrieves the type of the device for event

Since: 1.0

getDistance

eventGetDistance Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Event

source: a Event

-> Event

target: a Event

-> m Float

Returns: the distance between two Event

Retrieves the distance between two events, a source and a target.

Since: 1.12

getEventSequence

eventGetEventSequence Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Event

event: a Event of type EventTypeTouchBegin, EventTypeTouchUpdate, EventTypeTouchEnd, or EventTypeTouchCancel

-> m EventSequence

Returns: the event sequence, or Nothing

Retrieves the EventSequence of event.

Since: 1.10

getFlags

eventGetFlags Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Event

event: a Event

-> m [EventFlags]

Returns: the event flags

Retrieves the EventFlags of event

Since: 1.0

getGestureMotionDelta

eventGetGestureMotionDelta Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Event

event: A clutter touchpad gesture event

-> m (Double, Double) 

Returns the gesture motion deltas relative to the current pointer position.

Since: 1.24

getGesturePhase

eventGetGesturePhase Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Event

event: a touchpad gesture event

-> m TouchpadGesturePhase

Returns: the phase of the gesture event.

Returns the phase of the event, See TouchpadGesturePhase.

getGesturePinchAngleDelta

eventGetGesturePinchAngleDelta Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Event

event: a touchpad pinch event

-> m Double

Returns: The angle delta relative to the previous event.

Returns the angle delta reported by this specific event.

Since: 1.24

getGesturePinchScale

eventGetGesturePinchScale Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Event

event: a touchpad pinch event

-> m Double

Returns: the current pinch gesture scale

Returns the current scale as reported by event, 1.0 being the original distance at the time the corresponding event with phase TouchpadGesturePhaseBegin is received. is received.

Since: 1.24

getGestureSwipeFingerCount

eventGetGestureSwipeFingerCount Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Event

event: a touchpad swipe event

-> m Word32

Returns: the number of fingers swiping.

Returns the number of fingers that is triggering the touchpad gesture.

Since: 1.24

getKeyCode

eventGetKeyCode Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Event

event: a Event of type EventTypeKeyPress or of type EventTypeKeyRelease

-> m Word16

Returns: The keycode representing the key

Retrieves the keycode of the key that caused event

Since: 1.0

getKeySymbol

eventGetKeySymbol Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Event

event: a Event of type EventTypeKeyPress or of type EventTypeKeyRelease

-> m Word32

Returns: the key symbol representing the key

Retrieves the key symbol of event

Since: 1.0

getKeyUnicode

eventGetKeyUnicode Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Event

event: a Event of type EventTypeKeyPress or EventTypeKeyRelease

-> m Char

Returns: The unicode value representing the key

Retrieves the unicode value for the key that caused keyev.

getPosition

eventGetPosition Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Event

event: a Event

-> Point

position: a Point

-> m () 

Retrieves the event coordinates as a Point.

Since: 1.12

getRelated

eventGetRelated Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Event

event: a Event of type EventTypeEnter or of type EventTypeLeave

-> m Actor

Returns: the related Actor, or Nothing

Retrieves the related actor of a crossing event.

Since: 1.0

getScrollDelta

eventGetScrollDelta Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Event

event: a Event of type EventTypeScroll

-> m (Double, Double) 

Retrieves the precise scrolling information of event.

The event has to have a ScrollEvent.direction value of ScrollDirectionSmooth.

Since: 1.10

getScrollDirection

eventGetScrollDirection Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Event

event: a Event of type EventTypeScroll

-> m ScrollDirection

Returns: the scrolling direction

Retrieves the direction of the scrolling of event

Since: 1.0

getSource

eventGetSource Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Event

event: a Event

-> m Actor

Returns: a Actor

Retrieves the source Actor the event originated from, or NULL if the event has no source.

Since: 0.6

getSourceDevice

eventGetSourceDevice Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Event

event: a Event

-> m InputDevice

Returns: a pointer to a InputDevice or Nothing

Retrieves the hardware device that originated the event.

If you need the virtual device, use eventGetDevice.

If no hardware device originated this event, this function will return the same device as eventGetDevice.

Since: 1.6

getStage

eventGetStage Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Event

event: a Event

-> m Stage

Returns: a Stage

Retrieves the source Stage the event originated for, or Nothing if the event has no stage.

Since: 0.8

getState

eventGetState Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Event

event: a Event

-> m [ModifierType]

Returns: the modifier state parameter, or 0

Retrieves the modifier state of the event. In case the window system supports reporting latched and locked modifiers, this function returns the effective state.

Since: 0.4

getStateFull

eventGetStateFull Source #

Retrieves the decomposition of the keyboard state into button, base, latched, locked and effective. This can be used to transmit to other applications, for example when implementing a wayland compositor.

Since: 1.16

getTime

eventGetTime Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Event

event: a Event

-> m Word32

Returns: the time of the event, or CURRENT_TIME

Retrieves the time of the event.

Since: 0.4

hasControlModifier

eventHasControlModifier Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Event

event: a Event

-> m Bool

Returns: True if the event has the Control modifier mask set

Checks whether event has the Control modifier mask set.

Since: 1.12

hasShiftModifier

eventHasShiftModifier Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Event

event: a Event

-> m Bool

Returns: True if the event has the Shift modifier mask set

Checks whether event has the Shift modifier mask set.

Since: 1.12

isPointerEmulated

eventIsPointerEmulated Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Event

event: a Event

-> m Bool

Returns: True if the event is pointer emulated

Checks whether a pointer event has been generated by the windowing system. The returned value can be used to distinguish between events synthesized by the windowing system itself (as opposed by Clutter).

Since: 1.12

new

eventNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> EventType

type: The type of event.

-> m Event

Returns: A newly allocated Event.

Creates a new Event of the specified type.

peek

eventPeek Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m Event

Returns: A Event or NULL if queue empty.

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

Since: 0.4

put

eventPut Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Event

event: a Event

-> m () 

Puts a copy of the event on the back of the event queue. The event will have the EventFlagsFlagSynthetic 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

Since: 0.6

removeFilter

eventRemoveFilter Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Word32

id: The ID of the event filter, as returned from eventAddFilter

-> m () 

Removes an event filter that was previously added with eventAddFilter.

Since: 1.18

setButton

eventSetButton Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Event

event: a Event or type EventTypeButtonPress or of type EventTypeButtonRelease

-> Word32

button: the button number

-> m () 

Sets the button number of event

Since: 1.8

setCoords

eventSetCoords Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Event

event: a Event

-> Float

x: the X coordinate of the event

-> Float

y: the Y coordinate of the event

-> m () 

Sets the coordinates of the event.

Since: 1.8

setDevice

eventSetDevice Source #

Arguments

:: (HasCallStack, MonadIO m, IsInputDevice a) 
=> Event

event: a Event

-> Maybe a

device: a InputDevice, or Nothing

-> m () 

Sets the device for event.

Since: 1.6

setFlags

eventSetFlags Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Event

event: a Event

-> [EventFlags]

flags: a binary OR of EventFlags values

-> m () 

Sets the EventFlags of event

Since: 1.8

setKeyCode

eventSetKeyCode Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Event

event: a Event of type EventTypeKeyPress or EventTypeKeyRelease

-> Word16

keyCode: the keycode representing the key

-> m () 

Sets the keycode of the event.

Since: 1.8

setKeySymbol

eventSetKeySymbol Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Event

event: a Event of type EventTypeKeyPress or EventTypeKeyRelease

-> Word32

keySym: the key symbol representing the key

-> m () 

Sets the key symbol of event.

Since: 1.8

setKeyUnicode

eventSetKeyUnicode Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Event

event: a Event of type EventTypeKeyPress or EventTypeKeyRelease

-> Char

keyUnicode: the Unicode value representing the key

-> m () 

Sets the Unicode value of event.

Since: 1.8

setRelated

eventSetRelated Source #

Arguments

:: (HasCallStack, MonadIO m, IsActor a) 
=> Event

event: a Event of type EventTypeEnter or EventTypeLeave

-> Maybe a

actor: a Actor or Nothing

-> m () 

Sets the related actor of a crossing event

Since: 1.8

setScrollDelta

eventSetScrollDelta Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Event

event: a Event of type EventTypeScroll

-> Double

dx: delta on the horizontal axis

-> Double

dy: delta on the vertical axis

-> m () 

Sets the precise scrolling information of event.

Since: 1.10

setScrollDirection

eventSetScrollDirection Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Event

event: a Event

-> ScrollDirection

direction: the scrolling direction

-> m () 

Sets the direction of the scrolling of event

Since: 1.8

setSource

eventSetSource Source #

Arguments

:: (HasCallStack, MonadIO m, IsActor a) 
=> Event

event: a Event

-> Maybe a

actor: a Actor, or Nothing

-> m () 

Sets the source Actor of event.

Since: 1.8

setSourceDevice

eventSetSourceDevice Source #

Arguments

:: (HasCallStack, MonadIO m, IsInputDevice a) 
=> Event

event: a Event

-> Maybe a

device: a InputDevice

-> m () 

Sets the source InputDevice for event.

The Event must have been created using eventNew.

Since: 1.8

setStage

eventSetStage Source #

Arguments

:: (HasCallStack, MonadIO m, IsStage a) 
=> Event

event: a Event

-> Maybe a

stage: a Stage, or Nothing

-> m () 

Sets the source Stage of the event.

Since: 1.8

setState

eventSetState Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Event

event: a Event

-> [ModifierType]

state: the modifier state to set

-> m () 

Sets the modifier state of the event.

Since: 1.8

setTime

eventSetTime Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Event

event: a Event

-> Word32

time_: the time of the event

-> m () 

Sets the time of the event.

Since: 1.8

type

eventType Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Event

event: a Event

-> m EventType

Returns: a EventType

Retrieves the type of the event.