Xfce Foundation Classes
Main Page  | IndexNamespace List  |  Alphabetical List  |  Class List  |  File List

Xfc::Gdk::Event Class Reference

The Event object represents a GdkEvent. More...

#include <xfc/gdk/events.hh>

Inheritance diagram for Xfc::Gdk::Event:

Xfc::G::Boxed Xfc::Object Xfc::Trackable Xfc::Gdk::EventAny Xfc::Gdk::EventButton Xfc::Gdk::EventClient Xfc::Gdk::EventConfigure Xfc::Gdk::EventCrossing Xfc::Gdk::EventDND Xfc::Gdk::EventExpose Xfc::Gdk::EventFocus Xfc::Gdk::EventKey Xfc::Gdk::EventMotion Xfc::Gdk::EventOwnerChange Xfc::Gdk::EventProperty Xfc::Gdk::EventProximity Xfc::Gdk::EventScroll Xfc::Gdk::EventSelection Xfc::Gdk::EventSetting Xfc::Gdk::EventVisibility Xfc::Gdk::EventWindowState List of all members.


Public Member Functions


Static Public Member Functions


Detailed Description

The Event object represents a GdkEvent.

Event is the base class from which all event objects are derived. Event doesn't have a virtual destructor because it's not meant to be used to derive suclasses, other than the ones derived by XFC.

Constructor & Destructor Documentation

Xfc::Gdk::Event::Event ( EventType  type  )  [explicit]

Construct a new event of the specified type.

type The EventType.

Xfc::Gdk::Event::Event ( GdkEvent *  event  )  [explicit]

Construct a new event from an existing GdkEvent.

event A pointer to a GdkEvent.
The event can be a newly created GdkEvent or an existing GdkEvent. The Event object created is a temporary object. It doesn't take over the ownership of GdkEvent and GdkEvent is not freed by the destructor.

Xfc::Gdk::Event::Event ( GdkEvent *  event,
bool  copy 

Construct a new event from an existing GdkEvent.

event A pointer to a GdkEvent.
copy Whether the Color object should make a copy of GdkEvent or not.
The event can be a newly created GdkEvent or an existing GdkEvent. If copy is true Event will make a copy of GdkEvent. If copy is false Event wont make a copy but instead takes over the ownership of GdkEvent. Either way, the destructor will free GdkEvent when the Event object is destroyed. This constructor is used by G::Boxed::wrap() to wrap GdkEvent objects in a C++ wrapper.

Xfc::Gdk::Event::Event ( const Event src  ) 

Copy constructor.

src The source event.

Member Function Documentation

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

Assignment operator.

src The source event.

unsigned int Xfc::Gdk::Event::get_time (  )  const

Returns the time stamp of the event, if there is one; otherwise returns GDK_CURRENT_TIME.

The time stamp field from the event.
If event is null, returns GDK_CURRENT_TIME.

bool Xfc::Gdk::Event::get_state ( ModifierTypeField state  )  const

If the event contains a "state" field, puts that field in state; otherwise stores an empty state (0).

state The return location for the state.
true if there was a state field in the event.
The event may be null, in which case it's treated as if the event had no state field.

bool Xfc::Gdk::Event::get_axis ( AxisUse  axis_use,
double *  value 
) const

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

axis_use The axis use to look for.
value The location to store the value found.
true if the specified axis was found, otherwise false.

bool Xfc::Gdk::Event::get_coords ( double *  x_win,
double *  y_win 
) const

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

x_win The location to put event window x coordinate.
y_win The location to put event window y coordinate.
true if the event delivered event window coordinates.

bool Xfc::Gdk::Event::get_root_coords ( double *  x_root,
double *  y_root 
) const

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

x_root The location to put root window x coordinate.
y_root The location to put root window y coordinate.
true if the event delivered root window coordinates.

Screen* Xfc::Gdk::Event::get_screen (  )  const

Returns the screen for the event.

The Screen for the event.
The screen is typically the screen for any()->window(), but for events such as mouse events, it is the screen where the the pointer was when the event occurs. That is, the screen which has the root window to which motion()->x_root and motion()->y_root are relative.

static Pointer<Event> Xfc::Gdk::Event::get (  )  [static]

Checks all open displays for an event to process, fetching events from the windowing system if necessary (see Gdk::Display::get_event()).

A smart pointer to the next event to be processed, or null if no events are pending.

static Pointer<EventExpose> Xfc::Gdk::Event::get_graphics_expose ( const Window window  )  [static]

Waits for a GraphicsExpose or NoExpose event from the X server.

An EventExpose if a GraphicsExpose event was received, or null if a NoExpose event was received.
This is used in the GtkText widget in GTK+ to make sure any GraphicsExpose events are handled before the widget is scrolled.

static Pointer<Event> Xfc::Gdk::Event::peek (  )  [static]

If there is an event waiting in the event queue of some open display, returns a wrapped copy of it (see Gdk::Display::peek_event()).

A smart pointer to a newly allocated Event, or null if no events are in any queues.

bool Xfc::Gdk::Event::send_client_message ( GdkNativeWindow  winid,
const Display display = 0 

Sends an X ClientMessage event to a given window.

display The Display for the window where the message is to be sent, or null for the default display.
winid The window to send the X ClientMessage event to.
true on success, false on failure or if the event is not an EventClient.
This could be used for communicating between different applications, though the amount of data is limited to 20 bytes. If display is null the given window must be on the default Display.

void Xfc::Gdk::Event::send_clientmessage_toall (  ) 

Sends an X ClientMessage event to all toplevel windows on the default Screen.

Toplevel windows are determined by checking for the WM_STATE property, as described in the Inter-Client Communication Conventions Manual (ICCCM). If no windows are found with the WM_STATE property set, the message is sent to all children of the root window.

Note: This method does nothing if the event is not an EventClient.

void Xfc::Gdk::Event::set_screen ( Screen screen  ) 

Sets the screen for event to screen.

The event must have been allocated by GTK+.

screen A Screen.

The documentation for this class was generated from the following file: Xfce Foundation Classes
Copyright © 2004-2005 The XFC Development Team XFC 4.3