File: Gdk.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 (308 lines) | stat: -rw-r--r-- 7,311 bytes parent folder | download | duplicates (5)
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
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
/*
 * 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::Gdk	PACKAGE = Gtk2::Gdk	PREFIX = gdk_

##  void gdk_init (gint *argc, gchar ***argv) 
gboolean
gdk_init (class=NULL)
    ALIAS:
	Gtk2::Gdk::init_check = 1
    PREINIT:
	GPerlArgv *pargv;
    CODE:
	pargv = gperl_argv_new ();

	if (ix == 1) {
		RETVAL = gdk_init_check (&pargv->argc, &pargv->argv);
	} else {
		gdk_init (&pargv->argc, &pargv->argv);
		/* gdk_init() either succeeds or does not return. */
		RETVAL = TRUE;
	}

	gperl_argv_update (pargv);
	gperl_argv_free (pargv);
    OUTPUT:
	RETVAL

#if GTK_CHECK_VERSION(2,2,0)

##  void gdk_parse_args (gint *argc, gchar ***argv) 
void
gdk_parse_args (class=NULL)
    PREINIT:
	GPerlArgv *pargv;
    CODE:
	pargv = gperl_argv_new ();

	gdk_parse_args (&pargv->argc, &pargv->argv);

	gperl_argv_update (pargv);
	gperl_argv_free (pargv);

const gchar *
gdk_get_display_arg_name (class)
    C_ARGS:
	/* void */
	

#endif /* >= 2.2.0 */

### deprecated
	

##  gchar* gdk_set_locale (void) 
gchar*
gdk_set_locale (class)
    C_ARGS:
	/* void */
	

## allow NULL to remove the property
void
gdk_set_sm_client_id (class, sm_client_id=NULL)
	const gchar_ornull * sm_client_id
    C_ARGS:
	sm_client_id

#if GTK_CHECK_VERSION(2,2,0)

##  void gdk_notify_startup_complete (void) 
void
gdk_notify_startup_complete (class)
    C_ARGS:
	/* void */

#endif /* 2.2.0 */

#if GTK_CHECK_VERSION(2, 12, 0)

void gdk_notify_startup_complete_with_id (class, const gchar* startup_id)
    C_ARGS:
	startup_id

#endif

const char *
gdk_get_program_class (class)
    C_ARGS:
	/* void */

void
gdk_set_program_class (class, program_class)
	const char *program_class
    C_ARGS:
	program_class

##  gchar* gdk_get_display (void) 
gchar *
gdk_get_display (class)
    C_ARGS:
	/* void */
    CLEANUP:
	/* in versions later than 2.2.0, this string is malloc'd. */
	if (NULL == gtk_check_version (2, 2, 0))
		g_free (RETVAL);

##  void gdk_flush (void) 
void
gdk_flush (class)
    C_ARGS:
	/* void */
	

gint
screen_width (class)
    ALIAS:
	Gtk2::Gdk::screen_height = 1
	Gtk2::Gdk::screen_width_mm = 2
	Gtk2::Gdk::screen_height_mm = 3
    CODE:
	switch (ix) {
		case 0: RETVAL = gdk_screen_width (); break;
		case 1: RETVAL = gdk_screen_height (); break;
		case 2: RETVAL = gdk_screen_width_mm (); break;
		case 3: RETVAL = gdk_screen_height_mm (); break;
		default:
			RETVAL = 0;
			g_assert_not_reached ();
	}
    OUTPUT:
	RETVAL

##  GdkGrabStatus gdk_pointer_grab (GdkWindow *window, gboolean owner_events, GdkEventMask event_mask, GdkWindow *confine_to, GdkCursor *cursor, guint32 time_) 
GdkGrabStatus
gdk_pointer_grab (class, window, owner_events, event_mask, confine_to, cursor, time_)
	GdkWindow        * window
	gboolean           owner_events
	GdkEventMask       event_mask
	GdkWindow_ornull * confine_to
	GdkCursor_ornull * cursor
	guint32            time_
    C_ARGS:
	window, owner_events, event_mask, confine_to, cursor, time_

##  void gdk_pointer_ungrab (guint32 time_) 
void
gdk_pointer_ungrab (class, time_)
	guint32 time_
    C_ARGS:
	time_

##  gboolean gdk_pointer_is_grabbed (void) 
gboolean
gdk_pointer_is_grabbed (class)
    C_ARGS:
	/* void */

##  GdkGrabStatus gdk_keyboard_grab (GdkWindow *window, gboolean owner_events, guint32 time_) 
GdkGrabStatus
gdk_keyboard_grab (class, window, owner_events, time_)
	GdkWindow *window
	gboolean owner_events
	guint32 time_
    C_ARGS:
	window, owner_events, time_

##  void gdk_keyboard_ungrab (guint32 time_) 
void
gdk_keyboard_ungrab (class, time_)
	guint32 time_
    C_ARGS:
	time_

##  void gdk_beep (void) 
void
gdk_beep (class)
    C_ARGS:
	/* void */

### deprecated
##  gboolean gdk_get_use_xshm (void) 
##  void gdk_set_use_xshm (gboolean use_xshm) 


##  void gdk_error_trap_push (void) 
void
gdk_error_trap_push (class)
    C_ARGS:
	/* void */

##  gint gdk_error_trap_pop (void) 
gint
gdk_error_trap_pop (class)
    C_ARGS:
	/* void */

### deprecated in favor of Glib::IO::add_watch etc
##  gint gdk_input_add_full (gint source, GdkInputCondition condition, GdkInputFunction function, gpointer data, GdkDestroyNotify destroy) 
##  gint gdk_input_add (gint source, GdkInputCondition condition, GdkInputFunction function, gpointer data) 
##  void gdk_input_remove (gint tag) 

### applications should not set this.
##  void gdk_set_double_click_time (guint msec) 

MODULE = Gtk2::Gdk	PACKAGE = Gtk2::Gdk::Rectangle	PREFIX = gdk_rectangle_

##  gboolean gdk_rectangle_intersect (GdkRectangle *src1, GdkRectangle *src2, GdkRectangle *dest) 
GdkRectangle_copy *
gdk_rectangle_intersect (src1, src2)
	GdkRectangle *src1
	GdkRectangle *src2
    PREINIT:
	GdkRectangle dest;
    CODE:
	if (!gdk_rectangle_intersect (src1, src2, &dest))
		XSRETURN_UNDEF;
	RETVAL = &dest;
    OUTPUT:
	RETVAL

##  void gdk_rectangle_union (GdkRectangle *src1, GdkRectangle *src2, GdkRectangle *dest) 
GdkRectangle_copy *
gdk_rectangle_union (src1, src2)
	GdkRectangle *src1
	GdkRectangle *src2
    PREINIT:
	GdkRectangle dest;
    CODE:
	gdk_rectangle_union (src1, src2, &dest);
	RETVAL = &dest;
    OUTPUT:
	RETVAL

MODULE = Gtk2::Gdk	PACKAGE = Gtk2::Gdk	PREFIX = gdk_

### not bound, in favor of native perl support for unicode and utf8.
##  gchar *gdk_wcstombs (const GdkWChar *src) 
##  gint gdk_mbstowcs (GdkWChar *dest, const gchar *src, gint dest_max) 

MODULE = Gtk2::Gdk	PACKAGE = Gtk2::Gdk::Event	PREFIX = gdk_event_

##  gboolean gdk_event_send_client_message (GdkEvent *event, GdkNativeWindow winid) 
gboolean
gdk_event_send_client_message (class, event, winid)
	GdkEvent *event
	GdkNativeWindow winid
    C_ARGS:
	event, winid

##  void gdk_event_send_clientmessage_toall (GdkEvent *event) 
void
gdk_event_send_clientmessage_toall (class, event)
	GdkEvent *event
    C_ARGS:
	event

#if GTK_CHECK_VERSION (2, 2, 0)

##  gboolean gdk_event_send_client_message_for_display (GdkDisplay *display, GdkEvent *event, GdkNativeWindow winid) 
gboolean
gdk_event_send_client_message_for_display (class, display, event, winid)
	GdkDisplay *display
	GdkEvent *event
	GdkNativeWindow winid
    C_ARGS:
	display, event, winid

#endif

MODULE = Gtk2::Gdk	PACKAGE = Gtk2::Gdk::Threads	PREFIX = gdk_threads_

###  void gdk_threads_enter (void) 
###  void gdk_threads_leave (void) 
###  void gdk_threads_init (void) 

void
gdk_threads_init (class)
    ALIAS:
	enter = 1
	leave = 2
    CODE:
	switch (ix) {
		case 0: gdk_threads_init (); break;
		case 1: gdk_threads_enter (); break;
		case 2: gdk_threads_leave (); break;
		default:
			g_assert_not_reached ();
	}