Cairo-Dock 2.4.0~1
cairo-dock-dock-manager.h File Reference

Enumerations

enum  CairoDocksNotifications {
  NOTIFICATION_ENTER_DOCK,
  NOTIFICATION_LEAVE_DOCK,
  NOTIFICATION_UPDATE_DOCK,
  NOTIFICATION_UPDATE_DOCK_SLOW,
  NOTIFICATION_RENDER_DOCK,
  NOTIFICATION_STOP_DOCK,
  NOTIFICATION_INSERT_ICON,
  NOTIFICATION_REMOVE_ICON,
  NOTIFICATION_ICON_MOVED
}
 signals More...

Functions

CairoDockcairo_dock_create_dock (const gchar *cDockName, const gchar *cRendererName)
void cairo_dock_reference_dock (CairoDock *pDock, CairoDock *pParentDock)
CairoDockcairo_dock_create_subdock_from_scratch (GList *pIconList, gchar *cDockName, CairoDock *pParentDock)
void cairo_dock_destroy_dock (CairoDock *pDock, const gchar *cDockName)
const gchar * cairo_dock_search_dock_name (CairoDock *pDock)
gchar * cairo_dock_get_readable_name_for_fock (CairoDock *pDock)
CairoDockcairo_dock_search_dock_from_name (const gchar *cDockName)
Iconcairo_dock_search_icon_pointing_on_dock (CairoDock *pDock, CairoDock **pParentDock)
void cairo_dock_rename_dock (const gchar *cDockName, CairoDock *pDock, const gchar *cNewName)
void cairo_dock_foreach_docks (GHFunc pFunction, gpointer pUserData)
void cairo_dock_foreach_root_docks (GFunc pFunction, gpointer pUserData)
void cairo_dock_foreach_icons_in_docks (CairoDockForeachIconFunc pFunction, gpointer pUserData)
void cairo_dock_hide_parent_dock (CairoDock *pDock)
gboolean cairo_dock_hide_child_docks (CairoDock *pDock)
void cairo_dock_reload_buffers_in_all_docks (gboolean bReloadAppletsToo)
void cairo_dock_reload_one_root_dock (const gchar *cDockName, CairoDock *pDock)
void cairo_dock_remove_root_dock_config (const gchar *cDockName)
void cairo_dock_add_root_dock_config_for_name (const gchar *cDockName)
gchar * cairo_dock_add_root_dock_config (void)
void cairo_dock_set_dock_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.


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_UPDATE_DOCK 

notification called when a dock is updated in the fast rendering loop.

NOTIFICATION_UPDATE_DOCK_SLOW 

notification called when when a dock is updated in the slow rendering loop.

NOTIFICATION_RENDER_DOCK 

notification called when a dock is rendered.

NOTIFICATION_STOP_DOCK 

notification called when a dock is stopped, for instance before it is destroyed.

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

CairoDock* cairo_dock_create_dock ( const gchar *  cDockName,
const gchar *  cRendererName 
)

Create a new root dock.

Parameters:
cDockNamename of the dock, used to identify it quickly. If the name is already used, the corresponding dock is returned.
cRendererNamename of a renderer. If NULL, the default renderer will be applied.
Returns:
the newly allocated dock, to destroy with cairo_dock_destroy_dock
void cairo_dock_reference_dock ( CairoDock pDock,
CairoDock pParentDock 
)

Increase by 1 the number of pointing icons. If the dock was a root dock, it becomes a sub-dock.

Parameters:
pDocka dock.
pParentDockits parent dock, if it becomes a sub-dock, otherwise it can be NULL.
CairoDock* cairo_dock_create_subdock_from_scratch ( GList *  pIconList,
gchar *  cDockName,
CairoDock pParentDock 
)

Create a new dock of type "sub-dock", and load a given list of icons inside. The list then belongs to the dock, so it must not be freeed after that. The buffers of each icon are loaded, so they just need to have an image filename and a name.

Parameters:
pIconLista list of icons that will be loaded and inserted into the new dock.
cDockNamedesired name for the new dock.
pParentDockthe parent dock.
Returns:
the newly allocated dock.
void cairo_dock_destroy_dock ( CairoDock pDock,
const gchar *  cDockName 
)

Destroy a dock and its icons.

Parameters:
pDockthe dock.
cDockNamename for the dock.
const gchar* cairo_dock_search_dock_name ( CairoDock pDock)

Search the name of a Dock. It does a linear search in the table of Docks.

Parameters:
pDockthe dock.
Returns:
the name of the dock, or NULL if not found.
gchar* cairo_dock_get_readable_name_for_fock ( 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 cairo_dock_search_dock_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* cairo_dock_search_dock_from_name ( const gchar *  cDockName)

Search a Dock from a given name. It does a fast search in the table of Docks.

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 cairo_dock_rename_dock ( const gchar *  cDockName,
CairoDock pDock,
const gchar *  cNewName 
)

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

Parameters:
cDockNamename of the dock.
pDockthe dock (optional).
cNewNamethe new name.
void cairo_dock_foreach_docks ( GHFunc  pFunction,
gpointer  pUserData 
)

Execute an action on all docks.

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

Execute an action on all main docks.

Parameters:
pFunctionthe action.
pUserDatadata passed to the callback.
void cairo_dock_foreach_icons_in_docks ( CairoDockForeachIconFunc  pFunction,
gpointer  pUserData 
)

Execute an action on all icons being inside a dock.

Parameters:
pFunctionthe action.
pUserDatadata passed to the callback.
void cairo_dock_hide_parent_dock ( CairoDock pDock)

Recursively hides all the parent docks of a sub-dock.

Parameters:
pDockthe (sub)dock.
gboolean cairo_dock_hide_child_docks ( CairoDock pDock)

Recursively hides all the sub-docks of a given dock.

Parameters:
pDockthe dock.
Returns:
TRUE if a sub-dock has been hidden.
void cairo_dock_reload_buffers_in_all_docks ( gboolean  bReloadAppletsToo)

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

Parameters:
bReloadAppletsTooTRUE to reload applet icons too.
void cairo_dock_reload_one_root_dock ( const gchar *  cDockName,
CairoDock pDock 
)

Reload the config of a root dock and update it accordingly.

Parameters:
cDockNamename of the dock.
pDockthe dock.
void cairo_dock_remove_root_dock_config ( const gchar *  cDockName)

Delete the config of a root dock. Doesn't delete the dock (use cairo_dock_destroy_dock for that), but if it was empty, it won't be created the next time you restart Cairo-Dock.

Parameters:
cDockNamename of the dock.
void cairo_dock_add_root_dock_config_for_name ( const gchar *  cDockName)

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

Parameters:
cDockNamename of the dock.
gchar* cairo_dock_add_root_dock_config ( void  )

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

Returns:
the unique name for the new dock, to be passed to cairo_dock_create_dock.
void cairo_dock_set_dock_visibility ( CairoDock pDock,
CairoDockVisibility  iVisibility 
)

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

Parameters:
pDocka root dock.
iVisibilityits new visibility.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines