Cairo-Dock  3.4.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
cairo-dock-dock-manager.h File Reference

Macros

#define gldi_dock_get_name(pDock)
 

Enumerations

enum  GldiIconSize
 TODO: harmonize the values with the simple config -> make some public functions...
 
enum  CairoDocksNotifications {
  NOTIFICATION_ENTER_DOCK,
  NOTIFICATION_LEAVE_DOCK,
  NOTIFICATION_INSERT_ICON,
  NOTIFICATION_REMOVE_ICON,
  NOTIFICATION_ICON_MOVED
}
 signals More...
 

Functions

gchar * gldi_dock_get_readable_name (CairoDock *pDock)
 
CairoDockgldi_dock_get (const gchar *cDockName)
 
Iconcairo_dock_search_icon_pointing_on_dock (CairoDock *pDock, CairoDock **pParentDock)
 
void gldi_dock_rename (CairoDock *pDock, const gchar *cNewName)
 
void gldi_docks_foreach (GHFunc pFunction, gpointer pUserData)
 
void gldi_docks_foreach_root (GFunc pFunction, gpointer pUserData)
 
void gldi_icons_foreach_in_docks (GldiIconFunc pFunction, gpointer pUserData)
 
void cairo_dock_reload_buffers_in_all_docks (gboolean bUpdateIconSize)
 
void gldi_dock_add_conf_file_for_name (const gchar *cDockName)
 
gchar * gldi_dock_add_conf_file (void)
 
void gldi_docks_redraw_all_root (void)
 
void gldi_dock_set_visibility (CairoDock *pDock, CairoDockVisibility iVisibility)
 

Detailed Description

This class manages all the Docks. Each Dock has a name that is unique. A Dock can be a sub-dock or a root-dock, whether there exists an icon that points on it or not, but there is no fundamental difference between both.

Macro Definition Documentation

#define gldi_dock_get_name (   pDock)

Get the name of a Dock.

Parameters
pDockthe dock.
Returns
the name of the dock, that identifies it.

Enumeration Type Documentation

signals

Enumerator
NOTIFICATION_ENTER_DOCK 

notification called when the mouse enters a dock.

NOTIFICATION_LEAVE_DOCK 

notification called when the mouse leave a dock.

NOTIFICATION_INSERT_ICON 

notification called when an icon has just been inserted into a dock. data : {Icon, CairoDock}

NOTIFICATION_REMOVE_ICON 

notification called when an icon is going to be removed from a dock. data : {Icon, CairoDock}

NOTIFICATION_ICON_MOVED 

notification called when an icon is moved inside a dock. data : {Icon, CairoDock}

Function Documentation

gchar* gldi_dock_get_readable_name ( CairoDock pDock)

Get a readable name for a main Dock, suitable for display (like "Bottom dock"). Sub-Docks names are defined by the user, so you can just use gldi_dock_get_name for them.

Parameters
pDockthe dock.
Returns
the readable name of the dock, or NULL if not found. Free it when you're done.
CairoDock* gldi_dock_get ( const gchar *  cDockName)

Get a Dock from a given name.

Parameters
cDockNamethe name of the dock.
Returns
the dock that has been registerd under this name, or NULL if none exists.
Icon* cairo_dock_search_icon_pointing_on_dock ( CairoDock pDock,
CairoDock **  pParentDock 
)

Search an icon pointing on a dock. If several icons point on it, the first one will be returned.

Parameters
pDockthe dock.
pParentDockif not NULL, this will be filled with the dock containing the icon.
Returns
the icon pointing on the dock.
void gldi_dock_rename ( CairoDock pDock,
const gchar *  cNewName 
)

Rename a dock. Update the container's name of all of its icons.

Parameters
pDockthe dock (optional).
cNewNamethe new name.
void gldi_docks_foreach ( GHFunc  pFunction,
gpointer  pUserData 
)

Execute an action on all docks.

Parameters
pFunctionthe action.
pUserDatadata passed to the callback.
void gldi_docks_foreach_root ( GFunc  pFunction,
gpointer  pUserData 
)

Execute an action on all main docks.

Parameters
pFunctionthe action.
pUserDatadata passed to the callback.
void gldi_icons_foreach_in_docks ( GldiIconFunc  pFunction,
gpointer  pUserData 
)

Execute an action on all icons being inside a dock.

Parameters
pFunctionthe action.
pUserDatadata passed to the callback.
void cairo_dock_reload_buffers_in_all_docks ( gboolean  bUpdateIconSize)

(Re)load all buffers of all icons in all docks.

Parameters
bUpdateIconSizeTRUE to recalculate the icons and docks size.
void gldi_dock_add_conf_file_for_name ( const gchar *  cDockName)

Add a config file for a root dock. Does not create the dock (use gldi_dock_new for that). If the config file already exists, it is overwritten (use gldi_dock_get to check if the name is already used).

Parameters
cDockNamename of the dock.
gchar* gldi_dock_add_conf_file ( void  )

Add a config file for a new root dock. Does not create the dock (use gldi_dock_new for that).

Returns
the unique name for the new dock, to be passed to gldi_dock_new.
void gldi_docks_redraw_all_root ( void  )

Redraw every root docks.

void gldi_dock_set_visibility ( CairoDock pDock,
CairoDockVisibility  iVisibility 
)

Set the visibility of a root dock. Perform all the necessary actions.

Parameters
pDocka root dock.
iVisibilityits new visibility.