PlankPositionManager

PlankPositionManager — Handles computing any size/position information for the dock.

Synopsis

#define             PLANK_TYPE_POSITION_MANAGER
void                plank_position_manager_initialize   (PlankPositionManager *self);
void                plank_position_manager_reset_caches (PlankPositionManager *self,
                                                         PlankDrawingDockTheme *theme);
void                plank_position_manager_get_cursor_region
                                                        (PlankPositionManager *self,
                                                         GdkRectangle *result);
void                plank_position_manager_get_static_dock_region
                                                        (PlankPositionManager *self,
                                                         GdkRectangle *result);
void                plank_position_manager_update_regions
                                                        (PlankPositionManager *self);
void                plank_position_manager_item_draw_region
                                                        (PlankPositionManager *self,
                                                         GdkRectangle *hover_rect,
                                                         GdkRectangle *result);
void                plank_position_manager_item_background_region
                                                        (PlankPositionManager *self,
                                                         GdkRectangle *rect,
                                                         GdkRectangle *result);
void                plank_position_manager_item_hover_region
                                                        (PlankPositionManager *self,
                                                         PlankItemsDockItem *item,
                                                         GdkRectangle *result);
void                plank_position_manager_get_menu_position
                                                        (PlankPositionManager *self,
                                                         PlankItemsDockItem *hovered,
                                                         GtkRequisition *requisition,
                                                         gint *x,
                                                         gint *y);
void                plank_position_manager_get_hover_position
                                                        (PlankPositionManager *self,
                                                         PlankItemsDockItem *hovered,
                                                         gint *x,
                                                         gint *y);
void                plank_position_manager_get_urgent_glow_position
                                                        (PlankPositionManager *self,
                                                         PlankItemsDockItem *item,
                                                         gint *x,
                                                         gint *y);
void                plank_position_manager_update_dock_position
                                                        (PlankPositionManager *self);
void                plank_position_manager_get_dock_draw_position
                                                        (PlankPositionManager *self,
                                                         gint *x,
                                                         gint *y);
void                plank_position_manager_get_background_region
                                                        (PlankPositionManager *self,
                                                         GdkRectangle *result);
void                plank_position_manager_get_icon_geometry
                                                        (PlankPositionManager *self,
                                                         PlankItemsApplicationDockItem *item,
                                                         gboolean for_hidden,
                                                         GdkRectangle *result);
void                plank_position_manager_get_struts   (PlankPositionManager *self,
                                                         gulong **struts,
                                                         int *struts_length1);
PlankPositionManager * plank_position_manager_new       (PlankDockController *controller);
gint                plank_position_manager_get_win_x    (PlankPositionManager *self);
void                plank_position_manager_set_win_x    (PlankPositionManager *self,
                                                         gint value);
gint                plank_position_manager_get_win_y    (PlankPositionManager *self);
void                plank_position_manager_set_win_y    (PlankPositionManager *self,
                                                         gint value);
gint                plank_position_manager_get_LineWidth
                                                        (PlankPositionManager *self);
gint                plank_position_manager_get_IconSize (PlankPositionManager *self);
gint                plank_position_manager_get_IndicatorSize
                                                        (PlankPositionManager *self);
gint                plank_position_manager_get_IconShadowSize
                                                        (PlankPositionManager *self);
gint                plank_position_manager_get_GlowSize (PlankPositionManager *self);
gint                plank_position_manager_get_HorizPadding
                                                        (PlankPositionManager *self);
gint                plank_position_manager_get_TopPadding
                                                        (PlankPositionManager *self);
gint                plank_position_manager_get_BottomPadding
                                                        (PlankPositionManager *self);
gint                plank_position_manager_get_ItemPadding
                                                        (PlankPositionManager *self);
gint                plank_position_manager_get_UrgentBounceHeight
                                                        (PlankPositionManager *self);
gint                plank_position_manager_get_VisibleDockHeight
                                                        (PlankPositionManager *self);
gint                plank_position_manager_get_DockHeight
                                                        (PlankPositionManager *self);
gint                plank_position_manager_get_DockBackgroundHeight
                                                        (PlankPositionManager *self);
gint                plank_position_manager_get_VisibleDockWidth
                                                        (PlankPositionManager *self);
gint                plank_position_manager_get_DockWidth
                                                        (PlankPositionManager *self);
gint                plank_position_manager_get_DockBackgroundWidth
                                                        (PlankPositionManager *self);
gint                plank_position_manager_get_MaxItemCount
                                                        (PlankPositionManager *self);
struct              PlankPositionManager;
struct              PlankPositionManagerClass;

Object Hierarchy

  GObject
   +----PlankPositionManager

Properties

  "BottomPadding"            gint                  : Read
  "DockBackgroundHeight"     gint                  : Read
  "DockBackgroundWidth"      gint                  : Read
  "DockHeight"               gint                  : Read
  "DockWidth"                gint                  : Read
  "GlowSize"                 gint                  : Read
  "HorizPadding"             gint                  : Read
  "IconShadowSize"           gint                  : Read
  "IconSize"                 gint                  : Read
  "IndicatorSize"            gint                  : Read
  "ItemPadding"              gint                  : Read
  "LineWidth"                gint                  : Read
  "MaxItemCount"             gint                  : Read
  "TopPadding"               gint                  : Read
  "UrgentBounceHeight"       gint                  : Read
  "VisibleDockHeight"        gint                  : Read
  "VisibleDockWidth"         gint                  : Read
  "controller"               PlankDockController*  : Write / Construct Only
  "win-x"                    gint                  : Read / Write
  "win-y"                    gint                  : Read / Write

Description

Details

PLANK_TYPE_POSITION_MANAGER

#define PLANK_TYPE_POSITION_MANAGER (plank_position_manager_get_type ())

The type for PlankPositionManager.


plank_position_manager_initialize ()

void                plank_position_manager_initialize   (PlankPositionManager *self);

Initializes the position manager.

self :

the PlankPositionManager instance

plank_position_manager_reset_caches ()

void                plank_position_manager_reset_caches (PlankPositionManager *self,
                                                         PlankDrawingDockTheme *theme);

Resets all internal caches.

self :

the PlankPositionManager instance

theme :

 . the current dock theme. [in]

plank_position_manager_get_cursor_region ()

void                plank_position_manager_get_cursor_region
                                                        (PlankPositionManager *self,
                                                         GdkRectangle *result);

Returns the cursor region for the dock. This is the region that the cursor can interact with the dock.

self :

the PlankPositionManager instance

Returns :

the cursor region for the dock

plank_position_manager_get_static_dock_region ()

void                plank_position_manager_get_static_dock_region
                                                        (PlankPositionManager *self,
                                                         GdkRectangle *result);

Returns the static dock region for the dock. This is the region that the dock occupies when not hidden.

self :

the PlankPositionManager instance

Returns :

the static dock region for the dock

plank_position_manager_update_regions ()

void                plank_position_manager_update_regions
                                                        (PlankPositionManager *self);

Call when any cached region needs updating.

self :

the PlankPositionManager instance

plank_position_manager_item_draw_region ()

void                plank_position_manager_item_draw_region
                                                        (PlankPositionManager *self,
                                                         GdkRectangle *hover_rect,
                                                         GdkRectangle *result);

The region for drawing a dock item.

self :

the PlankPositionManager instance

hover_rect :

 . the item's hover region. [in]

Returns :

the region for the dock item

plank_position_manager_item_background_region ()

void                plank_position_manager_item_background_region
                                                        (PlankPositionManager *self,
                                                         GdkRectangle *rect,
                                                         GdkRectangle *result);

The intersecting region of a dock item's hover region and the background.

self :

the PlankPositionManager instance

rect :

 . the item's hover region. [in]

Returns :

the region for the dock item

plank_position_manager_item_hover_region ()

void                plank_position_manager_item_hover_region
                                                        (PlankPositionManager *self,
                                                         PlankItemsDockItem *item,
                                                         GdkRectangle *result);

The cursor region for interacting with a dock item.

self :

the PlankPositionManager instance

item :

 . the dock item to find a region for. [in]

Returns :

the region for the dock item

plank_position_manager_get_menu_position ()

void                plank_position_manager_get_menu_position
                                                        (PlankPositionManager *self,
                                                         PlankItemsDockItem *hovered,
                                                         GtkRequisition *requisition,
                                                         gint *x,
                                                         gint *y);

Get's the x and y position to display a menu for a dock item.

self :

the PlankPositionManager instance

hovered :

 . the item that is hovered. [in]

requisition :

 . the menu's requisition. [in]

x :

 . the resulting x position. [out][transfer full]

y :

 . the resulting y position. [out][transfer full]

plank_position_manager_get_hover_position ()

void                plank_position_manager_get_hover_position
                                                        (PlankPositionManager *self,
                                                         PlankItemsDockItem *hovered,
                                                         gint *x,
                                                         gint *y);

Get's the x and y position to display a hover window for a dock item.

self :

the PlankPositionManager instance

hovered :

 . the item that is hovered. [in]

x :

 . the resulting x position. [out][transfer full]

y :

 . the resulting y position. [out][transfer full]

plank_position_manager_get_urgent_glow_position ()

void                plank_position_manager_get_urgent_glow_position
                                                        (PlankPositionManager *self,
                                                         PlankItemsDockItem *item,
                                                         gint *x,
                                                         gint *y);

Get's the x and y position to display the urgent-glow for a dock item.

self :

the PlankPositionManager instance

item :

 . the item to show urgent-glow for. [in]

x :

 . the resulting x position. [out]

y :

 . the resulting y position. [out]

plank_position_manager_update_dock_position ()

void                plank_position_manager_update_dock_position
                                                        (PlankPositionManager *self);

Caches the x and y position of the dock window.

self :

the PlankPositionManager instance

plank_position_manager_get_dock_draw_position ()

void                plank_position_manager_get_dock_draw_position
                                                        (PlankPositionManager *self,
                                                         gint *x,
                                                         gint *y);

Get's the x and y position to display the main dock buffer.

self :

the PlankPositionManager instance

x :

 . the resulting x position. [out]

y :

 . the resulting y position. [out]

plank_position_manager_get_background_region ()

void                plank_position_manager_get_background_region
                                                        (PlankPositionManager *self,
                                                         GdkRectangle *result);

Get's the region for background of the dock.

self :

the PlankPositionManager instance

Returns :

the region for the dock background

plank_position_manager_get_icon_geometry ()

void                plank_position_manager_get_icon_geometry
                                                        (PlankPositionManager *self,
                                                         PlankItemsApplicationDockItem *item,
                                                         gboolean for_hidden,
                                                         GdkRectangle *result);

Get the item's icon geometry for the dock.

self :

the PlankPositionManager instance

item :

 . an application-dockitem of the dock. [in]

for_hidden :

 . whether the geometry should apply for a hidden dock. [in]

Returns :

icon geometry for the given application-dockitem

plank_position_manager_get_struts ()

void                plank_position_manager_get_struts   (PlankPositionManager *self,
                                                         gulong **struts,
                                                         int *struts_length1);

Computes the struts for the dock.

self :

the PlankPositionManager instance

struts :

 . the array to contain the struts. [inout][array length=struts_length1]

struts_length1 :

length of the struts array

plank_position_manager_new ()

PlankPositionManager * plank_position_manager_new       (PlankDockController *controller);

Creates a new position manager.

controller :

 . the dock controller to manage positions for. [in]

plank_position_manager_get_win_x ()

gint                plank_position_manager_get_win_x    (PlankPositionManager *self);

Get and return the current value of the "win-x" property.

Cached x position of the dock window.

self :

the PlankPositionManager instance to query

Returns :

the value of the "win-x" property

plank_position_manager_set_win_x ()

void                plank_position_manager_set_win_x    (PlankPositionManager *self,
                                                         gint value);

Set the value of the "win-x" property to value.

Cached x position of the dock window.

self :

the PlankPositionManager instance to modify

value :

the new value of the "win-x" property

plank_position_manager_get_win_y ()

gint                plank_position_manager_get_win_y    (PlankPositionManager *self);

Get and return the current value of the "win-y" property.

Cached y position of the dock window.

self :

the PlankPositionManager instance to query

Returns :

the value of the "win-y" property

plank_position_manager_set_win_y ()

void                plank_position_manager_set_win_y    (PlankPositionManager *self,
                                                         gint value);

Set the value of the "win-y" property to value.

Cached y position of the dock window.

self :

the PlankPositionManager instance to modify

value :

the new value of the "win-y" property

plank_position_manager_get_LineWidth ()

gint                plank_position_manager_get_LineWidth
                                                        (PlankPositionManager *self);

Get and return the current value of the "LineWidth" property.

self :

the PlankPositionManager instance to query

Returns :

the value of the "LineWidth" property

plank_position_manager_get_IconSize ()

gint                plank_position_manager_get_IconSize (PlankPositionManager *self);

Get and return the current value of the "IconSize" property.

self :

the PlankPositionManager instance to query

Returns :

the value of the "IconSize" property

plank_position_manager_get_IndicatorSize ()

gint                plank_position_manager_get_IndicatorSize
                                                        (PlankPositionManager *self);

Get and return the current value of the "IndicatorSize" property.

Theme-based indicator size, scaled by icon size.

self :

the PlankPositionManager instance to query

Returns :

the value of the "IndicatorSize" property

plank_position_manager_get_IconShadowSize ()

gint                plank_position_manager_get_IconShadowSize
                                                        (PlankPositionManager *self);

Get and return the current value of the "IconShadowSize" property.

Theme-based icon-shadow size, scaled by icon size.

self :

the PlankPositionManager instance to query

Returns :

the value of the "IconShadowSize" property

plank_position_manager_get_GlowSize ()

gint                plank_position_manager_get_GlowSize (PlankPositionManager *self);

Get and return the current value of the "GlowSize" property.

Theme-based urgent glow size, scaled by icon size.

self :

the PlankPositionManager instance to query

Returns :

the value of the "GlowSize" property

plank_position_manager_get_HorizPadding ()

gint                plank_position_manager_get_HorizPadding
                                                        (PlankPositionManager *self);

Get and return the current value of the "HorizPadding" property.

Theme-based horizontal padding, scaled by icon size.

self :

the PlankPositionManager instance to query

Returns :

the value of the "HorizPadding" property

plank_position_manager_get_TopPadding ()

gint                plank_position_manager_get_TopPadding
                                                        (PlankPositionManager *self);

Get and return the current value of the "TopPadding" property.

Theme-based top padding, scaled by icon size.

self :

the PlankPositionManager instance to query

Returns :

the value of the "TopPadding" property

plank_position_manager_get_BottomPadding ()

gint                plank_position_manager_get_BottomPadding
                                                        (PlankPositionManager *self);

Get and return the current value of the "BottomPadding" property.

Theme-based bottom padding, scaled by icon size.

self :

the PlankPositionManager instance to query

Returns :

the value of the "BottomPadding" property

plank_position_manager_get_ItemPadding ()

gint                plank_position_manager_get_ItemPadding
                                                        (PlankPositionManager *self);

Get and return the current value of the "ItemPadding" property.

Theme-based item padding, scaled by icon size.

self :

the PlankPositionManager instance to query

Returns :

the value of the "ItemPadding" property

plank_position_manager_get_UrgentBounceHeight ()

gint                plank_position_manager_get_UrgentBounceHeight
                                                        (PlankPositionManager *self);

Get and return the current value of the "UrgentBounceHeight" property.

self :

the PlankPositionManager instance to query

Returns :

the value of the "UrgentBounceHeight" property

plank_position_manager_get_VisibleDockHeight ()

gint                plank_position_manager_get_VisibleDockHeight
                                                        (PlankPositionManager *self);

Get and return the current value of the "VisibleDockHeight" property.

The currently visible height of the dock.

self :

the PlankPositionManager instance to query

Returns :

the value of the "VisibleDockHeight" property

plank_position_manager_get_DockHeight ()

gint                plank_position_manager_get_DockHeight
                                                        (PlankPositionManager *self);

Get and return the current value of the "DockHeight" property.

The static height of the dock.

self :

the PlankPositionManager instance to query

Returns :

the value of the "DockHeight" property

plank_position_manager_get_DockBackgroundHeight ()

gint                plank_position_manager_get_DockBackgroundHeight
                                                        (PlankPositionManager *self);

Get and return the current value of the "DockBackgroundHeight" property.

The height of the dock's background image.

self :

the PlankPositionManager instance to query

Returns :

the value of the "DockBackgroundHeight" property

plank_position_manager_get_VisibleDockWidth ()

gint                plank_position_manager_get_VisibleDockWidth
                                                        (PlankPositionManager *self);

Get and return the current value of the "VisibleDockWidth" property.

The currently visible width of the dock.

self :

the PlankPositionManager instance to query

Returns :

the value of the "VisibleDockWidth" property

plank_position_manager_get_DockWidth ()

gint                plank_position_manager_get_DockWidth
                                                        (PlankPositionManager *self);

Get and return the current value of the "DockWidth" property.

The static width of the dock.

self :

the PlankPositionManager instance to query

Returns :

the value of the "DockWidth" property

plank_position_manager_get_DockBackgroundWidth ()

gint                plank_position_manager_get_DockBackgroundWidth
                                                        (PlankPositionManager *self);

Get and return the current value of the "DockBackgroundWidth" property.

The width of the dock's background image.

self :

the PlankPositionManager instance to query

Returns :

the value of the "DockBackgroundWidth" property

plank_position_manager_get_MaxItemCount ()

gint                plank_position_manager_get_MaxItemCount
                                                        (PlankPositionManager *self);

Get and return the current value of the "MaxItemCount" property.

The maximum item count which fit the dock in its maximum size with the current theme and icon-size.

self :

the PlankPositionManager instance to query

Returns :

the value of the "MaxItemCount" property

struct PlankPositionManager

struct PlankPositionManager;

Handles computing any size/position information for the dock.


struct PlankPositionManagerClass

struct PlankPositionManagerClass {
	GObjectClass parent_class;
};

The class structure for PLANK_TYPE_POSITION_MANAGER. All the fields in this structure are private and should never be accessed directly.

GObjectClass parent_class;

the parent class structure

Property Details

The "BottomPadding" property

  "BottomPadding"            gint                  : Read

Theme-based bottom padding, scaled by icon size.

Default value: 0


The "DockBackgroundHeight" property

  "DockBackgroundHeight"     gint                  : Read

The height of the dock's background image.

Default value: 0


The "DockBackgroundWidth" property

  "DockBackgroundWidth"      gint                  : Read

The width of the dock's background image.

Default value: 0


The "DockHeight" property

  "DockHeight"               gint                  : Read

The static height of the dock.

Default value: 0


The "DockWidth" property

  "DockWidth"                gint                  : Read

The static width of the dock.

Default value: 0


The "GlowSize" property

  "GlowSize"                 gint                  : Read

Theme-based urgent glow size, scaled by icon size.

Default value: 0


The "HorizPadding" property

  "HorizPadding"             gint                  : Read

Theme-based horizontal padding, scaled by icon size.

Default value: 0


The "IconShadowSize" property

  "IconShadowSize"           gint                  : Read

Theme-based icon-shadow size, scaled by icon size.

Default value: 0


The "IconSize" property

  "IconSize"                 gint                  : Read

IconSize.

Default value: 0


The "IndicatorSize" property

  "IndicatorSize"            gint                  : Read

Theme-based indicator size, scaled by icon size.

Default value: 0


The "ItemPadding" property

  "ItemPadding"              gint                  : Read

Theme-based item padding, scaled by icon size.

Default value: 0


The "LineWidth" property

  "LineWidth"                gint                  : Read

LineWidth.

Default value: 0


The "MaxItemCount" property

  "MaxItemCount"             gint                  : Read

The maximum item count which fit the dock in its maximum size with the current theme and icon-size.

Default value: 0


The "TopPadding" property

  "TopPadding"               gint                  : Read

Theme-based top padding, scaled by icon size.

Default value: 0


The "UrgentBounceHeight" property

  "UrgentBounceHeight"       gint                  : Read

UrgentBounceHeight.

Default value: 0


The "VisibleDockHeight" property

  "VisibleDockHeight"        gint                  : Read

The currently visible height of the dock.

Default value: 0


The "VisibleDockWidth" property

  "VisibleDockWidth"         gint                  : Read

The currently visible width of the dock.

Default value: 0


The "controller" property

  "controller"               PlankDockController*  : Write / Construct Only

controller.


The "win-x" property

  "win-x"                    gint                  : Read / Write

Cached x position of the dock window.

Default value: 0


The "win-y" property

  "win-y"                    gint                  : Read / Write

Cached y position of the dock window.

Default value: 0