From 5a318e6160efbf2d4e58f51cb00c0d75a791d771 Mon Sep 17 00:00:00 2001 From: NishiOwO Date: Sun, 28 Sep 2025 13:31:37 +0000 Subject: [PATCH] better solution git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@25 b9cfdab3-6d41-4d17-bbe4-086880011989 --- GNUmakefile | 2 +- include/Milsko/Default.h | 4 +++- src/default.c | 4 ++++ src/window.c | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 src/default.c diff --git a/GNUmakefile b/GNUmakefile index 7ce94d8..45a4533 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -7,7 +7,7 @@ CFLAGS = -fPIC -Iinclude -D_MILSKO LDFLAGS = LIBS = -L_OBJS = src/ds.o src/core.o +L_OBJS = src/ds.o src/core.o src/default.o L_OBJS += src/window.o ifeq ($(TARGET),NetBSD) diff --git a/include/Milsko/Default.h b/include/Milsko/Default.h index 501458d..17e4860 100644 --- a/include/Milsko/Default.h +++ b/include/Milsko/Default.h @@ -2,6 +2,8 @@ #ifndef __MILSKO_DEFAULT_H__ #define __MILSKO_DEFAULT_H__ -#define MILSKO_BACKGROUND "#ddd" +#include + +MILSKODECL const char* MilskoDefaultBackground; #endif diff --git a/src/default.c b/src/default.c new file mode 100644 index 0000000..0be0163 --- /dev/null +++ b/src/default.c @@ -0,0 +1,4 @@ +/* $Id$ */ +#include + +const char* MilskoDefaultBackground = "#ddd"; diff --git a/src/window.c b/src/window.c index 10d6e24..fb46d23 100644 --- a/src/window.c +++ b/src/window.c @@ -2,7 +2,7 @@ #include static void create(MilskoWidget handle) { - MilskoSetText(handle, MilskoNbackground, MILSKO_BACKGROUND); + MilskoSetText(handle, MilskoNbackground, MilskoDefaultBackground); } static void draw(MilskoWidget handle) {