mGNCS API Reference  v1.2.0
A new control set and a new framework for MiniGUI apps
Data Structures | Macros | Typedefs | Functions | Variables
mObject

Data Structures

struct  mObjectClass
 the basic object class of NCS More...
 
struct  mObject
 the Object struct More...
 

Macros

#define _c(ths)   (ths)->_class
 the marco get the class of a object More...
 
#define INTEFACE_ADJUST(piobj)
 adjust the pointer as the real pointer More...
 
#define _IM(piobj, method, ...)   (piobj)->_vtable->method(INTEFACE_ADJUST(piobj), ##__VA_ARGS__)
 call the interface object More...
 

Typedefs

typedef mObjectClass *(* PClassConstructor) (mObjectClass *)
 the Class initialize callback More...
 
typedef void(* PCONSTRUCT_DWORD) (void *self, DWORD addData)
 

Functions

static mObject_initObject (mObject *pobj, mObjectClass *_class, DWORD param)
 
static mObjectinitObjectArgs (mObject *pobj, mObjectClass *_class,...)
 

Variables

MGNCS_EXPORT mObjectClass g_stmObjectCls
 the singleton of mObjectClass, represent a class object More...
 

Detailed Description

Macro Definition Documentation

#define _c (   ths)    (ths)->_class

the marco get the class of a object

Definition at line 60 of file mobject.h.

Referenced by ncsGetChildObj(), and ncsGetDlgCode().

#define _IM (   piobj,
  method,
  ... 
)    (piobj)->_vtable->method(INTEFACE_ADJUST(piobj), ##__VA_ARGS__)

call the interface object

Definition at line 182 of file mobject.h.

#define INTEFACE_ADJUST (   piobj)
Value:
(_TYPEOF(piobj))((unsigned char*)(piobj) - \
((IInterfaceVTable*)((piobj))->_vtable)->_obj_offset)

adjust the pointer as the real pointer

Definition at line 173 of file mobject.h.

Typedef Documentation

mObjectClass *(* PClassConstructor)(mObjectClass *cls)

the Class initialize callback

Parameters
cls- the class pointer to initialize
Returns
mObjectClass* - the initialized class pointer, equal param cls

Definition at line 199 of file mobject.h.

typedef void(* PCONSTRUCT_DWORD) (void *self, DWORD addData)

We support two kind of construct: one is the old construct, uses DWORD to pass the user params; the other is new construct, use the va_list to pass the params

mgncs don't known which construct of an object use, we just pass them by diffrent wrapper

the caller must known which wrapper should be used.

if you use the wrong wrapper, the system may be CRASH

Definition at line 211 of file mobject.h.

Function Documentation

static mObject* _initObject ( mObject pobj,
mObjectClass _class,
DWORD  param 
)
inlinestatic

init an object with DWORD param

Definition at line 306 of file mobject.h.

static mObject* initObjectArgs ( mObject pobj,
mObjectClass _class,
  ... 
)
inlinestatic

init an object with va_list params first param is the construct param count

Definition at line 317 of file mobject.h.

References deleteObject(), and newObject().

Variable Documentation

g_stmObjectCls

the singleton of mObjectClass, represent a class object