Plank.ApplicationDockItem – plank Reference Manual

# ApplicationDockItem

## Object Hierarchy:

## Description:

public class ApplicationDockItem : DockItem

A dock item for applications (with .desktop launchers).

All known sub-classes:

- TransientDockItem

Namespace: Plank
Package: plank

## Content:

### Properties:

- public Application? App { }

### Static methods:

- public static void parse_launcher (string launcher, out string icon, out string text, ArrayList<string>? actions = null, Map<string,string>? actions_map = null, ArrayList<string>? mimes = null)
  Parses a launcher to get the text, icon and actions.

### Creation methods:

- public ApplicationDockItem.with_dockitem_file (File file)
- public ApplicationDockItem.with_dockitem_filename (string filename)
- public ApplicationDockItem ()

### Methods:

- public bool is_running ()
- public bool is_window ()
- public void set_urgent (bool is_urgent)
- protected override AnimationType on_clicked (PopupButton button, ModifierType mod, uint32 event_time)
  Called when an item is clicked on.
- protected override AnimationType on_scrolled (ScrollDirection direction, ModifierType mod, uint32 event_time)
  Called when an item is scrolled over.
- public override ArrayList<MenuItem> get_menu_items ()
  Returns a list of the item's menu items.
- public override string get_drop_text ()
  The item's text for drop actions.
- public override bool can_accept_drop (ArrayList<string> uris)
  Returns if the item accepts a drop of the given URIs.
- public override bool accept_drop (ArrayList<string> uris)
  Accepts a drop of the given URIs.
- protected override void load_from_launcher ()
  Parses the associated launcher and e.g. sets the icon and text from it.
- public unowned string? get_unity_application_uri ()
  Get libunity application URI
- public unowned string? get_unity_dbusname ()
  Get current libunity dbusname
- public bool has_unity_info ()
  Whether this item provides information worth showing
- public void unity_update (string sender_name, VariantIter prop_iter)
  Update this item's remote libunity value based on the given data
- public void unity_reset ()
  Reset this item's remote libunity values

### Signals:

- public signal void pin_launcher ()
  Signal fired when the item's 'keep in dock' menu item is pressed.
- public signal void app_closed ()
  Signal fired when the application associated with this item closes.
- public signal void app_window_added ()
  Signal fired when the application associated with this item opened a new window.
- public signal void app_window_removed ()
  Signal fired when the application associated with this item closed a window.

### Inherited Members:

All known members inherited from class Plank.DockItem

- Icon
- ForcePixbuf
- Count
- CountVisible
- Progress
- ProgressVisible
- Position
- LastPosition
- State
- Indicator

- AverageIconColor
- DockItemFilename
- Launcher
- Prefs
- load_from_launcher
- @delete
- reset_icon_buffer
- reset_buffers
- unset_move_state

- get_surface
- get_background_surface
- get_foreground_surface
- get_surface_copy
- draw_icon
- draw_icon_fast
- is_valid
- copy_values_to
- deleted

All known members inherited from class Plank.DockElement

- Container
- Text
- IsAttached
- IsVisible
- Button
- ClickedAnimation
- HoveredAnimation
- ScrolledAnimation
- AddTime
- RemoveTime
- LastClicked
- LastHovered

- LastScrolled
- LastUrgent
- LastActive
- LastMove
- LastValid
- create_menu_item
- create_menu_item_with_pixbuf
- clicked
- on_clicked
- hovered
- on_hovered
- scrolled

- on_scrolled
- get_dock
- get_menu_items
- get_drop_text
- can_be_removed
- can_accept_drop
- accept_drop
- unique_id
- as_uri
- reset_buffers
- needs_redraw

All known members inherited from class GLib.Object

- @new
- new_valist
- newv
- add_toggle_ref
- add_weak_pointer
- bind_property
- connect
- constructed
- disconnect
- dispose
- dup_data
- dup_qdata
- freeze_notify
- @get

- get_class
- get_data
- get_property
- get_qdata
- get_type
- notify_property
- @ref
- ref_sink
- replace_data
- replace_qdata
- remove_toggle_ref
- remove_weak_pointer
- @set

- set_data
- set_data_full
- set_property
- set_qdata
- set_qdata_full
- steal_data
- steal_qdata
- thaw_notify
- unref
- weak_ref
- weak_unref
- notify
- ref_count