diff --git a/include/Milsko/Core.h b/include/Milsko/Core.h index d364b86..719bcd0 100644 --- a/include/Milsko/Core.h +++ b/include/Milsko/Core.h @@ -7,8 +7,8 @@ MILSKODECL HMILSKO MilskoCreateWidget(MilskoClass class, HMILSKO parent, int x, int y, unsigned int width, unsigned int height); MILSKODECL void MilskoDestroyWidget(HMILSKO handle); -MILSKODECL void MilskoLoop(HMILSKO handle); -MILSKODECL void MilskoStep(HMILSKO handle); -MILSKODECL int MilskoPending(HMILSKO handle); +MILSKODECL void MilskoLoop(HMILSKO handle); +MILSKODECL void MilskoStep(HMILSKO handle); +MILSKODECL int MilskoPending(HMILSKO handle); #endif diff --git a/include/Milsko/LowLevel.h b/include/Milsko/LowLevel.h index fd4d408..42cd225 100644 --- a/include/Milsko/LowLevel.h +++ b/include/Milsko/LowLevel.h @@ -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 int MilskoLLPending(HMILSKOLL handle); MILSKODECL void MilskoLLNextEvent(HMILSKOLL handle); -MILSKODECL void MilskoLLSleep(int ms); +MILSKODECL void MilskoLLSleep(int ms); #endif diff --git a/include/Milsko/TypeDef.h b/include/Milsko/TypeDef.h index 6989ff6..d29a471 100644 --- a/include/Milsko/TypeDef.h +++ b/include/Milsko/TypeDef.h @@ -27,6 +27,6 @@ typedef void* HMILSKO; #endif typedef struct _MilskoClass { -}* MilskoClass, MilskoClassRec; +} *MilskoClass, MilskoClassRec; #endif diff --git a/src/core.c b/src/core.c index 69c1e08..dbdab74 100644 --- a/src/core.c +++ b/src/core.c @@ -41,20 +41,20 @@ void MilskoDestroyWidget(HMILSKO handle) { free(handle); } -MILSKODECL void MilskoStep(HMILSKO handle){ +MILSKODECL void MilskoStep(HMILSKO handle) { MilskoLLNextEvent(handle->lowlevel); } -MILSKODECL int MilskoPending(HMILSKO handle){ +MILSKODECL int MilskoPending(HMILSKO handle) { 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; } return MilskoLLPending(handle->lowlevel); } -MILSKODECL void MilskoLoop(HMILSKO handle){ - while(1){ +MILSKODECL void MilskoLoop(HMILSKO handle) { + while(1) { MilskoStep(handle); MilskoLLSleep(10); } diff --git a/src/window.c b/src/window.c index 333c5e3..940c88d 100644 --- a/src/window.c +++ b/src/window.c @@ -1,6 +1,5 @@ /* $Id$ */ #include -MilskoClassRec MilskoWindowClassRec = { -}; -MilskoClass MilskoWindowClass = &MilskoWindowClassRec; +MilskoClassRec MilskoWindowClassRec = {}; +MilskoClass MilskoWindowClass = &MilskoWindowClassRec; diff --git a/src/x11.c b/src/x11.c index 3f4a611..81b4818 100644 --- a/src/x11.c +++ b/src/x11.c @@ -89,6 +89,6 @@ void MilskoLLNextEvent(HMILSKOLL handle) { } } -void MilskoLLSleep(int ms){ +void MilskoLLSleep(int ms) { usleep(ms * 1000); }