A freestanding toplevel surface.
The <GdkToplevel> interface provides useful APIs
for interacting with the windowing system, such as controlling
maximization and size of the surface, setting icons and transient
parents for dialogs.
The capabilities that are available for this toplevel.
Its value is a
<GdkToplevelCapabilities>.
It is read only.
Whether the window manager should add decorations.
Its value is a boolean.
Set it with (set! (toplevel:decorated self) value).
Whether the window manager should allow to close the surface.
Its value is a boolean.
Set it with (set! (toplevel:deletable self) value).
The fullscreen mode of the surface.
Its value is a <GdkFullscreenMode> (or, to
set it, one of its symbols).
Set it with (set! (toplevel:fullscreen-mode self) value).
The gravity to use when resizing a surface programmatically.
Gravity describes which point of the surface we want to keep fixed
(meaning that the surface will grow in the opposite direction). For
example, a gravity of north-east means that we
want to fix top right corner of the surface.
This property is just a hint that may affect the result when negotiating
toplevel sizes with the windowing system. It does not affect
interactive resizes started with toplevel:begin-resize.
Its value is a <GdkGravity> (or, to set it, one of
its symbols).
Set it with (set! (toplevel:gravity self) value).
A list of textures to use as icon.
Its value is a foreign pointer (or, to set it, a bytevector).
Set it with (set! (toplevel:icon-list self) value).
Whether the surface is modal.
Its value is a boolean.
Set it with (set! (toplevel:modal self) value).
Whether the surface should inhibit keyboard shortcuts.
Its value is a boolean.
It is read only.
The startup ID of the surface.
See <GdkAppLaunchContext> for more
information about startup feedback.
Its value is a string, or #f.
Set it with (set! (toplevel:startup-id self) value).
The state of the toplevel.
Its value is a <GdkToplevelState>.
It is read only.
The title of the surface.
Its value is a string, or #f.
Set it with (set! (toplevel:title self) value).
The transient parent of the surface.
Its value is a <GdkSurface>, or #f.
Set it with (set! (toplevel:transient-for self) value).
Begins an interactive move operation.
You might use this function to implement draggable titlebars.
Passed: a <GdkToplevel>.
Passed: a <GdkDevice>.
the device used for the operation
Passed: a 32-bit integer.
the button being used to drag, or 0 for a keyboard-initiated drag
Passed: a real number.
surface X coordinate of mouse click that began the drag
Passed: a real number.
surface Y coordinate of mouse click that began the drag
Passed: an unsigned 32-bit integer.
timestamp of mouse click that began the drag (use event:get-time)
Begins an interactive resize operation.
You might use this function to implement a “window resize grip.”
Passed: a <GdkToplevel>.
Passed: a <GdkSurfaceEdge>, or one of its
symbols.
the edge or corner from which the drag is started
Passed: a <GdkDevice>, or #f.
the device used for the operation
Passed: a 32-bit integer.
the button being used to drag, or 0 for a keyboard-initiated drag
Passed: a real number.
surface X coordinate of mouse click that began the drag
Passed: a real number.
surface Y coordinate of mouse click that began the drag
Passed: an unsigned 32-bit integer.
timestamp of mouse click that began the drag (use event:get-time)
Sets keyboard focus to surface.
In most cases, gtk_window_present_with_time() should be used on a GtkWindow, rather than calling this function.
Passed: a <GdkToplevel>.
Passed: an unsigned 32-bit integer.
timestamp of the event triggering the surface focus
The capabilities that are available for this toplevel.
Passed: a <GdkToplevel>.
Returned: a
<GdkToplevelCapabilities>.
the capabilities of the <GdkToplevel>.
Returns the gravity that is used when changing the toplevel size programmatically.
Passed: a <GdkToplevel>.
a toplevel
Returned: a <GdkGravity>.
the gravity
Gets the bitwise or of the currently active surface state flags, from
the <GdkToplevelState> enumeration.
Passed: a <GdkToplevel>.
Returned: a <GdkToplevelState>.
surface state bitfield
Requests that the self inhibit the system shortcuts.
This is asking the desktop environment/windowing system to let all keyboard events reach the surface, as long as it is focused, instead of triggering system actions.
If granted, the rerouting remains active until the default shortcuts
processing is restored with toplevel:restore-system-shortcuts, or the
request is revoked by the desktop environment, windowing system or the
user.
A typical use case for this API is remote desktop or virtual machine viewers which need to inhibit the default system keyboard shortcuts so that the remote session or virtual host gets those instead of the local environment.
The windowing system or desktop environment may ask the user to grant or deny the request or even choose to ignore the request entirely.
The caller can be notified whenever the request is granted or revoked by
listening to the toplevel:shortcuts-inhibited property.
Passed: a <GdkToplevel>.
Passed, or left out: a <GdkEvent>, or #f.
the <GdkEvent> that is triggering the inhibit
request, or #f if none is available
Asks to lower the self below other windows.
The windowing system may choose to ignore the request.
Passed: a <GdkToplevel>.
Returned: a boolean.
#t if the surface was lowered
Asks to minimize the self.
The windowing system may choose to ignore the request.
Passed: a <GdkToplevel>.
Returned: a boolean.
#t if the surface was minimized
Present self after having processed the
<GdkToplevelLayout> rules.
If the toplevel was previously not showing, it will be showed, otherwise it will change layout according to layout.
GDK may emit the toplevel:compute-size signal to let the user of this
toplevel compute the preferred size of the toplevel surface.
Presenting is asynchronous and the specified layout parameters are not guaranteed to be respected.
Passed: a <GdkToplevel>.
the <GdkToplevel> to show
Passed: a <GdkToplevelLayout>.
the <GdkToplevelLayout> object used to
layout
Restore default system keyboard shortcuts which were previously inhibited.
This undoes the effect of toplevel:inhibit-system-shortcuts.
Passed: a <GdkToplevel>.
Sets the toplevel to be decorated.
Setting decorated to #f hints the desktop environment that
the surface has its own, client-side decorations and does not need to
have window decorations added.
Passed: a <GdkToplevel>.
Passed: a boolean.
#t to request decorations
Sets the toplevel to be deletable.
Setting deletable to #t hints the desktop environment that
it should offer the user a way to close the surface.
Passed: a <GdkToplevel>.
Passed: a boolean.
#t to request a delete button
Sets the gravity that is used when changing the toplevel size programmatically.
Passed: a <GdkToplevel>.
a toplevel
Passed: a <GdkGravity>, or one of its symbols.
the new gravity
Sets a list of icons for the surface.
One of these will be used to represent the surface in iconic form. The icon may be shown in window lists or task bars. Which icon size is shown depends on the window manager. The window manager can scale the icon but setting several size icons can give better image quality.
Note that some platforms don’t support surface icons.
Passed: a <GdkToplevel>.
Passed: a list, each a <GdkTexture>.
A list of textures to use as icon, of different sizes
Sets the toplevel to be modal.
The application can use this hint to tell the window manager that a certain surface has modal behaviour. The window manager can use this information to handle modal surfaces in a special way.
You should only use this on surfaces for which you have previously
called toplevel:set-transient-for.
Passed: a <GdkToplevel>.
Passed: a boolean.
#t if the surface is modal, #f otherwise.
Sets the startup notification ID.
When using GTK, typically you should use gtk_window_set_startup_id() instead of this low-level function.
Passed: a <GdkToplevel>.
Passed: a string.
a string with startup-notification identifier
Sets the title of a toplevel surface.
The title maybe be displayed in the titlebar, in lists of windows, etc.
Passed: a <GdkToplevel>.
Passed: a string.
title of surface
Sets a transient-for parent.
Indicates to the window manager that surface is a transient dialog associated with the application surface parent. This allows the window manager to do things like center surface on parent and keep surface above parent.
See gtk_window_set_transient_for() if you’re using GtkWindow.
Passed: a <GdkToplevel>.
Passed: a <GdkSurface>.
another toplevel <GdkSurface>
Asks the windowing system to show the window menu.
The window menu is the menu shown when right-clicking the titlebar on traditional windows managed by the window manager. This is useful for windows using client-side decorations, activating it with a right-click on the window decorations.
Passed: a <GdkToplevel>.
Passed: a <GdkEvent>.
a <GdkEvent> to show the menu for
Returned: a boolean.
#t if the window menu was shown and #f otherwise.
Returns whether the desktop environment supports tiled window states.
Passed: a <GdkToplevel>.
Returned: a boolean.
#t if the desktop environment supports tiled window states
Performs a title bar gesture.
Passed: a <GdkToplevel>.
Passed: a <GdkTitlebarGesture>, or one of
its symbols.
Returned: a boolean.
whether the gesture was performed
Connect a handler with (connect object toplevel:compute-size
handler). It is called as (handler self size).
Emitted when the size for the surface needs to be computed, when it is present.
This signal will normally be emitted during or after a call to
toplevel:present, depending on the
configuration received by the windowing system. It may also be emitted
at any other point in time, in response to the windowing system
spontaneously changing the configuration of the toplevel surface.
It is the responsibility of the toplevel user to handle this signal and
compute the desired size of the toplevel, given the information passed
via the <GdkToplevelSize> object. Failing to
do so will result in an arbitrary size being used as a result.
Passed: a <GdkToplevel>.
Passed: a <GdkToplevelSize>.