Google

Main Page   Class Hierarchy   Compound List   File List   Compound Members  

iNeXTAssistant Struct Reference

This is an interface for an object which provides assistance to NeXT-specific canvases and Objective-C bridging code for application run-loop support. More...

#include <NeXTAssistant.h>

Inheritance diagram for iNeXTAssistant:

iBase List of all members.

Public Methods

virtual void request_shutdown ()=0
 Ask to have both the AppKit and Crystal Space event-loops terminated.

virtual void advance_state ()=0
 Sent by some mechanism on a periodic basis to process the Crystal Space event queue and advance the state of the engine and all plugins.

virtual bool always_runs ()=0
 Query whether the application's event loop stops processing events when the application does not have focus.

virtual bool continue_running ()=0
 Query whether or not the application's event loop should continue running. More...

virtual void application_activated ()=0
 Notify Crystal Space that the AppKit application has come to the foreground. More...

virtual void application_deactivated ()=0
 Notify Crystal Space that the AppKit application has been sent to the background. More...

virtual void flush_graphics_context ()=0
 Flush the connection to the current graphics context (the Quartz or DPS server, for instance). More...

virtual void hide_mouse_pointer ()=0
 Hide the mouse pointer.

virtual void show_mouse_pointer ()=0
 Unhide the mouse pointer.

virtual void dispatch_event (NeXTEvent, NeXTView)=0
 Interpret an AppKit event and post the appropriate csEvent to the Crystal Space event queue. More...

virtual void key_down (int raw, int cooked)=0
 Post a key-down event to the Crystal Space event queue. More...

virtual void key_up (int raw, int cooked)=0
 Post a key-up event to the Crystal Space event queue. More...

virtual void mouse_down (int button, int x, int y)=0
 Post a mouse-down event to the Crystal Space event queue. More...

virtual void mouse_up (int button, int x, int y)=0
 Post a mouse-up event to the Crystal Space event queue. More...

virtual void mouse_moved (int x, int y)=0
 Post a mouse-moved event to the Crystal Space event queue. More...


Detailed Description

This is an interface for an object which provides assistance to NeXT-specific canvases and Objective-C bridging code for application run-loop support.

An instance of this object will be registered with the object registry with tag 'NeXTAssistant', however it is generally recommended that you query the object registry for this object by simply asking for the object implementing iNeXTAssistant.


Member Function Documentation

void iNeXTAssistant::application_activated ( ) [pure virtual]
 

Notify Crystal Space that the AppKit application has come to the foreground.

This causes a `cscmdFocusChanged' event to be posted to the Crystal Space event queue.

void iNeXTAssistant::application_deactivated ( ) [pure virtual]
 

Notify Crystal Space that the AppKit application has been sent to the background.

This causes a `cscmdFocusChanged' event to be posted to the Crystal Space event queue.

bool iNeXTAssistant::continue_running ( ) [pure virtual]
 

Query whether or not the application's event loop should continue running.

This will return `true' until some Crystal Space entity requests a shutdown, in which case the caller of this method should proceed to terminate the AppKit's run-loop.

void iNeXTAssistant::dispatch_event ( NeXTEvent,
NeXTView ) [pure virtual]
 

Interpret an AppKit event and post the appropriate csEvent to the Crystal Space event queue.

This is a convenience method for canvases. It performs all of the difficult work of interpreting an AppKit event and translating it into a csEvent. Canvases are free to do their own interpretation of events and instead use one of the methods below for directly placing a csEvent in the queue, but it is much more convenient to allow this method to do so. The first argument is a pointer to an NSEvent (Cocoa and OpenStep) or an NXEvent (NextStep), but is cast as an opaque NeXTEvent handle for representation in the C++ world. The second argument is a pointer to the view with which the event is associated, or NULL if not associated with any view. The view argument refers to an NSView (Cocoa and OpenStep) or a View (NextStep), but is cast as an opaque NeXTView handle for representation in the C++ world.

void iNeXTAssistant::flush_graphics_context ( ) [pure virtual]
 

Flush the connection to the current graphics context (the Quartz or DPS server, for instance).

This forces the graphics context to perform all pending drawing operations.

void iNeXTAssistant::key_down ( int raw,
int cooked ) [pure virtual]
 

Post a key-down event to the Crystal Space event queue.

The first number is the raw key code, and the second is the cooked character code.

void iNeXTAssistant::key_up ( int raw,
int cooked ) [pure virtual]
 

Post a key-up event to the Crystal Space event queue.

The first number is the raw key code, and the second is the cooked character code.

void iNeXTAssistant::mouse_down ( int button,
int x,
int y ) [pure virtual]
 

Post a mouse-down event to the Crystal Space event queue.

The mouse-button number is 1-based. The coordinates are specified in terms of the Crystal Space coordinate system where `x' increases from left to right, and `y' increases from top to bottom.

void iNeXTAssistant::mouse_moved ( int x,
int y ) [pure virtual]
 

Post a mouse-moved event to the Crystal Space event queue.

The coordinates are specified in terms of the Crystal Space coordinate system where `x' increases from left to right, and `y' increases from top to bottom.

void iNeXTAssistant::mouse_up ( int button,
int x,
int y ) [pure virtual]
 

Post a mouse-up event to the Crystal Space event queue.

The mouse-button number is 1-based. The coordinates are specified in terms of the Crystal Space coordinate system where `x' increases from left to right, and `y' increases from top to bottom.


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