Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

os::Application Class Reference

Singleton class representing an application. More...

#include <application.h>

Inheritance diagram for os::Application:

os::Looper os::Handler List of all members.

Public Methods

 Application (const char *pzMimeType)
virtual ~Application ()
uint32 GetQualifiers ()
 Returnes the current state of keyboards qualifiers. More...

virtual void HandleMessage (Message *pcMessage)
void PushCursor (mouse_ptr_mode eMode, void *pImage, int nWidth, int nHeight, const IPoint &cHotSpot=IPoint(0, 0))
void PopCursor ()
bigtime_t GetIdleTime ()
void GetKeyboardConfig (std::string *pcKeymapName, int *pnKeyDelay, int *pnKeyRepeat)
status_t SetKeymap (const char *pzName)
status_t SetKeyboardTimings (int nDelay, int nRepeat)
int GetScreenModeCount ()
int GetScreenModeInfo (int nIndex, screen_mode *psMode)
void SetWindowDecorator (const char *pzPath)
void CommitColorConfig ()
thread_id Run ()
 Entry point for the message loop. More...


Static Public Methods

Application* GetInstance ()
 Get the (one and only) instance of the Application class. More...


Friends

class  Window
class  Desktop
class  Bitmap
class  Sprite
class  View
class  Font
class  AppserverConfig

Detailed Description

Singleton class representing an application.

Description:
Before you can use any of the classes in the AtheOS API you must instantiate an application object. The application object establish the connection with the appserver, and are responcible for all application level comunication after the connection is established.

os::Application inherit from Looper, but it does behave different from other loopers in the way that it does not spawn a new thread when the Run() member is called. Insetead it steel the thread calling the run member (normally the main thread) and let it run the message loop.

See also:
os::Window, os::View, os::Looper
Author(s):
Kurt Skauen (kurt@atheos.cx)


Constructor & Destructor Documentation

Application::Application ( const char * pzName )
 

Application::~Application ( ) [virtual]
 


Member Function Documentation

void Application::CommitColorConfig ( )
 

bigtime_t Application::GetIdleTime ( )
 

Application * Application::GetInstance ( ) [static]
 

Get the (one and only) instance of the Application class.

When the Application class is instantiated it will assign a pointer to the instance to a static member that can be obtained through this function. Many other classes expect this function to return a valid pointer, so it is importen that you instantiate the Application class once (and only once) before calling any other functions in the native AtheOS API.

Returns:
Pointer to the global instance of the Application drived class.
See also:
Author(s):
Kurt Skauen (kurt.skauen@c2i.net)

void Application::GetKeyboardConfig ( std::string * pcKeymapName,
int * pnKeyDelay,
int * pnKeyRepeat )
 

uint32 Application::GetQualifiers ( )
 

Returnes the current state of keyboards qualifiers.

Sends a requester to the appserver to obtain the current state of keyboard qualifiers.

Returns:
A bit mask composed from os::qualifiers decribing which qualifiers currently pressed
See also:
Author(s):
Kurt Skauen (kurt.skauen@c2i.net)

int Application::GetScreenModeCount ( )
 

int Application::GetScreenModeInfo ( int nIndex,
screen_mode * psMode )
 

void Application::HandleMessage ( Message * pcMessage ) [virtual]
 

Reimplemented from os::Handler.

void Application::PopCursor ( )
 

void Application::PushCursor ( mouse_ptr_mode eMode,
void * pImage,
int nWidth,
int nHeight,
const IPoint & cHotSpot = IPoint(0,0) )
 

thread_id Application::Run ( ) [virtual]
 

Entry point for the message loop.

The Application class is different from other loopers in that it does not spawn a new thread when the Run() member is called. Instead the Run() member directly enter the message loop, and does not return until the message loop quits.

Returns:
The thread id of the thread calling it.
See also:
Author(s):
Kurt Skauen (kurt.skauen@c2i.net)

Reimplemented from os::Looper.

status_t Application::SetKeyboardTimings ( int nDelay,
int nRepeat )
 

status_t Application::SetKeymap ( const char * pzName )
 

void Application::SetWindowDecorator ( const char * pzPath )
 


Friends And Related Function Documentation

class AppserverConfig [friend]
 

class Bitmap [friend]
 

class Desktop [friend]
 

class Font [friend]
 

class Sprite [friend]
 

class View [friend]
 

class Window [friend]
 


The documentation for this class was generated from the following files:
Generated at Sat Apr 7 16:11:33 2001 for AtheOS higlevel API by doxygen1.2.5 written by Dimitri van Heesch, © 1997-2001