1Gtk2::Gdk::Window(3) User Contributed Perl Documentation Gtk2::Gdk::Window(3)
2
3
4
6 Gtk2::Gdk::Window
7
9 Glib::Object
10 +----Gtk2::Gdk::Drawable
11 +----Gtk2::Gdk::Window
12
14 window = Gtk2::Gdk::Window->new ($parent, $attributes_ref)
15 · $parent (Gtk2::Gdk::Window or undef)
16
17 · $attributes_ref (scalar)
18
19 Create and return a new window. parent can be undef to mean the
20 root window of the default screen. attributes_ref is a hashref
21 containing some of the following keys,
22
23 title string
24 event_mask Gtk2::Gdk::EventMask flags
25 x integer
26 y integer
27 width integer
28 height integer
29 wclass Gtk2::Gdk::WindowClass enum
30 visual Gtk2::Gdk::Visual
31 colormap Gtk2::Gdk::Colormap
32 window_type Gtk2::Gdk::WindowType enum
33 cursor Gtk2::Gdk::Cursor
34 wmclass_name string
35 wmclass_class string
36 override_redirect boolean (integer 0 or 1)
37
38 window_type is mandatory because it defaults to "root" but of
39 course it's not possible to create a new root window. The other
40 fields get default values zero, empty, unset, etc.
41
42 my $win = Gtk2::Gdk::Window->new
43 (undef, { window_type => 'toplevel,
44 wclass => 'GDK_INPUT_OUTPUT',
45 x => 0,
46 y => 0,
47 width => 200,
48 height => 100 });
49
50 Incidentally, the nicknames for wclass Gtk2::Gdk::WindowClass
51 really are "output" for input-output and "only" for input-only.
52 Those names are a bit odd, but that's what Gtk has. You can, as
53 for any enum, give the full names like "GDK_INPUT_OUTPUT" if
54 desired, for some clarity.
55
56 $window->set_accept_focus ($accept_focus)
57 · $accept_focus (boolean)
58
59 Since: gtk+ 2.4
60
61 (window, win_x, win_y) = Gtk2::Gdk::Window->at_pointer
62 Returns window, a Gtk2::Gdk::Window and win_x and win_y, integers.
63
64 $window->set_back_pixmap ($pixmap, $parent_relative=0)
65 · $pixmap (Gtk2::Gdk::Pixmap or undef)
66
67 · $parent_relative (boolean)
68
69 $window->set_background ($color)
70 · $color (Gtk2::Gdk::Color)
71
72 $window->beep
73 Since: gtk+ 2.12
74
75 $window->begin_move_drag ($button, $root_x, $root_y, $timestamp)
76 · $button (integer)
77
78 · $root_x (integer)
79
80 · $root_y (integer)
81
82 · $timestamp (unsigned)
83
84 $window->begin_paint_rect ($rectangle)
85 · $rectangle (Gtk2::Gdk::Rectangle)
86
87 $window->begin_paint_region ($region)
88 · $region (Gtk2::Gdk::Region)
89
90 $window->begin_resize_drag ($edge, $button, $root_x, $root_y, $timestamp)
91 · $edge (Gtk2::Gdk::WindowEdge)
92
93 · $button (integer)
94
95 · $root_x (integer)
96
97 · $root_y (integer)
98
99 · $timestamp (unsigned)
100
101 $window->set_child_input_shapes
102 Since: gtk+ 2.10
103
104 $window->set_child_shapes
105 list = $window->get_children
106 Returns the list of children (Gtk2::Gdk::Window's) known to gdk.
107
108 $window->clear
109 $window->clear_area ($x, $y, $width, $height)
110 · $x (integer)
111
112 · $y (integer)
113
114 · $width (integer)
115
116 · $height (integer)
117
118 $window->clear_area_e ($x, $y, $width, $height)
119 · $x (integer)
120
121 · $y (integer)
122
123 · $width (integer)
124
125 · $height (integer)
126
127 $window->set_composited ($composited)
128 · $composited (boolean)
129
130 Since: gtk+ 2.12
131
132 $window->configure_finished
133 Since: gtk+ 2.6
134
135 $window->set_cursor ($cursor)
136 · $cursor (Gtk2::Gdk::Cursor or undef)
137
138 Gtk2::Gdk::Window->set_debug_updates ($enable)
139 $window->set_debug_updates ($enable)
140 · $enable (boolean)
141
142 list = $window->get_decorations
143 $window->set_decorations ($decorations)
144 · $decorations (Gtk2::Gdk::WMDecoration)
145
146 $window->deiconify
147 $window->destroy
148 $window->enable_synchronized_configure
149 Since: gtk+ 2.6
150
151 $window->end_paint
152 eventmask = $window->get_events
153 $window->set_events ($event_mask)
154 · $event_mask (Gtk2::Gdk::EventMask)
155
156 $window->focus ($timestamp)
157 · $timestamp (unsigned)
158
159 $window->set_focus_on_map ($focus_on_map)
160 · $focus_on_map (boolean)
161
162 Since: gtk+ 2.6
163
164 window = Gtk2::Gdk::Window->foreign_new ($anid)
165 · $anid (Gtk2::Gdk::NativeWindow)
166
167 window = Gtk2::Gdk::Window->foreign_new_for_display ($display, $anid)
168 · $display (Gtk2::Gdk::Display)
169
170 · $anid (Gtk2::Gdk::NativeWindow)
171
172 Since: gtk+ 2.2
173
174 rectangle = $window->get_frame_extents
175 $window->freeze_updates
176 $window->fullscreen
177 Since: gtk+ 2.2
178
179 $window->set_functions ($functions)
180 · $functions (Gtk2::Gdk::WMFunction)
181
182 $sm_client_id->gdk_set_sm_client_id
183 (x, y, width, height, depth) = $window->get_geometry
184 $window->set_geometry_hints ($geometry)
185 $window->set_geometry_hints ($geometry, $geom_mask)
186 · $geometry_ref (scalar)
187
188 · $geom_mask_sv (scalar)
189
190 · $geom_mask (Gtk2::Gdk::WindowHints) optional, usually inferred
191 from $geometry
192
193 · $geometry (Gtk2::Gdk::Geometry)
194
195 The geom_mask argument, describing which fields in the geometry are
196 valid, is optional. If omitted it will be inferred from the
197 geometry itself.
198
199 window = $window->get_group
200 Since: gtk+ 2.4
201
202 $window->set_group ($leader)
203 · $leader (Gtk2::Gdk::Window)
204
205 $window->hide
206 $window->set_icon_list (...)
207 · ... (list) of GdkPixbuf's
208
209 $window->set_icon_name ($name)
210 · $name (string)
211
212 $window->set_icon ($icon_window, $pixmap, $mask)
213 · $icon_window (Gtk2::Gdk::Window or undef)
214
215 · $pixmap (Gtk2::Gdk::Pixmap or undef)
216
217 · $mask (Gtk2::Gdk::Bitmap or undef)
218
219 $window->iconify
220 $window->input_shape_combine_mask ($mask, $x, $y)
221 · $mask (Gtk2::Gdk::Bitmap)
222
223 · $x (integer)
224
225 · $y (integer)
226
227 Since: gtk+ 2.10
228
229 $window->input_shape_combine_region ($shape, $offset_x, $offset_y)
230 · $shape (Gtk2::Gdk::Region)
231
232 · $offset_x (integer)
233
234 · $offset_y (integer)
235
236 Since: gtk+ 2.10
237
238 list = $window->get_internal_paint_info
239 $window->invalidate_maybe_recurse ($region, $func, $data=undef)
240 · $region (Gtk2::Gdk::Region)
241
242 · $func (scalar)
243
244 · $data (scalar)
245
246 $window->invalidate_rect ($rectangle, $invalidate_children)
247 · $rectangle (Gtk2::Gdk::Rectangle)
248
249 · $invalidate_children (boolean)
250
251 $window->invalidate_region ($region, $invalidate_children)
252 · $region (Gtk2::Gdk::Region)
253
254 · $invalidate_children (boolean)
255
256 boolean = $window->is_viewable
257 boolean = $window->is_visible
258 $window->set_keep_above ($setting)
259 · $setting (boolean)
260
261 Since: gtk+ 2.4
262
263 $window->set_keep_below ($setting)
264 · $setting (boolean)
265
266 Since: gtk+ 2.4
267
268 window = Gtk2::Gdk::Window->lookup ($anid)
269 · $anid (Gtk2::Gdk::NativeWindow)
270
271 window = Gtk2::Gdk::Window->lookup_for_display ($display, $anid)
272 · $display (Gtk2::Gdk::Display)
273
274 · $anid (Gtk2::Gdk::NativeWindow)
275
276 Since: gtk+ 2.2
277
278 $window->lower
279 $window->maximize
280 $window->merge_child_input_shapes
281 Since: gtk+ 2.10
282
283 $window->merge_child_shapes
284 $window->set_modal_hint ($modal)
285 · $modal (boolean)
286
287 $window->move ($x, $y)
288 · $x (integer)
289
290 · $y (integer)
291
292 $window->move_region ($region, $dx, $dy)
293 · $region (Gtk2::Gdk::Region)
294
295 · $dx (integer)
296
297 · $dy (integer)
298
299 Since: gtk+ 2.8
300
301 $window->move_resize ($x, $y, $width, $height)
302 · $x (integer)
303
304 · $y (integer)
305
306 · $width (integer)
307
308 · $height (integer)
309
310 $window->move_to_current_desktop
311 Since: gtk+ 2.8
312
313 (x, y) = $window->get_origin
314 $window->set_override_redirect ($override_redirect)
315 · $override_redirect (boolean)
316
317 window = $window->get_parent
318 list = $window->peek_children
319 An alias for get_children
320
321 (window_at_pointer, x, y, mask) = $window->get_pointer
322 Returns window_at_pointer, a Gtk2::Gdk::Window or undef, x and y,
323 integers, and mask, a Gtk2::Gdk::ModifierType.
324
325 (x, y) = $window->get_position
326 Gtk2::Gdk::Window->process_all_updates
327 $window->process_all_updates
328 $window->process_updates ($update_children)
329 · $update_children (boolean)
330
331 $window->property_change ($property, $type, $format, $mode, ...)
332 · $property (Gtk2::Gdk::Atom)
333
334 · $type (Gtk2::Gdk::Atom)
335
336 · $format (integer)
337
338 · $mode (Gtk2::Gdk::PropMode)
339
340 · ... (list) property value(s)
341
342 Depending on the value of format, the property value(s) can be:
343
344 +--------------------+------------------------------------+
345 | format | value |
346 +--------------------+------------------------------------+
347 | Gtk2::Gdk::CHARS | a string |
348 | Gtk2::Gdk::USHORTS | one or more unsigned short numbers |
349 | Gtk2::Gdk::ULONGS | one or more unsigned long numbers |
350 +--------------------+------------------------------------+
351
352 $window->property_delete ($property)
353 · $property (Gtk2::Gdk::Atom)
354
355 (property_type, format, data) = $window->property_get ($property, $type,
356 $offset, $length, $pdelete)
357 · $property (Gtk2::Gdk::Atom)
358
359 · $type (Gtk2::Gdk::Atom)
360
361 · $offset (unsigned)
362
363 · $length (unsigned)
364
365 · $pdelete (integer)
366
367 See property_change for an explanation of the meaning of format.
368
369 $window->raise
370 $window->redirect_to_drawable ($drawable, $src_x, $src_y, $dest_x, $dest_y,
371 $width, $height)
372 · $drawable (Gtk2::Gdk::Drawable)
373
374 · $src_x (integer)
375
376 · $src_y (integer)
377
378 · $dest_x (integer)
379
380 · $dest_y (integer)
381
382 · $width (integer)
383
384 · $height (integer)
385
386 Since: gtk+ 2.14
387
388 $window->register_dnd
389 $window->remove_redirection
390 Since: gtk+ 2.14
391
392 $window->reparent ($new_parent, $x, $y)
393 · $new_parent (Gtk2::Gdk::Window)
394
395 · $x (integer)
396
397 · $y (integer)
398
399 $window->resize ($width, $height)
400 · $width (integer)
401
402 · $height (integer)
403
404 $window->set_role ($role)
405 · $role (string)
406
407 (x, y) = $window->get_root_origin
408 $window->scroll ($dx, $dy)
409 · $dx (integer)
410
411 · $dy (integer)
412
413 $window->shape_combine_mask ($mask, $x, $y)
414 · $mask (Gtk2::Gdk::Bitmap)
415
416 · $x (integer)
417
418 · $y (integer)
419
420 $window->shape_combine_region ($shape_region, $offset_x, $offset_y)
421 · $shape_region (Gtk2::Gdk::Region)
422
423 · $offset_x (integer)
424
425 · $offset_y (integer)
426
427 $window->show
428 $window->show_unraised
429 $window->set_skip_pager_hint ($skips_pager)
430 · $skips_pager (boolean)
431
432 Since: gtk+ 2.2
433
434 $window->set_skip_taskbar_hint ($skips_taskbar)
435 · $skips_taskbar (boolean)
436
437 Since: gtk+ 2.2
438
439 $window->set_startup_id ($startup_id)
440 · $startup_id (string)
441
442 Since: gtk+ 2.12
443
444 windowstate = $window->get_state
445 boolean = $window->set_static_gravities ($use_static)
446 · $use_static (boolean)
447
448 $window->stick
449 $window->thaw_updates
450 $window->set_title ($title)
451 · $title (string)
452
453 window = $window->get_toplevel
454 list = Gtk2::Gdk::Window->get_toplevels
455 Returns a list of top level windows (Gtk2::Gdk::Window's) known to
456 gdk, on the default screen. A toplevel window is a child of the
457 root window.
458
459 $window->set_transient_for ($parent)
460 · $parent (Gtk2::Gdk::Window)
461
462 windowtypehint = $window->get_type_hint
463 Since: gtk+ 2.10
464
465 $window->set_type_hint ($hint)
466 · $hint (Gtk2::Gdk::WindowTypeHint)
467
468 $window->unfullscreen
469 Since: gtk+ 2.2
470
471 $window->unmaximize
472 $window->unstick
473 region or undef = $window->get_update_area
474 $window->set_urgency_hint ($urgent)
475 · $urgent (boolean)
476
477 Since: gtk+ 2.8
478
479 unsigned = $window->get_user_data
480 $window->set_user_data ($user_data)
481 · $user_data (unsigned)
482
483 $window->set_user_time ($timestamp)
484 · $timestamp (unsigned)
485
486 Since: gtk+ 2.6
487
488 windowtype = $window->get_window_type
489 $window->withdraw
491 'cursor' (Gtk2::Gdk::Cursor : readable / writable)
492 Cursor
493
495 Gtk2::Gdk::Window = pick-embedded-child (Gtk2::Gdk::Window, double,
496 double)
497 to-embedder (Gtk2::Gdk::Window, double, double, gpointer, gpointer)
498 from-embedder (Gtk2::Gdk::Window, double, double, gpointer, gpointer)
499
501 flags Gtk2::Gdk::EventMask
502 · 'exposure-mask' / 'GDK_EXPOSURE_MASK'
503
504 · 'pointer-motion-mask' / 'GDK_POINTER_MOTION_MASK'
505
506 · 'pointer-motion-hint-mask' / 'GDK_POINTER_MOTION_HINT_MASK'
507
508 · 'button-motion-mask' / 'GDK_BUTTON_MOTION_MASK'
509
510 · 'button1-motion-mask' / 'GDK_BUTTON1_MOTION_MASK'
511
512 · 'button2-motion-mask' / 'GDK_BUTTON2_MOTION_MASK'
513
514 · 'button3-motion-mask' / 'GDK_BUTTON3_MOTION_MASK'
515
516 · 'button-press-mask' / 'GDK_BUTTON_PRESS_MASK'
517
518 · 'button-release-mask' / 'GDK_BUTTON_RELEASE_MASK'
519
520 · 'key-press-mask' / 'GDK_KEY_PRESS_MASK'
521
522 · 'key-release-mask' / 'GDK_KEY_RELEASE_MASK'
523
524 · 'enter-notify-mask' / 'GDK_ENTER_NOTIFY_MASK'
525
526 · 'leave-notify-mask' / 'GDK_LEAVE_NOTIFY_MASK'
527
528 · 'focus-change-mask' / 'GDK_FOCUS_CHANGE_MASK'
529
530 · 'structure-mask' / 'GDK_STRUCTURE_MASK'
531
532 · 'property-change-mask' / 'GDK_PROPERTY_CHANGE_MASK'
533
534 · 'visibility-notify-mask' / 'GDK_VISIBILITY_NOTIFY_MASK'
535
536 · 'proximity-in-mask' / 'GDK_PROXIMITY_IN_MASK'
537
538 · 'proximity-out-mask' / 'GDK_PROXIMITY_OUT_MASK'
539
540 · 'substructure-mask' / 'GDK_SUBSTRUCTURE_MASK'
541
542 · 'scroll-mask' / 'GDK_SCROLL_MASK'
543
544 · 'all-events-mask' / 'GDK_ALL_EVENTS_MASK'
545
546 enum Gtk2::Gdk::PropMode
547 · 'replace' / 'GDK_PROP_MODE_REPLACE'
548
549 · 'prepend' / 'GDK_PROP_MODE_PREPEND'
550
551 · 'append' / 'GDK_PROP_MODE_APPEND'
552
553 flags Gtk2::Gdk::WMDecoration
554 · 'all' / 'GDK_DECOR_ALL'
555
556 · 'border' / 'GDK_DECOR_BORDER'
557
558 · 'resizeh' / 'GDK_DECOR_RESIZEH'
559
560 · 'title' / 'GDK_DECOR_TITLE'
561
562 · 'menu' / 'GDK_DECOR_MENU'
563
564 · 'minimize' / 'GDK_DECOR_MINIMIZE'
565
566 · 'maximize' / 'GDK_DECOR_MAXIMIZE'
567
568 flags Gtk2::Gdk::WMFunction
569 · 'all' / 'GDK_FUNC_ALL'
570
571 · 'resize' / 'GDK_FUNC_RESIZE'
572
573 · 'move' / 'GDK_FUNC_MOVE'
574
575 · 'minimize' / 'GDK_FUNC_MINIMIZE'
576
577 · 'maximize' / 'GDK_FUNC_MAXIMIZE'
578
579 · 'close' / 'GDK_FUNC_CLOSE'
580
581 enum Gtk2::Gdk::WindowEdge
582 · 'north-west' / 'GDK_WINDOW_EDGE_NORTH_WEST'
583
584 · 'north' / 'GDK_WINDOW_EDGE_NORTH'
585
586 · 'north-east' / 'GDK_WINDOW_EDGE_NORTH_EAST'
587
588 · 'west' / 'GDK_WINDOW_EDGE_WEST'
589
590 · 'east' / 'GDK_WINDOW_EDGE_EAST'
591
592 · 'south-west' / 'GDK_WINDOW_EDGE_SOUTH_WEST'
593
594 · 'south' / 'GDK_WINDOW_EDGE_SOUTH'
595
596 · 'south-east' / 'GDK_WINDOW_EDGE_SOUTH_EAST'
597
598 flags Gtk2::Gdk::WindowHints
599 · 'pos' / 'GDK_HINT_POS'
600
601 · 'min-size' / 'GDK_HINT_MIN_SIZE'
602
603 · 'max-size' / 'GDK_HINT_MAX_SIZE'
604
605 · 'base-size' / 'GDK_HINT_BASE_SIZE'
606
607 · 'aspect' / 'GDK_HINT_ASPECT'
608
609 · 'resize-inc' / 'GDK_HINT_RESIZE_INC'
610
611 · 'win-gravity' / 'GDK_HINT_WIN_GRAVITY'
612
613 · 'user-pos' / 'GDK_HINT_USER_POS'
614
615 · 'user-size' / 'GDK_HINT_USER_SIZE'
616
617 flags Gtk2::Gdk::WindowState
618 · 'withdrawn' / 'GDK_WINDOW_STATE_WITHDRAWN'
619
620 · 'iconified' / 'GDK_WINDOW_STATE_ICONIFIED'
621
622 · 'maximized' / 'GDK_WINDOW_STATE_MAXIMIZED'
623
624 · 'sticky' / 'GDK_WINDOW_STATE_STICKY'
625
626 · 'fullscreen' / 'GDK_WINDOW_STATE_FULLSCREEN'
627
628 · 'above' / 'GDK_WINDOW_STATE_ABOVE'
629
630 · 'below' / 'GDK_WINDOW_STATE_BELOW'
631
632 enum Gtk2::Gdk::WindowType
633 · 'root' / 'GDK_WINDOW_ROOT'
634
635 · 'toplevel' / 'GDK_WINDOW_TOPLEVEL'
636
637 · 'child' / 'GDK_WINDOW_CHILD'
638
639 · 'dialog' / 'GDK_WINDOW_DIALOG'
640
641 · 'temp' / 'GDK_WINDOW_TEMP'
642
643 · 'foreign' / 'GDK_WINDOW_FOREIGN'
644
645 · 'offscreen' / 'GDK_WINDOW_OFFSCREEN'
646
647 enum Gtk2::Gdk::WindowTypeHint
648 · 'normal' / 'GDK_WINDOW_TYPE_HINT_NORMAL'
649
650 · 'dialog' / 'GDK_WINDOW_TYPE_HINT_DIALOG'
651
652 · 'menu' / 'GDK_WINDOW_TYPE_HINT_MENU'
653
654 · 'toolbar' / 'GDK_WINDOW_TYPE_HINT_TOOLBAR'
655
656 · 'splashscreen' / 'GDK_WINDOW_TYPE_HINT_SPLASHSCREEN'
657
658 · 'utility' / 'GDK_WINDOW_TYPE_HINT_UTILITY'
659
660 · 'dock' / 'GDK_WINDOW_TYPE_HINT_DOCK'
661
662 · 'desktop' / 'GDK_WINDOW_TYPE_HINT_DESKTOP'
663
664 · 'dropdown-menu' / 'GDK_WINDOW_TYPE_HINT_DROPDOWN_MENU'
665
666 · 'popup-menu' / 'GDK_WINDOW_TYPE_HINT_POPUP_MENU'
667
668 · 'tooltip' / 'GDK_WINDOW_TYPE_HINT_TOOLTIP'
669
670 · 'notification' / 'GDK_WINDOW_TYPE_HINT_NOTIFICATION'
671
672 · 'combo' / 'GDK_WINDOW_TYPE_HINT_COMBO'
673
674 · 'dnd' / 'GDK_WINDOW_TYPE_HINT_DND'
675
677 Gtk2, Glib::Object, Gtk2::Gdk::Drawable
678
680 Copyright (C) 2003-2008 by the gtk2-perl team.
681
682 This software is licensed under the LGPL. See Gtk2 for a full notice.
683
684
685
686perl v5.12.0 2010-05-02 Gtk2::Gdk::Window(3)