annotate finch/libgnt/gntslider.h @ 23975:e2a610871476

I just thought that was funny
author Ka-Hing Cheung <khc@hxbc.us>
date Tue, 02 Sep 2008 01:26:58 +0000
parents acf284962b40
children 44f53d3fc54f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
18352
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
1 /**
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
2 * @file gntslider.h Slider API
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
3 * @ingroup gnt
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
4 */
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
5 /*
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
6 * GNT - The GLib Ncurses Toolkit
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
7 *
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
8 * GNT is the legal property of its developers, whose names are too numerous
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
9 * to list here. Please refer to the COPYRIGHT file distributed with this
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
10 * source distribution.
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
11 *
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
12 * This library is free software; you can redistribute it and/or modify
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
13 * it under the terms of the GNU General Public License as published by
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
14 * the Free Software Foundation; either version 2 of the License, or
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
15 * (at your option) any later version.
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
16 *
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
17 * This program is distributed in the hope that it will be useful,
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
20 * GNU General Public License for more details.
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
21 *
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
22 * You should have received a copy of the GNU General Public License
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
23 * along with this program; if not, write to the Free Software
19680
44b4e8bd759b The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 19410
diff changeset
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
18352
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
25 */
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
26
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
27 #ifndef GNT_SLIDER_H
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
28 #define GNT_SLIDER_H
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
29
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
30 #include "gntwidget.h"
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
31 #include "gnt.h"
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
32 #include "gntlabel.h"
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
33
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
34 #define GNT_TYPE_SLIDER (gnt_slider_get_gtype())
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
35 #define GNT_SLIDER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GNT_TYPE_SLIDER, GntSlider))
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
36 #define GNT_SLIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GNT_TYPE_SLIDER, GntSliderClass))
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
37 #define GNT_IS_SLIDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GNT_TYPE_SLIDER))
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
38 #define GNT_IS_SLIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GNT_TYPE_SLIDER))
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
39 #define GNT_SLIDER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GNT_TYPE_SLIDER, GntSliderClass))
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
40
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
41 #define GNT_SLIDER_FLAGS(obj) (GNT_SLIDER(obj)->priv.flags)
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
42 #define GNT_SLIDER_SET_FLAGS(obj, flags) (GNT_SLIDER_FLAGS(obj) |= flags)
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
43 #define GNT_SLIDER_UNSET_FLAGS(obj, flags) (GNT_SLIDER_FLAGS(obj) &= ~(flags))
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
44
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
45 typedef struct _GntSlider GntSlider;
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
46 typedef struct _GntSliderPriv GntSliderPriv;
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
47 typedef struct _GntSliderClass GntSliderClass;
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
48
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
49 struct _GntSlider
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
50 {
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
51 GntWidget parent;
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
52
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
53 gboolean vertical;
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
54
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
55 int max; /* maximum value */
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
56 int min; /* minimum value */
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
57 int step; /* amount to change at each step */
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
58 int current; /* current value */
19410
3650db1f02d3 Have small and large steps for the slider.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18515
diff changeset
59 int smallstep;
3650db1f02d3 Have small and large steps for the slider.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18515
diff changeset
60 int largestep;
18352
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
61 };
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
62
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
63 struct _GntSliderClass
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
64 {
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
65 GntWidgetClass parent;
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
66
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
67 void (*changed)(GntSlider *slider, int);
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
68 void (*gnt_reserved1)(void);
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
69 void (*gnt_reserved2)(void);
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
70 void (*gnt_reserved3)(void);
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
71 void (*gnt_reserved4)(void);
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
72 };
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
73
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
74 G_BEGIN_DECLS
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
75
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
76 /**
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
77 * @return The GType for GntSlider
20874
acf284962b40 Add @since doxygen tags for finch/libgnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 19680
diff changeset
78 *
acf284962b40 Add @since doxygen tags for finch/libgnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 19680
diff changeset
79 * @since 2.0.0 (gnt), 2.1.0 (pidgin)
18352
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
80 */
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
81 GType gnt_slider_get_gtype(void);
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
82
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
83 #define gnt_hslider_new(max, min) gnt_slider_new(FALSE, max, min)
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
84 #define gnt_vslider_new(max, min) gnt_slider_new(TRUE, max, min)
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
85
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
86 /**
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
87 * Create a new slider.
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
88 *
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
89 * @param orient A vertical slider is created if @c TRUE, otherwise the slider is horizontal.
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
90 * @param max The maximum value for the slider
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
91 * @param min The minimum value for the slider
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
92 *
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
93 * @return The newly created slider
20874
acf284962b40 Add @since doxygen tags for finch/libgnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 19680
diff changeset
94 *
acf284962b40 Add @since doxygen tags for finch/libgnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 19680
diff changeset
95 * @since 2.0.0 (gnt), 2.1.0 (pidgin)
18352
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
96 */
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
97 GntWidget * gnt_slider_new(gboolean orient, int max, int min);
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
98
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
99 /**
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
100 * Set the range of the slider.
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
101 *
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
102 * @param slider The slider
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
103 * @param max The maximum value
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
104 * @param min The minimum value
20874
acf284962b40 Add @since doxygen tags for finch/libgnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 19680
diff changeset
105 *
acf284962b40 Add @since doxygen tags for finch/libgnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 19680
diff changeset
106 * @since 2.0.0 (gnt), 2.1.0 (pidgin)
18352
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
107 */
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
108 void gnt_slider_set_range(GntSlider *slider, int max, int min);
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
109
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
110 /**
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
111 * Sets the amount of change at each step.
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
112 *
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
113 * @param slider The slider
19410
3650db1f02d3 Have small and large steps for the slider.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18515
diff changeset
114 * @param step The amount for each step
20874
acf284962b40 Add @since doxygen tags for finch/libgnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 19680
diff changeset
115 *
acf284962b40 Add @since doxygen tags for finch/libgnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 19680
diff changeset
116 * @since 2.0.0 (gnt), 2.1.0 (pidgin)
18352
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
117 */
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
118 void gnt_slider_set_step(GntSlider *slider, int step);
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
119
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
120 /**
19410
3650db1f02d3 Have small and large steps for the slider.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18515
diff changeset
121 * Sets the amount of change a small step.
3650db1f02d3 Have small and large steps for the slider.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18515
diff changeset
122 *
3650db1f02d3 Have small and large steps for the slider.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18515
diff changeset
123 * @param slider The slider
3650db1f02d3 Have small and large steps for the slider.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18515
diff changeset
124 * @param step The amount for a small step (for the slider)
20874
acf284962b40 Add @since doxygen tags for finch/libgnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 19680
diff changeset
125 *
acf284962b40 Add @since doxygen tags for finch/libgnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 19680
diff changeset
126 * @since 2.2.0
19410
3650db1f02d3 Have small and large steps for the slider.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18515
diff changeset
127 */
3650db1f02d3 Have small and large steps for the slider.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18515
diff changeset
128 void gnt_slider_set_small_step(GntSlider *slider, int step);
3650db1f02d3 Have small and large steps for the slider.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18515
diff changeset
129
3650db1f02d3 Have small and large steps for the slider.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18515
diff changeset
130 /**
3650db1f02d3 Have small and large steps for the slider.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18515
diff changeset
131 * Sets the amount of change a large step.
3650db1f02d3 Have small and large steps for the slider.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18515
diff changeset
132 *
3650db1f02d3 Have small and large steps for the slider.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18515
diff changeset
133 * @param slider The slider
3650db1f02d3 Have small and large steps for the slider.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18515
diff changeset
134 * @param step The amount for a large step (for the slider)
20874
acf284962b40 Add @since doxygen tags for finch/libgnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 19680
diff changeset
135 *
acf284962b40 Add @since doxygen tags for finch/libgnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 19680
diff changeset
136 * @since 2.2.0
19410
3650db1f02d3 Have small and large steps for the slider.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18515
diff changeset
137 */
3650db1f02d3 Have small and large steps for the slider.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18515
diff changeset
138 void gnt_slider_set_large_step(GntSlider *slider, int step);
3650db1f02d3 Have small and large steps for the slider.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18515
diff changeset
139
3650db1f02d3 Have small and large steps for the slider.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18515
diff changeset
140 /**
18352
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
141 * Advance the slider forward or backward.
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
142 *
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
143 * @param slider The slider
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
144 * @param steps The number of amounts to change, positive to change
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
145 * forward, negative to change backward
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
146 *
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
147 * @return The value of the slider after the change
20874
acf284962b40 Add @since doxygen tags for finch/libgnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 19680
diff changeset
148 *
acf284962b40 Add @since doxygen tags for finch/libgnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 19680
diff changeset
149 * @since 2.0.0 (gnt), 2.1.0 (pidgin)
18352
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
150 */
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
151 int gnt_slider_advance_step(GntSlider *slider, int steps);
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
152
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
153 /**
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
154 * Set the current value for the slider.
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
155 *
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
156 * @param slider The slider
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
157 * @param value The current value
20874
acf284962b40 Add @since doxygen tags for finch/libgnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 19680
diff changeset
158 *
acf284962b40 Add @since doxygen tags for finch/libgnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 19680
diff changeset
159 * @since 2.0.0 (gnt), 2.1.0 (pidgin)
18352
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
160 */
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
161 void gnt_slider_set_value(GntSlider *slider, int value);
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
162
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
163 /**
18515
3b19fa8d0177 Add _get_value for slider.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18352
diff changeset
164 * Get the current value for the slider.
3b19fa8d0177 Add _get_value for slider.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18352
diff changeset
165 *
3b19fa8d0177 Add _get_value for slider.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18352
diff changeset
166 * @param slider The slider
3b19fa8d0177 Add _get_value for slider.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18352
diff changeset
167 *
20874
acf284962b40 Add @since doxygen tags for finch/libgnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 19680
diff changeset
168 *
acf284962b40 Add @since doxygen tags for finch/libgnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 19680
diff changeset
169 * @since 2.0.0 (gnt), 2.1.0 (pidgin)
18515
3b19fa8d0177 Add _get_value for slider.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18352
diff changeset
170 */
3b19fa8d0177 Add _get_value for slider.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18352
diff changeset
171 int gnt_slider_get_value(GntSlider *slider);
3b19fa8d0177 Add _get_value for slider.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18352
diff changeset
172
3b19fa8d0177 Add _get_value for slider.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18352
diff changeset
173 /**
18352
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
174 * Update a label with the value of the slider whenever the value changes.
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
175 *
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
176 * @param slider The slider
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
177 * @param label The label to update
20874
acf284962b40 Add @since doxygen tags for finch/libgnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 19680
diff changeset
178 *
acf284962b40 Add @since doxygen tags for finch/libgnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 19680
diff changeset
179 * @since 2.0.0 (gnt), 2.1.0 (pidgin)
18352
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
180 */
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
181 void gnt_slider_reflect_label(GntSlider *slider, GntLabel *label);
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
182
18515
3b19fa8d0177 Add _get_value for slider.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18352
diff changeset
183
18352
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
184 G_END_DECLS
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
185
f1dbe3151051 Add a slider widget.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
186 #endif /* GNT_SLIDER_H */