Commit bc265758 authored by Nils Philippsen's avatar Nils Philippsen

pygimp: add wrapper for GimpUnit, GimpUnitComboBox

parent b07eed82
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment