git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@187 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
NishiOwO
2025-10-07 02:15:06 +00:00
parent 5460ca4639
commit f70b20a6e6
7 changed files with 8013 additions and 20 deletions

1
.gitattributes vendored
View File

@@ -1,4 +1,5 @@
/src/stb_ds.h linguist-generated
/src/stb_image.h linguist-generated
/external/libjpeg/include/*.h linguist-generated
/external/libjpeg/src/*.c linguist-generated
/external/libjpeg/src/*.h linguist-generated

View File

@@ -84,7 +84,7 @@ endif
SHARED = -shared
ifeq ($(UNIX),1)
L_CFLAGS += -DUSE_X11
L_CFLAGS += -DUSE_X11 -DUNIX
L_OBJS += src/backend/x11.o
L_LIBS += -lm -lX11 -lXrender -lXext -lXcursor

View File

@@ -5,22 +5,22 @@
#include "carbon.h"
MwLL MwLLCreate(MwLL parent, int x, int y, int width, int height) {
// void* library;
// MwLL r = malloc(sizeof(*r));
// MwLLCreateCommon(r);
//
// library = dlopen("CarbonLib", RTLD_NOW);
// if(library != NULL) {
// dlclose(library);
// r->backend = getQuickDrawBackend();
// quickDrawBackendUserDataInit(r->userdata);
// return r;
// }
//
// printf("ERROR: No supported UI library found. (Searched for: CarbonLib)\n");
// getchar();
// raise(SIGTRAP);
// void* library;
// MwLL r = malloc(sizeof(*r));
// MwLLCreateCommon(r);
//
// library = dlopen("CarbonLib", RTLD_NOW);
// if(library != NULL) {
// dlclose(library);
// r->backend = getQuickDrawBackend();
// quickDrawBackendUserDataInit(r->userdata);
// return r;
// }
//
// printf("ERROR: No supported UI library found. (Searched for: CarbonLib)\n");
// getchar();
// raise(SIGTRAP);
return NULL;
};

View File

@@ -389,5 +389,5 @@ void MwLLDetach(MwLL handle, MwPoint* point) {
XReparentWindow(handle->display, handle->window, RootWindow(handle->display, DefaultScreen(handle->display)), x + point->x, y + point->y);
XMapWindow(handle->display, handle->window);
XSetInputFocus(handle->display, handle->window, RevertToNone, CurrentTime);
// XSetInputFocus(handle->display, handle->window, RevertToNone, CurrentTime);
}

5
src/external/image.c vendored Normal file
View File

@@ -0,0 +1,5 @@
/* $Id$ */
#ifdef USE_STB_IMAGE
#define STB_IMAGE_IMPLEMENTATION
#include "stb_image.h"
#endif

7988
src/external/stb_image.h vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -4,7 +4,7 @@
#include "../external/stb_ds.h"
static int create(MwWidget handle) {
/* todo: we should have a public "show" function here that is implemented per
/* todo: we should have a public "show" function here that is implemented per
platform, as opposed to just shoving it here. perchance. */
#ifdef _WIN32
ShowWindow(handle->lowlevel->hWnd, SW_HIDE);
@@ -188,7 +188,6 @@ void MwSubMenuAppear(MwWidget handle, MwMenu menu, MwPoint* point) {
ShowWindow(handle->lowlevel->hWnd, SW_NORMAL);
SetFocus(handle->lowlevel->hWnd);
#else
#endif
for(i = 0; i < arrlen(menu->sub); i++) {