File: gtk2perl-private.h

package info (click to toggle)
libgtk2-perl 1%3A1.190-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 4,132 kB
  • ctags: 516
  • sloc: perl: 16,575; sh: 149; ansic: 148; makefile: 76
file content (67 lines) | stat: -rw-r--r-- 2,453 bytes parent folder | download
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
/*
 * Copyright (C) 2003-2006 by the gtk2-perl team (see the file AUTHORS for the
 * full list)
 *
 * This library is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Library General Public License as published by
 * the Free Software Foundation; either version 2.1 of the License, or (at your
 * option) any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
 * License for more details.
 *
 * You should have received a copy of the GNU Library General Public License
 * along with this library; if not, write to the Free Software Foundation,
 * Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307  USA.
 *
 * THIS IS A PRIVATE HEADER FOR USE ONLY IN Gtk2 ITSELF.
 *
 * $Header: /cvsroot/gtk2-perl/gtk2-perl-xs/Gtk2/gtk2perl-private.h,v 1.3 2006/10/17 20:20:37 kaffeetisch Exp $
 */

#ifndef _GTK2PERL_PRIVATE_H_
#define _GTK2PERL_PRIVATE_H_

#include "gtk2perl.h"

/* Implemented in GtkItemFactory.xs. */
GPerlCallback * gtk2perl_translate_func_create (SV * func, SV * data);
gchar * gtk2perl_translate_func (const gchar *path, gpointer data);

/* Implemented in GtkRecentManager.xs */
const gchar ** gtk2perl_sv_to_strv (SV *sv);
SV * gtk2perl_sv_from_strv (const gchar **strv);

#if GTK_CHECK_VERSION (2, 6, 0)
/* Implemented in GtkTreeView.xs. */
GPerlCallback * gtk2perl_tree_view_row_separator_func_create (SV * func,
							      SV * data);
gboolean gtk2perl_tree_view_row_separator_func (GtkTreeModel *model,
				                GtkTreeIter  *iter,
				                gpointer      data);
#endif

/* Implemented in PangoAttributes.xs. */
void gtk2perl_pango_attribute_register_custom_type (PangoAttrType type, const char *package);

#define GTK2PERL_PANGO_ATTR_REGISTER_CUSTOM_TYPE(attr, package)	\
{								\
	static gboolean type_registered_already = FALSE;	\
	if (!type_registered_already) {				\
		gtk2perl_pango_attribute_register_custom_type	\
			((attr)->klass->type, package);		\
		type_registered_already = TRUE;			\
	}							\
}

#define GTK2PERL_PANGO_ATTR_STORE_INDICES(offset, attr)	\
	if (items == offset + 2) {			\
		guint start = SvUV (ST (offset));	\
		guint end = SvUV (ST (offset + 1));	\
		attr->start_index = start;		\
		attr->end_index = end;			\
	}

#endif /* _GTK2PERL_PRIVATE_H_ */