|
marco 1.29.1
Window manager
|
#include <config.h>#include <glib/gi18n-lib.h>#include "xprops.h"#include "errors.h"#include "util.h"#include "async-getprop.h"#include "ui.h"#include "marco-Xatomtype.h"#include <X11/Xatom.h>#include <string.h>#include "window-private.h"Data Structures | |
| struct | GetPropertyResults |
Macros | |
| #define | MAX_ITEMS sizeof (MotifWmHints)/sizeof (gulong) |
| #define | cvtINT8toInt(val) (val) |
| #define | cvtINT16toInt(val) (val) |
| #define | cvtINT32toInt(val) (val) |
| #define | cvtINT8toShort(val) (val) |
| #define | cvtINT16toShort(val) (val) |
| #define | cvtINT32toShort(val) (val) |
| #define | cvtINT8toLong(val) (val) |
| #define | cvtINT16toLong(val) (val) |
| #define | cvtINT32toLong(val) (val) |
Functions | |
| static gboolean | validate_or_free_results (GetPropertyResults *results, int expected_format, Atom expected_type, gboolean must_have_items) |
| static gboolean | get_property (MetaDisplay *display, Window xwindow, Atom xatom, Atom req_type, GetPropertyResults *results) |
| static gboolean | atom_list_from_results (GetPropertyResults *results, Atom **atoms_p, int *n_atoms_p) |
| gboolean | meta_prop_get_atom_list (MetaDisplay *display, Window xwindow, Atom xatom, Atom **atoms_p, int *n_atoms_p) |
| static gboolean | cardinal_list_from_results (GetPropertyResults *results, gulong **cardinals_p, int *n_cardinals_p) |
| gboolean | meta_prop_get_cardinal_list (MetaDisplay *display, Window xwindow, Atom xatom, gulong **cardinals_p, int *n_cardinals_p) |
| static gboolean | motif_hints_from_results (GetPropertyResults *results, MotifWmHints **hints_p) |
| gboolean | meta_prop_get_motif_hints (MetaDisplay *display, Window xwindow, Atom xatom, MotifWmHints **hints_p) |
| static gboolean | latin1_string_from_results (GetPropertyResults *results, char **str_p) |
| gboolean | meta_prop_get_latin1_string (MetaDisplay *display, Window xwindow, Atom xatom, char **str_p) |
| static gboolean | utf8_string_from_results (GetPropertyResults *results, char **str_p) |
| gboolean | meta_prop_get_utf8_string (MetaDisplay *display, Window xwindow, Atom xatom, char **str_p) |
| static gboolean | utf8_list_from_results (GetPropertyResults *results, char ***str_p, int *n_str_p) |
| gboolean | meta_prop_get_utf8_list (MetaDisplay *display, Window xwindow, Atom xatom, char ***str_p, int *n_str_p) |
| void | meta_prop_set_utf8_string_hint (MetaDisplay *display, Window xwindow, Atom atom, const char *val) |
| static gboolean | window_from_results (GetPropertyResults *results, Window *window_p) |
| gboolean | meta_prop_get_window (MetaDisplay *display, Window xwindow, Atom xatom, Window *window_p) |
| gboolean | meta_prop_get_cardinal (MetaDisplay *display, Window xwindow, Atom xatom, gulong *cardinal_p) |
| static gboolean | cardinal_with_atom_type_from_results (GetPropertyResults *results, Atom prop_type, gulong *cardinal_p) |
| gboolean | meta_prop_get_cardinal_with_atom_type (MetaDisplay *display, Window xwindow, Atom xatom, Atom prop_type, gulong *cardinal_p) |
| static char * | text_property_to_utf8 (Display *xdisplay, const XTextProperty *prop) |
| static gboolean | text_property_from_results (GetPropertyResults *results, char **utf8_str_p) |
| gboolean | meta_prop_get_text_property (MetaDisplay *display, Window xwindow, Atom xatom, char **utf8_str_p) |
| static gboolean | wm_hints_from_results (GetPropertyResults *results, XWMHints **hints_p) |
| gboolean | meta_prop_get_wm_hints (MetaDisplay *display, Window xwindow, Atom xatom, XWMHints **hints_p) |
| static gboolean | class_hint_from_results (GetPropertyResults *results, XClassHint *class_hint) |
| gboolean | meta_prop_get_class_hint (MetaDisplay *display, Window xwindow, Atom xatom, XClassHint *class_hint) |
| static gboolean | size_hints_from_results (GetPropertyResults *results, XSizeHints **hints_p, gulong *flags_p) |
| gboolean | meta_prop_get_size_hints (MetaDisplay *display, Window xwindow, Atom xatom, XSizeHints **hints_p, gulong *flags_p) |
| static AgGetPropertyTask * | get_task (MetaDisplay *display, Window xwindow, Atom xatom, Atom req_type) |
| static char * | latin1_to_utf8 (const char *text) |
| void | meta_prop_get_values (MetaDisplay *display, Window xwindow, MetaPropValue *values, int n_values) |
| static void | free_value (MetaPropValue *value) |
| void | meta_prop_free_values (MetaPropValue *values, int n_values) |
| #define cvtINT16toInt | ( | val | ) | (val) |
| #define cvtINT16toLong | ( | val | ) | (val) |
| #define cvtINT16toShort | ( | val | ) | (val) |
| #define cvtINT32toInt | ( | val | ) | (val) |
| #define cvtINT32toLong | ( | val | ) | (val) |
| #define cvtINT32toShort | ( | val | ) | (val) |
| #define cvtINT8toInt | ( | val | ) | (val) |
| #define cvtINT8toLong | ( | val | ) | (val) |
| #define cvtINT8toShort | ( | val | ) | (val) |
| #define MAX_ITEMS sizeof (MotifWmHints)/sizeof (gulong) |
|
static |
References FALSE, GetPropertyResults::n_items, NULL, GetPropertyResults::prop, TRUE, and validate_or_free_results().
Referenced by meta_prop_get_atom_list(), and meta_prop_get_values().
|
static |
References FALSE, GetPropertyResults::n_items, NULL, GetPropertyResults::prop, TRUE, and validate_or_free_results().
Referenced by meta_prop_get_cardinal_list(), and meta_prop_get_values().
|
static |
References FALSE, NULL, GetPropertyResults::prop, TRUE, and validate_or_free_results().
Referenced by meta_prop_get_cardinal_with_atom_type(), and meta_prop_get_values().
|
static |
References ag_Xmalloc(), FALSE, GetPropertyResults::n_items, NULL, GetPropertyResults::prop, TRUE, and validate_or_free_results().
Referenced by meta_prop_get_class_hint(), and meta_prop_get_values().
|
static |
References MetaPropValue::atom_list, MetaPropValue::atoms, MetaPropValue::cardinal_list, MetaPropValue::cardinals, MetaPropValue::class_hint, MetaPropValue::hints, META_PROP_VALUE_ATOM_LIST, META_PROP_VALUE_CARDINAL, META_PROP_VALUE_CARDINAL_LIST, META_PROP_VALUE_CLASS_HINT, META_PROP_VALUE_INVALID, META_PROP_VALUE_MOTIF_HINTS, META_PROP_VALUE_SIZE_HINTS, META_PROP_VALUE_STRING, META_PROP_VALUE_STRING_AS_UTF8, META_PROP_VALUE_SYNC_COUNTER, META_PROP_VALUE_TEXT_PROPERTY, META_PROP_VALUE_UTF8, META_PROP_VALUE_UTF8_LIST, META_PROP_VALUE_WINDOW, META_PROP_VALUE_WM_HINTS, meta_XFree, MetaPropValue::motif_hints, MetaPropValue::size_hints, MetaPropValue::str, MetaPropValue::string_list, MetaPropValue::strings, MetaPropValue::type, MetaPropValue::v, and MetaPropValue::wm_hints.
Referenced by meta_prop_free_values().
|
static |
References GetPropertyResults::bytes_after, GetPropertyResults::display, FALSE, GetPropertyResults::format, meta_error_trap_pop_with_return(), meta_error_trap_push(), GetPropertyResults::n_items, NULL, GetPropertyResults::prop, TRUE, GetPropertyResults::type, GetPropertyResults::xatom, _MetaDisplay::xdisplay, and GetPropertyResults::xwindow.
Referenced by meta_prop_get_atom_list(), meta_prop_get_cardinal_list(), meta_prop_get_cardinal_with_atom_type(), meta_prop_get_class_hint(), meta_prop_get_latin1_string(), meta_prop_get_motif_hints(), meta_prop_get_size_hints(), meta_prop_get_text_property(), meta_prop_get_utf8_list(), meta_prop_get_utf8_string(), meta_prop_get_window(), and meta_prop_get_wm_hints().
|
static |
References ag_task_create(), and _MetaDisplay::xdisplay.
Referenced by meta_prop_get_values().
|
static |
References FALSE, NULL, GetPropertyResults::prop, TRUE, and validate_or_free_results().
Referenced by meta_prop_get_latin1_string(), and meta_prop_get_values().
|
static |
References FALSE.
Referenced by meta_prop_get_values().
| void meta_prop_free_values | ( | MetaPropValue * | values, |
| int | n_values | ||
| ) |
References free_value().
Referenced by meta_group_reload_properties(), and meta_window_reload_properties_from_xwindow().
| gboolean meta_prop_get_atom_list | ( | MetaDisplay * | display, |
| Window | xwindow, | ||
| Atom | xatom, | ||
| Atom ** | atoms_p, | ||
| int * | n_atoms_p | ||
| ) |
References atom_list_from_results(), FALSE, get_property(), and NULL.
Referenced by meta_window_update_net_wm_type().
| gboolean meta_prop_get_cardinal | ( | MetaDisplay * | display, |
| Window | xwindow, | ||
| Atom | xatom, | ||
| gulong * | cardinal_p | ||
| ) |
References meta_prop_get_cardinal_with_atom_type().
Referenced by meta_screen_new().
| gboolean meta_prop_get_cardinal_list | ( | MetaDisplay * | display, |
| Window | xwindow, | ||
| Atom | xatom, | ||
| gulong ** | cardinals_p, | ||
| int * | n_cardinals_p | ||
| ) |
References cardinal_list_from_results(), FALSE, get_property(), and NULL.
Referenced by meta_screen_update_workspace_layout(), meta_window_get_icon_geometry(), and meta_window_update_struts().
| gboolean meta_prop_get_cardinal_with_atom_type | ( | MetaDisplay * | display, |
| Window | xwindow, | ||
| Atom | xatom, | ||
| Atom | prop_type, | ||
| gulong * | cardinal_p | ||
| ) |
References cardinal_with_atom_type_from_results(), FALSE, and get_property().
Referenced by meta_prop_get_cardinal(), and meta_window_new_with_attrs().
| gboolean meta_prop_get_class_hint | ( | MetaDisplay * | display, |
| Window | xwindow, | ||
| Atom | xatom, | ||
| XClassHint * | class_hint | ||
| ) |
References class_hint_from_results(), FALSE, get_property(), and NULL.
| gboolean meta_prop_get_latin1_string | ( | MetaDisplay * | display, |
| Window | xwindow, | ||
| Atom | xatom, | ||
| char ** | str_p | ||
| ) |
References FALSE, get_property(), latin1_string_from_results(), and NULL.
Referenced by meta_window_update_role(), and update_sm_hints().
| gboolean meta_prop_get_motif_hints | ( | MetaDisplay * | display, |
| Window | xwindow, | ||
| Atom | xatom, | ||
| MotifWmHints ** | hints_p | ||
| ) |
References FALSE, get_property(), motif_hints_from_results(), and NULL.
Referenced by process_request_frame_extents().
| gboolean meta_prop_get_size_hints | ( | MetaDisplay * | display, |
| Window | xwindow, | ||
| Atom | xatom, | ||
| XSizeHints ** | hints_p, | ||
| gulong * | flags_p | ||
| ) |
References FALSE, get_property(), NULL, and size_hints_from_results().
| gboolean meta_prop_get_text_property | ( | MetaDisplay * | display, |
| Window | xwindow, | ||
| Atom | xatom, | ||
| char ** | utf8_str_p | ||
| ) |
References FALSE, get_property(), and text_property_from_results().
| gboolean meta_prop_get_utf8_list | ( | MetaDisplay * | display, |
| Window | xwindow, | ||
| Atom | xatom, | ||
| char *** | str_p, | ||
| int * | n_str_p | ||
| ) |
References FALSE, get_property(), NULL, and utf8_list_from_results().
Referenced by meta_screen_update_workspace_names().
| gboolean meta_prop_get_utf8_string | ( | MetaDisplay * | display, |
| Window | xwindow, | ||
| Atom | xatom, | ||
| char ** | str_p | ||
| ) |
References FALSE, get_property(), NULL, and utf8_string_from_results().
| void meta_prop_get_values | ( | MetaDisplay * | display, |
| Window | xwindow, | ||
| MetaPropValue * | values, | ||
| int | n_values | ||
| ) |
References ag_get_next_completed_task(), ag_task_get_reply_and_free(), ag_task_have_reply(), ag_Xmalloc(), MetaPropValue::atom, MetaPropValue::atom_list, atom_list_from_results(), MetaPropValue::atoms, GetPropertyResults::bytes_after, MetaPropValue::cardinal, MetaPropValue::cardinal_list, cardinal_list_from_results(), cardinal_with_atom_type_from_results(), MetaPropValue::cardinals, MetaPropValue::class_hint, class_hint_from_results(), GetPropertyResults::display, MetaPropValue::flags, GetPropertyResults::format, get_task(), MetaPropValue::hints, latin1_string_from_results(), latin1_to_utf8(), meta_bug(), META_DEBUG_SYNC, META_PROP_VALUE_ATOM_LIST, META_PROP_VALUE_CARDINAL, META_PROP_VALUE_CARDINAL_LIST, META_PROP_VALUE_CLASS_HINT, META_PROP_VALUE_INVALID, META_PROP_VALUE_MOTIF_HINTS, META_PROP_VALUE_SIZE_HINTS, META_PROP_VALUE_STRING, META_PROP_VALUE_STRING_AS_UTF8, META_PROP_VALUE_SYNC_COUNTER, META_PROP_VALUE_TEXT_PROPERTY, META_PROP_VALUE_UTF8, META_PROP_VALUE_UTF8_LIST, META_PROP_VALUE_WINDOW, META_PROP_VALUE_WM_HINTS, meta_XFree, MetaPropValue::motif_hints, motif_hints_from_results(), MetaPropValue::n_atoms, MetaPropValue::n_cardinals, GetPropertyResults::n_items, MetaPropValue::n_strings, NULL, GetPropertyResults::prop, MetaPropValue::required_type, MetaPropValue::size_hints, size_hints_from_results(), MetaPropValue::str, MetaPropValue::string_list, MetaPropValue::strings, text_property_from_results(), GetPropertyResults::type, MetaPropValue::type, utf8_list_from_results(), utf8_string_from_results(), MetaPropValue::v, window_from_results(), MetaPropValue::wm_hints, wm_hints_from_results(), GetPropertyResults::xatom, _MetaDisplay::xdisplay, GetPropertyResults::xwindow, and MetaPropValue::xwindow.
Referenced by meta_group_reload_properties(), and meta_window_reload_properties_from_xwindow().
| gboolean meta_prop_get_window | ( | MetaDisplay * | display, |
| Window | xwindow, | ||
| Atom | xatom, | ||
| Window * | window_p | ||
| ) |
References FALSE, get_property(), and window_from_results().
Referenced by read_client_leader().
| gboolean meta_prop_get_wm_hints | ( | MetaDisplay * | display, |
| Window | xwindow, | ||
| Atom | xatom, | ||
| XWMHints ** | hints_p | ||
| ) |
References FALSE, get_property(), NULL, and wm_hints_from_results().
| void meta_prop_set_utf8_string_hint | ( | MetaDisplay * | display, |
| Window | xwindow, | ||
| Atom | atom, | ||
| const char * | val | ||
| ) |
References FALSE, meta_error_trap_pop(), meta_error_trap_push(), and _MetaDisplay::xdisplay.
Referenced by meta_display_open(), and set_title_text().
|
static |
References ag_Xmalloc(), FALSE, MAX_ITEMS, GetPropertyResults::n_items, NULL, GetPropertyResults::prop, TRUE, and GetPropertyResults::type.
Referenced by meta_prop_get_motif_hints(), and meta_prop_get_values().
|
static |
References ag_Xmalloc(), xPropSizeHints::baseHeight, xPropSizeHints::baseWidth, cvtINT32toInt, FALSE, xPropSizeHints::flags, xPropSizeHints::height, xPropSizeHints::heightInc, xPropSizeHints::maxAspectX, xPropSizeHints::maxAspectY, xPropSizeHints::maxHeight, xPropSizeHints::maxWidth, xPropSizeHints::minAspectX, xPropSizeHints::minAspectY, xPropSizeHints::minHeight, xPropSizeHints::minWidth, GetPropertyResults::n_items, NULL, NumPropSizeElements, OldNumPropSizeElements, GetPropertyResults::prop, TRUE, validate_or_free_results(), xPropSizeHints::width, xPropSizeHints::widthInc, xPropSizeHints::winGravity, xPropSizeHints::x, and xPropSizeHints::y.
Referenced by meta_prop_get_size_hints(), and meta_prop_get_values().
|
static |
References GetPropertyResults::display, GetPropertyResults::format, GetPropertyResults::n_items, NULL, GetPropertyResults::prop, text_property_to_utf8(), GetPropertyResults::type, and _MetaDisplay::xdisplay.
Referenced by meta_prop_get_text_property(), and meta_prop_get_values().
|
static |
References NULL.
Referenced by text_property_from_results().
|
static |
References _, GetPropertyResults::display, FALSE, meta_error_trap_pop(), meta_error_trap_push(), meta_warning(), meta_XFree, GetPropertyResults::n_items, NULL, GetPropertyResults::prop, TRUE, validate_or_free_results(), GetPropertyResults::xatom, _MetaDisplay::xdisplay, and GetPropertyResults::xwindow.
Referenced by meta_prop_get_utf8_list(), and meta_prop_get_values().
|
static |
References _, GetPropertyResults::display, FALSE, meta_warning(), meta_XFree, GetPropertyResults::n_items, NULL, GetPropertyResults::prop, TRUE, validate_or_free_results(), GetPropertyResults::xatom, _MetaDisplay::xdisplay, and GetPropertyResults::xwindow.
Referenced by meta_prop_get_utf8_string(), and meta_prop_get_values().
|
static |
References _, GetPropertyResults::display, FALSE, GetPropertyResults::format, meta_display_lookup_x_window(), meta_error_trap_pop(), meta_error_trap_push(), meta_warning(), GetPropertyResults::n_items, NULL, GetPropertyResults::prop, _MetaWindow::res_class, _MetaWindow::res_name, _MetaWindow::title, TRUE, GetPropertyResults::type, GetPropertyResults::xatom, _MetaDisplay::xdisplay, and GetPropertyResults::xwindow.
Referenced by atom_list_from_results(), cardinal_list_from_results(), cardinal_with_atom_type_from_results(), class_hint_from_results(), latin1_string_from_results(), size_hints_from_results(), utf8_list_from_results(), utf8_string_from_results(), window_from_results(), and wm_hints_from_results().
|
static |
References FALSE, NULL, GetPropertyResults::prop, TRUE, and validate_or_free_results().
Referenced by meta_prop_get_values(), and meta_prop_get_window().
|
static |
References ag_Xmalloc0(), cvtINT32toInt, FALSE, xPropWMHints::flags, xPropWMHints::iconMask, xPropWMHints::iconPixmap, xPropWMHints::iconWindow, xPropWMHints::iconX, xPropWMHints::iconY, xPropWMHints::initialState, xPropWMHints::input, GetPropertyResults::n_items, NULL, NumPropWMHintsElements, GetPropertyResults::prop, TRUE, validate_or_free_results(), and xPropWMHints::windowGroup.
Referenced by meta_prop_get_values(), and meta_prop_get_wm_hints().