]> Pileus Git - ~andy/gtk/commitdiff
Remove gdk_input_* callbacks on file descriptors deprecated functions
authorJavier Jardón <jjardon@gnome.org>
Sat, 19 Jun 2010 22:46:38 +0000 (00:46 +0200)
committerJavier Jardón <jjardon@gnome.org>
Sat, 19 Jun 2010 22:46:38 +0000 (00:46 +0200)
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=619687

docs/reference/gdk/gdk3-sections.txt
docs/reference/gdk/tmpl/input.sgml [deleted file]
gdk/gdk.h
gdk/gdk.symbols
gdk/gdkevents.c
gdk/gdktypes.h

index 3da4afb53ae7ca58b99f1feceb20037a09e4abe2..6769743c7b5191c62528fb55c689b87ef0dd1a16 100644 (file)
@@ -81,7 +81,6 @@ gdk_grab_ownership_get_type
 gdk_grab_status_get_type
 gdk_gravity_get_type
 gdk_image_type_get_type
-gdk_input_condition_get_type
 gdk_input_mode_get_type
 gdk_input_source_get_type
 gdk_join_style_get_type
@@ -1221,18 +1220,6 @@ GDK_TYPE_CURSOR
 gdk_cursor_get_type
 </SECTION>
 
-<SECTION>
-<TITLE>Input</TITLE>
-<FILE>input</FILE>
-gdk_input_add_full
-GdkInputCondition
-GdkInputFunction
-gdk_input_add
-gdk_input_remove
-
-<SUBSECTION Standard>
-GDK_TYPE_INPUT_CONDITION
-</SECTION>
 
 <SECTION>
 <TITLE>Drag and Drop</TITLE>
diff --git a/docs/reference/gdk/tmpl/input.sgml b/docs/reference/gdk/tmpl/input.sgml
deleted file mode 100644 (file)
index 41377ca..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-<!-- ##### SECTION Title ##### -->
-Input
-
-<!-- ##### SECTION Short_Description ##### -->
-Callbacks on file descriptors
-
-<!-- ##### SECTION Long_Description ##### -->
-<para>
-The functions in this section are used to establish
-callbacks when some condition becomes true for
-a file descriptor. They are currently just wrappers around
-the <link linkend="glib-IO-Channels">IO Channel</link>
-facility.
-</para>
-
-<!-- ##### SECTION See_Also ##### -->
-<para>
-<variablelist>
-
-<varlistentry>
-<term><link linkend="glib-The-Main-Event-Loop">GLib Main Loop</link></term>
-<listitem><para>The main loop in which input callbacks run.</para></listitem>
-</varlistentry>
-
-<varlistentry>
-<term><link linkend="glib-IO-Channels">IO Channels</link></term>
-<listitem><para>A newer and more flexible way of doing IO
-callbacks.</para></listitem>
-</varlistentry>
-
-</variablelist>
-</para>
-
-<!-- ##### SECTION Stability_Level ##### -->
-
-
-<!-- ##### SECTION Image ##### -->
-
-
-<!-- ##### FUNCTION gdk_input_add_full ##### -->
-
-
-@source: 
-@condition: 
-@function: 
-@data: 
-@destroy: 
-@Returns: 
-
-
-<!-- ##### ENUM GdkInputCondition ##### -->
-<para>
-A set of bit flags used to specify conditions for which
-an input callback will be triggered. The three members
-of this enumeration correspond to the @readfds, 
-@writefds, and @exceptfds arguments to the 
-<function>select</function> system call.
-</para>
-
-@GDK_INPUT_READ: the file descriptor has become available for reading.
-(Or, as is standard in Unix, a socket or pipe was closed
-at the other end; this is the case if a subsequent read
-on the file descriptor returns a count of zero.)
-@GDK_INPUT_WRITE: the file descriptor has become available for writing.
-@GDK_INPUT_EXCEPTION: an exception was raised on the file descriptor.
-
-<!-- ##### USER_FUNCTION GdkInputFunction ##### -->
-<para>
-A callback function that will be called when some condition
-occurs.
-</para>
-
-@data: the user data passed to gdk_input_add() or gdk_input_add_full().
-@source: the source where the condition occurred.
-@condition: the triggering condition.
-
-
-<!-- ##### FUNCTION gdk_input_add ##### -->
-
-
-@source: 
-@condition: 
-@function: 
-@data: 
-@Returns: 
-
-
-<!-- ##### FUNCTION gdk_input_remove ##### -->
-<para>
-Remove a callback added with gdk_input_add() or 
-gdk_input_add_full().
-</para>
-
-@tag: the tag returned when the callback was set up.
-
-
index c41ed02ad1b03a9e95580a06f0c0ee0b1a704d3b..199e5670458417151aaa4d2ac39e8a8a2b0317d5 100644 (file)
--- a/gdk/gdk.h
+++ b/gdk/gdk.h
@@ -91,22 +91,6 @@ gint      gdk_error_trap_pop            (void);
 gchar*                   gdk_get_display               (void);
 G_CONST_RETURN gchar*    gdk_get_display_arg_name      (void);
 
-#if !defined (GDK_DISABLE_DEPRECATED) || defined (GTK_COMPILATION)
-/* Used by gtk_input_add_full () */
-gint gdk_input_add_full          (gint              source,
-                          GdkInputCondition condition,
-                          GdkInputFunction  function,
-                          gpointer          data,
-                          GDestroyNotify    destroy);
-#endif /* !GDK_DISABLE_DEPRECATED || GTK_COMPILATION */
-#ifndef GDK_DISABLE_DEPRECATED
-gint gdk_input_add       (gint              source,
-                          GdkInputCondition condition,
-                          GdkInputFunction  function,
-                          gpointer          data);
-void gdk_input_remove    (gint              tag);
-#endif /* GDK_DISABLE_DEPRECATED */
-
 #ifndef GDK_MULTIDEVICE_SAFE
 GdkGrabStatus gdk_pointer_grab       (GdkWindow    *window,
                                      gboolean      owner_events,
index 7deef6c5089292613885e3a4666e47f41662e4e2..3a5b9bb8d3a5bcf15dccf641b9cca05a4cb1cefb 100644 (file)
@@ -194,16 +194,6 @@ gdk_threads_add_timeout_seconds_full
 #endif
 #endif
 
-#if IN_HEADER(__GDK_H__)
-#if IN_FILE(__GDK_EVENTS_C__)
-#ifndef GDK_DISABLE_DEPRECATED
-gdk_input_add
-gdk_input_remove
-gdk_input_add_full
-#endif
-#endif
-#endif
-
 #if IN_HEADER(__GDK_H__)
 #if IN_FILE(__GDK_SCREEN_C__)
 gdk_screen_width G_GNUC_CONST
@@ -258,7 +248,6 @@ gdk_utf8_to_compound_text_for_display
 gdk_rgb_dither_get_type G_GNUC_CONST
 gdk_drag_protocol_get_type G_GNUC_CONST
 gdk_input_source_get_type G_GNUC_CONST
-gdk_input_condition_get_type G_GNUC_CONST
 gdk_input_mode_get_type G_GNUC_CONST
 gdk_axis_use_get_type G_GNUC_CONST
 gdk_byte_order_get_type G_GNUC_CONST
index 3914710f29aef21234d60e1a81fb76225cce3696..b87e319ceb65cba306e779d47f51253d9823a27c 100644 (file)
@@ -36,8 +36,6 @@ typedef struct _GdkIOClosure GdkIOClosure;
 
 struct _GdkIOClosure
 {
-  GdkInputFunction function;
-  GdkInputCondition condition;
   GDestroyNotify notify;
   gpointer data;
 };
@@ -1313,124 +1311,12 @@ gdk_get_show_events (void)
   return (_gdk_debug_flags & GDK_DEBUG_EVENTS) != 0;
 }
 
-static void
-gdk_io_destroy (gpointer data)
-{
-  GdkIOClosure *closure = data;
-
-  if (closure->notify)
-    closure->notify (closure->data);
-
-  g_free (closure);
-}
-
 /* What do we do with G_IO_NVAL?
  */
 #define READ_CONDITION (G_IO_IN | G_IO_HUP | G_IO_ERR)
 #define WRITE_CONDITION (G_IO_OUT | G_IO_ERR)
 #define EXCEPTION_CONDITION (G_IO_PRI)
 
-static gboolean  
-gdk_io_invoke (GIOChannel   *source,
-              GIOCondition  condition,
-              gpointer      data)
-{
-  GdkIOClosure *closure = data;
-  GdkInputCondition gdk_cond = 0;
-
-  if (condition & READ_CONDITION)
-    gdk_cond |= GDK_INPUT_READ;
-  if (condition & WRITE_CONDITION)
-    gdk_cond |= GDK_INPUT_WRITE;
-  if (condition & EXCEPTION_CONDITION)
-    gdk_cond |= GDK_INPUT_EXCEPTION;
-
-  if (closure->condition & gdk_cond)
-    closure->function (closure->data, g_io_channel_unix_get_fd (source), gdk_cond);
-
-  return TRUE;
-}
-
-/**
- * gdk_input_add_full:
- * @source: a file descriptor.
- * @condition: the condition.
- * @function: the callback function.
- * @data: callback data passed to @function.
- * @destroy: callback function to call with @data when the input
- * handler is removed.
- *
- * Establish a callback when a condition becomes true on
- * a file descriptor.
- *
- * Returns: a tag that can later be used as an argument to
- * gdk_input_remove().
- *
- * Deprecated: 2.14: Use g_io_add_watch_full() on a #GIOChannel
- */
-gint
-gdk_input_add_full (gint             source,
-                   GdkInputCondition condition,
-                   GdkInputFunction  function,
-                   gpointer          data,
-                   GDestroyNotify    destroy)
-{
-  guint result;
-  GdkIOClosure *closure = g_new (GdkIOClosure, 1);
-  GIOChannel *channel;
-  GIOCondition cond = 0;
-
-  closure->function = function;
-  closure->condition = condition;
-  closure->notify = destroy;
-  closure->data = data;
-
-  if (condition & GDK_INPUT_READ)
-    cond |= READ_CONDITION;
-  if (condition & GDK_INPUT_WRITE)
-    cond |= WRITE_CONDITION;
-  if (condition & GDK_INPUT_EXCEPTION)
-    cond |= EXCEPTION_CONDITION;
-
-  channel = g_io_channel_unix_new (source);
-  result = g_io_add_watch_full (channel, G_PRIORITY_DEFAULT, cond, 
-                               gdk_io_invoke,
-                               closure, gdk_io_destroy);
-  g_io_channel_unref (channel);
-
-  return result;
-}
-
-/**
- * gdk_input_add:
- * @source: a file descriptor.
- * @condition: the condition.
- * @function: the callback function.
- * @data: callback data passed to @function.
- *
- * Establish a callback when a condition becomes true on
- * a file descriptor.
- *
- * Returns: a tag that can later be used as an argument to
- * gdk_input_remove().
- *
- * Deprecated: 2.14: Use g_io_add_watch() on a #GIOChannel
- */
-gint
-gdk_input_add (gint             source,
-              GdkInputCondition condition,
-              GdkInputFunction  function,
-              gpointer          data)
-{
-  return gdk_input_add_full (source, condition, function, data, NULL);
-}
-
-void
-gdk_input_remove (gint tag)
-{
-  g_source_remove (tag);
-}
-
 static void
 gdk_synthesize_click (GdkDisplay *display,
                      GdkEvent   *event,
index 13290626411e6e44e021ccb424c093f2b249a6f2..c82c9f3cbf5a43b5c1949383af3d505a755f5ac6 100644 (file)
@@ -200,13 +200,6 @@ typedef enum
   GDK_MODIFIER_MASK = 0x5c001fff
 } GdkModifierType;
 
-typedef enum
-{
-  GDK_INPUT_READ       = 1 << 0,
-  GDK_INPUT_WRITE      = 1 << 1,
-  GDK_INPUT_EXCEPTION  = 1 << 2
-} GdkInputCondition;
-
 typedef enum
 {
   GDK_OK         = 0,
@@ -273,10 +266,6 @@ typedef enum
   GDK_ALL_EVENTS_MASK           = 0x3FFFFE
 } GdkEventMask;
 
-typedef void (*GdkInputFunction) (gpointer         data,
-                                 gint              source,
-                                 GdkInputCondition condition);
-
 struct _GdkPoint
 {
   gint x;