From dc4f38fcea194897ac49dc93b24607498dc01ea6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alberts=20Muktup=C4=81vels?= Date: Sun, 2 Oct 2022 22:17:29 +0300 Subject: xprops: remove unused functions --- src/core/xprops.c | 106 --------------------------------------------------- src/include/xprops.h | 33 ---------------- 2 files changed, 139 deletions(-) diff --git a/src/core/xprops.c b/src/core/xprops.c index 4175611d..12a24d4d 100644 --- a/src/core/xprops.c +++ b/src/core/xprops.c @@ -234,25 +234,6 @@ atom_list_from_results (GetPropertyResults *results, return TRUE; } -gboolean -meta_prop_get_atom_list (MetaDisplay *display, - Window xwindow, - Atom xatom, - Atom **atoms_p, - int *n_atoms_p) -{ - GetPropertyResults results; - - *atoms_p = NULL; - *n_atoms_p = 0; - - if (!get_property (display, xwindow, xatom, XA_ATOM, - &results)) - return FALSE; - - return atom_list_from_results (&results, atoms_p, n_atoms_p); -} - static gboolean cardinal_list_from_results (GetPropertyResults *results, gulong **cardinals_p, @@ -424,24 +405,6 @@ utf8_string_from_results (GetPropertyResults *results, return TRUE; } -gboolean -meta_prop_get_utf8_string (MetaDisplay *display, - Window xwindow, - Atom xatom, - char **str_p) -{ - GetPropertyResults results; - - *str_p = NULL; - - if (!get_property (display, xwindow, xatom, - display->atom_UTF8_STRING, - &results)) - return FALSE; - - return utf8_string_from_results (&results, str_p); -} - /* this one freakishly returns g_malloc memory */ static gboolean utf8_list_from_results (GetPropertyResults *results, @@ -713,21 +676,6 @@ text_property_from_results (GetPropertyResults *results, return *utf8_str_p != NULL; } -gboolean -meta_prop_get_text_property (MetaDisplay *display, - Window xwindow, - Atom xatom, - char **utf8_str_p) -{ - GetPropertyResults results; - - if (!get_property (display, xwindow, xatom, AnyPropertyType, - &results)) - return FALSE; - - return text_property_from_results (&results, utf8_str_p); -} - /* From Xmd.h */ #ifndef cvtINT32toInt #if SIZEOF_VOID_P == 8 @@ -803,23 +751,6 @@ wm_hints_from_results (GetPropertyResults *results, return TRUE; } -gboolean -meta_prop_get_wm_hints (MetaDisplay *display, - Window xwindow, - Atom xatom, - XWMHints **hints_p) -{ - GetPropertyResults results; - - *hints_p = NULL; - - if (!get_property (display, xwindow, xatom, XA_WM_HINTS, - &results)) - return FALSE; - - return wm_hints_from_results (&results, hints_p); -} - static gboolean class_hint_from_results (GetPropertyResults *results, XClassHint *class_hint) @@ -864,24 +795,6 @@ class_hint_from_results (GetPropertyResults *results, return TRUE; } -gboolean -meta_prop_get_class_hint (MetaDisplay *display, - Window xwindow, - Atom xatom, - XClassHint *class_hint) -{ - GetPropertyResults results; - - class_hint->res_class = NULL; - class_hint->res_name = NULL; - - if (!get_property (display, xwindow, xatom, XA_STRING, - &results)) - return FALSE; - - return class_hint_from_results (&results, class_hint); -} - static gboolean size_hints_from_results (GetPropertyResults *results, XSizeHints **hints_p, @@ -939,25 +852,6 @@ size_hints_from_results (GetPropertyResults *results, return TRUE; } -gboolean -meta_prop_get_size_hints (MetaDisplay *display, - Window xwindow, - Atom xatom, - XSizeHints **hints_p, - gulong *flags_p) -{ - GetPropertyResults results; - - *hints_p = NULL; - *flags_p = 0; - - if (!get_property (display, xwindow, xatom, XA_WM_SIZE_HINTS, - &results)) - return FALSE; - - return size_hints_from_results (&results, hints_p, flags_p); -} - static AgGetPropertyTask* get_task (MetaDisplay *display, Window xwindow, diff --git a/src/include/xprops.h b/src/include/xprops.h index 3e6c7312..cb3f28d8 100644 --- a/src/include/xprops.h +++ b/src/include/xprops.h @@ -71,11 +71,6 @@ typedef struct { /* These all return the memory from Xlib, so require an XFree() * when they return TRUE. They return TRUE on success. */ -gboolean meta_prop_get_atom_list (MetaDisplay *display, - Window xwindow, - Atom xatom, - Atom **atoms_p, - int *n_atoms_p); gboolean meta_prop_get_motif_hints (MetaDisplay *display, Window xwindow, Atom xatom, @@ -89,10 +84,6 @@ gboolean meta_prop_get_latin1_string (MetaDisplay *display, Window xwindow, Atom xatom, char **str_p); -gboolean meta_prop_get_utf8_string (MetaDisplay *display, - Window xwindow, - Atom xatom, - char **str_p); gboolean meta_prop_get_utf8_list (MetaDisplay *display, Window xwindow, Atom xatom, @@ -116,26 +107,6 @@ gboolean meta_prop_get_cardinal_with_atom_type (MetaDisplay *display, Atom xatom, Atom prop_type, gulong *cardinal_p); -gboolean meta_prop_get_text_property (MetaDisplay *display, - Window xwindow, - Atom xatom, - char **utf8_str_p); - -gboolean meta_prop_get_wm_hints (MetaDisplay *display, - Window xwindow, - Atom xatom, - XWMHints **hints_p); - -gboolean meta_prop_get_class_hint (MetaDisplay *display, - Window xwindow, - Atom xatom, - XClassHint *class_hint); - -gboolean meta_prop_get_size_hints (MetaDisplay *display, - Window xwindow, - Atom xatom, - XSizeHints **hints_p, - gulong *flags_p); typedef enum { @@ -222,7 +193,3 @@ void meta_prop_free_values (MetaPropValue *values, int n_values); #endif - - - - -- cgit v1.2.1