Xfce Foundation Classes
Main Page | Index | Namespace List | Alphabetical List | Class List | File List

# events.hh File Reference

A GdkEvent C++ wrapper interface. More...

`#include <xfc/glib/boxed.hh>`
`#include <xfc/gdk/types.hh>`
`#include <xfc/gdk/inline/event.inl>`

## Namespaces

- namespace Xfc
- namespace Xfc::Gdk

## Classes

- class Xfc::Gdk::Event
    The Event object represents a GdkEvent. More...
- class Xfc::Gdk::EventAny
    A GdkEventAny C++ wrapper class. More...
- class Xfc::Gdk::EventExpose
    A GdkEventExpose C++ wrapper class. More...
- class Xfc::Gdk::EventVisibility
    A GdkEventVisibility C++ wrapper class. More...
- class Xfc::Gdk::EventMotion
    A GdkEventMotion C++ wrapper class. More...
- class Xfc::Gdk::EventButton
    A GdkEventButton C++ wrapper class. More...
- class Xfc::Gdk::EventScroll
    A GdkEventScroll C++ wrapper class. More...
- class Xfc::Gdk::EventKey
    A GdkEventKey C++ wrapper class. More...
- class Xfc::Gdk::EventCrossing
    A GdkEventCrossing C++ wrapper class. More...
- class Xfc::Gdk::EventFocus
    A GdkEventFocus C++ wrapper class. More...
- class Xfc::Gdk::EventConfigure
    A GdkEventConfigure C++ wrapper class. More...
- class Xfc::Gdk::EventProperty
    A GdkEventProperty C++ wrapper class. More...
- class Xfc::Gdk::EventSelection
    A GdkEventSelection C++ wrapper class. More...
- class Xfc::Gdk::EventOwnerChange
    A GdkEventOwnerChange C++ wrapper class. More...
- class Xfc::Gdk::EventProximity
    A GdkEventProximity C++ wrapper class. More...
- class Xfc::Gdk::EventClient
    A GdkEventClient C++ wrapper class. More...
- class Xfc::Gdk::EventSetting
    A GdkEventSetting C++ wrapper class. More...
- class Xfc::Gdk::EventWindowState
    A GdkEventWindowState C++ wrapper class. More...
- class Xfc::Gdk::EventDND
    A GdkEventDND C++ wrapper class. More...

## Event Methods

- bool get_show_events ()
    Returns true if event debugging output is enabled.
- bool events_pending ()
    Checks if any events are ready to be processed for any display.
- void set_show_events (bool show_events)
    Sets whether a trace of received events is output.

## Typedefs

- typedef unsigned int EventMaskField
    EventMaskField is a bit-field that holds one or more values from the Gdk::EventMask enumeration.
- typedef unsigned int WindowStateField
    WindowStateField is a bit-field that holds one or more values from the Gdk::WindowState enumeration.

## Enumerations

- enum EventType {
  NOTHING = GDK_NOTHING,
  DELETE = GDK_DELETE,
  DESTROY = GDK_DESTROY,
  EXPOSE = GDK_EXPOSE,
  MOTION_NOTIFY = GDK_MOTION_NOTIFY,
  BUTTON_PRESS = GDK_BUTTON_PRESS,
  TWO_BUTTON_PRESS = GDK_2BUTTON_PRESS,
  THREE_BUTTON_PRESS = GDK_3BUTTON_PRESS,
  BUTTON_RELEASE = GDK_BUTTON_RELEASE,
  KEY_PRESS = GDK_KEY_PRESS,
  KEY_RELEASE = GDK_KEY_RELEASE,
  ENTER_NOTIFY = GDK_ENTER_NOTIFY,
  LEAVE_NOTIFY = GDK_LEAVE_NOTIFY,
  FOCUS_CHANGE = GDK_FOCUS_CHANGE,
  CONFIGURE = GDK_CONFIGURE,
  MAP = GDK_MAP,
  UNMAP = GDK_UNMAP,
  PROPERTY_NOTIFY = GDK_PROPERTY_NOTIFY,
  SELECTION_CLEAR = GDK_SELECTION_CLEAR,
  SELECTION_REQUEST = GDK_SELECTION_REQUEST,
  SELECTION_NOTIFY = GDK_SELECTION_NOTIFY,
  PROXIMITY_IN = GDK_PROXIMITY_IN,
  PROXIMITY_OUT = GDK_PROXIMITY_OUT,
  DRAG_ENTER = GDK_DRAG_ENTER,
  DRAG_LEAVE = GDK_DRAG_LEAVE,
  DRAG_MOTION = GDK_DRAG_MOTION,
  DRAG_STATUS = GDK_DRAG_STATUS,
  DROP_START = GDK_DROP_START,
  DROP_FINISHED = GDK_DROP_FINISHED,
  CLIENT_EVENT = GDK_CLIENT_EVENT,
  VISIBILITY_NOTIFY = GDK_VISIBILITY_NOTIFY,
  NO_EXPOSE = GDK_NO_EXPOSE,
  SCROLL = GDK_SCROLL,
  WINDOW_STATE = GDK_WINDOW_STATE,
  SETTING = GDK_SETTING,
  OWNER_CHANGE = GDK_OWNER_CHANGE
  }
    Specifies the type of the event. More...
- enum EventMask {
  EXPOSURE_MASK = GDK_EXPOSURE_MASK,
  POINTER_MOTION_MASK = GDK_POINTER_MOTION_MASK,
  POINTER_MOTION_HINT_MASK = GDK_POINTER_MOTION_HINT_MASK,
  BUTTON_MOTION_MASK = GDK_BUTTON_MOTION_MASK,
  BUTTON1_MOTION_MASK = GDK_BUTTON1_MOTION_MASK,
  BUTTON2_MOTION_MASK = GDK_BUTTON2_MOTION_MASK,
  BUTTON3_MOTION_MASK = GDK_BUTTON3_MOTION_MASK,
  BUTTON_PRESS_MASK = GDK_BUTTON_PRESS_MASK,
  BUTTON_RELEASE_MASK = GDK_BUTTON_RELEASE_MASK,
  KEY_PRESS_MASK = GDK_KEY_PRESS_MASK,
  KEY_RELEASE_MASK = GDK_KEY_RELEASE_MASK,
  ENTER_NOTIFY_MASK = GDK_ENTER_NOTIFY_MASK,
  LEAVE_NOTIFY_MASK = GDK_LEAVE_NOTIFY_MASK,
  FOCUS_CHANGE_MASK = GDK_FOCUS_CHANGE_MASK,
  STRUCTURE_MASK = GDK_STRUCTURE_MASK,
  PROPERTY_CHANGE_MASK = GDK_PROPERTY_CHANGE_MASK,
  VISIBILITY_NOTIFY_MASK = GDK_VISIBILITY_NOTIFY_MASK,
  PROXIMITY_IN_MASK = GDK_PROXIMITY_IN_MASK,
  PROXIMITY_OUT_MASK = GDK_PROXIMITY_OUT_MASK,
  SUBSTRUCTURE_MASK = GDK_SUBSTRUCTURE_MASK,
  SCROLL_MASK = GDK_SCROLL_MASK,
  ALL_EVENTS_MASK = GDK_ALL_EVENTS_MASK
  }
    A set of bit-flags to indicate which events a window is to receive. More...
- enum VisibilityState {
  VISIBILITY_UNOBSCURED = GDK_VISIBILITY_UNOBSCURED,
  VISIBILITY_PARTIAL = GDK_VISIBILITY_PARTIAL,
  VISIBILITY_FULLY_OBSCURED = GDK_VISIBILITY_FULLY_OBSCURED
  }
    Specifies the visiblity status of a window for an EventVisibility. More...
- enum ScrollDirection {
  SCROLL_UP = GDK_SCROLL_UP ,
  SCROLL_LEFT = GDK_SCROLL_LEFT,
  SCROLL_RIGHT = GDK_SCROLL_RIGHT
  }
    Specifies the direction for an EventScroll. More...
- enum NotifyType {
  NOTIFY_ANCESTOR = GDK_NOTIFY_ANCESTOR,
  NOTIFY_VIRTUAL = GDK_NOTIFY_VIRTUAL,
  NOTIFY_INFERIOR = GDK_NOTIFY_INFERIOR,
  NOTIFY_NONLINEAR = GDK_NOTIFY_NONLINEAR,
  NOTIFY_NONLINEAR_VIRTUAL = GDK_NOTIFY_NONLINEAR_VIRTUAL,
  NOTIFY_UNKNOWN = GDK_NOTIFY_UNKNOWN
  }
    Specifies the kind of crossing for an EventCrossing. More...
- enum CrossingMode {
  CROSSING_NORMAL = GDK_CROSSING_NORMAL,
  CROSSING_GRAB = GDK_CROSSING_GRAB,
  CROSSING_UNGRAB = GDK_CROSSING_UNGRAB
  }
    Specifies the crossing mode for an EventCrossing. More...
- enum PropertyState {
  PROPERTY_NEW_VALUE = GDK_PROPERTY_NEW_VALUE,
  PROPERTY_DELETE = GDK_PROPERTY_DELETE
  }
    Specifies the type of a property change for an EventProperty. More...
- enum WindowState {
  WINDOW_STATE_WITHDRAWN = GDK_WINDOW_STATE_WITHDRAWN,
  WINDOW_STATE_ICONIFIED = GDK_WINDOW_STATE_ICONIFIED,
  WINDOW_STATE_MAXIMIZED = GDK_WINDOW_STATE_MAXIMIZED,
  WINDOW_STATE_STICKY = GDK_WINDOW_STATE_STICKY,
  WINDOW_STATE_FULLSCREEN = GDK_WINDOW_STATE_FULLSCREEN,
  WINDOW_STATE_ABOVE = GDK_WINDOW_STATE_ABOVE,
  WINDOW_STATE_BELOW = GDK_WINDOW_STATE_BELOW
  }
    Specifies the state of a toplevel window. More...
- enum SettingAction {
  SETTING_ACTION_NEW = GDK_SETTING_ACTION_NEW,
  SETTING_ACTION_CHANGED = GDK_SETTING_ACTION_CHANGED,
  SETTING_ACTION_DELETED = GDK_SETTING_ACTION_DELETED
  }
    Specifies the kind of modification applied to a setting in an EventSetting. More...
- enum OwnerChange {
  OWNER_CHANGE_NEW_OWNER = GDK_OWNER_CHANGE_NEW_OWNER,
  OWNER_CHANGE_DESTROY = GDK_OWNER_CHANGE_DESTROY,
  OWNER_CHANGE_CLOSE = GDK_OWNER_CHANGE_CLOSE
  }
    Specifies why a selection ownership was changed. More...

## Detailed Description

A GdkEvent C++ wrapper interface.

Provides C++ wrapper classes the for GDK event structures.

## Enumeration Type Documentation

enum CrossingMode

Specifies the crossing mode for an EventCrossing.

Enumeration values:

  CROSSING_NORMAL | Crossing because of pointer motion.
  CROSSING_GRAB | Crossing because a grab is activated.
  CROSSING_UNGRAB | Crossing because a grab is deactivated.

enum EventMask

A set of bit-flags to indicate which events a window is to receive.

Most of these masks map onto one or more of the EventType event types.

POINTER_MOTION_HINT_MASK is a special mask which is used to reduce the number of MOTION_NOTIFY events received. Normally a MOTION_NOTIFY event is received each time the mouse moves. However, if the application spends a lot of time processing the event (updating the display, for example), it can easily lag behind the position of the mouse. When using the POINTER_MOTION_HINT_MASK the server will only send MOTION_NOTIFY events when the application asks for them, by calling Gdk::Window::get_pointer().

Enumeration values:

  EXPOSURE_MASK | Maps to the expose-event.
  POINTER_MOTION_MASK | Maps to the motion-notify-event.
  POINTER_MOTION_HINT_MASK | Decreases the number of motion-notify events.
  BUTTON_MOTION_MASK | Maps to the motion-notify-event.
  BUTTON1_MOTION_MASK | Maps to the motion-notify-event.
  BUTTON2_MOTION_MASK | Maps to the motion-notify-event.
  BUTTON3_MOTION_MASK | Maps to the motion-notify-event.
  BUTTON_PRESS_MASK | Maps to the button-press-event.
  BUTTON_RELEASE_MASK | Maps to the button-press-event.
  KEY_PRESS_MASK | Maps to the key-press-event.
  KEY_RELEASE_MASK | Maps to the key-release-event.
  ENTER_NOTIFY_MASK | Maps to the enter-notify-event.
  LEAVE_NOTIFY_MASK | Maps to the leave-notify-event.
  FOCUS_CHANGE_MASK | Maps to the focus-change-event.
  STRUCTURE_MASK | Allows map, unmap, destroy and configure events to be captured.
  PROPERTY_CHANGE_MASK | Maps to the property-notify-event.
  VISIBILITY_NOTIFY_MASK | Maps to the visibilty-notify-event.
  PROXIMITY_IN_MASK | Maps to the proximity-in-event.
  PROXIMITY_OUT_MASK | Maps to the proximity-out-event.
  SUBSTRUCTURE_MASK | Allows a window to receive STRUCTURE_MASK events on any child windows.
  SCROLL_MASK | Maps to the scroll-event.
  ALL_EVENTS_MASK | Maps to the all events.

enum EventType

Specifies the type of the event.

Enumeration values:

  NOTHING | A special code to indicate a null event.
  DELETE | The window manager has requested that the toplevel window be hidden or destroyed, usually when the user clicks on a special icon in the title bar.
  DESTROY | The window has been destroyed.
  EXPOSE | All or part of the window has become visible and needs to be redrawn.
  MOTION_NOTIFY | The pointer (usually a mouse) has moved.
  BUTTON_PRESS | A mouse button has been pressed.
  TWO_BUTTON_PRESS | A mouse button has been double-clicked (clicked twice within a short period of time); Note that each click also generates a GDK_BUTTON_PRESS event.
  THREE_BUTTON_PRESS | A mouse button has been clicked 3 times in a short period of time; Note that each click also generates a GDK_BUTTON_PRESS event.
  BUTTON_RELEASE | A mouse button has been released.
  KEY_PRESS | A key has been pressed.
  KEY_RELEASE | A key has been released.
  ENTER_NOTIFY | The pointer has entered the window.
  LEAVE_NOTIFY | The pointer has left the window.
  FOCUS_CHANGE | The keyboard focus has entered or left the window.
  CONFIGURE | The size, position or stacking order of the window has changed; Note that GTK+ discards these events for Gdk::WINDOW_CHILD windows.
  MAP | The window has been mapped.
  UNMAP | The window has been unmapped.
  PROPERTY_NOTIFY | A property on the window has been changed or deleted.
  SELECTION_CLEAR | The application has lost ownership of a selection.
  SELECTION_REQUEST | Another application has requested a selection.
  SELECTION_NOTIFY | A selection has been received.
  PROXIMITY_IN | An input device has moved into contact with a sensing surface (e.g. a touchscreen or graphics tablet).
  PROXIMITY_OUT | An input device has moved out of contact with a sensing surface.
  DRAG_ENTER | The mouse has entered the window while a drag is in progress.
  DRAG_LEAVE | The mouse has entered the window while a drag is in progress.
  DRAG_MOTION | The mouse has moved in the window while a drag is in progress.
  DRAG_STATUS | The status of the drag operation initiated by the window has changed.
  DROP_START | A drop operation onto the window has started.
  DROP_FINISHED | The drop operation initiated by the window has completed.
  CLIENT_EVENT | A message has been received from another application.
  VISIBILITY_NOTIFY | The window visibility status has changed.
  NO_EXPOSE | Indicates that the source region was completely available when parts of a drawable were copied (this is not very useful).
  SCROLL | The mouse wheel was scrolled either up or down.
  WINDOW_STATE | The state of a toplevel window has chnaged (either not shown, minimized, maximized, sticky or fullscreen).
  SETTING | A setting was modified.
  OWNER_CHANGE | The owner of a selection changed.

enum NotifyType

Specifies the kind of crossing for an EventCrossing.

See the X11 protocol specification of LeaveNotify for full details of crossing event generation.

Enumeration values:

  NOTIFY_ANCESTOR | The window is entered from an ancestor or left towards an ancestor.
  NOTIFY_VIRTUAL | The pointer moves between an ancestor and an inferior of the window.
  NOTIFY_INFERIOR | The window is entered from an inferior or left towards an inferior.
  NOTIFY_NONLINEAR | The window is entered from or left towards a window which is neither an ancestor nor an inferior.
  NOTIFY_NONLINEAR_VIRTUAL | 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.
  NOTIFY_UNKNOWN | Unknown.

enum OwnerChange

Specifies why a selection ownership was changed.

Enumeration values:

  OWNER_CHANGE_NEW_OWNER | Some other application claimed the ownership.
  OWNER_CHANGE_DESTROY | The window was destroyed.
  OWNER_CHANGE_CLOSE | The client was closed.

enum PropertyState

Specifies the type of a property change for an EventProperty.

Enumeration values:

  PROPERTY_NEW_VALUE | The property value was changed.
  PROPERTY_DELETE | The property was deleted.

enum ScrollDirection

Specifies the direction for an EventScroll.

Enumeration values:

  SCROLL_UP | The window is scrolled up.
  SCROLL_LEFT | The window is scrolled to the left.
  SCROLL_RIGHT | The window is scrolled to the right.

enum SettingAction

Specifies the kind of modification applied to a setting in an EventSetting.

Enumeration values:

  SETTING_ACTION_NEW | A setting was added.
  SETTING_ACTION_CHANGED | A setting was changed.
  SETTING_ACTION_DELETED | A setting was deleted.

enum VisibilityState

Specifies the visiblity status of a window for an EventVisibility.

Enumeration values:

  VISIBILITY_UNOBSCURED | The window is completely visible.
  VISIBILITY_PARTIAL | The window is partially visible.
  VISIBILITY_FULLY_OBSCURED | The window is not visible at all.

enum WindowState

Specifies the state of a toplevel window.

Enumeration values:

  WINDOW_STATE_WITHDRAWN | The window is not shown.
  WINDOW_STATE_ICONIFIED | The window is minimized.
  WINDOW_STATE_MAXIMIZED | The window is maximized.
  WINDOW_STATE_STICKY | The window is sticky.
  WINDOW_STATE_FULLSCREEN | The window is fullscreen.
  WINDOW_STATE_ABOVE | The window is kept above other windows.
  WINDOW_STATE_BELOW | The window is kept below other windows.

## Function Documentation

bool events_pending | ( |  | ) |

Checks if any events are ready to be processed for any display.

Returns:
  true if any events are pending.

void set_show_events | ( | bool | show_events | ) |

Sets whether a trace of received events is output.

Parameters:

  | show_events | Set true to output event debugging information.

Note that GTK+ must be compiled with debugging (that is, configured using the --enable-debug option) to use this option.

Xfce Foundation Classes

Copyright © 2004-2005 The XFC Development Team | XFC 4.3