 | | WideStudio/MWT Class Reference
| |
Class Name
WSDappDev
Specification of methods
WSGIappDev method
- Form
- WSDappDev* WSGIappDev()
- Function
- Returns the global instance of the class: WSDappDev.
- Description
-
- Parameters
- None.
- Return value
- Returns the instance.
- Notice
- This method is a global function.
Do not delete the return value.
It is an invalid instance that is created by WSDappDev().
- Samples
-
//Accessing argc/argv of main()
int argc = WSGIappDev()->getArgc();
char** argv = WSGIappDev()->getArgv();
getArgc method
- Form
- int getArgc()
- Function
- Returns the argc of main(int argc,char** argv).
- Description
-
- Parameters
- None.
- Return value
- Returns argc.
- Notice
-
- Samples
- Refer to WSGIappDev().
getArgv method
- Form
- char** getArgv();
- Function
- Returns the argv of main(int argc,char** argv).
- Description
-
- Parameters
- None.
- Return value
- Returns argv
- Notice
- Do not delete the return value.
- Samples
- Refer to WSGIappDev().
getInstanceName method
- Form
- char* getInstanceName()
- Function
- Returns the project name.
- Description
-
- Parameters
- None.
- Return value
- Returns the project name.
- Notice
- Do not delete the return value.
Please see the first element of the return value of getArgv(),
if you want the command name.
- Samples
-
//get the project name.
char* iname = WSGIappDev()->getInstanceName();
getWidth() method
- Form
- unsigned short getWidth()
- Function
- Returns the width of the display.
- Description
-
- Parameters
- None.
- Return value
- None.
- Notice
-
- Samples
-
//get the display width.
WSCushort dw = WSGIappDev()->getWidth();
getHeight() method
- Form
- unsigned short getHeight()
- Function
- Returns the height of the dislpay.
- Description
-
- Parameters
- None.
- Return value
- None.
- Notice
-
- Samples
-
//get the display height.
WSCushort dh = WSGIappDev()->getHeight();
lock() method
- Form
- long lock()
- Function
- Locks the main loop of the main thread.
- Description
-
- Parameters
- None.
- Return value
- None.
- Notice
-
- Samples
-
//Accessing the instances from sub-thread,
//it must locked the main loop of the main thread.
WSGIappDev()->lock();
//Access the instances..
WSGIappDev()->unlock();
unlock() method
- Form
- long unlock()
- Function
- Unlocks the locked main loop of the main thread.
- Description
-
- Parameters
- None.
- Return value
- None.
- Notice
-
- Samples
- Refer to lock().
processEvent() method
- Form
- long processEvent()
- Function
- Process the events in the event queue.
- Description
-
- Parameters
- None.
- Return value
- Returns WS_NO_ERR if it succeeds; returns otherwise if it fails.
- Notice
-
- Samples
-
//Process event in the event queue while the long procedure.
while(1){
//process some procedure for a while..
...
//process an event to update windows.
WSGIappDev()->processEvent();
if (done == True){
break;
}
}
Document Release 3.90 For use with WideStudio/MWT Release 3.90, Summer 2005 WideStudio/MWT Home | Up to Copyright(C) WideStudio/MWT Development Team, 1999-2005 | | Last modified: June 25, 2005 | |