better property handling

git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@226 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
NishiOwO
2025-10-08 15:42:57 +00:00
parent 84a4efa57e
commit 7450b17bcf
8 changed files with 64 additions and 22 deletions

View File

@@ -28,6 +28,16 @@
#define MwDispatch2(x, y) \
((x->widget_class != NULL && x->widget_class->y != NULL) ? x->widget_class->y(x) : 0)
/*!
* %warning Used internally
* %brief Dispatches the handler of widget class
* %param x Widget
* %param y Handler name
* %param name Property name
*/
#define MwDispatch3(x, y, name) \
((x->widget_class != NULL && x->widget_class->y != NULL) ? x->widget_class->y(x, name) : 0)
#define MwWaitMS 5
#ifdef __cplusplus

View File

@@ -25,7 +25,7 @@ typedef void* MwWidget;
#endif
typedef void (*MwHandler)(MwWidget handle);
typedef int (*MwHandler2)(MwWidget handle);
typedef int (*MwHandler3)(MwWidget handle, const char* key);
typedef void (*MwHandler3)(MwWidget handle, const char* key);
typedef void (*MwUserHandler)(MwWidget handle, void* user_data, void* call_data);
typedef void (*MwErrorHandler)(int code, const char* message, void* user_data);
@@ -79,6 +79,7 @@ struct _MwWidget {
MwPoint mouse_point;
int close;
jmp_buf before_step;
int prop_event;
void* internal;