GFC Logo GFC Title Logo
Reference Manual
Main Page  |  Namespace List  |  Alphabetical List  |  Class List  |  File List

GFC::Gdk::Event Class Reference

The Event object represents a GdkEvent. More...

#include <gfc/gdk/events.hh>

Inheritance diagram for GFC::Gdk::Event:

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

Public Member Functions

Constructors
Accessors
Methods

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 GFC.


Constructor & Destructor Documentation

GFC::Gdk::Event::Event EventType  type  )  [explicit]
 

Construct a new event of the specified type.

Parameters:
type The EventType.

GFC::Gdk::Event::Event GdkEvent *  event  )  [explicit]
 

Construct a new event from an existing GdkEvent.

Parameters:
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.

GFC::Gdk::Event::Event GdkEvent *  event,
bool  copy
 

Construct a new event from an existing GdkEvent.

Parameters:
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.

GFC::Gdk::Event::Event const Event src  ) 
 

Copy constructor.

Parameters:
src The source event.


Member Function Documentation

Pointer<Event> GFC::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()).

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

bool GFC::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 The location to store the value found.
Returns:
true if the specified axis was found, otherwise false.

bool GFC::Gdk::Event::get_coords double *  x_win,
double *  y_win
const
 

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

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

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

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

Returns:
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.

bool GFC::Gdk::Event::get_root_coords double *  x_root,
double *  y_root
const
 

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

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

Screen* GFC::Gdk::Event::get_screen  )  const
 

Returns the screen for the event.

Returns:
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.

bool GFC::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).

Parameters:
state The return location for the state.
Returns:
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.

unsigned int GFC::Gdk::Event::get_time  )  const
 

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

Returns:
The time stamp field from the event.

If event is null, returns GDK_CURRENT_TIME.

Event& GFC::Gdk::Event::operator= const Event src  ) 
 

Assignment operator.

Parameters:
src The source event.

Pointer<Event> GFC::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()).

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

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

Sends an X ClientMessage event to a given window.

Parameters:
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.
Returns:
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 GFC::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 GFC::Gdk::Event::set_screen Screen screen  ) 
 

Sets the screen for event to screen.

The event must have been allocated by GTK+.

Parameters:
screen A Screen.


The documentation for this class was generated from the following file:
Generated on Tue Aug 24 00:34:35 2004 for GFC-UI by doxygen 1.3.8