3#include <interface/obj-ref-i.h>
5#include <interface/STranslator-i.h>
7#include <interface/slog-i.h>
8#include <interface/SAttrStorage-i.h>
9#include <interface/SMsgLoop-i.h>
10#include <interface/shostwnd-i.h>
11#include <interface/SResProviderMgr-i.h>
13#include <interface/SRender-i.h>
15#include <interface/SAnimation-i.h>
16#include <interface/SValueAnimator-i.h>
17#include <interface/SNotifyCenter-i.h>
18#include <interface/SObjFactory-i.h>
19#include <interface/SHostPresenter-i.h>
20#include <interface/STaskLoop-i.h>
24typedef enum _SingletonType
28 SINGLETON_TIMERGENERATOR,
29 SINGLETON_WINDOWFINDER,
30 SINGLETON_RICHEDITMENUDEF,
32 SINGLETON_NOTIFYCENTER,
37typedef struct IApplication IApplication;
38typedef IObject *(*FunCreateObject)(
const IApplication *app, LPCWSTR pszName, SObjectType nType);
39typedef ITaskLoop *(*FunCrateTaskLoop)();
42#define INTERFACE IApplication
43DECLARE_INTERFACE_(IApplication,
IObjRef)
49 STDMETHOD_(
long, AddRef)(THIS) PURE;
55 STDMETHOD_(
long, Release)(THIS) PURE;
61 STDMETHOD_(
void, OnFinalRelease)(THIS) PURE;
69 STDMETHOD_(HMODULE, GetModule)(CTHIS) SCONST PURE;
76 STDMETHOD_(UINT, LoadSystemNamedResource)(THIS_
IResProvider * pResProvider) PURE;
89 STDMETHOD_(
void, SetTranslator)(THIS_
ITranslatorMgr * pTrans) PURE;
102 STDMETHOD_(
void, SetToolTipFactory)(THIS_
IToolTipFactory * pToolTipFac) PURE;
109 STDMETHOD_(BOOL, SetMsgLoopFactory)(THIS_
IMsgLoopFactory * pMsgLoopFac) PURE;
122 STDMETHOD_(
void, SetLogManager)(THIS_ ILogMgr * pLogMgr) PURE;
128 STDMETHOD_(ILogMgr *, GetLogManager)(THIS) PURE;
135 STDMETHOD_(
void, SetAttrStorageFactory)(THIS_ IAttrStorageFactory * pAttrStorageFactory) PURE;
141 STDMETHOD_(IAttrStorageFactory *, GetAttrStorageFactory)(THIS) PURE;
148 STDMETHOD_(
int, Run)(THIS_ HWND hMainWnd) PURE;
155 STDMETHOD_(
void, Quit)(THIS_
int nCode) PURE;
161 STDMETHOD_(HWND, GetMainWnd)(THIS) PURE;
169 STDMETHOD_(BOOL, AddMsgLoop)(THIS_
IMessageLoop * pMsgLoop, BOOL bReplace DEF_VAL(FALSE)) PURE;
175 STDMETHOD_(BOOL, RemoveMsgLoop)(THIS) PURE;
182 STDMETHOD_(
IMessageLoop *, GetMsgLoop)(CTHIS_ tid_t dwThreadID DEF_VAL(GetCurrentThreadId())) SCONST PURE;
188 STDMETHOD_(IResProviderMgr *, GetResProviderMgr)(THIS) PURE;
201 STDMETHOD_(
void, SetRealWndHandler)(THIS_
IRealWndHandler * pRealHandler) PURE;
214 STDMETHOD_(BOOL, SetRenderFactory)(THIS_
IRenderFactory * renderFac) PURE;
221 STDMETHOD_(
void, SetScriptFactory)(THIS_ IScriptFactory * pScriptModule) PURE;
230 STDMETHOD_(
void, InitXmlNamedID)(THIS_
const LPCWSTR *pNames,
const int *nIds,
int nCount) PURE;
237 STDMETHOD_(
IXmlDoc *, LoadXmlDocment)(THIS_ LPCTSTR strResId) PURE;
238 STDMETHOD_(
IXmlDoc *, LoadXmlDocmentU8)(THIS_ LPCSTR strResId) PURE;
245 STDMETHOD_(IAnimation *, LoadAnimation)(THIS_ LPCTSTR strResId) PURE;
246 STDMETHOD_(IAnimation *, LoadAnimationU8)(THIS_ LPCSTR strResId) PURE;
253 STDMETHOD_(IValueAnimator *, LoadValueAnimator)(THIS_ LPCTSTR strResId) PURE;
254 STDMETHOD_(IValueAnimator *, LoadValueAnimatorU8)(THIS_ LPCSTR strResId) PURE;
261 STDMETHOD_(
IBitmapS *, LoadImage)(THIS_ LPCTSTR strResId) PURE;
262 STDMETHOD_(
IBitmapS *, LoadImageU8)(THIS_ LPCSTR strResId) PURE;
269 STDMETHOD_(
ITranslator *, LoadTranslator)(THIS_ LPCTSTR strResId) PURE;
270 STDMETHOD_(
ITranslator *, LoadTranslatorU8)(THIS_ LPCSTR strResId) PURE;
277 STDMETHOD_(BOOL, InstallTranslator)(THIS_
ITranslator * trModule) PURE;
284 STDMETHOD_(BOOL, UnnstallTranslator)(THIS_ REFGUID langId) PURE;
292 STDMETHOD_(
void, EnableNotifyCenter)(THIS_ BOOL bEnable,
int interval DEF_VAL(20)) PURE;
299 STDMETHOD_(
void *, GetInnerSingleton)(THIS_ SingletonType type) PURE;
307 STDMETHOD_(IObject *, CreateObject)(CTHIS_ LPCWSTR pszName, SObjectType nType) SCONST PURE;
314 STDMETHOD_(
void, SetCreateObjectCallback)(THIS_ FunCreateObject cbCreateObj) PURE;
322 STDMETHOD_(BOOL, RegisterObjFactory)(THIS_
const IObjectFactory *objFac, BOOL bReplace DEF_VAL(FALSE)) PURE;
329 STDMETHOD_(BOOL, UnregisterObjFactory)(THIS_
const IObjectFactory *objFac) PURE;
336 STDMETHOD_(
void, SetDefaultFontInfo)(THIS_ LPCWSTR pszFontInfo) PURE;
345 STDMETHOD_(BOOL, CreateTaskLoop)(THIS_
int nCount, Priority priority, BOOL bAutoStart DEF_VAL(TRUE)) PURE;
352 STDMETHOD_(ITaskLoop *, GetTaskLoop)(THIS_
int iTaskLoop DEF_VAL(0)) PURE;
359 STDMETHOD_(
void, SetCreateTaskLoopCallback)(THIS_ FunCrateTaskLoop cbCreateTaskLoop) PURE;
366 STDMETHOD_(HRESULT, CreateScriptModule)(THIS_ IScriptModule * *ppScriptModule) PURE;
374 STDMETHOD_(BOOL, SetEditCtxMenuTemplateResId)(THIS_ LPCTSTR resId,
IResProvider * pResProvider DEF_VAL(NULL)) PURE;
382 STDMETHOD_(BOOL, SetMessageBoxTemplateResId)(THIS_ LPCTSTR resId,
IResProvider * pResProvider DEF_VAL(NULL)) PURE;
Interface for handling real window creation and destruction.
Interface for message loops.
Interface for creating message loops.
Interface for reference counting.
Interface for handling real window operations.
Language Translation Interface.
Language Translation Interface Manager.
Interface for XML Document.