Top |
Functions
Properties
GtkApplication * | application | Read / Write |
GtkWidget * | child | Read / Write |
gboolean | decorated | Read / Write |
int | default-height | Read / Write |
GtkWidget * | default-widget | Read / Write |
int | default-width | Read / Write |
gboolean | deletable | Read / Write |
gboolean | destroy-with-parent | Read / Write |
GdkDisplay * | display | Read / Write |
gboolean | focus-visible | Read / Write |
GtkWidget * | focus-widget | Read / Write |
gboolean | fullscreened | Read / Write / Construct |
gboolean | hide-on-close | Read / Write |
char * | icon-name | Read / Write |
gboolean | is-active | Read |
gboolean | maximized | Read / Write / Construct |
gboolean | mnemonics-visible | Read / Write |
gboolean | modal | Read / Write |
gboolean | resizable | Read / Write |
char * | startup-id | Write |
char * | title | Read / Write |
GtkWindow * | transient-for | Read / Write / Construct |
Signals
void | activate-default | Action |
void | activate-focus | Action |
gboolean | close-request | Run Last |
gboolean | enable-debugging | Action |
void | keys-changed | Run First |
Object Hierarchy
GObject ╰── GInitiallyUnowned ╰── GtkWidget ╰── GtkWindow ├── GtkAboutDialog ├── GtkDialog ├── GtkApplicationWindow ├── GtkAssistant ╰── GtkShortcutsWindow
Implemented Interfaces
GtkWindow implements GtkAccessible, GtkBuildable, GtkConstraintTarget, GtkNative, GtkShortcutManager and GtkRoot.
Description
A GtkWindow is a toplevel window which can contain other widgets. Windows normally have decorations that are under the control of the windowing system and allow the user to manipulate the window (resize it, move it, close it,...).
GtkWindow as GtkBuildable
The GtkWindow implementation of the GtkBuildable interface supports setting a child as the titlebar by specifying “titlebar” as the “type” attribute of a <child> element.
CSS nodes
1 2 3 |
window.background ├── <child> ╰── <titlebar child>.titlebar [.default-decoration] |
GtkWindow has a main CSS node with name window and style class .background.
Style classes that are typically used with the main CSS node are .csd (when client-side decorations are in use), .solid-csd (for client-side decorations without invisible borders), .ssd (used by mutter when rendering server-side decorations). GtkWindow also represents window states with the following style classes on the main node: .tiled, .maximized, .fullscreen. Specialized types of window often add their own discriminating style classes, such as .popup or .tooltip.
Generally, some CSS properties don't make sense on the toplevel window node, such as margins or padding. When client-side decorations without invisible borders are in use (i.e. the .solid-csd style class is added to the main window node), the CSS border of the toplevel window is used for resize drags. In the .csd case, the shadow area outside of the window can be used to resize it.
GtkWindow adds the .titlebar and .default-decoration style classes to the widget that is added as a titlebar child.
Functions
gtk_window_new ()
GtkWidget *
gtk_window_new (void
);
Creates a new GtkWindow, which is a toplevel window that can contain other widgets.
To get an undecorated window (no window borders), use
gtk_window_set_decorated()
.
All top-level windows created by gtk_window_new()
are stored in
an internal top-level window list. This list can be obtained from
gtk_window_list_toplevels()
. Due to Gtk+ keeping a reference to
the window internally, gtk_window_new()
does not return a reference
to the caller.
To delete a GtkWindow, call gtk_window_destroy()
.
gtk_window_destroy ()
void
gtk_window_destroy (GtkWindow *window
);
Drop the internal reference GTK holds on toplevel windows.
gtk_window_get_child ()
GtkWidget *
gtk_window_get_child (GtkWindow *window
);
Gets the child widget of window
.
gtk_window_set_child ()
void gtk_window_set_child (GtkWindow *window
,GtkWidget *child
);
Sets the child widget of window
.
gtk_window_set_title ()
void gtk_window_set_title (GtkWindow *window
,const char *title
);
Sets the title of the GtkWindow. 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, for example. document filename, for example.
Passing NULL
does the same as setting the title to an empty string.
gtk_window_set_resizable ()
void gtk_window_set_resizable (GtkWindow *window
,gboolean resizable
);
Sets whether the user can resize a window.
Windows are user resizable by default.
gtk_window_get_resizable ()
gboolean
gtk_window_get_resizable (GtkWindow *window
);
Gets the value set by gtk_window_set_resizable()
.
gtk_window_set_modal ()
void gtk_window_set_modal (GtkWindow *window
,gboolean modal
);
Sets a window modal or non-modal. Modal windows prevent interaction
with other windows in the same application. To keep modal dialogs
on top of main application windows, use
gtk_window_set_transient_for()
to make the dialog transient for the
parent; most window managers
will then disallow lowering the dialog below the parent.
gtk_window_set_default_size ()
void gtk_window_set_default_size (GtkWindow *window
,int width
,int height
);
Sets the default size of a window. If the window’s “natural” size (its size request) is larger than the default, the default will be ignored.
Unlike gtk_widget_set_size_request()
, which sets a size request for
a widget and thus would keep users from shrinking the window, this
function 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).
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.
If you use this function to reestablish a previously saved window size,
note that the appropriate size to save is the one returned by
gtk_window_get_default_size()
. Using the window allocation directly will not
work in all circumstances and can lead to growing or shrinking windows.
gtk_window_set_hide_on_close ()
void gtk_window_set_hide_on_close (GtkWindow *window
,gboolean setting
);
If setting
is TRUE
, then clicking the close button on the window
will not destroy it, but only hide it.
gtk_window_get_hide_on_close ()
gboolean
gtk_window_get_hide_on_close (GtkWindow *window
);
Returns whether the window will be hidden when the close button is clicked.
gtk_window_set_transient_for ()
void gtk_window_set_transient_for (GtkWindow *window
,GtkWindow *parent
);
Dialog windows should be set transient for the main application
window they were spawned from. This allows
window managers to e.g. keep the
dialog on top of the main window, or center the dialog over the
main window. gtk_dialog_new_with_buttons()
and other convenience
functions in GTK will sometimes call
gtk_window_set_transient_for()
on your behalf.
Passing NULL
for parent
unsets the current transient window.
On Windows, this function puts the child window on top of the parent, much as the window manager would have done on X.
gtk_window_set_destroy_with_parent ()
void gtk_window_set_destroy_with_parent (GtkWindow *window
,gboolean setting
);
If setting
is TRUE
, then destroying the transient parent of window
will also destroy window
itself. This is useful for dialogs that
shouldn’t persist beyond the lifetime of the main window they're
associated with, for example.
gtk_window_set_display ()
void gtk_window_set_display (GtkWindow *window
,GdkDisplay *display
);
Sets the GdkDisplay where the window
is displayed; if
the window is already mapped, it will be unmapped, and
then remapped on the new display.
gtk_window_is_active ()
gboolean
gtk_window_is_active (GtkWindow *window
);
Returns whether the window is part of the current active toplevel.
(That is, the toplevel window receiving keystrokes.)
The return value is TRUE
if the window is active toplevel itself.
You might use this function if you wanted to draw a widget
differently in an active window from a widget in an inactive window.
gtk_window_is_maximized ()
gboolean
gtk_window_is_maximized (GtkWindow *window
);
Retrieves the current maximized state of window
.
Note that since maximization is ultimately handled by the window
manager and happens asynchronously to an application request, you
shouldn’t assume the return value of this function changing
immediately (or at all), as an effect of calling
gtk_window_maximize()
or gtk_window_unmaximize()
.
If the window isn't yet mapped, the value returned will whether the initial requested state is maximized.
gtk_window_is_fullscreen ()
gboolean
gtk_window_is_fullscreen (GtkWindow *window
);
Retrieves the current fullscreen state of window
.
Note that since fullscreening is ultimately handled by the window
manager and happens asynchronously to an application request, you
shouldn’t assume the return value of this function changing
immediately (or at all), as an effect of calling
gtk_window_fullscreen()
or gtk_window_unfullscreen()
.
If the window isn't yet mapped, the value returned will whether the initial requested state is fullscreen.
gtk_window_get_toplevels ()
GListModel *
gtk_window_get_toplevels (void
);
Returns a list of all existing toplevel windows.
If you want to iterate through the list and perform actions involving callbacks that might destroy the widgets or add new ones, be aware that the list of toplevels will change and emit the "items-changed" signal.
gtk_window_list_toplevels ()
GList *
gtk_window_list_toplevels (void
);
Returns a list of all existing toplevel windows. The widgets
in the list are not individually referenced. If you want
to iterate through the list and perform actions involving
callbacks that might destroy the widgets, you must call
g_list_foreach (result, (GFunc)g_object_ref, NULL)
first, and
then unref all the widgets afterwards.
gtk_window_get_focus ()
GtkWidget *
gtk_window_get_focus (GtkWindow *window
);
Retrieves the current focused widget within the window.
Note that this is the widget that would have the focus
if the toplevel window focused; if the toplevel window
is not focused then gtk_widget_has_focus (widget)
will
not be TRUE
for the widget.
gtk_window_set_focus ()
void gtk_window_set_focus (GtkWindow *window
,GtkWidget *focus
);
If focus
is not the current focus widget, and is focusable, sets
it as the focus widget for the window. If focus
is NULL
, unsets
the focus widget for this window. To set the focus to a particular
widget in the toplevel, it is usually more convenient to use
gtk_widget_grab_focus()
instead of this function.
gtk_window_get_default_widget ()
GtkWidget *
gtk_window_get_default_widget (GtkWindow *window
);
Returns the default widget for window
.
See gtk_window_set_default_widget()
for more details.
gtk_window_set_default_widget ()
void gtk_window_set_default_widget (GtkWindow *window
,GtkWidget *default_widget
);
The default widget is the widget that’s activated when the user presses Enter in a dialog (for example). This function sets or unsets the default widget for a GtkWindow.
gtk_window_present ()
void
gtk_window_present (GtkWindow *window
);
Presents a window to the user. This function should not be used as when it is called, it is too late to gather a valid timestamp to allow focus stealing prevention to work correctly.
gtk_window_present_with_time ()
void gtk_window_present_with_time (GtkWindow *window
,guint32 timestamp
);
Presents a window to the user. This may mean raising the window in the stacking order, unminimizing 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 window
is hidden, this function calls gtk_widget_show()
as well.
This function 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 gtk_window_present()
to move the already-open dialog
where the user can see it.
Presents a window to the user in response to a user interaction. The timestamp should be gathered when the window was requested to be shown (when clicking a link for example), rather than once the window is ready to be shown.
gtk_window_close ()
void
gtk_window_close (GtkWindow *window
);
Requests that the window is closed, similar to what happens when a window manager close button is clicked.
This function can be used with close buttons in custom titlebars.
gtk_window_minimize ()
void
gtk_window_minimize (GtkWindow *window
);
Asks to minimize the specified window
.
Note that you shouldn’t assume the window is definitely minimized afterward, because the windowing system might not support this functionality; other entities (e.g. the user or the window manager) could unminimize it again, or there may not be a window manager in which case minimization isn’t possible, etc.
It’s permitted to call this function before showing a window, in which case the window will be minimized before it ever appears onscreen.
You can track result of this operation via the “state” property.
gtk_window_unminimize ()
void
gtk_window_unminimize (GtkWindow *window
);
Asks to unminimize the specified window
.
Note that you shouldn’t assume the window is definitely unminimized afterward, because the windowing system might not support this functionality; other entities (e.g. the user or the window manager) could minimize it again, or there may not be a window manager in which case minimization isn’t possible, etc.
You can track result of this operation via the “state” property.
gtk_window_maximize ()
void
gtk_window_maximize (GtkWindow *window
);
Asks to maximize window
, so that it fills the 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.
It’s permitted to call this function before showing a window, in which case the window will be maximized when it appears onscreen initially.
You can track the result of this operation via the “state” property, or by listening to notifications on the “maximized” property.
gtk_window_unmaximize ()
void
gtk_window_unmaximize (GtkWindow *window
);
Asks to unmaximize 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.
You can track the result of this operation via the “state” property, or by listening to notifications on the “maximized” property.
gtk_window_fullscreen ()
void
gtk_window_fullscreen (GtkWindow *window
);
Asks to place window
in the fullscreen state.
Note that 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.
You can track the result of this operation via the “state” property, or by listening to notifications of the “fullscreened” property.
gtk_window_fullscreen_on_monitor ()
void gtk_window_fullscreen_on_monitor (GtkWindow *window
,GdkMonitor *monitor
);
Asks to place window
in the fullscreen state on the given monitor
.
Note that you shouldn't assume the window is definitely full screen afterward, or that the windowing system allows fullscreen windows on any given monitor.
You can track the result of this operation via the “state” property, or by listening to notifications of the “fullscreened” property.
gtk_window_unfullscreen ()
void
gtk_window_unfullscreen (GtkWindow *window
);
Asks to remove the fullscreen state for window
, and return to its previous
state.
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; normally the window will end up restored to its normal state. Just don’t write code that crashes if not.
You can track the result of this operation via the “state” property, or by listening to notifications of the “fullscreened” property.
gtk_window_set_decorated ()
void gtk_window_set_decorated (GtkWindow *window
,gboolean setting
);
By default, windows are decorated with a title bar, resize
controls, etc. Some window managers
allow GTK to disable these decorations, creating a
borderless window. If you set the decorated property to FALSE
using this function, GTK will do its best to convince the window
manager not to decorate the window. Depending on the system, this
function may not have any effect when called on a window that is
already visible, so you should call it before calling gtk_widget_show()
.
On Windows, this function always works, since there’s no window manager policy involved.
gtk_window_set_deletable ()
void gtk_window_set_deletable (GtkWindow *window
,gboolean setting
);
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 function, GTK will do its best to convince the window
manager not to show a close button. Depending on the system, this
function may not have any effect when called on a window that is
already visible, so you should call it before calling gtk_widget_show()
.
On Windows, this function always works, since there’s no window manager policy involved.
gtk_window_set_startup_id ()
void gtk_window_set_startup_id (GtkWindow *window
,const char *startup_id
);
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 GdkSurface. 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_decorated ()
gboolean
gtk_window_get_decorated (GtkWindow *window
);
Returns whether the window has been set to have decorations
such as a title bar via gtk_window_set_decorated()
.
gtk_window_get_deletable ()
gboolean
gtk_window_get_deletable (GtkWindow *window
);
Returns whether the window has been set to have a close button
via gtk_window_set_deletable()
.
gtk_window_get_default_icon_name ()
const char *
gtk_window_get_default_icon_name (void
);
Returns the fallback icon name for windows that has been set
with gtk_window_set_default_icon_name()
, or NULL
if that function
has not been called.
The returned string is owned by GTK and should not be modified.
It is only valid until the next call to gtk_window_set_default_icon_name()
.
gtk_window_get_default_size ()
void gtk_window_get_default_size (GtkWindow *window
,int *width
,int *height
);
Gets the default size of the window. A value of 0 for the 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.
gtk_window_get_destroy_with_parent ()
gboolean
gtk_window_get_destroy_with_parent (GtkWindow *window
);
Returns whether the window will be destroyed with its transient parent. See
gtk_window_set_destroy_with_parent()
.
gtk_window_get_icon_name ()
const char *
gtk_window_get_icon_name (GtkWindow *window
);
Returns the name of the themed icon for the window,
see gtk_window_set_icon_name()
.
gtk_window_get_modal ()
gboolean
gtk_window_get_modal (GtkWindow *window
);
Returns whether the window is modal. See gtk_window_set_modal()
.
gtk_window_get_title ()
const char *
gtk_window_get_title (GtkWindow *window
);
Retrieves the title of the window. See gtk_window_set_title()
.
gtk_window_get_transient_for ()
GtkWindow *
gtk_window_get_transient_for (GtkWindow *window
);
Fetches the transient parent for this window. See
gtk_window_set_transient_for()
.
gtk_window_get_group ()
GtkWindowGroup *
gtk_window_get_group (GtkWindow *window
);
Returns the group for window
or the default group, if
window
is NULL
or if window
does not have an explicit
window group.
gtk_window_has_group ()
gboolean
gtk_window_has_group (GtkWindow *window
);
Returns whether window
has an explicit window group.
gtk_window_set_default_icon_name ()
void
gtk_window_set_default_icon_name (const char *name
);
Sets an icon to be used as fallback for windows that
haven't had gtk_window_set_icon_name()
called on them.
gtk_window_set_icon_name ()
void gtk_window_set_icon_name (GtkWindow *window
,const char *name
);
Sets the icon for the window from a named themed icon. See the docs for GtkIconTheme for more details. On some platforms, the window icon is not used at all.
Note that this has nothing to do with the WM_ICON_NAME property which is mentioned in the ICCCM.
gtk_window_set_auto_startup_notification ()
void
gtk_window_set_auto_startup_notification
(gboolean setting
);
By default, after showing the first GtkWindow, GTK calls
gdk_display_notify_startup_complete()
. 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,
for example.
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_get_mnemonics_visible ()
gboolean
gtk_window_get_mnemonics_visible (GtkWindow *window
);
Gets the value of the “mnemonics-visible” property.
gtk_window_set_mnemonics_visible ()
void gtk_window_set_mnemonics_visible (GtkWindow *window
,gboolean setting
);
Sets the “mnemonics-visible” property.
gtk_window_get_focus_visible ()
gboolean
gtk_window_get_focus_visible (GtkWindow *window
);
Gets the value of the “focus-visible” property.
gtk_window_set_focus_visible ()
void gtk_window_set_focus_visible (GtkWindow *window
,gboolean setting
);
Sets the “focus-visible” property.
gtk_window_get_application ()
GtkApplication *
gtk_window_get_application (GtkWindow *window
);
Gets the GtkApplication associated with the window (if any).
gtk_window_set_application ()
void gtk_window_set_application (GtkWindow *window
,GtkApplication *application
);
Sets or unsets the GtkApplication associated with the window.
The application will be kept alive for at least as long as it has any windows
associated with it (see g_application_hold()
for a way to keep it alive
without windows).
Normally, the connection between the application and the window will remain
until the window is destroyed, but you can explicitly remove it by setting
the application
to NULL
.
This is equivalent to calling gtk_application_remove_window()
and/or
gtk_application_add_window()
on the old/new applications as relevant.
gtk_window_set_titlebar ()
void gtk_window_set_titlebar (GtkWindow *window
,GtkWidget *titlebar
);
Sets a custom titlebar for window
.
A typical widget used here is GtkHeaderBar, as it provides various features expected of a titlebar while allowing the addition of child widgets to it.
If you set a custom titlebar, GTK will do its best to convince
the window manager not to put its own titlebar on the window.
Depending on the system, this function may not work for a window
that is already visible, so you set the titlebar before calling
gtk_widget_show()
.
gtk_window_get_titlebar ()
GtkWidget *
gtk_window_get_titlebar (GtkWindow *window
);
Returns the custom titlebar that has been set with
gtk_window_set_titlebar()
.
Types and Values
struct GtkWindowClass
struct GtkWindowClass { GtkWidgetClass parent_class; /* G_SIGNAL_ACTION signals for keybindings */ void (* activate_focus) (GtkWindow *window); void (* activate_default) (GtkWindow *window); void (* keys_changed) (GtkWindow *window); gboolean (* enable_debugging) (GtkWindow *window, gboolean toggle); gboolean (* close_request) (GtkWindow *window); };
Members
Activates the current focused widget within the window. |
||
Activates the default widget for the window. |
||
Signal gets emitted when the set of accelerators or mnemonics that are associated with window changes. |
||
Class handler for the “enable-debugging” keybinding signal. |
||
Class handler for the “close-request” signal. |
Property Details
The “application”
property
“application” GtkApplication *
The GtkApplication associated with the window.
The application will be kept alive for at least as long as it
has any windows associated with it (see g_application_hold()
for a way to keep it alive without windows).
Normally, the connection between the application and the window
will remain until the window is destroyed, but you can explicitly
remove it by setting the :application property to NULL
.
Owner: GtkWindow
Flags: Read / Write
The “decorated”
property
“decorated” gboolean
Whether the window should be decorated by the window manager.
Owner: GtkWindow
Flags: Read / Write
Default value: TRUE
The “default-height”
property
“default-height” int
The default height of the window.
Owner: GtkWindow
Flags: Read / Write
Allowed values: >= -1
Default value: 0
The “default-widget”
property
“default-widget” GtkWidget *
The default widget.
Owner: GtkWindow
Flags: Read / Write
The “default-width”
property
“default-width” int
The default width of the window.
Owner: GtkWindow
Flags: Read / Write
Allowed values: >= -1
Default value: 0
The “deletable”
property
“deletable” gboolean
Whether the window frame should have a close button.
Owner: GtkWindow
Flags: Read / Write
Default value: TRUE
The “destroy-with-parent”
property
“destroy-with-parent” gboolean
If this window should be destroyed when the parent is destroyed.
Owner: GtkWindow
Flags: Read / Write
Default value: FALSE
The “display”
property
“display” GdkDisplay *
The display that will display this window.
Owner: GtkWindow
Flags: Read / Write
The “focus-visible”
property
“focus-visible” gboolean
Whether 'focus rectangles' are currently visible in this window.
This property is maintained by GTK based on user input and should not be set by applications.
Owner: GtkWindow
Flags: Read / Write
Default value: TRUE
The “focus-widget”
property
“focus-widget” GtkWidget *
The focus widget.
Owner: GtkWindow
Flags: Read / Write
The “fullscreened”
property
“fullscreened” gboolean
Whether the window is fullscreen.
Setting this property is the equivalent of calling gtk_window_fullscreen()
and gtk_window_unfullscreen()
; either operation is asynchronous, which
means you will need to connect to the “notify” signal in order to
know whether the operation was successful.
Owner: GtkWindow
Flags: Read / Write / Construct
Default value: FALSE
The “hide-on-close”
property
“hide-on-close” gboolean
If this window should be hidden when the user clicks the close button.
Owner: GtkWindow
Flags: Read / Write
Default value: FALSE
The “icon-name”
property
“icon-name” char *
The :icon-name property specifies the name of the themed icon to use as the window icon. See GtkIconTheme for more details.
Owner: GtkWindow
Flags: Read / Write
Default value: NULL
The “is-active”
property
“is-active” gboolean
Whether the toplevel is the current active window.
Owner: GtkWindow
Flags: Read
Default value: FALSE
The “maximized”
property
“maximized” gboolean
Whether the window is maximized.
Setting this property is the equivalent of calling gtk_window_maximize()
and gtk_window_unmaximize()
; either operation is asynchronous, which
means you will need to connect to the “notify” signal in order to
know whether the operation was successful.
Owner: GtkWindow
Flags: Read / Write / Construct
Default value: FALSE
The “mnemonics-visible”
property
“mnemonics-visible” gboolean
Whether mnemonics are currently visible in this window.
This property is maintained by GTK based on user input, and should not be set by applications.
Owner: GtkWindow
Flags: Read / Write
Default value: FALSE
The “modal”
property
“modal” gboolean
If TRUE, the window is modal (other windows are not usable while this one is up).
Owner: GtkWindow
Flags: Read / Write
Default value: FALSE
The “resizable”
property
“resizable” gboolean
If TRUE, users can resize the window.
Owner: GtkWindow
Flags: Read / Write
Default value: TRUE
The “startup-id”
property
“startup-id” char *
The :startup-id is a write-only property for setting window's
startup notification identifier. See gtk_window_set_startup_id()
for more details.
Owner: GtkWindow
Flags: Write
Default value: NULL
The “title”
property
“title” char *
The title of the window.
Owner: GtkWindow
Flags: Read / Write
Default value: NULL
The “transient-for”
property
“transient-for” GtkWindow *
The transient parent of the window. See gtk_window_set_transient_for()
for
more details about transient windows.
Owner: GtkWindow
Flags: Read / Write / Construct
Signal Details
The “activate-default”
signal
void user_function (GtkWindow *window, gpointer user_data)
The ::activate-default signal is a
keybinding signal
which gets emitted when the user activates the default widget
of window
.
Parameters
window |
the window which received the signal |
|
user_data |
user data set when the signal handler was connected. |
Flags: Action
The “activate-focus”
signal
void user_function (GtkWindow *window, gpointer user_data)
The ::activate-focus signal is a
keybinding signal
which gets emitted when the user activates the currently
focused widget of window
.
Parameters
window |
the window which received the signal |
|
user_data |
user data set when the signal handler was connected. |
Flags: Action
The “close-request”
signal
gboolean user_function (GtkWindow *window, gpointer user_data)
The ::close-request signal is emitted when the user clicks on the close button of the window.
Return: TRUE
to stop other handlers from being invoked for the signal
Parameters
window |
the window on which the signal is emitted |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
The “enable-debugging”
signal
gboolean user_function (GtkWindow *window, gboolean toggle, gpointer user_data)
The ::enable-debugging signal is a keybinding signal
which gets emitted when the user enables or disables interactive
debugging. When toggle
is TRUE
, interactive debugging is toggled
on or off, when it is FALSE
, the debugger will be pointed at the
widget under the pointer.
The default bindings for this signal are Ctrl-Shift-I and Ctrl-Shift-D.
Return: TRUE
if the key binding was handled
Parameters
window |
the window on which the signal is emitted |
|
toggle |
toggle the debugger |
|
user_data |
user data set when the signal handler was connected. |
Flags: Action
The “keys-changed”
signal
void user_function (GtkWindow *window, gpointer user_data)
The ::keys-changed signal gets emitted when the set of accelerators
or mnemonics that are associated with window
changes.
Parameters
window |
the window which received the signal |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run First