diff --git a/include/Milsko/Core.h b/include/Milsko/Core.h index 3d009ed..f6b15be 100644 --- a/include/Milsko/Core.h +++ b/include/Milsko/Core.h @@ -16,6 +16,7 @@ MILSKODECL void MilskoSetInteger(MilskoWidget handle, const char* key, in MILSKODECL void MilskoSetText(MilskoWidget handle, const char* key, const char* value); MILSKODECL int MilskoGetInteger(MilskoWidget handle, const char* key); MILSKODECL const char* MilskoGetText(MilskoWidget handle, const char* key); +MILSKODECL void MilskoSetDefault(MilskoWidget handle); MILSKODECL void MilskoApply(MilskoWidget handle, ...); #endif diff --git a/include/Milsko/X11.h b/include/Milsko/X11.h index 8c4bea1..2fc7688 100644 --- a/include/Milsko/X11.h +++ b/include/Milsko/X11.h @@ -27,6 +27,9 @@ typedef struct _MilskoLowLevel { typedef struct _MilskoColor { unsigned long pixel; + int red; + int green; + int blue; }* MilskoLLColor; #endif diff --git a/src/button.c b/src/button.c index 204c9cc..5e4a4c5 100644 --- a/src/button.c +++ b/src/button.c @@ -2,9 +2,11 @@ #include static void create(MilskoWidget handle) { + MilskoSetDefault(handle); } static void draw(MilskoWidget handle) { + MilskoPoint p[6]; } MilskoClassRec MilskoButtonClassRec = { diff --git a/src/core.c b/src/core.c index b2d2635..6d4c7f7 100644 --- a/src/core.c +++ b/src/core.c @@ -162,3 +162,7 @@ void MilskoApply(MilskoWidget handle, ...) { } va_end(va); } + +void MilskoSetDefault(MilskoWidget handle) { + MilskoSetText(handle, MilskoNbackground, MilskoDefaultBackground); +} diff --git a/src/window.c b/src/window.c index 68600ce..ea67983 100644 --- a/src/window.c +++ b/src/window.c @@ -2,7 +2,7 @@ #include static void create(MilskoWidget handle) { - MilskoSetText(handle, MilskoNbackground, MilskoDefaultBackground); + MilskoSetDefault(handle); } static void draw(MilskoWidget handle) { diff --git a/src/x11.c b/src/x11.c index 29a3c51..3c55697 100644 --- a/src/x11.c +++ b/src/x11.c @@ -63,6 +63,9 @@ MilskoLLColor MilskoLLAllocColor(MilskoLL handle, int r, int g, int b) { XAllocColor(handle->display, handle->colormap, &xc); c->pixel = xc.pixel; + c->red = r; + c->green = g; + c->blue = b; return c; }