|
Cairo-Dock 2.4.0~1
|
Data Structures | |
| struct | _CairoDataRendererAttribute |
| Generic DataRenderer attributes structure. The attributes of any implementation of a DataRenderer will derive from this class. More... | |
| struct | _CairoDataRendererInterface |
| Interface of a DataRenderer. More... | |
| struct | _CairoDataRenderer |
| Generic DataRenderer. Any implementation of a DataRenderer will derive from this class. More... | |
Defines | |
| #define | cairo_dock_get_icon_data_renderer(pIcon) |
| #define | CAIRO_DATA_RENDERER(r) |
| #define | cairo_data_renderer_get_data(pRenderer) |
| #define | CAIRO_DATA_RENDERER_ATTRIBUTE(pAttr) |
| #define | cairo_data_renderer_get_nb_values(pRenderer) |
| #define | cairo_data_renderer_get_min_value(pRenderer, i) |
| #define | cairo_data_renderer_get_max_value(pRenderer, i) |
| #define | cairo_data_renderer_get_value(pRenderer, i, t) |
| #define | cairo_data_renderer_get_current_value(pRenderer, i) |
| #define | cairo_data_renderer_get_previous_value(pRenderer, i) |
| #define | cairo_data_renderer_get_normalized_value(pRenderer, i, t) |
| #define | cairo_data_renderer_get_normalized_current_value(pRenderer, i) |
| #define | cairo_data_renderer_get_normalized_previous_value(pRenderer, i) |
| #define | cairo_data_renderer_get_normalized_current_value_with_latency(pRenderer, i) |
| #define | cairo_data_renderer_format_value_full(pRenderer, i, cBuffer) |
| #define | cairo_data_renderer_format_value(pRenderer, i) |
Typedefs | |
| typedef void(* | CairoDataRendererFormatValueFunc )(CairoDataRenderer *pRenderer, int iNumValue, gchar *cFormatBuffer, int iBufferLength, gpointer data) |
| Prototype of a function used to format the values in a short readable format (to be displayed as quick-info). | |
Functions | |
| CairoDockGLFont * | cairo_dock_get_default_data_renderer_font (void) |
| void | cairo_dock_add_new_data_renderer_on_icon (Icon *pIcon, CairoContainer *pContainer, CairoDataRendererAttribute *pAttribute) |
| void | cairo_dock_render_new_data_on_icon (Icon *pIcon, CairoContainer *pContainer, cairo_t *pCairoContext, double *pNewValues) |
| void | cairo_dock_remove_data_renderer_on_icon (Icon *pIcon) |
| void | cairo_dock_reload_data_renderer_on_icon (Icon *pIcon, CairoContainer *pContainer, CairoDataRendererAttribute *pAttribute) |
| void | cairo_dock_resize_data_renderer_history (Icon *pIcon, int iNewMemorySize) |
| void | cairo_dock_refresh_data_renderer (Icon *pIcon, CairoContainer *pContainer, cairo_t *pCairoContext) |
This class defines the Data Renderer structure and API. A CairoDataRenderer is a generic way to render onto an icon a set of N values defined by : {yk = f(t)}, k=0..N. For instance you could represent the (cpu, mem, swap) evolution over the time. You bind a Data Renderer with /ref cairo_dock_add_new_data_renderer_on_icon. You can specify some configuration parameters for the Data Renderer with a set of attributes, that derive from a CairoDataRendererAttribute. You feed the Data Renderer with /ref cairo_dock_render_new_data_on_icon, providing it the correct number of values. If you want to change any parameter of a Data Renderer, use /ref cairo_dock_reload_data_renderer_on_icon, which keeps the history. To remove the Data Renderer from an icon, use /ref cairo_dock_remove_data_renderer_on_icon.
| #define cairo_dock_get_icon_data_renderer | ( | pIcon | ) |
Structure Access
| #define CAIRO_DATA_RENDERER | ( | r | ) |
Get the elementary part of a Data Renderer
| r | a high level data renderer |
| #define cairo_data_renderer_get_data | ( | pRenderer | ) |
Get the data of a Data Renderer
| pRenderer | a data renderer |
| #define CAIRO_DATA_RENDERER_ATTRIBUTE | ( | pAttr | ) |
Get the elementary part of a Data Renderer Attribute
| pAttr | a high level data renderer attribute |
| #define cairo_data_renderer_get_nb_values | ( | pRenderer | ) |
Get the number of values a DataRenderer displays. It's also the size of any of its arrays.
| pRenderer | a data renderer |
| #define cairo_data_renderer_get_min_value | ( | pRenderer, | |
| i | |||
| ) |
Data AccessGet the lower range of the i-th value.
| pRenderer | a data renderer |
| i | the number of the value |
| #define cairo_data_renderer_get_max_value | ( | pRenderer, | |
| i | |||
| ) |
Get the upper range of the i-th value.
| pRenderer | a data renderer |
| i | the number of the value |
| #define cairo_data_renderer_get_value | ( | pRenderer, | |
| i, | |||
| t | |||
| ) |
Get the i-th value at the time t.
| pRenderer | a data renderer |
| i | the number of the value |
| t | the time (in number of steps) |
| #define cairo_data_renderer_get_current_value | ( | pRenderer, | |
| i | |||
| ) |
Get the current i-th value.
| pRenderer | a data renderer |
| i | the number of the value |
| #define cairo_data_renderer_get_previous_value | ( | pRenderer, | |
| i | |||
| ) |
Get the previous i-th value.
| pRenderer | a data renderer |
| i | the number of the value |
| #define cairo_data_renderer_get_normalized_value | ( | pRenderer, | |
| i, | |||
| t | |||
| ) |
Get the normalized i-th value (between 0 and 1) at the time t.
| pRenderer | a data renderer |
| i | the number of the value |
| t | the time (in number of steps) |
| #define cairo_data_renderer_get_normalized_current_value | ( | pRenderer, | |
| i | |||
| ) |
Get the normalized current i-th value (between 0 and 1).
| pRenderer | a data renderer |
| i | the number of the value |
| #define cairo_data_renderer_get_normalized_previous_value | ( | pRenderer, | |
| i | |||
| ) |
Get the normalized previous i-th value (between 0 and 1).
| pRenderer | a data renderer |
| i | the number of the value |
| #define cairo_data_renderer_get_normalized_current_value_with_latency | ( | pRenderer, | |
| i | |||
| ) |
Get the normalized current i-th value (between 0 and 1), taking into account the latency of the smooth movement.
| pRenderer | a data renderer |
| i | the number of the value |
| #define cairo_data_renderer_format_value_full | ( | pRenderer, | |
| i, | |||
| cBuffer | |||
| ) |
Data FormatWrite a value in a readable text format.
| pRenderer | a data renderer |
| i | the number of the value |
| cBuffer | a buffer where to write |
| #define cairo_data_renderer_format_value | ( | pRenderer, | |
| i | |||
| ) |
Write a value in a readable text format in the renderer text buffer.
| pRenderer | a data renderer |
| i | the number of the value |
| CairoDockGLFont* cairo_dock_get_default_data_renderer_font | ( | void | ) |
Renderer manipulation Get the default GLX font for Data Renderer. It can render strings of digits from 0 to 9. Don't destroy it.
| void cairo_dock_add_new_data_renderer_on_icon | ( | Icon * | pIcon, |
| CairoContainer * | pContainer, | ||
| CairoDataRendererAttribute * | pAttribute | ||
| ) |
Add a Data Renderer on an icon (usually the icon of an applet). A Data Renderer is a view that will be used to display a set of values on the icon.
| pIcon | the icon |
| pContainer | the icon's container |
| pAttribute | attributes defining the Renderer |
| void cairo_dock_render_new_data_on_icon | ( | Icon * | pIcon, |
| CairoContainer * | pContainer, | ||
| cairo_t * | pCairoContext, | ||
| double * | pNewValues | ||
| ) |
Draw the current values associated with the Renderer on the icon.
| pIcon | the icon |
| pContainer | the icon's container |
| pCairoContext | a drawing context on the icon |
| pNewValues | a set a new values (must be of the size defined on the creation of the Renderer) |
| void cairo_dock_remove_data_renderer_on_icon | ( | Icon * | pIcon | ) |
Remove the Data Renderer of an icon. All the allocated ressources will be freed.
| pIcon | the icon |
| void cairo_dock_reload_data_renderer_on_icon | ( | Icon * | pIcon, |
| CairoContainer * | pContainer, | ||
| CairoDataRendererAttribute * | pAttribute | ||
| ) |
Reload the Data Renderer of an icon. If no attributes are provided, it simply reload it with its current attributes. History is kept.
| pIcon | the icon |
| pContainer | the icon's container |
| pAttribute | new attributes defining the Renderer, or NULL to keep the current ones |
| void cairo_dock_resize_data_renderer_history | ( | Icon * | pIcon, |
| int | iNewMemorySize | ||
| ) |
Resize the history of a DataRenderer of an icon, that is to say change the number of previous values that are remembered by the DataRenderer.
| pIcon | the icon |
| iNewMemorySize | the new size of history |
| void cairo_dock_refresh_data_renderer | ( | Icon * | pIcon, |
| CairoContainer * | pContainer, | ||
| cairo_t * | pCairoContext | ||
| ) |
Redraw the DataRenderer of an icon, with the current values.
| pIcon | the icon |
| pContainer | the icon's container |
| pCairoContext | a drawing context on the icon |