[gtk+/native-layout] Implement gtk_paned_get_handle_window
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/native-layout] Implement gtk_paned_get_handle_window
- Date: Sun, 4 Apr 2010 02:22:43 +0000 (UTC)
commit 21ef8f9ad9cd91cae93f6555da739824321a9e2c
Author: Christian Dywan <christian twotoasts de>
Date: Fri Jan 29 16:49:12 2010 +0100
Implement gtk_paned_get_handle_window
Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=607885
gtk/gtk.symbols | 1 +
gtk/gtkpaned.c | 21 +++++++++++++++++++++
gtk/gtkpaned.h | 2 ++
3 files changed, 24 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtk.symbols b/gtk/gtk.symbols
index c959c7f..00440e0 100644
--- a/gtk/gtk.symbols
+++ b/gtk/gtk.symbols
@@ -2771,6 +2771,7 @@ gtk_paned_add1
gtk_paned_add2
gtk_paned_get_child1
gtk_paned_get_child2
+gtk_paned_get_handle_window
gtk_paned_get_position
gtk_paned_get_type G_GNUC_CONST
gtk_paned_pack1
diff --git a/gtk/gtkpaned.c b/gtk/gtkpaned.c
index 1668182..428476f 100644
--- a/gtk/gtkpaned.c
+++ b/gtk/gtkpaned.c
@@ -2230,5 +2230,26 @@ gtk_paned_toggle_handle_focus (GtkPaned *paned)
return FALSE;
}
+/**
+ * gtk_paned_get_handle_window:
+ * @panede: a #GtkPaned
+ *
+ * Returns the #GdkWindow of the handle. This function is
+ * useful when handling button or motion events because it
+ * enables the callback to distinguish between the window
+ * of the paned, a child and the handle.
+ *
+ * Return value: the paned's handle window.
+ *
+ * Since: 2.20
+ **/
+GdkWindow *
+gtk_paned_get_handle_window (GtkPaned *paned)
+{
+ g_return_val_if_fail (GTK_IS_PANED (paned), NULL);
+
+ return paned->handle;
+}
+
#define __GTK_PANED_C__
#include "gtkaliasdef.c"
diff --git a/gtk/gtkpaned.h b/gtk/gtkpaned.h
index 178d6cf..1da08a8 100644
--- a/gtk/gtkpaned.h
+++ b/gtk/gtkpaned.h
@@ -127,6 +127,8 @@ void gtk_paned_set_position (GtkPaned *paned,
GtkWidget * gtk_paned_get_child1 (GtkPaned *paned);
GtkWidget * gtk_paned_get_child2 (GtkPaned *paned);
+GdkWindow * gtk_paned_get_handle_window (GtkPaned *paned);
+
#ifndef GTK_DISABLE_DEPRECATED
/* Internal function */
void gtk_paned_compute_position (GtkPaned *paned,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]