merge git PR #3

git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@468 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
IoIxD
2025-10-23 00:26:36 +00:00
parent a0cca031d6
commit 64e8898945
13 changed files with 117 additions and 121 deletions

View File

@@ -12,6 +12,11 @@
#include <X11/Xcursor/Xcursor.h>
#include <X11/extensions/Xrender.h>
#ifdef HAS_FREETYPE
#include <ft2build.h>
#include FT_FREETYPE_H
#endif
struct _MwLL {
Display* display;
Window window;
@@ -42,6 +47,13 @@ struct _MwLL {
unsigned long blue_mask;
unsigned long blue_max;
unsigned long blue_shift;
#ifdef HAS_FREETYPE
void* ftLib;
FT_Library ftHandle;
MwBool ftOwns;
FT_Face ftFace;
#endif
};
struct _MwLLColor {
@@ -64,4 +76,19 @@ struct _MwLLPixmap {
XImage* mask;
};
#ifdef HAS_FREETYPE
void print_ft_error(void* ftLib, FT_Error err);
#define MwFreeTypeFontSize 181388
extern FT_Byte MwFreeTypeFontData[MwFreeTypeFontSize];
#define FT_WITH_FUNC(handle, func, block) \
{ \
_##func = dlsym(handle->ftLib, #func); \
if(_##func != NULL) { \
block \
} else \
printf("[WARNING] Unable to resolve function " #func ".\n"); \
}
#endif
#endif