git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@23 b9cfdab3-6d41-4d17-bbe4-086880011989
36 lines
846 B
C
36 lines
846 B
C
/* $Id$ */
|
|
#include <Milsko/Milsko.h>
|
|
|
|
static void create(MilskoWidget handle) {
|
|
MilskoSetText(handle, MilskoNbackground, MILSKO_BACKGROUND);
|
|
}
|
|
|
|
static void draw(MilskoWidget handle) {
|
|
MilskoLLColor c = MilskoParseColor(handle, MilskoGetText(handle, MilskoNbackground));
|
|
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 = {
|
|
NULL, /* opaque */
|
|
create, /* create */
|
|
NULL, /* destroy */
|
|
draw, /* draw */
|
|
NULL /* click */
|
|
};
|
|
MilskoClass MilskoWindowClass = &MilskoWindowClassRec;
|