| Top |
PhoshLayerSurfacePhoshLayerSurface — A GtkWindow rendered as a LayerSurface by the compositor |
| GtkWidget * | phosh_layer_surface_new () |
| struct zwlr_layer_surface_v1 * | phosh_layer_surface_get_layer_surface () |
| struct wl_surface * | phosh_layer_surface_get_wl_surface () |
| void | phosh_layer_surface_set_size () |
| void | phosh_layer_surface_set_margins () |
| void | phosh_layer_surface_set_exclusive_zone () |
| void | phosh_layer_surface_set_kbd_interactivity () |
| void | phosh_layer_surface_wl_surface_commit () |
| guint | anchor | Read / Write / Construct Only |
| guint | configured-height | Read |
| guint | configured-width | Read |
| int | exclusive-zone | Read / Write |
| guint | height | Read / Write |
| gboolean | kbd-interactivity | Read / Write |
| guint | layer | Read / Write / Construct Only |
| gpointer | layer-shell | Read / Write / Construct Only |
| int | margin-bottom | Read / Write |
| int | margin-left | Read / Write |
| int | margin-right | Read / Write |
| int | margin-top | Read / Write |
| char * | namespace | Read / Write / Construct Only |
| guint | width | Read / Write |
| gpointer | wl-output | Read / Write / Construct Only |
GObject ╰── GInitiallyUnowned ╰── GtkWidget ╰── GtkContainer ╰── GtkBin ╰── GtkWindow ╰── PhoshLayerSurface ├── PhoshBackground ├── PhoshFader ├── PhoshHome ├── PhoshLockscreen ├── PhoshLockshield ├── PhoshNetworkAuthPrompt ├── PhoshNotificationBanner ├── PhoshPanel ├── PhoshPolkitAuthPrompt ╰── PhoshSystemPrompt
PhoshLayerSurface allows to use a Wayland surface backed by the layer-shell protocol as GtkWindow. This allows to render e.g. panels and backgrounds using GTK.
GtkWidget * phosh_layer_surface_new (gpointer layer_shell,gpointer wl_output);
struct zwlr_layer_surface_v1 *
phosh_layer_surface_get_layer_surface (PhoshLayerSurface *self);
struct wl_surface *
phosh_layer_surface_get_wl_surface (PhoshLayerSurface *self);
Get the layer wayland surface or NULL if the window is not yet realized.
void phosh_layer_surface_set_size (PhoshLayerSurface *self,int width,int height);
Set the size of a layer surface. A value of '-1' indicates 'use old value'
void phosh_layer_surface_set_margins (PhoshLayerSurface *self,int top,int right,int bottom,int left);
Set anchor margins of a layer surface.
void phosh_layer_surface_set_exclusive_zone (PhoshLayerSurface *self,int zone);
Set exclusive zone of a layer surface.
void phosh_layer_surface_set_kbd_interactivity (PhoshLayerSurface *self,gboolean interactivity);
void
phosh_layer_surface_wl_surface_commit (PhoshLayerSurface *self);
Forces a commit of layer surface's state.
struct PhoshLayerSurfaceClass {
GtkWindowClass parent_class;
/* Signals
*/
void (*configured) (PhoshLayerSurface *self);
};
“anchor” property“anchor” guint
The edges to anchor the surface to.
Owner: PhoshLayerSurface
Flags: Read / Write / Construct Only
Default value: 0
“configured-height” property“configured-height” guint
The height of the layer surface set by the compositor.
Owner: PhoshLayerSurface
Flags: Read
Default value: 0
“configured-width” property“configured-width” guint
The width of the layer surface set by the compositor.
Owner: PhoshLayerSurface
Flags: Read
Default value: 0
“exclusive-zone” property “exclusive-zone” int
Set area that is not occluded with other surfaces.
Owner: PhoshLayerSurface
Flags: Read / Write
Allowed values: >= -1
Default value: 0
“height” property“height” guint
The height of the layer surface.
Owner: PhoshLayerSurface
Flags: Read / Write
Default value: 0
“kbd-interactivity” property“kbd-interactivity” gboolean
Whether the surface interacts with the keyboard.
Owner: PhoshLayerSurface
Flags: Read / Write
Default value: FALSE
“layer” property“layer” guint
The layer the surface should be attached to.
Owner: PhoshLayerSurface
Flags: Read / Write / Construct Only
Default value: 0
“layer-shell” property“layer-shell” gpointer
The layer shell wayland global.
Owner: PhoshLayerSurface
Flags: Read / Write / Construct Only
“margin-bottom” property “margin-bottom” int
Distance away from the bottom anchor point.
Owner: PhoshLayerSurface
Flags: Read / Write
Default value: 0
“margin-left” property “margin-left” int
Distance away from the left anchor point.
Owner: PhoshLayerSurface
Flags: Read / Write
Default value: 0
“margin-right” property “margin-right” int
Distance away from the right anchor point.
Owner: PhoshLayerSurface
Flags: Read / Write
Default value: 0
“margin-top” property “margin-top” int
Distance away from the top anchor point.
Owner: PhoshLayerSurface
Flags: Read / Write
Default value: 0
“namespace” property “namespace” char *
Namespace of the layer surface.
Owner: PhoshLayerSurface
Flags: Read / Write / Construct Only
Default value: ""
“width” property“width” guint
The width of the layer surface.
Owner: PhoshLayerSurface
Flags: Read / Write
Default value: 0
“wl-output” property“wl-output” gpointer
The wl_output associated with this surface.
Owner: PhoshLayerSurface
Flags: Read / Write / Construct Only
“configured” signalvoid user_function (PhoshLayerSurface *self, gpointer user_data)
This signal is emitted once we received the configure event from the compositor.
self |
The PhoshLayerSurface instance. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last