Desktop (gb.desktop)

This class allows you to use desktop-agnostic routines based on the freedesktop standards and xdg-utils project.

Diese Klasse reimplementiert Desktop in gb.qt4.

Diese Klasse ist statisch.

Diese Klasse wirkt wie ein nur lesbar statisches Array.

Inherited constants
Charset   Returns the charset used by the graphical interface for displaying text.

Statische Eigenschaften
ActiveWindow   Returns or sets the current active top-level window.
CacheDir   Return the base directory relative to which user specific non-essential data files should be stored.
ConfigDir   Return the base directory relative to which user specific configuration files should be stored.
Count   Returns or sets the number or virtual desktops.
Current   Returns or sets the current virtual desktop.
DataDir   Return the base directory relative to which user specific data files should be stored.
NetworkAvailable   Returns True if any network interface (other than the loopback) is available.
Passwords   Returns a virtual object that allows to use the password storage of the current desktop environment.
Path   Returns the path of the desktop.
RemoteDisplay   Return if the current desktop is remote.
RootWindow   Returns the X11 handle of the root window.
RuntimeDir   Return the base directory relative to which user-specific non-essential runtime files and other file objects (such as sockets, named pipes, ...) should be stored.
ScreenSaver   Manages the screen saver.
Showing   Returns or sets if the "show desktop" flag is set.
UsePortal   Return or set if the desktop portal must be used.
Windows   Returns a virtual object that represents the list of all top-level windows.

Inherited static properties
H   A synonymous of the Height property.
HasSystemTray   Return if the desktop has a system tray.
Height   Return the height of the usable desktop rectangle displayed on the default monitor.
Platform   Return the underlying desktop platform.
Resolution   Returns the desktop screen resolution in DPI.
Scale   Returns half of the height of the default desktop font in pixels.
Type   Return the current desktop environment name.
Types   Return all desktop types defined by the environment.
W   A synonymous of the Width property.
Width   Return the width of the usable desktop rectangle displayed on the default monitor.
X   Return the left coordinate of the usable desktop rectangle displayed on the default monitor.
Y   Return the top coordinate of the usable desktop rectangle displayed on the default monitor.

Statische Methoden
FindWindow   Find all X11 top-level window that match the specified criteria.
GetDirectory   Return the desktop directory specified in its Type argument.
GetFileIcon   Return the icon associated with a specific file.
Open   Opens a file or URL in the user's preferred application.
OpenTerminal   Opens a terminal emulator.
PickColor   Pick a color on the desktop.
RunAs   Run the specified Command as another UserName, by using the desktop-specific tool if possible.
RunAsRoot   Run the specified Command as root, by using the desktop-specific tool if possible.
Screenshot   Return a screenshot of the desktop as a picture object.
SendKeys   Send fake keyboard events to the window having the focus.
SendMail   Sends a mail by using your graphical mail client.

Inherited static methods
Is   Return if the current desktop has a specific type.

If you are running your application as root with sudo.

XDG does not give the same results for a root user and can have unexpected results when trying to use gb.desktop functions.

Using -E with sudo can help by preserving the user env variables making them accesible to your application and gb.desktop.

eg.
# sudo -E $HOME/Myapp/Myapp.gambas