1Gtk2::Window(3)       User Contributed Perl Documentation      Gtk2::Window(3)
2
3
4

NAME

6       Gtk2::Window
7

HIERARCHY

9         Glib::Object
10         +----Glib::InitiallyUnowned
11              +----Gtk2::Object
12                   +----Gtk2::Widget
13                        +----Gtk2::Container
14                             +----Gtk2::Bin
15                                  +----Gtk2::Window
16

INTERFACES

18         Glib::Object::_Unregistered::AtkImplementorIface
19

METHODS

21       widget = Gtk2::Window->new ($type=GTK_WINDOW_TOPLEVEL)
22
23           * $type (Gtk2::WindowType)
24
25       boolean = $window->get_accept_focus
26
27       $window->set_accept_focus ($setting)
28
29           * $setting (boolean)
30
31       boolean = $window->activate_default
32
33       boolean = $window->activate_focus
34
35       boolean = $window->activate_key ($event)
36
37           * $event (Gtk2::Gdk::Event::Key)
38
39       $window->add_accel_group ($accel_group)
40
41           * $accel_group (Gtk2::AccelGroup)
42
43       $window->add_embedded_xid ($xid)
44
45           * $xid (integer)
46
47       $window->add_mnemonic ($keyval, $target)
48
49           * $keyval (integer)
50           * $target (Gtk2::Widget)
51
52       Gtk2::Window->set_auto_startup_notification ($setting)
53
54           * $setting (boolean)
55
56       $window->begin_move_drag ($button, $root_x, $root_y, $timestamp)
57
58           * $button (integer)
59           * $root_x (integer)
60           * $root_y (integer)
61           * $timestamp (unsigned)
62
63       $window->begin_resize_drag ($edge, $button, $root_x, $root_y, $time‐
64       stamp)
65
66           * $edge (Gtk2::Gdk::WindowEdge)
67           * $button (integer)
68           * $root_x (integer)
69           * $root_y (integer)
70           * $timestamp (unsigned)
71
72       boolean = $window->get_decorated
73
74       $window->set_decorated ($setting)
75
76           * $setting (boolean)
77
78       Gtk2::Window->set_default_icon_from_file ($filename)
79
80       $window->set_default_icon_from_file ($filename)
81
82           * $filename (localized file name)
83
84           May croak with a Glib::Error in $@ on failure.
85
86       list = Gtk2::Window->get_default_icon_list
87
88           Gets the value set by $window->set_default_icon_list.
89
90       $window->set_default_icon_list ($pixbuf1, ...)
91
92           * ... (list)
93           * $pixbuf1 (Gtk2::Gdk::Pixbuf)
94
95       Gtk2::Window->set_default_icon_name ($name)
96
97           * $name (string)
98
99       Gtk2::Window->set_default_icon ($icon)
100
101           * $icon (Gtk2::Gdk::Pixbuf)
102
103       $window->set_default ($default_widget)
104
105           * $default_widget (Gtk2::Widget or undef)
106
107       (width, height) = $window->get_default_size
108
109       $window->set_default_size ($width, $height)
110
111           * $width (integer)
112           * $height (integer)
113
114       $window->deiconify
115
116       boolean = $window->get_deletable
117
118       $window->set_deletable ($setting)
119
120           * $setting (boolean)
121
122       boolean = $window->get_destroy_with_parent
123
124       $window->set_destroy_with_parent ($setting)
125
126           * $setting (boolean)
127
128       widget or undef = $window->get_focus
129
130       boolean = $window->get_focus_on_map
131
132       $window->set_focus_on_map ($setting)
133
134           * $setting (boolean)
135
136       $window->set_focus ($focus=undef)
137
138           * $focus (Gtk2::Widget or undef)
139
140       (left, top, right, bottom) = $window->get_frame_dimensions
141
142       $window->set_frame_dimensions ($left, $top, $right, $bottom)
143
144           * $left (integer)
145           * $top (integer)
146           * $right (integer)
147           * $bottom (integer)
148
149       $window->fullscreen
150
151       $window->set_geometry_hints ($geometry_widget, $geometry)
152
153       $window->set_geometry_hints ($geometry_widget, $geometry, $geom_mask)
154
155           * $geometry_widget (Gtk2::Widget)
156           * $geometry_ref (scalar)
157           * $geom_mask_sv (scalar)
158           * $geom_mask (Gtk2::Gdk::WindowHints) optional, usually inferred
159           from $geometry
160           * $geometry (Gtk2::Gdk::Geometry)
161
162           The geom_mask argument, describing which fields in the geometry are
163           valid, is optional.  If omitted it will be inferred from the geome‐
164           try itself.
165
166       gravity = $window->get_gravity
167
168       $window->set_gravity ($gravity)
169
170           * $gravity (Gtk2::Gdk::Gravity)
171
172       windowgroup or undef = $window->get_group
173
174       boolean = $window->get_has_frame
175
176       $window->set_has_frame ($setting)
177
178           * $setting (boolean)
179
180       boolean = $window->has_toplevel_focus
181
182       $window->set_icon_from_file ($filename)
183
184           * $filename (localized file name)
185
186           May croak with a Glib::Error in $@ on failure.
187
188       pixbuf or undef = $window->get_icon
189
190       list = $window->get_icon_list
191
192           Retrieves the list of icons set by set_icon_list ().
193
194       $window->set_icon_list (...)
195
196           * ... (list) of Gtk2::Gdk::Pixbuf's
197
198           Sets up the icon representing a Gtk2::Window. The icon is used when
199           the window is minimized (also known as iconified). Some window man‐
200           agers or desktop environments may also place it in the window
201           frame, or display it in other contexts.
202
203           set_icon_list () allows you to pass in the same icon in several
204           hand-drawn sizes. The list should contain the natural sizes your
205           icon is available in; that is, don't scale the image before passing
206           it to GTK+.  Scaling is postponed until the last minute, when the
207           desired final size is known, to allow best quality.
208
209           By passing several sizes, you may improve the final image quality
210           of the icon, by reducing or eliminating automatic image scaling.
211
212           Recommended sizes to provide: 16x16, 32x32, 48x48 at minimum, and
213           larger images (64x64, 128x128) if you have them.
214
215       string or undef = $window->get_icon_name
216
217       $window->set_icon_name ($name)
218
219           * $name (string)
220
221       $window->set_icon ($icon)
222
223           * $icon (Gtk2::Gdk::Pixbuf or undef)
224
225       $window->iconify
226
227       boolean = $window->is_active
228
229       $window->set_keep_above ($setting)
230
231           * $setting (boolean)
232
233       $window->set_keep_below ($setting)
234
235           * $setting (boolean)
236
237       list = Gtk2::Window->list_toplevels
238
239           Returns a list of all existing toplevel windows.
240
241       $window->maximize
242
243       boolean = $window->mnemonic_activate ($keyval, $modifier)
244
245           * $keyval (integer)
246           * $modifier (Gtk2::Gdk::ModifierType)
247
248       modifiertype = $window->get_mnemonic_modifier
249
250       $window->set_mnemonic_modifier ($modifier)
251
252           * $modifier (Gtk2::Gdk::ModifierType)
253
254       boolean = $window->get_modal
255
256       $window->set_modal ($modal)
257
258           * $modal (boolean)
259
260       $window->move ($x, $y)
261
262           * $x (integer)
263           * $y (integer)
264
265       boolean = $window->parse_geometry ($geometry)
266
267           * $geometry (string)
268
269       (root_x, root_y) = $window->get_position
270
271       $window->set_position ($position)
272
273           * $position (Gtk2::WindowPosition)
274
275       $window->present
276
277       $window->present_with_time ($timestamp)
278
279           * $timestamp (unsigned)
280
281       boolean = $window->propagate_key_event ($event)
282
283           * $event (Gtk2::Gdk::Event::Key)
284
285       $window->remove_accel_group ($accel_group)
286
287           * $accel_group (Gtk2::AccelGroup)
288
289       $window->remove_embedded_xid ($xid)
290
291           * $xid (integer)
292
293       $window->remove_mnemonic ($keyval, $target)
294
295           * $keyval (integer)
296           * $target (Gtk2::Widget)
297
298       $window->reshow_with_initial_size
299
300       boolean = $window->get_resizable
301
302       $window->set_resizable ($resizable)
303
304           * $resizable (boolean)
305
306       $window->resize ($width, $height)
307
308           * $width (integer)
309           * $height (integer)
310
311       string = $window->get_role
312
313       $window->set_role ($role)
314
315           * $role (string)
316
317       screen = $window->get_screen
318
319       $window->set_screen ($screen)
320
321           * $screen (Gtk2::Gdk::Screen)
322
323       (width, height) = $window->get_size
324
325       boolean = $window->get_skip_pager_hint
326
327       $window->set_skip_pager_hint ($setting)
328
329           * $setting (boolean)
330
331       boolean = $window->get_skip_taskbar_hint
332
333       $window->set_skip_taskbar_hint ($setting)
334
335           * $setting (boolean)
336
337       $window->stick
338
339       string = $window->get_title
340
341       $window->set_title ($title=undef)
342
343           * $title (string or undef)
344
345       window or undef = $window->get_transient_for
346
347       $window->set_transient_for ($parent)
348
349           * $parent (Gtk2::Window or undef)
350
351       windowtypehint = $window->get_type_hint
352
353       $window->set_type_hint ($hint)
354
355           * $hint (Gtk2::Gdk::WindowTypeHint)
356
357       $window->unfullscreen
358
359       $window->unmaximize
360
361       $window->unstick
362
363       boolean = $window->get_urgency_hint
364
365       $window->set_urgency_hint ($setting)
366
367           * $setting (boolean)
368
369       $window->set_wmclass ($wmclass_name, $wmclass_class)
370
371           * $wmclass_name (string)
372           * $wmclass_class (string)
373

PROPERTIES

375       'accept-focus' (boolean : readable / writable / private)
376           TRUE if the window should receive the input focus.
377
378       'allow-grow' (boolean : readable / writable / private)
379           If TRUE, users can expand the window beyond its minimum size
380
381       'allow-shrink' (boolean : readable / writable / private)
382           If TRUE, the window has no mimimum size. Setting this to TRUE is
383           99% of the time a bad idea
384
385       'decorated' (boolean : readable / writable / private)
386           Whether the window should be decorated by the window manager
387
388       'default-height' (integer : readable / writable / private)
389           The default height of the window, used when initially showing the
390           window
391
392       'default-width' (integer : readable / writable / private)
393           The default width of the window, used when initially showing the
394           window
395
396       'deletable' (boolean : readable / writable / private)
397           Whether the window frame should have a close button
398
399       'destroy-with-parent' (boolean : readable / writable / private)
400           If this window should be destroyed when the parent is destroyed
401
402       'focus-on-map' (boolean : readable / writable / private)
403           TRUE if the window should receive the input focus when mapped.
404
405       'gravity' (Gtk2::Gdk::Gravity : readable / writable / private)
406           The window gravity of the window
407
408       'has-toplevel-focus' (boolean : readable / private)
409           Whether the input focus is within this GtkWindow
410
411       'icon' (Gtk2::Gdk::Pixbuf : readable / writable / private)
412           Icon for this window
413
414       'icon-name' (string : readable / writable / private)
415           Name of the themed icon for this window
416
417       'is-active' (boolean : readable / private)
418           Whether the toplevel is the current active window
419
420       'modal' (boolean : readable / writable / private)
421           If TRUE, the window is modal (other windows are not usable while
422           this one is up)
423
424       'resizable' (boolean : readable / writable / private)
425           If TRUE, users can resize the window
426
427       'role' (string : readable / writable / private)
428           Unique identifier for the window to be used when restoring a ses‐
429           sion
430
431       'screen' (Gtk2::Gdk::Screen : readable / writable / private)
432           The screen where this window will be displayed
433
434       'skip-pager-hint' (boolean : readable / writable / private)
435           TRUE if the window should not be in the pager.
436
437       'skip-taskbar-hint' (boolean : readable / writable / private)
438           TRUE if the window should not be in the task bar.
439
440       'title' (string : readable / writable / private)
441           The title of the window
442
443       'transient-for' (Gtk2::Window : readable / writable / construct / pri‐
444       vate)
445           The transient parent of the dialog
446
447       'type' (Gtk2::WindowType : readable / writable / construct-only / pri‐
448       vate)
449           The type of the window
450
451       'type-hint' (Gtk2::Gdk::WindowTypeHint : readable / writable / private)
452           Hint to help the desktop environment understand what kind of window
453           this is and how to treat it.
454
455       'urgency-hint' (boolean : readable / writable / private)
456           TRUE if the window should be brought to the user's attention.
457
458       'window-position' (Gtk2::WindowPosition : readable / writable / pri‐
459       vate)
460           The initial position of the window
461

SIGNALS

463       set-focus (Gtk2::Window, Gtk2::Widget)
464       boolean = frame-event (Gtk2::Window, Gtk2::Gdk::Event)
465       activate-focus (Gtk2::Window)
466       activate-default (Gtk2::Window)
467       move-focus (Gtk2::Window, Gtk2::DirectionType)
468       keys-changed (Gtk2::Window)
469

ENUMS AND FLAGS

471       enum Gtk2::DirectionType
472
473       * 'tab-forward' / 'GTK_DIR_TAB_FORWARD'
474       * 'tab-backward' / 'GTK_DIR_TAB_BACKWARD'
475       * 'up' / 'GTK_DIR_UP'
476       * 'down' / 'GTK_DIR_DOWN'
477       * 'left' / 'GTK_DIR_LEFT'
478       * 'right' / 'GTK_DIR_RIGHT'
479
480       enum Gtk2::Gdk::Gravity
481
482       * 'north-west' / 'GDK_GRAVITY_NORTH_WEST'
483       * 'north' / 'GDK_GRAVITY_NORTH'
484       * 'north-east' / 'GDK_GRAVITY_NORTH_EAST'
485       * 'west' / 'GDK_GRAVITY_WEST'
486       * 'center' / 'GDK_GRAVITY_CENTER'
487       * 'east' / 'GDK_GRAVITY_EAST'
488       * 'south-west' / 'GDK_GRAVITY_SOUTH_WEST'
489       * 'south' / 'GDK_GRAVITY_SOUTH'
490       * 'south-east' / 'GDK_GRAVITY_SOUTH_EAST'
491       * 'static' / 'GDK_GRAVITY_STATIC'
492
493       flags Gtk2::Gdk::ModifierType
494
495       * 'shift-mask' / 'GDK_SHIFT_MASK'
496       * 'lock-mask' / 'GDK_LOCK_MASK'
497       * 'control-mask' / 'GDK_CONTROL_MASK'
498       * 'mod1-mask' / 'GDK_MOD1_MASK'
499       * 'mod2-mask' / 'GDK_MOD2_MASK'
500       * 'mod3-mask' / 'GDK_MOD3_MASK'
501       * 'mod4-mask' / 'GDK_MOD4_MASK'
502       * 'mod5-mask' / 'GDK_MOD5_MASK'
503       * 'button1-mask' / 'GDK_BUTTON1_MASK'
504       * 'button2-mask' / 'GDK_BUTTON2_MASK'
505       * 'button3-mask' / 'GDK_BUTTON3_MASK'
506       * 'button4-mask' / 'GDK_BUTTON4_MASK'
507       * 'button5-mask' / 'GDK_BUTTON5_MASK'
508       * 'super-mask' / 'GDK_SUPER_MASK'
509       * 'hyper-mask' / 'GDK_HYPER_MASK'
510       * 'meta-mask' / 'GDK_META_MASK'
511       * 'release-mask' / 'GDK_RELEASE_MASK'
512       * 'modifier-mask' / 'GDK_MODIFIER_MASK'
513
514       enum Gtk2::Gdk::WindowEdge
515
516       * 'north-west' / 'GDK_WINDOW_EDGE_NORTH_WEST'
517       * 'north' / 'GDK_WINDOW_EDGE_NORTH'
518       * 'north-east' / 'GDK_WINDOW_EDGE_NORTH_EAST'
519       * 'west' / 'GDK_WINDOW_EDGE_WEST'
520       * 'east' / 'GDK_WINDOW_EDGE_EAST'
521       * 'south-west' / 'GDK_WINDOW_EDGE_SOUTH_WEST'
522       * 'south' / 'GDK_WINDOW_EDGE_SOUTH'
523       * 'south-east' / 'GDK_WINDOW_EDGE_SOUTH_EAST'
524
525       flags Gtk2::Gdk::WindowHints
526
527       * 'pos' / 'GDK_HINT_POS'
528       * 'min-size' / 'GDK_HINT_MIN_SIZE'
529       * 'max-size' / 'GDK_HINT_MAX_SIZE'
530       * 'base-size' / 'GDK_HINT_BASE_SIZE'
531       * 'aspect' / 'GDK_HINT_ASPECT'
532       * 'resize-inc' / 'GDK_HINT_RESIZE_INC'
533       * 'win-gravity' / 'GDK_HINT_WIN_GRAVITY'
534       * 'user-pos' / 'GDK_HINT_USER_POS'
535       * 'user-size' / 'GDK_HINT_USER_SIZE'
536
537       enum Gtk2::Gdk::WindowTypeHint
538
539       * 'normal' / 'GDK_WINDOW_TYPE_HINT_NORMAL'
540       * 'dialog' / 'GDK_WINDOW_TYPE_HINT_DIALOG'
541       * 'menu' / 'GDK_WINDOW_TYPE_HINT_MENU'
542       * 'toolbar' / 'GDK_WINDOW_TYPE_HINT_TOOLBAR'
543       * 'splashscreen' / 'GDK_WINDOW_TYPE_HINT_SPLASHSCREEN'
544       * 'utility' / 'GDK_WINDOW_TYPE_HINT_UTILITY'
545       * 'dock' / 'GDK_WINDOW_TYPE_HINT_DOCK'
546       * 'desktop' / 'GDK_WINDOW_TYPE_HINT_DESKTOP'
547       * 'dropdown-menu' / 'GDK_WINDOW_TYPE_HINT_DROPDOWN_MENU'
548       * 'popup-menu' / 'GDK_WINDOW_TYPE_HINT_POPUP_MENU'
549       * 'tooltip' / 'GDK_WINDOW_TYPE_HINT_TOOLTIP'
550       * 'notification' / 'GDK_WINDOW_TYPE_HINT_NOTIFICATION'
551       * 'combo' / 'GDK_WINDOW_TYPE_HINT_COMBO'
552       * 'dnd' / 'GDK_WINDOW_TYPE_HINT_DND'
553
554       enum Gtk2::WindowPosition
555
556       * 'none' / 'GTK_WIN_POS_NONE'
557       * 'center' / 'GTK_WIN_POS_CENTER'
558       * 'mouse' / 'GTK_WIN_POS_MOUSE'
559       * 'center-always' / 'GTK_WIN_POS_CENTER_ALWAYS'
560       * 'center-on-parent' / 'GTK_WIN_POS_CENTER_ON_PARENT'
561
562       enum Gtk2::WindowType
563
564       * 'toplevel' / 'GTK_WINDOW_TOPLEVEL'
565       * 'popup' / 'GTK_WINDOW_POPUP'
566

SEE ALSO

568       Gtk2, Glib::Object, Glib::InitiallyUnowned, Gtk2::Object, Gtk2::Widget,
569       Gtk2::Container, Gtk2::Bin
570
572       Copyright (C) 2003-2007 by the gtk2-perl team.
573
574       This software is licensed under the LGPL.  See Gtk2 for a full notice.
575
576
577
578perl v5.8.8                       2007-03-18                   Gtk2::Window(3)
Impressum