Top | ![]() |
![]() |
![]() |
![]() |
gboolean | gdk_toplevel_present () |
gboolean | gdk_toplevel_minimize () |
gboolean | gdk_toplevel_lower () |
void | gdk_toplevel_focus () |
GdkSurfaceState | gdk_toplevel_get_state () |
void | gdk_toplevel_set_title () |
void | gdk_toplevel_set_startup_id () |
void | gdk_toplevel_set_transient_for () |
void | gdk_toplevel_set_modal () |
void | gdk_toplevel_set_icon_list () |
gboolean | gdk_toplevel_show_window_menu () |
void | gdk_toplevel_set_decorated () |
void | gdk_toplevel_set_deletable () |
gboolean | gdk_toplevel_supports_edge_constraints () |
void | gdk_toplevel_inhibit_system_shortcuts () |
void | gdk_toplevel_restore_system_shortcuts () |
void | gdk_toplevel_begin_resize () |
void | gdk_toplevel_begin_move () |
gboolean | decorated | Read / Write |
gboolean | deletable | Read / Write |
GdkFullscreenMode | fullscreen-mode | Read / Write |
gpointer | icon-list | Read / Write |
gboolean | modal | Read / Write |
gboolean | shortcuts-inhibited | Read |
gchar * | startup-id | Read / Write |
GdkSurfaceState | state | Read |
gchar * | title | Read / Write |
GdkSurface * | transient-for | Read / Write |
gboolean gdk_toplevel_present (GdkToplevel *toplevel
,int width
,int height
,GdkToplevelLayout *layout
);
Present toplevel
after having processed the GdkToplevelLayout rules.
If the toplevel was previously now showing, it will be showed,
otherwise it will change layout according to layout
.
Presenting may fail.
toplevel |
the GdkToplevel to show |
|
width |
the unconstrained toplevel width to layout |
|
height |
the unconstrained toplevel height to layout |
|
layout |
the GdkToplevelLayout object used to layout |
gboolean
gdk_toplevel_minimize (GdkToplevel *toplevel
);
Asks to minimize the toplevel
.
The windowing system may choose to ignore the request.
gboolean
gdk_toplevel_lower (GdkToplevel *toplevel
);
Asks to lower the toplevel
below other windows.
The windowing system may choose to ignore the request.
void gdk_toplevel_focus (GdkToplevel *toplevel
,guint32 timestamp
);
Sets keyboard focus to surface
.
In most cases, gtk_window_present_with_time()
should be used
on a GtkWindow, rather than calling this function.
GdkSurfaceState
gdk_toplevel_get_state (GdkToplevel *toplevel
);
Gets the bitwise OR of the currently active surface state flags, from the GdkSurfaceState enumeration.
void gdk_toplevel_set_title (GdkToplevel *toplevel
,const char *title
);
Sets the title of a toplevel surface, to be displayed in the titlebar, in lists of windows, etc.
void gdk_toplevel_set_startup_id (GdkToplevel *toplevel
,const char *startup_id
);
When using GTK, typically you should use gtk_window_set_startup_id()
instead of this low-level function.
void gdk_toplevel_set_transient_for (GdkToplevel *toplevel
,GdkSurface *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 or
GtkDialog.
void gdk_toplevel_set_modal (GdkToplevel *toplevel
,gboolean 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 gdk_toplevel_set_transient_for()
.
void gdk_toplevel_set_icon_list (GdkToplevel *toplevel
,GList *surfaces
);
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.
gboolean gdk_toplevel_show_window_menu (GdkToplevel *toplevel
,GdkEvent *event
);
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.
void gdk_toplevel_set_decorated (GdkToplevel *toplevel
,gboolean decorated
);
Setting decorated
to FALSE
hints the desktop environment
that the surface has its own, client-side decorations and
does not need to have window decorations added.
void gdk_toplevel_set_deletable (GdkToplevel *toplevel
,gboolean deletable
);
Setting deletable
to TRUE
hints the desktop environment
that it should offer the user a way to close the surface.
gboolean
gdk_toplevel_supports_edge_constraints
(GdkToplevel *toplevel
);
Returns whether the desktop environment supports tiled window states.
void gdk_toplevel_inhibit_system_shortcuts (GdkToplevel *toplevel
,GdkEvent *event
);
Requests that the toplevel
inhibit the system shortcuts, 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 gdk_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 GdkToplevel::shortcuts-inhibited property.
toplevel |
the GdkToplevel requesting system keyboard shortcuts |
|
event |
the GdkEvent that is triggering the inhibit
request, or |
[nullable] |
void
gdk_toplevel_restore_system_shortcuts (GdkToplevel *toplevel
);
Restore default system keyboard shortcuts which were previously
requested to be inhibited by gdk_toplevel_inhibit_system_shortcuts()
.
void gdk_toplevel_begin_resize (GdkToplevel *toplevel
,GdkSurfaceEdge edge
,GdkDevice *device
,int button
,double x
,double y
,guint32 timestamp
);
Begins an interactive resize operation (for a toplevel surface). You might use this function to implement a “window resize grip.”
toplevel |
||
edge |
the edge or corner from which the drag is started |
|
device |
the device used for the operation. |
[nullable] |
button |
the button being used to drag, or 0 for a keyboard-initiated drag |
|
x |
surface X coordinate of mouse click that began the drag |
|
y |
surface Y coordinate of mouse click that began the drag |
|
timestamp |
timestamp of mouse click that began the drag (use |
void gdk_toplevel_begin_move (GdkToplevel *toplevel
,GdkDevice *device
,int button
,double x
,double y
,guint32 timestamp
);
Begins an interactive move operation (for a toplevel surface). You might use this function to implement draggable titlebars.
toplevel |
||
device |
the device used for the operation |
|
button |
the button being used to drag, or 0 for a keyboard-initiated drag |
|
x |
surface X coordinate of mouse click that began the drag |
|
y |
surface Y coordinate of mouse click that began the drag |
|
timestamp |
timestamp of mouse click that began the drag |
“decorated”
property “decorated” gboolean
Decorated.
Owner: GdkToplevel
Flags: Read / Write
Default value: FALSE
“deletable”
property “deletable” gboolean
Deletable.
Owner: GdkToplevel
Flags: Read / Write
Default value: FALSE
“fullscreen-mode”
property“fullscreen-mode” GdkFullscreenMode
Fullscreen mode.
Owner: GdkToplevel
Flags: Read / Write
Default value: GDK_FULLSCREEN_ON_CURRENT_MONITOR
“icon-list”
property “icon-list” gpointer
The list of icon textures.
Owner: GdkToplevel
Flags: Read / Write
“modal”
property “modal” gboolean
Whether the surface is modal.
Owner: GdkToplevel
Flags: Read / Write
Default value: FALSE
“shortcuts-inhibited”
property “shortcuts-inhibited” gboolean
Whether keyboard shortcuts are inhibited.
Owner: GdkToplevel
Flags: Read
Default value: FALSE
“startup-id”
property “startup-id” gchar *
The startup ID of the surface.
Owner: GdkToplevel
Flags: Read / Write
Default value: NULL
“state”
property“state” GdkSurfaceState
State.
Owner: GdkToplevel
Flags: Read
Default value: GDK_SURFACE_STATE_WITHDRAWN
“title”
property “title” gchar *
The title of the surface.
Owner: GdkToplevel
Flags: Read / Write
Default value: NULL
“transient-for”
property“transient-for” GdkSurface *
The transient parent of the surface.
Owner: GdkToplevel
Flags: Read / Write