2
* This file is a part of the Cairo-Dock project
4
* Copyright : (C) see the 'copyright' file.
5
* E-mail : see the 'copyright' file.
7
* This program is free software; you can redistribute it and/or
8
* modify it under the terms of the GNU General Public License
9
* as published by the Free Software Foundation; either version 3
10
* of the License, or (at your option) any later version.
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
16
* You should have received a copy of the GNU General Public License
17
* along with this program. If not, see <http://www.gnu.org/licenses/>.
21
#ifndef __CAIRO_DOCK_GAUGE2__
22
#define __CAIRO_DOCK_GAUGE2__
24
#include "cairo-dock-struct.h"
25
#include <cairo-dock-data-renderer.h>
26
#include <cairo-dock-themes-manager.h>
27
#include <libxml/tree.h>
28
#include <libxml/parser.h>
32
*@file cairo-dock-gauge.h This class defines the Gauge, which derives from the DataRenderer.
33
* All you need to know is the attributes that define a Gauge, the API to use is the common API for DataRenderer, i ncairo-dock-data-renderer.h.
37
RsvgHandle *pSvgHandle;
38
cairo_surface_t *pSurface;
47
gdouble posStart, posStop;
49
gint iNeedleRealWidth, iNeedleRealHeight;
50
gdouble iNeedleOffsetX, iNeedleOffsetY;
52
gint iNeedleWidth, iNeedleHeight;
53
GaugeImage *pImageNeedle;
57
GaugeImage *pImageList;
59
CairoDataRendererTextZone textZone;
61
CairoDataRendererEmblem emblem;
65
CairoDataRenderer dataRenderer;
67
GaugeImage *pImageBackground;
68
GaugeImage *pImageForeground;
69
GList *pIndicatorList;
72
/// Attributes of a Gauge.
73
typedef struct _CairoGaugeAttribute CairoGaugeAttribute;
74
struct _CairoGaugeAttribute {
75
/// General attributes of any DataRenderer.
76
CairoDataRendererAttribute rendererAttribute;
77
/// path to a gauge theme.
82
Gauge *cairo_dock_new_gauge (void);
85
GHashTable *cairo_dock_list_available_gauges (void);
87
gchar *cairo_dock_get_gauge_theme_path (const gchar *cThemeName, CairoDockThemeType iType);
89
gchar *cairo_dock_get_theme_path_for_gauge (const gchar *cAppletConfFilePath, GKeyFile *pKeyFile, const gchar *cGroupName, const gchar *cKeyName, gboolean *bFlushConfFileNeeded, const gchar *cDefaultThemeName);