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

# gdk/types.hh File Reference

A GdkPoint, GdkRectangle, GdkSegment and GdkSpan C++ wrapper interface. More...

`#include <gdk/gdk.h>`
`#include <xfc/gdk/inline/types.inl>`

## Namespaces

- namespace Xfc
- namespace Xfc::Gdk

## Classes

- class Xfc::Gdk::Mutex
    A C++ wrapper for the GDK Mutex object. More...
- class Xfc::Gdk::Point
    A GdkPoint C++ wrapper class. More...
- class Xfc::Gdk::Rectangle
    A GdkRectangle C++ wrapper class. More...
- class Xfc::Gdk::Segment
    A GdkSegment C++ wrapper class. More...
- class Xfc::Gdk::Span
    A GdkSpan C++ wrapper class. More...
- class Xfc::Gdk::Trapezoid
    A GdkTrapezoid C++ wrapper class. More...

## Keyboard/Pointer Methods

- void keyboard_ungrab (unsigned int time=GDK_CURRENT_TIME)
    Ungrabs the keyboard for the default display, if it is grabbed by this application (see Gdk::Display::keyboard_ungrab()).
- bool pointer_is_grabbed ()
    Returns true if the pointer for the default display is currently grabbed by this application (see Gdk::Display::pointer_is_grabbed()).
- void pointer_ungrab (unsigned int time=GDK_CURRENT_TIME)
    Ungrabs the pointer for the default display, if it is grabbed by this application.

## Thread Methods

- void flush ()
    Flushes the X output buffer and waits until all requests have been processed by the server.

## Typedefs

- typedef GdkAtom Atom
    Atom is a typedef for GdkAtom.
- typedef unsigned int DragActionField
    DragActionField holds one or more values from the Gdk::DragAction enumeration OR'd together.
- typedef unsigned int ModifierTypeField
    ModifierTypeField holds one or more values from the Gdk::ModifierType enumeration OR'd together.

## Enumerations

- enum AxisUse {
  AXIS_IGNORE = GDK_AXIS_IGNORE,
  AXIS_X = GDK_AXIS_X,
  AXIS_Y = GDK_AXIS_Y,
  AXIS_PRESSURE = GDK_AXIS_PRESSURE,
  AXIS_XTILT = GDK_AXIS_XTILT,
  AXIS_YTILT = GDK_AXIS_YTILT,
  AXIS_WHEEL = GDK_AXIS_WHEEL,
  AXIS_LAST = GDK_AXIS_LAST
  }
    An enumeration describing the way in which a device axis (valuator) maps onto the predefined valuator types that GTK+ understands. More...
- enum ByteOrder {
  LSB_FIRST = GDK_LSB_FIRST,
  MSB_FIRST = GDK_MSB_FIRST
  }
    A set of values describing the possible byte-orders for storing pixel values in memory. More...
- enum DragAction {
  ACTION_DEFAULT = GDK_ACTION_DEFAULT,
  ACTION_COPY = GDK_ACTION_COPY,
  ACTION_MOVE = GDK_ACTION_MOVE,
  ACTION_LINK = GDK_ACTION_LINK,
  ACTION_PRIVATE = GDK_ACTION_PRIVATE,
  ACTION_ASK = GDK_ACTION_ASK
  }
    Used in Gdk::DragContext to indicate what the destination should do with the dropped data. More...
- enum DragProtocol {
  DRAG_PROTO_MOTIF = GDK_DRAG_PROTO_MOTIF,
  DRAG_PROTO_XDND = GDK_DRAG_PROTO_XDND,
  DRAG_PROTO_ROOTWIN = GDK_DRAG_PROTO_ROOTWIN,
  DRAG_PROTO_ = GDK_DRAG_PROTO_NONE,
  DRAG_PROTO_NONE = GDK_DRAG_PROTO_WIN32_DROPFILES,
  DRAG_PROTO_OLE2 = GDK_DRAG_PROTO_OLE2,
  DRAG_PROTO_LOCAL = GDK_DRAG_PROTO_LOCAL
  }
    Used in Gdk::DragContext to indicate the protocol according to which DND is done. More...
- enum ExtensionMode {
  EXTENSION_EVENTS_NONE = GDK_EXTENSION_EVENTS_NONE,
  EXTENSION_EVENTS_ALL = GDK_EXTENSION_EVENTS_ALL,
  EXTENSION_EVENTS_CURSOR = GDK_EXTENSION_EVENTS_CURSOR
  }
    An enumeration used to specify which extension events are desired for a particular widget. More...
- enum FilterReturn {
  FILTER_CONTINUE = GDK_FILTER_CONTINUE,
  FILTER_TRANSLATE = GDK_FILTER_TRANSLATE,
  FILTER_REMOVE = GDK_FILTER_REMOVE
  }
    Specifies the result of applying a FilterSlot to a native event. More...
- enum GrabStatus {
  GRAB_SUCCESS = GDK_GRAB_SUCCESS,
  GRAB_ALREADY_GRABBED = GDK_GRAB_ALREADY_GRABBED,
  GRAB_INVALID_TIME = GDK_GRAB_INVALID_TIME,
  GRAB_NOT_VIEWABLE = GDK_GRAB_NOT_VIEWABLE,
  GRAB_FROZEN = GDK_GRAB_FROZEN
  }
    Returned by pointer_grab() and keyboard_grab() to indicate success or the reason for the failure of the grab attempt. More...
- enum Gravity {
  GRAVITY_NORTH_WEST = GDK_GRAVITY_NORTH_WEST,
  GRAVITY_NORTH = GDK_GRAVITY_NORTH,
  GRAVITY_NORTH_EAST = GDK_GRAVITY_NORTH_EAST,
  GRAVITY_WEST = GDK_GRAVITY_WEST,
  GRAVITY_CENTER = GDK_GRAVITY_CENTER,
  GRAVITY_EAST = GDK_GRAVITY_EAST,
  GRAVITY_SOUTH_WEST = GDK_GRAVITY_SOUTH_WEST,
  GRAVITY_SOUTH = GDK_GRAVITY_SOUTH,
  GRAVITY_SOUTH_EAST = GDK_GRAVITY_SOUTH_EAST,
  GRAVITY_STATIC = GDK_GRAVITY_STATIC
  }
    Defines the reference point of a window and the meaning of coordinates passed to Gtk::Window::move(). More...
- enum ModifierType {
  SHIFT_MASK = GDK_SHIFT_MASK,
  LOCK_MASK = GDK_LOCK_MASK,
  CONTROL_MASK = GDK_CONTROL_MASK,
  MOD1_MASK = GDK_MOD1_MASK,
  MOD2_MASK = GDK_MOD2_MASK,
  MOD3_MASK = GDK_MOD3_MASK,
  MOD4_MASK = GDK_MOD4_MASK,
  MOD5_MASK = GDK_MOD5_MASK,
  BUTTON1_MASK = GDK_BUTTON1_MASK,
  BUTTON2_MASK = GDK_BUTTON2_MASK,
  BUTTON3_MASK = GDK_BUTTON3_MASK,
  BUTTON4_MASK = GDK_BUTTON4_MASK,
  BUTTON5_MASK = GDK_BUTTON5_MASK,
  RELEASE_MASK = GDK_RELEASE_MASK,
  MODIFIER_MASK = GDK_MODIFIER_MASK
  }
    A set of bit-flags to indicate the state of modifier keys and mouse buttons in various event types. More...
- enum RgbDither {
  RGB_DITHER_NONE = GDK_RGB_DITHER_NONE,
  RGB_DITHER_NORMAL = GDK_RGB_DITHER_NORMAL,
  RGB_DITHER_MAX = GDK_RGB_DITHER_MAX
  }
    Selects whether or not GdkRGB applies dithering to the image on display. More...
- enum WindowEdge {
  WINDOW_EDGE_NORTH_WEST = GDK_WINDOW_EDGE_NORTH_WEST,
  WINDOW_EDGE_NORTH = GDK_WINDOW_EDGE_NORTH,
  WINDOW_EDGE_NORTH_EAST = GDK_WINDOW_EDGE_NORTH_EAST,
  WINDOW_EDGE_WEST = GDK_WINDOW_EDGE_WEST,
  WINDOW_EDGE_EAST = GDK_WINDOW_EDGE_EAST,
  WINDOW_EDGE_SOUTH_WEST = GDK_WINDOW_EDGE_SOUTH_WEST,
  WINDOW_EDGE_SOUTH = GDK_WINDOW_EDGE_SOUTH,
  WINDOW_EDGE_SOUTH_EAST = GDK_WINDOW_EDGE_SOUTH_EAST
  }
    Determines a window edge or corner. More...
- enum WindowTypeHint {
  WINDOW_TYPE_HINT_NORMAL = GDK_WINDOW_TYPE_HINT_NORMAL,
  WINDOW_TYPE_HINT_DIALOG = GDK_WINDOW_TYPE_HINT_DIALOG,
  WINDOW_TYPE_HINT_MENU = GDK_WINDOW_TYPE_HINT_MENU,
  WINDOW_TYPE_HINT_TOOLBAR = GDK_WINDOW_TYPE_HINT_TOOLBAR,
  WINDOW_TYPE_HINT_SPLASHSCREEN = GDK_WINDOW_TYPE_HINT_SPLASHSCREEN
  }
    These are hints for the window manager that indicate what type of function the window has. More...

## Detailed Description

A GdkPoint, GdkRectangle, GdkSegment and GdkSpan C++ wrapper interface.

Provides common enumerations and four utility classes - Point, Rectangle, Segment and Span.

## Enumeration Type Documentation

enum AxisUse

An enumeration describing the way in which a device axis (valuator) maps onto the predefined valuator types that GTK+ understands.

Enumeration values:

  AXIS_IGNORE | The axis is ignored.
  AXIS_X | The axis is used as the x axis.
  AXIS_Y | The axis is used as the y axis.
  AXIS_PRESSURE | The axis is used for pressure information.
  AXIS_XTILT | The axis is used for x tilt information.
  AXIS_YTILT | The axis is used for x tilt information.
  AXIS_WHEEL | The axis is used for wheel information.
  AXIS_LAST | A constant equal to the numerically highest axis value.

enum ByteOrder

A set of values describing the possible byte-orders for storing pixel values in memory.

Enumeration values:

  LSB_FIRST | The values are stored with the least-significant byte first; for instance, the 32-bit value 0xffeecc would be stored in memory as 0xcc, 0xee, 0xff, 0x00.
  MSB_FIRST | The values are stored with the most-significant byte first; for instance, the 32-bit value 0xffeecc would be stored in memory as 0x00, 0xcc, 0xee, 0xff.

enum DragAction

Used in Gdk::DragContext to indicate what the destination should do with the dropped data.

Enumeration values:

  ACTION_DEFAULT | The default action for the protocol being used.
  ACTION_COPY | Copy the data.
  ACTION_MOVE | Move the data, that is, first copy it, then delete it from the source using the DELETE target of the X selection protocol.
  ACTION_LINK | Add a link to the data; note that this is only useful if source and destination agree on what it means.
  ACTION_PRIVATE | Special action which tells the source that the destination will do something that the source doesn't understand.
  ACTION_ASK | Ask the user what to do with the data.

enum DragProtocol

Used in Gdk::DragContext to indicate the protocol according to which DND is done.

Enumeration values:

  DRAG_PROTO_MOTIF | The Motif DND protocol.
  DRAG_PROTO_XDND | The Xdnd protocol.
  DRAG_PROTO_ROOTWIN | Extension to Xdnd protocol for unclaimed root window drops.
  DRAG_PROTO_ | No protocol.
  DRAG_PROTO_NONE | The simple WM_DROPFILES protocol.
  DRAG_PROTO_OLE2 | The complex OLE2 DND protocol (not implemented).
  DRAG_PROTO_LOCAL | Intra-application DND.

enum ExtensionMode

An enumeration used to specify which extension events are desired for a particular widget.

Enumeration values:

  EXTENSION_EVENTS_NONE | No extension events are desired.
  EXTENSION_EVENTS_ALL | All extension events are desired.
  EXTENSION_EVENTS_CURSOR | Extension events are desired only if a cursor will be displayed for the device.

enum FilterReturn

Specifies the result of applying a FilterSlot to a native event.

Enumeration values:

  FILTER_CONTINUE | Event not handled, continue processesing.
  FILTER_TRANSLATE | Translated the event stored.
  FILTER_REMOVE | Terminate processing, removing event.

enum GrabStatus

Returned by pointer_grab() and keyboard_grab() to indicate success or the reason for the failure of the grab attempt.

Enumeration values:

  GRAB_SUCCESS | The resource was successfully grabbed.
  GRAB_ALREADY_GRABBED | The resource is actively grabbed by another client.
  GRAB_INVALID_TIME | The resource was grabbed more recently than the specified time.
  GRAB_NOT_VIEWABLE | The grab window or the confine_to window are not viewable.
  GRAB_FROZEN | The resource is frozen by an active grab of another client.

enum Gravity

Defines the reference point of a window and the meaning of coordinates passed to Gtk::Window::move().

Enumeration values:

  GRAVITY_NORTH_WEST | The reference point is at the top left corner.
  GRAVITY_NORTH | The reference point is in the middle of the top edge.
  GRAVITY_NORTH_EAST | The reference point is at the top right corner.
  GRAVITY_WEST | The reference point is at the middle of the left edge.
  GRAVITY_CENTER | The reference point is at the center of the window.
  GRAVITY_EAST | The reference point is at the middle of the right edge.
  GRAVITY_SOUTH_WEST | The reference point is at the lower left corner.
  GRAVITY_SOUTH | The reference point is at the middle of the lower edge.
  GRAVITY_SOUTH_EAST | The reference point is at the lower right corner.
  GRAVITY_STATIC | The reference point is at the top left corner of the window itself, ignoring window manager decorations.

enum ModifierType

A set of bit-flags to indicate the state of modifier keys and mouse buttons in various event types.

Typical modifier keys are Shift, Control, Meta, Super, Hyper, Alt, Compose, Apple, CapsLock or ShiftLock.

Like the X Window System, GDK supports 8 modifier keys and 5 mouse buttons.

Enumeration values:

  SHIFT_MASK | The Shift key.
  LOCK_MASK | A Lock key (depending on the modifier mapping of the X server this may either be CapsLock or ShiftLock).
  CONTROL_MASK | The Control key.
  MOD1_MASK | The fourth modifier key (it depends on the modifier mapping of the X server which key is interpreted as this modifier, but normally it is the Alt key).
  MOD2_MASK | The fifth modifier key (it depends on the modifier mapping of the X server which key is interpreted as this modifier).
  MOD3_MASK | The sixth modifier key (it depends on the modifier mapping of the X server which key is interpreted as this modifier).
  MOD4_MASK | The seventh modifier key (it depends on the modifier mapping of the X server which key is interpreted as this modifier).
  MOD5_MASK | The eighth modifier key (it depends on the modifier mapping of the X server which key is interpreted as this modifier).
  BUTTON1_MASK | The first mouse button.
  BUTTON2_MASK | The second mouse button.
  BUTTON3_MASK | The third mouse button.
  BUTTON4_MASK | The fourth mouse button.
  BUTTON5_MASK | The fifth mouse button.
  RELEASE_MASK | Not used in GDK itself; GTK+ uses it to differentiate between (keyval, modifiers) pairs from key press and release events.
  MODIFIER_MASK | Unknown.

enum RgbDither

Selects whether or not GdkRGB applies dithering to the image on display.

Since GdkRGB currently only handles images with 8 bits per component, dithering on 24 bit per pixel displays is a moot point.

Enumeration values:

  RGB_DITHER_NONE | Never use dithering.
  RGB_DITHER_NORMAL | Use dithering in 8 bits per pixel (and below) only.
  RGB_DITHER_MAX | Use dithering in 16 bits per pixel and below.

enum WindowEdge

Determines a window edge or corner.

Enumeration values:

  WINDOW_EDGE_NORTH_WEST | The top left corner.
  WINDOW_EDGE_NORTH | The top edge.
  WINDOW_EDGE_NORTH_EAST | The top right corner.
  WINDOW_EDGE_WEST | The left edge.
  WINDOW_EDGE_EAST | The right edge.
  WINDOW_EDGE_SOUTH_WEST | The lower left corner.
  WINDOW_EDGE_SOUTH | The lower edge.
  WINDOW_EDGE_SOUTH_EAST | The lower right corner.

enum WindowTypeHint

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.

Enumeration values:

  WINDOW_TYPE_HINT_NORMAL | Normal toplevel window.
  WINDOW_TYPE_HINT_DIALOG | Dialog window.
  WINDOW_TYPE_HINT_MENU | Window used to implement a menu.
  WINDOW_TYPE_HINT_TOOLBAR | Window used to implement toolbars.
  WINDOW_TYPE_HINT_SPLASHSCREEN | Window used to implement a splashscreen.

## Function Documentation

void flush | ( |  | ) |

| Flushes the X output buffer and waits until all requests have been processed by the server. This is rarely needed by single-threaded applications. It's main use in XFC is for multi-threaded programming. Before unlocking a critical section of code with a call to Gdk::Mutex::unlock() you might want to call flush() to send all pending commands to the windowing system.

void keyboard_ungrab | ( | unsigned int | time = `GDK_CURRENT_TIME` | ) |

Ungrabs the keyboard for the default display, if it is grabbed by this application (see Gdk::Display::keyboard_ungrab()).

Parameters:

  | time | A timestamp from a Gdk::Event, or GDK_CURRENT_TIME if no timestamp is available.

bool pointer_is_grabbed | ( |  | ) |

Returns true if the pointer for the default display is currently grabbed by this application (see Gdk::Display::pointer_is_grabbed()).

Returns:
  true if the pointer is currently grabbed by this application.

Note that this does not take the implicit pointer grab on button presses into account.

void pointer_ungrab | ( | unsigned int | time = `GDK_CURRENT_TIME` | ) |

Ungrabs the pointer for the default display, if it is grabbed by this application.

(see Gdk::Display::pointer_ungrab()).

Parameters:

  | time | A timestamp from a Gdk::Event, or GDK_CURRENT_TIME if no timestamp is available.

Xfce Foundation Classes

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