gimp r26814 - in trunk: . plug-ins/pygimp
- From: larsc svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r26814 - in trunk: . plug-ins/pygimp
- Date: Fri, 29 Aug 2008 11:09:35 +0000 (UTC)
Author: larsc
Date: Fri Aug 29 11:09:35 2008
New Revision: 26814
URL: http://svn.gnome.org/viewvc/gimp?rev=26814&view=rev
Log:
2008-08-29 Lars-Peter Clausen <lars metafoo de>
* plug-ins/pygimp/gimpui.defs
* plug-ins/pygimp/gimpui.override:
Readded wrapper for the new GimpRuler.
Modified:
trunk/ChangeLog
trunk/plug-ins/pygimp/gimpui.defs
trunk/plug-ins/pygimp/gimpui.override
Modified: trunk/plug-ins/pygimp/gimpui.defs
==============================================================================
--- trunk/plug-ins/pygimp/gimpui.defs (original)
+++ trunk/plug-ins/pygimp/gimpui.defs Fri Aug 29 11:09:35 2008
@@ -336,6 +336,13 @@
(gtype-id "GIMP_TYPE_BRUSH_SELECT_BUTTON")
)
+(define-object Ruler
+ (in-module "Gimp")
+ (parent "GtkWidget")
+ (c-name "GimpRuler")
+ (gtype-id "GIMP_TYPE_RULER")
+)
+
(define-object SizeEntry
(in-module "Gimp")
(parent "GtkTable")
@@ -3220,3 +3227,78 @@
(c-name "gimp_zoom_type_get_type")
(return-type "GType")
)
+
+
+
+;; From gimpruler.h
+
+(define-function gimp_ruler_get_type
+ (c-name "gimp_ruler_get_type")
+ (return-type "GType")
+)
+
+(define-function gimp_ruler_new
+ (c-name "gimp_ruler_new")
+ (is-constructor-of "GimpRuler")
+ (return-type "GtkWidget*")
+ (properties
+ '("orientation")
+ '("lower" (optional))
+ '("upper" (optional))
+ '("max-size" (argname "max_size") (optional))
+ )
+)
+
+(define-method set_unit
+ (of-object "GimpRuler")
+ (c-name "gimp_ruler_set_unit")
+ (return-type "none")
+ (parameters
+ '("GimpUnit" "unit")
+ )
+)
+
+(define-method get_unit
+ (of-object "GimpRuler")
+ (c-name "gimp_ruler_get_unit")
+ (return-type "GimpUnit")
+)
+
+(define-method set_position
+ (of-object "GimpRuler")
+ (c-name "gimp_ruler_set_position")
+ (return-type "none")
+ (parameters
+ '("gdouble" "position")
+ )
+)
+
+(define-method get_position
+ (of-object "GimpRuler")
+ (c-name "gimp_ruler_get_position")
+ (return-type "gdouble")
+)
+
+(define-method set_range
+ (of-object "GimpRuler")
+ (c-name "gimp_ruler_set_range")
+ (return-type "none")
+ (parameters
+ '("gdouble" "lower")
+ '("gdouble" "upper")
+ '("gdouble" "max_size")
+ )
+)
+
+(define-method get_range
+ (of-object "GimpRuler")
+ (c-name "gimp_ruler_get_range")
+ (return-type "none")
+ (parameters
+ '("gdouble*" "lower")
+ '("gdouble*" "upper")
+ '("gdouble*" "max_size")
+ )
+)
+
+
Modified: trunk/plug-ins/pygimp/gimpui.override
==============================================================================
--- trunk/plug-ins/pygimp/gimpui.override (original)
+++ trunk/plug-ins/pygimp/gimpui.override Fri Aug 29 11:09:35 2008
@@ -1977,3 +1977,14 @@
%%
new-constructor GIMP_TYPE_DRAWABLE_PREVIEW
+%%
+override gimp_ruler_get_range noargs
+static PyObject *
+_wrap_gimp_ruler_get_range(PyGObject *self)
+{
+ gdouble lower, upper, max_size;
+
+ gimp_ruler_get_range(GIMP_RULER(self->obj), &lower, &upper, &max_size);
+
+ return Py_BuildValue("(ddd)", lower, upper, max_size);
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]