2006-10-01 22:30:10 +00:00
|
|
|
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
|
|
|
|
Comprehensively rename to Mutter
Code:
All references in the code not related to themes, keybindings, or
GConf were changed from 'metacity' to 'mutter'. This includes, among other
things, strings, comments, the atoms used in the message protocol, and
the envvars used for debugging. The GConf schema file was reduced to
the 3 settings new to mutter.
The overall version was brought up to 2.27 to match current gnome.
Structure:
All files named '*metacity*' were renamed '*mutter*' with appropriate
changes in the automake system. Files removed are
doc/creating_themes, src/themes, doc/metacity-theme.dtd,
metacity.doap. These files will eventually end up in an external
gnome-wm-data module.
Installation location:
On the filesystem the mutter-plugindir was change from
$(libdir)/metacity/plugins/clutter to just $(libdir)/mutter/plugins.
The mutter-plugins.pc.in reflects these changes.
Note:
mutter.desktop.in and mutter-wm.desktop both continue to have
X-GNOME-WMSettingsModule=metacity set. This allows
gnome-control-center to continue using libmetacity.so for
configuration. This is fine since most the general keybindings and wm
settings are being read from /apps/metacity/* in gconf.
2009-06-10 12:29:20 +02:00
|
|
|
/* Mutter X property convenience routines */
|
2002-01-04 00:58:39 +00:00
|
|
|
|
2014-05-02 09:34:02 -04:00
|
|
|
/*
|
2002-01-04 00:58:39 +00:00
|
|
|
* Copyright (C) 2001 Havoc Pennington
|
2014-05-02 09:34:02 -04:00
|
|
|
*
|
2002-01-04 00:58:39 +00:00
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License as
|
|
|
|
* published by the Free Software Foundation; either version 2 of the
|
|
|
|
* License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful, but
|
|
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* General Public License for more details.
|
2014-05-02 09:34:02 -04:00
|
|
|
*
|
2002-01-04 00:58:39 +00:00
|
|
|
* You should have received a copy of the GNU General Public License
|
2014-01-12 08:42:06 +07:00
|
|
|
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
2002-01-04 00:58:39 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef META_XPROPS_H
|
|
|
|
#define META_XPROPS_H
|
|
|
|
|
|
|
|
#include <X11/Xutil.h>
|
2008-05-19 00:00:09 +00:00
|
|
|
#include <X11/extensions/sync.h>
|
|
|
|
|
2018-07-10 10:36:24 +02:00
|
|
|
#include "meta/display.h"
|
2022-12-05 12:37:16 +01:00
|
|
|
#include "motif-wm-hints.h"
|
2002-01-04 00:58:39 +00:00
|
|
|
|
|
|
|
/* These all return the memory from Xlib, so require an XFree()
|
|
|
|
* when they return TRUE. They return TRUE on success.
|
|
|
|
*/
|
2017-08-26 20:51:28 +02:00
|
|
|
gboolean meta_prop_get_motif_hints (MetaX11Display *x11_display,
|
|
|
|
Window xwindow,
|
|
|
|
Atom xatom,
|
|
|
|
MotifWmHints **hints_p);
|
|
|
|
gboolean meta_prop_get_cardinal_list (MetaX11Display *x11_display,
|
|
|
|
Window xwindow,
|
|
|
|
Atom xatom,
|
|
|
|
uint32_t **cardinals_p,
|
|
|
|
int *n_cardinals_p);
|
|
|
|
gboolean meta_prop_get_latin1_string (MetaX11Display *x11_display,
|
|
|
|
Window xwindow,
|
|
|
|
Atom xatom,
|
|
|
|
char **str_p);
|
|
|
|
gboolean meta_prop_get_utf8_list (MetaX11Display *x11_display,
|
|
|
|
Window xwindow,
|
|
|
|
Atom xatom,
|
|
|
|
char ***str_p,
|
|
|
|
int *n_str_p);
|
2005-10-03 18:13:45 +00:00
|
|
|
void meta_prop_set_utf8_string_hint
|
2017-08-26 20:51:28 +02:00
|
|
|
(MetaX11Display *x11_display,
|
|
|
|
Window xwindow,
|
|
|
|
Atom atom,
|
|
|
|
const char *val);
|
|
|
|
gboolean meta_prop_get_window (MetaX11Display *x11_display,
|
|
|
|
Window xwindow,
|
|
|
|
Atom xatom,
|
|
|
|
Window *window_p);
|
|
|
|
gboolean meta_prop_get_cardinal (MetaX11Display *x11_display,
|
|
|
|
Window xwindow,
|
|
|
|
Atom xatom,
|
|
|
|
uint32_t *cardinal_p);
|
|
|
|
gboolean meta_prop_get_cardinal_with_atom_type (MetaX11Display *x11_display,
|
|
|
|
Window xwindow,
|
|
|
|
Atom xatom,
|
|
|
|
Atom prop_type,
|
|
|
|
uint32_t *cardinal_p);
|
2002-10-28 20:22:22 +00:00
|
|
|
|
2002-10-26 07:37:11 +00:00
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
META_PROP_VALUE_INVALID,
|
|
|
|
META_PROP_VALUE_UTF8,
|
|
|
|
META_PROP_VALUE_STRING,
|
2002-12-16 22:01:15 +00:00
|
|
|
META_PROP_VALUE_STRING_AS_UTF8,
|
2002-10-26 07:37:11 +00:00
|
|
|
META_PROP_VALUE_MOTIF_HINTS,
|
|
|
|
META_PROP_VALUE_CARDINAL,
|
|
|
|
META_PROP_VALUE_WINDOW,
|
|
|
|
META_PROP_VALUE_CARDINAL_LIST,
|
|
|
|
META_PROP_VALUE_UTF8_LIST,
|
2002-10-26 16:40:50 +00:00
|
|
|
META_PROP_VALUE_ATOM_LIST,
|
|
|
|
META_PROP_VALUE_TEXT_PROPERTY, /* comes back as UTF-8 string */
|
|
|
|
META_PROP_VALUE_WM_HINTS,
|
2002-10-28 20:22:22 +00:00
|
|
|
META_PROP_VALUE_CLASS_HINT,
|
2002-12-10 03:23:04 +00:00
|
|
|
META_PROP_VALUE_SIZE_HINTS,
|
2011-06-08 10:01:30 -04:00
|
|
|
META_PROP_VALUE_SYNC_COUNTER, /* comes back as CARDINAL */
|
|
|
|
META_PROP_VALUE_SYNC_COUNTER_LIST /* comes back as CARDINAL */
|
2002-10-26 07:37:11 +00:00
|
|
|
} MetaPropValueType;
|
|
|
|
|
|
|
|
/* used to request/return/store property values */
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
MetaPropValueType type;
|
|
|
|
Atom atom;
|
|
|
|
Atom required_type; /* autofilled if None */
|
2022-09-09 13:37:08 +02:00
|
|
|
Window source_xwindow;
|
2014-05-02 09:34:02 -04:00
|
|
|
|
2002-10-26 07:37:11 +00:00
|
|
|
union
|
|
|
|
{
|
|
|
|
char *str;
|
|
|
|
MotifWmHints *motif_hints;
|
|
|
|
Window xwindow;
|
2015-06-23 15:32:07 -07:00
|
|
|
uint32_t cardinal;
|
2002-10-26 16:40:50 +00:00
|
|
|
XWMHints *wm_hints;
|
|
|
|
XClassHint class_hint;
|
2002-12-10 03:23:04 +00:00
|
|
|
XSyncCounter xcounter;
|
2011-06-08 10:01:30 -04:00
|
|
|
struct
|
|
|
|
{
|
2015-06-23 15:09:07 -07:00
|
|
|
uint32_t *counters;
|
|
|
|
int n_counters;
|
2011-06-08 10:01:30 -04:00
|
|
|
} xcounter_list;
|
2014-05-02 09:34:02 -04:00
|
|
|
|
2002-10-28 20:22:22 +00:00
|
|
|
struct
|
|
|
|
{
|
|
|
|
XSizeHints *hints;
|
|
|
|
unsigned long flags;
|
|
|
|
} size_hints;
|
2014-05-02 09:34:02 -04:00
|
|
|
|
2002-10-26 07:37:11 +00:00
|
|
|
struct
|
|
|
|
{
|
2015-06-23 15:09:07 -07:00
|
|
|
uint32_t *cardinals;
|
|
|
|
int n_cardinals;
|
2002-10-26 07:37:11 +00:00
|
|
|
} cardinal_list;
|
|
|
|
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
char **strings;
|
|
|
|
int n_strings;
|
|
|
|
} string_list;
|
|
|
|
|
|
|
|
struct
|
|
|
|
{
|
2015-06-23 15:33:58 -07:00
|
|
|
uint32_t *atoms;
|
|
|
|
int n_atoms;
|
2002-10-26 07:37:11 +00:00
|
|
|
} atom_list;
|
2014-05-02 09:34:02 -04:00
|
|
|
|
2002-10-26 07:37:11 +00:00
|
|
|
} v;
|
|
|
|
|
|
|
|
} MetaPropValue;
|
|
|
|
|
|
|
|
/* Each value has type and atom initialized. If there's an error,
|
|
|
|
* or property is unset, type comes back as INVALID;
|
|
|
|
* else type comes back as it originated, and the data
|
|
|
|
* is filled in.
|
|
|
|
*/
|
2017-08-26 20:51:28 +02:00
|
|
|
void meta_prop_get_values (MetaX11Display *x11_display,
|
|
|
|
Window xwindow,
|
|
|
|
MetaPropValue *values,
|
|
|
|
int n_values);
|
2002-10-26 07:37:11 +00:00
|
|
|
|
2002-11-03 23:42:21 +00:00
|
|
|
void meta_prop_free_values (MetaPropValue *values,
|
|
|
|
int n_values);
|
|
|
|
|
2002-01-04 00:58:39 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|