mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-27 06:00:22 +00:00
x11: Clean up xsettings header
- Don't use defines for renames - Move enum into only source file using it
This commit is contained in:
parent
e1efe3269c
commit
200d6fe664
@ -135,7 +135,7 @@ _gdk_x11_screen_events_uninit (GdkScreen *screen)
|
||||
|
||||
if (x11_screen->xsettings_client)
|
||||
{
|
||||
xsettings_client_destroy (x11_screen->xsettings_client);
|
||||
_gdk_x11_xsettings_client_destroy (x11_screen->xsettings_client);
|
||||
x11_screen->xsettings_client = NULL;
|
||||
}
|
||||
}
|
||||
@ -1336,7 +1336,7 @@ gdk_x11_screen_get_setting (GdkScreen *screen,
|
||||
GdkX11Screen *x11_screen = GDK_X11_SCREEN (screen);
|
||||
const GValue *setting;
|
||||
|
||||
setting = xsettings_client_get_setting (x11_screen->xsettings_client, name);
|
||||
setting = _gdk_x11_xsettings_client_get_setting (x11_screen->xsettings_client, name);
|
||||
if (setting == NULL)
|
||||
goto out;
|
||||
|
||||
@ -1557,7 +1557,7 @@ _gdk_x11_screen_init_events (GdkScreen *screen)
|
||||
/* Keep a flag to avoid extra notifies that we don't need
|
||||
*/
|
||||
x11_screen->xsettings_in_init = TRUE;
|
||||
x11_screen->xsettings_client = xsettings_client_new (screen);
|
||||
x11_screen->xsettings_client = _gdk_x11_xsettings_client_new (screen);
|
||||
x11_screen->xsettings_in_init = FALSE;
|
||||
}
|
||||
|
||||
|
@ -40,6 +40,16 @@
|
||||
|
||||
#include "gdksettings.c"
|
||||
|
||||
/* Types of settings possible. Enum values correspond to
|
||||
* protocol values.
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
XSETTINGS_TYPE_INT = 0,
|
||||
XSETTINGS_TYPE_STRING = 1,
|
||||
XSETTINGS_TYPE_COLOR = 2
|
||||
} XSettingsType;
|
||||
|
||||
typedef struct _XSettingsBuffer XSettingsBuffer;
|
||||
|
||||
struct _XSettingsBuffer
|
||||
@ -543,7 +553,7 @@ gdk_xsettings_manager_window_filter (GdkXEvent *xevent,
|
||||
}
|
||||
|
||||
XSettingsClient *
|
||||
xsettings_client_new (GdkScreen *screen)
|
||||
_gdk_x11_xsettings_client_new (GdkScreen *screen)
|
||||
{
|
||||
XSettingsClient *client;
|
||||
char *selection_atom_name;
|
||||
@ -568,7 +578,7 @@ xsettings_client_new (GdkScreen *screen)
|
||||
}
|
||||
|
||||
void
|
||||
xsettings_client_destroy (XSettingsClient *client)
|
||||
_gdk_x11_xsettings_client_destroy (XSettingsClient *client)
|
||||
{
|
||||
gdk_window_remove_filter (gdk_screen_get_root_window (client->screen), gdk_xsettings_root_window_filter, client->screen);
|
||||
if (client->manager_window)
|
||||
@ -583,8 +593,8 @@ xsettings_client_destroy (XSettingsClient *client)
|
||||
}
|
||||
|
||||
const GValue *
|
||||
xsettings_client_get_setting (XSettingsClient *client,
|
||||
const char *name)
|
||||
_gdk_x11_xsettings_client_get_setting (XSettingsClient *client,
|
||||
const char *name)
|
||||
{
|
||||
return g_hash_table_lookup (client->settings, name);
|
||||
}
|
||||
|
@ -25,27 +25,11 @@
|
||||
|
||||
#include <gdk/gdkscreen.h>
|
||||
|
||||
/* Renames for GDK inclusion */
|
||||
|
||||
#define xsettings_client_destroy _gdk_x11_xsettings_client_destroy
|
||||
#define xsettings_client_get_setting _gdk_x11_xsettings_client_get_setting
|
||||
#define xsettings_client_new _gdk_x11_xsettings_client_new
|
||||
|
||||
typedef struct _XSettingsClient XSettingsClient;
|
||||
|
||||
/* Types of settings possible. Enum values correspond to
|
||||
* protocol values.
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
XSETTINGS_TYPE_INT = 0,
|
||||
XSETTINGS_TYPE_STRING = 1,
|
||||
XSETTINGS_TYPE_COLOR = 2
|
||||
} XSettingsType;
|
||||
|
||||
XSettingsClient *xsettings_client_new (GdkScreen *screen);
|
||||
void xsettings_client_destroy (XSettingsClient *client);
|
||||
const GValue * xsettings_client_get_setting (XSettingsClient *client,
|
||||
const char *name);
|
||||
XSettingsClient *_gdk_x11_xsettings_client_new (GdkScreen *screen);
|
||||
void _gdk_x11_xsettings_client_destroy (XSettingsClient *client);
|
||||
const GValue * _gdk_x11_xsettings_client_get_setting (XSettingsClient *client,
|
||||
const char *name);
|
||||
|
||||
#endif /* XSETTINGS_CLIENT_H */
|
||||
|
Loading…
Reference in New Issue
Block a user