ParaPhysics core interface.
More...
#include <IParaWebPlayer.h>
|
enum | PWP_MSG_CODE {
PWP_FAILED_LOAD_PELIB,
PWP_FAILED_CREATE_PEAPP,
PWP_FAILED_START_PEAPP,
PWP_FAILED_CREATE_DEVICE,
PWP_FAILED_LOCATE_PARAENGINE_DIR,
PWP_FAILED_CREATE_PE_AUTOUPDATER
} |
|
ParaPhysics core interface.
§ ActivateApp()
virtual void ParaEngine::IParaWebPlayer::ActivateApp |
( |
bool |
bActivate | ) |
|
|
pure virtual |
the window message processor.
One needs send all messages belonging to the main window to this function, after calling Create(). this function is called whenever the application is disabled or enabled. usually called when receiving the WM_ACTIVATEAPP message. [main thread only]
§ BeginCoreUpdate()
virtual bool ParaEngine::IParaWebPlayer::BeginCoreUpdate |
( |
const char * |
sCurVersion, |
|
|
const char * |
sSessionDir |
|
) |
| |
|
pure virtual |
begin core update.
one can use TryGetNextCoreUpdateMessage() to process the update message.
- Parameters
-
sCurVersion | "0" is forcing full update, "" is using the current version in the current working directory. or a version number like "0.2.70" |
sSessionDir | we will keep temporary download file under update/[sUpdaterName]/[version] directory. if this is NULL, we will use the default name "web" |
§ CustomWinProc()
virtual bool ParaEngine::IParaWebPlayer::CustomWinProc |
( |
HWND |
hWnd, |
|
|
UINT |
uMsg, |
|
|
void * |
wParam, |
|
|
void * |
lParamm, |
|
|
void * |
lRes |
|
) |
| |
|
pure virtual |
call this function for processing main window messages in the browser main window thread.
return false to let the default window message procedure process or true if intercepted.
§ DoCoreUpdate()
virtual bool ParaEngine::IParaWebPlayer::DoCoreUpdate |
( |
| ) |
|
|
pure virtual |
force updating the core library in the current working directory.
It will send following messages. this function returns when update is complete 'updt.s': update progress started. value is msg 'updt.p': update progress report. var1 is finished count, var2 is allcount 'updt.e': error occurs during update. value is the error message. 'updt.u': unknown version detected. value is the error message. 'updt.c': completed. value is the current version. 'updt.n': no change detected. value is the current version. 'updt.b': broken file during file transfer. var1 is finished count, var2 is allcount
§ FindParaEngineDirectory()
virtual void ParaEngine::IParaWebPlayer::FindParaEngineDirectory |
( |
const char * |
sHintDir | ) |
|
|
pure virtual |
find the ParaEngine dir and set as working directory.
- Parameters
-
sHintDir | give us a dir to search for. |
§ IsDebugging()
virtual bool ParaEngine::IParaWebPlayer::IsDebugging |
( |
| ) |
|
|
pure virtual |
whether this is a debug build.
§ Release()
virtual void ParaEngine::IParaWebPlayer::Release |
( |
| ) |
|
|
pure virtual |
all this to unload the IPhysics.
Pointer to this class will be invalid after the call
§ SetBrowserNPLSystem()
virtual void ParaEngine::IParaWebPlayer::SetBrowserNPLSystem |
( |
NPL::INPLRuntime * |
pTarget | ) |
|
|
pure virtual |
set NPL runtime in the browser plugin.
so that we can send message to it.
§ SetMainWindow()
virtual void ParaEngine::IParaWebPlayer::SetMainWindow |
( |
HWND |
hWnd | ) |
|
|
pure virtual |
set the hWnd on to which we will render and process window messages.
this function should be called prior to StartApp(). If this function is not called, ParaEngine will create its own window for rendering.
- Note
- : the rendering device size will use the client area of the input window
- Parameters
-
hWnd | the Window on to which we will render. |
§ SetRedistDir()
virtual void ParaEngine::IParaWebPlayer::SetRedistDir |
( |
const char * |
sDir | ) |
|
|
pure virtual |
set the redist directory which contains this dll.
This function is called by the browser plugin when this dll is loaded.
§ Start()
virtual int ParaEngine::IParaWebPlayer::Start |
( |
const char * |
sCmdLine | ) |
|
|
pure virtual |
§ TryGetNextCoreUpdateMessage()
virtual bool ParaEngine::IParaWebPlayer::TryGetNextCoreUpdateMessage |
( |
| ) |
|
|
pure virtual |
same as DoCoreUpdate(), except that it allows us to poll the next message.
typically, we can call it from a timer that periodically check if there is a new update message.
The documentation for this class was generated from the following file: