Portability | portable (depends on GHC) |
---|---|
Stability | deprecated |
Maintainer | gtk2hs-users\@lists.sourceforge.net |
Safe Haskell | None |
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 :: 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
- = ScrollUp
- | ScrollDown
- | ScrollLeft
- | ScrollRight
- data MouseButton
- = LeftButton
- | MiddleButton
- | RightButton
- | OtherButton Int
- 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.
The time (in milliseconds) when an event happened. This is used mostly for ordering events and responses to events.
currentTime :: TimeStampSource
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 = EventSource
An event that contains information on a button press.
type EventScroll = EventSource
An event that contains information on scrolling.
type EventMotion = EventSource
An event that contains information on the movement of the mouse pointer.
type EventExpose = EventSource
An area of the DrawWindow
needs redrawing.
type EventConfigure = EventSource
An event that contains the new size of a window.
type EventCrossing = EventSource
Generated when the pointer enters or leaves a window.
type EventFocus = EventSource
An event that informs about a change of the input focus.
type EventProperty = EventSource
An event that indicates a property of the window changed.
type EventProximity = EventSource
An event that indicates that the pen of a graphics table is touching or not touching the tablet.
type EventVisibility = EventSource
Parts of the window have been exposed or obscured.
type EventWindowState = EventSource
The window state has changed.
type EventGrabBroken = EventSource
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.
Enum NotifyType | Determine if child widget may be overdrawn. |
Eq NotifyType | |
Show NotifyType |
data WindowState Source
The state a DrawWindow
is in.
WindowStateWithdrawn | |
WindowStateIconified | |
WindowStateMaximized | |
WindowStateSticky | |
WindowStateFullscreen | |
WindowStateAbove | |
WindowStateBelow |
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