[pygtk] Add GTK-2.24 API
- From: John Stowers <jstowers src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygtk] Add GTK-2.24 API
- Date: Mon, 21 Feb 2011 20:19:49 +0000 (UTC)
commit b7da0c1a662049a60555851fd6901296941db645
Author: John Stowers <john stowers gmail com>
Date: Tue Feb 22 09:02:26 2011 +1300
Add GTK-2.24 API
NEWS | 1 +
gtk/gtk-2.24-types.defs | 6 ++
gtk/gtk-2.24.defs | 132 +++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 139 insertions(+), 0 deletions(-)
---
diff --git a/NEWS b/NEWS
index 4adf614..afff759 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,7 @@ pygtk-2.24.0
- gtk.gdk.GC.set_clip_mask() should accept None (Dieter, #638994)
- gtk.AboutDialog.set_program_name() should accept None (Dieter)
- Add "import gtk; gtk.require('2.0')" statements to the examples (Dieter)
+ - Add GTK-2.24 API (John Stowers)
pygtk-2.22.0 25-Sep-2010
- Fix build with Python 2.5 (Chenthill)
diff --git a/gtk/gtk-2.24-types.defs b/gtk/gtk-2.24-types.defs
index e69de29..51f5859 100644
--- a/gtk/gtk-2.24-types.defs
+++ b/gtk/gtk-2.24-types.defs
@@ -0,0 +1,6 @@
+(define-object ComboBoxText
+ (in-module "Gtk")
+ (parent "GtkComboBox")
+ (c-name "GtkComboBoxText")
+ (gtype-id "GTK_TYPE_COMBO_BOX_TEXT")
+)
diff --git a/gtk/gtk-2.24.defs b/gtk/gtk-2.24.defs
index e69de29..2fc4599 100644
--- a/gtk/gtk-2.24.defs
+++ b/gtk/gtk-2.24.defs
@@ -0,0 +1,132 @@
+;; From gtkcombobox.h
+
+(define-function combo_box_new_with_entry
+ (c-name "gtk_combo_box_new_with_entry")
+ (return-type "GtkWidget*")
+)
+
+(define-function combo_box_new_with_model_and_entry
+ (c-name "gtk_combo_box_new_with_model_and_entry")
+ (return-type "GtkWidget*")
+ (parameters
+ '("GtkTreeModel*" "model")
+ )
+)
+
+(define-method get_has_entry
+ (of-object "GtkComboBox")
+ (c-name "gtk_combo_box_get_has_entry")
+ (return-type "gboolean")
+)
+
+(define-method set_entry_text_column
+ (of-object "GtkComboBox")
+ (c-name "gtk_combo_box_set_entry_text_column")
+ (return-type "none")
+ (parameters
+ '("gint" "text_column")
+ )
+)
+
+(define-method get_entry_text_column
+ (of-object "GtkComboBox")
+ (c-name "gtk_combo_box_get_entry_text_column")
+ (return-type "gint")
+)
+
+
+
+;; From gtkcomboboxtext.h
+
+(define-function combo_box_text_get_type
+ (c-name "gtk_combo_box_text_get_type")
+ (return-type "GType")
+)
+
+(define-function combo_box_text_new
+ (c-name "gtk_combo_box_text_new")
+ (is-constructor-of "GtkComboBoxText")
+ (return-type "GtkWidget*")
+)
+
+(define-function combo_box_text_new_with_entry
+ (c-name "gtk_combo_box_text_new_with_entry")
+ (return-type "GtkWidget*")
+)
+
+(define-method append_text
+ (of-object "GtkComboBoxText")
+ (c-name "gtk_combo_box_text_append_text")
+ (return-type "none")
+ (parameters
+ '("const-gchar*" "text")
+ )
+)
+
+(define-method insert_text
+ (of-object "GtkComboBoxText")
+ (c-name "gtk_combo_box_text_insert_text")
+ (return-type "none")
+ (parameters
+ '("gint" "position")
+ '("const-gchar*" "text")
+ )
+)
+
+(define-method prepend_text
+ (of-object "GtkComboBoxText")
+ (c-name "gtk_combo_box_text_prepend_text")
+ (return-type "none")
+ (parameters
+ '("const-gchar*" "text")
+ )
+)
+
+(define-method remove
+ (of-object "GtkComboBoxText")
+ (c-name "gtk_combo_box_text_remove")
+ (return-type "none")
+ (parameters
+ '("gint" "position")
+ )
+)
+
+(define-method get_active_text
+ (of-object "GtkComboBoxText")
+ (c-name "gtk_combo_box_text_get_active_text")
+ (return-type "gchar*")
+)
+
+;; From gtknotebook.h
+
+(define-method set_group_name
+ (of-object "GtkNotebook")
+ (c-name "gtk_notebook_set_group_name")
+ (return-type "none")
+ (parameters
+ '("const-gchar*" "group_name")
+ )
+)
+
+(define-method get_group_name
+ (of-object "GtkNotebook")
+ (c-name "gtk_notebook_get_group_name")
+ (return-type "const-gchar*")
+)
+
+;; From gtkrange.h
+
+(define-method set_round_digits
+ (of-object "GtkRange")
+ (c-name "gtk_range_set_round_digits")
+ (return-type "none")
+ (parameters
+ '("gint" "round_digits")
+ )
+)
+
+(define-method get_round_digits
+ (of-object "GtkRange")
+ (c-name "gtk_range_get_round_digits")
+ (return-type "gint")
+)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]