aboutsummaryrefslogtreecommitdiff
path: root/src/libui_sdl/libui/unix/future.c
diff options
context:
space:
mode:
authorArisotura <thetotalworm@gmail.com>2020-05-29 21:36:26 +0200
committerGitHub <noreply@github.com>2020-05-29 21:36:26 +0200
commit0cadd4bd12bc824d010396c855fa450774e6f619 (patch)
tree7f404a52ff372a1e2e785db2b8cf11736f2f3212 /src/libui_sdl/libui/unix/future.c
parentcd7487d53f8207277fc44f7983513fe6892a3409 (diff)
parent8ddd82ca2c7c8844a1d3c2cc7418d03976c9c52e (diff)
Merge pull request #635 from Arisotura/qt
Qt
Diffstat (limited to 'src/libui_sdl/libui/unix/future.c')
-rw-r--r--src/libui_sdl/libui/unix/future.c42
1 files changed, 0 insertions, 42 deletions
diff --git a/src/libui_sdl/libui/unix/future.c b/src/libui_sdl/libui/unix/future.c
deleted file mode 100644
index 1f9f532..0000000
--- a/src/libui_sdl/libui/unix/future.c
+++ /dev/null
@@ -1,42 +0,0 @@
-// 29 june 2016
-#include "uipriv_unix.h"
-
-// functions FROM THE FUTURE!
-// in some cases, because being held back by LTS releases sucks :/
-// in others, because parts of GTK+ being unstable until recently also sucks :/
-
-// added in pango 1.38; we need 1.36
-static PangoAttribute *(*newFGAlphaAttr)(guint16 alpha) = NULL;
-
-// added in GTK+ 3.20; we need 3.10
-static void (*gwpIterSetObjectName)(GtkWidgetPath *path, gint pos, const char *name) = NULL;
-
-// note that we treat any error as "the symbols aren't there" (and don't care if dlclose() failed)
-void loadFutures(void)
-{
- void *handle;
-
- // dlsym() walks the dependency chain, so opening the current process should be sufficient
- handle = dlopen(NULL, RTLD_LAZY);
- if (handle == NULL)
- return;
-#define GET(var, fn) *((void **) (&var)) = dlsym(handle, #fn)
- GET(newFGAlphaAttr, pango_attr_foreground_alpha_new);
- GET(gwpIterSetObjectName, gtk_widget_path_iter_set_object_name);
- dlclose(handle);
-}
-
-PangoAttribute *FUTURE_pango_attr_foreground_alpha_new(guint16 alpha)
-{
- if (newFGAlphaAttr == NULL)
- return NULL;
- return (*newFGAlphaAttr)(alpha);
-}
-
-gboolean FUTURE_gtk_widget_path_iter_set_object_name(GtkWidgetPath *path, gint pos, const char *name)
-{
- if (gwpIterSetObjectName == NULL)
- return FALSE;
- (*gwpIterSetObjectName)(path, pos, name);
- return TRUE;
-}