1/* Copyright (C) 2007 The cluttermm Development Team 2 * 3 * This library is free software; you can redistribute it and/or 4 * modify it under the terms of the GNU Lesser General Public 5 * License as published by the Free Software Foundation; either 6 * version 2.1 of the License, or (at your option) any later version. 7 * 8 * This library is distributed in the hope that it will be useful, 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 * Lesser General Public License for more details. 12 * 13 * You should have received a copy of the GNU Lesser General Public 14 * License along with this library; if not, write to the Free 15 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 16 */ 17 18#include <glibmm/object.h> 19#include <pangomm/context.h> 20#include <pangomm/layout.h> 21#include <atkmm/object.h> 22#include <cluttermm/action.h> 23#include <cluttermm/actor-box.h> 24#include <cluttermm/animation.h> 25#include <cluttermm/animatable.h> 26#include <cluttermm/color.h> 27//#include <cluttermm/content.h> 28#include <cluttermm/effect.h> 29//#include <cluttermm/layout-manager.h> 30#include <cluttermm/scriptable.h> 31#include <cluttermm/shader.h> 32#include <cluttermm/transition.h> 33#include <cluttermm/types.h> // For Event* 34 35_DEFS(cluttermm,clutter) 36_PINCLUDE(glibmm/private/object_p.h) 37 38#m4 _PUSH(SECTION_CC_PRE_INCLUDES) 39#define CLUTTER_DISABLE_DEPRECATION_WARNINGS 1 40#m4 _POP() 41 42namespace Clutter 43{ 44 45typedef ClutterMatrix Matrix; 46typedef ClutterPaintVolume PaintVolume; 47 48class Animation; 49class Constraint; 50class Content; 51class LayoutManager; 52 53_WRAP_ENUM(ActorAlign, ClutterActorAlign) 54_WRAP_ENUM(ActorFlags, ClutterActorFlags) 55_WRAP_ENUM(AllocationFlags, ClutterAllocationFlags) 56_WRAP_ENUM(ContentRepeat, ClutterContentRepeat) 57_WRAP_ENUM(ContentGravity, ClutterContentGravity) 58_WRAP_ENUM(OffscreenRedirect, ClutterOffscreenRedirect) 59_WRAP_ENUM(Orientation, ClutterOrientation) 60 61//TODO: Write a version of the large description from here: http://clutter-project.org/docs/clutter/stable/ClutterActor.html#ClutterActor.description 62class Actor : public Glib::Object, public Scriptable, public Animatable 63{ 64 _CLASS_GOBJECT(Actor, ClutterActor, CLUTTER_ACTOR, Glib::Object, GObject) 65 _DERIVES_INITIALLY_UNOWNED() 66 _IMPLEMENTS_INTERFACE(Scriptable) 67 _IMPLEMENTS_INTERFACE(Animatable) 68 69protected: 70 _CTOR_DEFAULT() 71 72public: 73 74 _WRAP_CREATE() 75 76 _WRAP_METHOD(void set_flags(ActorFlags flags), clutter_actor_set_flags) 77 _WRAP_METHOD(void unset_flags(ActorFlags flags), clutter_actor_unset_flags) 78 _WRAP_METHOD(ActorFlags get_flags() const, clutter_actor_get_flags) 79 80 //TODO: Remove these now that there are properties instead? 81 // Not at present; there are no accessors available. 82 bool is_mapped() const; 83 bool is_realized() const; 84 bool is_visible() const; 85 bool is_reactive() const; 86 87 _IGNORE(clutter_actor_destroy) 88 89 _WRAP_METHOD(void show(), clutter_actor_show) 90 _WRAP_METHOD(void show_all(), clutter_actor_show_all, deprecated "Actors are visible by default.") 91 _WRAP_METHOD(void hide(), clutter_actor_hide) 92 _WRAP_METHOD(void hide_all(), clutter_actor_hide_all, deprecated "Using hide() on the actor will now prevent its children from being painted as well.") 93 _WRAP_METHOD(void realize(), clutter_actor_realize) 94 _WRAP_METHOD(void unrealize(), clutter_actor_unrealize) 95 _WRAP_METHOD(void map(), clutter_actor_map) 96 _WRAP_METHOD(void unmap(), clutter_actor_unmap) 97 _WRAP_METHOD(void paint(), clutter_actor_paint) 98 _WRAP_METHOD(void continue_paint(), clutter_actor_continue_paint) 99 _WRAP_METHOD(void queue_redraw(), clutter_actor_queue_redraw) 100 _WRAP_METHOD(void queue_relayout(), clutter_actor_queue_relayout) 101 _IGNORE(clutter_actor_queue_redraw_with_clip) //internal. 102 _IGNORE(clutter_actor_queue_relayout) //not for application code. 103 _IGNORE(clutter_actor_should_pick_paint ) //not for application code. 104 105 _WRAP_METHOD(bool has_overlaps(), clutter_actor_has_overlaps) 106 107 _WRAP_METHOD(void set_content(const Glib::RefPtr<Content>& content), clutter_actor_set_content) 108 109 _WRAP_METHOD(Glib::RefPtr<Content> get_content(), clutter_actor_get_content, refreturn) 110 _WRAP_METHOD(Glib::RefPtr<const Content> get_content() const, clutter_actor_get_content, refreturn, constversion) 111 112 _WRAP_METHOD(void set_content_gravity(ContentGravity gravity), clutter_actor_set_content_gravity) 113 114 _WRAP_METHOD(ContentGravity get_content_gravity() const, clutter_actor_get_content_gravity) 115 116 _WRAP_METHOD(void set_content_scaling_filters(ScalingFilter min_filter, ScalingFilter mag_filter), clutter_actor_set_content_scaling_filters) 117 118#m4 _CONVERSION(`ScalingFilter&', `ClutterScalingFilter*', `(($2)&($3))') 119 _WRAP_METHOD(void get_content_scaling_filters(ScalingFilter& min_filter, ScalingFilter& mag_filter), clutter_actor_get_content_scaling_filters) 120 121 _WRAP_METHOD(void set_content_repeat(ContentRepeat repeat), clutter_actor_set_content_repeat) 122 _WRAP_METHOD(ContentRepeat get_content_repeat() const, clutter_actor_get_content_repeat) 123 124 ActorBox get_content_box() const; 125 _IGNORE(clutter_actor_get_content_box) 126 127#m4 dnl // Those are varargs convenience functions for C coders 128 _IGNORE(clutter_actor_animate, clutter_actor_animate_with_alpha, clutter_actor_animate_with_timeline) 129 130 //We ignore clutter_actor_destroy because it would break any existing RefPtr. 131 _IGNORE(clutter_actor_destroy) 132 133 _WRAP_METHOD(Glib::RefPtr<Pango::Context> get_pango_context(), 134 clutter_actor_get_pango_context, refreturn) 135 _WRAP_METHOD(Glib::RefPtr<const Pango::Context> get_pango_context() const, 136 clutter_actor_get_pango_context, refreturn, constversion) 137 _WRAP_METHOD(Glib::RefPtr<Pango::Context> create_pango_context(), 138 clutter_actor_create_pango_context) 139 140 _WRAP_METHOD(Glib::RefPtr<Pango::Layout> create_pango_layout(const Glib::ustring& text), 141 clutter_actor_create_pango_layout) 142 143 _IGNORE( clutter_actor_get_transform) //handcoded to allow returning the Matrix. 144 145 /** 146 * Returns the transformation matrix being used by the actor. 147 * */ 148 Matrix get_transform() const; 149 150 _WRAP_METHOD(void get_transformation_matrix(ClutterMatrix* matrix), clutter_actor_get_transformation_matrix, deprecated "Use get_transform() instead") 151 _WRAP_METHOD(void set_transform(const Matrix& transform), clutter_actor_set_transform) 152 _WRAP_METHOD(void set_child_transform(const Matrix& transform), clutter_actor_set_child_transform) 153 154 _WRAP_METHOD(bool is_in_clone_paint() const, clutter_actor_is_in_clone_paint) 155 156#m4 _INITIALIZATION(`ActorBox&',`ClutterActorBox', `$3 = Glib::wrap(&($4))') 157 _WRAP_METHOD(bool get_paint_box(ActorBox& box{>>}), clutter_actor_get_paint_box) 158 159 _WRAP_METHOD(bool has_pointer() const, clutter_actor_has_pointer) 160 _WRAP_METHOD(void set_text_direction(TextDirection text_dir), clutter_actor_set_text_direction) 161 _WRAP_METHOD(TextDirection get_text_direction() const, clutter_actor_get_text_direction) 162 163 164 _WRAP_METHOD(Glib::RefPtr<Actor> get_stage(), clutter_actor_get_stage, refreturn) 165 _WRAP_METHOD(Glib::RefPtr<const Actor> get_stage() const, clutter_actor_get_stage, refreturn, constversion) 166 167 _WRAP_METHOD(void set_child_below_sibling(const Glib::RefPtr<Actor>& child, const Glib::RefPtr<Actor>& sibling), clutter_actor_set_child_below_sibling) 168 _WRAP_METHOD(void set_child_above_sibling(const Glib::RefPtr<Actor>& child, const Glib::RefPtr<Actor>& sibling), clutter_actor_set_child_above_sibling) 169 _WRAP_METHOD(void set_child_at_index(const Glib::RefPtr<Actor>& child, int index), clutter_actor_set_child_at_index) 170 171#m4 _CONVERSION(`const Geometry&', `const ClutterGeometry*', `($3).gobj()') 172 _WRAP_METHOD(void set_geometry(const Geometry& geometry), clutter_actor_set_geometry, deprecated "Use set_position() and set_size() instead.") 173 174_DEPRECATE_IFDEF_START 175 _WRAP_METHOD_DOCS_ONLY(clutter_actor_get_geometry) 176 /** 177 * @deprecated Use get_position() and get_size(), or get_allocation_geometry() instead. 178 */ 179 Geometry get_geometry() const; 180_DEPRECATE_IFDEF_END 181 182 //_WRAP_METHOD(void get_coords(float *x_1, float *y_1, float *x_2, float *y_2) const, clutter_actor_get_coords) 183 _WRAP_METHOD(void set_size(float width, float height), clutter_actor_set_size) 184 _WRAP_METHOD(void get_position(float& x, float& y), clutter_actor_get_position) 185 _WRAP_METHOD(void set_position(float x, float y), clutter_actor_set_position) 186 //_WRAP_METHOD(void get_abs_position(float& x, float& y) const, clutter_actor_get_abs_position) 187 _WRAP_METHOD(float get_width() const, clutter_actor_get_width) 188 _WRAP_METHOD(float get_height() const, clutter_actor_get_height) 189 _WRAP_METHOD(void set_width(float width), clutter_actor_set_width) 190 _WRAP_METHOD(void set_height(float height), clutter_actor_set_height) 191 192 _WRAP_METHOD(void set_x(float x), clutter_actor_set_x) 193 _WRAP_METHOD(float get_x() const, clutter_actor_get_x) 194 _WRAP_METHOD(void set_y(float y), clutter_actor_set_y) 195 _WRAP_METHOD(float get_y() const, clutter_actor_get_y) 196 _WRAP_METHOD(void set_z_position(float z_position), clutter_actor_set_z_position) 197 _WRAP_METHOD(float get_z_position() const, clutter_actor_get_z_position) 198 199 _WRAP_METHOD(void set_x_align(ActorAlign x_align), clutter_actor_set_x_align) 200 _WRAP_METHOD(ActorAlign get_x_align() const, clutter_actor_get_x_align) 201 _WRAP_METHOD(void set_y_align(ActorAlign y_align), clutter_actor_set_y_align) 202 _WRAP_METHOD(ActorAlign get_y_align() const,clutter_actor_get_y_align) 203 204 _WRAP_METHOD(bool get_x_expand() const, clutter_actor_get_x_expand) 205 _WRAP_METHOD(void set_x_expand(bool expand = true), clutter_actor_set_x_expand) 206 _WRAP_METHOD(bool get_y_expand() const, clutter_actor_get_y_expand) 207 _WRAP_METHOD(void set_y_expand(bool expand = true), clutter_actor_set_y_expand) 208 _WRAP_METHOD(bool needs_expand(Orientation orientation) const, clutter_actor_needs_expand) 209 210 _WRAP_METHOD(void set_layout_manager(const Glib::RefPtr<LayoutManager>& manager), clutter_actor_set_layout_manager) 211 212 /** Unset the layout manager. 213 */ 214 void unset_layout_manager(); 215 216 _WRAP_METHOD(Glib::RefPtr<LayoutManager> get_layout_manager(), clutter_actor_get_layout_manager, refreturn) 217 _WRAP_METHOD(Glib::RefPtr<const LayoutManager> get_layout_manager() const, clutter_actor_get_layout_manager, refreturn, constversion) 218 219 _WRAP_METHOD(void set_reactive(bool reactive = true), clutter_actor_set_reactive) 220 _WRAP_METHOD(bool get_reactive() const, clutter_actor_get_reactive) 221 _WRAP_METHOD(bool has_key_focus() const, clutter_actor_has_key_focus) 222 223 224 _WRAP_METHOD(void set_rotation(RotateAxis axis, double angle, float x, float y, float z), clutter_actor_set_rotation, deprecated "Use set_rotation_angle() and set_pivot_point() instead.") 225 _WRAP_METHOD(void set_z_rotation_from_gravity(double angle, Gravity gravity), clutter_actor_set_z_rotation_from_gravity, deprecated "Use set_rotation_angle() and set_pivot_point() instead.") 226 _WRAP_METHOD(double get_rotation(RotateAxis axis, float& x, float& y, float& z) const, clutter_actor_get_rotation, deprecated "Use get_rotation_angle() and get_pivot_point() instead.") 227 _WRAP_METHOD(Gravity get_z_rotation_gravity() const, clutter_actor_get_z_rotation_gravity, deprecated "Use the “pivot-point” instead of a Gravity.") 228 _WRAP_METHOD(void set_opacity(guint8 opacity), clutter_actor_set_opacity) 229 _WRAP_METHOD(guint8 get_opacity() const, clutter_actor_get_opacity) 230 231 _WRAP_METHOD(void set_offscreen_redirect(OffscreenRedirect redirect) const,clutter_actor_set_offscreen_redirect) 232 _WRAP_METHOD(OffscreenRedirect get_offscreen_redirect(), clutter_actor_get_offscreen_redirect) 233 234 _WRAP_METHOD(void set_background_color(const Color& color), clutter_actor_set_background_color) 235 236 /** Retrieves the color set using set_background_color(). 237 */ 238 Color get_background_color() const; 239 _IGNORE(clutter_actor_get_background_color) 240 241 _WRAP_METHOD(const PaintVolume* get_paint_volume() const, clutter_actor_get_paint_volume) 242 _WRAP_METHOD(const PaintVolume* get_transformed_paint_volume(const Glib::RefPtr<Actor>& relative_to_ancestor{?}) const, clutter_actor_get_transformed_paint_volume) 243 _WRAP_METHOD(const PaintVolume* get_default_paint_volume() const, clutter_actor_get_default_paint_volume) 244 245 246 _WRAP_METHOD(void set_name(const gchar *name), clutter_actor_set_name) 247 _WRAP_METHOD(Glib::ustring get_name() const, clutter_actor_get_name) 248 _WRAP_METHOD(guint32 get_gid() const, clutter_actor_get_gid) 249 _WRAP_METHOD(void set_clip(float xoff, float yoff, float width, float height), clutter_actor_set_clip) 250 _WRAP_METHOD(void get_clip(float& xoff, float& yoff, float& width, float& height), clutter_actor_get_clip) 251 _WRAP_METHOD(void set_clip_to_allocation(bool clip_set = true), clutter_actor_set_clip_to_allocation) 252 _WRAP_METHOD(bool get_clip_to_allocation() const, clutter_actor_get_clip_to_allocation) 253 _WRAP_METHOD(void remove_clip(), clutter_actor_remove_clip) 254 _WRAP_METHOD(bool has_clip() const, clutter_actor_has_clip) 255 256 #m4 _CONVERSION(`GList*',`std::vector< Glib::RefPtr<Actor> >',`Glib::ListHandler< Glib::RefPtr<Actor> >::list_to_vector($3, Glib::OWNERSHIP_SHALLOW)') 257 _WRAP_METHOD(std::vector< Glib::RefPtr<Actor> > get_children(), clutter_actor_get_children) 258 259 #m4 _CONVERSION(`GList*',`std::vector< Glib::RefPtr<const Actor> >',`Glib::ListHandler< Glib::RefPtr<const Actor> >::list_to_vector($3, Glib::OWNERSHIP_SHALLOW)') 260 _WRAP_METHOD(std::vector< Glib::RefPtr<const Actor> > get_children() const, clutter_actor_get_children) 261 262 _WRAP_METHOD(int get_n_children() const, clutter_actor_get_n_children) 263 264 _WRAP_METHOD(Glib::RefPtr<Actor> get_child_at_index(int index), clutter_actor_get_child_at_index, refreturn) 265 _WRAP_METHOD(Glib::RefPtr<const Actor> get_child_at_index(int index) const, clutter_actor_get_child_at_index, refreturn, constversion) 266 267 _WRAP_METHOD(Glib::RefPtr<Actor> get_previous_sibling(), clutter_actor_get_previous_sibling, refreturn) 268 _WRAP_METHOD(Glib::RefPtr<const Actor> get_previous_sibling() const, clutter_actor_get_previous_sibling, refreturn, constversion) 269 270 _WRAP_METHOD(Glib::RefPtr<Actor> get_next_sibling(), clutter_actor_get_next_sibling, refreturn) 271 _WRAP_METHOD(Glib::RefPtr<const Actor> get_next_sibling() const, clutter_actor_get_next_sibling, refreturn, constversion) 272 273 _WRAP_METHOD(Glib::RefPtr<Actor> get_first_child(), clutter_actor_get_first_child, refreturn) 274 _WRAP_METHOD(Glib::RefPtr<const Actor> get_first_child() const, clutter_actor_get_first_child, refreturn, constversion) 275 276 _WRAP_METHOD(Glib::RefPtr<Actor> get_last_child(), clutter_actor_get_last_child, refreturn) 277 _WRAP_METHOD(Glib::RefPtr<const Actor> get_last_child() const, clutter_actor_get_last_child, refreturn, constversion) 278 279 _WRAP_METHOD(void set_parent(const Glib::RefPtr<Actor>& parent), clutter_actor_set_parent, deprecated "Use add_child() instead.") 280 _WRAP_METHOD(Glib::RefPtr<Actor> get_parent(), clutter_actor_get_parent, refreturn) 281 _WRAP_METHOD(Glib::RefPtr<const Actor> get_parent() const, clutter_actor_get_parent, refreturn, constversion) 282 _WRAP_METHOD(void reparent(const Glib::RefPtr<Actor>& new_parent), clutter_actor_reparent, deprecated "Use remove_child() and add_child() instead.") 283 _WRAP_METHOD(void unparent(), clutter_actor_unparent, deprecated "Use remove_child() instead.") 284 _WRAP_METHOD(bool contains(const Glib::RefPtr<const Actor>& descendant) const, clutter_actor_contains) 285 _WRAP_METHOD(void raise(const Glib::RefPtr<Actor>& below), clutter_actor_raise, deprecated "Use set_child_above_sibling() instead.") 286 _WRAP_METHOD(void lower(const Glib::RefPtr<Actor>& above), clutter_actor_lower, deprecated "Use set_child_below_sibling() instead") 287 _WRAP_METHOD(void raise_top (), clutter_actor_raise_top) 288 _WRAP_METHOD(void lower_bottom(), clutter_actor_lower_bottom) 289 290 _WRAP_METHOD(Glib::RefPtr<Shader> get_shader(), clutter_actor_get_shader, refreturn, deprecated "Use get_effect() instead.") 291 _WRAP_METHOD(Glib::RefPtr<const Shader> get_shader() const, clutter_actor_get_shader, refreturn, constversion, deprecated "Use get_effect() instead.") 292 _WRAP_METHOD(void set_shader(const Glib::RefPtr<Shader>& shader), clutter_actor_set_shader, deprecated "Use add_effect() instead.") 293 294_DEPRECATE_IFDEF_START 295 _WRAP_METHOD_DOCS_ONLY(clutter_actor_set_shader_param) 296 /** 297 * @deprecated Use ShaderEffect::set_uniform_value() instead." 298 */ 299 template <class ParamType> void set_shader_param(const Glib::ustring& param, const ParamType& value); 300_DEPRECATE_IFDEF_END 301 _IGNORE(clutter_actor_set_shader_param_int, clutter_actor_set_shader_param_float) 302 303 //_WRAP_METHOD_DOCS_ONLY(clutter_actor_get_paint_area) 304 //ActorBox get_paint_area() const; 305 _WRAP_METHOD(bool is_rotated() const, clutter_actor_is_rotated) 306 _WRAP_METHOD(bool is_scaled() const, clutter_actor_is_scaled) 307 308 _WRAP_METHOD(void set_pivot_point(float x, float y), clutter_actor_set_pivot_point) 309 _WRAP_METHOD(void get_pivot_point(float& pivot_x, float& pivot_y) const, clutter_actor_get_pivot_point) 310 _WRAP_METHOD(void set_pivot_point_z(float pivot_z), clutter_actor_set_pivot_point_z) 311 _WRAP_METHOD(float get_pivot_point_z() const, clutter_actor_get_pivot_point_z) 312 _WRAP_METHOD(void set_rotation_angle(RotateAxis axis, double angle), clutter_actor_set_rotation_angle) 313 _WRAP_METHOD(double get_rotation_angle(RotateAxis axis) const, clutter_actor_get_rotation_angle) 314 315 _WRAP_METHOD(void set_translation(float translate_x, float translate_y, float translate_z), clutter_actor_set_translation) 316 _WRAP_METHOD(void get_translation(float& translate_x, float& translate_y, float& translate_z) const, clutter_actor_get_translation) 317 318 _WRAP_METHOD(bool should_pick_paint() const, clutter_actor_should_pick_paint) 319 320 _WRAP_METHOD_DOCS_ONLY(clutter_actor_get_allocation_vertices) 321 void get_allocation_vertices(Vertex vertices[4]) const; 322 323 _WRAP_METHOD_DOCS_ONLY(clutter_actor_get_allocation_vertices) 324 void get_allocation_vertices(const Glib::RefPtr<Actor>& ancestor, Vertex vertices[4]) const; 325 326 _WRAP_METHOD_DOCS_ONLY(clutter_actor_get_abs_allocation_vertices) 327 void get_abs_allocation_vertices(Vertex vertices[4]) const; 328 329 _WRAP_METHOD(void allocate_align_fill(const ActorBox& box,gdouble x_align, double y_align, bool x_fill, bool y_fill, AllocationFlags flags), clutter_actor_allocate_align_fill) 330 331 _WRAP_METHOD(void set_allocation(const ActorBox& box, AllocationFlags flags), clutter_actor_set_allocation) 332 333 _WRAP_METHOD_DOCS_ONLY(clutter_actor_get_allocation_box) 334 ActorBox get_allocation_box() const; 335 336 _WRAP_METHOD(void allocate(const ActorBox& box, AllocationFlags absolute_origin_changed = ALLOCATION_NONE), clutter_actor_allocate) 337 338 //TODO: Make this protected? 339 _WRAP_METHOD(void allocate_preferred_size(AllocationFlags absolute_origin_changed = ALLOCATION_NONE), clutter_actor_allocate_preferred_size) 340 341 _WRAP_METHOD(void allocate_available_size(float x, float y, float available_width, float available_height, AllocationFlags flags = ALLOCATION_NONE), clutter_actor_allocate_available_size) 342 343 _WRAP_METHOD(void apply_transform_to_point(const Vertex& point, Vertex& vertex) const, clutter_actor_apply_transform_to_point) 344 _WRAP_METHOD(void transform_stage_point(float x, float y, float& x_out, float& y_out) const, clutter_actor_transform_stage_point) 345#m4 _CONVERSION(`const Vertex&',`ClutterVertex*',`const_cast<ClutterVertex*>(($3).gobj())') 346#m4 _CONVERSION(`Vertex&',`ClutterVertex*',`($3).gobj()') 347 _WRAP_METHOD(void apply_relative_transform_to_point(const Glib::RefPtr<Actor>& ancestor, const Vertex& point, Vertex& vertex) const, clutter_actor_apply_relative_transform_to_point) 348 _WRAP_METHOD_DOCS_ONLY(clutter_actor_get_allocation_vertices) 349 void apply_relative_transform_to_point(const Vertex& point, Vertex& vertex) const; 350 _WRAP_METHOD(void get_transformed_position(float& x, float& y) const, clutter_actor_get_transformed_position) 351 352 Matrix get_child_transform() const; 353 _IGNORE(clutter_actor_get_child_transform) 354 355 _WRAP_METHOD(void get_transformed_size(float& width, float& height) const, clutter_actor_get_transformed_size) 356 357 _WRAP_METHOD(void set_request_mode(RequestMode mode), clutter_actor_set_request_mode) 358 _WRAP_METHOD(RequestMode get_request_mode() const, clutter_actor_get_request_mode) 359 360 _WRAP_METHOD(void get_preferred_size(float& min_width_p, float& min_height_p, float& natural_width_p, float& natural_height_p) const, clutter_actor_get_preferred_size) 361 _WRAP_METHOD(void get_preferred_width(float for_height, float& min_width_p, float& natural_width_p) const, clutter_actor_get_preferred_width) 362 _WRAP_METHOD(void get_preferred_height(float for_width, float& min_height_p, float& natural_height_p) const, clutter_actor_get_preferred_height) 363 _WRAP_METHOD(guint8 get_paint_opacity() const, clutter_actor_get_paint_opacity) 364 _WRAP_METHOD(bool get_paint_visibility() const, clutter_actor_get_paint_visibility) 365 _WRAP_METHOD(void move_anchor_point_from_gravity(Gravity gravity), clutter_actor_move_anchor_point_from_gravity, deprecated "Use “pivot-point” instead.") 366 _WRAP_METHOD(void move_anchor_point(float anchor_x, float anchor_y), clutter_actor_move_anchor_point, deprecated "Use “pivot-point” instead.") 367 368// IM: ClutterMargin. 369 _IGNORE(clutter_actor_set_margin, clutter_actor_get_margin) 370 _WRAP_METHOD(void set_margin_top(float margin), clutter_actor_set_margin_top) 371 _WRAP_METHOD(float get_margin_top() const, clutter_actor_get_margin_top) 372 _WRAP_METHOD(void set_margin_bottom(float margin), clutter_actor_set_margin_bottom) 373 _WRAP_METHOD(float get_margin_bottom() const, clutter_actor_get_margin_bottom) 374 _WRAP_METHOD(void set_margin_left(float margin), clutter_actor_set_margin_left) 375 _WRAP_METHOD(float get_margin_left() const, clutter_actor_get_margin_left) 376 _WRAP_METHOD(void set_margin_right(float margin), clutter_actor_set_margin_right) 377 _WRAP_METHOD(float get_margin_right() const, clutter_actor_get_margin_right) 378 /** 379 * Convenience method for setting all margins at once. 380 * 381 * @param top The top margin 382 * @param left the left margin 383 * @param bottom The bottom margin 384 * @param right The right margin. 385 * */ 386 void set_margins(float top, float left, float bottom, float right); 387 388 _WRAP_METHOD(bool get_fixed_position_set() const, clutter_actor_get_fixed_position_set) 389 _WRAP_METHOD(void set_fixed_position_set(bool is_set), clutter_actor_set_fixed_position_set) 390 391_DEPRECATE_IFDEF_START 392 _WRAP_METHOD_DOCS_ONLY(clutter_actor_get_allocation_geometry) 393 /** 394 * @deprecated Use get_allocation_box() instead. 395 */ 396 Geometry get_allocation_geometry() const; 397_DEPRECATE_IFDEF_END 398 399 _WRAP_METHOD(void set_depth(float depth), clutter_actor_set_depth, deprecated "Use set_z_position() instead.) 400 _WRAP_METHOD(float get_depth() const, clutter_actor_get_depth, deprecated "Use get_z_position() instead.") 401 _WRAP_METHOD(void set_scale(double scale_x, double scale_y), clutter_actor_set_scale) 402 _WRAP_METHOD(void set_scale_z(double scale_z), clutter_actor_set_scale_z) 403 _WRAP_METHOD(void set_scale_full(double scale_x, double scale_y, float center_x, float center_y), clutter_actor_set_scale_full, deprecated "Use set_pivot_point() to control the scale center.") 404 _WRAP_METHOD(void set_scale_with_gravity(double scale_x, double scale_y, Gravity gravity), clutter_actor_set_scale_with_gravity, deprecated "Use set_pivot_point() to set the scale center using normalized coordinates instead.") 405 _WRAP_METHOD(void get_scale(double& scale_x, double& scale_y) const, clutter_actor_get_scale) 406 _WRAP_METHOD(double get_scale_z() const, clutter_actor_get_scale_z) 407 _WRAP_METHOD(void get_scale_center(float& center_x, float& center_y) const, clutter_actor_get_scale_center, deprecated "Use get_pivot_point() instead.") 408 _WRAP_METHOD(Gravity get_scale_gravity() const, clutter_actor_get_scale_gravity, deprecated "Use get_pivot_point() instead.") 409 410 //_WRAP_METHOD(void get_abs_size(float& width, float& height) const, clutter_actor_get_abs_size) 411 _WRAP_METHOD(void get_size(float& width, float& height) const, clutter_actor_get_size) 412 _WRAP_METHOD(void move_by(float dx, float dy), clutter_actor_move_by) 413 414 _WRAP_METHOD(bool event(const ClutterEvent* event, bool capture), clutter_actor_event) 415 _WRAP_METHOD(static Glib::RefPtr<Actor> get_actor_by_gid(guint32 id), clutter_get_actor_by_gid, refreturn, deprecated "The ID is no longer used.") 416 417 _WRAP_METHOD(void set_anchor_point(float anchor_x, float anchor_y), clutter_actor_set_anchor_point, deprecated "Use “pivot-point” instead.") 418 _WRAP_METHOD(void get_anchor_point(float& anchor_x, float& anchor_y) const, clutter_actor_get_anchor_point, deprecated "Use “pivot-point” instead.") 419 _WRAP_METHOD(void set_anchor_point_from_gravity(ClutterGravity gravity), clutter_actor_set_anchor_point_from_gravity, deprecated "Use “pivot-point” instead.") 420 _WRAP_METHOD(Gravity get_anchor_point_gravity(), clutter_actor_get_anchor_point_gravity, deprecated "Use “pivot-point” instead.") 421 422 _WRAP_METHOD(void grab_key_focus(), clutter_actor_grab_key_focus) 423 424 _WRAP_METHOD(void add_child(const Glib::RefPtr<Actor>& child), clutter_actor_add_child) 425 _WRAP_METHOD(void insert_child_above(const Glib::RefPtr<Actor>& child, const Glib::RefPtr<Actor>& sibling), clutter_actor_insert_child_above) 426 _WRAP_METHOD(void insert_child_at_index(const Glib::RefPtr<Actor>& child, int index{?}), clutter_actor_insert_child_at_index) 427 _WRAP_METHOD(void insert_child_below(const Glib::RefPtr<Actor>& child, const Glib::RefPtr<Actor>& sibling), clutter_actor_insert_child_below) 428 _WRAP_METHOD(void replace_child(const Glib::RefPtr<Actor>& old_child, const Glib::RefPtr<Actor>& new_child), clutter_actor_replace_child) 429 430 _WRAP_METHOD(void remove_child(const Glib::RefPtr<Actor>& child), clutter_actor_remove_child ) 431 _WRAP_METHOD(void remove_all_children(), clutter_actor_remove_all_children ) 432 433 //deprecated 434 _IGNORE(clutter_actor_animate, clutter_actor_animatev, clutter_actor_animate_with_timelinev, clutter_actor_animate_with_alphav) 435 436 _WRAP_METHOD(Glib::RefPtr<Animation> get_animation(), clutter_actor_get_animation, refreturn, deprecated "Use the implicit transition for animatable properties in ClutterActor instead, and clutter_actor_get_transition() to retrieve the transition.") 437 _WRAP_METHOD(Glib::RefPtr<const Animation> get_animation() const, clutter_actor_get_animation, refreturn, constversion, deprecated "Use the implicit transition for animatable properties in ClutterActor instead, and clutter_actor_get_transition() to retrieve the transition.") 438 439 _WRAP_METHOD(void detach_animation(), clutter_actor_detach_animation) 440 441 442 _WRAP_METHOD(void push_internal(), clutter_actor_push_internal, deprecated "All children of an actor are accessible through the ClutterActor API, and ClutterActor implements the ClutterContainer interface, so this function is only useful for legacy containers overriding the default implementation.") 443 _WRAP_METHOD(void pop_internal(), clutter_actor_pop_internal, deprecated "All children of an actor are accessible through the ClutterActor API. This function is only useful for legacy containers overriding the default implementation of the ClutterContainer interface.") 444 445 _WRAP_METHOD(bool has_allocation() const, clutter_actor_has_allocation) 446 447 _WRAP_METHOD(Glib::RefPtr<Atk::Object> get_accessible(), clutter_actor_get_accessible, refreturn) 448 _WRAP_METHOD(Glib::RefPtr<const Atk::Object> get_accessible() const, clutter_actor_get_accessible, refreturn, constversion) 449 450 _WRAP_METHOD(void add_action(const Glib::RefPtr<Action>& action), clutter_actor_add_action) 451 _WRAP_METHOD(void add_action(const Glib::ustring& name, const Glib::RefPtr<Action>& action), clutter_actor_add_action_with_name) 452 _WRAP_METHOD(void remove_action(const Glib::RefPtr<Action>&action), clutter_actor_remove_action) 453 _WRAP_METHOD(void remove_action(const Glib::ustring& name), clutter_actor_remove_action_by_name) 454 455 _WRAP_METHOD(Glib::RefPtr<Action> get_action(const Glib::ustring& name), clutter_actor_get_action, refreturn) 456 _WRAP_METHOD(Glib::RefPtr<const Action> get_action(const Glib::ustring& name) const, clutter_actor_get_action, refreturn, constversion) 457 458 _WRAP_METHOD(void clear_actions(), clutter_actor_clear_actions) 459 460 #m4 _CONVERSION(`GList*',`std::vector< Glib::RefPtr<Action> >',`Glib::ListHandler< Glib::RefPtr<Action> >::list_to_vector($3, Glib::OWNERSHIP_SHALLOW)') 461 _WRAP_METHOD(std::vector< Glib::RefPtr<Action> > get_actions(), clutter_actor_get_actions) 462 463 #m4 _CONVERSION(`GList*',`std::vector< Glib::RefPtr<const Action> >',`Glib::ListHandler< Glib::RefPtr<const Action> >::list_to_vector($3, Glib::OWNERSHIP_SHALLOW)') 464 _WRAP_METHOD(std::vector< Glib::RefPtr<const Action> > get_actions() const, clutter_actor_get_actions) 465 466 _WRAP_METHOD(bool has_actions() const, clutter_actor_has_actions) 467 468 _WRAP_METHOD(void add_effect(const Glib::RefPtr<Effect>& effect), clutter_actor_add_effect) 469 _WRAP_METHOD(void add_effect_with_name(const Glib::ustring& name, const Glib::RefPtr<Effect>& effect), clutter_actor_add_effect_with_name) 470 _WRAP_METHOD(void remove_effect(const Glib::RefPtr<Effect>& effect), clutter_actor_remove_effect) 471 _WRAP_METHOD(void remove_effect(const Glib::ustring& name), clutter_actor_remove_effect_by_name ) 472 473 #m4 _CONVERSION(`GList*',`std::vector< Glib::RefPtr<Effect> >',`Glib::ListHandler< Glib::RefPtr<Effect> >::list_to_vector($3, Glib::OWNERSHIP_SHALLOW)') 474 _WRAP_METHOD(std::vector< Glib::RefPtr<Effect> > get_effects(), clutter_actor_get_effects) 475 476 #m4 _CONVERSION(`GList*',`std::vector< Glib::RefPtr<const Effect> >',`Glib::ListHandler< Glib::RefPtr<const Effect> >::list_to_vector($3, Glib::OWNERSHIP_SHALLOW)') 477 _WRAP_METHOD(std::vector< Glib::RefPtr<const Effect> > get_effects() const, clutter_actor_get_effects) 478 479 _WRAP_METHOD(Glib::RefPtr<Effect> get_effect(const Glib::ustring& name), clutter_actor_get_effect, refreturn) 480 _WRAP_METHOD(Glib::RefPtr<const Effect> get_effect(const Glib::ustring& name) const, clutter_actor_get_effect, refreturn, constversion) 481 _WRAP_METHOD(void clear_effects(), clutter_actor_clear_effects) 482 _WRAP_METHOD(bool has_effects() const, clutter_actor_has_effects) 483 484 485 //Animation Framework. The Easing state is used for basic animations. 486 487 _WRAP_METHOD(void save_easing_state(), clutter_actor_save_easing_state) 488 _WRAP_METHOD(void restore_easing_state(), clutter_actor_restore_easing_state) 489 _WRAP_METHOD(void set_easing_duration(guint msecs), clutter_actor_set_easing_duration) 490 _WRAP_METHOD(guint get_easing_duration() const, clutter_actor_get_easing_duration) 491 _WRAP_METHOD(AnimationMode get_easing_mode() const, clutter_actor_get_easing_mode) 492 _WRAP_METHOD(void set_easing_mode(AnimationMode mode), clutter_actor_set_easing_mode) 493 _WRAP_METHOD(guint get_easing_delay() const, clutter_actor_get_easing_delay) 494 _WRAP_METHOD(void set_easing_delay(guint msecs), clutter_actor_set_easing_delay) 495 496 // Transitions. Used for more complex animation handling. 497 _WRAP_METHOD(Glib::RefPtr<Transition> get_transition(const Glib::ustring& name), clutter_actor_get_transition) 498 _WRAP_METHOD(Glib::RefPtr<const Transition> get_transition(const Glib::ustring& name) const, clutter_actor_get_transition) 499 500 _WRAP_METHOD(void add_transition(const Glib::ustring& name, const Glib::RefPtr<Transition>& transition), clutter_actor_add_transition) 501 _WRAP_METHOD(void remove_transition(const Glib::ustring& name), clutter_actor_remove_transition) 502 _WRAP_METHOD(void remove_all_transitions(), clutter_actor_remove_all_transitions) 503 504 //Constraints. 505 _WRAP_METHOD(void add_constraint(const Glib::RefPtr<Constraint>& constraint), clutter_actor_add_constraint) 506 _WRAP_METHOD(void add_constraint(const Glib::ustring& name, const Glib::RefPtr<Constraint>& constraint), clutter_actor_add_constraint_with_name ) 507 _WRAP_METHOD(void remove_constraint(const Glib::RefPtr<Constraint>& constraint), clutter_actor_remove_constraint) 508 _WRAP_METHOD(void remove_constraint(const Glib::ustring& name), clutter_actor_remove_constraint_by_name) 509 _WRAP_METHOD(bool has_constraints() const, clutter_actor_has_constraints) 510 511 // Clutter docs: Use g_list_free() when done. 512 #m4 _CONVERSION(`GList*',`std::vector< Glib::RefPtr<Clutter::Constraint> >',`Glib::ListHandler< Glib::RefPtr<Clutter::Constraint> >::list_to_vector($3, Glib::OWNERSHIP_SHALLOW)') 513 _WRAP_METHOD(std::vector< Glib::RefPtr<Clutter::Constraint> > get_constraints(), clutter_actor_get_constraints ) 514 #m4 _CONVERSION(`GList*',`std::vector< Glib::RefPtr<const Clutter::Constraint> >',`Glib::ListHandler< Glib::RefPtr<const Clutter::Constraint> >::list_to_vector($3, Glib::OWNERSHIP_SHALLOW)') 515 _WRAP_METHOD(std::vector< Glib::RefPtr<const Clutter::Constraint> > get_constraints() const, clutter_actor_get_constraints) 516 517 _WRAP_METHOD(Glib::RefPtr<const Constraint> get_constraint(const Glib::ustring& name) const, clutter_actor_get_constraint, refreturn, constversion) 518 _WRAP_METHOD(Glib::RefPtr<Constraint> get_constraint(const Glib::ustring& name), clutter_actor_get_constraint, refreturn) 519 _WRAP_METHOD(void clear_constraints(), clutter_actor_clear_constraints) 520 521 522 523// signals 524 _WRAP_SIGNAL(bool button_press_event(ButtonEvent* event), "button_press_event") 525 _WRAP_SIGNAL(bool button_release_event(ButtonEvent* event), "button_release_event") 526 _WRAP_SIGNAL(bool motion_event(MotionEvent* event), "motion_event") 527 _WRAP_SIGNAL(bool leave_event(CrossingEvent* event), "leave_event") 528 _WRAP_SIGNAL(void show(), "show") 529 _WRAP_SIGNAL(void hide(), "hide") 530 531 //We ignore the destroy signal because it would just encourage strange memory management. 532 _IGNORE_SIGNAL(void destroy(), "destroy") 533 534 _WRAP_SIGNAL(bool key_release_event(KeyEvent* event), "key_release_event") 535 _WRAP_SIGNAL(bool enter_event(CrossingEvent* event), "enter_event") 536 _WRAP_SIGNAL(bool event(Event* event), "event") 537 _WRAP_SIGNAL(void key_focus_out(), "key-focus_out") 538 _WRAP_SIGNAL(void key_focus_in(), "key-focus_in") 539#m4 _CONVERSION(`ClutterActor*', `const Glib::RefPtr<Actor>&', `Glib::wrap(($3),true)') 540 _WRAP_SIGNAL(void parent_set(const Glib::RefPtr<Actor>& old_parent), "parent_set") 541 _WRAP_SIGNAL(bool scroll_event(ScrollEvent* event), "scroll_event") 542 _WRAP_SIGNAL(bool key_press_event(KeyEvent* event), "key_press_event") 543 _WRAP_SIGNAL(bool captured_event(Event* event), "captured_event") 544 545 //We have to actually ignore this signal so we can replace its default signal handler with the vfunc. 546 _IGNORE_SIGNAL("paint") 547 //_WRAP_SIGNAL(void paint(), "paint", deprecated "Override the paint_func(), use a Clutter::Content implementation, or a Clutter::Effect instead of connecting to this signal.") 548 549 _WRAP_SIGNAL(void queue_redaw(const Glib::RefPtr<Actor>& origin), "queue_redraw") 550 _WRAP_SIGNAL(void queue_relayout(), "queue_relayout") 551 _WRAP_SIGNAL(void realize(), "realize") 552 _WRAP_SIGNAL(void unrealize(), "unrealize") 553 554#m4 _CONVERSION(`const ClutterColor*', `const Color&', `Color(const_cast<ClutterColor*>($3), true)') 555 _WRAP_SIGNAL(void pick(const Color& color), "pick") 556 557#m4 _CONVERSION(`ClutterActorBox*', `const ActorBox&', `ActorBox(const_cast<ClutterActorBox*>($3))') 558 _WRAP_SIGNAL(void allocation_changed(const ActorBox& box, AllocationFlags flags), "allocation-changed", no_default_handler) 559 560 //TODO: Wrap ClutterTouchEvent? 561 _WRAP_SIGNAL(bool touch_event(ClutterTouchEvent* event), "touch-event") 562 563 //TODO: There might be a default handler when clutter breaks ABI: 564 _WRAP_SIGNAL(void transitions_completed(), "transitions-completed", no_default_handler) 565 _WRAP_SIGNAL(void transition_stopped(const Glib::ustring& name, bool is_finished), "transition-stopped", no_default_handler) 566 567 _WRAP_PROPERTY("allocation", ActorBox) 568 _WRAP_PROPERTY("anchor-x", float) 569 _WRAP_PROPERTY("anchor-y", float) 570 _WRAP_PROPERTY("anchor-gravity", Gravity) 571 _WRAP_PROPERTY("background-color", Color) 572 _WRAP_PROPERTY("background-color-set", bool) 573 _WRAP_PROPERTY("child-transform", Matrix) 574 _WRAP_PROPERTY("child-transform-set", bool) 575 _WRAP_PROPERTY("clip", Geometry) //TODO: This is marked for removal in clutter. 576 _WRAP_PROPERTY("clip-rect", Rect) 577 _WRAP_PROPERTY("clip-to-allocation", bool) 578 _WRAP_PROPERTY("content", Content) 579 _WRAP_PROPERTY("content-box", ActorBox) 580 _WRAP_PROPERTY("content-gravity", ContentGravity) 581 _WRAP_PROPERTY("content-repeat", ContentRepeat) 582 583 // This property is not wrapped because it is documented in Clutter as adding, instead of just setting, a Constraint. 584 //_WRAP_PROPERTY("constraints", Glib::RefPtr<Constraint>) 585 586 _WRAP_PROPERTY("depth", float) 587 _WRAP_PROPERTY("effect", Glib::RefPtr<Effect>) 588 _WRAP_PROPERTY("first-child", Glib::RefPtr<Actor>) 589 _WRAP_PROPERTY("fixed-position-set", bool) 590 _WRAP_PROPERTY("fixed-x", float) 591 _WRAP_PROPERTY("fixed-y", float) 592 _WRAP_PROPERTY("has-clip", bool) 593 _WRAP_PROPERTY("has-pointer", bool) 594 _WRAP_PROPERTY("height", float) 595 _WRAP_PROPERTY("last-child", Glib::RefPtr<Actor>) 596 _WRAP_PROPERTY("layout-manager", Glib::RefPtr<LayoutManager>) 597 _WRAP_PROPERTY("magnification-filter", ScalingFilter) 598 _WRAP_PROPERTY("mapped", bool) 599 _WRAP_PROPERTY("margin-bottom", float) 600 _WRAP_PROPERTY("margin-left", float) 601 _WRAP_PROPERTY("margin-right", float) 602 _WRAP_PROPERTY("margin-top", float) 603 _WRAP_PROPERTY("minification-filter", ScalingFilter) 604 _WRAP_PROPERTY("min-height", float) 605 _WRAP_PROPERTY("min-height-set", bool) 606 _WRAP_PROPERTY("min-width", float) 607 _WRAP_PROPERTY("min-width-set", bool) 608 _WRAP_PROPERTY("name", Glib::ustring) 609 _WRAP_PROPERTY("natural-height", float) 610 _WRAP_PROPERTY("natural-height-set", bool) 611 _WRAP_PROPERTY("natural-width", float) 612 _WRAP_PROPERTY("natural-width-set", bool) 613 _WRAP_PROPERTY("opacity", guint8) 614 _WRAP_PROPERTY("offscreen-redirect", OffscreenRedirect) 615 _WRAP_PROPERTY("pivot-point", Point) 616 _WRAP_PROPERTY("pivot-point-z", float) 617 _WRAP_PROPERTY("position", Point) 618 _WRAP_PROPERTY("reactive", bool) 619 _WRAP_PROPERTY("realized", bool) 620 _WRAP_PROPERTY("request-mode", RequestMode) 621 _WRAP_PROPERTY("rotation-angle-x", double) 622 _WRAP_PROPERTY("rotation-angle-y", double) 623 _WRAP_PROPERTY("rotation-angle-z", double) 624 _WRAP_PROPERTY("rotation-center-x", Vertex) 625 _WRAP_PROPERTY("rotation-center-y", Vertex) 626 _WRAP_PROPERTY("rotation-center-z", Vertex) 627 _WRAP_PROPERTY("rotation-center-z-gravity", Gravity) 628 _WRAP_PROPERTY("scale-x", double) 629 _WRAP_PROPERTY("scale-y", double) 630 _WRAP_PROPERTY("scale-z", double) 631 _WRAP_PROPERTY("scale-center-x", double) 632 _WRAP_PROPERTY("scale-center-y", double) 633 _WRAP_PROPERTY("scale-gravity", Gravity) 634 _WRAP_PROPERTY("show-on-set-parent", bool) 635 //TODO: _WRAP_PROPERTY("size", Size) 636 _WRAP_PROPERTY("text-direction", TextDirection) 637 _WRAP_PROPERTY("translation_x", float) 638 _WRAP_PROPERTY("translation_y", float) 639 _WRAP_PROPERTY("translation_z", float) 640 _WRAP_PROPERTY("transform", Matrix) 641 _WRAP_PROPERTY("transform-set", bool) 642 _WRAP_PROPERTY("visible", bool) 643 _WRAP_PROPERTY("width", float) 644 _WRAP_PROPERTY("x", float) 645 _WRAP_PROPERTY("x-align", ActorAlign ) 646 _WRAP_PROPERTY("x-expand", bool) 647 _WRAP_PROPERTY("y", float) 648 _WRAP_PROPERTY("y-align", ActorAlign ) 649 _WRAP_PROPERTY("y-expand", bool) 650 _WRAP_PROPERTY("z-position", float) 651 652protected: 653 //TODO: Wrap ClutterShaderEffect. 654 _WRAP_METHOD(void set_shader_param_value(const Glib::ustring& param, const Glib::ValueBase& value), 655 clutter_actor_set_shader_param, deprecated "Use ShaderEffect::set_uniform_value() instead.") 656 657 //TODO: These are deprecated. Remove them when we can break ABI: 658 _WRAP_VFUNC(void show_all(), show_all) 659 _WRAP_VFUNC(void hide_all(), hide_all) 660 661 //The realize and unrealize vfuncs are deprecated. 662 663 _WRAP_VFUNC(void map(), map) 664 _WRAP_VFUNC(void unmap(), unmap) 665 _WRAP_VFUNC(void paint(), paint) 666 667 // TODO: I think we need to hand-code the vfuncs if we need to handle 668 // the float* being NULL. 669 #m4 _CONVERSION(`float*', `float&', `*($3)') 670 #m4 _CONVERSION(`const ClutterActorBox*', `const ActorBox&', `Glib::wrap($3)') 671 _WRAP_VFUNC(void get_preferred_width(float for_height, float& min_width_p, float& natural_width_p) const, get_preferred_width) 672 _WRAP_VFUNC(void get_preferred_height(float for_width, float& min_height_p, float& natural_height_p) const, get_preferred_height) 673 _WRAP_VFUNC(void allocate(const ActorBox& box, AllocationFlags absolute_origin_changed), allocate) 674 675 _WRAP_VFUNC(void pick(const Color& color), pick) 676 677 //TODO: _WRAP_VFUNC(Glib::RefPtr<Gtk::Object> get_accessible(), get_accessible) 678 //TODO: Wrap ClutterPaintVolume? 679 _WRAP_VFUNC(bool get_paint_volume(ClutterPaintVolume* volume), get_paint_volume) 680 681 _WRAP_VFUNC(bool has_overlaps() const, has_overlaps) 682 683 //TODO: Wrap ClutterPaintNode*? 684 _WRAP_VFUNC(void paint_node(ClutterPaintNode* root), paint_node) 685}; 686 687_DEPRECATE_IFDEF_START 688#ifndef DOXYGEN_SHOULD_SKIP_THIS 689template <class ParamType> 690void Actor::set_shader_param(const Glib::ustring& param, const ParamType& value) 691{ 692 Glib::Value<ParamType> param_value; 693 param_value.init(Glib::Value<ParamType>::value_type()); 694 695 param_value.set(value); 696 this->set_shader_param_value(param, param_value); 697} 698#endif /* DOXYGEN_SHOULD_SKIP_THIS */ 699_DEPRECATE_IFDEF_END 700 701} // namespace Clutter 702