CrystalSpace

Public API Reference

iOSXAssistant Struct Reference

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

#include <csutil/macosx/OSXAssistant.h>

Inheritance diagram for iOSXAssistant:

Inheritance graph
[legend]
List of all members.

Public Member Functions

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 void application_activated ()=0
 Notify Crystal Space that the AppKit application has come to the foreground.
virtual void application_deactivated ()=0
 Notify Crystal Space that the AppKit application has been sent to the background.
virtual void application_hidden ()=0
 Notify Crystal Space that the AppKit application has been hidden.
virtual void application_unhidden ()=0
 Notify Crystal Space that the AppKit application has been unhidden.
virtual bool continue_running ()=0
 Query whether or not the application's event loop should continue running.
virtual void dispatch_event (OSXEvent, OSXView)=0
 Interpret an AppKit event and post the appropriate csEvent to the Crystal Space event queue.
virtual void flush_graphics_context ()=0
 Flush the connection to the current graphics context (the Quartz or DPS server, for instance).
virtual void hide_mouse_pointer ()=0
 Hide the mouse pointer.
virtual void key_down (unsigned int raw, unsigned int cooked)=0
 Post a key-down event to the Crystal Space event queue.
virtual void key_up (unsigned int raw, unsigned int cooked)=0
 Post a key-up event to the Crystal Space event queue.
virtual void mouse_down (int button, int x, int y)=0
 Post a mouse-down event to the Crystal Space event queue.
virtual void mouse_moved (int x, int y)=0
 Post a mouse-moved event to the Crystal Space event queue.
virtual void mouse_up (int button, int x, int y)=0
 Post a mouse-up event to the Crystal Space event queue.
virtual void request_shutdown ()=0
 Ask to have both the AppKit and Crystal Space event-loops terminated.
virtual void show_mouse_pointer ()=0
 Unhide the mouse pointer.

Detailed Description

This is an interface for an object which provides assistance to MacOS/X-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 'OSXAssistant', however it is generally recommended that you query the object registry for this object by simply asking for the object implementing iOSXAssistant.

Remarks:
As the name suggests, this interface provides functionality specific to the MacOS/X platform. To ensure that code using this functionality compiles properly on all other platforms, the use of the interface and inclusion of the header file should be surrounded by appropriate '#if defined(CS_PLATFORM_MACOSX) ... #endif' statements.

Definition at line 48 of file OSXAssistant.h.


Member Function Documentation

virtual void iOSXAssistant::advance_state (  )  [pure virtual]

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 iOSXAssistant::always_runs (  )  [pure virtual]

Query whether the application's event loop stops processing events when the application does not have focus.

virtual void iOSXAssistant::application_activated (  )  [pure virtual]

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

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

virtual void iOSXAssistant::application_deactivated (  )  [pure virtual]

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

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

virtual void iOSXAssistant::application_hidden (  )  [pure virtual]

Notify Crystal Space that the AppKit application has been hidden.

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

virtual void iOSXAssistant::application_unhidden (  )  [pure virtual]

Notify Crystal Space that the AppKit application has been unhidden.

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

virtual bool iOSXAssistant::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.

virtual void iOSXAssistant::dispatch_event ( OSXEvent  ,
OSXView   
) [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, but is cast as an opaque OSXEvent handle for representation in the C++ world. The second argument is a pointer to the view with which the event is associated, or 0 if not associated with any view. The view argument refers to an NSView, but is cast as an opaque OSXView handle for representation in the C++ world.

virtual void iOSXAssistant::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.

virtual void iOSXAssistant::hide_mouse_pointer (  )  [pure virtual]

Hide the mouse pointer.

virtual void iOSXAssistant::key_down ( unsigned int  raw,
unsigned 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.

virtual void iOSXAssistant::key_up ( unsigned int  raw,
unsigned 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.

virtual void iOSXAssistant::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.

virtual void iOSXAssistant::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.

virtual void iOSXAssistant::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.

virtual void iOSXAssistant::request_shutdown (  )  [pure virtual]

Ask to have both the AppKit and Crystal Space event-loops terminated.

virtual void iOSXAssistant::show_mouse_pointer (  )  [pure virtual]

Unhide the mouse pointer.


The documentation for this struct was generated from the following file:
Generated for Crystal Space by doxygen 1.4.7