"accept-focus"Read-WriteIf True, the window should receive
the input focus. Default value: True. Available in GTK+
2.4 and above."allow-grow"Read-WriteIf True, the user can expand the
window beyond its minimum size. Default value: True."allow-shrink"Read-WriteIf True, the window has no minimum
size. Setting this to True is a bad
idea 99% of the time. Default value: False."decorated"Read-WriteIf True, the window should be
decorated by the window manager. Default value: True.
Available in GTK+ 2.4 and above."default-height"Read-WriteThe default height of the window, used when initially
showing the window. Allowed values: >= -1. Default value: -1"default-width"Read-WriteThe default width of the window, used when initially
showing the window. Allowed values: >= -1. Default value: -1"deletable"Read-WriteIf True the window frame should have
a close button. This property is available in GTK+ 2.10 and
above."destroy-with-parent"Read-WriteIf True, the window should be
destroyed when its parent is destroyed. Default value:
False."focus-on-map"Read-WriteIf True, the window should
receive the input focus when mapped. Default value:
True. Available in GTK+ 2.6 and above."gravity"Read-WriteThe window gravity of the window. See the move()
method and the for more details about window
gravity. Default value:
gtk.gdk.GRAVITY_NORTH_WEST. Available in GTK+ 2.4 and
above."has-toplevel-focus"ReadIf True, the input focus is within
the window. Default value: False. Available in GTK+ 2.2
and above."icon"Read-WriteThe icon for this window"icon-name"Read-WriteThe name of the themed icon to use as the window icon.
See gtk.IconTheme
for more details. Default value: None. Available in
GTK+ 2.6 and above."is-active"ReadIf True, the toplevel is the current
active window. Default value: False. Available in GTK+ 2.2
and above."modal"Read-WriteIf True, the window is modal (other
windows are not usable while this one is up). Default value:
False."opacity"Read-WriteThe requested opacity of the window. See
gtk.Window.set_opacity()
for more details about window opacity.
Allowed values: [0,1] Default value: 1.
Available in GTK+ 2.12."resizable"Read-WriteIf True, the user can resize the
window. Default value: True."role"Read-WriteUnique identifier for the window to be used when
restoring a session. Default value: None. Available in
GTK+ 2.4"screen"Read-WriteThe screen where this window will be displayed.
Available in GTK+ 2.2"skip-pager-hint"Read-WriteIf True, the window should not be
in the pager. Default value: False. Available in GTK+ 2.2
and above."skip-taskbar-hint"Read-WriteIf True, the window should not be
in the task bar. Default value: False. Available in GTK+
2.2 and above."startup-id"WriteThe :startup-id is a write-only property for setting window's
startup notification identifier. See
gtk.Window.set_startup_id()
for more details. Default value: NULL.
Available in GTK+ 2.12 and above."title"Read-WriteThe title of the window. Default value: None."transient-for"Read-Write-ConstructThe transient parent of the window. See gtk.Window.set_transient_for()
for more details about transient windows. This property is
available in GTK+ 2.10 and above."type"Read-WriteThe type of the window. Default value:
gtk.WINDOW_TOPLEVEL"type-hint"Read-WriteHint to help the desktop environment understand what
kind of window this is and how to treat it. Default value:
gtk.gdk.WINDOW_TYPE_HINT_NORMAL. Available in GTK+ 2.2
and above."urgency-hint"Read-WriteIf True the window should be brought to the users
attention. Default value: False. Available in GTK+ 2.8
and above."window-position"Read-WriteThe initial position of the window. Default value:
gtk.WIN_POS_NONE
"allow_grow"ReadIf True, users can expand the window
beyond its minimum size."allow_shrink"ReadIf True, the window has no minimum
size."configure_notify_received"ReadIf True a window resize
configuration event has been received."configure_request_count"ReadThe number of outstanding configuration
requests."decorated"ReadIf True the window will have
decorations like a titlebar, resize controls, etc. See the set_decorated()
method."default_widget"ReadThe child widget that will be activated by default. See
the set_default()
method."destroy_with_parent"ReadIf True the window is destroyed when
its transient parent is destroyed."focus_widget"ReadThe child widget that has the focus."frame"ReadThe frame gtk.gdk.Window (if
any). See the set_has_frame()
and set_frame_dimensions()
methods."frame_bottom"ReadThe height of the bottom frame border. See the set_frame_dimensions()
and set_has_frame()
methods."frame_left"ReadThe width of the left frame border. See the set_frame_dimensions()
and set_has_frame()
methods."frame_right"ReadThe width of the right frame border. See the set_frame_dimensions()
and set_has_frame()
methods."frame_top"ReadThe height of the top frame border. See the set_frame_dimensions()
and set_has_frame()
methods."gravity"ReadThe window's gravity. See the move() and
set_gravity()
methods."group"ReadThe gtk.WindowGroup
(if any) the window belongs to."has_focus"ReadIf True the window has the
focus."has_frame"ReadIf True the window has a frame
window. See the set_has_frame()
method."has_user_ref_count"ReadIf True the window has not been
destroyed."iconify_initially"ReadIf True the window has been
iconified by a call to the iconify()
method."keys_changed_handler"ReadThe idle handler ID for handling accelerator group
changes."maximize_initially"ReadIf True the window has been
maximized by a call to the maximize()
method."mnemonic_modifier"ReadThe mnemonic modifier used with a key to activate an
accelerator. See the set_mnemonic_modifier()
method "modal"ReadIf True the window is modal. See the set_modal()
method."need_default_position"ReadIf True the window needs an initial
position calculated."need_default_size"ReadIf True the window needs an initial
size calculated."position"ReadThe initial position of the window. See the set_position()
method."stick_initially"ReadIf True the window has been made
sticky by a call to the stick()
method."title"ReadThe title of the window."transient_parent"ReadThe transient parent window. See the set_transient_for()
method."type"ReadThe type of the window: gtk.WINDOW_TOPLEVEL or gtk.WINDOW_POPUP."type_hint"ReadThe window's type hint. See the set_type_hint()
method."wmclass_class"ReadThe window system class hint. See the set_wmclass()
method."wmclass_name"ReadThe window system name hint. See the set_wmclass()
method."wm_role"ReadThe unique identifier for the window. See the set_role()
method.
gtk.Window Signal Prototypesgobject.GObject Signal Prototypesgtk.Object Signal Prototypesgtk.Widget Signal Prototypesgtk.Container Signal Prototypes"activate-default"callbackwindowuser_param1..."activate-focus"callbackwindowuser_param1..."frame-event"callbackwindoweventuser_param1..."keys-changed"callbackwindowuser_param1..."move-focus"callbackwindowdirectionuser_param1..."set-focus"callbackwindowwidgetuser_param1...DescriptionA gtk.Window provides
a widget that users commonly think of as a window. That is, an area of the
display that is managed by the window manager and usually decorated with a
title bar, and items to allow the user to close, resize and move the
window. PyGTK provides two types of windows (see the
section for more
information):gtk.WINDOW_TOPLEVELA window that has no parent and usually has a frame and
decorations supplied by a window manager. Toplevels windows are the main
application window and dialogs.gtk.WINDOW_POPUPA window that is ignored by the window manager and has no
frame or decorations. A popup window is used for menus and
tooltips.Typically, applications only directly create and use toplevel
windows.A gtk.Window is a container (subclass of gtk.Bin) holding one child widget.Constructorgtk.Windowtypegtk.WINDOW_TOPLEVELtype :the type of window:
gtk.WINDOW_TOPLEVEL or
gtk.WINDOW_POPUPReturns :a new gtk.Window.Creates a new gtk.Window, which is
a toplevel window that can contain other widgets. Nearly always, the type of
the window should be gtk.WINDOW_TOPLEVEL (see the for more details).
gtk.WINDOW_POPUP is used to create a pop-up menu or
pop-up tooltip. On X11, popup windows are not controlled by the window
manager. If you simply want an undecorated window (no window borders), use
the set_decorated()
method with a toplevel window, don't use a popup window.Methodsgtk.Window.set_titleset_titletitletitle :the title of the windowThe set_title() method sets the "title" property
of the gtk.Window to the
value specified by title. The title of a window will
be displayed in its title bar. On the X Window System, the title bar is
rendered by the window manager, so exactly how the title appears to users
may vary according to a user's exact configuration. The title should help a
user distinguish this window from other windows they may have open. A good
title might include the application name and current document
filename.gtk.Window.get_titleget_titleReturns :the title of the window, or
None.The get_title() method returns the
value of the "title" property of the window. See the set_title()
method.gtk.Window.set_wmclassset_wmclasswmclass_namewmclass_classwmclass_name :the window name hintwmclass_class :the window class hintThe set_wmclass() method sets the X
Window System "class" and "name" hints for a window. Applications should not
call this method. According to the ICCCM, you should always set these to the
same value for all windows in an application, and PyGTK
sets them to that value by default, so calling this method is sort of
pointless. However, you may want to call the set_role()
method on each window in your application, for the benefit of the session
manager. Setting the role allows the window manager to restore window
positions when loading a saved session.gtk.Window.set_roleset_rolerolerole :a unique identifier for the
windowThe set_role() method sets a unique
identifier (specified by role) for the window to be
used when restoring a session. This method is only useful on X11. In
combination with the window title, the window role allows a window manager
to identify "the same" window when an application is restarted. So for
example you might set the "toolbox" role on your app's toolbox window, so
that when the user restarts their session, the window manager can put the
toolbox back in the same place. If a window already has a unique title, you
don't need to set the role, since the WM can use the title to identify the
window when restoring the session.dgtk.Window.get_roleget_roleReturns :the role of the window if set, or
None.The get_role() method returns the role
of the window. See the set_role()
method for further explanation.gtk.Window.add_accel_groupadd_accel_groupaccel_groupaccel_group :a gtk.AccelGroupThe add_accel_group() method associates
the accelerator group specified by accel_group with
the window.gtk.Window.remove_accel_groupremove_accel_groupaccel_groupaccel_group :a gtk.AccelGroupThe remove_accel_group() method
dissociates the accelerator group specified by
accel_group from the widget. This method reverses the
effects of the add_accel_group()
method.gtk.Window.set_positionset_positionpositionposition :a position constraint.The set_position() method sets the
"window-position" property to the value of position.
The value of position must be one of the .If the old or new window position constraint is
gtk.WIN_POS_CENTER_ALWAYS, this will also cause the
window to be repositioned to satisfy the new constraint.gtk.Window.activate_focusactivate_focusReturns :True if the window has a
focus widgetThe activate_focus() method activates
the child widget with the focus. This method returns True
if the window has a widget with the focus.gtk.Window.set_focusset_focusfocusfocus :the widget to be the new focus
widget or None to unset a focus widgetThe set_focus() method sets the widget
specified by focus to be the focus widget for the
window. If focus is None the
window's focus widget is unset. To set the focus to a particular widget in
the toplevel, it is usually more convenient to use the gtk.Widget.grab_focus()
method instead of this method.gtk.Window.get_focusget_focusReturns :the currently focused
widget.The get_focus() method returns the
current focused widget within the window. The focus widget is the widget
that would have the focus if the toplevel window is focused.gtk.Window.set_defaultset_defaultdefault_widgetdefault_widget :the widget to be the default, or
None to unset the default widget.The set_default() method sets the
window's default widget to the value specified by
default_widget. If
default_widget is None the
window's default widget is unset. The default widget is the widget that's
activated when the user presses Enter in a window. When
setting (rather than unsetting) the default widget it's generally easier to
call the gtk.Widget.grab_default()
method on the widget. Before making a widget the default widget, you must
set the gtk.CAN_DEFAULT flag on the widget you'd like to
make the default using the gtk.Object.set_flags()
method.gtk.Window.activate_defaultactivate_defaultReturns :True if the window has a
default widget or a focus widget.The activate_default() method activates
the default widget. If there is no default widget or the default widget
cannot be activated, the window's focus widget (if any) is activated. This
method returns False if no default widget could be
activated or there is no focus widget.gtk.Window.set_transient_forset_transient_forparentparent :the parent window or None to
remove the transient parentThe set_transient_for() method sets the
window as a transient window for the window specified by
parent. Dialog windows should be set transient for
the main application window they were spawned from. This allows window
managers to keep the dialog on top of the main window, or center the dialog
over the main window. The gtk.Dialog() constructor and other
convenience functions in PyGTK will sometimes call the
set_transient_for() method on your behalf.
On Windows, this method will and put the child window on top of the parent,
much as the window manager would have done on X.gtk.Window.get_transient_forget_transient_forReturns :the transient parent for this window, or
None if no transient parent has been
set.The get_transient_for() method returns
the transient parent for this window or None if no
transient window is set. See the set_transient_for()
method.gtk.Window.set_type_hintset_type_hinthinthint :the window typeThe set_type_hint() method sets the
window type hint for the window to the value specified by
hint. The value of hint must
be one of the .By setting the type hint for the window, you allow the window
manager to decorate and handle the window in a way which is suitable to the
method of the window in your application. This method should be called
before the window becomes visible. The gtk.Dialog() constructor and other
convenience functions in PyGTK will sometimes call this
method on your behalf.gtk.Window.get_type_hintget_type_hintReturns :the type hint for the
window.The get_type_hint() method returns the
type hint for this window. See the set_type_hint()
method.gtk.Window.set_destroy_with_parentset_destroy_with_parentsettingsetting :if True destroy the window
with its transient parentThe set_destroy_with_parent() method
sets the "destroy-with-parent" property to the value specified by
setting. If setting is
True, destroying the transient parent of the window will
also destroy the window itself. This is useful for dialogs that shouldn't
persist beyond the lifetime of the main window they're associated
with.gtk.Window.get_destroy_with_parentget_destroy_with_parentReturns :True if the window will be
destroyed with its transient parent.The get_destroy_with_parent() method
returns the value of the "destroy-with-parent" property that determines if
the window will be destroyed with its transient parent. See the set_destroy_with_parent()
method.gtk.Window.set_resizableset_resizableresizableresizable :if True the user can resize
this windowThe set_resizable() method sets the
"resizable" property to the value of resizable. If
resizable is True the user can
resize the window. Windows are user resizable by default.gtk.Window.get_resizableget_resizableReturns :True if the user can resize
the windowThe get_resizable() method returns the
value of the "resizable" property. See the set_resizable()
method.gtk.Window.set_gravityset_gravitygravitygravity :the window gravityThe set_gravity() method sets the
gravity of the window to the value specified by
gravity. The window gravity defines the meaning of
coordinates passed to the move()
method. The value of gravity must be one of the .The default window gravity is
gtk.gdk.GRAVITY_NORTH_WEST which will typically "do what
you want."gtk.Window.get_gravityget_gravityReturns : the window gravityThe get_gravity() method returns window
gravity. See the set_gravity()
method.gtk.Window.set_geometry_hintsset_geometry_hintsgeometry_widgetmin_width-1min_height-1max_width-1max_height-1base_width-1base_height-1width_inc-1height_inc-1min_aspect-1.0max_aspect-1.0geometry_widget :the widget the geometry hints will be applied
tomin_width :the minimum width of window (or -1 to use
requisition)min_height :the minimum height of window (or -1 to use
requisition)max_width :the maximum width of window (or -1 to use
requisition)max_height :the maximum height of window (or -1 to use
requisition)base_width :allowed window widths are base_width +
width_inc * N where N is any integerbase_height :allowed window heights are base_height +
width_inc * N where N is any integerwidth_inc :the width resize incrementheight_inc :the height resize
incrementmin_aspect :the minimum width to height
ratiomax_aspect :the maximum width to height
ratioThe set_geometry_hints() method sets up
hints about how a window can be resized by the user. You can set the minimum
and maximum widths and heights, the base width and height for resizing, the
allowed width and height resize increments (e.g. for xterm, you can only
resize by the size of a character), and the minimum and maximum aspect
ratios. If geometry_widget is not
None it specifies the widget to figure the geometry
on.gtk.Window.set_screenset_screenscreenscreen :a gtk.gdk.Screen.This method is available in PyGTK 2.2 and above.The set_screen() method sets the
"screen" property to the gtk.gdk.Screen
specified by screen. The "screen" property contains
the screen that the window is displayed on. If the window is already mapped,
it will be unmapped, and then remapped on the new screen.gtk.Window.get_screenget_screenReturns :a gtk.gdk.Screen.This method is available in PyGTK 2.2 and above.The get_screen() method returns the
gtk.gdk.Screen
that the window is displayed on.gtk.Window.is_activeis_activeReturns :True if the window is part
of the current active window.This method is available in PyGTK 2.4 and above.The is_active() method returns
True if the window is part of the current active
toplevel, i.e., the toplevel window receiving keystrokes. The return value
is True if the window is active the toplevel itself, or
if it is, for example, a gtk.Plug embedded in
the active toplevel. You might use this method if you wanted to draw a
widget differently in an active window from a widget in an inactive window.
See the has_toplevel_focus()
method.gtk.Window.has_toplevel_focushas_toplevel_focusReturns :True if the the input focus
is within the windowThis method is available in PyGTK 2.4 and above.The has_toplevel_focus() method returns
True if the input focus is within the window. For real
toplevel windows, this is identical to is_active(),
but for embedded windows, like a gtk.Plug, the results
will differ.gtk.Window.set_has_frameset_has_framesettingsetting :if True PyGTK draws the
window borderThe set_has_frame() method sets the
flag that causes PyGTK to draw its own window border for
the window.This is a special-purpose method for the framebuffer port. For
most applications, you want the set_decorated()
method instead,that tells the window manager whether to draw the window
border.If this method is called on a window with setting of
True, before it is realized or showed, it will have a
"frame" window around the window's gtk.gdk.Window,
accessible in the window's frame. Using the signal "frame-event" you can
receive all events targeted at the frame. This method is used by the
linux-fb port to implement managed windows, but it could conceivably be used
by X-programs that want to do their own window decorations.gtk.Window.get_has_frameget_has_frameReturns :True if a frame has been
added to the window via the set_has_frame()
method.The get_has_frame() method returns the
value of the window's "has_frame" flag that determines if the window has a
frame window exterior to its gtk.gdk.Window. See
the set_has_frame()
method for more information.gtk.Window.set_frame_dimensionsset_frame_dimensionslefttoprightbottomleft :the width of the left
bordertop :the height of the top
borderright :the width of the right
borderbottom :the height of the bottom
borderThe set_frame_dimensions() method sets
the size of the frame around the window to the values specified by
left, top,
bottom and right.This is a special-purpose method intended for the framebuffer
port. See the set_has_frame()
method. It will have no effect on the window border drawn by the window
manager, which is the normal case when using the X Window system.For windows with frames (see the set_has_frame()
method) this method can be used to change the size of the frame
border.gtk.Window.get_frame_dimensionsget_frame_dimensionsReturns :a tuple containing the frame dimensions: the
width of the frame at the left; the height of the frame at the top; the
width of the frame at the right; and, the height of the frame at the
bottom.The get_frame_dimensions() method
returns a tuple containing the frame dimensions: the width of the frame at
the left; the height of the frame at the top; the width of the frame at the
right; and, the height of the frame at the bottom.This is a special-purpose method intended for the framebuffer
port See the set_has_frame()
method. It will not return the size of the window border drawn by the window
manager, which is the normal case when using a windowing system. See the
get_frame_extents()
to get the standard window border extents.See the set_has_frame()
and set_frame_dimensions()
methods for more information.gtk.Window.set_decoratedset_decoratedsettingsetting :if True decorate the
windowThe set_decorated() method sets the
decorated flag to the value specified by setting. If
setting is True the window will be
decorated. By default, windows are decorated with a title bar, resize
controls, etc. Some window managers allow PyGTK to disable these
decorations, creating a borderless window. If you set the decorated property
to False using this method, PyGTK will
do its best to convince the window manager not to decorate the window. On
Windows, this method always works, since there's no window manager policy
involved.gtk.Window.get_decoratedget_decoratedReturns :True if the window has been
set to have decorationsThe get_decorated() method returns the
value of the decorated flag that determines if the window has been set to
have decorations such as a title bar. See the set_decorated()
method.gtk.Window.set_icon_listset_icon_list...... :zero or more gtk.gdk.Pixbuf
objectsThe set_icon_list() method sets up the
icon representing the window using the set of gtk.gdk.Pixbuf
objects passed as arguments. If no gtk.gdk.Pixbuf
objects are passed in the icon is unset and reverts to the default icon. The
icon is used when the window is minimized (also known as iconified). Some
window managers or desktop environments may also place it in the window
frame, or display it in other contexts. This method allows you to pass in
the same icon in several hand-drawn sizes. The gtk.gdk.Pixbuf
objects should contain the natural sizes your icon is available in; i.e.,
don't scale the image before passing it to PyGTK. Scaling
is postponed until the last minute, when the desired final size is known, to
allow best quality. By passing several sizes, you may improve the final
image quality of the icon, by reducing or eliminating automatic image
scaling. The recommended sizes to provide are: 16x16, 32x32, 48x48 at
minimum, and larger images (64x64, 128x128) if you have them.See the gtk.window_set_default_icon_list()
function to set the icon for all windows in your application in one go. Note
that transient windows (those who have been set transient for another window
using the set_transient_for()
method) will inherit their icon from their transient parent. So there's no
need to explicitly set the icon on transient windows.gtk.Window.get_icon_listget_icon_listReturns :a copy of the window's icon
listThe get_icon_list() method returns the
list of icons set by the set_icon_list()
method.gtk.Window.set_iconset_iconiconicon :an icon image, or
NoneThe set_icon() method sets the "icon"
property to the value specified by icon. This icon is
used when the window is minimized (also known as iconified). Some window
managers or desktop environments may also place it in the window frame, or
display it in other contexts. The icon should be provided in whatever size
it was naturally drawn; that is, don't scale the image before passing it to
PyGTK. Scaling is postponed until the last minute, when
the desired final size is known, to allow best quality. If you have your
icon hand-drawn in multiple sizes, use the set_icon_list()
method. Then the best size will be used.This method is equivalent to calling the set_icon_list()
method with a 1-element list. See the gtk.window_set_default_icon_list()
function to set the icon for all windows in your application in one
go.gtk.Window.set_icon_from_fileset_icon_from_filefilenamefilename :the name of a file containing an icon
imageReturns :True if the icon was
loaded.The set_icon_from_file() method sets
the "icon" property to the icon loaded from the file specified by
filename. The icon is used when the window is
minimized (also known as iconified). See the set_icon())
method for more information. This method is equivalent to calling the set_icon()
method with a pixbuf created by loading the image from
filename.The GError exception is raised if an error occurs while loading
the pixbuf from filename.gtk.Window.get_iconget_iconReturns :the icon for windowThe get_icon() method returns the value
of the "icon" property set by the set_icon()
(or if you've called the set_icon_list()
method, returns the first icon in the icon list).gtk.Window.set_modalset_modalmodalmodal :if True the window is
modalThe set_modal() method sets the "modal"
property to the value of modal. If
modal is True the window becomes
modal. Modal windows prevent interaction with other windows in the same
application. Typically modal windows are used for gtk.Dialog windows
that require a user response before the application can continue. To keep
modal dialogs on top of the main application windows, use the set_transient_for()
method to make the dialog transient for the parent - most window managers
will then disallow lowering the dialog below the parent.gtk.Window.get_modalget_modalReturns :True if the window is set to
be modal and establishes a grab when shownThe get_modal() method returns the
value of the "modal" property. If "modal" is True the
window is modal. See the set_modal()
method.gtk.Window.add_mnemonicadd_mnemonickeyvaltargetkeyval :the mnemonic keytarget :the widget that gets activated by the
mnemonicThe add_mnemonic() method adds a
mnemonic key specified by keyval to this window. When
the mnemonic key is pressed the widget specified by
target will be activated.gtk.Window.remove_mnemonicremove_mnemonickeyvaltargetkeyval :the mnemonic keytarget :the widget that gets activated by the
mnemonicThe remove_mnemonic() method removes
the mnemonic specified by keyval for the widget
specified by target from this window.gtk.Window.mnemonic_activatemnemonic_activatekeyvalmodifierkeyval :the mnemonic keymodifier :the modifiersReturns :True if the activation was
doneThe mnemonic_activate() method
activates the targets associated with the mnemonic specified by
keyval. The window's mnemonic modifier must match
modifier to allow the activation to proceed. See the
set_mnemonic_modifier()
method for more information.gtk.Window.set_mnemonic_modifierset_mnemonic_modifiermodifiermodifier :the modifier mask used to activate mnemonics on
this window.The set_mnemonic_modifier() method sets
the mnemonic modifier for this window to the value specified by
modifier. The value of
modifier is one of:gtk.gdk.SHIFT_MASKThe Shift key.gtk.gdk.CONTROL_MASKThe Control key. gtk.gdk.MOD1_MASKThe fourth modifier key (it depends on the modifier
mapping of the X server which key is interpreted as this modifier, but
normally it is the Alt key).gtk.Window.get_mnemonic_modifierget_mnemonic_modifierReturns :the modifier mask used to activate mnemonics on
this window.The get_mnemonic_modifier() method
returns the mnemonic modifier for this window. See the set_mnemonic_modifier()
method for more detail.gtk.Window.activate_keyactivate_keyeventevent :a gtk.gdk.EventReturns :True if a mnemonic or
accelerator was found and activated.This method is available in PyGTK 2.4 and above.The activate_key() method activates
mnemonics and accelerators for the window. This is normally called by the
default gtk.Widget "key-press-event" signal
handler for toplevel windows, however in some cases it may be useful to call
this directly when overriding the standard key handling for a toplevel
window.gtk.Window.propagate_key_eventpropagate_key_eventeventevent :a gtk.gdk.EventReturns :True if a widget in the
focus chain handled the event.This method is available in PyGTK 2.4 and above.The propagate_key_event() method
propagates a key press or release event to the focus widget and up the focus
container chain until a widget handles the key event specified by
event. This is normally called by the default gtk.Widget "key-press-event" and
"key-release-event"
signal handlers for toplevel windows, however in some cases it may be useful
to call this directly when overriding the standard key handling for a
toplevel window.gtk.Window.presentpresentThe present() method presents a window
to the user. This may mean raising the window in the stacking order,
deiconifying it, moving it to the current desktop, and/or giving it the
keyboard focus, possibly dependent on the user's platform, window manager,
and preferences. If the window is hidden, this method calls the the gtk.Widget.show()
method as well. This method should be used when the user tries to open a
window that's already open. Say for example the preferences dialog is
currently open, and the user chooses Preferences
from the menu a second time; use the present()
method to move the already-open dialog where the user can see it.gtk.Window.iconifyiconifyThe iconify() method asks the window
manager to iconify (i.e. minimize) the specified the window. Note that you
shouldn't assume the window is definitely iconified afterward, because other
entities (e.g. the user or window manager) could deiconify it again, or
there may not be a window manager in which case iconification isn't
possible, etc. But normally the window will end up iconified. Just don't
write code that crashes if not. This method can be called before showing a
window, in which case the window will be iconified before it ever appears
on-screen. You can track iconification via the gtk.Widget "window-state-event"
signal.gtk.Window.deiconifydeiconifyThe deiconify() method asks the window
manager to deiconify (i.e. unminimize) the specified the window. Note that
you shouldn't assume the window is definitely deiconified afterward, because
other entities (e.g. the user or window manager) could iconify it again
before your code which assumes deiconification gets to run. You can track
iconification via the gtk.Widget "window-state-event"
signal.gtk.Window.stickstickThe stick() method asks the window
manager to stick the window, which means that it will appear on all user
desktops. Note that you shouldn't assume the window is definitely stuck
afterward, because other entities (e.g. the user or window manager) could
unstick it again, and some window managers do not support sticking windows.
But normally the window will end up stuck. Just don't write code that
crashes if not. This method can be called before showing a window. You can
track stickiness via the gtk.Widget "window-state-event"
signal.gtk.Window.unstickunstickThe unstick() method asks the window manager to unstick the
window, which means that it will appear on only one of the user's desktops.
Note that you shouldn't assume the window is definitely unstuck afterward,
because other entities (e.g. the user or window manager) could stick it
again. But normally the window will end up stuck. Just don't write code that
crashes if not. You can track stickiness via the gtk.Widget "window-state-event"
signal.gtk.Window.maximizemaximizeThe maximize() method asks the window
manager to maximize the window, so that it becomes full-screen. Note that
you shouldn't assume the window is definitely maximized afterward, because
other entities (e.g. the user or window manager) could unmaximize it again,
and not all window managers support maximization. But normally the window
will end up maximized. This method can be called before showing a window, in
which case the window will be maximized when it appears on-screen initially.
You can track maximization via the gtk.Widget "window-state-event"
signal.gtk.Window.unmaximizeunmaximizeThe unmaximize() method asks the window
manager to unmaximize the window. Note that you shouldn't assume the window
is definitely unmaximized afterward, because other entities (e.g. the user
or window manager) could maximize it again, and not all window managers
honor requests to unmaximize. But normally the window will end up
unmaximized. You can track maximization via the gtk.Widget "window-state-event"
signal.gtk.Window.fullscreenfullscreenThis method is available in PyGTK 2.2 and above.The fullscreen() method requests the
window manager to place the window in the fullscreen state. Note you
shouldn't assume the window is definitely full screen afterward, because
other entities (e.g. the user or window manager) could unfullscreen it
again, and not all window managers honor requests to fullscreen windows. But
normally the window will end up fullscreen. Just don't write code that
crashes if not.You can track the fullscreen state via the gtk.Widget "window-state-event"
signal.gtk.Window.unfullscreenunfullscreenThis method is available in PyGTK 2.2 and above.The unfullscreen() method requests the
window manager to toggle off the fullscreen state for the window. Note that
you shouldn't assume the window is definitely not full screen afterward,
because other entities (e.g. the user or window manager) could fullscreen it
again, and not all window managers honor requests to unfullscreen
windows. But normally the window will end up restored to its normal
state. Just don't write code that crashes if not.You can track the fullscreen state via the gtk.Widget "window_state_event"
signal.gtk.Window.set_keep_aboveset_keep_abovesettingsetting :if True keep the window
above other windowsThis method is available in PyGTK 2.4 and above.The set_keep_above() method requests
the window manager to keep the window on top if
setting is True. Note that you
shouldn't assume the window is definitely above afterward, because other
entities (e.g. the user or window manager) could not keep it above, and not
all window managers support keeping windows above. But normally the window
will end kept above. Just don't write code that crashes if not.It's permitted to call this method before showing a window, so
the window will be kept above when it appears on-screen initially.You can track the above state via the gtk.Widget "window_state_event"
signal.Note that, according to the Extended
Window Manager Hints specification, the above state is mainly meant
for user preferences and should not be used by applications e.g. for drawing
attention to their dialogs.gtk.Window.set_keep_belowset_keep_belowsettingsetting :if True keep the window
below other windowsThis method is available in PyGTK 2.4 and above.The set_keep_below() method requests
the window manager to keep the window on the bottom (i.e. below all other
windows). Note that you shouldn't assume the window is definitely below
afterward, because other entities (e.g. the user or window manager) could
not keep it below, and not all window managers support putting windows
below. But normally the window will be kept below. Just don't write code
that crashes if not.It's permitted to call this function before showing a window, in
which case the window will be kept below when it appears on-screen
initially.You can track the below state via the gtk.Widget "window_state_event"
signal.Note that, according to the Extended
Window Manager Hints specification, the above state is mainly meant
for user preferences and should not be used by applications e.g. for drawing
attention to their dialogs.gtk.Window.begin_resize_dragbegin_resize_dragedgebuttonroot_xroot_ytimestampedge :the position of the resize
controlbutton :the mouse button that initiated the
dragroot_x :the X position where the user clicked to
initiate the drag, in root window coordinatesroot_y :the Y position where the user clicked to
initiate the dragtimestamp :the timestamp from the click event that
initiated the dragThe begin_resize_drag() method starts
resizing a window from the edge specified by edge.
The mouse button that started the resize is specified by
button; the location, by
root_x and root_y; and the
time of the event, by timestamp. The value of
edge must be one of the .This method is used if an application has window resizing
controls. When PyGTK can support it, the resize will be
done using the standard mechanism for the window manager or windowing
system. Otherwise, PyGTK will try to emulate window
resizing, potentially not all that well, depending on the windowing
system.gtk.Window.begin_move_dragbegin_move_dragbuttonroot_xroot_ytimestampbutton :the mouse button that initiated the
dragroot_x :the X position where the user clicked to
initiate the drag, in root window coordinatesroot_y :the Y position where the user clicked to
initiate the dragtimestamp :the timestamp from the click event that
initiated the dragThe begin_move_drag() method starts
moving a window when the user presses the mouse button specified by
button at the location specified by
root_x and root_y at the time
specified by timestamp. This method is used if an
application has window movement grips. When PyGTK can
support it, the window movement will be done using the standard mechanism
for the window manager or windowing system. Otherwise,
PyGTK will try to emulate window movement, potentially
not all that well, depending on the windowing system.gtk.Window.set_default_sizeset_default_sizewidthheightwidth :the width in pixels, or -1 to unset the default
widthheight :the height in pixels, or -1 to unset the
default heightThe set_default_size() method sets the
default size of the window to the specified width and
height. If the window's "natural" size (its size
request) is larger than the default, the default will be ignored. More
generally, if the default size does not obey the geometry hints for the
window (the set_geometry_hints()
method can be used to set these explicitly), the default size will be
clamped to the nearest permitted size.Unlike the gtk.Widget.set_size_request()
method, which sets a size request for a widget and thus would keep users
from shrinking the window, this method only sets the initial size, just as
if the user had resized the window themselves. Users can still shrink the
window again as they normally would. Setting a default size of -1 means to
use the "natural" default size (the size request of the window). For more
control over a window's initial size and how resizing works, investigate the
set_geometry_hints()
method.For some uses, the resize()
method is more appropriate as it changes the current size of the window,
rather than the size to be used on initial display. The resize()
method always affects the window itself, not the geometry widget. The
default size of a window only affects the first time a window is shown; if a
window is hidden and re-shown, it will remember the size it had prior to
hiding, rather than using the default size. Windows can't actually be 0x0 in
size, they must be at least 1x1, but passing 0 for
width and height is OK,
resulting in a 1x1 default size.gtk.Window.get_default_sizeget_default_sizeReturns :a tuple containing the default width and height
of the windowThe get_default_size() method returns a
tuple containing the default width and height of the window. A value of -1
for the returned width or height indicates that a default size has not been
explicitly set for that dimension, so the "natural" size of the window will
be used. See the set_default_size()
method for more informationgtk.Window.resizeresizewidthheightwidth :the width in pixels to resize the window
toheight :the height in pixels to resize the window
toThe resize() method resizes the window
to the specified width and
height as if the user had done so, obeying geometry
constraints. The default geometry constraint is that windows may not be
smaller than their size request; to override this constraint, call the gtk.Widget.set_size_request()
method to set the window's request to a smaller value. If the
resize() method is called before showing a window
for the first time, it overrides any default size set with the set_default_size()
method. Windows may not be resized smaller than 1 by 1 pixels.gtk.Window.get_sizeget_sizeReturns :a tuple containing the width and height of the
windowThe get_size() method returns a tuple
containing the current width and height of the window. If the window is not
on-screen, it returns the size PyGTK will suggest to the
window manager for the initial window size (but this is not reliably the
same as the size the window manager will actually select). The size obtained
by the get_size() method is the last size received
in a configure event, that is, PyGTK uses its
locally-stored size, rather than querying the X server for the size. As a
result, if you call the resize()
method then immediately call the get_size() method,
the size won't have taken effect yet. After the window manager processes the
resize request, PyGTK receives notification that the size has changed via a
configure event, and the size of the window gets updated.Nearly any use of this method creates a race condition,
because the size of the window may change between the time that you get the
size and the time that you perform some action assuming that size is the
current size. To avoid race conditions, connect to "configure_event" on the
window and adjust your size-dependent state to match the size delivered in
the configure event.The returned size does not include the
size of the window manager decorations (aka the window frame or border).
Those are not drawn by PyGTK which has no reliable method
of determining their size.If you are getting a window size in order to position the
window on-screen, there may be a better way. The preferred way is to simply
set the window's semantic type with the set_type_hint()
method, that allows the window manager to center dialogs, etc. Also, if you
set the transient parent of dialogs with the set_transient_for()
method, window managers will often center the dialog over its parent window.
It's much preferred to let the window manager handle these things rather
than doing it yourself, because all apps will behave consistently and
according to user prefs if the window manager handles it. Also, the window
manager can take the size of the window decorations/border into account,
while your application cannot.In any case, if you insist on application-specified window
positioning, there's still a better way than doing it
yourself - the set_position()
method will frequently handle the details for you.gtk.Window.movemovexyx :the X coordinate to move window
toy :the Y coordinate to move window
toThe move() method asks the window
manager to move the window to the position specified by
x and y. Window managers are
free to ignore this. In fact, most window managers ignore requests for
initial window positions (instead using a user-defined placement algorithm)
and honor requests after the window has already been shown.The position is the position of the gravity-determined
reference point for the window. The gravity determines two things: first,
the location of the reference point in root window coordinates; and second,
which point on the window is positioned at the reference point. By default
the gravity is gtk.gdk.GRAVITY_NORTH_WEST, so the
reference point is simply the x,
y supplied to the move()
method. The top-left corner of the window decorations (aka window frame or
border) will be placed at x,
y. Therefore, to position a window at the top left of
the screen, you want to use the default gravity (which is
gtk.gdk.GRAVITY_NORTH_WEST) and move the window to
0,0.To position a window at the bottom right corner of the screen,
you would set gtk.gdk.GRAVITY_SOUTH_EAST, which means
that the reference point is at x + the window width
and y + the window height, and the bottom-right
corner of the window border will be placed at that reference point. So, to
place a window in the bottom right corner you would first set gravity to
south east, then move the window:
window.set_gravity(gtk.gdk.GRAVITY_SOUTH_EAST)
width, height = window.get_size()
window.move(gtk.gdk.screen_width() - width, gtk.gdk.screen_height() - height)
The Extended
Window Manager Hints specification has a nice table of gravities in
the "implementation notes" section. The get_position()
method documentation may also be relevant.gtk.Window.get_positionget_positionReturns :a tuple containing the X and Y coordinates of
the gravity-determined reference pointThe get_position() method returns a
tuple containing the x and y coordinates of the window that you would need
to pass to the move()
method to keep the window in its current position. This means that the
meaning of the returned value varies with window gravity. See the move()
method for more details. If you haven't changed the window gravity, its
gravity will be gtk.gdk.GRAVITY_NORTH_WEST. This means
that the get_position() method gets the position of
the top-left corner of the window manager frame for the window. The move()
method sets the position of this same top-left corner.The get_position() method is not 100%
reliable because the X Window System does not specify a way to obtain the
geometry of the decorations placed on a window by the window manager. Thus
PyGTK is using a "best guess" that works with most window
managers. Moreover, nearly all window managers are historically broken with
respect to their handling of window gravity. So moving a window to its
current position as returned by the get_position()
method tends to result in moving the window slightly. Window managers are
slowly getting better over time.If a window has gravity
gtk.gdk.GRAVITY_STATIC the window manager frame is not
relevant, and thus the get_position() method will
always produce accurate results. However you can't use static gravity to do
things like place a window in a corner of the screen, because static gravity
ignores the window manager decorations. If you are saving and restoring your
application's window positions, you should know that it's impossible for
applications to do this without getting it somewhat wrong because
applications do not have sufficient knowledge of window manager state. The
correct mechanism is to support the session management protocol (see the
"GnomeClient" object in the GNOME libraries for example) and allow the
window manager to save your window sizes and positions.gtk.Window.parse_geometryparse_geometrygeometrygeometry :the geometry stringReturns :True if string was parsed
successfullyThe parse_geometry() method parses the
standard X Window System geometry string specified by
geometry. The geometry string has the format
"WIDTHxHEIGHT+XOFFSET+YOFFSET" where WIDTH, HEIGHT, XOFFSET and YOFFSET are
specified in pixels (see the X documentation for more details). This method
works work on all PyGTK ports including Win32 but is
primarily intended for an X environment. If either a size or a position can
be extracted from the geometry string, the
parse_geometry() method returns
True and calls the set_default_size()
and move()
methods to resize and move the window.If the parse_geometry() method returns
True, it will also set the
gtk.gdk.HINT_USER_POS and
gtk.gdk.HINT_USER_SIZE hints indicating to the window
manager that the size and position of the window was user-specified. This
causes most window managers to honor the geometry.gtk.Window.reshow_with_initial_sizereshow_with_initial_sizeThe reshow_with_initial_size() method
hides the window, then reshows it, resetting the default size and position
of the window. Used by GUI builders only.gtk.Window.tooltips_get_info_from_tip_windowtooltips_get_info_from_tip_windowReturns :a 2-tuple containing the gtk.Tooltips
and gtk.Widget
displayed in the window or None.This method is available in PyGTK 2.4 and above.The tooltips_get_info_from_tip_window()
method returns a 2-tuple containing the gtk.Tooltips and
gtk.Widget
displayed in the window. If the window is not displaying tooltips this
method returns None. This method is mostly intended for use by accessibility
technologies - applications should have little use for it.gtk.Window.set_focus_on_mapset_focus_on_mapsettingsetting :If True this window would
like to receive focus when mapped.This method is available in PyGTK 2.6 and above.The set_focus_on_map() method sets the
"focus-on-map" property to the value of setting. If
setting is True a hint is set
asking the desktop environment to give focus to the window when it is
mapped.gtk.Window.get_focus_on_mapget_focus_on_mapReturns :True if the window would
like to receive focus when mapped.This method is available in PyGTK 2.6 and above.The get_focus_on_map() method returns
the value of the "focus-on-map" property. See the set_focus_on_map()
method for more information.gtk.Window.set_icon_nameset_icon_namenamename :the name of the themed icon or
NoneThis method is available in PyGTK 2.6 and above.The set_icon_name() method sets the
"icon-name" property to the value of name. If
name is None, then the default
themed icon will be used. The "icon-name" property contains the name of the
icon used for the window. See the gtk.IconTheme
reference for more information.gtk.Window.get_icon_nameget_icon_nameReturns :The name of the themed icon used for the
window icon or None if no icon is set.This method is available in PyGTK 2.6 and above.The get_icon_name() method returns the
name of the themed icon for the window, see the set_icon_name()
method for more information.gtk.Window.set_urgency_hintset_urgency_hinturgency_hinturgency_hint :if True mark this window
as needing urgent attention.This method is available in PyGTK 2.8 and above.The set_urgency_hint() method sets the
"urgency-hint" property to the value of
urgency_hint. If the "urgency-hint" property is True
the window sets a hint to the desktop environment to draw the users
attention to the window.gtk.Window.get_urgency_hintget_urgency_hintReturns :True if the window is marked
as needing urgent user attention.This method is available in PyGTK 2.8 and above.The get_urgency_hint() method returns
the value of the "urgency-hint" property. See the set_urgency_hint()
method for more information.gtk.Window.present_with_timepresent_with_timetimestamptimestamp :the timestamp of the user interaction (typically
a button or key press event) which triggered this callThis method is available in PyGTK 2.8 and above.The present_with_time() method presents
a window to the user in response to a user interaction. If you need to
present a window without a timestamp, use the present()
method.gtk.Window.set_deletableset_deletablesettingsetting :if True decorate the window
as deletableThis method is available in PyGTK 2.10 and above.By default, windows have a close button in the window
frame. Some window managers allow GTK+ to disable this button. If you
set the deletable property to False using this
method, GTK+ will do its best to convince the window manager not to
show a close button. Depending on the system, this method may not have
any effect when called on a window that is already visible, so you
should call it before calling
gtk_window_show().On Windows, this method always works, since there's no window
manager policy involved.gtk.Window.get_deletableget_deletableReturns :True if the window has been
set to have a close buttonThis method is available in PyGTK 2.10 and above.Returns whether the window has been set to have a close button
via the gtk.Window.set_deletable()
method.gtk.Window.get_groupget_groupReturns :the gtk.WindowGroup
for a window or the default groupThis method is available in PyGTK 2.10 and above.Returns the gtk.WindowGroup
or the default group, if the window does not have an explicit window
group.gtk.Window.set_opacityset_opacityopacityopacity :desired opacity, between 0 and 1.This method is available in PyGTK 2.12 and above.
Request the windowing system to make window partially transparent, with
opacity 0 being fully transparent and 1 fully opaque. (Values of the
opacity parameter are clamped to the [0,1] range.) On X11 this has any
effect only on X screens with a compositing manager running.
See gtk.Widget.is_composited().
On Windows it should work always.
Note that setting a window's opacity after the window has been shown causes it to flicker once on Windows.
gtk.Window.get_opacityget_opacityReturns :the requested opacity for this window.This method is available in PyGTK 2.12 and above.Fetches the requested opacity for this window. See
gtk.Window.set_opacity().gtk.Window.set_startup_idset_startup_idstartup_idstartup_id :a string with startup-notification identifierThis method is available in PyGTK 2.12 and above.
Startup notification identifiers are used by desktop environment to track
application startup, to provide user feedback and other features. This
function changes the corresponding property on the underlying GdkWindow.
Normally, startup identifier is managed automatically and you should only
use this function in special cases like transferring focus from other processes.
You should use this function before calling
gtk.Window.present()
or any equivalent function generating a window map event.
This function is only useful on X11, not with other GTK+ targets.
gtk.Window.get_default_widgetget_default_widgetReturns :The default widget, or None
if there is none.This method is available in PyGTK 2.14 and above.
Returns the default widget for window. See
gtk.Window.set_default()()
for more details.
Functionsgtk.window_set_default_icon_listgtk.window_set_default_icon_list...... :zero or more gtk.gdk.Pixbuf
objectsThe gtk.window_set_default_icon_list()
function sets an icon list to be used as fallback for windows that haven't
had the set_icon_list()
method called on them to set up a window-specific icon list. This function
allows you to set up the icon for all windows in your app at once. See the
set_icon_list()
method documentation for more details.gtk.window_set_default_icongtk.window_set_default_iconiconicon :a gtk.gdk.PixbufThis function is available in PyGTK 2.4 and above.The gtk.window_set_default_icon() function
sets an icon specified by icon to be used as the
fallback for windows that haven't had the set_icon()
method called on them to set up a window-specific icon. This function allows
you to set up the icon for all windows in your app at once.gtk.window_set_default_icon_from_filegtk.window_set_default_icon_from_filefilenamefilename :an icon file nameThis function is available in PyGTK 2.2 and above.The gtk.window_set_default_icon_from_file()
function sets an icon contained in the file specified by
filename to be used as the fallback for windows that
haven't had the set_icon()
method called on them to set up a window-specific icon. This function allows
you to set up the icon for all windows in your app at once.The GError exception is raised if an error occurs while loading
the icon pixbuf from filename.gtk.window_get_default_icon_listgtk.window_get_default_icon_listReturns :a copy of the applications default icon
listThe gtk.window_get_default_icon_list()
function returns the application's default icon list as set by the gtk.window_set_default_icon_list()
function. See the set_icon_list()
method documentation for more details.gtk.window_set_auto_startup_notificationgtk.window_set_auto_startup_notificationsetting :if True, automatically do
startup notificationThis function is available in PyGTK 2.2 and above.The
gtk.window_set_auto_startup_notification() function
sets the auto startup notification setting to the value of setting. If setting is True startup notification will be done automatically.By default, after showing the first gtk.Window for each
gtk.gdk.Screen, GTK+
calls the gdk_notify_startup_complete() function. Call
this function to disable the automatic startup notification. You might do
this if your first window is a splash screen, and you want to delay
notification until after your real main window has been shown. In that
example, you would disable startup notification temporarily, show your
splash screen, then re-enable it so that showing the main window would
automatically result in notification.gtk.window_list_toplevelsgtk.window_list_toplevelsReturns :a list of all the toplevel gtk.Window
widgetsThe gtk.window_list_toplevels() function
returns a list of all the toplevel gtk.Window widgets
in the application.gtk.window_set_default_icon_namegtk.window_set_default_icon_namesetting :if True, automatically do
startup notificationThis function is available in PyGTK 2.6 and above.The gtk.window_set_default_icon_name()
function sets an icon to be used as fallback for windows that haven't had
the set_icon_list()
method called on them from a named themed icon, see the set_icon_name()
method.SignalsThe "activate-default" gtk.Window Signalcallbackwindowuser_param1...window :the window that received the
signaluser_param1 :the first user parameter (if any) specified
with the connect()
method... :additional user parameters (if
any)The "activate-default" signal is emitted when the default child
widget of window is activated usually by the user
pressing the Return or Enter key.The "activate-focus" gtk.Window Signalcallbackwindowuser_param1...window :the window that received the
signaluser_param1 :the first user parameter (if any) specified
with the connect()
method... :additional user parameters (if
any)The "activate-focus" signal is emitted when the child widget
with the focus is activated usually by the user pressing the
Space key.The "frame-event" gtk.Window Signalcallbackwindoweventuser_param1...window :the window that received the
signalevent :the event that triggered the
signaluser_param1 :the first user parameter (if any) specified
with the connect()
method... :additional user parameters (if
any)Returns :True to stop other handlers
from being invoked for the event. False to
propagate the event further.The "frame-event" signal is emitted when an event other than key
press or release or focus change is received on the window's frame.The "keys-changed" gtk.Window Signalcallbackwindowuser_param1...window :the window that received the
signaluser_param1 :the first user parameter (if any) specified
with the connect()
method... :additional user parameters (if
any)The "keys-changed" signal is emitted when a mnemonic accelerator
is added, removed or changed or the mnemonic modifier is set.The "move-focus" gtk.Window Signalcallbackwindowdirectionuser_param1...window :the window that received the
signaldirection :the move direction:
gtk.DIR_TAB_FORWARD,
gtk.DIR_TAB_BACKWARD, gtk.DIR_UP,
gtk.DIR_DOWN, gtk.DIR_LEFT or
gtk.DIR_RIGHTuser_param1 :the first user parameter (if any) specified
with the connect()
method... :additional user parameters (if
any)The "move-focus" signal is emitted when the focus is changed
within the window's child widgets. Usually this happens when the user
presses the Tab, the ShiftTab or the
Up, Down, Left or
Right arrow keys.The "set-focus" gtk.Window Signalcallbackwindowwidgetuser_param1...window :the window that received the
signalwidget :the widget that receives the
focususer_param1 :the first user parameter (if any) specified
with the connect()
method... :additional user parameters (if
any)The "set-focus" signal is emitted when the focus changes to widget in window.