soui 5.0.0.1
Soui5 Doc
 
Loading...
Searching...
No Matches
IMessageLoop Interface Reference

Interface for message loops. More...

#include <SMsgLoop-i.h>

Inheritance diagram for IMessageLoop:
IObjRef TObjRefImpl< IMessageLoop > SMessageLoop

Public Member Functions

long AddRef () PURE
 Adds a reference to the object.
 
long Release () PURE
 Releases a reference to the object.
 
void OnFinalRelease () PURE
 Finalizes the release of the object.
 
BOOL AddMessageFilter (IMsgFilter *pMessageFilter) PURE
 Adds a message filter.
 
BOOL RemoveMessageFilter (IMsgFilter *pMessageFilter) PURE
 Removes a message filter.
 
BOOL AddIdleHandler (IIdleHandler *pIdleHandler) PURE
 Adds an idle handler.
 
BOOL RemoveIdleHandler (IIdleHandler *pIdleHandler) PURE
 Removes an idle handler.
 
BOOL PreTranslateMessage (MSG *pMsg) PURE
 Preprocesses a message.
 
BOOL OnIdle (int nIdleCount) PURE
 Handles idle time.
 
int Run () PURE
 Runs the message loop.
 
BOOL IsRunning () SCONST PURE
 Checks if the message loop is running.
 
void OnMsg (LPMSG pMsg) PURE
 Processes a message.
 
void Quit (int exitCode=0) PURE
 Quits the message loop.
 
BOOL PostTask (IRunnable *runable) PURE
 Posts a task to the message loop.
 
int RemoveTasksForObject (void *pObj) PURE
 Removes tasks associated with an object.
 
void ExecutePendingTask () PURE
 Executes pending tasks.
 
BOOL PeekMsg (LPMSG pMsg, UINT wMsgFilterMin, UINT wMsgFilterMax, BOOL bRemove) PURE
 Peeks at messages in the message queue.
 
BOOL WaitMsg () PURE
 Waits for a message.
 
int HandleMsg () PURE
 Handles a message.
 
- Public Member Functions inherited from IObjRef
long AddRef () PURE
 Increases the reference count.
 
long Release () PURE
 Decreases the reference count.
 
void OnFinalRelease () PURE
 Called when the reference count reaches zero and the object is about to be released.
 

Detailed Description

Interface for message loops.

Definition at line 41 of file SMsgLoop-i.h.

Member Function Documentation

◆ AddIdleHandler()

BOOL IMessageLoop::AddIdleHandler ( IIdleHandler * pIdleHandler)

Adds an idle handler.

Parameters
pIdleHandlerPointer to the idle handler.
Returns
TRUE if successful, FALSE otherwise.

Implemented in SMessageLoop.

◆ AddMessageFilter()

BOOL IMessageLoop::AddMessageFilter ( IMsgFilter * pMessageFilter)

Adds a message filter.

Parameters
pMessageFilterPointer to the message filter.
Returns
TRUE if successful, FALSE otherwise.

Implemented in SMessageLoop.

◆ AddRef()

long IMessageLoop::AddRef ( )

Adds a reference to the object.

Returns
Current reference count.

Implemented in TObjRefImpl< IMessageLoop >.

◆ ExecutePendingTask()

void IMessageLoop::ExecutePendingTask ( )

Executes pending tasks.

Implemented in SMessageLoop.

◆ HandleMsg()

int IMessageLoop::HandleMsg ( )

Handles a message.

Returns
Return value of message handling.

Implemented in SMessageLoop.

◆ IsRunning()

BOOL IMessageLoop::IsRunning ( )

Checks if the message loop is running.

Returns
TRUE if running, FALSE otherwise.

◆ OnFinalRelease()

void IMessageLoop::OnFinalRelease ( )

Finalizes the release of the object.

Implemented in TObjRefImpl< IMessageLoop >.

◆ OnIdle()

BOOL IMessageLoop::OnIdle ( int nIdleCount)

Handles idle time.

Parameters
nIdleCountIdle count.
Returns
TRUE if further idle processing is needed, FALSE otherwise.

Implemented in SMessageLoop.

◆ OnMsg()

void IMessageLoop::OnMsg ( LPMSG pMsg)

Processes a message.

Parameters
pMsgPointer to the message.

Implemented in SMessageLoop.

◆ PeekMsg()

BOOL IMessageLoop::PeekMsg ( LPMSG pMsg,
UINT wMsgFilterMin,
UINT wMsgFilterMax,
BOOL bRemove )

Peeks at messages in the message queue.

Parameters
pMsgPointer to the message.
wMsgFilterMinMinimum message filter value.
wMsgFilterMaxMaximum message filter value.
bRemoveWhether to remove the message.
Returns
TRUE if a message is available, FALSE otherwise.

Implemented in SMessageLoop.

◆ PostTask()

BOOL IMessageLoop::PostTask ( IRunnable * runable)

Posts a task to the message loop.

Parameters
runablePointer to the runnable object.
Returns
TRUE if successful, FALSE otherwise.

Implemented in SMessageLoop.

◆ PreTranslateMessage()

BOOL IMessageLoop::PreTranslateMessage ( MSG * pMsg)

Preprocesses a message.

Parameters
pMsgPointer to the message.
Returns
TRUE if the message is handled, FALSE otherwise.

Implemented in SMessageLoop.

◆ Quit()

void IMessageLoop::Quit ( int exitCode = 0)

Quits the message loop.

Parameters
exitCodeExit code.

Implemented in SMessageLoop.

◆ Release()

long IMessageLoop::Release ( )

Releases a reference to the object.

Returns
Current reference count.

Implemented in TObjRefImpl< IMessageLoop >.

◆ RemoveIdleHandler()

BOOL IMessageLoop::RemoveIdleHandler ( IIdleHandler * pIdleHandler)

Removes an idle handler.

Parameters
pIdleHandlerPointer to the idle handler.
Returns
TRUE if successful, FALSE otherwise.

Implemented in SMessageLoop.

◆ RemoveMessageFilter()

BOOL IMessageLoop::RemoveMessageFilter ( IMsgFilter * pMessageFilter)

Removes a message filter.

Parameters
pMessageFilterPointer to the message filter.
Returns
TRUE if successful, FALSE otherwise.

Implemented in SMessageLoop.

◆ RemoveTasksForObject()

int IMessageLoop::RemoveTasksForObject ( void * pObj)

Removes tasks associated with an object.

Parameters
pObjPointer to the object.
Returns
Number of tasks removed.

Implemented in SMessageLoop.

◆ Run()

int IMessageLoop::Run ( )

Runs the message loop.

Returns
Return value of the message loop.

Implemented in SMessageLoop.

◆ WaitMsg()

BOOL IMessageLoop::WaitMsg ( )

Waits for a message.

Returns
TRUE if successful, FALSE otherwise.

Implemented in SMessageLoop.


The documentation for this interface was generated from the following file: