Google

Main Page   Class Hierarchy   Compound List   File List   Compound Members  

csEventOutlet Class Reference

A class which implements the iEventOutlet interface. More...

#include <evoutlet.h>

Inheritance diagram for csEventOutlet:

iEventOutlet iBase List of all members.

Public Methods

 csEventOutlet (iEventPlug *, csEventQueue *, iObjectRegistry *)
virtual ~csEventOutlet ()
virtual iEventCreateEvent ()
 Create a event object on behalf of the event queue.<. More...

virtual void Post (iEvent *)
 Put a previously created event into system event queue.<. More...

virtual void Key (int iKey, int iChar, bool iDown)
 Put a keyboard event into event queue.<. More...

virtual void Mouse (int iButton, bool iDown, int x, int y)
 Put a mouse event into event queue.<. More...

virtual void Joystick (int iNumber, int iButton, bool iDown, int x, int y)
 Put a joystick event into event queue.<. More...

virtual void Broadcast (int iCode, void *iInfo)
 Put a broadcast event into event queue.<. More...

virtual void ImmediateBroadcast (int iCode, void *iInfo)
 This is a special routine which is called for example when the application is going to be suspended (suspended means "frozen", that is, application is forced to not run for some time). More...


Public Attributes

 SCF_DECLARE_IBASE

Detailed Description

A class which implements the iEventOutlet interface.


Member Function Documentation

virtual void csEventOutlet::Broadcast ( int iCode,
void * iInfo ) [virtual]
 

Put a broadcast event into event queue.<.

p> This is a generalized way to put any broadcast event into the system event queue. Command code may be used to tell user application that application's focused state has changed (cscmdFocusChanged), that a graphics context has been resized (cscmdContextResize), that it has been closed (cscmdContextClose), to finish the application immediately (cscmdQuit) and so on.

Reimplemented from iEventOutlet.

virtual iEvent* csEventOutlet::CreateEvent ( ) [virtual]
 

Create a event object on behalf of the event queue.<.

p> A general function for generating virtually any type of event. Since all events for a particular event queue should be created from the same heap, you should generate first a event object (through CreateEvent method) then you fill it whatever you like and finally you insert it into the event queue with the Post() method.

Reimplemented from iEventOutlet.

virtual void csEventOutlet::ImmediateBroadcast ( int iCode,
void * iInfo ) [virtual]
 

This is a special routine which is called for example when the application is going to be suspended (suspended means "frozen", that is, application is forced to not run for some time).

This happens for example when user switches away from a full-screen application on any OS with MGL canvas driver, or when it presses <Pause> with the OS/2 DIVE driver, or in any other drivers that supports forced pausing of applications.

This generates a `normal' broadcast event with given command code; the crucial difference is that the event is being delivered to all clients *immediately*. The reason is that the application is frozen right after returning from this routine thus it will get the next chance to process any events only after it will be resumed (which is kind of too late to process this kind of events).

Reimplemented from iEventOutlet.

virtual void csEventOutlet::Joystick ( int iNumber,
int iButton,
bool iDown,
int x,
int y ) [virtual]
 

Put a joystick event into event queue.<.

p> iNumber is joystick number (from 0 to CS_MAX_JOYSTICK_COUNT-1).

If iButton == 0, this is a joystick move event and iDown is ignored. Otherwise an joystick up/down event is generated. iButton can be from 1 to CS_MAX_JOYSTICK_BUTTONS (or 0 for a joystick move event).

Reimplemented from iEventOutlet.

virtual void csEventOutlet::Key ( int iKey,
int iChar,
bool iDown ) [virtual]
 

Put a keyboard event into event queue.<.

p> Note that iKey is the key code, either the alphanumeric symbol that is emmited by the given key when no shift keys/modes are active (e.g. 'a', 'b', '.', '/' and so on) or one of CSKEY_XXX values (with value above 255) and the iChar parameter is the translated key, after applying all modeshift keys. Never assume that any of these two codes is always less 127, not being 255 or 224 -- these are common mistakes for English-speaking programmers.

if you pass -1 as character code, the iChar argument is computed using an simple internal translation table that takes care of Control/Shift/Alt for English characters. But in general it is hardly advised your driver to make the conversion using OS-specific National Language Support subsystem so that national characters are properly supported.

Reimplemented from iEventOutlet.

virtual void csEventOutlet::Mouse ( int iButton,
bool iDown,
int x,
int y ) [virtual]
 

Put a mouse event into event queue.<.

p> If iButton == 0, this is a mouse motion event, and iDown argument is ignored. Otherwise an mousedown or mouseup event is generated at respective location. iButton can be in the range from 1 to CS_MAX_MOUSE_BUTTONS (or 0 for mouse move event).

Reimplemented from iEventOutlet.

virtual void csEventOutlet::Post ( iEvent * ) [virtual]
 

Put a previously created event into system event queue.<.

p> NOTE: YOU SHOULD PASS HERE ONLY OBJECTS THAT WERE CREATED VIA CreateEvent() FUNCTION! IF YOU PASS ARBITRARY EVENTS CREATED BY YOUR PROGRAM/PLUGIN IN SOME ENVIRONMENTS IT WILL CRASH!

Reimplemented from iEventOutlet.


The documentation for this class was generated from the following file:
Generated for Crystal Space by doxygen 1.2.5 written by Dimitri van Heesch, ©1997-2000