gnomemm r1563 - in cluttermm/trunk: . clutter/src examples tools/m4
- From: arminb svn gnome org
- To: svn-commits-list gnome org
- Subject: gnomemm r1563 - in cluttermm/trunk: . clutter/src examples tools/m4
- Date: Sat, 14 Jun 2008 11:52:53 +0000 (UTC)
Author: arminb
Date: Sat Jun 14 11:52:53 2008
New Revision: 1563
URL: http://svn.gnome.org/viewvc/gnomemm?rev=1563&view=rev
Log:
2008-06-14 Armin Burgmeier <armin openismus com>
* clutter/src/clutter_others.defs: Add ClutterMedia signals.
* clutter/src/clutter_vfuncs.defs: Add ClutterActor vfuncs.
* clutter/src/actor.hg:
* clutter/src/actor.ccg: Wrapped properties and vfuncs.
* clutter/src/media.hg: Wrap the get_uri() func correctly, wrap "eos"
signal and properties.
* clutter/src/rectangle.hg:
* clutter/src/rectangle.ccg: Implement get_border_color() (was only
declared, but not implemented), and wrap properties.
* clutter/src/label.hg:
* clutter/src/entry.hg: Wrap properties, fix a typo (get_text <->
set_text).
* clutter/src/types.hg:
* tools/m4/convert_cluttermm.m4: Wrap ClutterRequestMode enum.
* clutter/src/texture.hg: Removed the constructor taking a filename
since loading of the file could fail, and I want to avoid throwing an
error in a constructor. Instead, set_from_file() can be called after
construction. Also wrapped other new methods and properties.
* examples/embed-gtk.cc:
* examples/test-actors.cc: Adapt.
Modified:
cluttermm/trunk/ChangeLog
cluttermm/trunk/clutter/src/actor.ccg
cluttermm/trunk/clutter/src/actor.hg
cluttermm/trunk/clutter/src/clutter_others.defs
cluttermm/trunk/clutter/src/clutter_vfuncs.defs
cluttermm/trunk/clutter/src/entry.hg
cluttermm/trunk/clutter/src/label.hg
cluttermm/trunk/clutter/src/media.hg
cluttermm/trunk/clutter/src/rectangle.ccg
cluttermm/trunk/clutter/src/rectangle.hg
cluttermm/trunk/clutter/src/texture.hg
cluttermm/trunk/clutter/src/types.hg
cluttermm/trunk/examples/embed-gtk.cc
cluttermm/trunk/examples/test-actors.cc
cluttermm/trunk/tools/m4/convert_cluttermm.m4
Modified: cluttermm/trunk/clutter/src/actor.ccg
==============================================================================
--- cluttermm/trunk/clutter/src/actor.ccg (original)
+++ cluttermm/trunk/clutter/src/actor.ccg Sat Jun 14 11:52:53 2008
@@ -76,5 +76,64 @@
return geom;
}
+// We need to hand-code this vfunc to write the result back into the
+// box variable. The C++ wrapper cannot ref the existing variable, but only
+// make a copy.
+void Actor_Class::get_paint_area_vfunc_callback(ClutterActor* self, ClutterActorBox* box)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ #ifdef GLIBMM_EXCEPTIONS_ENABLED
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ #endif //GLIBMM_EXCEPTIONS_ENABLED
+ // Call the virtual member method, which derived classes might override.
+ ActorBox cpp_box;
+ obj->get_paint_area_vfunc(cpp_box);
+ *box = *cpp_box.gobj();
+ #ifdef GLIBMM_EXCEPTIONS_ENABLED
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ #endif //GLIBMM_EXCEPTIONS_ENABLED
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->get_paint_area)
+ (*base->get_paint_area)(self, box);
+ }
+}
+
+void Actor::get_paint_area_vfunc(ActorBox& box) const
+{
+ //Call the default C implementation:
+
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+ )
+ );
+
+ if(base && base->get_paint_area)
+ (*base->get_paint_area)(const_cast<ClutterActor*>(gobj()), box.gobj());
+}
+
+
} //namespace Clutter
Modified: cluttermm/trunk/clutter/src/actor.hg
==============================================================================
--- cluttermm/trunk/clutter/src/actor.hg (original)
+++ cluttermm/trunk/clutter/src/actor.hg Sat Jun 14 11:52:53 2008
@@ -231,11 +231,69 @@
_WRAP_SIGNAL(void realize(), "realize")
_WRAP_SIGNAL(void unrealize(), "unrealize")
+ _WRAP_PROPERTY("allocation", ActorBox)
+ _WRAP_PROPERTY("anchor-x", int)
+ _WRAP_PROPERTY("anchor-y", int)
+ _WRAP_PROPERTY("clip", Geometry)
+ _WRAP_PROPERTY("depth", int)
+ _WRAP_PROPERTY("fixed-position-set", bool)
+ _WRAP_PROPERTY("fixed-x", Unit)
+ _WRAP_PROPERTY("fixed-y", Unit)
+ _WRAP_PROPERTY("has-clip", bool)
+ _WRAP_PROPERTY("height", int)
+ _WRAP_PROPERTY("min-height", Unit)
+ _WRAP_PROPERTY("min-height-set", bool)
+ _WRAP_PROPERTY("min-width", Unit)
+ _WRAP_PROPERTY("min-width-set", bool)
+ _WRAP_PROPERTY("opacity", guint8)
+ _WRAP_PROPERTY("reactive", bool)
+ _WRAP_PROPERTY("request-mode", RequestMode)
+ _WRAP_PROPERTY("rotation-angle-x", double)
+ _WRAP_PROPERTY("rotation-angle-y", double)
+ _WRAP_PROPERTY("rotation-angle-z", double)
+ _WRAP_PROPERTY("rotation-center-x", Vertex)
+ _WRAP_PROPERTY("rotation-center-y", Vertex)
+ _WRAP_PROPERTY("rotation-center-z", Vertex)
+ _WRAP_PROPERTY("scale-x", double)
+ _WRAP_PROPERTY("scale-y", double)
+ _WRAP_PROPERTY("show-on-set-parent", bool)
+ _WRAP_PROPERTY("visible", bool)
+ _WRAP_PROPERTY("width", int)
+ _WRAP_PROPERTY("x", int)
+ _WRAP_PROPERTY("y", int)
+
protected:
// according to the clutter docs, these functions should never be called
// directly and are only for subclasses
_WRAP_METHOD(void pick(const Color& color), clutter_actor_pick)
_WRAP_METHOD(bool should_pick_paint() const, clutter_actor_should_pick_paint)
+
+ _WRAP_VFUNC(void show_all(), "show_all")
+ _WRAP_VFUNC(void hide_all(), "hide_all")
+
+ #m4 _CONVERSION(`const ClutterColor*', `const Color&', `Color(const_cast<ClutterColor*>($3), true)')
+ // TODO: I think we need to hand-code the vfuncs if we need to handle
+ // the ClutterUnit* being NULL.
+ #m4 _CONVERSION(`ClutterUnit*', `Unit&', `*($3)')
+ #m4 _CONVERSION(`const ClutterActorBox*', `const ActorBox&', `Glib::wrap($3)')
+ _WRAP_VFUNC(void pick(const Color& color), "pick")
+ _WRAP_VFUNC(void get_preferred_width(Unit for_height, Unit& min_width_p, Unit& natural_width_p) const, "get_preferred_width")
+ _WRAP_VFUNC(void get_preferred_height(Unit for_width, Unit& min_height_p, Unit& natural_height_p) const, "get_preferred_height")
+ _WRAP_VFUNC(void allocate(const ActorBox& box, bool absolute_origin_changed), "allocate")
+
+#ifdef GLIBMM_VFUNCS_ENABLED
+ // Hand code, since ActorBox can only copy a ClutterActorBox* but not ref one.
+ virtual void get_paint_area_vfunc(ActorBox& box) const;
+ //_WRAP_VFUNC(void get_paint_area(ActorBox& box), "get_paint_area")
+#endif
+
+#m4begin
+ _PUSH(SECTION_PCC_CLASS_INIT_VFUNCS)
+ klass->get_paint_area = &get_paint_area_vfunc_callback;
+ _SECTION(SECTION_PH_VFUNCS)
+ static void get_paint_area_vfunc_callback(ClutterActor* self, ClutterActorBox* box);
+ _POP()
+#m4end
};
} // namespace Clutter
Modified: cluttermm/trunk/clutter/src/clutter_others.defs
==============================================================================
--- cluttermm/trunk/clutter/src/clutter_others.defs (original)
+++ cluttermm/trunk/clutter/src/clutter_others.defs Sat Jun 14 11:52:53 2008
@@ -1,47 +1,18 @@
; This file is written by hand because we can't instantiate interfaces:
-(define-property can-focus
- (of-object "GooCanvasItem")
- (prop-type "GParamBoolean")
- (docs "If the item can take the keyboard focus")
- (readable #t)
- (writable #t)
- (construct-only #f)
-)
-
-(define-property visibility
- (of-object "GooCanvasItem")
- (prop-type "GParamEnum")
- (docs "When the canvas item is visible")
- (readable #t)
- (writable #t)
- (construct-only #f)
-)
+; ClutterMedia
-(define-property description
- (of-object "GooCanvasItem")
- (prop-type "GParamString")
- (docs "A description of the item for use by assistive technologies")
- (readable #t)
- (writable #t)
- (construct-only #f)
+(define-signal eos
+ (of-object "ClutterMedia")
+ (return-type "void")
+ (when "last")
)
-(define-property visibility-threshold
- (of-object "GooCanvasItem")
- (prop-type "GParamDouble")
- (docs "The scale threshold at which the item becomes visible")
- (readable #t)
- (writable #t)
- (construct-only #f)
+(define-signal error
+ (of-object "ClutterMedia")
+ (return-type "void")
+ (when "last")
+ (parameters
+ '("GError*" "error")
+ )
)
-
-(define-property pointer-events
- (of-object "GooCanvasItem")
- (prop-type "GParamFlags")
- (docs "Specifies when the item receives pointer events")
- (readable #t)
- (writable #t)
- (construct-only #f)
-)
-
Modified: cluttermm/trunk/clutter/src/clutter_vfuncs.defs
==============================================================================
--- cluttermm/trunk/clutter/src/clutter_vfuncs.defs (original)
+++ cluttermm/trunk/clutter/src/clutter_vfuncs.defs Sat Jun 14 11:52:53 2008
@@ -184,3 +184,59 @@
)
)
+; ClutterActor
+
+(define-vfunc show_all
+ (of-object "ClutterActor")
+ (return-type "void")
+)
+
+(define-vfunc hide_all
+ (of-object "ClutterActor")
+ (return-type "void")
+)
+
+(define-vfunc pick
+ (of-object "ClutterActor")
+ (return-type "void")
+ (parameters
+ '("const-ClutterColor*" "color")
+ )
+)
+
+(define-vfunc get_preferred_width
+ (of-object "ClutterActor")
+ (return-type "void")
+ (parameters
+ '("ClutterUnit" "for_height")
+ '("ClutterUnit*" "min_width_p")
+ '("ClutterUnit*" "natural_width_p")
+ )
+)
+
+(define-vfunc get_preferred_height
+ (of-object "ClutterActor")
+ (return-type "void")
+ (parameters
+ '("ClutterUnit" "for_width")
+ '("ClutterUnit*" "min_height_p")
+ '("ClutterUnit*" "natural_height_p")
+ )
+)
+
+(define-vfunc allocate
+ (of-object "ClutterActor")
+ (return-type "void")
+ (parameters
+ '("const-ClutterActorBox*" "box")
+ '("gboolean" "absolute_origin_changed")
+ )
+)
+
+(define-vfunc get_paint_area
+ (of-object "ClutterActor")
+ (return-type "void")
+ (parameters
+ '("ClutterActorBox*" "box")
+ )
+)
Modified: cluttermm/trunk/clutter/src/entry.hg
==============================================================================
--- cluttermm/trunk/clutter/src/entry.hg (original)
+++ cluttermm/trunk/clutter/src/entry.hg Sat Jun 14 11:52:53 2008
@@ -44,7 +44,7 @@
#m4 _CONVERSION(`ClutterActor*',`Glib::RefPtr<Entry>',`Glib::wrap((ClutterEntry*)$3)')
_WRAP_METHOD(void set_text(const Glib::ustring& text), clutter_entry_set_text)
- _WRAP_METHOD(Glib::ustring set_text() const, clutter_entry_get_text)
+ _WRAP_METHOD(Glib::ustring get_text() const, clutter_entry_get_text)
_WRAP_METHOD(void set_font_name(const Glib::ustring& font_name), clutter_entry_set_font_name)
_WRAP_METHOD(Glib::ustring get_font_name() const, clutter_entry_get_font_name)
@@ -82,11 +82,23 @@
_WRAP_METHOD(void handle_key_event(KeyEvent* kev), clutter_entry_handle_key_event)
+#m4 _CONVERSION(`ClutterGeometry*', `const Geometry&', `Glib::wrap($3)')
+#m4 _CONVERSION(`const Geometry&', `ClutterGeometry*', `const_cast<ClutterGeometry*>(($3).gobj())')
_WRAP_SIGNAL(void text_changed(), "text_changed")
- // TODO: wrap Geometry
- _WRAP_SIGNAL(void cursor_event(ClutterGeometry* geometry), "cursor_event")
+ _WRAP_SIGNAL(void cursor_event(const Geometry& geometry), "cursor_event")
_WRAP_SIGNAL(void activate(), "activate")
+ _WRAP_PROPERTY("alignment", Pango::Alignment)
+ _WRAP_PROPERTY("color", Color)
+ _WRAP_PROPERTY("cursor-visible", bool)
+ _WRAP_PROPERTY("entry-padding", unsigned int)
+ _WRAP_PROPERTY("font-name", Glib::ustring)
+ _WRAP_PROPERTY("max-length", int)
+ _WRAP_PROPERTY("position", int)
+ _WRAP_PROPERTY("text", Glib::ustring)
+ _WRAP_PROPERTY("text-visible", bool)
+ _WRAP_PROPERTY("x-align", double)
+
protected:
_WRAP_VFUNC(void paint_cursor(), paint_cursor)
};
Modified: cluttermm/trunk/clutter/src/label.hg
==============================================================================
--- cluttermm/trunk/clutter/src/label.hg (original)
+++ cluttermm/trunk/clutter/src/label.hg Sat Jun 14 11:52:53 2008
@@ -44,7 +44,7 @@
#m4 _CONVERSION(`ClutterActor*',`Glib::RefPtr<Label>',`Glib::wrap((ClutterLabel*)$3)')
_WRAP_METHOD(void set_text(const Glib::ustring& text), clutter_label_set_text)
- _WRAP_METHOD(Glib::ustring set_text() const, clutter_label_get_text)
+ _WRAP_METHOD(Glib::ustring get_text() const, clutter_label_get_text)
_WRAP_METHOD(void set_font_name(const Glib::ustring& font_name), clutter_label_set_font_name)
_WRAP_METHOD(Glib::ustring get_font_name() const, clutter_label_get_font_name)
@@ -79,6 +79,17 @@
_WRAP_METHOD(bool get_justify() const, clutter_label_get_justify)
_WRAP_METHOD(void set_justify(bool justify), clutter_label_set_justify)
+
+ _WRAP_PROPERTY("alignment", Pango::Alignment)
+ _WRAP_PROPERTY("attributes", Pango::AttrList)
+ _WRAP_PROPERTY("color", Color)
+ _WRAP_PROPERTY("ellipsize", Pango::EllipsizeMode)
+ _WRAP_PROPERTY("font-name", Glib::ustring)
+ _WRAP_PROPERTY("justify", bool)
+ _WRAP_PROPERTY("text", Glib::ustring)
+ _WRAP_PROPERTY("use-markup", bool)
+ _WRAP_PROPERTY("wrap", bool)
+ _WRAP_PROPERTY("wrap-mode", Pango::WrapMode)
};
} // namespace Clutter
Modified: cluttermm/trunk/clutter/src/media.hg
==============================================================================
--- cluttermm/trunk/clutter/src/media.hg (original)
+++ cluttermm/trunk/clutter/src/media.hg Sat Jun 14 11:52:53 2008
@@ -46,19 +46,32 @@
_WRAP_METHOD(int get_duration() const, clutter_media_get_duration)
- // TODO: these aren't in the signals.defs file yet
- //_WRAP_SIGNAL(void eos(), "eos")
+ _WRAP_SIGNAL(void eos(), "eos")
// TODO: figure out what to do with this GError parameter
//_WRAP_SIGNAL(void error(GError* error), "error")
+ _WRAP_PROPERTY("buffer-percent", int)
+ _WRAP_PROPERTY("can-seek", bool)
+ _WRAP_PROPERTY("duration", int)
+ _WRAP_PROPERTY("playing", bool)
+ _WRAP_PROPERTY("position", int)
+ _WRAP_PROPERTY("uri", Glib::ustring)
+ _WRAP_PROPERTY("volume", double)
+
protected:
#m4 _CONVERSION(`const char*',`const Glib::ustring&',__GCHARP_TO_USTRING)
_WRAP_VFUNC(void set_uri(const Glib::ustring& uri), set_uri)
- // TODO: error "No conversion from Glib::ustring to const char* defined", even
- // though it works above in get_uri
- //_WRAP_VFUNC(Glib::ustring get_uri() const, get_uri)
+ // Note: We cannot return a Glib::ustring here since the C API expects a
+ // const gchar* as return value. const gchar* however means that the returned
+ // value is not supposed to be freed by the caller. If we would want to return
+ // Glib::ustring here, what should we pass to the underlying C API then?
+ // ustring.c_str() doesn't work since the ustring destroys the data upon
+ // destruction (which means, we would effectively return an invalid pointer).
+ // We also can't copy the ustring's content since we would leak that copy
+ // otherwise.
+ _WRAP_VFUNC(const char* get_uri() const, get_uri)
_WRAP_VFUNC(void set_playing(bool playing), set_playing)
_WRAP_VFUNC(bool get_playing() const, get_playing)
_WRAP_VFUNC(void set_position(int position), set_position)
Modified: cluttermm/trunk/clutter/src/rectangle.ccg
==============================================================================
--- cluttermm/trunk/clutter/src/rectangle.ccg (original)
+++ cluttermm/trunk/clutter/src/rectangle.ccg Sat Jun 14 11:52:53 2008
@@ -22,9 +22,16 @@
Color Rectangle::get_color() const
{
- Color color;
- clutter_rectangle_get_color(const_cast<ClutterRectangle*>(gobj()), color.gobj());
- return color;
+ Color color;
+ clutter_rectangle_get_color(const_cast<ClutterRectangle*>(gobj()), color.gobj());
+ return color;
+}
+
+Color Rectangle::get_border_color() const
+{
+ Color color;
+ clutter_rectangle_get_border_color(const_cast<ClutterRectangle*>(gobj()), color.gobj());
+ return color;
}
} //namespace Clutter
Modified: cluttermm/trunk/clutter/src/rectangle.hg
==============================================================================
--- cluttermm/trunk/clutter/src/rectangle.hg (original)
+++ cluttermm/trunk/clutter/src/rectangle.hg Sat Jun 14 11:52:53 2008
@@ -42,17 +42,19 @@
_WRAP_METHOD_DOCS_ONLY(clutter_rectangle_get_color)
Color get_color() const;
- _IGNORE(clutter_rectangle_get_color)
_WRAP_METHOD(void set_color(const Color& color), clutter_rectangle_set_color)
_WRAP_METHOD_DOCS_ONLY(clutter_rectangle_get_border_color)
Color get_border_color() const;
- _IGNORE(clutter_rectangle_get_border_color)
_WRAP_METHOD(void set_border_color(const Color& color), clutter_rectangle_set_border_color)
_WRAP_METHOD(guint get_border_width() const, clutter_rectangle_get_border_width)
_WRAP_METHOD(void set_border_width(guint width), clutter_rectangle_set_border_width)
+ _WRAP_PROPERTY("border-color", Color)
+ _WRAP_PROPERTY("border-width", unsigned int)
+ _WRAP_PROPERTY("color", Color)
+ _WRAP_PROPERTY("has-border", bool)
};
} // namespace Clutter
Modified: cluttermm/trunk/clutter/src/texture.hg
==============================================================================
--- cluttermm/trunk/clutter/src/texture.hg (original)
+++ cluttermm/trunk/clutter/src/texture.hg Sat Jun 14 11:52:53 2008
@@ -18,6 +18,7 @@
#include <cluttermm/actor.h>
#include <cluttermm/types.h>
#include <gdkmm/pixbuf.h>
+#include <clutter/clutter-texture.h> // For CoglHandle
_DEFS(cluttermm,clutter)
_PINCLUDE(cluttermm/private/actor_p.h)
@@ -27,6 +28,7 @@
{
_WRAP_ENUM(TextureFlags, ClutterTextureFlags, NO_GTYPE)
+_WRAP_ENUM(TextureQuality, ClutterTextureQuality, NO_GTYPE)
/** Exception class for Clutter::Texture errors.
*/
@@ -39,22 +41,50 @@
protected:
_CTOR_DEFAULT()
- _WRAP_CTOR(Texture(const Glib::ustring& filename), clutter_texture_new_from_file)
- _WRAP_CTOR(Texture(const Glib::RefPtr<Actor>& actor), clutter_texture_new_from_actor)
+ // We do not wrap this constructor because it might throw an error. This
+ // gets difficult to get right especially for disabled exceptions in glibmm,
+ // and it is easy enough to create a texture and call set_from_file() on
+ // it manually:
+ _IGNORE(clutter_texture_new_from_file)
+
+ // TODO: Wrap clutter_texture_new_from_actor. This needs changes in clutter
+ // since the _new function does a lot more than calling g_object_new().
+ //_WRAP_CTOR(Texture(const Glib::RefPtr<Actor>& actor), clutter_texture_new_from_actor)
public:
#m4 _CONVERSION(`ClutterActor*',`Glib::RefPtr<Texture>',`Glib::wrap((ClutterTexture*)$3)')
_WRAP_CREATE()
- _WRAP_CREATE(const Glib::ustring& filename);
- _WRAP_CREATE(const Glib::RefPtr<Actor>& actor);
+ //_WRAP_CREATE(const Glib::ustring& filename);
+ //_WRAP_CREATE(const Glib::RefPtr<Actor>& actor);
- _WRAP_METHOD(void get_base_size(gint& width, gint& height) const, clutter_texture_get_base_size)
+ _WRAP_METHOD(bool set_from_file(const Glib::ustring& filename), clutter_texture_set_from_file, errthrow)
_WRAP_METHOD(bool set_from_rgb_data(const guchar* data, bool has_alpha, int width, int height, int rowstride, int bpp, TextureFlags flags), clutter_texture_set_from_rgb_data, errthrow)
_WRAP_METHOD(bool set_from_yuv_data(const guchar* data, int width, int height, TextureFlags flags), clutter_texture_set_from_yuv_data, errthrow)
+ _WRAP_METHOD(bool set_area_from_rgb_data(const guchar* data, bool has_alpha, int x, int y, int width, int height, int rowstride, int bpp, TextureFlags flags), clutter_texture_set_area_from_rgb_data, errthrow)
+ _WRAP_METHOD(void get_base_size(gint& width, gint& height) const, clutter_texture_get_base_size)
+
+ _WRAP_METHOD(TextureQuality get_filter_quality() const, clutter_texture_get_filter_quality)
+ _WRAP_METHOD(void set_filter_quality(TextureQuality filter_quality), clutter_texture_set_filter_quality)
+ _WRAP_METHOD(int get_amx_tile_waste() const, clutter_texture_get_max_tile_waste)
+ _WRAP_METHOD(void set_max_tile_waste(int max_tile_waste), clutter_texture_set_max_tile_waste)
+
+ // TODO: Is there a coglmm we could depend on for this?
+ _WRAP_METHOD(CoglHandle get_cogl_texture() const, clutter_texture_get_cogl_texture)
+ _WRAP_METHOD(void set_cogl_texture(CoglHandle handle), clutter_texture_set_cogl_texture)
_WRAP_SIGNAL(void size_change(gint width, gint height), "size_change")
_WRAP_SIGNAL(void pixbuf_change(), "pixbuf_change")
+
+ _WRAP_PROPERTY("cogl-texture", CoglHandle)
+ _WRAP_PROPERTY("disable-slicing", bool)
+ _WRAP_PROPERTY("filename", Glib::ustring)
+ _WRAP_PROPERTY("filter-quality", TextureQuality)
+ _WRAP_PROPERTY("pixel-format", int)
+ _WRAP_PROPERTY("repeat-x", bool)
+ _WRAP_PROPERTY("repeat-y", bool)
+ _WRAP_PROPERTY("sync-size", bool)
+ _WRAP_PROPERTY("tile-waste", int)
};
} // namespace Clutter
Modified: cluttermm/trunk/clutter/src/types.hg
==============================================================================
--- cluttermm/trunk/clutter/src/types.hg (original)
+++ cluttermm/trunk/clutter/src/types.hg Sat Jun 14 11:52:53 2008
@@ -33,6 +33,7 @@
_WRAP_ENUM(RotateDirection, ClutterRotateDirection, NO_GTYPE)
_WRAP_ENUM(RotateAxis, ClutterRotateAxis, NO_GTYPE)
_WRAP_ENUM(Gravity, ClutterGravity, NO_GTYPE)
+_WRAP_ENUM(RequestMode, ClutterRequestMode, NO_GTYPE)
class Vertex
{
Modified: cluttermm/trunk/examples/embed-gtk.cc
==============================================================================
--- cluttermm/trunk/examples/embed-gtk.cc (original)
+++ cluttermm/trunk/examples/embed-gtk.cc Sat Jun 14 11:52:53 2008
@@ -30,7 +30,8 @@
Clutter::Gtk::Embed embed;
- Glib::RefPtr<Clutter::Texture> texture = Clutter::Texture::create("actor.png");
+ Glib::RefPtr<Clutter::Texture> texture = Clutter::Texture::create();
+ texture->set_from_file("actor.png");
texture->set_opacity(50);
label = Clutter::Label::create("Sans 10", "Enter some text in the Entry and click 'Apply' to update this text!");
Modified: cluttermm/trunk/examples/test-actors.cc
==============================================================================
--- cluttermm/trunk/examples/test-actors.cc (original)
+++ cluttermm/trunk/examples/test-actors.cc Sat Jun 14 11:52:53 2008
@@ -194,10 +194,12 @@
gint x, y, w, h;
gint radius = get_radius ();
- // Create a texture from pixbuf, then clone it to save resources
+ // Create a texture from file, then clone it to save resources
if (i == 0)
{
- oh->hands.push_back (Clutter::Texture::create ("actor.png"));
+ Glib::RefPtr<Clutter::Texture> texture(Clutter::Texture::create());
+ texture->set_from_file("actor.png");
+ oh->hands.push_back (texture);
}
else
{
Modified: cluttermm/trunk/tools/m4/convert_cluttermm.m4
==============================================================================
--- cluttermm/trunk/tools/m4/convert_cluttermm.m4 (original)
+++ cluttermm/trunk/tools/m4/convert_cluttermm.m4 Sat Jun 14 11:52:53 2008
@@ -65,6 +65,7 @@
_CONV_ENUM(Clutter,RotateAxis)
_CONV_ENUM(Clutter,Gravity)
_CONV_ENUM(Clutter,TimelineDirection)
+_CONV_ENUM(Clutter,TextureQuality)
_CONV_ENUM(Pango,EllipsizeMode)
_CONV_ENUM(Pango,WrapMode)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]