[gtk+] Remove gdk_input_* callbacks on file descriptors deprecated functions
- From: Javier Jardón <jjardon src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Remove gdk_input_* callbacks on file descriptors deprecated functions
- Date: Sat, 19 Jun 2010 22:51:56 +0000 (UTC)
commit 349f8c561d7003cc05cfda982d8f3abba4a2f3b0
Author: Javier Jardón <jjardon gnome org>
Date: Sun Jun 20 00:46:38 2010 +0200
Remove gdk_input_* callbacks on file descriptors deprecated functions
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=619687
docs/reference/gdk/gdk3-sections.txt | 13 ----
docs/reference/gdk/tmpl/input.sgml | 96 ----------------------------
gdk/gdk.h | 16 -----
gdk/gdk.symbols | 11 ---
gdk/gdkevents.c | 114 ----------------------------------
gdk/gdktypes.h | 11 ---
6 files changed, 0 insertions(+), 261 deletions(-)
---
diff --git a/docs/reference/gdk/gdk3-sections.txt b/docs/reference/gdk/gdk3-sections.txt
index 3da4afb..6769743 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
</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/gdk/gdk.h b/gdk/gdk.h
index c41ed02..199e567 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 7deef6c..3a5b9bb 100644
--- a/gdk/gdk.symbols
+++ b/gdk/gdk.symbols
@@ -195,16 +195,6 @@ gdk_threads_add_timeout_seconds_full
#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
gdk_screen_width_mm 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 3914710..b87e319 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 1329062..c82c9f3 100644
--- a/gdk/gdktypes.h
+++ b/gdk/gdktypes.h
@@ -202,13 +202,6 @@ typedef enum
typedef enum
{
- GDK_INPUT_READ = 1 << 0,
- GDK_INPUT_WRITE = 1 << 1,
- GDK_INPUT_EXCEPTION = 1 << 2
-} GdkInputCondition;
-
-typedef enum
-{
GDK_OK = 0,
GDK_ERROR = -1,
GDK_ERROR_PARAM = -2,
@@ -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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]