mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2026-01-10 19:33:28 +00:00
name
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@33 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
@@ -5,6 +5,9 @@
|
||||
#include <Milsko/MachDep.h>
|
||||
#include <Milsko/TypeDefs.h>
|
||||
|
||||
#define MilskoDispatch(x, y) \
|
||||
if(x->class != NULL && x->class->y != NULL) x->class->y(x)
|
||||
|
||||
MILSKODECL MilskoWidget MilskoCreateWidget(MilskoClass class, const char* name, MilskoWidget parent, int x, int y, unsigned int width, unsigned int height);
|
||||
MILSKODECL void MilskoDestroyWidget(MilskoWidget handle);
|
||||
|
||||
@@ -12,11 +15,14 @@ MILSKODECL void MilskoLoop(MilskoWidget handle);
|
||||
MILSKODECL void MilskoStep(MilskoWidget handle);
|
||||
MILSKODECL int MilskoPending(MilskoWidget handle);
|
||||
|
||||
MILSKODECL void MilskoSetInteger(MilskoWidget handle, const char* key, int n);
|
||||
MILSKODECL void MilskoSetText(MilskoWidget handle, const char* key, const char* value);
|
||||
MILSKODECL int MilskoGetInteger(MilskoWidget handle, const char* key);
|
||||
MILSKODECL const char* MilskoGetText(MilskoWidget handle, const char* key);
|
||||
MILSKODECL void MilskoSetDefault(MilskoWidget handle);
|
||||
MILSKODECL void MilskoApply(MilskoWidget handle, ...);
|
||||
MILSKODECL void MilskoSetInteger(MilskoWidget handle, const char* key, int n);
|
||||
MILSKODECL void MilskoSetText(MilskoWidget handle, const char* key, const char* value);
|
||||
MILSKODECL void MilskoSetHandler(MilskoWidget handle, const char* key, MilskoHandler value);
|
||||
MILSKODECL int MilskoGetInteger(MilskoWidget handle, const char* key);
|
||||
MILSKODECL const char* MilskoGetText(MilskoWidget handle, const char* key);
|
||||
MILSKODECL MilskoHandler MilskoGetHandler(MilskoWidget handle, const char* key);
|
||||
MILSKODECL void MilskoDispatchHandler(MilskoWidget handle, const char* key);
|
||||
MILSKODECL void MilskoSetDefault(MilskoWidget handle);
|
||||
MILSKODECL void MilskoApply(MilskoWidget handle, ...);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -15,7 +15,7 @@ typedef struct _MilskoLLColor *MilskoLLColor, MilskoLLColorRec;
|
||||
struct _MilskoLL {
|
||||
void* user;
|
||||
|
||||
void (*draw)(MilskoLL handle);
|
||||
MilskoLLHandler handler;
|
||||
};
|
||||
|
||||
struct _MilskoColor {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
#include <Milsko/MachDep.h>
|
||||
|
||||
typedef struct _MilskoLLCallback *MilskoLLCallback, MilskoLLCallbackRec;
|
||||
typedef struct _MilskoLLHandler *MilskoLLHandler, MilskoLLHandlerRec;
|
||||
#ifdef _MILSKO
|
||||
typedef struct _MilskoLL * MilskoLL, MilskoLLRec;
|
||||
typedef struct _MilskoLLColor *MilskoLLColor, MilskoLLColorRec;
|
||||
@@ -24,9 +24,9 @@ typedef void* MilskoLLColor;
|
||||
#include <Milsko/TypeDefs.h>
|
||||
|
||||
#define MilskoLLDispatch(x, y) \
|
||||
if(x->callback != NULL && x->callback->y != NULL) x->callback->y(x)
|
||||
if(x->handler != NULL && x->handler->y != NULL) x->handler->y(x)
|
||||
|
||||
struct _MilskoLLCallback {
|
||||
struct _MilskoLLHandler {
|
||||
void (*draw)(MilskoLL handle);
|
||||
void (*up)(MilskoLL handle);
|
||||
void (*down)(MilskoLL handle);
|
||||
|
||||
@@ -10,4 +10,6 @@
|
||||
#define MilskoNtitle "Stitle"
|
||||
#define MilskoNbackground "Sbackground"
|
||||
|
||||
#define MilskoNactivateHandler "Cactivate"
|
||||
|
||||
#endif
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ struct _MilskoLL {
|
||||
Colormap colormap;
|
||||
void* user;
|
||||
|
||||
MilskoLLCallback callback;
|
||||
MilskoLLHandler handler;
|
||||
};
|
||||
|
||||
struct _MilskoLLColor {
|
||||
|
||||
Reference in New Issue
Block a user