mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2026-01-06 01:19:44 +00:00
aa
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@20 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
if(x->class != NULL && x->class->y != NULL) x->class->y(x)
|
||||
|
||||
static void llhandler(MilskoLL handle) {
|
||||
MilskoWidget h = (MilskoWidget)handle;
|
||||
MilskoWidget h = (MilskoWidget)handle->user;
|
||||
Dispatch(h, draw);
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ int MilskoPending(MilskoWidget handle) {
|
||||
void MilskoLoop(MilskoWidget handle) {
|
||||
while(1) {
|
||||
MilskoStep(handle);
|
||||
MilskoLLSleep(10);
|
||||
MilskoLLSleep(5);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
15
src/window.c
15
src/window.c
@@ -2,6 +2,21 @@
|
||||
#include <Milsko/Milsko.h>
|
||||
|
||||
static void draw(MilskoWidget handle) {
|
||||
MilskoLLColor c = MilskoLLAllocColor(handle->lowlevel, 255, 0, 0);
|
||||
MilskoPoint p[4];
|
||||
|
||||
p[0].x = 0;
|
||||
p[0].y = 0;
|
||||
p[1].x = MilskoGetInteger(handle, MilskoNwidth);
|
||||
p[1].y = 0;
|
||||
p[2].x = MilskoGetInteger(handle, MilskoNwidth);
|
||||
p[2].y = MilskoGetInteger(handle, MilskoNheight);
|
||||
p[3].x = 0;
|
||||
p[3].y = MilskoGetInteger(handle, MilskoNheight);
|
||||
|
||||
MilskoLLPolygon(handle->lowlevel, p, 4, c);
|
||||
|
||||
MilskoLLFreeColor(c);
|
||||
}
|
||||
|
||||
MilskoClassRec MilskoWindowClassRec = {
|
||||
|
||||
Reference in New Issue
Block a user