diff --git a/docs/reference/gdk/gdk3-sections.txt b/docs/reference/gdk/gdk3-sections.txt index 3da4afb53a..6769743c7b 100644 --- a/docs/reference/gdk/gdk3-sections.txt +++ b/docs/reference/gdk/gdk3-sections.txt @@ -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 -
-Input -input -gdk_input_add_full -GdkInputCondition -GdkInputFunction -gdk_input_add -gdk_input_remove - - -GDK_TYPE_INPUT_CONDITION -
Drag and Drop diff --git a/docs/reference/gdk/tmpl/input.sgml b/docs/reference/gdk/tmpl/input.sgml deleted file mode 100644 index 41377caaa6..0000000000 --- a/docs/reference/gdk/tmpl/input.sgml +++ /dev/null @@ -1,96 +0,0 @@ - -Input - - -Callbacks on file descriptors - - - -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 IO Channel -facility. - - - - - - - -GLib Main Loop -The main loop in which input callbacks run. - - - -IO Channels -A newer and more flexible way of doing IO -callbacks. - - - - - - - - - - - - - - -@source: -@condition: -@function: -@data: -@destroy: -@Returns: - - - - -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 -select system call. - - -@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. - - - -A callback function that will be called when some condition -occurs. - - -@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. - - - - - -@source: -@condition: -@function: -@data: -@Returns: - - - - -Remove a callback added with gdk_input_add() or -gdk_input_add_full(). - - -@tag: the tag returned when the callback was set up. - - diff --git a/gdk/gdk.h b/gdk/gdk.h index c41ed02ad1..199e567045 100644 --- 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, diff --git a/gdk/gdk.symbols b/gdk/gdk.symbols index 7deef6c508..3a5b9bb8d3 100644 --- a/gdk/gdk.symbols +++ b/gdk/gdk.symbols @@ -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 diff --git a/gdk/gdkevents.c b/gdk/gdkevents.c index 3914710f29..b87e319ceb 100644 --- a/gdk/gdkevents.c +++ b/gdk/gdkevents.c @@ -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, diff --git a/gdk/gdktypes.h b/gdk/gdktypes.h index 1329062641..c82c9f3cbf 100644 --- a/gdk/gdktypes.h +++ b/gdk/gdktypes.h @@ -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;