gimp r25883 - in branches/soc-2008-python: . plug-ins/pygimp
- From: larsc svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r25883 - in branches/soc-2008-python: . plug-ins/pygimp
- Date: Tue, 3 Jun 2008 00:13:12 +0000 (UTC)
Author: larsc
Date: Tue Jun 3 00:13:12 2008
New Revision: 25883
URL: http://svn.gnome.org/viewvc/gimp?rev=25883&view=rev
Log:
2008-06-03 Lars-Peter Clausen <lars metafoo de>
Added wrapper for GimpNumberPairEntry
* plug-ins/pygimp/gimpui.defs
* plug-ins/pygimp/gimpui.overridel
Modified:
branches/soc-2008-python/ChangeLog
branches/soc-2008-python/plug-ins/pygimp/gimpui.defs
branches/soc-2008-python/plug-ins/pygimp/gimpui.override
Modified: branches/soc-2008-python/plug-ins/pygimp/gimpui.defs
==============================================================================
--- branches/soc-2008-python/plug-ins/pygimp/gimpui.defs (original)
+++ branches/soc-2008-python/plug-ins/pygimp/gimpui.defs Tue Jun 3 00:13:12 2008
@@ -343,6 +343,13 @@
(gtype-id "GIMP_TYPE_IMAGE_COMBO_BOX")
)
+(define-object NumberPairEntry
+ (in-module "Gimp")
+ (parent "GtkEntry")
+ (c-name "GimpNumberPairEntry")
+ (gtype-id "GIMP_TYPE_NUMBER_PAIR_ENTRY")
+)
+
;; Enumerations and flags ...
(define-enum ChainPosition
@@ -3683,4 +3690,123 @@
(return-type "gdouble")
)
+;; From gimpnumberpairentry.h
+
+(define-function gimp_number_pair_entry_get_type
+ (c-name "gimp_number_pair_entry_get_type")
+ (return-type "GType")
+)
+
+(define-function gimp_number_pair_entry_new
+ (c-name "gimp_number_pair_entry_new")
+ (is-constructor-of "GimpNumberPairEntry")
+ (return-type "GtkWidget*")
+ (parameters
+ '("const-gchar*" "separators")
+ '("gboolean" "allow_simplification")
+ '("gdouble" "min_valid_value")
+ '("gdouble" "max_valid_value")
+ )
+)
+
+(define-method set_default_values
+ (of-object "GimpNumberPairEntry")
+ (c-name "gimp_number_pair_entry_set_default_values")
+ (return-type "none")
+ (parameters
+ '("gdouble" "left")
+ '("gdouble" "right")
+ )
+)
+
+(define-method get_default_values
+ (of-object "GimpNumberPairEntry")
+ (c-name "gimp_number_pair_entry_get_default_values")
+ (return-type "none")
+ (parameters
+ '("gdouble*" "left")
+ '("gdouble*" "right")
+ )
+)
+
+(define-method set_values
+ (of-object "GimpNumberPairEntry")
+ (c-name "gimp_number_pair_entry_set_values")
+ (return-type "none")
+ (parameters
+ '("gdouble" "left")
+ '("gdouble" "right")
+ )
+)
+
+(define-method get_values
+ (of-object "GimpNumberPairEntry")
+ (c-name "gimp_number_pair_entry_get_values")
+ (return-type "none")
+ (parameters
+ '("gdouble*" "left")
+ '("gdouble*" "right")
+ )
+)
+
+(define-method set_default_text
+ (of-object "GimpNumberPairEntry")
+ (c-name "gimp_number_pair_entry_set_default_text")
+ (return-type "none")
+ (parameters
+ '("const-gchar*" "string")
+ )
+)
+
+(define-method get_default_text
+ (of-object "GimpNumberPairEntry")
+ (c-name "gimp_number_pair_entry_get_default_text")
+ (return-type "const-gchar*")
+)
+
+(define-method set_ratio
+ (of-object "GimpNumberPairEntry")
+ (c-name "gimp_number_pair_entry_set_ratio")
+ (return-type "none")
+ (parameters
+ '("gdouble" "ratio")
+ )
+)
+
+(define-method get_ratio
+ (of-object "GimpNumberPairEntry")
+ (c-name "gimp_number_pair_entry_get_ratio")
+ (return-type "gdouble")
+)
+
+(define-method set_aspect
+ (of-object "GimpNumberPairEntry")
+ (c-name "gimp_number_pair_entry_set_aspect")
+ (return-type "none")
+ (parameters
+ '("GimpAspectType" "aspect")
+ )
+)
+
+(define-method get_aspect
+ (of-object "GimpNumberPairEntry")
+ (c-name "gimp_number_pair_entry_get_aspect")
+ (return-type "GimpAspectType")
+)
+
+(define-method set_user_override
+ (of-object "GimpNumberPairEntry")
+ (c-name "gimp_number_pair_entry_set_user_override")
+ (return-type "none")
+ (parameters
+ '("gboolean" "user_override")
+ )
+)
+
+(define-method get_user_override
+ (of-object "GimpNumberPairEntry")
+ (c-name "gimp_number_pair_entry_get_user_override")
+ (return-type "gboolean")
+)
+
Modified: branches/soc-2008-python/plug-ins/pygimp/gimpui.override
==============================================================================
--- branches/soc-2008-python/plug-ins/pygimp/gimpui.override (original)
+++ branches/soc-2008-python/plug-ins/pygimp/gimpui.override Tue Jun 3 00:13:12 2008
@@ -1287,3 +1287,65 @@
}
%%
new-constructor GIMP_TYPE_PROC_BROWSER_DIALOG
+%%
+override gimp_number_pair_entry_get_values noargs
+static PyObject*
+_wrap_gimp_number_pair_entry_get_values(PyGObject *self)
+{
+ gdouble left, right;
+
+ gimp_number_pair_entry_get_values(GIMP_NUMBER_PAIR_ENTRY(self->obj), &left, &right);
+
+ return Py_BuildValue("(dd)", left, right);
+}
+%%
+override gimp_number_pair_entry_get_default_values noargs
+static PyObject*
+_wrap_gimp_number_pair_entry_get_default_values(PyGObject *self)
+{
+ gdouble left, right;
+
+ gimp_number_pair_entry_get_default_values(GIMP_NUMBER_PAIR_ENTRY(self->obj), &left, &right);
+
+ return Py_BuildValue("(dd)", left, right);
+}
+%%
+override gimp_number_pair_entry_get_aspect noargs
+static PyObject*
+_wrap_gimp_number_pair_entry_get_aspect(PyGObject *self)
+{
+ GimpAspectType aspect;
+
+ aspect =
+ gimp_number_pair_entry_get_aspect(GIMP_NUMBER_PAIR_ENTRY(self->obj));
+
+ return pyg_enum_from_gtype(GIMP_TYPE_ASPECT_TYPE, aspect);
+}
+%%
+override gimp_number_pair_entry_set_aspect kwargs
+static PyObject*
+_wrap_gimp_number_pair_entry_set_aspect(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ PyObject *py_aspect;
+ GimpAspectType aspect;
+
+ static char *kwlist[] = {"aspect", NULL};
+
+ if(!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O:GimpNumberPairEntry.set_aspect",
+ kwlist, &py_aspect))
+ return NULL;
+
+ if(pyg_enum_get_value(GIMP_TYPE_ASPECT_TYPE, py_aspect, (gint*)&aspect))
+ {
+ Py_XDECREF(py_aspect);
+ return NULL;
+ }
+
+ gimp_number_pair_entry_set_aspect(GIMP_NUMBER_PAIR_ENTRY(self->obj), aspect);
+
+ Py_DECREF(py_aspect);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]