Top | ![]() |
![]() |
![]() |
![]() |
void | gtk_layer_init_for_window () |
void | gtk_layer_set_namespace () |
void | gtk_layer_set_layer () |
void | gtk_layer_set_monitor () |
void | gtk_layer_set_anchor () |
void | gtk_layer_set_margin () |
void | gtk_layer_set_exclusive_zone () |
void | gtk_layer_auto_exclusive_zone_enable () |
void | gtk_layer_set_keyboard_interactivity () |
insert more general verbiage here
If you wish to force your layer surface window to be a different size than it is by default:
1 2 3 |
gtk_widget_set_size_request (GTK_WIDGET (layer_gtk_window), width, height); // force the window to resize to the new request gtk_window_resize (layer_gtk_window, 1, 1); |
If width or height is -1, the default is used for that axis. If the window is
anchored to opposite edges of the output (see gtk_layer_set_anchor()
), the
size request is ignored. If you later wish to use the default window size,
simply repeat the two calls but with both width and height as -1.
void
gtk_layer_init_for_window (GtkWindow *window
);
Set the window
up to be a layer surface once it is mapped:
This must be called before the window
is realized.
void gtk_layer_set_namespace (GtkWindow *window
,char const*name_space
);
Set the "namespace" of the surface.
No one is quite sure what this is for, but it probably should be something generic
("panel", "osk", etc). The name_space
string is copied, and caller maintians
ownership of original. If the window is currently mapped, it will get remapped so
the change can take effect.
Default is "gtk-layer-shell" (which will be used if set to NULL
)
void gtk_layer_set_layer (GtkWindow *window
,GtkLayerShellLayer layer
);
Set the "layer" on which the surface appears (controls if it is over top of or below other surfaces). If the window
is currently mapped, it will get remapped so the change
can take effect.
Default is GTK_LAYER_SHELL_LAYER_TOP
void gtk_layer_set_monitor (GtkWindow *window
,GdkMonitor *monitor
);
Set the output for the window to be placed on, or NULL
to let the compositor choose.
If the window is currently mapped, it will get remapped so the change can take effect.
Default is NULL
void gtk_layer_set_anchor (GtkWindow *window
,GtkLayerShellEdge edge
,gboolean anchor_to_edge
);
Set whether window
should be anchored to edge
.
If two perpendicular edges are anchored, the surface with be anchored to that corner
If two opposite edges are anchored, the window will be stretched across the screen in that direction
Default is FALSE
for each GtkLayerShellEdge
window |
A layer surface. |
|
edge |
A GtkLayerShellEdge this layer suface may be anchored to. |
|
anchor_to_edge |
Whether or not to anchor this layer surface to |
void gtk_layer_set_margin (GtkWindow *window
,GtkLayerShellEdge edge
,int margin_size
);
Set the margin for a specific edge
of a window
. Effects both surface's distance from
the edge and its exclusive zone size (if auto exclusive zone enabled).
Default is 0 for each GtkLayerShellEdge
window |
A layer surface. |
|
edge |
The GtkLayerShellEdge for which to set the margin. |
|
margin_size |
The margin for |
void gtk_layer_set_exclusive_zone (GtkWindow *window
,int exclusive_zone
);
If auto exclusive zone is enabled, exclusive zone will automatically be set to the
size of the window
+ relevant margin. To disable auto exclusive zone, just set the
exclusive zone to 0 or any other fixed value. There is no need to manually set the
exclusive zone size when using auto exclusive zone.
Default is 0
void
gtk_layer_auto_exclusive_zone_enable (GtkWindow *window
);
Enables auto exclusive zone for window
.