Maintainer | gtk2hs-users\@lists.sourceforge.net |
---|---|
Stability | deprecated |
Portability | portable (depends on GHC) |
Safe Haskell | None |
Language | Haskell98 |
Graphics.UI.Gtk.Gdk.Events
Description
Definiton of a record that contains event information. Deprecated in
favor of EventM
and not exported by Gtk.hs.
Synopsis
- data Modifier
- type TimeStamp = Word32
- currentTime :: TimeStamp
- data Event
- = Event { }
- | Expose {
- eventSent :: Bool
- eventArea :: Rectangle
- eventRegion :: Region
- eventCount :: Int
- | 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.
Constructors
Shift | |
Lock | |
Control | |
Alt | |
Alt2 | |
Alt3 | |
Alt4 | |
Alt5 | |
Button1 | |
Button2 | |
Button3 | |
Button4 | |
Button5 | |
Super | |
Hyper | |
Meta | |
Release | |
ModifierMask |
Instances
Bounded Modifier Source # | |
Enum Modifier Source # | |
Defined in Graphics.UI.Gtk.Gdk.Enums Methods succ :: Modifier -> Modifier Source # pred :: Modifier -> Modifier Source # toEnum :: Int -> Modifier Source # fromEnum :: Modifier -> Int Source # enumFrom :: Modifier -> [Modifier] Source # enumFromThen :: Modifier -> Modifier -> [Modifier] Source # enumFromTo :: Modifier -> Modifier -> [Modifier] Source # enumFromThenTo :: Modifier -> Modifier -> Modifier -> [Modifier] Source # | |
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.
Constructors
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.
|
Fields
| |
Motion | Mouse motion.
|
Fields
| |
Button | A mouse button was pressed or released.
|
Fields
| |
Key | A key was pressed while the widget had the input focus.
|
Fields
| |
Crossing | Mouse cursor crossing event.
|
Fields
| |
Focus | Gaining or loosing input focus. |
Fields
| |
Configure | The widget's size has changed.
|
Fields
| |
Visibility | Change of visibility of a widget. |
Fields
| |
Scroll | Wheel movement of the mouse.
|
Fields
| |
WindowState | Indicate how the appearance of this window has changed. |
Fields
| |
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 #
Instances
Enum VisibilityState Source # | |
Defined in Graphics.UI.Gtk.Gdk.Enums Methods succ :: VisibilityState -> VisibilityState Source # pred :: VisibilityState -> VisibilityState Source # toEnum :: Int -> VisibilityState Source # fromEnum :: VisibilityState -> Int Source # enumFrom :: VisibilityState -> [VisibilityState] Source # enumFromThen :: VisibilityState -> VisibilityState -> [VisibilityState] Source # enumFromTo :: VisibilityState -> VisibilityState -> [VisibilityState] Source # enumFromThenTo :: VisibilityState -> VisibilityState -> VisibilityState -> [VisibilityState] Source # | |
Eq VisibilityState Source # | |
Defined in Graphics.UI.Gtk.Gdk.Enums Methods (==) :: VisibilityState -> VisibilityState -> Bool Source # (/=) :: VisibilityState -> VisibilityState -> Bool Source # | |
Show VisibilityState Source # | |
Defined in Graphics.UI.Gtk.Gdk.Enums |
data CrossingMode Source #
How focus is crossing the widget.
Constructors
CrossingNormal | |
CrossingGrab | |
CrossingUngrab | |
CrossingGtkGrab | |
CrossingGtkUngrab | |
CrossingStateChanged |
Instances
Enum CrossingMode Source # | |
Defined in Graphics.UI.Gtk.Gdk.Enums Methods succ :: CrossingMode -> CrossingMode Source # pred :: CrossingMode -> CrossingMode Source # toEnum :: Int -> CrossingMode Source # fromEnum :: CrossingMode -> Int Source # enumFrom :: CrossingMode -> [CrossingMode] Source # enumFromThen :: CrossingMode -> CrossingMode -> [CrossingMode] Source # enumFromTo :: CrossingMode -> CrossingMode -> [CrossingMode] Source # enumFromThenTo :: CrossingMode -> CrossingMode -> CrossingMode -> [CrossingMode] Source # | |
Eq CrossingMode Source # | |
Defined in Graphics.UI.Gtk.Gdk.Enums Methods (==) :: CrossingMode -> CrossingMode -> Bool Source # (/=) :: CrossingMode -> CrossingMode -> Bool Source # | |
Show CrossingMode Source # | |
Defined in Graphics.UI.Gtk.Gdk.Enums |
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.
Constructors
NotifyAncestor | |
NotifyVirtual | |
NotifyInferior | |
NotifyNonlinear | |
NotifyNonlinearVirtual | |
NotifyUnknown |
Instances
Enum NotifyType Source # | |
Defined in Graphics.UI.Gtk.Gdk.Enums Methods succ :: NotifyType -> NotifyType Source # pred :: NotifyType -> NotifyType Source # toEnum :: Int -> NotifyType Source # fromEnum :: NotifyType -> Int Source # enumFrom :: NotifyType -> [NotifyType] Source # enumFromThen :: NotifyType -> NotifyType -> [NotifyType] Source # enumFromTo :: NotifyType -> NotifyType -> [NotifyType] Source # enumFromThenTo :: NotifyType -> NotifyType -> NotifyType -> [NotifyType] Source # | |
Eq NotifyType Source # | |
Defined in Graphics.UI.Gtk.Gdk.Enums Methods (==) :: NotifyType -> NotifyType -> Bool Source # (/=) :: NotifyType -> NotifyType -> Bool Source # | |
Show NotifyType Source # | |
Defined in Graphics.UI.Gtk.Gdk.Enums |
data WindowState Source #
The state a DrawWindow
is in.
Constructors
WindowStateWithdrawn | |
WindowStateIconified | |
WindowStateMaximized | |
WindowStateSticky | |
WindowStateFullscreen | |
WindowStateAbove | |
WindowStateBelow |
Instances
data ScrollDirection Source #
in which direction was scrolled?
Constructors
ScrollUp | |
ScrollDown | |
ScrollLeft | |
ScrollRight |
Instances
Enum ScrollDirection Source # | |
Defined in Graphics.UI.Gtk.Gdk.Enums Methods succ :: ScrollDirection -> ScrollDirection Source # pred :: ScrollDirection -> ScrollDirection Source # toEnum :: Int -> ScrollDirection Source # fromEnum :: ScrollDirection -> Int Source # enumFrom :: ScrollDirection -> [ScrollDirection] Source # enumFromThen :: ScrollDirection -> ScrollDirection -> [ScrollDirection] Source # enumFromTo :: ScrollDirection -> ScrollDirection -> [ScrollDirection] Source # enumFromThenTo :: ScrollDirection -> ScrollDirection -> ScrollDirection -> [ScrollDirection] Source # | |
Eq ScrollDirection Source # | |
Defined in Graphics.UI.Gtk.Gdk.Enums Methods (==) :: ScrollDirection -> ScrollDirection -> Bool Source # (/=) :: ScrollDirection -> ScrollDirection -> Bool Source # | |
Show ScrollDirection Source # | |
Defined in Graphics.UI.Gtk.Gdk.Enums |
data MouseButton Source #
Mouse buttons.
Constructors
LeftButton | |
MiddleButton | |
RightButton | |
OtherButton Int |
Instances
Enum MouseButton Source # | |
Defined in Graphics.UI.Gtk.General.Enums Methods succ :: MouseButton -> MouseButton Source # pred :: MouseButton -> MouseButton Source # toEnum :: Int -> MouseButton Source # fromEnum :: MouseButton -> Int Source # enumFrom :: MouseButton -> [MouseButton] Source # enumFromThen :: MouseButton -> MouseButton -> [MouseButton] Source # enumFromTo :: MouseButton -> MouseButton -> [MouseButton] Source # enumFromThenTo :: MouseButton -> MouseButton -> MouseButton -> [MouseButton] Source # | |
Eq MouseButton Source # | |
Defined in Graphics.UI.Gtk.General.Enums Methods (==) :: MouseButton -> MouseButton -> Bool Source # (/=) :: MouseButton -> MouseButton -> Bool Source # | |
Show MouseButton Source # | |
Defined in Graphics.UI.Gtk.General.Enums |
Type of mouse click
Constructors
SingleClick | |
DoubleClick | |
TripleClick | |
ReleaseClick |
Instances
Enum Click Source # | |
Defined in Graphics.UI.Gtk.General.Enums Methods succ :: Click -> Click Source # pred :: Click -> Click Source # toEnum :: Int -> Click Source # fromEnum :: Click -> Int Source # enumFrom :: Click -> [Click] Source # enumFromThen :: Click -> Click -> [Click] Source # enumFromTo :: Click -> Click -> [Click] Source # enumFromThenTo :: Click -> Click -> Click -> [Click] Source # | |
Eq Click Source # | |
Show Click Source # | |
Rectangle
- Specifies x, y, width and height
Instances
Eq Rectangle | |
Show Rectangle | |
Storable Rectangle Source # | |
Defined in Graphics.UI.Gtk.General.Structs Methods sizeOf :: Rectangle -> Int Source # alignment :: Rectangle -> Int Source # peekElemOff :: Ptr Rectangle -> Int -> IO Rectangle Source # pokeElemOff :: Ptr Rectangle -> Int -> Rectangle -> IO () Source # peekByteOff :: Ptr b -> Int -> IO Rectangle Source # pokeByteOff :: Ptr b -> Int -> Rectangle -> IO () Source # |