[gtk+/wip/matthiasc/gdk-settings: 12/12] gdk: Drop settings events



commit 10ba84a6a92fa9000d7a9114f3721f6bc5a7cbf9
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Oct 30 09:47:26 2017 -0400

    gdk: Drop settings events
    
    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.

 gdk/gdkevents.c            |   30 ------------------------------
 gdk/gdkevents.h            |   18 ------------------
 gdk/gdkeventsprivate.h     |   22 ----------------------
 gdk/x11/xsettings-client.c |    7 +++++++
 4 files changed, 7 insertions(+), 70 deletions(-)
---
diff --git a/gdk/gdkevents.c b/gdk/gdkevents.c
index 63d17ea..139ff48 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 0450ca5..8bc08a2 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 fa98164..fb2c62a 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 c52e8a0..02a954f 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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]