[gimp] pygimp: add wrapper for GimpUnit, GimpUnitComboBox
- From: Nils Philippsen <nphilipp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] pygimp: add wrapper for GimpUnit, GimpUnitComboBox
- Date: Fri, 15 Oct 2010 15:27:31 +0000 (UTC)
commit bc265758b0ac4a17696075a81e040156b7fee8b1
Author: Nils Philippsen <nils redhat com>
Date: Fri Oct 15 17:23:01 2010 +0200
pygimp: add wrapper for GimpUnit, GimpUnitComboBox
plug-ins/pygimp/gimpui.defs | 60 +++++++++++++++++++++++++++++++++++++++++++
1 files changed, 60 insertions(+), 0 deletions(-)
---
diff --git a/plug-ins/pygimp/gimpui.defs b/plug-ins/pygimp/gimpui.defs
index f691de9..98716a1 100644
--- a/plug-ins/pygimp/gimpui.defs
+++ b/plug-ins/pygimp/gimpui.defs
@@ -357,6 +357,13 @@
(gtype-id "GIMP_TYPE_STRING_COMBO_BOX")
)
+(define-object UnitComboBox
+ (in-module "Gimp")
+ (parent "GtkComboBox")
+ (c-name "GimpUnitComboBox")
+ (gtype-id "GIMP_TYPE_UNIT_COMBO_BOX")
+)
+
(define-object UnitMenu
(in-module "Gimp")
(parent "GtkOptionMenu")
@@ -471,6 +478,20 @@
)
)
+(define-enum Unit
+ (in-module "Gimp")
+ (c-name "GimpUnit")
+;; FIXME: make GimpUnit enum more binding-friendly -- gimp_unit_get_type()
+;; (gtype-id "GIMP_TYPE_UNIT")
+ (values
+ '("pixel" "GIMP_UNIT_PIXEL")
+ '("inch" "GIMP_UNIT_INCH")
+ '("mm" "GIMP_UNIT_MM")
+ '("point" "GIMP_UNIT_POINT")
+ '("pica" "GIMP_UNIT_PICA")
+ )
+)
+
(define-enum ZoomType
(in-module "Gimp")
(c-name "GimpZoomType")
@@ -2598,6 +2619,45 @@
+;; From gimpunitcombobox.h
+
+(define-function gimp_unit_combo_box_get_type
+ (c-name "gimp_unit_combo_box_get_type")
+ (return-type "GType")
+)
+
+(define-function gimp_unit_combo_box_new
+ (c-name "gimp_unit_combo_box_new")
+ (is-constructor-of "GimpUnitComboBox")
+ (return-type "GtkWidget*")
+)
+
+(define-function gimp_unit_combo_box_new_with_model
+ (c-name "gimp_unit_combo_box_new_with_model")
+ (is-constructor-of "GimpUnitComboBox")
+ (return-type "GtkWidget*")
+ (properties
+ '("model" (optional))
+ )
+)
+
+(define-method get_active
+ (of-object "GimpUnitComboBox")
+ (c-name "gimp_unit_combo_box_get_active")
+ (return-type "GimpUnit")
+)
+
+(define-method set_active
+ (of-object "GimpUnitComboBox")
+ (c-name "gimp_unit_combo_box_set_active")
+ (return-type "none")
+ (parameters
+ '("GimpUnit" "unit")
+ )
+)
+
+
+
;; From gimpunitmenu.h
(define-function gimp_unit_menu_get_type
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]