summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2017-10-30 09:47:26 -0400
committerMatthias Clasen <mclasen@redhat.com>2017-10-30 09:49:02 -0400
commit10ba84a6a92fa9000d7a9114f3721f6bc5a7cbf9 (patch)
tree32b89f749ea11a3f8e05ad25f0299ee0322d2014
parent7e8e4dcf76785c4193c660876846c077a226da80 (diff)
downloadgtk+-wip/matthiasc/gdk-settings.tar.gz
gdk: Drop settings eventswip/matthiasc/gdk-settings
We are not emitting these events anymore, so lets remove them from the api. The GdkSettingAction enum is moved to xsettings-client.c where its only use remains.
-rw-r--r--gdk/gdkevents.c30
-rw-r--r--gdk/gdkevents.h18
-rw-r--r--gdk/gdkeventsprivate.h22
-rw-r--r--gdk/x11/xsettings-client.c7
4 files changed, 7 insertions, 70 deletions
diff --git a/gdk/gdkevents.c b/gdk/gdkevents.c
index 63d17ea666..139ff481d1 100644
--- a/gdk/gdkevents.c
+++ b/gdk/gdkevents.c
@@ -694,10 +694,6 @@ gdk_event_copy (const GdkEvent *event)
new_event->expose.region = cairo_region_copy (event->expose.region);
break;
- case GDK_SETTING:
- new_event->setting.name = g_strdup (new_event->setting.name);
- break;
-
case GDK_BUTTON_PRESS:
case GDK_BUTTON_RELEASE:
if (event->button.axes)
@@ -814,10 +810,6 @@ gdk_event_free (GdkEvent *event)
g_free (event->motion.axes);
break;
- case GDK_SETTING:
- g_free (event->setting.name);
- break;
-
case GDK_OWNER_CHANGE:
if (event->owner_change.owner)
g_object_unref (event->owner_change.owner);
@@ -936,7 +928,6 @@ gdk_event_get_time (const GdkEvent *event)
case GDK_MAP:
case GDK_UNMAP:
case GDK_WINDOW_STATE:
- case GDK_SETTING:
case GDK_OWNER_CHANGE:
case GDK_GRAB_BROKEN:
case GDK_EVENT_LAST:
@@ -1023,7 +1014,6 @@ gdk_event_get_state (const GdkEvent *event,
case GDK_MAP:
case GDK_UNMAP:
case GDK_WINDOW_STATE:
- case GDK_SETTING:
case GDK_OWNER_CHANGE:
case GDK_GRAB_BROKEN:
case GDK_PAD_BUTTON_PRESS:
@@ -2524,26 +2514,6 @@ gdk_event_get_user_data (const GdkEvent *event)
return private->user_data;
}
-/**
- * gdk_event_get_setting:
- * @event: a #GdkEvent
- * @setting: (out) (transfer none):
- *
- * Returns: %TRUE on success, otherwise %FALSE
- **/
-gboolean
-gdk_event_get_setting (const GdkEvent *event,
- const char **setting)
-{
- if (event && event->type == GDK_SETTING)
- {
- *setting = event->setting.name;
- return TRUE;
- }
-
- return FALSE;
-}
-
gboolean
gdk_event_is_sent (const GdkEvent *event)
{
diff --git a/gdk/gdkevents.h b/gdk/gdkevents.h
index 0450ca536d..8bc08a242c 100644
--- a/gdk/gdkevents.h
+++ b/gdk/gdkevents.h
@@ -254,7 +254,6 @@ typedef GdkFilterReturn (*GdkFilterFunc) (GdkXEvent *xevent,
* @GDK_SCROLL: the scroll wheel was turned
* @GDK_WINDOW_STATE: the state of a window has changed. See #GdkWindowState
* for the possible window states
- * @GDK_SETTING: a setting has been modified.
* @GDK_OWNER_CHANGE: the owner of a selection has changed. This event type
* was added in 2.6
* @GDK_GRAB_BROKEN: a pointer or keyboard grab was broken. This event type
@@ -324,7 +323,6 @@ typedef enum
GDK_VISIBILITY_NOTIFY = 29,
GDK_SCROLL = 31,
GDK_WINDOW_STATE = 32,
- GDK_SETTING = 33,
GDK_OWNER_CHANGE = 34,
GDK_GRAB_BROKEN = 35,
GDK_DAMAGE = 36,
@@ -536,22 +534,6 @@ typedef enum
} GdkWindowState;
/**
- * GdkSettingAction:
- * @GDK_SETTING_ACTION_NEW: a setting was added.
- * @GDK_SETTING_ACTION_CHANGED: a setting was changed.
- * @GDK_SETTING_ACTION_DELETED: a setting was deleted.
- *
- * Specifies the kind of modification applied to a setting in a
- * #GdkEventSetting.
- */
-typedef enum
-{
- GDK_SETTING_ACTION_NEW,
- GDK_SETTING_ACTION_CHANGED,
- GDK_SETTING_ACTION_DELETED
-} GdkSettingAction;
-
-/**
* GdkOwnerChange:
* @GDK_OWNER_CHANGE_NEW_OWNER: some other app claimed the ownership
* @GDK_OWNER_CHANGE_DESTROY: the window was destroyed
diff --git a/gdk/gdkeventsprivate.h b/gdk/gdkeventsprivate.h
index fa98164d00..fb2c62a747 100644
--- a/gdk/gdkeventsprivate.h
+++ b/gdk/gdkeventsprivate.h
@@ -513,26 +513,6 @@ struct _GdkEventProximity
};
/**
- * GdkEventSetting:
- * @type: the type of the event (%GDK_SETTING).
- * @window: the window which received the event.
- * @send_event: %TRUE if the event was sent explicitly.
- * @action: what happened to the setting (%GDK_SETTING_ACTION_NEW,
- * %GDK_SETTING_ACTION_CHANGED or %GDK_SETTING_ACTION_DELETED).
- * @name: the name of the setting.
- *
- * Generated when a setting is modified.
- */
-struct _GdkEventSetting
-{
- GdkEventType type;
- GdkWindow *window;
- gint8 send_event;
- GdkSettingAction action;
- char *name;
-};
-
-/**
* GdkEventWindowState:
* @type: the type of the event (%GDK_WINDOW_STATE).
* @window: the window which received the event.
@@ -788,7 +768,6 @@ struct _GdkEventPadGroupMode {
* @proximity: a #GdkEventProximity
* @dnd: a #GdkEventDND
* @window_state: a #GdkEventWindowState
- * @setting: a #GdkEventSetting
* @grab_broken: a #GdkEventGrabBroken
* @touchpad_swipe: a #GdkEventTouchpadSwipe
* @touchpad_pinch: a #GdkEventTouchpadPinch
@@ -847,7 +826,6 @@ union _GdkEvent
GdkEventProximity proximity;
GdkEventDND dnd;
GdkEventWindowState window_state;
- GdkEventSetting setting;
GdkEventGrabBroken grab_broken;
GdkEventTouchpadSwipe touchpad_swipe;
GdkEventTouchpadPinch touchpad_pinch;
diff --git a/gdk/x11/xsettings-client.c b/gdk/x11/xsettings-client.c
index c52e8a0df7..02a954fdc9 100644
--- a/gdk/x11/xsettings-client.c
+++ b/gdk/x11/xsettings-client.c
@@ -39,6 +39,13 @@
#include <X11/Xlib.h>
#include <X11/Xmd.h> /* For CARD16 */
+typedef enum
+{
+ GDK_SETTING_ACTION_NEW,
+ GDK_SETTING_ACTION_CHANGED,
+ GDK_SETTING_ACTION_DELETED
+} GdkSettingAction;
+
#include "gdksettings.c"
/* Types of settings possible. Enum values correspond to