mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-28 14:31:10 +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)
|
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;
|
x11_screen->xsettings_client = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1336,7 +1336,7 @@ gdk_x11_screen_get_setting (GdkScreen *screen,
|
|||||||
GdkX11Screen *x11_screen = GDK_X11_SCREEN (screen);
|
GdkX11Screen *x11_screen = GDK_X11_SCREEN (screen);
|
||||||
const GValue *setting;
|
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)
|
if (setting == NULL)
|
||||||
goto out;
|
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
|
/* Keep a flag to avoid extra notifies that we don't need
|
||||||
*/
|
*/
|
||||||
x11_screen->xsettings_in_init = TRUE;
|
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;
|
x11_screen->xsettings_in_init = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,6 +40,16 @@
|
|||||||
|
|
||||||
#include "gdksettings.c"
|
#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;
|
typedef struct _XSettingsBuffer XSettingsBuffer;
|
||||||
|
|
||||||
struct _XSettingsBuffer
|
struct _XSettingsBuffer
|
||||||
@ -543,7 +553,7 @@ gdk_xsettings_manager_window_filter (GdkXEvent *xevent,
|
|||||||
}
|
}
|
||||||
|
|
||||||
XSettingsClient *
|
XSettingsClient *
|
||||||
xsettings_client_new (GdkScreen *screen)
|
_gdk_x11_xsettings_client_new (GdkScreen *screen)
|
||||||
{
|
{
|
||||||
XSettingsClient *client;
|
XSettingsClient *client;
|
||||||
char *selection_atom_name;
|
char *selection_atom_name;
|
||||||
@ -568,7 +578,7 @@ xsettings_client_new (GdkScreen *screen)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
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);
|
gdk_window_remove_filter (gdk_screen_get_root_window (client->screen), gdk_xsettings_root_window_filter, client->screen);
|
||||||
if (client->manager_window)
|
if (client->manager_window)
|
||||||
@ -583,8 +593,8 @@ xsettings_client_destroy (XSettingsClient *client)
|
|||||||
}
|
}
|
||||||
|
|
||||||
const GValue *
|
const GValue *
|
||||||
xsettings_client_get_setting (XSettingsClient *client,
|
_gdk_x11_xsettings_client_get_setting (XSettingsClient *client,
|
||||||
const char *name)
|
const char *name)
|
||||||
{
|
{
|
||||||
return g_hash_table_lookup (client->settings, name);
|
return g_hash_table_lookup (client->settings, name);
|
||||||
}
|
}
|
||||||
|
@ -25,27 +25,11 @@
|
|||||||
|
|
||||||
#include <gdk/gdkscreen.h>
|
#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;
|
typedef struct _XSettingsClient XSettingsClient;
|
||||||
|
|
||||||
/* Types of settings possible. Enum values correspond to
|
XSettingsClient *_gdk_x11_xsettings_client_new (GdkScreen *screen);
|
||||||
* protocol values.
|
void _gdk_x11_xsettings_client_destroy (XSettingsClient *client);
|
||||||
*/
|
const GValue * _gdk_x11_xsettings_client_get_setting (XSettingsClient *client,
|
||||||
typedef enum
|
const char *name);
|
||||||
{
|
|
||||||
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);
|
|
||||||
|
|
||||||
#endif /* XSETTINGS_CLIENT_H */
|
#endif /* XSETTINGS_CLIENT_H */
|
||||||
|
Loading…
Reference in New Issue
Block a user