mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2025-12-31 14:40:49 +00:00
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@106 b9cfdab3-6d41-4d17-bbe4-086880011989
102 lines
1.8 KiB
C
102 lines
1.8 KiB
C
/* $Id$ */
|
|
/*!
|
|
* %file Mw/TypeDefs.h
|
|
* %brief Type definitions
|
|
*/
|
|
#ifndef __MW_TYPEDEFS_H__
|
|
#define __MW_TYPEDEFS_H__
|
|
|
|
#include <Mw/MachDep.h>
|
|
|
|
typedef struct _MwClass * MwClass, MwClassRec;
|
|
typedef struct _MwPoint MwPoint;
|
|
typedef struct _MwRect MwRect;
|
|
typedef struct _MwIntegerKeyValue MwIntegerKeyValue;
|
|
typedef struct _MwTextKeyValue MwTextKeyValue;
|
|
typedef struct _MwUserHandlerKeyValue MwUserHandlerKeyValue;
|
|
typedef struct _MwVoidKeyValue MwVoidKeyValue;
|
|
typedef struct _MwFont MwFont;
|
|
#ifdef _MILSKO
|
|
typedef struct _MwWidget *MwWidget, MwWidgetRec;
|
|
#else
|
|
typedef void* MwWidget;
|
|
#endif
|
|
typedef void (*MwHandler)(MwWidget handle);
|
|
typedef void (*MwUserHandler)(MwWidget handle, void* user_data, void* call_data);
|
|
typedef void (*MwErrorHandler)(int code, const char* message, void* user_data);
|
|
|
|
#ifdef _MILSKO
|
|
#include <Mw/LowLevel.h>
|
|
#endif
|
|
|
|
struct _MwPoint {
|
|
int x;
|
|
int y;
|
|
};
|
|
|
|
struct _MwRect {
|
|
int x;
|
|
int y;
|
|
unsigned int width;
|
|
unsigned int height;
|
|
};
|
|
|
|
struct _MwTextKeyValue {
|
|
char* key;
|
|
char* value;
|
|
};
|
|
|
|
struct _MwIntegerKeyValue {
|
|
char* key;
|
|
int value;
|
|
};
|
|
|
|
struct _MwUserHandlerKeyValue {
|
|
char* key;
|
|
void* user_data;
|
|
MwUserHandler value;
|
|
};
|
|
|
|
struct _MwVoidKeyValue {
|
|
char* key;
|
|
void* value;
|
|
};
|
|
|
|
#ifdef _MILSKO
|
|
struct _MwWidget {
|
|
char* name;
|
|
|
|
MwLL lowlevel;
|
|
MwWidget parent;
|
|
MwWidget* children;
|
|
MwClass widget_class;
|
|
|
|
int pressed;
|
|
int close;
|
|
jmp_buf before_step;
|
|
|
|
void* internal;
|
|
|
|
MwIntegerKeyValue* integer;
|
|
MwTextKeyValue* text;
|
|
MwUserHandlerKeyValue* handler;
|
|
MwVoidKeyValue* data;
|
|
};
|
|
#endif
|
|
|
|
struct _MwClass {
|
|
MwHandler create;
|
|
MwHandler destroy;
|
|
MwHandler draw;
|
|
MwHandler click;
|
|
MwHandler parent_resize;
|
|
};
|
|
|
|
struct _MwFont {
|
|
int left;
|
|
int top;
|
|
unsigned char data[16];
|
|
};
|
|
|
|
#endif
|