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)
 Handle a message targeted at this handler. More...

virtual void __reserved1__ ()
virtual void __reserved2__ ()
virtual void __reserved3__ ()
virtual void __reserved4__ ()
virtual void __reserved5__ ()
virtual void __reserved6__ ()
virtual void __reserved7__ ()
virtual void __reserved8__ ()
virtual void __reserved9__ ()
virtual void __reserved10__ ()
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

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:
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]
 

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:
Kurt Skauen (kurt.skauen@c2i.net)

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

uint32 Application::GetQualifiers
 

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:
Kurt Skauen (kurt.skauen@c2i.net)

int Application::GetScreenModeCount
 

int Application::GetScreenModeInfo int nIndex,
screen_mode * psMode
 

void Application::HandleMessage Message * pcMessage [virtual]
 

Description:
Overload this member to dispatch messages sendt to this handler. When a looper receives a message for one of it's handlers it will call the taget handlers HandleMessage() to allow the handler to dispatch the message.

The message passed in pcMessage is also available through os::Looper::GetCurrentMessage() and os::Looper::DetachCurrentMessage() until this member returns. This is normally not very usefull for HandleMessage() itself but it can be convinient for other members called from HandleMessage() in case they need data from the message that was not passed on from HandleMessage().

The looper will be locked when this member is called. The default implementation of this member will pass the message on to the next handler if one was set with SetNextHandler().

Note:
Never do any lenthy operations in any hook members that are called from the looper thread if the looper is involved with the GUI (for example if the looper is a os::Window). The looper will not be able to dispatch messages until the hook returns so spending a long time in this members will make the GUI feel unresponsive.
Parameters:
pcMessage   The message that should be handled. This message will be deleted by the looper when HandleMessage() returns unless you detach it with os::Looper::DetachCurrentMessage(),
See also:
os::Looper::DispatchMessage(), os::Looper::DetachCurrentMessage()
Author:
Kurt Skauen (kurt@atheos.cx)

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]
 

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

void Application::__reserved10__ [virtual]
 

void Application::__reserved1__ [virtual]
 

void Application::__reserved2__ [virtual]
 

void Application::__reserved3__ [virtual]
 

void Application::__reserved4__ [virtual]
 

void Application::__reserved5__ [virtual]
 

void Application::__reserved6__ [virtual]
 

void Application::__reserved7__ [virtual]
 

void Application::__reserved8__ [virtual]
 

void Application::__reserved9__ [virtual]
 


Friends And Related Function Documentation

friend class AppserverConfig [friend]
 

friend class Bitmap [friend]
 

friend class Desktop [friend]
 

friend class Font [friend]
 

friend class Sprite [friend]
 

friend class View [friend]
 

friend class Window [friend]
 

Reimplemented from os::Looper.


Generated at Tue Sep 11 15:27:45 2001 for AtheOS higlevel API by doxygen1.2.9.1 written by Dimitri van Heesch, © 1997-2001