mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2026-01-07 01:49:47 +00:00
format
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@12 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
@@ -7,8 +7,8 @@
|
|||||||
|
|
||||||
MILSKODECL HMILSKO MilskoCreateWidget(MilskoClass class, HMILSKO parent, int x, int y, unsigned int width, unsigned int height);
|
MILSKODECL HMILSKO MilskoCreateWidget(MilskoClass class, HMILSKO parent, int x, int y, unsigned int width, unsigned int height);
|
||||||
MILSKODECL void MilskoDestroyWidget(HMILSKO handle);
|
MILSKODECL void MilskoDestroyWidget(HMILSKO handle);
|
||||||
MILSKODECL void MilskoLoop(HMILSKO handle);
|
MILSKODECL void MilskoLoop(HMILSKO handle);
|
||||||
MILSKODECL void MilskoStep(HMILSKO handle);
|
MILSKODECL void MilskoStep(HMILSKO handle);
|
||||||
MILSKODECL int MilskoPending(HMILSKO handle);
|
MILSKODECL int MilskoPending(HMILSKO handle);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -24,6 +24,6 @@ MILSKODECL HMILSKOCOLOR MilskoLLAllocColor(HMILSKOLL handle, int r, int g, int b
|
|||||||
MILSKODECL void MilskoLLGetXYWH(HMILSKOLL handle, int* x, int* y, unsigned int* w, unsigned int* h);
|
MILSKODECL void MilskoLLGetXYWH(HMILSKOLL handle, int* x, int* y, unsigned int* w, unsigned int* h);
|
||||||
MILSKODECL int MilskoLLPending(HMILSKOLL handle);
|
MILSKODECL int MilskoLLPending(HMILSKOLL handle);
|
||||||
MILSKODECL void MilskoLLNextEvent(HMILSKOLL handle);
|
MILSKODECL void MilskoLLNextEvent(HMILSKOLL handle);
|
||||||
MILSKODECL void MilskoLLSleep(int ms);
|
MILSKODECL void MilskoLLSleep(int ms);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -27,6 +27,6 @@ typedef void* HMILSKO;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef struct _MilskoClass {
|
typedef struct _MilskoClass {
|
||||||
}* MilskoClass, MilskoClassRec;
|
} *MilskoClass, MilskoClassRec;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
10
src/core.c
10
src/core.c
@@ -41,20 +41,20 @@ void MilskoDestroyWidget(HMILSKO handle) {
|
|||||||
free(handle);
|
free(handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
MILSKODECL void MilskoStep(HMILSKO handle){
|
MILSKODECL void MilskoStep(HMILSKO handle) {
|
||||||
MilskoLLNextEvent(handle->lowlevel);
|
MilskoLLNextEvent(handle->lowlevel);
|
||||||
}
|
}
|
||||||
|
|
||||||
MILSKODECL int MilskoPending(HMILSKO handle){
|
MILSKODECL int MilskoPending(HMILSKO handle) {
|
||||||
int i;
|
int i;
|
||||||
for(i = 0; i < arrlen(handle->children); i++){
|
for(i = 0; i < arrlen(handle->children); i++) {
|
||||||
if(MilskoPending(handle->children[i])) return 1;
|
if(MilskoPending(handle->children[i])) return 1;
|
||||||
}
|
}
|
||||||
return MilskoLLPending(handle->lowlevel);
|
return MilskoLLPending(handle->lowlevel);
|
||||||
}
|
}
|
||||||
|
|
||||||
MILSKODECL void MilskoLoop(HMILSKO handle){
|
MILSKODECL void MilskoLoop(HMILSKO handle) {
|
||||||
while(1){
|
while(1) {
|
||||||
MilskoStep(handle);
|
MilskoStep(handle);
|
||||||
MilskoLLSleep(10);
|
MilskoLLSleep(10);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
#include <Milsko/Milsko.h>
|
#include <Milsko/Milsko.h>
|
||||||
|
|
||||||
MilskoClassRec MilskoWindowClassRec = {
|
MilskoClassRec MilskoWindowClassRec = {};
|
||||||
};
|
MilskoClass MilskoWindowClass = &MilskoWindowClassRec;
|
||||||
MilskoClass MilskoWindowClass = &MilskoWindowClassRec;
|
|
||||||
|
|||||||
Reference in New Issue
Block a user