fix for type error on 64 bit systems
[ardour.git] / libs / gtkmm2 / atk / atkmm / value.h
1 // -*- c++ -*-
2 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #ifndef _ATKMM_VALUE_H
4 #define _ATKMM_VALUE_H
5
6 #include <glibmm.h>
7
8 /* $Id$ */
9
10 /* Copyright (C) 2002 The gtkmm Development Team
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Library General Public
14  * License as published by the Free Software Foundation; either
15  * version 2 of the License, or (at your option) any later version.
16  *
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
20  * Library General Public License for more details.
21  *
22  * You should have received a copy of the GNU Library General Public
23  * License along with this library; if not, write to the Free
24  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25  */
26
27
28 #ifndef DOXYGEN_SHOULD_SKIP_THIS
29 extern "C"
30 {
31   typedef struct _AtkValueIface AtkValueIface;
32   typedef struct _AtkValue      AtkValue;
33 }
34 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
35
36
37 #ifndef DOXYGEN_SHOULD_SKIP_THIS
38 typedef struct _AtkValue AtkValue;
39 typedef struct _AtkValueClass AtkValueClass;
40 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
41
42
43 namespace Atk
44 { class Value_Class; } // namespace Atk
45 namespace Atk
46 {
47
48 /** The ATK interface implemented by valuators and components which display or select a value from a bounded range of values.
49  * This should be implemented for components which either display a value from a bounded range, or which allow the user
50  * to specify a value from a bounded range, or both. For instance, most sliders and range controls, as well as dials,
51  * should have Atk::Object representations which implement Atk::Value on the component's behalf. Atk::Values may be
52  * read-only, in which case attempts to alter the value return false to indicate failure.
53  */
54
55 class Value : public Glib::Interface
56 {
57   
58 #ifndef DOXYGEN_SHOULD_SKIP_THIS
59
60 public:
61   typedef Value CppObjectType;
62   typedef Value_Class CppClassType;
63   typedef AtkValue BaseObjectType;
64   typedef AtkValueIface BaseClassType;
65
66 private:
67   friend class Value_Class;
68   static CppClassType value_class_;
69
70   // noncopyable
71   Value(const Value&);
72   Value& operator=(const Value&);
73
74 protected:
75   Value(); // you must derive from this class
76   explicit Value(AtkValue* castitem);
77
78 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
79
80 public:
81   virtual ~Value();
82
83   static void add_interface(GType gtype_implementer);
84
85 #ifndef DOXYGEN_SHOULD_SKIP_THIS
86   static GType get_type()      G_GNUC_CONST;
87   static GType get_base_type() G_GNUC_CONST;
88 #endif
89
90   ///Provides access to the underlying C GObject.
91   AtkValue*       gobj()       { return reinterpret_cast<AtkValue*>(gobject_); }
92
93   ///Provides access to the underlying C GObject.  
94   const AtkValue* gobj() const { return reinterpret_cast<AtkValue*>(gobject_); }
95
96 private:
97
98
99 public:
100   
101   /** Gets the value of this object.
102    * @param value A G::Value representing the current accessible value.
103    */
104   void get_current_value(Glib::ValueBase& value) const;
105   
106   /** Gets the maximum value of this object.
107    * @param value A G::Value representing the maximum accessible value.
108    */
109   void get_maximum_value(Glib::ValueBase& value) const;
110   
111   /** Gets the minimum value of this object.
112    * @param value A G::Value representing the minimum accessible value.
113    */
114   void get_minimum_value(Glib::ValueBase& value) const;
115   
116   /** Sets the value of this object.
117    * @param value A G::Value which is the desired new accessible value.
118    * @return <tt>true</tt> if new value is successfully set, <tt>false</tt> otherwise.
119    */
120   bool set_current_value(const Glib::ValueBase& value);
121
122 protected:
123     virtual void get_current_value_vfunc(Glib::ValueBase& value) const;
124     virtual void get_maximum_value_vfunc(Glib::ValueBase& value) const;
125     virtual void get_minimum_value_vfunc(Glib::ValueBase& value) const;
126     virtual bool set_current_value_vfunc(const Glib::ValueBase& value);
127
128
129 public:
130
131 public:
132   //C++ methods used to invoke GTK+ virtual functions:
133
134 protected:
135   //GTK+ Virtual Functions (override these to change behaviour):
136
137   //Default Signal Handlers::
138
139
140 };
141
142 } // namespace Atk
143
144
145 namespace Glib
146 {
147   /** @relates Atk::Value
148    * @param object The C instance
149    * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
150    * @result A C++ instance that wraps this C instance.
151    */
152   Glib::RefPtr<Atk::Value> wrap(AtkValue* object, bool take_copy = false);
153
154 } // namespace Glib
155
156 #endif /* _ATKMM_VALUE_H */
157