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.
- 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 :: Double
- eventY :: Double
- eventModifier :: [Modifier]
- eventIsHint :: Bool
- eventXRoot :: Double
- eventYRoot :: Double
- | Button {
- eventSent :: Bool
- eventClick :: Click
- eventTime :: TimeStamp
- eventX :: Double
- eventY :: Double
- eventModifier :: [Modifier]
- eventButton :: MouseButton
- eventXRoot :: Double
- 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.
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
data CrossingMode Source
How focus is crossing the widget.
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.
data WindowState Source
The state a DrawWindow
is in.
WindowStateWithdrawn | |
WindowStateIconified | |
WindowStateMaximized | |
WindowStateSticky | |
WindowStateFullscreen | |
WindowStateAbove | |
WindowStateBelow | |
WindowStateFocused | |
WindowStateTiled |
Bounded WindowState | |
Enum WindowState | These are hints for the window manager that indicate what type of function the window has. The window manager can use this when determining decoration and behaviour of the window. The hint must be set before mapping the window. See the extended window manager hints specification for more details about window types. |
Eq WindowState | |
Show WindowState | |
Flags WindowState |
data ScrollDirection Source
in which direction was scrolled?
data MouseButton Source
Type of mouse click