Top |
XfwApplication * | application | Read |
XfwWindowCapabilities | capabilities | Read |
GStrv | class-ids | Read |
GIcon * | gicon | Read |
gpointer | monitors | Read |
char * | name | Read |
XfwScreen * | screen | Read / Write / Construct Only |
XfwWindowState | state | Read |
XfwWindowType | type | Read |
XfwWorkspace * | workspace | Read |
void | capabilities-changed | Run Last |
void | class-changed | Run Last |
void | closed | Run Last |
void | geometry-changed | Run Last |
void | icon-changed | Run Last |
void | name-changed | Run Last |
void | state-changed | Run Last |
void | type-changed | Run Last |
void | workspace-changed | Run Last |
GEnum ╰── XfwWindowType GFlags ├── XfwWindowCapabilities ╰── XfwWindowState GObject ╰── XfwWindow
XfwWindow describes a toplevel window on the screen, and provides access to the window's state, type, and actions that can be performed on it.
Other metadata, like the window's title or icon, is also available.
If the window supports it, actions can be taken, like minimizing, maximizing, pinning, moving between workspaces, or closing the window.
Note that XfwWindow is actually an interface; when obtaining an instance, an instance of a windowing-environment-specific object that implements this interface will be returned.
const gchar *const *
xfw_window_get_class_ids (XfwWindow *window
);
Fetches window
's class ids. On X11 this should contain the class and instance
names of the WM_CLASS property.
On Wayland, it's likely to be limited to the application ID,
which should correspond to the basename of the application's desktop file.
a NULL
-terminated array of strings owned by the XfwWindow.
[array zero-terminated=1][element-type utf8][transfer none]
Since: 4.19.3
const gchar *
xfw_window_get_name (XfwWindow *window
);
Fetches window
's name/title.
GdkPixbuf * xfw_window_get_icon (XfwWindow *window
,gint size
,gint scale
);
Fetches window
's icon. If window
has no icon, a fallback icon may be
returned. Whether or not the returned icon is a fallback icon can be
determined using xfw_window_icon_is_fallback()
.
GIcon *
xfw_window_get_gicon (XfwWindow *window
);
Fetches window
's icon as a size-independent GIcon. If an icon cannot be
found, a GIcon representing a fallback icon will be returned. Whether or
not the returned icon is a fallback icon can be determined using
xfw_window_icon_is_fallback()
.
Since: 4.19.1
gboolean
xfw_window_icon_is_fallback (XfwWindow *window
);
Determines if window
does not have an icon, and thus a fallback icon
will be returned from xfw_window_get_icon()
and xfw_window_get_gicon()
.
Since: 4.19.1
XfwWindowState
xfw_window_get_state (XfwWindow *window
);
Fetches window
's state bitfield.
XfwWindowCapabilities
xfw_window_get_capabilities (XfwWindow *window
);
Fetches window
's capabilities bitfield.
GdkRectangle *
xfw_window_get_geometry (XfwWindow *window
);
Fetches window
's position and size.
struct _XfwScreen *
xfw_window_get_screen (XfwWindow *window
);
Fetches the XfwScreen instance that owns window
.
XfwWorkspace *
xfw_window_get_workspace (XfwWindow *window
);
Fetches window
's workspace, if any. This may return NULL
if window
is
not on a workspace, or is pinned to all workspaces.
A XfwWorkspace instance, with a
reference owned by window
, or NULL
.
[nullable][transfer none]
GList *
xfw_window_get_monitors (XfwWindow *window
);
Fetches the list of monitors window
is displayed on, if any.
A list
of XfwMonitor instances, or NULL
. The list and its contents are owned by
window
and should not be modified or freed.
[nullable][element-type XfwMonitor][transfer none]
XfwApplication *
xfw_window_get_application (XfwWindow *window
);
Fetches window
's application.
gboolean xfw_window_activate (XfwWindow *window
,XfwSeat *seat
,guint64 event_timestamp
,GError **error
);
gboolean xfw_window_close (XfwWindow *window
,guint64 event_timestamp
,GError **error
);
gboolean xfw_window_set_geometry (XfwWindow *window
,const GdkRectangle *rect
,GError **error
);
gboolean xfw_window_set_button_geometry (XfwWindow *window
,GdkWindow *relative_to
,const GdkRectangle *rect
,GError **error
);
gboolean xfw_window_move_to_workspace (XfwWindow *window
,XfwWorkspace *workspace
,GError **error
);
gboolean xfw_window_set_minimized (XfwWindow *window
,gboolean is_minimized
,GError **error
);
gboolean xfw_window_set_maximized (XfwWindow *window
,gboolean is_maximized
,GError **error
);
gboolean xfw_window_set_fullscreen (XfwWindow *window
,gboolean is_fullscreen
,GError **error
);
gboolean xfw_window_set_skip_pager (XfwWindow *window
,gboolean is_skip_pager
,GError **error
);
gboolean xfw_window_set_skip_tasklist (XfwWindow *window
,gboolean is_skip_tasklist
,GError **error
);
gboolean xfw_window_set_pinned (XfwWindow *window
,gboolean is_pinned
,GError **error
);
gboolean xfw_window_set_shaded (XfwWindow *window
,gboolean is_shaded
,GError **error
);
gboolean xfw_window_set_above (XfwWindow *window
,gboolean is_above
,GError **error
);
gboolean xfw_window_set_below (XfwWindow *window
,gboolean is_below
,GError **error
);
gboolean xfw_window_is_on_workspace (XfwWindow *window
,XfwWorkspace *workspace
);
gboolean xfw_window_is_in_viewport (XfwWindow *window
,XfwWorkspace *workspace
);
Flags bitfield that describes actions that can be taken on the window.
window has no capabilities. |
||
window can be minimized/hidden. |
||
window can be unminimized/unhidden. |
||
window can be maximized. |
||
window can be unmaximized/restored. |
||
window can be set fullscreen. |
||
window can be unset fullscreen. |
||
window can be shaded. |
||
window can be unshaded. |
||
window can be moved. |
||
window can be resized. |
||
window can be placed above others. |
||
always above window can be returned to the normal stacking order. |
||
window can be placed below others. |
||
always below window can be returned to the normal stacking order. |
||
window can be moved to a different workspace or can be pinned and unpinned. |
A flags bitfield representing various states the window can hold.
window has no state bits set. |
||
window is active (and often has the keyboard focus). |
||
window is minimized/hidden. |
||
window is maximized. |
||
window is filling the entire screen. |
||
window should not be shown in pagers. |
||
window should not be shown in task lists. |
||
window is shown on al workspaces. |
||
window is hidden, except for its title bar. |
||
window is always shown above other windows. |
||
window is always shown below other windows. |
||
window is attempting to get the user's attention. |
Enumeration describing the windows type or function.
window is a regular window. |
||
window is responsible for drawing the desktop. |
||
window is a dock or panel. |
||
window is a temporary dialog, like an error alert. |
||
window is a detached toolbar. |
||
window is a popup menu. |
||
window is a utility menu, like a tool picker or color palette. |
||
window is an application splash screen. |
“application”
property“application” XfwApplication *
The XfwApplication that owns this window.
Owner: XfwWindow
Flags: Read
“capabilities”
property“capabilities” XfwWindowCapabilities
The window's capabilities bitfield.
Owner: XfwWindow
Flags: Read
“class-ids”
property “class-ids” GStrv
The window's class ids.
Owner: XfwWindow
Flags: Read
Since: 4.19.3
“gicon”
property “gicon” GIcon *
The GIcon that represents this window.
Owner: XfwWindow
Flags: Read
“monitors”
property “monitors” gpointer
The list of XfwMonitors (if any) that the window is displayed on.
Owner: XfwWindow
Flags: Read
“name”
property “name” char *
The window's name or title.
Owner: XfwWindow
Flags: Read
Default value: ""
“screen”
property“screen” XfwScreen *
The XfwScreen instances that owns this window.
Owner: XfwWindow
Flags: Read / Write / Construct Only
“state”
property“state” XfwWindowState
The window's state bitfield.
Owner: XfwWindow
Flags: Read
“type”
property“type” XfwWindowType
The window's type or function.
Owner: XfwWindow
Flags: Read
Default value: XFW_WINDOW_TYPE_NORMAL
“capabilities-changed”
signalvoid user_function (XfwWindow *window, XfwWindowCapabilities changed_mask, XfwWindowCapabilities new_state, gpointer user_data)
Emitted when window
's capabilities change.
window |
the object which received the signal. |
|
changed_mask |
bitfield representing which state bits have changed. |
|
new_state |
the new state bitfield. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“class-changed”
signalvoid user_function (XfwWindow *window, gpointer user_data)
Emitted when at least one of the window
's class ids changes.
window |
the object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
Since: 4.19.3
“closed”
signalvoid user_function (XfwWindow *window, gpointer user_data)
Emitted when window
is closed.
window |
the object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“geometry-changed”
signalvoid user_function (XfwWindow *window, gpointer user_data)
Emitted when window
's position or size changes.
window |
the object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“icon-changed”
signalvoid user_function (XfwWindow *window, gpointer user_data)
Emitted when window
's icon changes.
window |
the object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“name-changed”
signalvoid user_function (XfwWindow *window, gpointer user_data)
Emitted when window
's name/title changes.
window |
the object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“state-changed”
signalvoid user_function (XfwWindow *window, XfwWindowState changed_mask, XfwWindowState new_state, gpointer user_data)
Emitted when window
's state changes.
window |
the object which received the signal. |
|
changed_mask |
bitfield representing which state bits have changed. |
|
new_state |
the new state bitfield. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“type-changed”
signalvoid user_function (XfwWindow *window, XfwWindowType old_type, gpointer user_data)
Emitted when window
's type changes.
window |
the object which received the signal. |
|
old_type |
the previous window type. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“workspace-changed”
signalvoid user_function (XfwWindow *window, gpointer user_data)
Emitted when window
is moved to a different worksapce.
window |
the object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last