Maintainer | gtk2hs-users\@lists.sourceforge.net |
---|---|
Stability | deprecated |
Portability | portable (depends on GHC) |
Safe Haskell | None |
Language | Haskell98 |
Definiton of a record that contains event information. Deprecated in
favor of EventM
and not exported by Gtk.hs.
Synopsis
- data Modifier
- = Shift
- | Lock
- | Control
- | Alt
- | Alt2
- | Alt3
- | Alt4
- | Alt5
- | Button1
- | Button2
- | Button3
- | Button4
- | Button5
- | MODIFIER_RESERVED_13_MASK
- | MODIFIER_RESERVED_14_MASK
- | MODIFIER_RESERVED_15_MASK
- | MODIFIER_RESERVED_16_MASK
- | MODIFIER_RESERVED_17_MASK
- | MODIFIER_RESERVED_18_MASK
- | MODIFIER_RESERVED_19_MASK
- | MODIFIER_RESERVED_20_MASK
- | MODIFIER_RESERVED_21_MASK
- | MODIFIER_RESERVED_22_MASK
- | MODIFIER_RESERVED_23_MASK
- | MODIFIER_RESERVED_24_MASK
- | MODIFIER_RESERVED_25_MASK
- | Super
- | Hyper
- | Meta
- | MODIFIER_RESERVED_29_MASK
- | Release
- | ModifierMask
- type TimeStamp = Word32
- currentTime :: TimeStamp
- data Event
- = Event { }
- | Expose { }
- | Motion {
- eventSent :: Bool
- eventTime :: TimeStamp
- eventX, eventY :: Double
- eventModifier :: [Modifier]
- eventIsHint :: Bool
- eventXRoot, eventYRoot :: Double
- | Button {
- eventSent :: Bool
- eventClick :: Click
- eventTime :: TimeStamp
- eventX, eventY :: Double
- eventModifier :: [Modifier]
- eventButton :: MouseButton
- eventXRoot, eventYRoot :: Double
- | Key { }
- | Crossing { }
- | Focus {
- eventSent :: Bool
- eventInFocus :: Bool
- | Configure {
- eventSent :: Bool
- eventXParent :: Int
- eventYParent :: Int
- eventWidth :: Int
- eventHeight :: Int
- | Visibility { }
- | Scroll { }
- | WindowState { }
- | Proximity { }
- type EventButton = Event
- type EventScroll = Event
- type EventMotion = Event
- type EventExpose = Event
- type EventKey = Event
- type EventConfigure = Event
- type EventCrossing = Event
- type EventFocus = Event
- type EventProperty = Event
- type EventProximity = Event
- type EventVisibility = Event
- type EventWindowState = Event
- type EventGrabBroken = Event
- marshExposeRect :: Ptr Event -> IO Rectangle
- marshalEvent :: Ptr Event -> IO Event
- data VisibilityState
- data CrossingMode
- data NotifyType
- data WindowState
- data ScrollDirection
- data MouseButton
- data Click
- data Rectangle = Rectangle Int Int Int Int
Documentation
Keyboard modifiers that are depressed when the user presses a key or a mouse button.
- This data type is used to build lists of modifers that were active during an event.
- The Apple key on Macintoshs is mapped to
Alt2
and theMeta
key (if available). - Since Gtk 2.10, there are also
Super
,Hyper
andMeta
modifiers which are simply generated fromAlt
..Compose
modifier keys, depending on the mapping used by the windowing system. Due to one key being mapped to e.g.Alt2
andMeta
, you shouldn't pattern match directly against a certain key but check whether a key is in the list using theelem
function, say.
Instances
Bounded Modifier Source # | |
Enum Modifier Source # | |
Defined in Graphics.UI.Gtk.Gdk.Enums | |
Eq Modifier Source # | |
Show Modifier Source # | |
Flags Modifier Source # | |
Defined in Graphics.UI.Gtk.Gdk.Enums |
type TimeStamp = Word32 Source #
The time (in milliseconds) when an event happened. This is used mostly for ordering events and responses to events.
currentTime :: TimeStamp Source #
Represents the current time, and can be used anywhere a time is expected.
Deprecated way of conveying event information.
Events that are delivered to a widget.
- Any given signal only emits one of these variants as described
in
Widget
. Many events share common attributes: - The
eventSent
attribute isTrue
if the event was not created by the user but by another application. - The
eventTime
attribute contains a time in milliseconds when the event happened. - The
eventX
andeventY
attributes contain the coordinates relative to theDrawWindow
associated with this widget. The values can contain sub-pixel information if the input device is a graphics tablet or the like. - The
eventModifier
attribute denotes what modifier key was pressed during the event.
Event | An event that is not in one of the more specific categories below. This includes delete, destroy, map and unmap events. These events have no extra information associated with them. |
Expose | The expose event.
|
Motion | Mouse motion.
|
| |
Button | A mouse button was pressed or released.
|
| |
Key | A key was pressed while the widget had the input focus.
|
| |
Crossing | Mouse cursor crossing event.
|
| |
Focus | Gaining or loosing input focus. |
| |
Configure | The widget's size has changed.
|
| |
Visibility | Change of visibility of a widget. |
| |
Scroll | Wheel movement of the mouse.
|
| |
WindowState | Indicate how the appearance of this window has changed. |
| |
Proximity | The state of the pen of a graphics tablet pen or touchscreen device. |
type EventButton = Event Source #
An event that contains information on a button press.
type EventScroll = Event Source #
An event that contains information on scrolling.
type EventMotion = Event Source #
An event that contains information on the movement of the mouse pointer.
type EventExpose = Event Source #
An area of the DrawWindow
needs redrawing.
type EventConfigure = Event Source #
An event that contains the new size of a window.
type EventCrossing = Event Source #
Generated when the pointer enters or leaves a window.
type EventFocus = Event Source #
An event that informs about a change of the input focus.
type EventProperty = Event Source #
An event that indicates a property of the window changed.
type EventProximity = Event Source #
An event that indicates that the pen of a graphics table is touching or not touching the tablet.
type EventVisibility = Event Source #
Parts of the window have been exposed or obscured.
type EventWindowState = Event Source #
The window state has changed.
type EventGrabBroken = Event Source #
A grab has been broken by unusual means.
data VisibilityState Source #
visibility of a window
Instances
Enum VisibilityState Source # | |
Defined in Graphics.UI.Gtk.Gdk.Enums succ :: VisibilityState -> VisibilityState # pred :: VisibilityState -> VisibilityState # toEnum :: Int -> VisibilityState # fromEnum :: VisibilityState -> Int # enumFrom :: VisibilityState -> [VisibilityState] # enumFromThen :: VisibilityState -> VisibilityState -> [VisibilityState] # enumFromTo :: VisibilityState -> VisibilityState -> [VisibilityState] # enumFromThenTo :: VisibilityState -> VisibilityState -> VisibilityState -> [VisibilityState] # | |
Eq VisibilityState Source # | |
Defined in Graphics.UI.Gtk.Gdk.Enums (==) :: VisibilityState -> VisibilityState -> Bool # (/=) :: VisibilityState -> VisibilityState -> Bool # | |
Show VisibilityState Source # | |
Defined in Graphics.UI.Gtk.Gdk.Enums showsPrec :: Int -> VisibilityState -> ShowS # show :: VisibilityState -> String # showList :: [VisibilityState] -> ShowS # |
data CrossingMode Source #
How focus is crossing the widget.
CrossingNormal | |
CrossingGrab | |
CrossingUngrab | |
CrossingGtkGrab | |
CrossingGtkUngrab | |
CrossingStateChanged | |
CrossingTouchBegin | |
CrossingTouchEnd | |
CrossingDeviceSwitch |
Instances
Enum CrossingMode Source # | |
Defined in Graphics.UI.Gtk.Gdk.Enums succ :: CrossingMode -> CrossingMode # pred :: CrossingMode -> CrossingMode # toEnum :: Int -> CrossingMode # fromEnum :: CrossingMode -> Int # enumFrom :: CrossingMode -> [CrossingMode] # enumFromThen :: CrossingMode -> CrossingMode -> [CrossingMode] # enumFromTo :: CrossingMode -> CrossingMode -> [CrossingMode] # enumFromThenTo :: CrossingMode -> CrossingMode -> CrossingMode -> [CrossingMode] # | |
Eq CrossingMode Source # | |
Defined in Graphics.UI.Gtk.Gdk.Enums (==) :: CrossingMode -> CrossingMode -> Bool # (/=) :: CrossingMode -> CrossingMode -> Bool # | |
Show CrossingMode Source # | |
Defined in Graphics.UI.Gtk.Gdk.Enums showsPrec :: Int -> CrossingMode -> ShowS # show :: CrossingMode -> String # showList :: [CrossingMode] -> ShowS # |
data NotifyType Source #
Information on from what level of the widget hierarchy the mouse cursor came.
NotifyAncestor
- The window is entered from an ancestor or left towards an ancestor.
NotifyVirtual
- The pointer moves between an ancestor and an inferior of the window.
NotifyInferior
- The window is entered from an inferior or left towards an inferior.
NotifyNonlinear
- The window is entered from or left towards a window which is neither an ancestor nor an inferior.
NotifyNonlinearVirtual
- The pointer moves between two windows which are not ancestors of each other and the window is part of the ancestor chain between one of these windows and their least common ancestor.
NotifyUnknown
- The level change does not fit into any of the other categories or could not be determined.
Instances
Enum NotifyType Source # | |
Defined in Graphics.UI.Gtk.Gdk.Enums succ :: NotifyType -> NotifyType # pred :: NotifyType -> NotifyType # toEnum :: Int -> NotifyType # fromEnum :: NotifyType -> Int # enumFrom :: NotifyType -> [NotifyType] # enumFromThen :: NotifyType -> NotifyType -> [NotifyType] # enumFromTo :: NotifyType -> NotifyType -> [NotifyType] # enumFromThenTo :: NotifyType -> NotifyType -> NotifyType -> [NotifyType] # | |
Eq NotifyType Source # | |
Defined in Graphics.UI.Gtk.Gdk.Enums (==) :: NotifyType -> NotifyType -> Bool # (/=) :: NotifyType -> NotifyType -> Bool # | |
Show NotifyType Source # | |
Defined in Graphics.UI.Gtk.Gdk.Enums showsPrec :: Int -> NotifyType -> ShowS # show :: NotifyType -> String # showList :: [NotifyType] -> ShowS # |
data WindowState Source #
The state a DrawWindow
is in.
WindowStateWithdrawn | |
WindowStateIconified | |
WindowStateMaximized | |
WindowStateSticky | |
WindowStateFullscreen | |
WindowStateAbove | |
WindowStateBelow | |
WindowStateFocused | |
WindowStateTiled |
Instances
data ScrollDirection Source #
in which direction was scrolled?
Instances
Enum ScrollDirection Source # | |
Defined in Graphics.UI.Gtk.Gdk.Enums succ :: ScrollDirection -> ScrollDirection # pred :: ScrollDirection -> ScrollDirection # toEnum :: Int -> ScrollDirection # fromEnum :: ScrollDirection -> Int # enumFrom :: ScrollDirection -> [ScrollDirection] # enumFromThen :: ScrollDirection -> ScrollDirection -> [ScrollDirection] # enumFromTo :: ScrollDirection -> ScrollDirection -> [ScrollDirection] # enumFromThenTo :: ScrollDirection -> ScrollDirection -> ScrollDirection -> [ScrollDirection] # | |
Eq ScrollDirection Source # | |
Defined in Graphics.UI.Gtk.Gdk.Enums (==) :: ScrollDirection -> ScrollDirection -> Bool # (/=) :: ScrollDirection -> ScrollDirection -> Bool # | |
Show ScrollDirection Source # | |
Defined in Graphics.UI.Gtk.Gdk.Enums showsPrec :: Int -> ScrollDirection -> ShowS # show :: ScrollDirection -> String # showList :: [ScrollDirection] -> ShowS # |
data MouseButton Source #
Mouse buttons.
Instances
Enum MouseButton Source # | |
Defined in Graphics.UI.Gtk.General.Enums succ :: MouseButton -> MouseButton # pred :: MouseButton -> MouseButton # toEnum :: Int -> MouseButton # fromEnum :: MouseButton -> Int # enumFrom :: MouseButton -> [MouseButton] # enumFromThen :: MouseButton -> MouseButton -> [MouseButton] # enumFromTo :: MouseButton -> MouseButton -> [MouseButton] # enumFromThenTo :: MouseButton -> MouseButton -> MouseButton -> [MouseButton] # | |
Eq MouseButton Source # | |
Defined in Graphics.UI.Gtk.General.Enums (==) :: MouseButton -> MouseButton -> Bool # (/=) :: MouseButton -> MouseButton -> Bool # | |
Show MouseButton Source # | |
Defined in Graphics.UI.Gtk.General.Enums showsPrec :: Int -> MouseButton -> ShowS # show :: MouseButton -> String # showList :: [MouseButton] -> ShowS # |
Type of mouse click
Rectangle
- Specifies x, y, width and height
Instances
Eq Rectangle | |
Show Rectangle | |
Storable Rectangle # | |
Defined in Graphics.UI.Gtk.General.Structs |