~tualatrix/ibentu/mx

« back to all changes in this revision

Viewing changes to mx/mx-slider.h

  • Committer: Tualatrix Chou
  • Date: 2010-10-09 05:23:41 UTC
  • Revision ID: tualatrix@gmail.com-20101009052341-xpyc3tfjpeh196la
Inital commit

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * mx-slider.c: Slider widget
 
3
 *
 
4
 * Copyright 2009 Intel Corporation.
 
5
 *
 
6
 * This program is free software; you can redistribute it and/or modify it
 
7
 * under the terms and conditions of the GNU Lesser General Public License,
 
8
 * version 2.1, as published by the Free Software Foundation.
 
9
 *
 
10
 * This program is distributed in the hope it will be useful, but WITHOUT ANY
 
11
 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 
12
 * FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for
 
13
 * more details.
 
14
 *
 
15
 * You should have received a copy of the GNU Lesser General Public License
 
16
 * along with this program; if not, write to the Free Software Foundation,
 
17
 * Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
 
18
 *
 
19
 * Written by: Damien Lespiau <damien.lespiau@intel.com>
 
20
 *
 
21
 */
 
22
 
 
23
#if !defined(MX_H_INSIDE) && !defined(MX_COMPILATION)
 
24
#error "Only <mx/mx.h> can be included directly.h"
 
25
#endif
 
26
 
 
27
#ifndef __MX_SLIDER_H__
 
28
#define __MX_SLIDER_H__
 
29
 
 
30
#include <glib-object.h>
 
31
#include <mx/mx-widget.h>
 
32
 
 
33
G_BEGIN_DECLS
 
34
 
 
35
#define MX_TYPE_SLIDER mx_slider_get_type()
 
36
 
 
37
#define MX_SLIDER(obj) \
 
38
  (G_TYPE_CHECK_INSTANCE_CAST ((obj), MX_TYPE_SLIDER, MxSlider))
 
39
 
 
40
#define MX_SLIDER_CLASS(klass) \
 
41
  (G_TYPE_CHECK_CLASS_CAST ((klass), MX_TYPE_SLIDER, MxSliderClass))
 
42
 
 
43
#define MX_IS_SLIDER(obj) \
 
44
  (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MX_TYPE_SLIDER))
 
45
 
 
46
#define MX_IS_SLIDER_CLASS(klass) \
 
47
  (G_TYPE_CHECK_CLASS_TYPE ((klass), MX_TYPE_SLIDER))
 
48
 
 
49
#define MX_SLIDER_GET_CLASS(obj) \
 
50
  (G_TYPE_INSTANCE_GET_CLASS ((obj), MX_TYPE_SLIDER, MxSliderClass))
 
51
 
 
52
typedef struct _MxSlider MxSlider;
 
53
typedef struct _MxSliderClass MxSliderClass;
 
54
typedef struct _MxSliderPrivate MxSliderPrivate;
 
55
 
 
56
/**
 
57
 * MxSlider:
 
58
 *
 
59
 * The contents of this structure are private and should only be accessed
 
60
 * through the public API.
 
61
 */
 
62
struct _MxSlider
 
63
{
 
64
  /*< private >*/
 
65
  MxWidget parent;
 
66
 
 
67
  MxSliderPrivate *priv;
 
68
};
 
69
 
 
70
struct _MxSliderClass
 
71
{
 
72
  MxWidgetClass parent_class;
 
73
 
 
74
  /* padding for future expansion */
 
75
  void (*_padding_0) (void);
 
76
  void (*_padding_1) (void);
 
77
  void (*_padding_2) (void);
 
78
  void (*_padding_3) (void);
 
79
  void (*_padding_4) (void);
 
80
};
 
81
 
 
82
GType           mx_slider_get_type      (void) G_GNUC_CONST;
 
83
 
 
84
ClutterActor *  mx_slider_new           (void);
 
85
 
 
86
void            mx_slider_set_value  (MxSlider *bar,
 
87
                                      gdouble   value);
 
88
gdouble         mx_slider_get_value  (MxSlider *bar);
 
89
 
 
90
G_END_DECLS
 
91
 
 
92
#endif /* __MX_SLIDER_H__ */