adding dummy files

git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@29 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
NishiOwO
2025-09-28 21:15:34 +00:00
parent c9c8bf5163
commit c2b08729ef
6 changed files with 40 additions and 3 deletions

View File

@@ -9,6 +9,7 @@ LIBS =
L_OBJS = src/ds.o src/core.o src/default.o src/draw.o L_OBJS = src/ds.o src/core.o src/default.o src/draw.o
L_OBJS += src/window.o src/button.o L_OBJS += src/window.o src/button.o
L_LIBS = -lfreetype
ifeq ($(TARGET),NetBSD) ifeq ($(TARGET),NetBSD)
CFLAGS += -I/usr/X11R7/include -I/usr/pkg/include CFLAGS += -I/usr/X11R7/include -I/usr/pkg/include
@@ -16,6 +17,8 @@ LDFLAGS += -L/usr/X11R7/lib -L/usr/pkg/lib -Wl,-R/usr/X11R7/lib -Wl,-R/usr/pkg/l
UNIX = 1 UNIX = 1
else ifeq ($(TARGET),Linux) else ifeq ($(TARGET),Linux)
UNIX = 1 UNIX = 1
else ifeq ($(TARGET),Windows)
WINDOWS = 1
else else
$(error Add your platform definition) $(error Add your platform definition)
endif endif
@@ -26,6 +29,12 @@ LIB = lib
SO = .so SO = .so
L_OBJS += src/x11.o L_OBJS += src/x11.o
L_LIBS += -lX11 L_LIBS += -lX11
else ifeq ($(WINDOWS),1)
CFLAGS += -DUSE_GDI
LIB =
SO = .dll
L_OBJS += src/gdi.o
L_LIBS += -lgdi32
endif endif
.PHONY: all format clean .PHONY: all format clean

25
include/Milsko/GDI.h Normal file
View File

@@ -0,0 +1,25 @@
/* $Id$ */
#ifndef __MILSKO_X11_H__
#define __MILSKO_X11_H__
typedef struct _MilskoLowLevel* MilskoLL;
typedef struct _MilskoColor* MilskoLLColor;
#include <Milsko/MachDep.h>
#include <Milsko/TypeDefs.h>
#include <windows.h>
typedef struct _MilskoLowLevel {
void* user;
void (*draw)(MilskoLL handle);
}* MilskoLL;
typedef struct _MilskoColor {
int red;
int green;
int blue;
}* MilskoLLColor;
#endif

View File

@@ -12,9 +12,9 @@
#endif #endif
#if defined(_MILSKO) && defined(_WIN32) #if defined(_MILSKO) && defined(_WIN32)
#define MILSKODECL extern __declsped(dllexport) #define MILSKODECL extern __declspec(dllexport)
#elif defined(_WIN32) #elif defined(_WIN32)
#define MILSKODECL extern __declsped(dllimport) #define MILSKODECL extern __declspec(dllimport)
#else #else
#define MILSKODECL extern #define MILSKODECL extern
#endif #endif

View File

@@ -14,6 +14,7 @@ static void draw(MilskoWidget handle) {
r.height = MilskoGetInteger(handle, MilskoNheight); r.height = MilskoGetInteger(handle, MilskoNheight);
MilskoDrawFrame(handle, &r, MilskoParseColor(handle, MilskoGetText(handle, MilskoNbackground)), 0); MilskoDrawFrame(handle, &r, MilskoParseColor(handle, MilskoGetText(handle, MilskoNbackground)), 0);
MilskoDrawRect(handle, &r, MilskoParseColor(handle, MilskoGetText(handle, MilskoNbackground))); MilskoDrawRect(handle, &r, MilskoParseColor(handle, MilskoGetText(handle, MilskoNbackground)));
} }

View File

@@ -63,7 +63,7 @@ void MilskoDrawRect(MilskoWidget handle, MilskoRect* rect, MilskoLLColor color)
void MilskoDrawFrame(MilskoWidget handle, MilskoRect* rect, MilskoLLColor color, int invert) { void MilskoDrawFrame(MilskoWidget handle, MilskoRect* rect, MilskoLLColor color, int invert) {
MilskoPoint p[6]; MilskoPoint p[6];
const int diff = 128; const int diff = 128;
const int border = 4; const int border = 2;
MilskoLLColor darker = MilskoLLAllocColor(handle->lowlevel, color->red - diff, color->green - diff, color->blue - diff); MilskoLLColor darker = MilskoLLAllocColor(handle->lowlevel, color->red - diff, color->green - diff, color->blue - diff);
MilskoLLColor lighter = MilskoLLAllocColor(handle->lowlevel, color->red + diff, color->green + diff, color->blue + diff); MilskoLLColor lighter = MilskoLLAllocColor(handle->lowlevel, color->red + diff, color->green + diff, color->blue + diff);

2
src/gdi.c Normal file
View File

@@ -0,0 +1,2 @@
/* $Id$ */
#include <Milsko/Milsko.h>