Main Page Widgets Namespaces Book

# Gdk::Event Class Reference

List of all members.

## Public Methods

| Event ()
| Event (GdkEvent* castitem, bool make_a_copy=true)
| Event (const Event& src)
Event& | operator= (const Event& src)
| ~Event ()
GdkEvent* | gobj ()
const GdkEvent* | gobj () const
GdkEvent* | gobj_copy () const
void | put ()
guint32 | get_time () const
| Returns the time stamp from event, if there is one; otherwise returns Gdk::CURRENT_TIME.
bool | get_state (ModifierType& state) const
| If the event contains a "state" field, puts that field in state.
bool | get_coords (double& x_win, double& y_win) const
| Extract the event window relative x/y coordinates from an event.
bool | get_root_coords (double& x_root, double& y_root) const
| Extract the root window relative x/y coordinates from an event.
bool | get_axis (AxisUse axis_use, double& value) const
| Extract the axis value for a particular axis use from an event structure.

## Static Public Methods

Event | get ()
Event | peek ()
Event | get_graphics_expose (const Glib::RefPtr<Window>& window)
bool | events_pending ()
void | set_show_events (bool show_events)
bool | get_show_events ()

## Protected Attributes

GdkEvent* | gobject_

## Related Functions

(Note that these are not member functions.)
Gdk::Event | wrap (GdkEvent* object, bool take_copy=false)

## Constructor & Destructor Documentation

Gdk::Event::Event | ( |  | ) |

Gdk::Event::Event | ( | GdkEvent* | castitem,
|  | bool | make_a_copy = true
| ) | `[explicit]`

Gdk::Event::Event | ( | const Event& | src | ) |

Gdk::Event::~Event | ( |  | ) |

## Member Function Documentation

bool Gdk::Event::events_pending | ( |  | ) | `[static]`

Event Gdk::Event::get | ( |  | ) | `[static]`

bool Gdk::Event::get_axis | ( | AxisUse | axis_use,
|  | double& | value
| ) | const

Extract the axis value for a particular axis use from an event structure.

Parameters:

  axis_use | The axis use to look for.
  value | Location to store the value found.

Returns:
  `true` if the specified axis was found, otherwise `false`.

bool Gdk::Event::get_coords | ( | double& | x_win,
|  | double& | y_win
| ) | const

Extract the event window relative x/y coordinates from an event.

Parameters:

  x_win | Location to put event window x coordinate.
  y_win | Location to put event window y coordinate.

Returns:
  `true` if the event delivered event window coordinates.

Event Gdk::Event::get_graphics_expose | ( | const Glib::RefPtr<Window>& | window | ) | `[static]`

bool Gdk::Event::get_root_coords | ( | double& | x_root,
|  | double& | y_root
| ) | const

Extract the root window relative x/y coordinates from an event.

Parameters:

  x_root | Location to put root window x coordinate.
  y_root | Location to put root window y coordinate.

Returns:
  `true` if the event delivered root window coordinates.

bool Gdk::Event::get_show_events | ( |  | ) | `[static]`

bool Gdk::Event::get_state | ( | ModifierType& | state | ) | const

If the event contains a "state" field, puts that field in state.

Otherwise stores an empty state (0). Returns `true` if there was a state field in the event. event may be `0`, in which case it's treated as if the event had no state field.

Parameters:

  state | Return location for state.

Returns:
  `true` if there was a state field in the event.

guint32 Gdk::Event::get_time | ( |  | ) |

Returns the time stamp from event, if there is one; otherwise returns Gdk::CURRENT_TIME.

If event is `0`, returns Gdk::CURRENT_TIME.

Returns:
  Time stamp field from event.

const GdkEvent* Gdk::Event::gobj | ( |  | ) | const`[inline]`

GdkEvent* Gdk::Event::gobj | ( |  | ) | `[inline]`

GdkEvent* Gdk::Event::gobj_copy | ( |  | ) |

Event& Gdk::Event::operator= | ( | const Event& | src | ) |

Event Gdk::Event::peek | ( |  | ) | `[static]`

void Gdk::Event::put | ( |  | ) |

void Gdk::Event::set_show_events | ( | bool | show_events | ) | `[static]`

## Friends And Related Function Documentation

Gdk::Event wrap | ( | GdkEvent* | object,
|  | bool | take_copy = false
| ) | `[related]`

## Member Data Documentation

GdkEvent* Gdk::Event::gobject_`[protected]`

The documentation for this class was generated from the following file:

- event.h