mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2026-01-03 08:00:50 +00:00
add return code for some stuff
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@156 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
@@ -18,6 +18,16 @@
|
||||
#define MwDispatch(x, y) \
|
||||
if(x->widget_class != NULL && x->widget_class->y != NULL) x->widget_class->y(x)
|
||||
|
||||
/*!
|
||||
* %warning Used internally
|
||||
* %brief Dispatches the handler of widget class
|
||||
* %param x Widget
|
||||
* %param y Handler name
|
||||
* %return `0` for success, otherwise failed
|
||||
*/
|
||||
#define MwDispatch2(x, y) \
|
||||
((x->widget_class != NULL && x->widget_class->y != NULL) ? x->widget_class->y(x) : 0)
|
||||
|
||||
#define MwWaitMS 5
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -24,6 +24,7 @@ typedef void* MwWidget;
|
||||
typedef void* MwMenu;
|
||||
#endif
|
||||
typedef void (*MwHandler)(MwWidget handle);
|
||||
typedef int (*MwHandler2)(MwWidget handle);
|
||||
typedef void (*MwUserHandler)(MwWidget handle, void* user_data, void* call_data);
|
||||
typedef void (*MwErrorHandler)(int code, const char* message, void* user_data);
|
||||
|
||||
@@ -96,11 +97,11 @@ struct _MwMenu {
|
||||
#endif
|
||||
|
||||
struct _MwClass {
|
||||
MwHandler create;
|
||||
MwHandler destroy;
|
||||
MwHandler draw;
|
||||
MwHandler click;
|
||||
MwHandler parent_resize;
|
||||
MwHandler2 create;
|
||||
MwHandler destroy;
|
||||
MwHandler draw;
|
||||
MwHandler click;
|
||||
MwHandler parent_resize;
|
||||
};
|
||||
|
||||
struct _MwFont {
|
||||
|
||||
Reference in New Issue
Block a user