~ubuntu-branches/ubuntu/precise/nvidia-settings/precise-proposed

« back to all changes in this revision

Viewing changes to nvidia-settings-1.0/src/gtk+-2.x/ctkgauge.h

  • Committer: Bazaar Package Importer
  • Author(s): Randall Donald
  • Date: 2004-07-03 19:09:17 UTC
  • Revision ID: james.westby@ubuntu.com-20040703190917-rqkze2s58ux5pamy
Tags: upstream-1.0
ImportĀ upstreamĀ versionĀ 1.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * nvidia-settings: A tool for configuring the NVIDIA X driver on Unix
 
3
 * and Linux systems.
 
4
 *
 
5
 * Copyright (C) 2004 NVIDIA Corporation.
 
6
 *
 
7
 * This program is free software; you can redistribute it and/or
 
8
 * modify it under the terms of Version 2 of the GNU General Public
 
9
 * License as published by the Free Software Foundation.
 
10
 *
 
11
 * This program is distributed in the hope that it will be useful, but
 
12
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See Version 2
 
14
 * of the GNU General Public License for more details.
 
15
 *
 
16
 * You should have received a copy of the GNU General Public License
 
17
 * along with this program; if not, write to the:
 
18
 *
 
19
 *           Free Software Foundation, Inc.
 
20
 *           59 Temple Place - Suite 330
 
21
 *           Boston, MA 02111-1307, USA
 
22
 *
 
23
 */
 
24
 
 
25
#ifndef __CTK_GAUGE_H__
 
26
#define __CTK_GAUGE_H__
 
27
 
 
28
G_BEGIN_DECLS
 
29
 
 
30
#define CTK_TYPE_GAUGE (ctk_gauge_get_type())
 
31
 
 
32
#define CTK_GAUGE(obj) \
 
33
    (G_TYPE_CHECK_INSTANCE_CAST ((obj), CTK_TYPE_GAUGE, CtkGauge))
 
34
 
 
35
#define CTK_GAUGE_CLASS(klass) \
 
36
    (G_TYPE_CHECK_CLASS_CAST ((klass), CTK_TYPE_GAUGE, CtkGaugeClass))
 
37
 
 
38
#define CTK_IS_GAUGE(obj) \
 
39
    (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CTK_TYPE_GAUGE))
 
40
 
 
41
#define CTK_IS_GAUGE_CLASS(class) \
 
42
    (G_TYPE_CHECK_CLASS_TYPE ((klass), CTK_TYPE_GAUGE))
 
43
 
 
44
#define CTK_GAUGE_GET_CLASS(obj) \
 
45
    (G_TYPE_INSTANCE_GET_CLASS ((obj), CTK_TYPE_GAUGE, CtkGaugeClass))
 
46
 
 
47
 
 
48
typedef struct _CtkGauge       CtkGauge;
 
49
typedef struct _CtkGaugeClass  CtkGaugeClass;
 
50
 
 
51
struct _CtkGauge
 
52
{
 
53
    GtkDrawingArea parent;
 
54
 
 
55
    gint lower, upper;
 
56
    gint current;
 
57
 
 
58
    GdkColormap *gdk_colormap;
 
59
 
 
60
    GdkColor gdk_color_gray;
 
61
    GdkColor gdk_color_red;
 
62
    GdkColor gdk_color_yellow;
 
63
    GdkColor gdk_color_green;
 
64
 
 
65
    GdkPixmap *gdk_pixmap;
 
66
    GdkGC *gdk_gc;
 
67
 
 
68
    PangoLayout *pango_layout;
 
69
 
 
70
    gint width, height;
 
71
};
 
72
 
 
73
struct _CtkGaugeClass
 
74
{
 
75
    GtkDrawingAreaClass parent_class;
 
76
};
 
77
 
 
78
GType       ctk_gauge_get_type     (void) G_GNUC_CONST;
 
79
GtkWidget*  ctk_gauge_new          (gint, gint);
 
80
void        ctk_gauge_set_current  (CtkGauge *, gint);
 
81
void        ctk_gauge_draw         (CtkGauge *);
 
82
 
 
83
G_END_DECLS
 
84
 
 
85
#endif /* __CTK_GAUGE_H__ */
 
86