pygimp: add wrapper for GimpUnit, GimpUnitComboBox

This commit is contained in:
Nils Philippsen 2010-10-15 17:23:01 +02:00
parent b07eed8208
commit bc265758b0
1 changed files with 60 additions and 0 deletions

View File

@ -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