[gtk+] GtkComboBox: Add private api to get the popup
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] GtkComboBox: Add private api to get the popup
- Date: Tue, 10 Jun 2014 12:54:28 +0000 (UTC)
commit ec9cf6d7c3626ce78e2dfe0fac77549308be68c2
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Jun 10 08:47:27 2014 -0400
GtkComboBox: Add private api to get the popup
This will be used to make the popup appear in the inspector.
gtk/Makefile.am | 1 +
gtk/gtkcombobox.c | 10 ++++++++++
gtk/gtkcomboboxprivate.h | 29 +++++++++++++++++++++++++++++
3 files changed, 40 insertions(+), 0 deletions(-)
---
diff --git a/gtk/Makefile.am b/gtk/Makefile.am
index d9f372d..e3cc5de 100644
--- a/gtk/Makefile.am
+++ b/gtk/Makefile.am
@@ -521,6 +521,7 @@ gtk_private_h_sources = \
gtkcolorplaneprivate.h \
gtkcolorscaleprivate.h \
gtkcolorchooserprivate.h \
+ gtkcomboboxprivate.h \
gtkcontainerprivate.h \
gtkcssanimationprivate.h \
gtkcssarrayvalueprivate.h \
diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c
index 0e8e75c..baeb30d 100644
--- a/gtk/gtkcombobox.c
+++ b/gtk/gtkcombobox.c
@@ -44,6 +44,7 @@
#include "gtkwindow.h"
#include "gtktypebuiltins.h"
#include "gtkprivate.h"
+#include "gtkcomboboxprivate.h"
#include <gobject/gvaluecollector.h>
@@ -5919,3 +5920,12 @@ gtk_combo_box_set_active_id (GtkComboBox *combo_box,
return match;
}
+
+GtkWidget *
+gtk_combo_box_get_popup (GtkComboBox *combo)
+{
+ if (combo->priv->popup_window)
+ return combo->priv->popup_window;
+ else
+ return combo->priv->popup_widget;
+}
diff --git a/gtk/gtkcomboboxprivate.h b/gtk/gtkcomboboxprivate.h
new file mode 100644
index 0000000..6af67e0
--- /dev/null
+++ b/gtk/gtkcomboboxprivate.h
@@ -0,0 +1,29 @@
+/* GTK - The GIMP Toolkit
+ * Copyright (C) 2014 Red Hat, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __GTK_COMBO_BOX_PRIVATE_H__
+#define __GTK_COMBO_BOX_PRIVATE_H__
+
+#include "gtkcombobox.h"
+
+G_BEGIN_DECLS
+
+GtkWidget *gtk_combo_box_get_popup (GtkComboBox *combo_box);
+
+G_END_DECLS
+
+#endif /* __GTK_COMBO_BOX_PRIVATE_H__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]