1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
|
/*
* Copyright (c) 2003 by the gtk2-perl team (see the file AUTHORS)
*
* Licensed under the LGPL, see LICENSE file for more information.
*
* $Header: /cvsroot/gtk2-perl/gtk2-perl-xs/Gtk2/xs/PangoTabs.xs,v 1.10 2004/02/18 20:17:31 rwmcfa1 Exp $
*/
#include "gtk2perl.h"
MODULE = Gtk2::Pango::TabArray PACKAGE = Gtk2::Pango::TabArray PREFIX = pango_tab_array_
## PangoTabArray *pango_tab_array_new (gint initial_size, gboolean positions_in_pixels)
### PangoTabArray *pango_tab_array_new_with_positions (gint size, gboolean positions_in_pixels, PangoTabAlign first_alignment, gint first_position, ...)
=for apidoc Gtk2::Pango::TabArray::new
=for arg ... pairs of Gtk2::PangoTabAlign's and integers, the alignments and positions of the tab stops.
=cut
=for apidoc new_with_positions
=for arg ... pairs of Gtk2::PangoTabAlign's and integers, the alignments and positions of the tab stops.
Alias for L<new|tabarray = Gtk2::Pango::TabArray-E<gt>new ($initial_size, $positions_in_pixels, ...)>.
=cut
PangoTabArray_own *
pango_tab_array_new (class, initial_size, positions_in_pixels, ...)
gint initial_size
gboolean positions_in_pixels
ALIAS:
new_with_positions = 1
CODE:
PERL_UNUSED_VAR (ix);
RETVAL = pango_tab_array_new (initial_size, positions_in_pixels);
if (items > 3) {
int i;
for (i = 3 ; i < items ; i += 2) {
pango_tab_array_set_tab (RETVAL, (i - 3) / 2,
SvPangoTabAlign (ST (i)),
SvIV (ST (i+1)));
}
}
OUTPUT:
RETVAL
## see Glib::Boxed
## PangoTabArray *pango_tab_array_copy (PangoTabArray *src)
## void pango_tab_array_free (PangoTabArray *tab_array)
## gint pango_tab_array_get_size (PangoTabArray *tab_array)
gint
pango_tab_array_get_size (tab_array)
PangoTabArray *tab_array
## void pango_tab_array_resize (PangoTabArray *tab_array, gint new_size)
void
pango_tab_array_resize (tab_array, new_size)
PangoTabArray *tab_array
gint new_size
## void pango_tab_array_set_tab (PangoTabArray *tab_array, gint tab_index, PangoTabAlign alignment, gint location)
void
pango_tab_array_set_tab (tab_array, tab_index, alignment, location)
PangoTabArray *tab_array
gint tab_index
PangoTabAlign alignment
gint location
## void pango_tab_array_get_tab (PangoTabArray *tab_array, gint tab_index, PangoTabAlign *alignment, gint *location)
void pango_tab_array_get_tab (PangoTabArray *tab_array, gint tab_index, OUTLIST PangoTabAlign alignment, OUTLIST gint location)
## void pango_tab_array_get_tabs (PangoTabArray *tab_array, PangoTabAlign **alignments, gint **locations)
=for apidoc
Returns a list of Gtk2::Pango::TabAlign's, alignments, and integers, locations.
Even elemtents are alignments and odd elements are locations, so 0 is the first
alignment and 1 is the first location, 2 the second alignment, 3 the second
location, etc.
=cut
void
pango_tab_array_get_tabs (tab_array)
PangoTabArray *tab_array
PREINIT:
PangoTabAlign *alignments = NULL;
gint *locations = NULL, i, n;
PPCODE:
pango_tab_array_get_tabs (tab_array, &alignments, &locations);
n = pango_tab_array_get_size (tab_array);
EXTEND (SP, 2 * n);
for (i = 0 ; i < n ; i++) {
PUSHs (sv_2mortal (newSVPangoTabAlign (alignments[i])));
PUSHs (sv_2mortal (newSViv (locations[i])));
}
g_free (alignments);
g_free (locations);
## gboolean pango_tab_array_get_positions_in_pixels (PangoTabArray *tab_array)
gboolean
pango_tab_array_get_positions_in_pixels (tab_array)
PangoTabArray *tab_array
|