Gtk-Perl

 view release on metacpan or  search on metacpan

Gtk/xs/GtkCList.xs  view on Meta::CPAN

	Gtk::CList  clist
	int		row
	int		column
	double	row_align
	double	column_align

Gtk::Visibility
gtk_clist_row_is_visible (clist, row)
	Gtk::CList  clist
	int     row

Gtk::CellType
gtk_clist_get_cell_type (clist, row, column)
	Gtk::CList  clist
	int		row
	int		column

#if GTK_HVER >= 0x010108

void
gtk_clist_set_reorderable(clist, reorderable)
	Gtk::CList	clist
	gboolean	reorderable

#endif

void
gtk_clist_set_text(clist, row, column, text)
	Gtk::CList  clist
	int		row
	int		column
	char*	text

char*
gtk_clist_get_text (clist, row, column)
	Gtk::CList  clist
	int		row
	int		column
	CODE:
	{
		gchar* text=NULL;
		gtk_clist_get_text(clist, row, column, &text);
		RETVAL = text;
	}
	OUTPUT:
	RETVAL

void
gtk_clist_set_pixmap(clist, row, column, pixmap, mask)
	Gtk::CList		clist
	int			row
	int			column
	Gtk::Gdk::Pixmap	pixmap
	Gtk::Gdk::Bitmap_OrNULL	mask

void
gtk_clist_get_pixmap (clist, row, column)
	Gtk::CList	clist
	int		row
	int		column
	PPCODE:
	{
		GdkPixmap * pixmap = NULL;
		GdkBitmap * bitmap = NULL;
		int result;
		result = gtk_clist_get_pixmap(clist, row, column, &pixmap, (GIMME == G_ARRAY) ?&bitmap: NULL);
		if ( result ) {
			if ( pixmap ) {
				EXTEND(sp, 1);
				PUSHs(sv_2mortal(newSVGdkPixmap(pixmap)));
			}
			if (bitmap ) {
				EXTEND(sp, 1);
				PUSHs(sv_2mortal(newSVGdkBitmap(bitmap)));
			}
		}
	}

void
gtk_clist_set_pixtext(clist, row, column, text, spacing, pixmap, mask)
	Gtk::CList  clist
	int		row
	int		column
	char*	text
	int		spacing
	Gtk::Gdk::Pixmap	pixmap
	Gtk::Gdk::Bitmap_OrNULL	mask

void
gtk_clist_get_pixtext (clist, row, column)
	Gtk::CList  clist
	int		row
	int		column
	PPCODE:
	{
		gchar* text = NULL;
		guint8 spacing;
		GdkPixmap * pixmap = NULL;
		GdkBitmap * bitmap = NULL;
		int result;
		/* FIXME: require GIMME == G_ARRAY? */
		result = gtk_clist_get_pixtext(clist, row, column, &text, &spacing, &pixmap, &bitmap);
		if ( result ) {
			EXTEND(sp, 4);
			if ( text )
				PUSHs(sv_2mortal(newSVpv(text, 0)));
			else
				PUSHs(sv_2mortal(newSVsv(&PL_sv_undef)));
			PUSHs(sv_2mortal(newSViv(spacing)));
			if ( pixmap )
				PUSHs(sv_2mortal(newSVGdkPixmap(pixmap)));
			else
				PUSHs(sv_2mortal(newSVsv(&PL_sv_undef)));
			if (bitmap )
				PUSHs(sv_2mortal(newSVGdkBitmap(bitmap)));
			else
				PUSHs(sv_2mortal(newSVsv(&PL_sv_undef)));
		}
	}


void
gtk_clist_set_foreground(clist, row, color)
	Gtk::CList  clist
	int		row
	Gtk::Gdk::Color	color

void
gtk_clist_set_background(clist, row, color)
	Gtk::CList  clist
	int		row
	Gtk::Gdk::Color	color

void
gtk_clist_set_shift(clist, row, column, verticle, horizontal)
	Gtk::CList  clist
	int		row
	int		column
	int 	verticle
	int		horizontal

 #ARG: $text string (text to put in the first column)
 #ARG: ... list (additional strings to put in the second, third... columns)
int
gtk_clist_append(clist, text, ...)
	Gtk::CList  clist
	SV *	text
	CODE:
	{
		int num = items-1;
		int i;
		char** val = malloc(clist->columns*sizeof(char*));
		if (num > clist->columns)
			num = clist->columns;

Gtk/xs/GtkCList.xs  view on Meta::CPAN

		 *          not form a permanent reference to it. Instead, we
		 *          increment the refcount of the target sv, and store that
		 *          sv's pointer as the row data. When the row data is
		 *          deallocated, the sv's refcount will be decremented.
		\*/

		if (!sv)
			croak("Data must be a reference");
			
		SvREFCNT_inc(sv);
		
		gtk_clist_set_row_data_full(clist, row, sv, svrefcnt_dec);
	}

 #RETURNS: the reference set with $clist->set_row_data().
SV*
gtk_clist_get_row_data(clist, row)
	Gtk::CList  clist
	int		row
	CODE:
	{
		SV * sv = (SV*)gtk_clist_get_row_data(clist, row);
		RETVAL = sv ? newRV_inc(sv) : newSVsv(&PL_sv_undef);
	}
	OUTPUT:
	RETVAL

int
gtk_clist_find_row_from_data (clist, data)
	Gtk::CList  clist
	SV *    data
	CODE:
	{
		SV * sv = (SV*)SvRV(data);
		
		if (!sv)
			croak("Data must be a reference");
		
		RETVAL = gtk_clist_find_row_from_data(clist, sv);
	}
	OUTPUT:
	RETVAL
	
void
gtk_clist_select_row(clist, row, column)
	Gtk::CList  clist
	int		row
	int		column

void
gtk_clist_unselect_row(clist, row, column)
	Gtk::CList  clist
	int		row
	int		column

void
gtk_clist_get_selection_info (clist, x, y)
	Gtk::CList  clist
	int x
	int y
   	PPCODE:
	{
		int row, column;
		if (gtk_clist_get_selection_info (clist, x, y, &row, &column)) {
			EXTEND(sp, 2);
			PUSHs(sv_2mortal(newSViv(row)));
			PUSHs(sv_2mortal(newSViv(column)));
		}
	}

Gtk::Gdk::Window
clist_window (clist)
	Gtk::CList      clist
	CODE:
	RETVAL = clist->clist_window;
	OUTPUT:
	RETVAL

int
rows(clist)
	Gtk::CList	clist
	CODE:
	RETVAL=clist->rows;
	OUTPUT:
	RETVAL

int
columns(clist)
	Gtk::CList	clist
	CODE:
	RETVAL=clist->columns;
	OUTPUT:
	RETVAL

Gtk::SelectionMode
selection_mode (clist)
	Gtk::CList	clist
	CODE:
	RETVAL=clist->selection_mode;
	OUTPUT:
	RETVAL

 #RETURNS: a list of the row numbers of the current selection
void
selection (clist)
	Gtk::CList      clist
	PPCODE:
	{
		GList * selection = clist->selection;
		while(selection) {
			EXTEND(sp, 1);
			PUSHs(sv_2mortal(newSVgint(GPOINTER_TO_INT(selection->data))));
			selection=g_list_next(selection);
		}
	}

 #RETURNS: a list of Gtk::CListRow
void
row_list (clist)
	Gtk::CList	clist
	PPCODE:
	{
		GList * row_list = clist->row_list;
		while(row_list) {
			EXTEND(sp, 1);
			PUSHs(sv_2mortal(newSVGtkCListRow(row_list->data)));
			row_list=g_list_next(row_list);
		}

	}

#if GTK_HVER >= 0x010103

void
gtk_clist_set_column_resizeable(clist, column, resizeable=TRUE)
	Gtk::CList	clist
	int		column
	bool		resizeable

void
gtk_clist_set_column_visibility(clist, column, visible=TRUE)
	Gtk::CList	clist
	int		column
	bool		visible

void
gtk_clist_set_column_auto_resize(clist, column, resize=TRUE)
	Gtk::CList	clist
	int		column
	bool		resize

#endif	

#if GTK_HVER >= 0x010200

void
gtk_clist_set_cell_style(clist, row, column, style)
	Gtk::CList	clist
	int	row
	int	column
	Gtk::Style	style

Gtk::Style
gtk_clist_get_cell_style(clist, row, column)
	Gtk::CList	clist
	int	row
	int	column

void
gtk_clist_set_row_style(clist, row, style)
	Gtk::CList	clist
	int	row
	Gtk::Style	style

Gtk::Style
gtk_clist_get_row_style(clist, row)
	Gtk::CList	clist
	int	row

#endif



( run in 0.694 second using v1.01-cache-2.11-cpan-5511b514fd6 )