mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2026-01-03 08:00:50 +00:00
rahhh
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@37 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
58
include/Mw/LowLevel.h
Normal file
58
include/Mw/LowLevel.h
Normal file
@@ -0,0 +1,58 @@
|
||||
/* $Id$ */
|
||||
#ifndef __MW_LOWLEVEL_H__
|
||||
#define __MW_LOWLEVEL_H__
|
||||
|
||||
#include <Mw/MachDep.h>
|
||||
|
||||
typedef struct _MwLLHandler *MwLLHandler, MwLLHandlerRec;
|
||||
#ifdef _MW
|
||||
typedef struct _MwLL * MwLL, MwLLRec;
|
||||
typedef struct _MwLLColor *MwLLColor, MwLLColorRec;
|
||||
#else
|
||||
typedef void* MwLL;
|
||||
typedef void* MwLLColor;
|
||||
#endif
|
||||
|
||||
#ifdef _MW
|
||||
#ifdef USE_X11
|
||||
#include <Mw/X11.h>
|
||||
#endif
|
||||
#ifdef USE_GDI
|
||||
#include <Mw/GDI.h>
|
||||
#endif
|
||||
#endif
|
||||
#include <Mw/TypeDefs.h>
|
||||
|
||||
#define MwLLDispatch(x, y) \
|
||||
if(x->handler != NULL && x->handler->y != NULL) x->handler->y(x)
|
||||
|
||||
struct _MwLLHandler {
|
||||
void (*draw)(MwLL handle);
|
||||
void (*up)(MwLL handle);
|
||||
void (*down)(MwLL handle);
|
||||
};
|
||||
|
||||
/* lowlevel.c, common part */
|
||||
MWDECL void MwLLCreateCommon(MwLL handle);
|
||||
MWDECL void MwLLDestroyCommon(MwLL handle);
|
||||
|
||||
/* driver-specific */
|
||||
MWDECL MwLL MwLLCreate(MwLL parent, int x, int y, int width, int height);
|
||||
MWDECL void MwLLDestroy(MwLL handle);
|
||||
|
||||
MWDECL void MwLLPolygon(MwLL handle, MwPoint* points, int points_count, MwLLColor color);
|
||||
|
||||
MWDECL MwLLColor MwLLAllocColor(MwLL handle, int r, int g, int b);
|
||||
MWDECL void MwLLFreeColor(MwLLColor color);
|
||||
|
||||
MWDECL void MwLLGetXYWH(MwLL handle, int* x, int* y, unsigned int* w, unsigned int* h);
|
||||
MWDECL void MwLLSetXY(MwLL handle, int x, int y);
|
||||
MWDECL void MwLLSetWH(MwLL handle, int w, int h);
|
||||
|
||||
MWDECL void MwLLSetTitle(MwLL handle, const char* title);
|
||||
|
||||
MWDECL int MwLLPending(MwLL handle);
|
||||
MWDECL void MwLLNextEvent(MwLL handle);
|
||||
MWDECL void MwLLSleep(int ms);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user