diff options
-rw-r--r-- | ChangeLog | 13 | ||||
-rw-r--r-- | pango-types.defs | 8 | ||||
-rw-r--r-- | pango.defs | 5 | ||||
-rw-r--r-- | pango.override | 84 |
4 files changed, 110 insertions, 0 deletions
@@ -1,3 +1,16 @@ +2004-12-04 John Finlay <finlay@moeraki.com> + + * pango-types.defs (LayoutIter): Add. + + * pango.defs (pango_layout_iter_get_type): Add. + + * pango.override (_wrap_pango_layout_iter_get_line_yrange) + (_wrap_pango_layout_iter_get_layout_extents) + (_wrap_pango_layout_iter_get_run_extents) + (_wrap_pango_layout_iter_get_line_extents) + (_wrap_pango_layout_iter_get_cluster_extents) + (_wrap_pango_layout_iter_get_char_extents): Implement. + 2004-12-04 Gustavo J. A. M. Carneiro <gustavo@users.sourceforge.net> * gtk/gtk.defs: Remove gtk_file_chooser_button_[gs]et_active wrappers. diff --git a/pango-types.defs b/pango-types.defs index 72b78656..9076b2b3 100644 --- a/pango-types.defs +++ b/pango-types.defs @@ -116,6 +116,14 @@ (gtype-id "PANGO_TYPE_LANGUAGE") ) +(define-boxed LayoutIter + (in-module "Pango") + (c-name "PangoLayoutIter") + (gtype-id "PANGO_TYPE_LAYOUT_ITER") + (release-func "pango_layout_iter_free") +) + + (define-boxed TabArray (in-module "Pango") (c-name "PangoTabArray") @@ -1566,6 +1566,11 @@ ) ) +(define-function pango_layout_iter_get_type + (c-name "pango_layout_iter_get_type") + (return-type "GType") +) + (define-method get_iter (of-object "PangoLayout") (c-name "pango_layout_get_iter") diff --git a/pango.override b/pango.override index 01ef10ed..4ece5380 100644 --- a/pango.override +++ b/pango.override @@ -1722,3 +1722,87 @@ _wrap_pango_language_matches1(PyGObject *self, PyObject *args, return PyBool_FromLong(pango_language_matches(language, range_list)); } +%% +override pango_layout_iter_get_char_extents noargs +static PyObject * +_wrap_pango_layout_iter_get_char_extents(PyGObject *self) +{ + PangoRectangle logical_rect; + + pango_layout_iter_get_char_extents(pyg_boxed_get(self, PangoLayoutIter), + &logical_rect); + return Py_BuildValue("(iiii)", + logical_rect.x, logical_rect.y, + logical_rect.width, logical_rect.height); +} +%% +override pango_layout_iter_get_cluster_extents noargs +static PyObject * +_wrap_pango_layout_iter_get_cluster_extents(PyGObject *self) +{ + PangoRectangle ink_rect, logical_rect; + + pango_layout_iter_get_cluster_extents(pyg_boxed_get(self, PangoLayoutIter), + &ink_rect, &logical_rect); + return Py_BuildValue("((iiii)(iiii))", + ink_rect.x, ink_rect.y, + ink_rect.width, ink_rect.height, + logical_rect.x, logical_rect.y, + logical_rect.width, logical_rect.height); +} +%% +override pango_layout_iter_get_line_extents noargs +static PyObject * +_wrap_pango_layout_iter_get_line_extents(PyGObject *self) +{ + PangoRectangle ink_rect, logical_rect; + + pango_layout_iter_get_line_extents(pyg_boxed_get(self, PangoLayoutIter), + &ink_rect, &logical_rect); + return Py_BuildValue("((iiii)(iiii))", + ink_rect.x, ink_rect.y, + ink_rect.width, ink_rect.height, + logical_rect.x, logical_rect.y, + logical_rect.width, logical_rect.height); +} +%% +override pango_layout_iter_get_run_extents noargs +static PyObject * +_wrap_pango_layout_iter_get_run_extents(PyGObject *self) +{ + PangoRectangle ink_rect, logical_rect; + + pango_layout_iter_get_run_extents(pyg_boxed_get(self, PangoLayoutIter), + &ink_rect, &logical_rect); + return Py_BuildValue("((iiii)(iiii))", + ink_rect.x, ink_rect.y, + ink_rect.width, ink_rect.height, + logical_rect.x, logical_rect.y, + logical_rect.width, logical_rect.height); +} +%% +override pango_layout_iter_get_layout_extents noargs +static PyObject * +_wrap_pango_layout_iter_get_layout_extents(PyGObject *self) +{ + PangoRectangle ink_rect, logical_rect; + + pango_layout_iter_get_layout_extents(pyg_boxed_get(self, PangoLayoutIter), + &ink_rect, &logical_rect); + return Py_BuildValue("((iiii)(iiii))", + ink_rect.x, ink_rect.y, + ink_rect.width, ink_rect.height, + logical_rect.x, logical_rect.y, + logical_rect.width, logical_rect.height); +} +%% +override pango_layout_iter_get_line_yrange noargs +static PyObject * +_wrap_pango_layout_iter_get_line_yrange(PyGObject *self) +{ + int start, end; + + pango_layout_iter_get_line_yrange(pyg_boxed_get(self, PangoLayoutIter), + &start, &end); + return Py_BuildValue("(ii)", start, end); +} |