Introduce X11 toolkit and make message dialogs use it (#13855)

This commit is contained in:
eafton
2025-09-02 13:22:48 -07:00
committed by GitHub
parent af74b1fe84
commit d14cbd7b50
6 changed files with 2250 additions and 1153 deletions
File diff suppressed because it is too large Load Diff
-4
View File
@@ -26,10 +26,6 @@
#include "SDL_x11video.h" #include "SDL_x11video.h"
#include "SDL_x11settings.h" #include "SDL_x11settings.h"
#define SDL_XSETTINGS_GDK_WINDOW_SCALING_FACTOR "Gdk/WindowScalingFactor"
#define SDL_XSETTINGS_GDK_UNSCALED_DPI "Gdk/UnscaledDPI"
#define SDL_XSETTINGS_XFT_DPI "Xft/DPI"
static void UpdateContentScale(SDL_VideoDevice *_this) static void UpdateContentScale(SDL_VideoDevice *_this)
{ {
if (_this) { if (_this) {
+4
View File
@@ -27,6 +27,10 @@
#include <X11/Xlib.h> #include <X11/Xlib.h>
#include "xsettings-client.h" #include "xsettings-client.h"
#define SDL_XSETTINGS_GDK_WINDOW_SCALING_FACTOR "Gdk/WindowScalingFactor"
#define SDL_XSETTINGS_GDK_UNSCALED_DPI "Gdk/UnscaledDPI"
#define SDL_XSETTINGS_XFT_DPI "Xft/DPI"
typedef struct X11_SettingsData { typedef struct X11_SettingsData {
XSettingsClient *xsettings; XSettingsClient *xsettings;
} SDLX11_SettingsData; } SDLX11_SettingsData;
+4
View File
@@ -42,6 +42,7 @@ SDL_X11_SYM(int,XConvertSelection,(Display* a,Atom b,Atom c,Atom d,Window e,Time
SDL_X11_SYM(Pixmap,XCreateBitmapFromData,(Display *dpy,Drawable d,_Xconst char *data,unsigned int width,unsigned int height)) SDL_X11_SYM(Pixmap,XCreateBitmapFromData,(Display *dpy,Drawable d,_Xconst char *data,unsigned int width,unsigned int height))
SDL_X11_SYM(Colormap,XCreateColormap,(Display* a,Window b,Visual* c,int d)) SDL_X11_SYM(Colormap,XCreateColormap,(Display* a,Window b,Visual* c,int d))
SDL_X11_SYM(Cursor,XCreatePixmapCursor,(Display* a,Pixmap b,Pixmap c,XColor* d,XColor* e,unsigned int f,unsigned int g)) SDL_X11_SYM(Cursor,XCreatePixmapCursor,(Display* a,Pixmap b,Pixmap c,XColor* d,XColor* e,unsigned int f,unsigned int g))
SDL_X11_SYM(Cursor,XCreatePixmap,(Display* a,Drawable b,unsigned int d,unsigned int e,unsigned int f))
SDL_X11_SYM(Cursor,XCreateFontCursor,(Display* a,unsigned int b)) SDL_X11_SYM(Cursor,XCreateFontCursor,(Display* a,unsigned int b))
SDL_X11_SYM(XFontSet,XCreateFontSet,(Display* a, _Xconst char* b, char*** c, int* d, char** e)) SDL_X11_SYM(XFontSet,XCreateFontSet,(Display* a, _Xconst char* b, char*** c, int* d, char** e))
SDL_X11_SYM(GC,XCreateGC,(Display* a,Drawable b,unsigned long c,XGCValues* d)) SDL_X11_SYM(GC,XCreateGC,(Display* a,Drawable b,unsigned long c,XGCValues* d))
@@ -68,6 +69,7 @@ SDL_X11_SYM(int,XFreeGC,(Display* a,GC b))
SDL_X11_SYM(int,XFreeFont,(Display* a, XFontStruct* b)) SDL_X11_SYM(int,XFreeFont,(Display* a, XFontStruct* b))
SDL_X11_SYM(int,XFreeModifiermap,(XModifierKeymap* a)) SDL_X11_SYM(int,XFreeModifiermap,(XModifierKeymap* a))
SDL_X11_SYM(int,XFreePixmap,(Display* a,Pixmap b)) SDL_X11_SYM(int,XFreePixmap,(Display* a,Pixmap b))
SDL_X11_SYM(int,XFreeColormap,(Display* a,Colormap b))
SDL_X11_SYM(void,XFreeStringList,(char** a)) SDL_X11_SYM(void,XFreeStringList,(char** a))
SDL_X11_SYM(char*,XGetAtomName,(Display *a,Atom b)) SDL_X11_SYM(char*,XGetAtomName,(Display *a,Atom b))
SDL_X11_SYM(int,XGetInputFocus,(Display *a,Window *b,int *c)) SDL_X11_SYM(int,XGetInputFocus,(Display *a,Window *b,int *c))
@@ -102,6 +104,8 @@ SDL_X11_SYM(Display*,XOpenDisplay,(_Xconst char* a))
SDL_X11_SYM(Status,XInitThreads,(void)) SDL_X11_SYM(Status,XInitThreads,(void))
SDL_X11_SYM(int,XPeekEvent,(Display* a,XEvent* b)) SDL_X11_SYM(int,XPeekEvent,(Display* a,XEvent* b))
SDL_X11_SYM(int,XPending,(Display* a)) SDL_X11_SYM(int,XPending,(Display* a))
SDL_X11_SYM(XImage*,XGetImage,(Display* a,Drawable b,int c, int d,unsigned int e,unsigned int f,unsigned long g,int h))
SDL_X11_SYM(void,XDestroyImage,(XImage *a))
SDL_X11_SYM(int,XPutImage,(Display* a,Drawable b,GC c,XImage* d,int e,int f,int g,int h,unsigned int i,unsigned int j)) SDL_X11_SYM(int,XPutImage,(Display* a,Drawable b,GC c,XImage* d,int e,int f,int g,int h,unsigned int i,unsigned int j))
SDL_X11_SYM(int,XQueryKeymap,(Display* a,char b[32])) SDL_X11_SYM(int,XQueryKeymap,(Display* a,char b[32]))
SDL_X11_SYM(Bool,XQueryPointer,(Display* a,Window b,Window* c,Window* d,int* e,int* f,int* g,int* h,unsigned int* i)) SDL_X11_SYM(Bool,XQueryPointer,(Display* a,Window b,Window* c,Window* d,int* e,int* f,int* g,int* h,unsigned int* i))
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff