gi-gdk4-4.0.10: Gdk bindings

Copyright | Will Thompson and Iñaki García Etxebarria
License | LGPL-2.1
Maintainer | Iñaki García Etxebarria
Safe Haskell | None
Language | Haskell2010

GI.Gdk.Objects.ButtonEvent

Contents

- Exported types
- Methods
  - getButton

Description

An event related to a button on a pointer device.

Synopsis

- newtype ButtonEvent = ButtonEvent (ManagedPtr ButtonEvent)
- class (BoxedPtr o, TypedObject o, IsDescendantOf ButtonEvent o) => IsButtonEvent o
- toButtonEvent :: (MonadIO m, IsButtonEvent o) => o -> m ButtonEvent
- buttonEventGetButton :: (HasCallStack, MonadIO m, IsButtonEvent a) => a -> m Word32

# Exported types

newtype ButtonEvent Source #

Memory-managed wrapper type.

Constructors

ButtonEvent (ManagedPtr ButtonEvent) |

#### Instances

Instances details

Eq ButtonEvent Source # |
Instance details Defined in GI.Gdk.Objects.ButtonEvent Methods (==) :: ButtonEvent -> ButtonEvent -> Bool Source # (/=) :: ButtonEvent -> ButtonEvent -> Bool Source #
BoxedPtr ButtonEvent Source # |
Instance details Defined in GI.Gdk.Objects.ButtonEvent Methods boxedPtrCopy :: ButtonEvent -> IO ButtonEvent Source # boxedPtrFree :: ButtonEvent -> IO () Source #
ManagedPtrNewtype ButtonEvent Source # |
Instance details Defined in GI.Gdk.Objects.ButtonEvent Methods toManagedPtr :: ButtonEvent -> ManagedPtr ButtonEvent Source #
TypedObject ButtonEvent Source # |
Instance details Defined in GI.Gdk.Objects.ButtonEvent Methods glibType :: IO GType Source #
HasParentTypes ButtonEvent Source # |
Instance details Defined in GI.Gdk.Objects.ButtonEvent
type ParentTypes ButtonEvent Source # |
Instance details Defined in GI.Gdk.Objects.ButtonEvent type ParentTypes ButtonEvent = '[Event]

class (BoxedPtr o, TypedObject o, IsDescendantOf ButtonEvent o) => IsButtonEvent o Source #

Type class for types which can be safely cast to `ButtonEvent`, for instance with `toButtonEvent`.

#### Instances

Instances details

(BoxedPtr o, TypedObject o, IsDescendantOf ButtonEvent o) => IsButtonEvent o Source # |
Instance details Defined in GI.Gdk.Objects.ButtonEvent

toButtonEvent :: (MonadIO m, IsButtonEvent o) => o -> m ButtonEvent Source #

Cast to `ButtonEvent`, for types for which this is known to be safe. For general casts, use `castTo`.

# Methods

### Click to display all available methods, including inherited ones

Expand

#### Methods

ref, triggersContextMenu, unref.

#### Getters

getAxes, getAxis, getButton, getDevice, getDeviceTool, getDisplay, getEventSequence, getEventType, getHistory, getModifierState, getPointerEmulated, getPosition, getSeat, getSurface, getTime.

#### Setters

None.

## getButton

buttonEventGetButton Source #

Arguments

:: (HasCallStack, MonadIO m, IsButtonEvent a) |
=> a | `event`: a button event
-> m Word32 | Returns: the button of `event`

Extract the button number from a button event.