plank – Vala Binding Reference

plank Reference Manual

# plank

## Description:

## Content:

### Namespaces:

- Plank -

### Classes:

- DBusManager - Handles all the exported DBus functions of the dock
- DockController - A controller class for managing a single dock.
- DockPreferences - Contains all preferences for docks.
- DockRenderer - Handles all of the drawing for a dock.
- DragManager - Handles all of the drag'n'drop events for a dock.
- HideManager - Handles checking if a dock should hide or not.
- PositionManager - Handles computing any size/position information for the dock.

### Enums:

- HideType - If/How the dock should hide itself.

### Constants:

- public const unowned string G_RESOURCE_PATH

- DBus -

### Classes:

- Client - Connects to a running instance of plank via DBus and provides remote interface to a currently runnning dock.

- Drawing -

### Classes:

- AnimatedRenderer - Handles animated rendering. Uses a timer and continues requesting redraws for a widget until no more animation is needed.
- DrawingService - Utility service for loading icons and working with pixbufs.
- DockSurface - A dock surface is a wrapper class for a Cairo.Surface. It encapsulates a surface/context and provides utility methods.
- DockTheme - A themed renderer for dock windows.
- SurfaceCache - Cache multiple sizes of the assumed same image
- Theme - A themed renderer for windows.

### Structs:

- Color - Represents a RGBA color and has methods for manipulating the color.

### Enums:

- AnimationMode - The available animation modes
- SurfaceCacheFlags - Controls some internal behaviors of a Plank.Drawing.SurfaceCache

### Delegates:

- public delegate DockSurface? DrawFunc (int width, int height, DockSurface model, DrawDataFunc<G>? draw_data_func)
  Creates a new surface based on the given information
- public delegate DockSurface? DrawDataFunc (int width, int height, DockSurface model, G data)
  Creates a new surface using the given element and information

### Methods:

- public double easing_for_mode (AnimationMode mode, double t, double d)
  Calculate an interpolated value for selected animation-mode, and given elapsed time and total duration.

- Factories -

### Classes:

- AbstractMain - The main class for all dock applications. All docks should extend this class. In the constructor, the string fields should be initialized to customize the dock.
- Factory - The main factory class for the dock.
- ItemFactory - An item factory. Creates Items.DockItems based on .dockitem files.

- Items -

### Classes:

- ApplicationDockItem - A dock item for applications (with .desktop launchers).
- ApplicationDockItemProvider - A container and controller class for managing application dock items on a dock.
- DefaultApplicationDockItemProvider - The default container and controller class for managing application dock items on a dock.
- DockContainer - A container and controller class for managing dock elements on a dock.
- DockElement - The base class for all dock elements.
- DockItem - The base class for all dock items.
- DockItemProvider - A container and controller class for managing dock items.
- DockItemPreferences - Contains preference keys for a dock item.
- FileDockItem - A dock item for files or folders on the dock.
- PlaceholderDockItem - A dock item as a placeholder for the dock itself if nothing was added yet.
- PlankDockItem - A dock item for the dock itself. Has things like about, help, quit etc.
- TransientDockItem - A dock item for applications which aren't pinned or doesn't have a matched desktop-files.

### Enums:

- Animation - What type of animation to perform when an item is or was interacted with.
- IndicatorState - What item indicator to show.
- ItemState - The current activity state of an item. The item has several states to track and can be in any combination of them.
- PopupButton - What mouse button pops up the context menu on an item. Can be multiple buttons.

- Services -

### Interfaces:

- PrefsSerializable - This interface is used by objects that need to be serialized in a Preferences. The object must have a string representation and provide these methods to translate between the string and object representations.

### Classes:

- Logger - A logging class to display all console messages in a nice colored format.
- Paths - A wrapper class that gives static instances of GLib.File for commonly used paths. Most paths are retrieved from GLib.Environment, which on Linux uses the XDG Base Directory specification (see http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html).
- Preferences - The base class for all preferences in the system. Preferences are serialized to files. The file is watched for changes and loads new values if the backing file changed. When any public property of a sub-class is changed, the public properties are serialized to the backing file.
- System - A utility class for launching applications and opening files/URIs.
- Worker -

### Enums:

- LogLevel - Controls what messages show in the console log.
- TaskPriority -

### Delegates:

- public delegate G TaskFunc () throws Error

- Version - Some constants and functions to determine and check the version of the plank library.

### Constants:

- public const int MAJOR
  Like get_major_version, but from the headers used at application compile time, rather than from the library linked against at application run time
- public const int MINOR
  Like get_minor_version, but from the headers used at application compile time, rather than from the library linked against at application run time
- public const int MICRO
  Like get_micro_version, but from the headers used at application compile time, rather than from the library linked against at application run time
- public const int NANO
  Like get_nano_version, but from the headers used at application compile time, rather than from the library linked against at application run time

### Methods:

- public uint get_major_version ()
  Returns the major version number of the plank library.
- public uint get_minor_version ()
  Returns the minor version number of the plank library.
- public uint get_micro_version ()
  Returns the micro version number of the plank library.
- public uint get_nano_version ()
  Returns the nano version number of the plank library.
- public unowned string? check (uint required_major, uint required_minor, uint required_micro)
  Checks that the plank library in use is compatible with the given version.

- Widgets -

### Classes:

- CompositedWindow - A Gtk.Window with compositing support enabled. The default expose event will draw a completely transparent window.
- DockWindow - The main window for all docks.
- HoverWindow - A hover window that shows labels for dock items. This window floats outside (but near) the dock.
- PoofWindow - An animated window that draws a 'poof' animation. Used when dragging items off the dock.
- PreferencesWindow -
- TitledSeparatorMenuItem - A Gtk.SeparatorMenuItem with a title on it. The separator can be drawn with or without a line.