This commit is contained in:
IoIxD
2026-01-09 14:43:44 -07:00
parent 079cfa18b9
commit 2d3bd9213e
13 changed files with 402 additions and 69 deletions

View File

@@ -27,6 +27,7 @@ enum MwLLBackends {
MwLLBackendX11 = 0,
MwLLBackendGDI,
MwLLBackendWayland,
MwLLBackendAppKit,
};
struct _MwLLCommon {
@@ -61,6 +62,9 @@ struct _MwLLCommonPixmap {
#ifdef USE_WAYLAND
#include <Mw/LowLevel/Wayland.h>
#endif
#ifdef USE_APPKIT
#include <Mw/LowLevel/AppKit.h>
#endif
union _MwLL {
struct _MwLLCommon common;
@@ -73,6 +77,9 @@ union _MwLL {
#ifdef USE_WAYLAND
struct _MwLLWayland wayland;
#endif
#ifdef USE_APPKIT
struct _MwLLAppKit appkit;
#endif
};
union _MwLLColor {
@@ -86,6 +93,9 @@ union _MwLLColor {
#ifdef USE_WAYLAND
struct _MwLLWaylandColor wayland;
#endif
#ifdef USE_APPKIT
struct _MwLLAppKitColor appkit;
#endif
};
union _MwLLPixmap {
@@ -99,6 +109,9 @@ union _MwLLPixmap {
#ifdef USE_WAYLAND
struct _MwLLWaylandPixmap wayland;
#endif
#ifdef USE_APPKIT
struct _MwLLAppKitPixmap appkit;
#endif
};
#endif
#include <Mw/TypeDefs.h>

View File

@@ -0,0 +1,27 @@
/*!
* @file Mw/LowLevel/AppKit.h
* @brief Work in progress AppKit Backend
* @warning This is used internally.
*/
#ifndef __MW_LOWLEVEL_APPKIT_H__
#define __MW_LOWLEVEL_APPKIT_H__
#include <Mw/MachDep.h>
#include <Mw/TypeDefs.h>
#include <Mw/LowLevel.h>
MWDECL int MwLLAppKitCallInit(void);
struct _MwLLAppKit {
struct _MwLLCommon common;
};
struct _MwLLAppKitColor {
struct _MwLLCommonColor common;
};
struct _MwLLAppKitPixmap {
struct _MwLLCommonPixmap common;
};
#endif

View File

@@ -43,10 +43,15 @@
#include <pwd.h>
#include <dlfcn.h>
#include <signal.h>
#include <dirent.h>
#include <dirent.h>
#include <fcntl.h>
#endif
#ifdef __APPLE__
#include <mach/clock.h>
#include <mach/mach.h>
#endif
#ifndef M_PI
#define M_PI 3.14159265
#endif