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
- 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.
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
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 |
Bounded WindowState Source | |
Enum WindowState Source | 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 Source | |
Show WindowState Source | |
Flags WindowState Source |
data ScrollDirection Source
in which direction was scrolled?
data MouseButton Source
Mouse buttons.
Type of mouse click