git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@33 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
Nishi 2025-09-28 22:21:51 +00:00
commit a1601bb0b4
10 changed files with 66 additions and 25 deletions

View file

@ -7,8 +7,9 @@
typedef struct _MilskoClass * MilskoClass, MilskoClassRec;
typedef struct _MilskoPoint MilskoPoint;
typedef struct _MilskoRect MilskoRect;
typedef struct _MilskoTextKeyValue MilskoTextKeyValue;
typedef struct _MilskoIntegerKeyValue MilskoIntegerKeyValue;
typedef struct _MilskoTextKeyValue MilskoTextKeyValue;
typedef struct _MilskoHandlerKeyValue MilskoHandlerKeyValue;
#ifdef _MILSKO
typedef struct _MilskoWidget *MilskoWidget, MilskoWidgetRec;
#else
@ -20,9 +21,6 @@ typedef void (*MilskoHandler)(MilskoWidget handle);
#include <Milsko/LowLevel.h>
#endif
#define MilskoDispatch(x, y) \
if(x->class != NULL && x->class->y != NULL) x->class->y(x)
struct _MilskoPoint {
int x;
int y;
@ -45,6 +43,11 @@ struct _MilskoIntegerKeyValue {
int value;
};
struct _MilskoHandlerKeyValue {
char* key;
MilskoHandler value;
};
#ifdef _MILSKO
struct _MilskoWidget {
char* name;
@ -56,8 +59,9 @@ struct _MilskoWidget {
int pressed;
MilskoTextKeyValue* text;
MilskoIntegerKeyValue* integer;
MilskoTextKeyValue* text;
MilskoHandlerKeyValue* handler;
};
#endif