1#ifndef __SMSGLOOP_I__H__
2#define __SMSGLOOP_I__H__
5#include <interface/obj-ref-i.h>
6#include <interface/SRunnable-i.h>
11#define INTERFACE IMsgFilter
25#define INTERFACE IIdleHandler
38#define INTERFACE IMessageLoop
108 STDMETHOD_(BOOL,
OnIdle)(THIS_
int nIdleCount) PURE;
114 STDMETHOD_(
int,
Run)(THIS) PURE;
126 STDMETHOD_(
void,
OnMsg)(THIS_ LPMSG pMsg) PURE;
132 STDMETHOD_(
void,
Quit)(THIS_
int exitCode DEF_VAL(0)) PURE;
139 STDMETHOD_(BOOL,
PostTask)(THIS_ IRunnable * runable) PURE;
161 STDMETHOD_(BOOL,
PeekMsg)(THIS_ LPMSG pMsg, UINT wMsgFilterMin, UINT wMsgFilterMax, BOOL bRemove) PURE;
177#define INTERFACE IMsgLoopFactory
Interface for handling idle time.
BOOL OnIdle() PURE
Handles idle time.
Interface for message loops.
BOOL AddIdleHandler(IIdleHandler *pIdleHandler) PURE
Adds an idle handler.
long AddRef() PURE
Adds a reference to the object.
void Quit(int exitCode=0) PURE
Quits the message loop.
int Run() PURE
Runs the message loop.
BOOL WaitMsg() PURE
Waits for a message.
BOOL PostTask(IRunnable *runable) PURE
Posts a task to the message loop.
long Release() PURE
Releases a reference to the object.
void OnMsg(LPMSG pMsg) PURE
Processes a message.
BOOL PreTranslateMessage(MSG *pMsg) PURE
Preprocesses a message.
BOOL RemoveMessageFilter(IMsgFilter *pMessageFilter) PURE
Removes a message filter.
BOOL IsRunning() SCONST PURE
Checks if the message loop is running.
void OnFinalRelease() PURE
Finalizes the release of the object.
BOOL OnIdle(int nIdleCount) PURE
Handles idle time.
int HandleMsg() PURE
Handles a message.
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 RemoveIdleHandler(IIdleHandler *pIdleHandler) PURE
Removes an idle handler.
BOOL AddMessageFilter(IMsgFilter *pMessageFilter) PURE
Adds a message filter.
int RemoveTasksForObject(void *pObj) PURE
Removes tasks associated with an object.
Interface for message filtering.
BOOL PreTranslateMessage(MSG *pMsg) PURE
Preprocesses a message.
Interface for creating message loops.
HRESULT CreateMsgLoop(IMessageLoop **ppMsgLoop, IMessageLoop *pParentLoop=NULL) PURE
Creates a message loop.
Interface for reference counting.