File: GtkFontSelection.xs

package info (click to toggle)
libgtk2-perl 2:1.2499-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 4,668 kB
  • ctags: 594
  • sloc: perl: 22,100; ansic: 122; makefile: 17
file content (174 lines) | stat: -rw-r--r-- 5,160 bytes parent folder | download | duplicates (3)
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
/*
 * Copyright (c) 2003 by the gtk2-perl team (see the file AUTHORS)
 *
 * 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.
 *
 * $Id$
 */

#include "gtk2perl.h"

MODULE = Gtk2::FontSelection	PACKAGE = Gtk2::FontSelection	PREFIX = gtk_font_selection_

## GtkWidget* gtk_font_selection_new (void)
GtkWidget *
gtk_font_selection_new (class)
    C_ARGS:
	/* void */

## gchar* gtk_font_selection_get_font_name (GtkFontSelection *fontsel)
gchar_own *
gtk_font_selection_get_font_name (fontsel)
	GtkFontSelection * fontsel

## GdkFont* gtk_font_selection_get_font (GtkFontSelection *fontsel)
GdkFont *
gtk_font_selection_get_font (fontsel)
	GtkFontSelection * fontsel

## gboolean gtk_font_selection_set_font_name (GtkFontSelection *fontsel, const gchar *fontname)
gboolean
gtk_font_selection_set_font_name (fontsel, fontname)
	GtkFontSelection * fontsel
	const gchar      * fontname

## void gtk_font_selection_set_preview_text (GtkFontSelection *fontsel, const gchar *text)
void
gtk_font_selection_set_preview_text (fontsel, text)
	GtkFontSelection * fontsel
	const gchar      * text

## G_CONST_RETURN gchar* gtk_font_selection_get_preview_text (GtkFontSelection *fontsel)
const gchar *
gtk_font_selection_get_preview_text (fontsel)
	GtkFontSelection * fontsel

#if GTK_CHECK_VERSION (2, 14, 0)

# We don't own the face, so no _noinc.
PangoFontFace * gtk_font_selection_get_face (GtkFontSelection *fontsel);

GtkWidget * gtk_font_selection_get_face_list (GtkFontSelection *fontsel);

# We don't own the family, so no _noinc.
PangoFontFamily * gtk_font_selection_get_family (GtkFontSelection *fontsel);

GtkWidget * gtk_font_selection_get_family_list (GtkFontSelection *fontsel);

GtkWidget * gtk_font_selection_get_preview_entry (GtkFontSelection *fontsel);

gint gtk_font_selection_get_size (GtkFontSelection *fontsel);

GtkWidget * gtk_font_selection_get_size_entry (GtkFontSelection *fontsel);

GtkWidget * gtk_font_selection_get_size_list (GtkFontSelection *fontsel);

#endif /* 2.14 */

MODULE = Gtk2::FontSelection	PACKAGE = Gtk2::FontSelectionDialog	PREFIX = gtk_font_selection_dialog_

## GtkWidget* gtk_font_selection_dialog_new (const gchar *title)
GtkWidget *
gtk_font_selection_dialog_new (class, title)
	const gchar * title
    C_ARGS:
	title

=for apidoc Gtk2::FontSelectionDialog::ok_button __hide__
=cut

=for apidoc Gtk2::FontSelectionDialog::apply_button __hide__
=cut

=for apidoc Gtk2::FontSelectionDialog::cancel_button __hide__
=cut

GtkWidget *
get_ok_button (fsd)
	GtkFontSelectionDialog * fsd
    ALIAS:
	Gtk2::FontSelectionDialog::ok_button = 1
	Gtk2::FontSelectionDialog::get_apply_button = 2
	Gtk2::FontSelectionDialog::apply_button = 3
	Gtk2::FontSelectionDialog::get_cancel_button = 4
	Gtk2::FontSelectionDialog::cancel_button = 5
    CODE:
	switch(ix)
	{
	case 0:
	case 1:
#if GTK_CHECK_VERSION (2, 14, 0)
		RETVAL = gtk_font_selection_dialog_get_ok_button (fsd);
#else
		RETVAL = fsd->ok_button;
#endif
		break;
	case 2:
	case 3:
#if GTK_CHECK_VERSION (2, 14, 0)
		RETVAL = gtk_font_selection_dialog_get_apply_button (fsd);
#else
		RETVAL = fsd->apply_button;
#endif
		break;
	case 4:
	case 5:
#if GTK_CHECK_VERSION (2, 14, 0)
		RETVAL = gtk_font_selection_dialog_get_cancel_button (fsd);
#else
		RETVAL = fsd->cancel_button;
#endif
		break;
	default:
		RETVAL = NULL;
		g_assert_not_reached ();
	}
    OUTPUT:
	RETVAL

##gchar* gtk_font_selection_dialog_get_font_name (GtkFontSelectionDialog *fsd)
gchar_own *
gtk_font_selection_dialog_get_font_name (fsd)
	GtkFontSelectionDialog * fsd

##GdkFont* gtk_font_selection_dialog_get_font (GtkFontSelectionDialog *fsd)
GdkFont *
gtk_font_selection_dialog_get_font (fsd)
	GtkFontSelectionDialog * fsd

##gboolean gtk_font_selection_dialog_set_font_name (GtkFontSelectionDialog *fsd, const gchar *fontname)
gboolean
gtk_font_selection_dialog_set_font_name (fsd, fontname)
	GtkFontSelectionDialog * fsd
	gchar                  * fontname

##void gtk_font_selection_dialog_set_preview_text (GtkFontSelectionDialog *fsd, const gchar *text)
void
gtk_font_selection_dialog_set_preview_text (fsd, text)
	GtkFontSelectionDialog * fsd
	gchar                  * text

##G_CONST_RETURN gchar* gtk_font_selection_dialog_get_preview_text (GtkFontSelectionDialog *fsd)
const gchar *
gtk_font_selection_dialog_get_preview_text (fsd)
	GtkFontSelectionDialog * fsd

#if GTK_CHECK_VERSION (2, 22, 0)

GtkWidget * gtk_font_selection_dialog_get_font_selection (GtkFontSelectionDialog *fsd);

#endif /* 2.22 */