[gtk-doc] scan(g)obj: remove special case handling for GdkEvent



commit 23e5c3c5c7b80e27321925507e089fa9b3f7a364
Author: Stefan Kost <ensonic users sf net>
Date:   Wed Oct 20 11:51:43 2010 +0300

    scan(g)obj: remove special case handling for GdkEvent
    
    Remove get_gdk_event() as those things should be just properly documented in the
    library. Fixes #631336

 gtkdoc-scangobj.in |   64 +---------------------------------------------------
 gtkdoc-scanobj.in  |   64 +---------------------------------------------------
 2 files changed, 2 insertions(+), 126 deletions(-)
---
diff --git a/gtkdoc-scangobj.in b/gtkdoc-scangobj.in
index fa9d224..7947f8d 100644
--- a/gtkdoc-scangobj.in
+++ b/gtkdoc-scangobj.in
@@ -208,8 +208,6 @@ static void output_object_signal (FILE *fp,
 				  guint signal_id);
 static const gchar * get_type_name (GType type,
 			            gboolean * is_pointer);
-static const gchar * get_gdk_event (const gchar * signal_name);
-
 static void output_object_hierarchy (void);
 static void output_hierarchy (FILE *fp,
 			      GType type,
@@ -368,21 +366,13 @@ output_object_signal (FILE *fp,
       type_name = get_type_name (query_info.param_types[param] & ~G_SIGNAL_TYPE_STATIC_SCOPE, &is_pointer);
 
       /* Most arguments to the callback are called "arg1", "arg2", etc.
-         GdkWidgets are called "widget", "widget2", ...
-         GdkEvents are called "event", "event2", ...
+         GtkWidgets are called "widget", "widget2", ...
          GtkCallbacks are called "callback", "callback2", ... */
       if (!strcmp (type_name, "GtkWidget"))
         {
           arg_name = "widget";
           arg_num = &widget_num;
         }
-      else if (!strcmp (type_name, "GdkEvent"))
-        {
-          type_name = get_gdk_event (signal_name);
-          arg_name = "event";
-          arg_num = &event_num;
-          is_pointer = TRUE;
-        }
       else if (!strcmp (type_name, "GtkCallback")
                || !strcmp (type_name, "GtkCCallback"))
         {
@@ -525,58 +515,6 @@ default:
 }
 
 
-static const gchar *
-get_gdk_event (const gchar * signal_name)
-{
-  static const gchar *GbGDKEvents[] =
-  {
-    "button_press_event", "GdkEventButton",
-    "button_release_event", "GdkEventButton",
-    "motion_notify_event", "GdkEventMotion",
-    "delete_event", "GdkEvent",
-    "destroy_event", "GdkEvent",
-    "expose_event", "GdkEventExpose",
-    "key_press_event", "GdkEventKey",
-    "key_release_event", "GdkEventKey",
-    "enter_notify_event", "GdkEventCrossing",
-    "leave_notify_event", "GdkEventCrossing",
-    "configure_event", "GdkEventConfigure",
-    "focus_in_event", "GdkEventFocus",
-    "focus_out_event", "GdkEventFocus",
-    "map_event", "GdkEvent",
-    "unmap_event", "GdkEvent",
-    "property_notify_event", "GdkEventProperty",
-    "selection_clear_event", "GdkEventSelection",
-    "selection_request_event", "GdkEventSelection",
-    "selection_notify_event", "GdkEventSelection",
-    "proximity_in_event", "GdkEventProximity",
-    "proximity_out_event", "GdkEventProximity",
-    "drag_begin_event", "GdkEventDragBegin",
-    "drag_request_event", "GdkEventDragRequest",
-    "drag_end_event", "GdkEventDragRequest",
-    "drop_enter_event", "GdkEventDropEnter",
-    "drop_leave_event", "GdkEventDropLeave",
-    "drop_data_available_event", "GdkEventDropDataAvailable",
-    "other_event", "GdkEventOther",
-    "client_event", "GdkEventClient",
-    "no_expose_event", "GdkEventNoExpose",
-    "visibility_notify_event", "GdkEventVisibility",
-    "window_state_event", "GdkEventWindowState",
-    "scroll_event", "GdkEventScroll",
-    NULL
-  };
-
-  gint i;
-
-  for (i = 0; GbGDKEvents[i]; i += 2)
-    {
-      if (!strcmp (signal_name, GbGDKEvents[i]))
-	return GbGDKEvents[i + 1];
-    }
-  return "GdkEvent";
-}
-
-
 /* This outputs the hierarchy of all objects which have been initialized,
    i.e. by calling their XXX_get_type() initialization function. */
 static void
diff --git a/gtkdoc-scanobj.in b/gtkdoc-scanobj.in
index 2ce25d6..312cbf0 100755
--- a/gtkdoc-scanobj.in
+++ b/gtkdoc-scanobj.in
@@ -147,8 +147,6 @@ static void output_widget_signal (FILE *fp,
 				  guint signal_id);
 static gchar * get_type_name (GtkType type,
 			      gboolean * is_pointer);
-static gchar * get_gdk_event (const gchar * signal_name);
-
 static void output_widget_hierarchy (void);
 static void output_hierarchy (FILE *fp,
 			      GtkType type,
@@ -301,21 +299,13 @@ output_widget_signal (FILE *fp,
       type_name = get_type_name (query_info->params[param], &is_pointer);
 
       /* Most arguments to the callback are called "arg1", "arg2", etc.
-         GdkWidgets are called "widget", "widget2", ...
-         GdkEvents are called "event", "event2", ...
+         GtkWidgets are called "widget", "widget2", ...
          GtkCallbacks are called "callback", "callback2", ... */
       if (!strcmp (type_name, "GtkWidget"))
         {
           arg_name = "widget";
           arg_num = &widget_num;
         }
-      else if (!strcmp (type_name, "GdkEvent"))
-        {
-          type_name = get_gdk_event (signal_name);
-          arg_name = "event";
-          arg_num = &event_num;
-          is_pointer = TRUE;
-        }
       else if (!strcmp (type_name, "GtkCallback")
                || !strcmp (type_name, "GtkCCallback"))
         {
@@ -415,58 +405,6 @@ get_type_name (GtkType type, gboolean * is_pointer)
 }
 
 
-static gchar *
-get_gdk_event (const gchar * signal_name)
-{
-  static gchar *GbGDKEvents[] =
-  {
-    "button_press_event", "GdkEventButton",
-    "button_release_event", "GdkEventButton",
-    "motion_notify_event", "GdkEventMotion",
-    "delete_event", "GdkEvent",
-    "destroy_event", "GdkEvent",
-    "expose_event", "GdkEventExpose",
-    "key_press_event", "GdkEventKey",
-    "key_release_event", "GdkEventKey",
-    "enter_notify_event", "GdkEventCrossing",
-    "leave_notify_event", "GdkEventCrossing",
-    "configure_event", "GdkEventConfigure",
-    "focus_in_event", "GdkEventFocus",
-    "focus_out_event", "GdkEventFocus",
-    "map_event", "GdkEvent",
-    "unmap_event", "GdkEvent",
-    "property_notify_event", "GdkEventProperty",
-    "selection_clear_event", "GdkEventSelection",
-    "selection_request_event", "GdkEventSelection",
-    "selection_notify_event", "GdkEventSelection",
-    "proximity_in_event", "GdkEventProximity",
-    "proximity_out_event", "GdkEventProximity",
-    "drag_begin_event", "GdkEventDragBegin",
-    "drag_request_event", "GdkEventDragRequest",
-    "drag_end_event", "GdkEventDragRequest",
-    "drop_enter_event", "GdkEventDropEnter",
-    "drop_leave_event", "GdkEventDropLeave",
-    "drop_data_available_event", "GdkEventDropDataAvailable",
-    "other_event", "GdkEventOther",
-    "client_event", "GdkEventClient",
-    "no_expose_event", "GdkEventNoExpose",
-    "visibility_notify_event", "GdkEventVisibility",
-    "window_state_event", "GdkEventWindowState",
-    "scroll_event", "GdkEventScroll",
-    NULL
-  };
-
-  gint i;
-
-  for (i = 0; GbGDKEvents[i]; i += 2)
-    {
-      if (!strcmp (signal_name, GbGDKEvents[i]))
-	return GbGDKEvents[i + 1];
-    }
-  return "GdkEvent";
-}
-
-
 /* This outputs the hierarchy of all widgets which have been initialized,
    i.e. by calling their XXX_get_type() initialization function. */
 static void



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