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/window.o src/button.o
L_LIBS = -lfreetype
ifeq ($(TARGET),NetBSD)
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
else ifeq ($(TARGET),Linux)
UNIX = 1
else ifeq ($(TARGET),Windows)
WINDOWS = 1
else
$(error Add your platform definition)
endif
@@ -26,6 +29,12 @@ LIB = lib
SO = .so
L_OBJS += src/x11.o
L_LIBS += -lX11
else ifeq ($(WINDOWS),1)
CFLAGS += -DUSE_GDI
LIB =
SO = .dll
L_OBJS += src/gdi.o
L_LIBS += -lgdi32
endif
.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
#if defined(_MILSKO) && defined(_WIN32)
#define MILSKODECL extern __declsped(dllexport)
#define MILSKODECL extern __declspec(dllexport)
#elif defined(_WIN32)
#define MILSKODECL extern __declsped(dllimport)
#define MILSKODECL extern __declspec(dllimport)
#else
#define MILSKODECL extern
#endif

View File

@@ -14,6 +14,7 @@ static void draw(MilskoWidget handle) {
r.height = MilskoGetInteger(handle, MilskoNheight);
MilskoDrawFrame(handle, &r, MilskoParseColor(handle, MilskoGetText(handle, MilskoNbackground)), 0);
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) {
MilskoPoint p[6];
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 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>