Module: Wnck
- Defined in:
- lib/wnck3/version.rb,
lib/wnck3.rb,
lib/wnck3/loader.rb
Overview
Copyright (C) 2019 Ruby-GNOME2 Project Team
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Defined Under Namespace
Modules: ClientType, MotionDirection, PagerDisplayMode, PagerScrollMode, TasklistGroupingType, Version, WindowActions, WindowGravity, WindowMoveResizeMask, WindowState, WindowType, _LayoutCorner, _LayoutOrientation Classes: ActionMenu, Application, ClassGroup, Handle, ImageMenuItem, Loader, Pager, Screen, Selector, Tasklist, Window, Workspace
Constant Summary collapse
- DEFAULT_ICON_SIZE =
32- DEFAULT_MINI_ICON_SIZE =
16- MAJOR_VERSION =
43- MICRO_VERSION =
0- MINOR_VERSION =
0- LOG_DOMAIN =
"Wnck"
Instance Method Summary collapse
-
#client_type=(ewmh_sourceindication_client_type) ⇒ nil
Sets the role of the libwnck user.
-
#default_icon_size=(size) ⇒ nil
The default main icon size is %WNCK_DEFAULT_ICON_SIZE.
-
#default_mini_icon_size=(size) ⇒ nil
The default main icon size is %WNCK_DEFAULT_MINI_ICON_SIZE.
-
#pid_read_resource_usage(gdk_display, pid, usage) ⇒ nil
Looks for the X resource usage of the application with process ID pid on display gdisplay.
-
#shutdown ⇒ nil
Makes libwnck stop listening to events and tear down all resources from libwnck.
-
#xid_read_resource_usage(gdk_display, xid, usage) ⇒ nil
Looks for the X resource usage of the application owning the X window ID xid on display gdisplay.
Instance Method Details
#client_type=(ewmh_sourceindication_client_type) ⇒ nil
Sets the role of the libwnck user.
The default role is %WNCK_CLIENT_TYPE_APPLICATION. Therefore, for
applications providing some window management features, like pagers or
tasklists, it is important to set the role to %WNCK_CLIENT_TYPE_PAGER for
libwnck to properly work.
This function should only be called once per program. Additional calls
with the same client type will be silently ignored. An attempt to change
the client type to a differnet value after it has already been set will
be ignored and a critical warning will be logged.
#default_icon_size=(size) ⇒ nil
The default main icon size is %WNCK_DEFAULT_ICON_SIZE. This function allows
to change this value.
#default_mini_icon_size=(size) ⇒ nil
The default main icon size is %WNCK_DEFAULT_MINI_ICON_SIZE. This function
allows to change this value.
#pid_read_resource_usage(gdk_display, pid, usage) ⇒ nil
Looks for the X resource usage of the application with process ID pid on
display gdisplay. If no resource usage can be found, then all fields of
usage are set to 0.
In order to find the resource usage of an application that does not have an
X window visible to libwnck (panel applets do not have any toplevel windows,
for example), wnck_pid_read_resource_usage() walks through the whole tree of
X windows. Since this walk is expensive in CPU, a cache is created. This
cache is updated in the background. This means there is a non-null
probability that no resource usage will be found for an application, even if
it is an X client. If this happens, calling wnck_pid_read_resource_usage()
again after a few seconds should work.
To properly work, this function requires the XRes extension on the X server.
process ID pid.
#shutdown ⇒ nil
Makes libwnck stop listening to events and tear down all resources from
libwnck. This should be done if you are not going to need the state change
notifications for an extended period of time, to avoid wakeups with every
key and focus event.
After this, all pointers to Wnck object you might still hold are invalid.
Due to the fact that Wnck objects are all
owned by libwnck, users of this API through introspection should be
extremely careful: they must explicitly clear variables referencing objects
before this call. Failure to do so might result in crashes.
#xid_read_resource_usage(gdk_display, xid, usage) ⇒ nil
Looks for the X resource usage of the application owning the X window ID
xid on display gdisplay. If no resource usage can be found, then all
fields of usage are set to 0.
To properly work, this function requires the XRes extension on the X server.
the X window ID xid.