|
mGNCS API Reference
v1.2.0
A new control set and a new framework for MiniGUI apps
|
Data Structures | |
| struct | _NCS_PROP_ENTRY |
| struct | _NCS_RDR_ELEMENT |
| struct | _NCS_RDR_INFO |
| struct | _NCS_CREATE_NOTIFY_INFO |
| struct | _NCS_MAIN_CREATE_INFO |
| struct | _NCS_WND_TEMPLATE |
| struct | _NCS_MNWND_TEMPLATE |
Typedefs | |
| typedef struct _NCS_PROP_ENTRY | NCS_PROP_ENTRY |
| typedef struct _NCS_RDR_ELEMENT | NCS_RDR_ELEMENT |
| typedef struct _NCS_RDR_INFO | NCS_RDR_INFO |
| typedef struct _NCS_CREATE_NOTIFY_INFO | NCS_CREATE_NOTIFY_INFO |
| typedef struct _NCS_MAIN_CREATE_INFO | NCS_MAIN_CREATE_INFO |
| typedef struct _NCS_MNWND_TEMPLATE | NCS_MNWND_TEMPLATE |
Functions | |
| MGNCS_EXPORT BOOL | ncsSetFont (HWND hWnd, const char *fontName) |
| set control's font More... | |
| MGNCS_EXPORT BOOL | ncsSetProperty (HWND hWnd, int id, DWORD value) |
| set control's property More... | |
| MGNCS_EXPORT DWORD | ncsGetProperty (HWND hWnd, int id) |
| get control's property More... | |
| MGNCS_EXPORT mWidget * | ncsCreateWindow (const char *className, const char *caption, DWORD style, DWORD exStyle, int id, int x, int y, int w, int h, HWND parent, NCS_PROP_ENTRY *props, NCS_RDR_INFO *rdrInfo, NCS_EVENT_HANDLER *handlers, DWORD addData) |
| create a NCS widget More... | |
| MGNCS_EXPORT mWidget * | ncsCreateMainWindow (const char *className, const char *caption, DWORD style, DWORD exStyle, int id, int x, int y, int w, int h, HWND host, HICON hIcon, HMENU hMenu, NCS_PROP_ENTRY *props, NCS_RDR_INFO *rdrInfo, NCS_EVENT_HANDLER *handlers, DWORD addData) |
| create a NCS main window More... | |
| MGNCS_EXPORT mWidget * | ncsCreateWindowIndirect (const NCS_WND_TEMPLATE *tmpl, HWND hParent) |
| create a mComponent by NCS_WND_TEMPLATE, More... | |
| MGNCS_EXPORT mWidget * | ncsCreateMainWindowIndirect (const NCS_MNWND_TEMPLATE *tmpl, HWND hHost) |
| create a main window from a template More... | |
| MGNCS_EXPORT mWidgetClass * | ncsGetMainWndClass (const char *className) |
| Get a Main window Class by className. More... | |
| MGNCS_EXPORT void | ncsNotifyParentEx (mWidget *self, int code, DWORD addData) |
| raise a notification event More... | |
| static mWidget * | ncsObjFromHandle (HWND hwnd) |
| Get a Object from window handle. More... | |
| static mWidget * | ncsGetChildObj (HWND hwnd, int id) |
| Get the child object pointer of window. More... | |
| static mWidget * | ncsGetParentObj (HWND hwnd) |
| Get the parent object pointer of window. More... | |
| static DWORD | ncsGetDlgCode (HWND hwnd) |
| Get the dialog code of a NCS window. More... | |
| MGNCS_EXPORT void | ncsDestroyWindow (mWidget *self, DWORD endCode) |
| delete the widget window created by ncs. More... | |
| typedef struct _NCS_CREATE_NOTIFY_INFO NCS_CREATE_NOTIFY_INFO |
A struct include the creating info for creating window
| typedef struct _NCS_MAIN_CREATE_INFO NCS_MAIN_CREATE_INFO |
A struct wrap the NCS_CREATE_INFO
| typedef struct _NCS_MNWND_TEMPLATE NCS_MNWND_TEMPLATE |
A struct include all the creating info for ncsCreateMainWindowIndirect,
| typedef struct _NCS_PROP_ENTRY NCS_PROP_ENTRY |
A property entry
| typedef struct _NCS_RDR_ELEMENT NCS_RDR_ELEMENT |
A renderer element struct
| typedef struct _NCS_RDR_INFO NCS_RDR_INFO |
A struct used to include all the renderer info when create a widget
| mWidget * ncsCreateMainWindow | ( | const char * | className, |
| const char * | caption, | ||
| DWORD | style, | ||
| DWORD | exStyle, | ||
| int | id, | ||
| int | x, | ||
| int | y, | ||
| int | w, | ||
| int | h, | ||
| HWND | host, | ||
| HICON | hIcon, | ||
| HMENU | hMenu, | ||
| NCS_PROP_ENTRY * | props, | ||
| NCS_RDR_INFO * | rdrInfo, | ||
| NCS_EVENT_HANDLER * | handlers, | ||
| DWORD | addData | ||
| ) |
create a NCS main window
| className | the class name of widget. the class name must be register by ncsRegisterComponent. And must be NCSCTRL_MAINWND or its dirved class. |
| caption | the caption of the main window |
| style | the style of main window |
| exStyle | the extend style of main window |
| id | the id of main window |
| x | the x position of main window |
| y | the y position of main window |
| w | the width of main window |
| h | the height of main window |
| host | the handle of host window, can be NULL |
| hIcon | the icon of main window |
| hMenu | the menu bar handle |
| props | the properties array pointer, end by {-1, 0} if it's not NULL |
| rdrInfo | the renderer info pointer |
| handlers | the handlers of event array pointer, end by {-1, NULL}, if it's not NULL |
| addData | the additional data send to callback NCS_CB_ONCREATE and NCS_CB_ONINITDLG |
| mWidget * ncsCreateMainWindowIndirect | ( | const NCS_MNWND_TEMPLATE * | tmpl, |
| HWND | hHost | ||
| ) |
create a main window from a template
| tmpl | - the template of main window |
| hHost | - the host window handler of the main window |
| mWidget * ncsCreateWindow | ( | const char * | className, |
| const char * | caption, | ||
| DWORD | style, | ||
| DWORD | exStyle, | ||
| int | id, | ||
| int | x, | ||
| int | y, | ||
| int | w, | ||
| int | h, | ||
| HWND | parent, | ||
| NCS_PROP_ENTRY * | props, | ||
| NCS_RDR_INFO * | rdrInfo, | ||
| NCS_EVENT_HANDLER * | handlers, | ||
| DWORD | addData | ||
| ) |
create a NCS widget
| className | the class name of widget. the class name must be register by ncsRegisterComponent. Any drived from mComponent and registered component is validate |
| caption | the caption of the widget, ignored if class_name is a mInvsbComp |
| style | the style of widget, ignored if class_name is a mInvsbComp |
| exStyle | the extend style of widget, ignored if class_name is a mInvsbComp |
| id | the id of component |
| x | the x position of widget, ignored if class_name is a mInvsbComp |
| y | the y position of widget, ignored if class_name is a mInvsbComp |
| w | the width of widget ,ignored if class_name is a mInvsbComp |
| h | the height of widget , ignored if class_name is a mInvsbComp |
| parent | the handle of parent, if class_name is a mInvsbComp, the parent must releated a mWidget object |
| props | the properties array pointer, end by {-1, 0} if it's not NULL |
| rdrInfo | the renderer info pointer |
| handlers | the handlers of event array pointer, end by {-1, NULL}, if it's not NULL |
| addData | the additional data send to callback NCS_CB_ONCREATE |
| mWidget * ncsCreateWindowIndirect | ( | const NCS_WND_TEMPLATE * | tmpl, |
| HWND | hParent | ||
| ) |
create a mComponent by NCS_WND_TEMPLATE,
| tmpl | the template pointer |
| hParent | the parent handle, if NCS_WND_TEMPLATE.class_name is a mInvsbComp, hParent must releated a mWidget object |
| void ncsDestroyWindow | ( | mWidget * | self, |
| DWORD | endCode | ||
| ) |
delete the widget window created by ncs.
Referenced by ncsGetDlgCode().
|
inlinestatic |
Get the child object pointer of window.
| hwnd | - the handle of window, which can be a normal MiniGUI window or a NCS window |
| id | - the child id. The child must be a NCS window |
Definition at line 1248 of file mwidget.h.
References _c, and ncsObjFromHandle().
|
inlinestatic |
Get the dialog code of a NCS window.
| hwnd | - the handle of NCS window |
Definition at line 1276 of file mwidget.h.
References _c, ncsDestroyWindow(), and ncsObjFromHandle().
| mWidgetClass * ncsGetMainWndClass | ( | const char * | className | ) |
Get a Main window Class by className.
| className | - the class name of main window , if className == NULL or invalidate name, the function return mMainWnd's class |
|
inlinestatic |
Get the parent object pointer of window.
| hwnd | - the handle of child window, which can be a normal MiniGUI window or a NCS window |
Definition at line 1262 of file mwidget.h.
References ncsObjFromHandle().
| void * ncsGetProperty | ( | HWND | hWnd, |
| int | id | ||
| ) |
get control's property
| hWnd | - the handle of control |
| id | - the property id |
| void ncsNotifyParentEx | ( | mWidget * | self, |
| int | code, | ||
| DWORD | addData | ||
| ) |
|
inlinestatic |
Get a Object from window handle.
| hwnd | - the handle of window |
Definition at line 1232 of file mwidget.h.
Referenced by ncsGetChildObj(), ncsGetDlgCode(), and ncsGetParentObj().
| BOOL ncsSetFont | ( | HWND | hWnd, |
| const char * | fontName | ||
| ) |
set control's font
| hWnd | - the handle of control |
| fontName | - the name of a logical font |
| BOOL ncsSetProperty | ( | HWND | hWnd, |
| int | id, | ||
| DWORD | value | ||
| ) |
set control's property
| hWnd | - the handle of control |
| id | - the property id of control |
| value | - the value of property |
1.8.11