1 // -*- c++ -*- 2 // Generated by gmmproc 2.40.0 -- DO NOT MODIFY! 3 #ifndef _CLUTTERMM_ALPHA_H 4 #define _CLUTTERMM_ALPHA_H 5 6 7 #ifndef CLUTTERMM_DISABLE_DEPRECATED 8 9 10 #include <glibmm/ustring.h> 11 #include <sigc++/sigc++.h> 12 13 /* Copyright (C) 2007 The cluttermm Development Team 14 * 15 * This library is free software; you can redistribute it and/or 16 * modify it under the terms of the GNU Lesser General Public 17 * License as published by the Free Software Foundation; either 18 * version 2.1 of the License, or (at your option) any later version. 19 * 20 * This library is distributed in the hope that it will be useful, 21 * but WITHOUT ANY WARRANTY; without even the implied warranty of 22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 23 * Lesser General Public License for more details. 24 * 25 * You should have received a copy of the GNU Lesser General Public 26 * License along with this library; if not, write to the Free 27 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 28 */ 29 30 #include <glibmm/object.h> 31 #include <cluttermm/timeline.h> 32 33 34 #ifndef DOXYGEN_SHOULD_SKIP_THIS 35 typedef struct _ClutterAlpha ClutterAlpha; 36 typedef struct _ClutterAlphaClass ClutterAlphaClass; 37 #endif /* DOXYGEN_SHOULD_SKIP_THIS */ 38 39 40 namespace Clutter 41 { class Alpha_Class; } // namespace Clutter 42 namespace Clutter 43 { 44 45 /** 46 * @deprecated Use the "progress-mode" property of Clutter::Timeline, or the 47 * Clutter::Timeline::set_progress_func() method instead. 48 */ 49 50 class Alpha : public Glib::Object 51 { 52 53 #ifndef DOXYGEN_SHOULD_SKIP_THIS 54 55 public: 56 typedef Alpha CppObjectType; 57 typedef Alpha_Class CppClassType; 58 typedef ClutterAlpha BaseObjectType; 59 typedef ClutterAlphaClass BaseClassType; 60 61 private: friend class Alpha_Class; 62 static CppClassType alpha_class_; 63 64 private: 65 // noncopyable 66 Alpha(const Alpha&); 67 Alpha& operator=(const Alpha&); 68 69 protected: 70 explicit Alpha(const Glib::ConstructParams& construct_params); 71 explicit Alpha(ClutterAlpha* castitem); 72 73 #endif /* DOXYGEN_SHOULD_SKIP_THIS */ 74 75 public: 76 virtual ~Alpha(); 77 78 /** Get the GType for this class, for use with the underlying GObject type system. 79 */ 80 static GType get_type() G_GNUC_CONST; 81 82 #ifndef DOXYGEN_SHOULD_SKIP_THIS 83 84 85 static GType get_base_type() G_GNUC_CONST; 86 #endif 87 88 ///Provides access to the underlying C GObject. gobj()89 ClutterAlpha* gobj() { return reinterpret_cast<ClutterAlpha*>(gobject_); } 90 91 ///Provides access to the underlying C GObject. gobj()92 const ClutterAlpha* gobj() const { return reinterpret_cast<ClutterAlpha*>(gobject_); } 93 94 ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. 95 ClutterAlpha* gobj_copy(); 96 97 private: 98 99 100 public: 101 /** For instance, 102 * double on_alpha(const Glib::RefPtr<Alpha>& alpha); 103 */ 104 typedef sigc::slot<double, const Glib::RefPtr<Alpha>&> SlotAlphaFunc; 105 106 protected: 107 Alpha(); 108 explicit Alpha(const Glib::RefPtr<Timeline>& timeline, gulong mode); 109 110 111 /** Creates a new Alpha instance and sets the timeline and the alpha function. 112 * @param timeline Timeline. 113 * @param slot Alpha function. 114 */ 115 Alpha(const Glib::RefPtr<Timeline>& timeline, const SlotAlphaFunc& slot); 116 117 public: 118 enum { MAX_ALPHA = 0xFFFF }; 119 120 121 static Glib::RefPtr<Alpha> create(); 122 123 124 static Glib::RefPtr<Alpha> create(const Glib::RefPtr<Timeline>& timeline, const SlotAlphaFunc& slot); 125 126 127 static Glib::RefPtr<Alpha> create(const Glib::RefPtr<Timeline>& timeline, gulong mode); 128 129 130 /** Binds @a alpha to @a timeline. 131 * 132 * @newin{0,2} 133 * 134 * Deprecated: 1.12 135 * @param timeline A Clutter::Timeline. 136 */ 137 void set_timeline(const Glib::RefPtr<Timeline>& timeline); 138 139 /** Gets the Clutter::Timeline bound to @a alpha. 140 * 141 * @newin{0,2} 142 * 143 * Deprecated: 1.12 144 * @return A Clutter::Timeline instance. 145 */ 146 Glib::RefPtr<Timeline> get_timeline(); 147 148 /** Gets the Clutter::Timeline bound to @a alpha. 149 * 150 * @newin{0,2} 151 * 152 * Deprecated: 1.12 153 * @return A Clutter::Timeline instance. 154 */ 155 Glib::RefPtr<const Timeline> get_timeline() const; 156 157 /** Query the current alpha value. 158 * 159 * @newin{0,2} 160 * 161 * Deprecated: 1.12 162 * @return The current alpha value for the alpha. 163 */ 164 double get_alpha() const; 165 166 167 void set_func(const SlotAlphaFunc& slot); 168 169 //TODO: Special methods that take AnimationMode? 170 171 /** Sets the progress function of @a alpha using the symbolic value 172 * of @a mode, as taken by the Clutter::AnimationMode enumeration or 173 * using the value returned by register_func(). 174 * 175 * @newin{1,0} 176 * 177 * Deprecated: 1.12 178 * @param mode A Clutter::AnimationMode. 179 */ 180 void set_mode(gulong mode); 181 182 /** Retrieves the Clutter::AnimationMode used by @a alpha. 183 * 184 * @newin{1,0} 185 * 186 * Deprecated: 1.12 187 * @return The animation mode. 188 */ 189 gulong get_mode() const; 190 191 #ifdef GLIBMM_PROPERTIES_ENABLED 192 /** Alpha value as computed by the alpha. 193 * 194 * You rarely need to use properties because there are get_ and set_ methods for almost all of them. 195 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, 196 * or receive notification when the value of the property changes. 197 */ 198 Glib::PropertyProxy_ReadOnly< double > property_alpha() const; 199 #endif //#GLIBMM_PROPERTIES_ENABLED 200 201 202 #ifdef GLIBMM_PROPERTIES_ENABLED 203 /** Timeline used by the alpha. 204 * 205 * You rarely need to use properties because there are get_ and set_ methods for almost all of them. 206 * @return A PropertyProxy that allows you to get or set the value of the property, 207 * or receive notification when the value of the property changes. 208 */ 209 Glib::PropertyProxy< Glib::RefPtr<Timeline> > property_timeline() ; 210 #endif //#GLIBMM_PROPERTIES_ENABLED 211 212 #ifdef GLIBMM_PROPERTIES_ENABLED 213 /** Timeline used by the alpha. 214 * 215 * You rarely need to use properties because there are get_ and set_ methods for almost all of them. 216 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, 217 * or receive notification when the value of the property changes. 218 */ 219 Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Timeline> > property_timeline() const; 220 #endif //#GLIBMM_PROPERTIES_ENABLED 221 222 223 // We don't need the GClosure stuff in C++: 224 225 226 public: 227 228 public: 229 //C++ methods used to invoke GTK+ virtual functions: 230 231 protected: 232 //GTK+ Virtual Functions (override these to change behaviour): 233 234 //Default Signal Handlers:: 235 236 237 }; 238 239 } // namespace Clutter 240 241 242 namespace Glib 243 { 244 /** A Glib::wrap() method for this object. 245 * 246 * @param object The C instance. 247 * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref. 248 * @result A C++ instance that wraps this C instance. 249 * 250 * @relates Clutter::Alpha 251 */ 252 Glib::RefPtr<Clutter::Alpha> wrap(ClutterAlpha* object, bool take_copy = false); 253 } 254 255 256 #endif // CLUTTERMM_DISABLE_DEPRECATED 257 258 259 #endif /* _CLUTTERMM_ALPHA_H */ 260 261