mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2026-01-07 18:09:44 +00:00
bad solution
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@30 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
@@ -1,25 +1,27 @@
|
||||
/* $Id$ */
|
||||
#ifndef __MILSKO_X11_H__
|
||||
#define __MILSKO_X11_H__
|
||||
|
||||
typedef struct _MilskoLowLevel* MilskoLL;
|
||||
typedef struct _MilskoColor* MilskoLLColor;
|
||||
#ifndef __MILSKO_GDI_H__
|
||||
#define __MILSKO_GDI_H__
|
||||
|
||||
#include <Milsko/MachDep.h>
|
||||
|
||||
typedef struct _MilskoLL * MilskoLL, MilskoLLRec;
|
||||
typedef struct _MilskoLLColor *MilskoLLColor, MilskoLLColorRec;
|
||||
|
||||
#include <Milsko/TypeDefs.h>
|
||||
#include <Milsko/LowLevel.h>
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
typedef struct _MilskoLowLevel {
|
||||
struct _MilskoLL {
|
||||
void* user;
|
||||
|
||||
void (*draw)(MilskoLL handle);
|
||||
}* MilskoLL;
|
||||
};
|
||||
|
||||
typedef struct _MilskoColor {
|
||||
int red;
|
||||
int green;
|
||||
int blue;
|
||||
}* MilskoLLColor;
|
||||
struct _MilskoColor {
|
||||
int red;
|
||||
int green;
|
||||
int blue;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,6 +1,17 @@
|
||||
/* $Id$ */
|
||||
#ifndef __MILSKO_LL_H__
|
||||
#define __MILSKO_LL_H__
|
||||
#ifndef __MILSKO_LOWLEVEL_H__
|
||||
#define __MILSKO_LOWLEVEL_H__
|
||||
|
||||
#include <Milsko/MachDep.h>
|
||||
|
||||
typedef struct _MilskoLLCallback *MilskoLLCallback, MilskoLLCallbackRec;
|
||||
#ifdef _MILSKO
|
||||
typedef struct _MilskoLL * MilskoLL, MilskoLLRec;
|
||||
typedef struct _MilskoLLColor *MilskoLLColor, MilskoLLColorRec;
|
||||
#else
|
||||
typedef void* MilskoLL;
|
||||
typedef void* MilskoLLColor;
|
||||
#endif
|
||||
|
||||
#ifdef _MILSKO
|
||||
#ifdef USE_X11
|
||||
@@ -9,14 +20,18 @@
|
||||
#ifdef USE_GDI
|
||||
#include <Milsko/GDI.h>
|
||||
#endif
|
||||
#else
|
||||
typedef void* MilskoLL;
|
||||
typedef void* MilskoLLColor;
|
||||
#endif
|
||||
|
||||
#include <Milsko/MachDep.h>
|
||||
#include <Milsko/TypeDefs.h>
|
||||
|
||||
#define MilskoLLDispatch(x, y) \
|
||||
if(x->callback != NULL && x->callback->y != NULL) x->callback->y(x)
|
||||
|
||||
struct _MilskoLLCallback {
|
||||
void (*draw)(MilskoLL handle);
|
||||
void (*down)(MilskoLL handle);
|
||||
void (*up)(MilskoLL handle);
|
||||
};
|
||||
|
||||
MILSKODECL MilskoLL MilskoLLCreate(MilskoLL parent, int x, int y, int width, int height);
|
||||
MILSKODECL void MilskoLLDestroy(MilskoLL handle);
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
@@ -4,36 +4,49 @@
|
||||
|
||||
#include <Milsko/MachDep.h>
|
||||
|
||||
typedef struct _MilskoPoint {
|
||||
typedef struct _MilskoClass * MilskoClass, MilskoClassRec;
|
||||
typedef struct _MilskoPoint MilskoPoint;
|
||||
typedef struct _MilskoRect MilskoRect;
|
||||
typedef struct _MilskoTextKeyValue MilskoTextKeyValue;
|
||||
typedef struct _MilskoIntegerKeyValue MilskoIntegerKeyValue;
|
||||
#ifdef _MILSKO
|
||||
typedef struct _Milsko *MilskoWidget, MilskoWidgetRec;
|
||||
#else
|
||||
typedef void* MilskoWidget;
|
||||
#endif
|
||||
typedef void (*MilskoHandler)(MilskoWidget handle);
|
||||
|
||||
#ifdef _MILSKO
|
||||
#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;
|
||||
} MilskoPoint;
|
||||
};
|
||||
|
||||
typedef struct _MilskoRect {
|
||||
struct _MilskoRect {
|
||||
int x;
|
||||
int y;
|
||||
unsigned int width;
|
||||
unsigned int height;
|
||||
} MilskoRect;
|
||||
};
|
||||
|
||||
typedef struct _MilskoTextKeyValue {
|
||||
struct _MilskoTextKeyValue {
|
||||
char* key;
|
||||
char* value;
|
||||
} MilskoTextKeyValue;
|
||||
};
|
||||
|
||||
typedef struct _MilskoIntegerKeyValue {
|
||||
struct _MilskoIntegerKeyValue {
|
||||
char* key;
|
||||
int value;
|
||||
} MilskoIntegerKeyValue;
|
||||
|
||||
typedef struct _MilskoClass* MilskoClass;
|
||||
};
|
||||
|
||||
#ifdef _MILSKO
|
||||
#include <Milsko/LowLevel.h>
|
||||
|
||||
typedef struct _Milsko* MilskoWidget;
|
||||
|
||||
typedef struct _Milsko {
|
||||
struct _Milsko {
|
||||
char* name;
|
||||
|
||||
MilskoLL lowlevel;
|
||||
@@ -43,19 +56,15 @@ typedef struct _Milsko {
|
||||
|
||||
MilskoTextKeyValue* text;
|
||||
MilskoIntegerKeyValue* integer;
|
||||
}* MilskoWidget;
|
||||
#else
|
||||
typedef void* MilskoWidget;
|
||||
};
|
||||
#endif
|
||||
|
||||
typedef void (*MilskoHandler)(MilskoWidget handle);
|
||||
|
||||
typedef struct _MilskoClass {
|
||||
struct _MilskoClass {
|
||||
void* opaque;
|
||||
MilskoHandler create;
|
||||
MilskoHandler destroy;
|
||||
MilskoHandler draw;
|
||||
MilskoHandler click;
|
||||
} *MilskoClass, MilskoClassRec;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -2,16 +2,18 @@
|
||||
#ifndef __MILSKO_X11_H__
|
||||
#define __MILSKO_X11_H__
|
||||
|
||||
typedef struct _MilskoLowLevel* MilskoLL;
|
||||
typedef struct _MilskoColor* MilskoLLColor;
|
||||
|
||||
#include <Milsko/MachDep.h>
|
||||
|
||||
typedef struct _MilskoLL * MilskoLL, MilskoLLRec;
|
||||
typedef struct _MilskoLLColor *MilskoLLColor, MilskoLLColorRec;
|
||||
|
||||
#include <Milsko/TypeDefs.h>
|
||||
#include <Milsko/LowLevel.h>
|
||||
|
||||
#include <X11/X.h>
|
||||
#include <X11/Xutil.h>
|
||||
|
||||
typedef struct _MilskoLowLevel {
|
||||
struct _MilskoLL {
|
||||
Display* display;
|
||||
Window window;
|
||||
GC gc;
|
||||
@@ -22,14 +24,14 @@ typedef struct _MilskoLowLevel {
|
||||
unsigned int height;
|
||||
void* user;
|
||||
|
||||
void (*draw)(MilskoLL handle);
|
||||
}* MilskoLL;
|
||||
MilskoLLCallback callback;
|
||||
};
|
||||
|
||||
typedef struct _MilskoColor {
|
||||
struct _MilskoLLColor {
|
||||
unsigned long pixel;
|
||||
int red;
|
||||
int green;
|
||||
int blue;
|
||||
}* MilskoLLColor;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user