Index: clutter/gapi/clutter.metadata =================================================================== --- clutter/gapi/clutter.metadata (revision 1158) +++ clutter/gapi/clutter.metadata (working copy) @@ -5,22 +5,22 @@ HideEvent DestroyEvent + + ApplyEvent + RemoveEvent + - GetXPosition - GetYPosition - GetTime + GetButton AddEvent RemoveEvent - - GetTime - - + ClutterStage* + Index: clutter/gapi/clutter-sources.xml =================================================================== --- clutter/gapi/clutter-sources.xml (revision 1158) +++ clutter/gapi/clutter-sources.xml (working copy) @@ -2,7 +2,8 @@ - @clutterincludedir@/clutter + + ../../../../clutter-0.3/clutter Index: clutter/gapi/clutter-sources.xml.in =================================================================== --- clutter/gapi/clutter-sources.xml.in (revision 1158) +++ clutter/gapi/clutter-sources.xml.in (working copy) @@ -1,10 +0,0 @@ - - - - - @clutterincludedir@/clutter - - - - - Index: clutter/gapi/Makefile.am =================================================================== --- clutter/gapi/Makefile.am (revision 1158) +++ clutter/gapi/Makefile.am (working copy) @@ -10,14 +10,7 @@ gapidir = $(datadir)/gapi-2.0 gapi_DATA = $(CLUTTER_FIXED_API) -clutterincludedir = $(includedir)/clutter-0.2 - -$(SOURCES_XML): clutter-sources.xml.in - @sed \ - -e "s|@clutterincludedir@|$(clutterincludedir)|" \ - $< > $(@F) - -CLEANFILES = $(SOURCES_XML) $(CLUTTER_RAW_API) $(CLUTTER_FIXED_API) +CLEANFILES = $(CLUTTER_RAW_API) $(CLUTTER_FIXED_API) DISTCLEANFILES = Makefile.in EXTRA_DIST = $(SOURCES_XML) $(CLUTTER_METADATA) Index: clutter/configure.ac =================================================================== --- clutter/configure.ac (revision 1158) +++ clutter/configure.ac (working copy) @@ -1,7 +1,7 @@ AC_INIT(README) AC_CANONICAL_SYSTEM -AM_INIT_AUTOMAKE(clutter-sharp, 0.1.0) +AM_INIT_AUTOMAKE(clutter-sharp, 0.3.0) AM_MAINTAINER_MODE @@ -53,8 +53,14 @@ PKG_CHECK_MODULES(GTKSHARP, gtk-sharp-2.0 > 2.3.92) AC_SUBST(GTKSHARP_LIBS) -PKG_CHECK_MODULES(CLUTTER, clutter-0.2 >= 0.2.0) +PKG_CHECK_MODULES(CLUTTER, clutter-0.3 >= 0.3.1) +CLUTTER_APIVERSION=$(pkg-config --variable=backend clutter-0.3) +CLUTTER_BACKEND=$(pkg-config --variable=apiversion clutter-0.3) + +AC_SUBST(CLUTTER_APIVERSION) +AC_SUBST(CLUTTER_BACKEND) + AC_OUTPUT([ Makefile clutter-sharp.pc Index: clutter/src/ButtonEvent.cs =================================================================== --- clutter/src/ButtonEvent.cs (revision 1158) +++ clutter/src/ButtonEvent.cs (working copy) @@ -15,7 +15,7 @@ public uint Time; public int X; public int Y; - public uint ModifierState; + public Clutter.ModifierType ModifierState; public uint Button; private IntPtr _axes; private IntPtr _device; @@ -39,28 +39,6 @@ return self; } - [DllImport("clutter")] - static extern int clutter_button_event_x(ref Clutter.ButtonEvent raw); - - public int XPosition { - get { - int raw_ret = clutter_button_event_x(ref this); - int ret = raw_ret; - return ret; - } - } - - [DllImport("clutter")] - static extern int clutter_button_event_y(ref Clutter.ButtonEvent raw); - - public int YPosition { - get { - int raw_ret = clutter_button_event_y(ref this); - int ret = raw_ret; - return ret; - } - } - private static GLib.GType GType { get { return GLib.GType.Pointer; } } Index: clutter/src/Color.cs =================================================================== --- clutter/src/Color.cs (revision 1158) +++ clutter/src/Color.cs (working copy) @@ -42,6 +42,13 @@ } [DllImport("clutter")] + static extern void clutter_color_to_hlsx(ref Clutter.Color raw, out int hue, out int luminance, out int saturation); + + public void ToHlsx(out int hue, out int luminance, out int saturation) { + clutter_color_to_hlsx(ref this, out hue, out luminance, out saturation); + } + + [DllImport("clutter")] static extern IntPtr clutter_color_to_string(ref Clutter.Color raw); public override string ToString() { @@ -90,6 +97,13 @@ } [DllImport("clutter")] + static extern void clutter_color_from_hlsx(ref Clutter.Color raw, int hue, int luminance, int saturation); + + public void FromHlsx(int hue, int luminance, int saturation) { + clutter_color_from_hlsx(ref this, hue, luminance, saturation); + } + + [DllImport("clutter")] static extern void clutter_color_subtract(ref Clutter.Color raw, ref Clutter.Color src2, ref Clutter.Color dest); public void Subtract(Clutter.Color src2, Clutter.Color dest) { Index: clutter/src/DebugFlag.cs =================================================================== --- clutter/src/DebugFlag.cs (revision 1158) +++ clutter/src/DebugFlag.cs (working copy) @@ -19,6 +19,8 @@ Alpha = 1 << 6, Behaviour = 1 << 7, Pango = 1 << 8, + Backend = 1 << 9, + Scheduler = 1 << 10, } #endregion } Index: clutter/src/ActorBox.cs =================================================================== --- clutter/src/ActorBox.cs (revision 1158) +++ clutter/src/ActorBox.cs (working copy) @@ -8,8 +8,25 @@ using System.Runtime.InteropServices; #region Autogenerated code - public class ActorBox : GLib.Opaque { + [StructLayout(LayoutKind.Sequential)] + public struct ActorBox { + public int X1; + public int Y1; + public int X2; + public int Y2; + + public static Clutter.ActorBox Zero = new Clutter.ActorBox (); + + public static Clutter.ActorBox New(IntPtr raw) { + if (raw == IntPtr.Zero) { + return Clutter.ActorBox.Zero; + } + Clutter.ActorBox self = new Clutter.ActorBox(); + self = (Clutter.ActorBox) Marshal.PtrToStructure (raw, self.GetType ()); + return self; + } + [DllImport("clutter")] static extern IntPtr clutter_actor_box_get_type(); @@ -21,8 +38,25 @@ } } - public ActorBox(IntPtr raw) : base(raw) {} + [DllImport("glibsharpglue-2")] + static extern IntPtr glibsharp_value_get_boxed (ref GLib.Value val); + [DllImport("glibsharpglue-2")] + static extern void glibsharp_value_set_boxed (ref GLib.Value val, ref Clutter.ActorBox boxed); + + public static explicit operator GLib.Value (Clutter.ActorBox boxed) + { + GLib.Value val = GLib.Value.Empty; + val.Init (Clutter.ActorBox.GType); + glibsharp_value_set_boxed (ref val, ref boxed); + return val; + } + + public static explicit operator Clutter.ActorBox (GLib.Value val) + { + IntPtr boxed_ptr = glibsharp_value_get_boxed (ref val); + return New (boxed_ptr); + } #endregion } } Index: clutter/src/EventType.cs =================================================================== --- clutter/src/EventType.cs (revision 1158) +++ clutter/src/EventType.cs (working copy) @@ -16,7 +16,13 @@ Motion, ButtonPress, TwoButtonPress, + ThreeButtonPress, ButtonRelease, + Scroll, + StageState, + DestroyNotify, + ClientMessage, + Delete, } internal class EventTypeGType { Index: clutter/src/ClutterSharp.EffectCompleteFuncNative.cs =================================================================== --- clutter/src/ClutterSharp.EffectCompleteFuncNative.cs (revision 0) +++ clutter/src/ClutterSharp.EffectCompleteFuncNative.cs (revision 0) @@ -0,0 +1,41 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace ClutterSharp { + + using System; + +#region Autogenerated code + [GLib.CDeclCallback] + internal delegate void EffectCompleteFuncNative(IntPtr actor, IntPtr user_data); + + internal class EffectCompleteFuncWrapper { + + public void NativeCallback (IntPtr actor, IntPtr user_data) + { + Clutter.Actor _arg0 = GLib.Object.GetObject(actor) as Clutter.Actor; + managed ( _arg0); + } + + internal EffectCompleteFuncNative NativeDelegate; + Clutter.EffectCompleteFunc managed; + + public EffectCompleteFuncWrapper (Clutter.EffectCompleteFunc managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new EffectCompleteFuncNative (NativeCallback); + } + + public static Clutter.EffectCompleteFunc GetManagedDelegate (EffectCompleteFuncNative native) + { + if (native == null) + return null; + EffectCompleteFuncWrapper wrapper = (EffectCompleteFuncWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} Index: clutter/src/Perspective.cs =================================================================== --- clutter/src/Perspective.cs (revision 0) +++ clutter/src/Perspective.cs (revision 0) @@ -0,0 +1,62 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Clutter { + + using System; + using System.Collections; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public struct Perspective { + + public int Fovy; + public int Aspect; + public int ZNear; + public int ZFar; + + public static Clutter.Perspective Zero = new Clutter.Perspective (); + + public static Clutter.Perspective New(IntPtr raw) { + if (raw == IntPtr.Zero) { + return Clutter.Perspective.Zero; + } + Clutter.Perspective self = new Clutter.Perspective(); + self = (Clutter.Perspective) Marshal.PtrToStructure (raw, self.GetType ()); + return self; + } + + [DllImport("clutter")] + static extern IntPtr clutter_perspective_get_type(); + + public static GLib.GType GType { + get { + IntPtr raw_ret = clutter_perspective_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("glibsharpglue-2")] + static extern IntPtr glibsharp_value_get_boxed (ref GLib.Value val); + + [DllImport("glibsharpglue-2")] + static extern void glibsharp_value_set_boxed (ref GLib.Value val, ref Clutter.Perspective boxed); + + public static explicit operator GLib.Value (Clutter.Perspective boxed) + { + GLib.Value val = GLib.Value.Empty; + val.Init (Clutter.Perspective.GType); + glibsharp_value_set_boxed (ref val, ref boxed); + return val; + } + + public static explicit operator Clutter.Perspective (GLib.Value val) + { + IntPtr boxed_ptr = glibsharp_value_get_boxed (ref val); + return New (boxed_ptr); + } +#endregion + } +} Index: clutter/src/LayoutFlags.cs =================================================================== --- clutter/src/LayoutFlags.cs (revision 0) +++ clutter/src/LayoutFlags.cs (revision 0) @@ -0,0 +1,32 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Clutter { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + [GLib.GType (typeof (Clutter.LayoutFlagsGType))] + public enum LayoutFlags { + + None, + WidthForHeight = 1 << 0, + HeightForWidth = 1 << 1, + Natural = 1 << 2, + Tunable = 1 << 3, + } + + internal class LayoutFlagsGType { + [DllImport ("clutter")] + static extern IntPtr clutter_layout_flags_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (clutter_layout_flags_get_type ()); + } + } + } +#endregion +} Index: clutter/src/BehaviourScale.cs =================================================================== --- clutter/src/BehaviourScale.cs (revision 1158) +++ clutter/src/BehaviourScale.cs (working copy) @@ -87,6 +87,31 @@ } [DllImport("clutter")] + static extern int clutter_behaviour_scale_get_gravity(IntPtr raw); + + public Clutter.Gravity Gravity { + get { + int raw_ret = clutter_behaviour_scale_get_gravity(Handle); + Clutter.Gravity ret = (Clutter.Gravity) raw_ret; + return ret; + } + } + + [DllImport("clutter")] + static extern void clutter_behaviour_scale_get_boundsx(IntPtr raw, out int scale_begin, out int scale_end); + + public void GetBoundsx(out int scale_begin, out int scale_end) { + clutter_behaviour_scale_get_boundsx(Handle, out scale_begin, out scale_end); + } + + [DllImport("clutter")] + static extern void clutter_behaviour_scale_get_bounds(IntPtr raw, out double scale_begin, out double scale_end); + + public void GetBounds(out double scale_begin, out double scale_end) { + clutter_behaviour_scale_get_bounds(Handle, out scale_begin, out scale_end); + } + + [DllImport("clutter")] static extern IntPtr clutter_behaviour_scale_get_type(); public static new GLib.GType GType { Index: clutter/src/BoxChild.cs =================================================================== --- clutter/src/BoxChild.cs (revision 0) +++ clutter/src/BoxChild.cs (revision 0) @@ -0,0 +1,41 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Clutter { + + using System; + using System.Collections; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public struct BoxChild { + + private IntPtr _actor; + public Clutter.Actor Actor { + get { + return GLib.Object.GetObject(_actor) as Clutter.Actor; + } + set { + _actor = value == null ? IntPtr.Zero : value.Handle; + } + } + public Clutter.PackType PackType; + + public static Clutter.BoxChild Zero = new Clutter.BoxChild (); + + public static Clutter.BoxChild New(IntPtr raw) { + if (raw == IntPtr.Zero) { + return Clutter.BoxChild.Zero; + } + Clutter.BoxChild self = new Clutter.BoxChild(); + self = (Clutter.BoxChild) Marshal.PtrToStructure (raw, self.GetType ()); + return self; + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} Index: clutter/src/Effect.cs =================================================================== --- clutter/src/Effect.cs (revision 0) +++ clutter/src/Effect.cs (revision 0) @@ -0,0 +1,44 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Clutter { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + public class Effect { + + [DllImport("clutter")] + static extern IntPtr clutter_effect_move(IntPtr template_, IntPtr actor, ref Clutter.Knot knots, uint n_knots, ClutterSharp.EffectCompleteFuncNative completed_func, IntPtr completed_data); + + public static Clutter.Timeline Move(Clutter.EffectTemplate template_, Clutter.Actor actor, Clutter.Knot knots, uint n_knots, Clutter.EffectCompleteFunc completed_func) { + ClutterSharp.EffectCompleteFuncWrapper completed_func_wrapper = new ClutterSharp.EffectCompleteFuncWrapper (completed_func); + IntPtr raw_ret = clutter_effect_move(template_ == null ? IntPtr.Zero : template_.Handle, actor == null ? IntPtr.Zero : actor.Handle, ref knots, n_knots, completed_func_wrapper.NativeDelegate, IntPtr.Zero); + Clutter.Timeline ret = GLib.Object.GetObject(raw_ret) as Clutter.Timeline; + return ret; + } + + [DllImport("clutter")] + static extern IntPtr clutter_effect_fade(IntPtr template_, IntPtr actor, byte start_opacity, byte end_opacity, ClutterSharp.EffectCompleteFuncNative completed_func, IntPtr completed_data); + + public static Clutter.Timeline Fade(Clutter.EffectTemplate template_, Clutter.Actor actor, byte start_opacity, byte end_opacity, Clutter.EffectCompleteFunc completed_func) { + ClutterSharp.EffectCompleteFuncWrapper completed_func_wrapper = new ClutterSharp.EffectCompleteFuncWrapper (completed_func); + IntPtr raw_ret = clutter_effect_fade(template_ == null ? IntPtr.Zero : template_.Handle, actor == null ? IntPtr.Zero : actor.Handle, start_opacity, end_opacity, completed_func_wrapper.NativeDelegate, IntPtr.Zero); + Clutter.Timeline ret = GLib.Object.GetObject(raw_ret) as Clutter.Timeline; + return ret; + } + + [DllImport("clutter")] + static extern IntPtr clutter_effect_scale(IntPtr template_, IntPtr actor, double scale_begin, double scale_end, int gravity, ClutterSharp.EffectCompleteFuncNative completed_func, IntPtr completed_data); + + public static Clutter.Timeline Scale(Clutter.EffectTemplate template_, Clutter.Actor actor, double scale_begin, double scale_end, Clutter.Gravity gravity, Clutter.EffectCompleteFunc completed_func) { + ClutterSharp.EffectCompleteFuncWrapper completed_func_wrapper = new ClutterSharp.EffectCompleteFuncWrapper (completed_func); + IntPtr raw_ret = clutter_effect_scale(template_ == null ? IntPtr.Zero : template_.Handle, actor == null ? IntPtr.Zero : actor.Handle, scale_begin, scale_end, (int) gravity, completed_func_wrapper.NativeDelegate, IntPtr.Zero); + Clutter.Timeline ret = GLib.Object.GetObject(raw_ret) as Clutter.Timeline; + return ret; + } + +#endregion + } +} Index: clutter/src/HBox.cs =================================================================== --- clutter/src/HBox.cs (revision 0) +++ clutter/src/HBox.cs (revision 0) @@ -0,0 +1,91 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Clutter { + + using System; + using System.Collections; + using System.Runtime.InteropServices; + +#region Autogenerated code + public class HBox : Clutter.Box, Clutter.Layout { + + ~HBox() + { + Dispose(); + } + + [Obsolete] + protected HBox(GLib.GType gtype) : base(gtype) {} + public HBox(IntPtr raw) : base(raw) {} + + [DllImport("clutter")] + static extern IntPtr clutter_hbox_new(); + + public HBox () : base (IntPtr.Zero) + { + if (GetType () != typeof (HBox)) { + CreateNativeObject (new string [0], new GLib.Value[0]); + return; + } + Raw = clutter_hbox_new(); + } + + [DllImport("clutter")] + static extern IntPtr clutter_hbox_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = clutter_hbox_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("clutter")] + static extern void clutter_layout_natural_request(IntPtr raw, out int width, out int height); + + public void NaturalRequest(out int width, out int height) { + clutter_layout_natural_request(Handle, out width, out height); + } + + [DllImport("clutter")] + static extern void clutter_layout_height_for_width(IntPtr raw, int width, out int height); + + public int HeightForWidth(int width) { + int height; + clutter_layout_height_for_width(Handle, width, out height); + return height; + } + + [DllImport("clutter")] + static extern void clutter_layout_width_for_height(IntPtr raw, out int width, int height); + + public int WidthForHeight(int height) { + int width; + clutter_layout_width_for_height(Handle, out width, height); + return width; + } + + [DllImport("clutter")] + static extern void clutter_layout_tune_request(IntPtr raw, int given_width, int given_height, out int width, out int height); + + public void TuneRequest(int given_width, int given_height, out int width, out int height) { + clutter_layout_tune_request(Handle, given_width, given_height, out width, out height); + } + + [DllImport("clutter")] + static extern int clutter_layout_get_layout_flags(IntPtr raw); + + [GLib.Property ("layout-flags")] + public Clutter.LayoutFlags LayoutFlags { + get { + int raw_ret = clutter_layout_get_layout_flags(Handle); + Clutter.LayoutFlags ret = (Clutter.LayoutFlags) raw_ret; + return ret; + } + } + +#endregion + } +} Index: clutter/src/ModifierType.cs =================================================================== --- clutter/src/ModifierType.cs (revision 0) +++ clutter/src/ModifierType.cs (revision 0) @@ -0,0 +1,40 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Clutter { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + [GLib.GType (typeof (Clutter.ModifierTypeGType))] + public enum ModifierType { + + ShiftMask = 1 << 0, + LockMask = 1 << 1, + ControlMask = 1 << 2, + Mod1Mask = 1 << 3, + Mod2Mask = 1 << 4, + Mod3Mask = 1 << 5, + Mod4Mask = 1 << 6, + Mod5Mask = 1 << 7, + Button1Mask = 1 << 8, + Button2Mask = 1 << 9, + Button3Mask = 1 << 10, + Button4Mask = 1 << 11, + Button5Mask = 1 << 12, + } + + internal class ModifierTypeGType { + [DllImport ("clutter")] + static extern IntPtr clutter_modifier_type_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (clutter_modifier_type_get_type ()); + } + } + } +#endregion +} Index: clutter/src/BehaviourBspline.cs =================================================================== --- clutter/src/BehaviourBspline.cs (revision 0) +++ clutter/src/BehaviourBspline.cs (revision 0) @@ -0,0 +1,166 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Clutter { + + using System; + using System.Collections; + using System.Runtime.InteropServices; + +#region Autogenerated code + public class BehaviourBspline : Clutter.Behaviour { + + ~BehaviourBspline() + { + Dispose(); + } + + [Obsolete] + protected BehaviourBspline(GLib.GType gtype) : base(gtype) {} + public BehaviourBspline(IntPtr raw) : base(raw) {} + + [DllImport("clutter")] + static extern IntPtr clutter_behaviour_bspline_new(IntPtr alpha, ref Clutter.Knot knots, uint n_knots); + + public BehaviourBspline (Clutter.Alpha alpha, Clutter.Knot knots, uint n_knots) : base (IntPtr.Zero) + { + if (GetType () != typeof (BehaviourBspline)) { + throw new InvalidOperationException ("Can't override this constructor."); + } + Raw = clutter_behaviour_bspline_new(alpha == null ? IntPtr.Zero : alpha.Handle, ref knots, n_knots); + } + + [GLib.CDeclCallback] + delegate void KnotReachedSignalDelegate (IntPtr arg0, ref Clutter.Knot arg1, IntPtr gch); + + static void KnotReachedSignalCallback (IntPtr arg0, ref Clutter.Knot arg1, IntPtr gch) + { + GLib.Signal sig = ((GCHandle) gch).Target as GLib.Signal; + if (sig == null) + throw new Exception("Unknown signal GC handle received " + gch); + + Clutter.KnotReachedArgs args = new Clutter.KnotReachedArgs (); + args.Args = new object[1]; + args.Args[0] = arg1; + Clutter.KnotReachedHandler handler = (Clutter.KnotReachedHandler) sig.Handler; + handler (GLib.Object.GetObject (arg0), args); + + } + + [GLib.CDeclCallback] + delegate void KnotReachedVMDelegate (IntPtr bsplineb, ref Clutter.Knot knot); + + static KnotReachedVMDelegate KnotReachedVMCallback; + + static void knotreached_cb (IntPtr bsplineb, ref Clutter.Knot knot) + { + BehaviourBspline bsplineb_managed = GLib.Object.GetObject (bsplineb, false) as BehaviourBspline; + bsplineb_managed.OnKnotReached (knot); + } + + private static void OverrideKnotReached (GLib.GType gtype) + { + if (KnotReachedVMCallback == null) + KnotReachedVMCallback = new KnotReachedVMDelegate (knotreached_cb); + OverrideVirtualMethod (gtype, "knot-reached", KnotReachedVMCallback); + } + + [GLib.DefaultSignalHandler(Type=typeof(Clutter.BehaviourBspline), ConnectionMethod="OverrideKnotReached")] + protected virtual void OnKnotReached (Clutter.Knot knot) + { + GLib.Value ret = GLib.Value.Empty; + GLib.ValueArray inst_and_params = new GLib.ValueArray (2); + GLib.Value[] vals = new GLib.Value [2]; + vals [0] = new GLib.Value (this); + inst_and_params.Append (vals [0]); + vals [1] = new GLib.Value (knot); + inst_and_params.Append (vals [1]); + g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret); + foreach (GLib.Value v in vals) + v.Dispose (); + } + + [GLib.Signal("knot-reached")] + public event Clutter.KnotReachedHandler KnotReached { + add { + GLib.Signal sig = GLib.Signal.Lookup (this, "knot-reached", new KnotReachedSignalDelegate(KnotReachedSignalCallback)); + sig.AddDelegate (value); + } + remove { + GLib.Signal sig = GLib.Signal.Lookup (this, "knot-reached", new KnotReachedSignalDelegate(KnotReachedSignalCallback)); + sig.RemoveDelegate (value); + } + } + + [DllImport("clutter")] + static extern void clutter_behaviour_bspline_join(IntPtr raw, IntPtr bs2); + + public void Join(Clutter.BehaviourBspline bs2) { + clutter_behaviour_bspline_join(Handle, bs2 == null ? IntPtr.Zero : bs2.Handle); + } + + [DllImport("clutter")] + static extern void clutter_behaviour_bspline_set_origin(IntPtr raw, ref Clutter.Knot knot); + + public void SetOrigin(Clutter.Knot knot) { + clutter_behaviour_bspline_set_origin(Handle, ref knot); + } + + [DllImport("clutter")] + static extern void clutter_behaviour_bspline_append_knot(IntPtr raw, ref Clutter.Knot knot); + + public void AppendKnot(Clutter.Knot knot) { + clutter_behaviour_bspline_append_knot(Handle, ref knot); + } + + [DllImport("clutter")] + static extern void clutter_behaviour_bspline_truncate(IntPtr raw, uint offset); + + public void Truncate(uint offset) { + clutter_behaviour_bspline_truncate(Handle, offset); + } + + [DllImport("clutter")] + static extern IntPtr clutter_behaviour_bspline_split(IntPtr raw, uint offset); + + public Clutter.Behaviour Split(uint offset) { + IntPtr raw_ret = clutter_behaviour_bspline_split(Handle, offset); + Clutter.Behaviour ret = GLib.Object.GetObject(raw_ret) as Clutter.Behaviour; + return ret; + } + + [DllImport("clutter")] + static extern void clutter_behaviour_bspline_adjust(IntPtr raw, uint offset, ref Clutter.Knot knot); + + public void Adjust(uint offset, Clutter.Knot knot) { + clutter_behaviour_bspline_adjust(Handle, offset, ref knot); + } + + [DllImport("clutter")] + static extern void clutter_behaviour_bspline_get_origin(IntPtr raw, ref Clutter.Knot knot); + + public void GetOrigin(Clutter.Knot knot) { + clutter_behaviour_bspline_get_origin(Handle, ref knot); + } + + [DllImport("clutter")] + static extern IntPtr clutter_behaviour_bspline_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = clutter_behaviour_bspline_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("clutter")] + static extern void clutter_behaviour_bspline_clear(IntPtr raw); + + public void Clear() { + clutter_behaviour_bspline_clear(Handle); + } + +#endregion + } +} Index: clutter/src/BehaviourEllipse.cs =================================================================== --- clutter/src/BehaviourEllipse.cs (revision 0) +++ clutter/src/BehaviourEllipse.cs (revision 0) @@ -0,0 +1,176 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Clutter { + + using System; + using System.Collections; + using System.Runtime.InteropServices; + +#region Autogenerated code + public class BehaviourEllipse : Clutter.Behaviour { + + ~BehaviourEllipse() + { + Dispose(); + } + + [Obsolete] + protected BehaviourEllipse(GLib.GType gtype) : base(gtype) {} + public BehaviourEllipse(IntPtr raw) : base(raw) {} + + [DllImport("clutter")] + static extern IntPtr clutter_behaviour_ellipse_new(IntPtr alpha, int x, int y, int width, int height, double begin, double end, double tilt); + + public BehaviourEllipse (Clutter.Alpha alpha, int x, int y, int width, int height, double begin, double end, double tilt) : base (IntPtr.Zero) + { + if (GetType () != typeof (BehaviourEllipse)) { + throw new InvalidOperationException ("Can't override this constructor."); + } + Raw = clutter_behaviour_ellipse_new(alpha == null ? IntPtr.Zero : alpha.Handle, x, y, width, height, begin, end, tilt); + } + + [DllImport("clutter")] + static extern IntPtr clutter_behaviour_ellipse_newx(IntPtr alpha, int x, int y, int width, int height, int begin, int end, int tilt); + + public BehaviourEllipse (Clutter.Alpha alpha, int x, int y, int width, int height, int begin, int end, int tilt) : base (IntPtr.Zero) + { + if (GetType () != typeof (BehaviourEllipse)) { + throw new InvalidOperationException ("Can't override this constructor."); + } + Raw = clutter_behaviour_ellipse_newx(alpha == null ? IntPtr.Zero : alpha.Handle, x, y, width, height, begin, end, tilt); + } + + [DllImport("clutter")] + static extern int clutter_behaviour_ellipse_get_angle_end(IntPtr raw); + + [DllImport("clutter")] + static extern void clutter_behaviour_ellipse_set_angle_end(IntPtr raw, int angle_end); + + [GLib.Property ("angle-end")] + public int AngleEnd { + get { + int raw_ret = clutter_behaviour_ellipse_get_angle_end(Handle); + int ret = raw_ret; + return ret; + } + set { + clutter_behaviour_ellipse_set_angle_end(Handle, value); + } + } + + [GLib.Property ("center")] + public Clutter.Knot Center { + get { + GLib.Value val = GetProperty ("center"); + Clutter.Knot ret = (Clutter.Knot) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = (GLib.Value) value; + SetProperty("center", val); + val.Dispose (); + } + } + + [DllImport("clutter")] + static extern int clutter_behaviour_ellipse_get_width(IntPtr raw); + + [DllImport("clutter")] + static extern void clutter_behaviour_ellipse_set_width(IntPtr raw, int width); + + [GLib.Property ("width")] + public int Width { + get { + int raw_ret = clutter_behaviour_ellipse_get_width(Handle); + int ret = raw_ret; + return ret; + } + set { + clutter_behaviour_ellipse_set_width(Handle, value); + } + } + + [DllImport("clutter")] + static extern int clutter_behaviour_ellipse_get_angle_begin(IntPtr raw); + + [DllImport("clutter")] + static extern void clutter_behaviour_ellipse_set_angle_begin(IntPtr raw, int angle_begin); + + [GLib.Property ("angle-begin")] + public int AngleBegin { + get { + int raw_ret = clutter_behaviour_ellipse_get_angle_begin(Handle); + int ret = raw_ret; + return ret; + } + set { + clutter_behaviour_ellipse_set_angle_begin(Handle, value); + } + } + + [DllImport("clutter")] + static extern int clutter_behaviour_ellipse_get_height(IntPtr raw); + + [DllImport("clutter")] + static extern void clutter_behaviour_ellipse_set_height(IntPtr raw, int height); + + [GLib.Property ("height")] + public int Height { + get { + int raw_ret = clutter_behaviour_ellipse_get_height(Handle); + int ret = raw_ret; + return ret; + } + set { + clutter_behaviour_ellipse_set_height(Handle, value); + } + } + + [DllImport("clutter")] + static extern int clutter_behaviour_ellipse_get_angle_tilt(IntPtr raw); + + [DllImport("clutter")] + static extern void clutter_behaviour_ellipse_set_angle_tilt(IntPtr raw, int angle_tilt); + + [GLib.Property ("angle-tilt")] + public int AngleTilt { + get { + int raw_ret = clutter_behaviour_ellipse_get_angle_tilt(Handle); + int ret = raw_ret; + return ret; + } + set { + clutter_behaviour_ellipse_set_angle_tilt(Handle, value); + } + } + + [DllImport("clutter")] + static extern void clutter_behaviour_ellipse_set_center(IntPtr raw, int x, int y); + + public void SetCenter(int x, int y) { + clutter_behaviour_ellipse_set_center(Handle, x, y); + } + + [DllImport("clutter")] + static extern void clutter_behaviour_ellipse_get_center(IntPtr raw, out int x, out int y); + + public void GetCenter(out int x, out int y) { + clutter_behaviour_ellipse_get_center(Handle, out x, out y); + } + + [DllImport("clutter")] + static extern IntPtr clutter_behaviour_ellipse_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = clutter_behaviour_ellipse_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + +#endregion + } +} Index: clutter/src/StageState.cs =================================================================== --- clutter/src/StageState.cs (revision 0) +++ clutter/src/StageState.cs (revision 0) @@ -0,0 +1,30 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Clutter { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Clutter.StageStateGType))] + public enum StageState { + + Fullscreen, + Maximized, + Minimized, + Offscreen, + } + + internal class StageStateGType { + [DllImport ("clutter")] + static extern IntPtr clutter_stage_state_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (clutter_stage_state_get_type ()); + } + } + } +#endregion +} Index: clutter/src/Timeline.cs =================================================================== --- clutter/src/Timeline.cs (revision 1158) +++ clutter/src/Timeline.cs (working copy) @@ -49,10 +49,10 @@ } [GLib.Property ("num-frames")] - public int NumFrames { + public uint NumFrames { get { GLib.Value val = GetProperty ("num-frames"); - int ret = (int) val; + uint ret = (uint) val; val.Dispose (); return ret; } @@ -63,11 +63,29 @@ } } + [DllImport("clutter")] + static extern uint clutter_timeline_get_delay(IntPtr raw); + + [DllImport("clutter")] + static extern void clutter_timeline_set_delay(IntPtr raw, uint msecs); + + [GLib.Property ("delay")] + public uint Delay { + get { + uint raw_ret = clutter_timeline_get_delay(Handle); + uint ret = raw_ret; + return ret; + } + set { + clutter_timeline_set_delay(Handle, value); + } + } + [GLib.Property ("fps")] - public int Fps { + public uint Fps { get { GLib.Value val = GetProperty ("fps"); - int ret = (int) val; + uint ret = (uint) val; val.Dispose (); return ret; } @@ -312,6 +330,15 @@ } [DllImport("clutter")] + static extern IntPtr clutter_timeline_clone(IntPtr raw); + + public Clutter.Timeline Clone() { + IntPtr raw_ret = clutter_timeline_clone(Handle); + Clutter.Timeline ret = GLib.Object.GetObject(raw_ret) as Clutter.Timeline; + return ret; + } + + [DllImport("clutter")] static extern void clutter_timeline_rewind(IntPtr raw); public void Rewind() { Index: clutter/src/MotionEvent.cs =================================================================== --- clutter/src/MotionEvent.cs (revision 1158) +++ clutter/src/MotionEvent.cs (working copy) @@ -15,7 +15,7 @@ public uint Time; public int X; public int Y; - public uint ModifierState; + public Clutter.ModifierType ModifierState; private IntPtr _axes; private IntPtr _device; public Clutter.InputDevice Device { Index: clutter/src/VBox.cs =================================================================== --- clutter/src/VBox.cs (revision 0) +++ clutter/src/VBox.cs (revision 0) @@ -0,0 +1,91 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Clutter { + + using System; + using System.Collections; + using System.Runtime.InteropServices; + +#region Autogenerated code + public class VBox : Clutter.Box, Clutter.Layout { + + ~VBox() + { + Dispose(); + } + + [Obsolete] + protected VBox(GLib.GType gtype) : base(gtype) {} + public VBox(IntPtr raw) : base(raw) {} + + [DllImport("clutter")] + static extern IntPtr clutter_vbox_new(); + + public VBox () : base (IntPtr.Zero) + { + if (GetType () != typeof (VBox)) { + CreateNativeObject (new string [0], new GLib.Value[0]); + return; + } + Raw = clutter_vbox_new(); + } + + [DllImport("clutter")] + static extern IntPtr clutter_vbox_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = clutter_vbox_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("clutter")] + static extern void clutter_layout_natural_request(IntPtr raw, out int width, out int height); + + public void NaturalRequest(out int width, out int height) { + clutter_layout_natural_request(Handle, out width, out height); + } + + [DllImport("clutter")] + static extern void clutter_layout_height_for_width(IntPtr raw, int width, out int height); + + public int HeightForWidth(int width) { + int height; + clutter_layout_height_for_width(Handle, width, out height); + return height; + } + + [DllImport("clutter")] + static extern void clutter_layout_width_for_height(IntPtr raw, out int width, int height); + + public int WidthForHeight(int height) { + int width; + clutter_layout_width_for_height(Handle, out width, height); + return width; + } + + [DllImport("clutter")] + static extern void clutter_layout_tune_request(IntPtr raw, int given_width, int given_height, out int width, out int height); + + public void TuneRequest(int given_width, int given_height, out int width, out int height) { + clutter_layout_tune_request(Handle, given_width, given_height, out width, out height); + } + + [DllImport("clutter")] + static extern int clutter_layout_get_layout_flags(IntPtr raw); + + [GLib.Property ("layout-flags")] + public Clutter.LayoutFlags LayoutFlags { + get { + int raw_ret = clutter_layout_get_layout_flags(Handle); + Clutter.LayoutFlags ret = (Clutter.LayoutFlags) raw_ret; + return ret; + } + } + +#endregion + } +} Index: clutter/src/Behaviour.cs =================================================================== --- clutter/src/Behaviour.cs (revision 1158) +++ clutter/src/Behaviour.cs (working copy) @@ -42,6 +42,130 @@ } } + [GLib.CDeclCallback] + delegate void RemoveEventSignalDelegate (IntPtr arg0, IntPtr arg1, IntPtr gch); + + static void RemoveEventSignalCallback (IntPtr arg0, IntPtr arg1, IntPtr gch) + { + GLib.Signal sig = ((GCHandle) gch).Target as GLib.Signal; + if (sig == null) + throw new Exception("Unknown signal GC handle received " + gch); + + Clutter.RemoveEventArgs args = new Clutter.RemoveEventArgs (); + args.Args = new object[1]; + args.Args[0] = GLib.Object.GetObject(arg1) as Clutter.Actor; + Clutter.RemoveEventHandler handler = (Clutter.RemoveEventHandler) sig.Handler; + handler (GLib.Object.GetObject (arg0), args); + + } + + [GLib.CDeclCallback] + delegate void RemoveEventVMDelegate (IntPtr behave, IntPtr actor); + + static RemoveEventVMDelegate RemoveEventVMCallback; + + static void removeevent_cb (IntPtr behave, IntPtr actor) + { + Behaviour behave_managed = GLib.Object.GetObject (behave, false) as Behaviour; + behave_managed.OnRemoveEvent (GLib.Object.GetObject(actor) as Clutter.Actor); + } + + private static void OverrideRemoveEvent (GLib.GType gtype) + { + if (RemoveEventVMCallback == null) + RemoveEventVMCallback = new RemoveEventVMDelegate (removeevent_cb); + OverrideVirtualMethod (gtype, "remove", RemoveEventVMCallback); + } + + [GLib.DefaultSignalHandler(Type=typeof(Clutter.Behaviour), ConnectionMethod="OverrideRemoveEvent")] + protected virtual void OnRemoveEvent (Clutter.Actor actor) + { + GLib.Value ret = GLib.Value.Empty; + GLib.ValueArray inst_and_params = new GLib.ValueArray (2); + GLib.Value[] vals = new GLib.Value [2]; + vals [0] = new GLib.Value (this); + inst_and_params.Append (vals [0]); + vals [1] = new GLib.Value (actor); + inst_and_params.Append (vals [1]); + g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret); + foreach (GLib.Value v in vals) + v.Dispose (); + } + + [GLib.Signal("remove")] + public event Clutter.RemoveEventHandler RemoveEvent { + add { + GLib.Signal sig = GLib.Signal.Lookup (this, "remove", new RemoveEventSignalDelegate(RemoveEventSignalCallback)); + sig.AddDelegate (value); + } + remove { + GLib.Signal sig = GLib.Signal.Lookup (this, "remove", new RemoveEventSignalDelegate(RemoveEventSignalCallback)); + sig.RemoveDelegate (value); + } + } + + [GLib.CDeclCallback] + delegate void ApplyEventSignalDelegate (IntPtr arg0, IntPtr arg1, IntPtr gch); + + static void ApplyEventSignalCallback (IntPtr arg0, IntPtr arg1, IntPtr gch) + { + GLib.Signal sig = ((GCHandle) gch).Target as GLib.Signal; + if (sig == null) + throw new Exception("Unknown signal GC handle received " + gch); + + Clutter.ApplyEventArgs args = new Clutter.ApplyEventArgs (); + args.Args = new object[1]; + args.Args[0] = GLib.Object.GetObject(arg1) as Clutter.Actor; + Clutter.ApplyEventHandler handler = (Clutter.ApplyEventHandler) sig.Handler; + handler (GLib.Object.GetObject (arg0), args); + + } + + [GLib.CDeclCallback] + delegate void ApplyEventVMDelegate (IntPtr behave, IntPtr actor); + + static ApplyEventVMDelegate ApplyEventVMCallback; + + static void applyevent_cb (IntPtr behave, IntPtr actor) + { + Behaviour behave_managed = GLib.Object.GetObject (behave, false) as Behaviour; + behave_managed.OnApplyEvent (GLib.Object.GetObject(actor) as Clutter.Actor); + } + + private static void OverrideApplyEvent (GLib.GType gtype) + { + if (ApplyEventVMCallback == null) + ApplyEventVMCallback = new ApplyEventVMDelegate (applyevent_cb); + OverrideVirtualMethod (gtype, "apply", ApplyEventVMCallback); + } + + [GLib.DefaultSignalHandler(Type=typeof(Clutter.Behaviour), ConnectionMethod="OverrideApplyEvent")] + protected virtual void OnApplyEvent (Clutter.Actor actor) + { + GLib.Value ret = GLib.Value.Empty; + GLib.ValueArray inst_and_params = new GLib.ValueArray (2); + GLib.Value[] vals = new GLib.Value [2]; + vals [0] = new GLib.Value (this); + inst_and_params.Append (vals [0]); + vals [1] = new GLib.Value (actor); + inst_and_params.Append (vals [1]); + g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret); + foreach (GLib.Value v in vals) + v.Dispose (); + } + + [GLib.Signal("apply")] + public event Clutter.ApplyEventHandler ApplyEvent { + add { + GLib.Signal sig = GLib.Signal.Lookup (this, "apply", new ApplyEventSignalDelegate(ApplyEventSignalCallback)); + sig.AddDelegate (value); + } + remove { + GLib.Signal sig = GLib.Signal.Lookup (this, "apply", new ApplyEventSignalDelegate(ApplyEventSignalCallback)); + sig.RemoveDelegate (value); + } + } + [DllImport("clutter")] static extern void clutter_behaviour_remove(IntPtr raw, IntPtr actor); @@ -50,6 +174,15 @@ } [DllImport("clutter")] + static extern bool clutter_behaviour_is_applied(IntPtr raw, IntPtr actor); + + public bool IsApplied(Clutter.Actor actor) { + bool raw_ret = clutter_behaviour_is_applied(Handle, actor == null ? IntPtr.Zero : actor.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("clutter")] static extern IntPtr clutter_behaviour_get_actors(IntPtr raw); public GLib.SList Actors { Index: clutter/src/ApplyEventHandler.cs =================================================================== --- clutter/src/ApplyEventHandler.cs (revision 0) +++ clutter/src/ApplyEventHandler.cs (revision 0) @@ -0,0 +1,18 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Clutter { + + using System; + + public delegate void ApplyEventHandler(object o, ApplyEventArgs args); + + public class ApplyEventArgs : GLib.SignalArgs { + public Clutter.Actor Actor{ + get { + return (Clutter.Actor) Args[0]; + } + } + + } +} Index: clutter/src/RemoveHandler.cs =================================================================== --- clutter/src/RemoveHandler.cs (revision 0) +++ clutter/src/RemoveHandler.cs (revision 0) @@ -0,0 +1,18 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Clutter { + + using System; + + public delegate void RemoveHandler(object o, RemoveArgs args); + + public class RemoveArgs : GLib.SignalArgs { + public Clutter.Actor Actor{ + get { + return (Clutter.Actor) Args[0]; + } + } + + } +} Index: clutter/src/Exp.cs =================================================================== --- clutter/src/Exp.cs (revision 0) +++ clutter/src/Exp.cs (revision 0) @@ -0,0 +1,32 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Clutter { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + public class Exp { + + [DllImport("clutter")] + static extern uint clutter_exp_dec_func(IntPtr alpha, IntPtr dummy); + + public static uint DecFunc(Clutter.Alpha alpha, IntPtr dummy) { + uint raw_ret = clutter_exp_dec_func(alpha == null ? IntPtr.Zero : alpha.Handle, dummy); + uint ret = raw_ret; + return ret; + } + + [DllImport("clutter")] + static extern uint clutter_exp_inc_func(IntPtr alpha, IntPtr dummy); + + public static uint IncFunc(Clutter.Alpha alpha, IntPtr dummy) { + uint raw_ret = clutter_exp_inc_func(alpha == null ? IntPtr.Zero : alpha.Handle, dummy); + uint ret = raw_ret; + return ret; + } + +#endregion + } +} Index: clutter/src/Sine.cs =================================================================== --- clutter/src/Sine.cs (revision 0) +++ clutter/src/Sine.cs (revision 0) @@ -0,0 +1,50 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Clutter { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + public class Sine { + + [DllImport("clutter")] + static extern uint clutter_sine_half_func(IntPtr alpha, IntPtr dummy); + + public static uint HalfFunc(Clutter.Alpha alpha, IntPtr dummy) { + uint raw_ret = clutter_sine_half_func(alpha == null ? IntPtr.Zero : alpha.Handle, dummy); + uint ret = raw_ret; + return ret; + } + + [DllImport("clutter")] + static extern uint clutter_sine_dec_func(IntPtr alpha, IntPtr dummy); + + public static uint DecFunc(Clutter.Alpha alpha, IntPtr dummy) { + uint raw_ret = clutter_sine_dec_func(alpha == null ? IntPtr.Zero : alpha.Handle, dummy); + uint ret = raw_ret; + return ret; + } + + [DllImport("clutter")] + static extern uint clutter_sine_func(IntPtr alpha, IntPtr dummy); + + public static uint Func(Clutter.Alpha alpha, IntPtr dummy) { + uint raw_ret = clutter_sine_func(alpha == null ? IntPtr.Zero : alpha.Handle, dummy); + uint ret = raw_ret; + return ret; + } + + [DllImport("clutter")] + static extern uint clutter_sine_inc_func(IntPtr alpha, IntPtr dummy); + + public static uint IncFunc(Clutter.Alpha alpha, IntPtr dummy) { + uint raw_ret = clutter_sine_inc_func(alpha == null ? IntPtr.Zero : alpha.Handle, dummy); + uint ret = raw_ret; + return ret; + } + +#endregion + } +} Index: clutter/src/ScrollEvent.cs =================================================================== --- clutter/src/ScrollEvent.cs (revision 0) +++ clutter/src/ScrollEvent.cs (revision 0) @@ -0,0 +1,47 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Clutter { + + using System; + using System.Collections; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public struct ScrollEvent { + + public Clutter.EventType Type; + public uint Time; + public int X; + public int Y; + public Clutter.ScrollDirection Direction; + public Clutter.ModifierType ModifierState; + private IntPtr _axes; + private IntPtr _device; + public Clutter.InputDevice Device { + get { + return _device == IntPtr.Zero ? null : (Clutter.InputDevice) GLib.Opaque.GetOpaque (_device, typeof (Clutter.InputDevice), false); + } + set { + _device = value == null ? IntPtr.Zero : value.Handle; + } + } + + public static Clutter.ScrollEvent Zero = new Clutter.ScrollEvent (); + + public static Clutter.ScrollEvent New(IntPtr raw) { + if (raw == IntPtr.Zero) { + return Clutter.ScrollEvent.Zero; + } + Clutter.ScrollEvent self = new Clutter.ScrollEvent(); + self = (Clutter.ScrollEvent) Marshal.PtrToStructure (raw, self.GetType ()); + return self; + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} Index: clutter/src/Global.cs =================================================================== --- clutter/src/Global.cs (revision 1158) +++ clutter/src/Global.cs (working copy) @@ -10,12 +10,14 @@ public class Global { [DllImport("clutter")] - static extern bool clutter_want_debug(); + static extern IntPtr clutter_get_default_backend(); - public static bool WantDebug() { - bool raw_ret = clutter_want_debug(); - bool ret = raw_ret; - return ret; + public static Clutter.Backend DefaultBackend { + get { + IntPtr raw_ret = clutter_get_default_backend(); + Clutter.Backend ret = GLib.Object.GetObject(raw_ret) as Clutter.Backend; + return ret; + } } [DllImport("clutter")] @@ -28,12 +30,14 @@ } [DllImport("clutter")] - static extern uint clutter_sine_func(IntPtr alpha, IntPtr dummy); + static extern bool clutter_get_show_fps(); - public static uint SineFunc(Clutter.Alpha alpha, IntPtr dummy) { - uint raw_ret = clutter_sine_func(alpha == null ? IntPtr.Zero : alpha.Handle, dummy); - uint ret = raw_ret; - return ret; + public static bool ShowFps { + get { + bool raw_ret = clutter_get_show_fps(); + bool ret = raw_ret; + return ret; + } } [DllImport("clutter")] @@ -45,6 +49,53 @@ return ret; } + [DllImport("clutter")] + static extern void clutter_base_init(); + + public static void BaseInit() { + clutter_base_init(); + } + + [DllImport("clutter")] + static extern int clutter_util_next_p2(int a); + + public static int UtilNextP2(int a) { + int raw_ret = clutter_util_next_p2(a); + int ret = raw_ret; + return ret; + } + + [DllImport("clutter")] + static extern UIntPtr clutter_get_timestamp(); + + public static ulong Timestamp { + get { + UIntPtr raw_ret = clutter_get_timestamp(); + ulong ret = (ulong) raw_ret; + return ret; + } + } + + [DllImport("clutter")] + static extern bool clutter_events_pending(); + + public static bool EventsPending() { + bool raw_ret = clutter_events_pending(); + bool ret = raw_ret; + return ret; + } + + [DllImport("clutter")] + static extern bool clutter_get_debug_enabled(); + + public static bool DebugEnabled { + get { + bool raw_ret = clutter_get_debug_enabled(); + bool ret = raw_ret; + return ret; + } + } + #endregion } } Index: clutter/src/Entry.cs =================================================================== --- clutter/src/Entry.cs (revision 0) +++ clutter/src/Entry.cs (revision 0) @@ -0,0 +1,502 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Clutter { + + using System; + using System.Collections; + using System.Runtime.InteropServices; + +#region Autogenerated code + public class Entry : Clutter.Actor { + + ~Entry() + { + Dispose(); + } + + [Obsolete] + protected Entry(GLib.GType gtype) : base(gtype) {} + public Entry(IntPtr raw) : base(raw) {} + + [DllImport("clutter")] + static extern IntPtr clutter_entry_new(); + + public Entry () : base (IntPtr.Zero) + { + if (GetType () != typeof (Entry)) { + CreateNativeObject (new string [0], new GLib.Value[0]); + return; + } + Raw = clutter_entry_new(); + } + + [DllImport("clutter")] + static extern IntPtr clutter_entry_new_full(IntPtr font_name, IntPtr text, ref Clutter.Color color); + + public Entry (string font_name, string text, Clutter.Color color) : base (IntPtr.Zero) + { + if (GetType () != typeof (Entry)) { + ArrayList vals = new ArrayList(); + ArrayList names = new ArrayList(); + names.Add ("font_name"); + vals.Add (new GLib.Value (font_name)); + names.Add ("text"); + vals.Add (new GLib.Value (text)); + names.Add ("color"); + vals.Add (new GLib.Value (color)); + CreateNativeObject ((string[])names.ToArray (typeof (string)), (GLib.Value[])vals.ToArray (typeof (GLib.Value))); + return; + } + IntPtr font_name_as_native = GLib.Marshaller.StringToPtrGStrdup (font_name); + IntPtr text_as_native = GLib.Marshaller.StringToPtrGStrdup (text); + Raw = clutter_entry_new_full(font_name_as_native, text_as_native, ref color); + GLib.Marshaller.Free (font_name_as_native); + GLib.Marshaller.Free (text_as_native); + } + + [DllImport("clutter")] + static extern IntPtr clutter_entry_new_with_text(IntPtr font_name, IntPtr text); + + public Entry (string font_name, string text) : base (IntPtr.Zero) + { + if (GetType () != typeof (Entry)) { + ArrayList vals = new ArrayList(); + ArrayList names = new ArrayList(); + names.Add ("font_name"); + vals.Add (new GLib.Value (font_name)); + names.Add ("text"); + vals.Add (new GLib.Value (text)); + CreateNativeObject ((string[])names.ToArray (typeof (string)), (GLib.Value[])vals.ToArray (typeof (GLib.Value))); + return; + } + IntPtr font_name_as_native = GLib.Marshaller.StringToPtrGStrdup (font_name); + IntPtr text_as_native = GLib.Marshaller.StringToPtrGStrdup (text); + Raw = clutter_entry_new_with_text(font_name_as_native, text_as_native); + GLib.Marshaller.Free (font_name_as_native); + GLib.Marshaller.Free (text_as_native); + } + + [GLib.Property ("text-visible")] + public bool TextVisible { + get { + GLib.Value val = GetProperty ("text-visible"); + bool ret = (bool) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("text-visible", val); + val.Dispose (); + } + } + + [DllImport("clutter")] + static extern int clutter_entry_get_alignment(IntPtr raw); + + [DllImport("clutter")] + static extern void clutter_entry_set_alignment(IntPtr raw, int alignment); + + [GLib.Property ("alignment")] + public Pango.Alignment Alignment { + get { + int raw_ret = clutter_entry_get_alignment(Handle); + Pango.Alignment ret = (Pango.Alignment) raw_ret; + return ret; + } + set { + clutter_entry_set_alignment(Handle, (int) value); + } + } + + [DllImport("clutter")] + static extern IntPtr clutter_entry_get_font_name(IntPtr raw); + + [DllImport("clutter")] + static extern void clutter_entry_set_font_name(IntPtr raw, IntPtr font_name); + + [GLib.Property ("font-name")] + public string FontName { + get { + IntPtr raw_ret = clutter_entry_get_font_name(Handle); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + set { + IntPtr font_name_as_native = GLib.Marshaller.StringToPtrGStrdup (value); + clutter_entry_set_font_name(Handle, font_name_as_native); + GLib.Marshaller.Free (font_name_as_native); + } + } + + [DllImport("clutter")] + static extern IntPtr clutter_entry_get_text(IntPtr raw); + + [DllImport("clutter")] + static extern void clutter_entry_set_text(IntPtr raw, IntPtr text); + + [GLib.Property ("text")] + public string Text { + get { + IntPtr raw_ret = clutter_entry_get_text(Handle); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + set { + IntPtr text_as_native = GLib.Marshaller.StringToPtrGStrdup (value); + clutter_entry_set_text(Handle, text_as_native); + GLib.Marshaller.Free (text_as_native); + } + } + + [GLib.Property ("entry-padding")] + public uint EntryPadding { + get { + GLib.Value val = GetProperty ("entry-padding"); + uint ret = (uint) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("entry-padding", val); + val.Dispose (); + } + } + + [DllImport("clutter")] + static extern int clutter_entry_get_position(IntPtr raw); + + [DllImport("clutter")] + static extern void clutter_entry_set_position(IntPtr raw, int position); + + [GLib.Property ("position")] + public int Position { + get { + int raw_ret = clutter_entry_get_position(Handle); + int ret = raw_ret; + return ret; + } + set { + clutter_entry_set_position(Handle, value); + } + } + + [DllImport("clutter")] + static extern void clutter_entry_set_color(IntPtr raw, ref Clutter.Color color); + + [GLib.Property ("color")] + public Clutter.Color Color { + get { + GLib.Value val = GetProperty ("color"); + Clutter.Color ret = (Clutter.Color) val; + val.Dispose (); + return ret; + } + set { + clutter_entry_set_color(Handle, ref value); + } + } + + [DllImport("clutter")] + static extern int clutter_entry_get_max_length(IntPtr raw); + + [DllImport("clutter")] + static extern void clutter_entry_set_max_length(IntPtr raw, int max); + + [GLib.Property ("max-length")] + public int MaxLength { + get { + int raw_ret = clutter_entry_get_max_length(Handle); + int ret = raw_ret; + return ret; + } + set { + clutter_entry_set_max_length(Handle, value); + } + } + + [GLib.Property ("cursor-visible")] + public bool CursorVisible { + get { + GLib.Value val = GetProperty ("cursor-visible"); + bool ret = (bool) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("cursor-visible", val); + val.Dispose (); + } + } + + [GLib.CDeclCallback] + delegate void ActivateVMDelegate (IntPtr entry); + + static ActivateVMDelegate ActivateVMCallback; + + static void activate_cb (IntPtr entry) + { + Entry entry_managed = GLib.Object.GetObject (entry, false) as Entry; + entry_managed.OnActivate (); + } + + private static void OverrideActivate (GLib.GType gtype) + { + if (ActivateVMCallback == null) + ActivateVMCallback = new ActivateVMDelegate (activate_cb); + OverrideVirtualMethod (gtype, "activate", ActivateVMCallback); + } + + [GLib.DefaultSignalHandler(Type=typeof(Clutter.Entry), ConnectionMethod="OverrideActivate")] + protected virtual void OnActivate () + { + GLib.Value ret = GLib.Value.Empty; + GLib.ValueArray inst_and_params = new GLib.ValueArray (1); + GLib.Value[] vals = new GLib.Value [1]; + vals [0] = new GLib.Value (this); + inst_and_params.Append (vals [0]); + g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret); + foreach (GLib.Value v in vals) + v.Dispose (); + } + + [GLib.Signal("activate")] + public event System.EventHandler Activate { + add { + GLib.Signal sig = GLib.Signal.Lookup (this, "activate"); + sig.AddDelegate (value); + } + remove { + GLib.Signal sig = GLib.Signal.Lookup (this, "activate"); + sig.RemoveDelegate (value); + } + } + + [GLib.CDeclCallback] + delegate void CursorEventSignalDelegate (IntPtr arg0, ref Clutter.Geometry arg1, IntPtr gch); + + static void CursorEventSignalCallback (IntPtr arg0, ref Clutter.Geometry arg1, IntPtr gch) + { + GLib.Signal sig = ((GCHandle) gch).Target as GLib.Signal; + if (sig == null) + throw new Exception("Unknown signal GC handle received " + gch); + + Clutter.CursorEventArgs args = new Clutter.CursorEventArgs (); + args.Args = new object[1]; + args.Args[0] = arg1; + Clutter.CursorEventHandler handler = (Clutter.CursorEventHandler) sig.Handler; + handler (GLib.Object.GetObject (arg0), args); + + } + + [GLib.CDeclCallback] + delegate void CursorEventVMDelegate (IntPtr entry, ref Clutter.Geometry geometry); + + static CursorEventVMDelegate CursorEventVMCallback; + + static void cursorevent_cb (IntPtr entry, ref Clutter.Geometry geometry) + { + Entry entry_managed = GLib.Object.GetObject (entry, false) as Entry; + entry_managed.OnCursorEvent (geometry); + } + + private static void OverrideCursorEvent (GLib.GType gtype) + { + if (CursorEventVMCallback == null) + CursorEventVMCallback = new CursorEventVMDelegate (cursorevent_cb); + OverrideVirtualMethod (gtype, "cursor-event", CursorEventVMCallback); + } + + [GLib.DefaultSignalHandler(Type=typeof(Clutter.Entry), ConnectionMethod="OverrideCursorEvent")] + protected virtual void OnCursorEvent (Clutter.Geometry geometry) + { + GLib.Value ret = GLib.Value.Empty; + GLib.ValueArray inst_and_params = new GLib.ValueArray (2); + GLib.Value[] vals = new GLib.Value [2]; + vals [0] = new GLib.Value (this); + inst_and_params.Append (vals [0]); + vals [1] = new GLib.Value (geometry); + inst_and_params.Append (vals [1]); + g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret); + foreach (GLib.Value v in vals) + v.Dispose (); + } + + [GLib.Signal("cursor-event")] + public event Clutter.CursorEventHandler CursorEvent { + add { + GLib.Signal sig = GLib.Signal.Lookup (this, "cursor-event", new CursorEventSignalDelegate(CursorEventSignalCallback)); + sig.AddDelegate (value); + } + remove { + GLib.Signal sig = GLib.Signal.Lookup (this, "cursor-event", new CursorEventSignalDelegate(CursorEventSignalCallback)); + sig.RemoveDelegate (value); + } + } + + [GLib.CDeclCallback] + delegate void TextChangedVMDelegate (IntPtr entry); + + static TextChangedVMDelegate TextChangedVMCallback; + + static void textchanged_cb (IntPtr entry) + { + Entry entry_managed = GLib.Object.GetObject (entry, false) as Entry; + entry_managed.OnTextChanged (); + } + + private static void OverrideTextChanged (GLib.GType gtype) + { + if (TextChangedVMCallback == null) + TextChangedVMCallback = new TextChangedVMDelegate (textchanged_cb); + OverrideVirtualMethod (gtype, "text-changed", TextChangedVMCallback); + } + + [GLib.DefaultSignalHandler(Type=typeof(Clutter.Entry), ConnectionMethod="OverrideTextChanged")] + protected virtual void OnTextChanged () + { + GLib.Value ret = GLib.Value.Empty; + GLib.ValueArray inst_and_params = new GLib.ValueArray (1); + GLib.Value[] vals = new GLib.Value [1]; + vals [0] = new GLib.Value (this); + inst_and_params.Append (vals [0]); + g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret); + foreach (GLib.Value v in vals) + v.Dispose (); + } + + [GLib.Signal("text-changed")] + public event System.EventHandler TextChanged { + add { + GLib.Signal sig = GLib.Signal.Lookup (this, "text-changed"); + sig.AddDelegate (value); + } + remove { + GLib.Signal sig = GLib.Signal.Lookup (this, "text-changed"); + sig.RemoveDelegate (value); + } + } + + [DllImport("clutter")] + static extern void clutter_entry_delete_chars(IntPtr raw, uint len); + + public void DeleteChars(uint len) { + clutter_entry_delete_chars(Handle, len); + } + + [DllImport("clutter")] + static extern uint clutter_entry_get_invisible_char(IntPtr raw); + + [DllImport("clutter")] + static extern void clutter_entry_set_invisible_char(IntPtr raw, uint wc); + + public char InvisibleChar { + get { + uint raw_ret = clutter_entry_get_invisible_char(Handle); + char ret = GLib.Marshaller.GUnicharToChar (raw_ret); + return ret; + } + set { + clutter_entry_set_invisible_char(Handle, GLib.Marshaller.CharToGUnichar (value)); + } + } + + [DllImport("clutter")] + static extern void clutter_entry_delete_text(IntPtr raw, IntPtr start_pos, IntPtr end_pos); + + public void DeleteText(long start_pos, long end_pos) { + clutter_entry_delete_text(Handle, new IntPtr (start_pos), new IntPtr (end_pos)); + } + + [DllImport("clutter")] + static extern IntPtr clutter_entry_get_layout(IntPtr raw); + + public Pango.Layout Layout { + get { + IntPtr raw_ret = clutter_entry_get_layout(Handle); + Pango.Layout ret = GLib.Object.GetObject(raw_ret) as Pango.Layout; + return ret; + } + } + + [DllImport("clutter")] + static extern bool clutter_entry_get_visibility(IntPtr raw); + + [DllImport("clutter")] + static extern void clutter_entry_set_visibility(IntPtr raw, bool visible); + + public bool Visibility { + get { + bool raw_ret = clutter_entry_get_visibility(Handle); + bool ret = raw_ret; + return ret; + } + set { + clutter_entry_set_visibility(Handle, value); + } + } + + [DllImport("clutter")] + static extern void clutter_entry_insert_text(IntPtr raw, IntPtr text, IntPtr position); + + public void InsertText(string text, long position) { + IntPtr text_as_native = GLib.Marshaller.StringToPtrGStrdup (text); + clutter_entry_insert_text(Handle, text_as_native, new IntPtr (position)); + GLib.Marshaller.Free (text_as_native); + } + + [DllImport("clutter")] + static extern void clutter_entry_handle_key_event(IntPtr raw, ref Clutter.KeyEvent kev); + + public void HandleKeyEvent(Clutter.KeyEvent kev) { + clutter_entry_handle_key_event(Handle, ref kev); + } + + [DllImport("clutter")] + static extern void clutter_entry_insert_unichar(IntPtr raw, uint wc); + + public void InsertUnichar(char wc) { + clutter_entry_insert_unichar(Handle, GLib.Marshaller.CharToGUnichar (wc)); + } + + [DllImport("clutter")] + static extern bool clutter_entry_get_visible_cursor(IntPtr raw); + + [DllImport("clutter")] + static extern void clutter_entry_set_visible_cursor(IntPtr raw, bool visible); + + public bool VisibleCursor { + get { + bool raw_ret = clutter_entry_get_visible_cursor(Handle); + bool ret = raw_ret; + return ret; + } + set { + clutter_entry_set_visible_cursor(Handle, value); + } + } + + [DllImport("clutter")] + static extern void clutter_entry_get_color(IntPtr raw, ref Clutter.Color color); + + public void GetColor(Clutter.Color color) { + clutter_entry_get_color(Handle, ref color); + } + + [DllImport("clutter")] + static extern IntPtr clutter_entry_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = clutter_entry_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + +#endregion + } +} Index: clutter/src/EffectCompleteFunc.cs =================================================================== --- clutter/src/EffectCompleteFunc.cs (revision 0) +++ clutter/src/EffectCompleteFunc.cs (revision 0) @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Clutter { + + using System; + + public delegate void EffectCompleteFunc(Clutter.Actor actor); + +} Index: clutter/src/StageStateEvent.cs =================================================================== --- clutter/src/StageStateEvent.cs (revision 0) +++ clutter/src/StageStateEvent.cs (revision 0) @@ -0,0 +1,34 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Clutter { + + using System; + using System.Collections; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public struct StageStateEvent { + + public Clutter.EventType Type; + public Clutter.StageState ChangedMask; + public Clutter.StageState NewState; + + public static Clutter.StageStateEvent Zero = new Clutter.StageStateEvent (); + + public static Clutter.StageStateEvent New(IntPtr raw) { + if (raw == IntPtr.Zero) { + return Clutter.StageStateEvent.Zero; + } + Clutter.StageStateEvent self = new Clutter.StageStateEvent(); + self = (Clutter.StageStateEvent) Marshal.PtrToStructure (raw, self.GetType ()); + return self; + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} Index: clutter/src/FeatureFlags.cs =================================================================== --- clutter/src/FeatureFlags.cs (revision 1158) +++ clutter/src/FeatureFlags.cs (working copy) @@ -13,6 +13,8 @@ TextureRectangle = 1 << 1, SyncToVblank = 1 << 2, + TextureYuv = 1 << 3, + TextureReadPixels = 1 << 4, } internal class FeatureFlagsGType { Index: clutter/src/Actor.cs =================================================================== --- clutter/src/Actor.cs (revision 1158) +++ clutter/src/Actor.cs (working copy) @@ -346,20 +346,27 @@ } [DllImport("clutter")] - static extern void clutter_actor_allocate_coords(IntPtr raw, IntPtr box); + static extern void clutter_actor_move_by(IntPtr raw, int dx, int dy); - public void AllocateCoords(Clutter.ActorBox box) { - clutter_actor_allocate_coords(Handle, box == null ? IntPtr.Zero : box.Handle); + public void MoveBy(int dx, int dy) { + clutter_actor_move_by(Handle, dx, dy); } [DllImport("clutter")] - static extern void clutter_actor_realize(IntPtr raw); + static extern void clutter_actor_rotate_yx(IntPtr raw, int angle, int x, int z); - public void Realize() { - clutter_actor_realize(Handle); + public void RotateYx(int angle, int x, int z) { + clutter_actor_rotate_yx(Handle, angle, x, z); } [DllImport("clutter")] + static extern void clutter_actor_pick(IntPtr raw, ref Clutter.Color color); + + public void Pick(Clutter.Color color) { + clutter_actor_pick(Handle, ref color); + } + + [DllImport("clutter")] static extern void clutter_actor_get_abs_size(IntPtr raw, out uint width, out uint height); public void GetAbsSize(out uint width, out uint height) { @@ -378,6 +385,13 @@ } [DllImport("clutter")] + static extern void clutter_actor_rotate_z(IntPtr raw, float angle, int x, int y); + + public void RotateZ(float angle, int x, int y) { + clutter_actor_rotate_z(Handle, angle, x, y); + } + + [DllImport("clutter")] static extern void clutter_actor_lower_bottom(IntPtr raw); public void LowerBottom() { @@ -392,6 +406,13 @@ } [DllImport("clutter")] + static extern void clutter_actor_paint(IntPtr raw); + + public void Paint() { + clutter_actor_paint(Handle); + } + + [DllImport("clutter")] static extern int clutter_actor_get_depth(IntPtr raw); [DllImport("clutter")] @@ -423,13 +444,38 @@ } [DllImport("clutter")] - static extern void clutter_actor_rotate_x(IntPtr raw, float angle, int y, int z); + static extern int clutter_actor_get_rzangx(IntPtr raw); - public void RotateX(float angle, int y, int z) { - clutter_actor_rotate_x(Handle, angle, y, z); + public int Rzangx { + get { + int raw_ret = clutter_actor_get_rzangx(Handle); + int ret = raw_ret; + return ret; + } } [DllImport("clutter")] + static extern void clutter_actor_set_scale_with_gravityx(IntPtr raw, int scale_x, int scale_y, int gravity); + + public void SetScaleWithGravityx(int scale_x, int scale_y, Clutter.Gravity gravity) { + clutter_actor_set_scale_with_gravityx(Handle, scale_x, scale_y, (int) gravity); + } + + [DllImport("clutter")] + static extern void clutter_actor_rotate_xx(IntPtr raw, int angle, int y, int z); + + public void RotateXx(int angle, int y, int z) { + clutter_actor_rotate_xx(Handle, angle, y, z); + } + + [DllImport("clutter")] + static extern void clutter_actor_apply_transform_to_point(IntPtr raw, ref Clutter.Vertex point, ref Clutter.Vertex vertex); + + public void ApplyTransformToPoint(Clutter.Vertex point, Clutter.Vertex vertex) { + clutter_actor_apply_transform_to_point(Handle, ref point, ref vertex); + } + + [DllImport("clutter")] static extern void clutter_actor_set_scale(IntPtr raw, double scale_x, double scale_y); public void SetScale(double scale_x, double scale_y) { @@ -451,13 +497,20 @@ } [DllImport("clutter")] - static extern void clutter_actor_move_by(IntPtr raw, int dx, int dy); + static extern void clutter_actor_set_scale_with_gravity(IntPtr raw, float scale_x, float scale_y, int gravity); - public void MoveBy(int dx, int dy) { - clutter_actor_move_by(Handle, dx, dy); + public void SetScaleWithGravity(float scale_x, float scale_y, Clutter.Gravity gravity) { + clutter_actor_set_scale_with_gravity(Handle, scale_x, scale_y, (int) gravity); } [DllImport("clutter")] + static extern void clutter_actor_remove_clip(IntPtr raw); + + public void RemoveClip() { + clutter_actor_remove_clip(Handle); + } + + [DllImport("clutter")] static extern void clutter_actor_reparent(IntPtr raw, IntPtr new_parent); public void Reparent(Clutter.Actor new_parent) { @@ -490,13 +543,24 @@ } [DllImport("clutter")] - static extern void clutter_actor_get_size(IntPtr raw, out uint width, out uint height); + static extern void clutter_actor_query_coords(IntPtr raw, ref Clutter.ActorBox box); - public void GetSize(out uint width, out uint height) { - clutter_actor_get_size(Handle, out width, out height); + public void QueryCoords(Clutter.ActorBox box) { + clutter_actor_query_coords(Handle, ref box); } [DllImport("clutter")] + static extern int clutter_actor_get_ryangx(IntPtr raw); + + public int Ryangx { + get { + int raw_ret = clutter_actor_get_ryangx(Handle); + int ret = raw_ret; + return ret; + } + } + + [DllImport("clutter")] static extern byte clutter_actor_get_opacity(IntPtr raw); [DllImport("clutter")] @@ -566,10 +630,10 @@ } [DllImport("clutter")] - static extern void clutter_actor_set_position(IntPtr raw, int x, int y); + static extern void clutter_actor_rotate_x(IntPtr raw, float angle, int y, int z); - public void SetPosition(int x, int y) { - clutter_actor_set_position(Handle, x, y); + public void RotateX(float angle, int y, int z) { + clutter_actor_rotate_x(Handle, angle, y, z); } [DllImport("clutter")] @@ -608,10 +672,14 @@ } [DllImport("clutter")] - static extern void clutter_actor_rotate_z(IntPtr raw, float angle, int x, int y); + static extern int clutter_actor_get_rxangx(IntPtr raw); - public void RotateZ(float angle, int x, int y) { - clutter_actor_rotate_z(Handle, angle, x, y); + public int Rxangx { + get { + int raw_ret = clutter_actor_get_rxangx(Handle); + int ret = raw_ret; + return ret; + } } [DllImport("clutter")] @@ -622,17 +690,17 @@ } [DllImport("clutter")] - static extern void clutter_actor_remove_clip(IntPtr raw); + static extern void clutter_actor_get_size(IntPtr raw, out uint width, out uint height); - public void RemoveClip() { - clutter_actor_remove_clip(Handle); + public void GetSize(out uint width, out uint height) { + clutter_actor_get_size(Handle, out width, out height); } [DllImport("clutter")] - static extern void clutter_actor_request_coords(IntPtr raw, IntPtr box); + static extern void clutter_actor_request_coords(IntPtr raw, ref Clutter.ActorBox box); public void RequestCoords(Clutter.ActorBox box) { - clutter_actor_request_coords(Handle, box == null ? IntPtr.Zero : box.Handle); + clutter_actor_request_coords(Handle, ref box); } [DllImport("clutter")] @@ -643,10 +711,10 @@ } [DllImport("clutter")] - static extern void clutter_actor_paint(IntPtr raw); + static extern void clutter_actor_get_vertices(IntPtr raw, Clutter.Vertex[] verts); - public void Paint() { - clutter_actor_paint(Handle); + public void GetVertices(Clutter.Vertex[] verts) { + clutter_actor_get_vertices(Handle, verts); } [DllImport("clutter")] @@ -657,6 +725,27 @@ } [DllImport("clutter")] + static extern void clutter_actor_set_position(IntPtr raw, int x, int y); + + public void SetPosition(int x, int y) { + clutter_actor_set_position(Handle, x, y); + } + + [DllImport("clutter")] + static extern void clutter_actor_rotate_zx(IntPtr raw, int angle, int x, int y); + + public void RotateZx(int angle, int x, int y) { + clutter_actor_rotate_zx(Handle, angle, x, y); + } + + [DllImport("clutter")] + static extern void clutter_actor_realize(IntPtr raw); + + public void Realize() { + clutter_actor_realize(Handle); + } + + [DllImport("clutter")] static extern void clutter_actor_get_scale(IntPtr raw, out double scale_x, out double scale_y); public void GetScale(out double scale_x, out double scale_y) { Index: clutter/src/clutter-sharp.dll.config.in =================================================================== --- clutter/src/clutter-sharp.dll.config.in (revision 1158) +++ clutter/src/clutter-sharp.dll.config.in (working copy) @@ -1,4 +1,4 @@ - + Index: clutter/src/Vertex.cs =================================================================== --- clutter/src/Vertex.cs (revision 0) +++ clutter/src/Vertex.cs (revision 0) @@ -0,0 +1,61 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Clutter { + + using System; + using System.Collections; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public struct Vertex { + + public int X; + public int Y; + public int Z; + + public static Clutter.Vertex Zero = new Clutter.Vertex (); + + public static Clutter.Vertex New(IntPtr raw) { + if (raw == IntPtr.Zero) { + return Clutter.Vertex.Zero; + } + Clutter.Vertex self = new Clutter.Vertex(); + self = (Clutter.Vertex) Marshal.PtrToStructure (raw, self.GetType ()); + return self; + } + + [DllImport("clutter")] + static extern IntPtr clutter_vertex_get_type(); + + public static GLib.GType GType { + get { + IntPtr raw_ret = clutter_vertex_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("glibsharpglue-2")] + static extern IntPtr glibsharp_value_get_boxed (ref GLib.Value val); + + [DllImport("glibsharpglue-2")] + static extern void glibsharp_value_set_boxed (ref GLib.Value val, ref Clutter.Vertex boxed); + + public static explicit operator GLib.Value (Clutter.Vertex boxed) + { + GLib.Value val = GLib.Value.Empty; + val.Init (Clutter.Vertex.GType); + glibsharp_value_set_boxed (ref val, ref boxed); + return val; + } + + public static explicit operator Clutter.Vertex (GLib.Value val) + { + IntPtr boxed_ptr = glibsharp_value_get_boxed (ref val); + return New (boxed_ptr); + } +#endregion + } +} Index: clutter/src/Label.cs =================================================================== --- clutter/src/Label.cs (revision 1158) +++ clutter/src/Label.cs (working copy) @@ -8,7 +8,7 @@ using System.Runtime.InteropServices; #region Autogenerated code - public class Label : Clutter.Actor { + public class Label : Clutter.Actor, Clutter.Layout { ~Label() { @@ -296,6 +296,50 @@ } } + [DllImport("clutter")] + static extern void clutter_layout_natural_request(IntPtr raw, out int width, out int height); + + public void NaturalRequest(out int width, out int height) { + clutter_layout_natural_request(Handle, out width, out height); + } + + [DllImport("clutter")] + static extern void clutter_layout_height_for_width(IntPtr raw, int width, out int height); + + public int HeightForWidth(int width) { + int height; + clutter_layout_height_for_width(Handle, width, out height); + return height; + } + + [DllImport("clutter")] + static extern void clutter_layout_width_for_height(IntPtr raw, out int width, int height); + + public int WidthForHeight(int height) { + int width; + clutter_layout_width_for_height(Handle, out width, height); + return width; + } + + [DllImport("clutter")] + static extern void clutter_layout_tune_request(IntPtr raw, int given_width, int given_height, out int width, out int height); + + public void TuneRequest(int given_width, int given_height, out int width, out int height) { + clutter_layout_tune_request(Handle, given_width, given_height, out width, out height); + } + + [DllImport("clutter")] + static extern int clutter_layout_get_layout_flags(IntPtr raw); + + [GLib.Property ("layout-flags")] + public Clutter.LayoutFlags LayoutFlags { + get { + int raw_ret = clutter_layout_get_layout_flags(Handle); + Clutter.LayoutFlags ret = (Clutter.LayoutFlags) raw_ret; + return ret; + } + } + #endregion } } Index: clutter/src/PackType.cs =================================================================== --- clutter/src/PackType.cs (revision 0) +++ clutter/src/PackType.cs (revision 0) @@ -0,0 +1,28 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Clutter { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Clutter.PackTypeGType))] + public enum PackType { + + Start, + End, + } + + internal class PackTypeGType { + [DllImport ("clutter")] + static extern IntPtr clutter_pack_type_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (clutter_pack_type_get_type ()); + } + } + } +#endregion +} Index: clutter/src/TimeoutPool.cs =================================================================== --- clutter/src/TimeoutPool.cs (revision 0) +++ clutter/src/TimeoutPool.cs (revision 0) @@ -0,0 +1,32 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Clutter { + + using System; + using System.Collections; + using System.Runtime.InteropServices; + +#region Autogenerated code + public class TimeoutPool : GLib.Opaque { + + [DllImport("clutter")] + static extern void clutter_timeout_pool_remove(IntPtr raw, uint id); + + public void Remove(uint id) { + clutter_timeout_pool_remove(Handle, id); + } + + public TimeoutPool(IntPtr raw) : base(raw) {} + + [DllImport("clutter")] + static extern IntPtr clutter_timeout_pool_new(int priority); + + public TimeoutPool (int priority) + { + Raw = clutter_timeout_pool_new(priority); + } + +#endregion + } +} Index: clutter/src/Container.cs =================================================================== --- clutter/src/Container.cs (revision 0) +++ clutter/src/Container.cs (revision 0) @@ -0,0 +1,23 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Clutter { + + using System; + +#region Autogenerated code + public interface Container : GLib.IWrapper { + + event Clutter.ActorRemovedHandler ActorRemoved; + event Clutter.ActorAddedHandler ActorAdded; + void AddActor(Clutter.Actor actor); + void RemoveValist(Clutter.Actor first_actor, IntPtr var_args); + void AddValist(Clutter.Actor first_actor, IntPtr var_args); + void RemoveActor(Clutter.Actor actor); + void Foreach(Clutter.Callback cb); + GLib.List Children { + get; + } + } +#endregion +} Index: clutter/src/Backend.cs =================================================================== --- clutter/src/Backend.cs (revision 0) +++ clutter/src/Backend.cs (revision 0) @@ -0,0 +1,74 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Clutter { + + using System; + using System.Collections; + using System.Runtime.InteropServices; + +#region Autogenerated code + public class Backend : GLib.Object { + + ~Backend() + { + Dispose(); + } + + [Obsolete] + protected Backend(GLib.GType gtype) : base(gtype) {} + public Backend(IntPtr raw) : base(raw) {} + + protected Backend() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + [DllImport("clutter")] + static extern uint clutter_backend_get_double_click_distance(IntPtr raw); + + [DllImport("clutter")] + static extern void clutter_backend_set_double_click_distance(IntPtr raw, uint distance); + + public uint DoubleClickDistance { + get { + uint raw_ret = clutter_backend_get_double_click_distance(Handle); + uint ret = raw_ret; + return ret; + } + set { + clutter_backend_set_double_click_distance(Handle, value); + } + } + + [DllImport("clutter")] + static extern IntPtr clutter_backend_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = clutter_backend_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("clutter")] + static extern uint clutter_backend_get_double_click_time(IntPtr raw); + + [DllImport("clutter")] + static extern void clutter_backend_set_double_click_time(IntPtr raw, uint msec); + + public uint DoubleClickTime { + get { + uint raw_ret = clutter_backend_get_double_click_time(Handle); + uint ret = raw_ret; + return ret; + } + set { + clutter_backend_set_double_click_time(Handle, value); + } + } + +#endregion + } +} Index: clutter/src/Box.cs =================================================================== --- clutter/src/Box.cs (revision 0) +++ clutter/src/Box.cs (revision 0) @@ -0,0 +1,90 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Clutter { + + using System; + using System.Collections; + using System.Runtime.InteropServices; + +#region Autogenerated code + public class Box : Clutter.Actor { + + ~Box() + { + Dispose(); + } + + [Obsolete] + protected Box(GLib.GType gtype) : base(gtype) {} + public Box(IntPtr raw) : base(raw) {} + + protected Box() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + [DllImport("clutter")] + static extern uint clutter_box_get_spacing(IntPtr raw); + + [DllImport("clutter")] + static extern void clutter_box_set_spacing(IntPtr raw, uint spacing); + + [GLib.Property ("spacing")] + public uint Spacing { + get { + uint raw_ret = clutter_box_get_spacing(Handle); + uint ret = raw_ret; + return ret; + } + set { + clutter_box_set_spacing(Handle, value); + } + } + + [DllImport("clutter")] + static extern IntPtr clutter_box_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = clutter_box_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("clutter")] + static extern void clutter_box_pack_end(IntPtr raw, IntPtr actor); + + public void PackEnd(Clutter.Actor actor) { + clutter_box_pack_end(Handle, actor == null ? IntPtr.Zero : actor.Handle); + } + + [DllImport("clutter")] + static extern bool clutter_box_query_child(IntPtr raw, IntPtr actor, ref Clutter.BoxChild child); + + public bool QueryChild(Clutter.Actor actor, Clutter.BoxChild child) { + bool raw_ret = clutter_box_query_child(Handle, actor == null ? IntPtr.Zero : actor.Handle, ref child); + bool ret = raw_ret; + return ret; + } + + [DllImport("clutter")] + static extern bool clutter_box_query_nth_child(IntPtr raw, int index, ref Clutter.BoxChild child); + + public bool QueryNthChild(int index, Clutter.BoxChild child) { + bool raw_ret = clutter_box_query_nth_child(Handle, index, ref child); + bool ret = raw_ret; + return ret; + } + + [DllImport("clutter")] + static extern void clutter_box_pack_start(IntPtr raw, IntPtr actor); + + public void PackStart(Clutter.Actor actor) { + clutter_box_pack_start(Handle, actor == null ? IntPtr.Zero : actor.Handle); + } + +#endregion + } +} Index: clutter/src/Feature.cs =================================================================== --- clutter/src/Feature.cs (revision 1158) +++ clutter/src/Feature.cs (working copy) @@ -19,13 +19,6 @@ } [DllImport("clutter")] - static extern void clutter_feature_wait_for_vblank(); - - public static void WaitForVblank() { - clutter_feature_wait_for_vblank(); - } - - [DllImport("clutter")] static extern int clutter_feature_get_all(); public static Clutter.FeatureFlags All { Index: clutter/src/ScrollEventHandler.cs =================================================================== --- clutter/src/ScrollEventHandler.cs (revision 0) +++ clutter/src/ScrollEventHandler.cs (revision 0) @@ -0,0 +1,18 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Clutter { + + using System; + + public delegate void ScrollEventHandler(object o, ScrollEventArgs args); + + public class ScrollEventArgs : GLib.SignalArgs { + public Clutter.ScrollEvent Event{ + get { + return (Clutter.ScrollEvent) Args[0]; + } + } + + } +} Index: clutter/src/ScrollDirection.cs =================================================================== --- clutter/src/ScrollDirection.cs (revision 0) +++ clutter/src/ScrollDirection.cs (revision 0) @@ -0,0 +1,30 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Clutter { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Clutter.ScrollDirectionGType))] + public enum ScrollDirection { + + Up, + Down, + Left, + Right, + } + + internal class ScrollDirectionGType { + [DllImport ("clutter")] + static extern IntPtr clutter_scroll_direction_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (clutter_scroll_direction_get_type ()); + } + } + } +#endregion +} Index: clutter/src/Texture.cs =================================================================== --- clutter/src/Texture.cs (revision 1158) +++ clutter/src/Texture.cs (working copy) @@ -112,9 +112,6 @@ [DllImport("clutter")] static extern IntPtr clutter_texture_get_pixbuf(IntPtr raw); - [DllImport("clutter")] - static extern void clutter_texture_set_pixbuf(IntPtr raw, IntPtr pixbuf); - [GLib.Property ("pixbuf")] public Gdk.Pixbuf Pixbuf { get { @@ -122,8 +119,10 @@ Gdk.Pixbuf ret = GLib.Object.GetObject(raw_ret) as Gdk.Pixbuf; return ret; } - set { - clutter_texture_set_pixbuf(Handle, value == null ? IntPtr.Zero : value.Handle); + set { + GLib.Value val = new GLib.Value(value); + SetProperty("pixbuf", val); + val.Dispose (); } } @@ -294,6 +293,28 @@ } [DllImport("clutter")] + static extern unsafe bool clutter_texture_set_pixbuf(IntPtr raw, IntPtr pixbuf, out IntPtr error); + + public unsafe bool SetPixbuf(Gdk.Pixbuf pixbuf) { + IntPtr error = IntPtr.Zero; + bool raw_ret = clutter_texture_set_pixbuf(Handle, pixbuf == null ? IntPtr.Zero : pixbuf.Handle, out error); + bool ret = raw_ret; + if (error != IntPtr.Zero) throw new GLib.GException (error); + return ret; + } + + [DllImport("clutter")] + static extern unsafe bool clutter_texture_set_from_yuv_data(IntPtr raw, out byte data, int width, int height, int flags, out IntPtr error); + + public unsafe bool SetFromYuvData(out byte data, int width, int height, Clutter.TextureFlags flags) { + IntPtr error = IntPtr.Zero; + bool raw_ret = clutter_texture_set_from_yuv_data(Handle, out data, width, height, (int) flags, out error); + bool ret = raw_ret; + if (error != IntPtr.Zero) throw new GLib.GException (error); + return ret; + } + + [DllImport("clutter")] static extern void clutter_texture_get_x_tile_detail(IntPtr raw, int x_index, out int pos, out int size, out int waste); public void GetXTileDetail(int x_index, out int pos, out int size, out int waste) { @@ -315,6 +336,17 @@ } [DllImport("clutter")] + static extern unsafe bool clutter_texture_set_from_rgb_data(IntPtr raw, out byte data, bool has_alpha, int width, int height, int rowstride, int bpp, int flags, out IntPtr error); + + public unsafe bool SetFromRgbData(out byte data, bool has_alpha, int width, int height, int rowstride, int bpp, Clutter.TextureFlags flags) { + IntPtr error = IntPtr.Zero; + bool raw_ret = clutter_texture_set_from_rgb_data(Handle, out data, has_alpha, width, height, rowstride, bpp, (int) flags, out error); + bool ret = raw_ret; + if (error != IntPtr.Zero) throw new GLib.GException (error); + return ret; + } + + [DllImport("clutter")] static extern bool clutter_texture_is_tiled(IntPtr raw); public bool IsTiled { @@ -326,15 +358,6 @@ } [DllImport("clutter")] - static extern void clutter_texture_set_from_data(IntPtr raw, out byte data, bool has_alpha, int width, int height, int rowstride, int bpp); - - public byte SetFromData(bool has_alpha, int width, int height, int rowstride, int bpp) { - byte data; - clutter_texture_set_from_data(Handle, out data, has_alpha, width, height, rowstride, bpp); - return data; - } - - [DllImport("clutter")] static extern void clutter_texture_get_n_tiles(IntPtr raw, out int n_x_tiles, out int n_y_tiles); public void GetNTiles(out int n_x_tiles, out int n_y_tiles) { Index: clutter/src/Smoothstep.cs =================================================================== --- clutter/src/Smoothstep.cs (revision 0) +++ clutter/src/Smoothstep.cs (revision 0) @@ -0,0 +1,32 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Clutter { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + public class Smoothstep { + + [DllImport("clutter")] + static extern uint clutter_smoothstep_dec_func(IntPtr alpha, IntPtr dummy); + + public static uint DecFunc(Clutter.Alpha alpha, IntPtr dummy) { + uint raw_ret = clutter_smoothstep_dec_func(alpha == null ? IntPtr.Zero : alpha.Handle, dummy); + uint ret = raw_ret; + return ret; + } + + [DllImport("clutter")] + static extern uint clutter_smoothstep_inc_func(IntPtr alpha, IntPtr dummy); + + public static uint IncFunc(Clutter.Alpha alpha, IntPtr dummy) { + uint raw_ret = clutter_smoothstep_inc_func(alpha == null ? IntPtr.Zero : alpha.Handle, dummy); + uint ret = raw_ret; + return ret; + } + +#endregion + } +} Index: clutter/src/InitError.cs =================================================================== --- clutter/src/InitError.cs (revision 1158) +++ clutter/src/InitError.cs (working copy) @@ -13,9 +13,8 @@ Success = 1, ErrorUnkown, ErrorThreads = -1, - ErrorDisplay = -2, + ErrorBackend = -2, ErrorInternal = -3, - ErrorOpengl = -4, } internal class InitErrorGType { Index: clutter/src/CursorEventHandler.cs =================================================================== --- clutter/src/CursorEventHandler.cs (revision 0) +++ clutter/src/CursorEventHandler.cs (revision 0) @@ -0,0 +1,18 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Clutter { + + using System; + + public delegate void CursorEventHandler(object o, CursorEventArgs args); + + public class CursorEventArgs : GLib.SignalArgs { + public Clutter.Geometry Geometry{ + get { + return (Clutter.Geometry) Args[0]; + } + } + + } +} Index: clutter/src/Layout.cs =================================================================== --- clutter/src/Layout.cs (revision 0) +++ clutter/src/Layout.cs (revision 0) @@ -0,0 +1,20 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Clutter { + + using System; + +#region Autogenerated code + public interface Layout : GLib.IWrapper { + + void NaturalRequest(out int width, out int height); + int HeightForWidth(int width); + int WidthForHeight(int height); + void TuneRequest(int given_width, int given_height, out int width, out int height); + Clutter.LayoutFlags LayoutFlags { + get; + } + } +#endregion +} Index: clutter/src/TextureFlags.cs =================================================================== --- clutter/src/TextureFlags.cs (revision 0) +++ clutter/src/TextureFlags.cs (revision 0) @@ -0,0 +1,30 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Clutter { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + [GLib.GType (typeof (Clutter.TextureFlagsGType))] + public enum TextureFlags { + + RgbFlagBgr = 1 << 1, + RgbFlagPremult = 1 << 2, + YuvFlagYuv2 = 1 << 3, + } + + internal class TextureFlagsGType { + [DllImport ("clutter")] + static extern IntPtr clutter_texture_flags_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (clutter_texture_flags_get_type ()); + } + } + } +#endregion +} Index: clutter/src/RotateAxis.cs =================================================================== --- clutter/src/RotateAxis.cs (revision 0) +++ clutter/src/RotateAxis.cs (revision 0) @@ -0,0 +1,29 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Clutter { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Clutter.RotateAxisGType))] + public enum RotateAxis { + + XAxis, + YAxis, + ZAxis, + } + + internal class RotateAxisGType { + [DllImport ("clutter")] + static extern IntPtr clutter_rotate_axis_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (clutter_rotate_axis_get_type ()); + } + } + } +#endregion +} Index: clutter/src/ActorRemovedHandler.cs =================================================================== --- clutter/src/ActorRemovedHandler.cs (revision 0) +++ clutter/src/ActorRemovedHandler.cs (revision 0) @@ -0,0 +1,18 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Clutter { + + using System; + + public delegate void ActorRemovedHandler(object o, ActorRemovedArgs args); + + public class ActorRemovedArgs : GLib.SignalArgs { + public Clutter.Actor Actor{ + get { + return (Clutter.Actor) Args[0]; + } + } + + } +} Index: clutter/src/ActorAddedHandler.cs =================================================================== --- clutter/src/ActorAddedHandler.cs (revision 0) +++ clutter/src/ActorAddedHandler.cs (revision 0) @@ -0,0 +1,18 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Clutter { + + using System; + + public delegate void ActorAddedHandler(object o, ActorAddedArgs args); + + public class ActorAddedArgs : GLib.SignalArgs { + public Clutter.Actor Actor{ + get { + return (Clutter.Actor) Args[0]; + } + } + + } +} Index: clutter/src/EffectTemplate.cs =================================================================== --- clutter/src/EffectTemplate.cs (revision 0) +++ clutter/src/EffectTemplate.cs (revision 0) @@ -0,0 +1,76 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Clutter { + + using System; + using System.Collections; + using System.Runtime.InteropServices; + +#region Autogenerated code + public class EffectTemplate : GLib.Object { + + ~EffectTemplate() + { + Dispose(); + } + + [Obsolete] + protected EffectTemplate(GLib.GType gtype) : base(gtype) {} + public EffectTemplate(IntPtr raw) : base(raw) {} + + [DllImport("clutter")] + static extern IntPtr clutter_effect_template_new(IntPtr timeline, ClutterSharp.AlphaFuncNative alpha_func); + + public EffectTemplate (Clutter.Timeline timeline, Clutter.AlphaFunc alpha_func) : base (IntPtr.Zero) + { + if (GetType () != typeof (EffectTemplate)) { + ArrayList vals = new ArrayList(); + ArrayList names = new ArrayList(); + if (timeline != null) { + names.Add ("timeline"); + vals.Add (new GLib.Value (timeline)); + } + names.Add ("alpha_func"); + vals.Add (new GLib.Value (alpha_func)); + CreateNativeObject ((string[])names.ToArray (typeof (string)), (GLib.Value[])vals.ToArray (typeof (GLib.Value))); + return; + } + ClutterSharp.AlphaFuncWrapper alpha_func_wrapper = new ClutterSharp.AlphaFuncWrapper (alpha_func); + Raw = clutter_effect_template_new(timeline == null ? IntPtr.Zero : timeline.Handle, alpha_func_wrapper.NativeDelegate); + } + + [GLib.Property ("alpha-func")] + public IntPtr AlphaFunc { + get { + GLib.Value val = GetProperty ("alpha-func"); + IntPtr ret = (IntPtr) val; + val.Dispose (); + return ret; + } + } + + [GLib.Property ("timeline")] + public Clutter.Timeline Timeline { + get { + GLib.Value val = GetProperty ("timeline"); + Clutter.Timeline ret = (Clutter.Timeline) val; + val.Dispose (); + return ret; + } + } + + [DllImport("clutter")] + static extern IntPtr clutter_effect_template_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = clutter_effect_template_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + +#endregion + } +} Index: clutter/src/KeyEvent.cs =================================================================== --- clutter/src/KeyEvent.cs (revision 1158) +++ clutter/src/KeyEvent.cs (working copy) @@ -13,7 +13,7 @@ public Clutter.EventType Type; public uint Time; - public uint ModifierState; + public Clutter.ModifierType ModifierState; public uint Keyval; public ushort HardwareKeycode; @@ -55,15 +55,6 @@ return ret; } - [DllImport("clutter")] - static extern uint clutter_key_event_state(ref Clutter.KeyEvent raw); - - public uint State() { - uint raw_ret = clutter_key_event_state(ref this); - uint ret = raw_ret; - return ret; - } - private static GLib.GType GType { get { return GLib.GType.Pointer; } } Index: clutter/src/Group.cs =================================================================== --- clutter/src/Group.cs (revision 1158) +++ clutter/src/Group.cs (working copy) @@ -8,7 +8,7 @@ using System.Runtime.InteropServices; #region Autogenerated code - public class Group : Clutter.Actor { + public class Group : Clutter.Actor, Clutter.Container { ~Group() { @@ -156,18 +156,11 @@ } [DllImport("clutter")] - static extern void clutter_group_sort_depth_order(IntPtr raw); + static extern void clutter_group_add_many_valist(IntPtr raw, IntPtr first_actor, IntPtr var_args); - public void SortDepthOrder() { - clutter_group_sort_depth_order(Handle); - } - - [DllImport("clutter")] - static extern void clutter_group_show_all(IntPtr raw); - [Obsolete] - public new void ShowAll() { - clutter_group_show_all(Handle); + public void AddManyValist(Clutter.Actor first_actor, IntPtr var_args) { + clutter_group_add_many_valist(Handle, first_actor == null ? IntPtr.Zero : first_actor.Handle, var_args); } [DllImport("clutter")] @@ -182,6 +175,7 @@ [DllImport("clutter")] static extern void clutter_group_remove(IntPtr raw, IntPtr actor); + [Obsolete] public void Remove(Clutter.Actor actor) { clutter_group_remove(Handle, actor == null ? IntPtr.Zero : actor.Handle); } @@ -201,6 +195,32 @@ } [DllImport("clutter")] + static extern void clutter_group_sort_depth_order(IntPtr raw); + + public void SortDepthOrder() { + clutter_group_sort_depth_order(Handle); + } + + [DllImport("clutter")] + static extern int clutter_group_get_n_children(IntPtr raw); + + public int NChildren { + get { + int raw_ret = clutter_group_get_n_children(Handle); + int ret = raw_ret; + return ret; + } + } + + [DllImport("clutter")] + static extern void clutter_group_add(IntPtr raw, IntPtr actor); + + [Obsolete] + public void Add(Clutter.Actor actor) { + clutter_group_add(Handle, actor == null ? IntPtr.Zero : actor.Handle); + } + + [DllImport("clutter")] static extern IntPtr clutter_group_find_child_by_id(IntPtr raw, uint id); public Clutter.Actor FindChildById(uint id) { @@ -210,75 +230,194 @@ } [DllImport("clutter")] - static extern void clutter_group_hide_all(IntPtr raw); + static extern IntPtr clutter_group_get_type(); - [Obsolete] - public new void HideAll() { - clutter_group_hide_all(Handle); + public static new GLib.GType GType { + get { + IntPtr raw_ret = clutter_group_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } } [DllImport("clutter")] - static extern void clutter_group_add_many_valist(IntPtr raw, IntPtr first_actor, IntPtr args); + static extern void clutter_group_remove_all(IntPtr raw); - public void AddManyValist(Clutter.Actor first_actor, IntPtr args) { - clutter_group_add_many_valist(Handle, first_actor == null ? IntPtr.Zero : first_actor.Handle, args); + public void RemoveAll() { + clutter_group_remove_all(Handle); } [DllImport("clutter")] - static extern int clutter_group_get_n_children(IntPtr raw); + static extern void clutter_container_add_actor(IntPtr raw, IntPtr actor); - public int NChildren { - get { - int raw_ret = clutter_group_get_n_children(Handle); - int ret = raw_ret; - return ret; - } + public void AddActor(Clutter.Actor actor) { + clutter_container_add_actor(Handle, actor == null ? IntPtr.Zero : actor.Handle); } [DllImport("clutter")] - static extern void clutter_group_add(IntPtr raw, IntPtr actor); + static extern void clutter_container_remove_valist(IntPtr raw, IntPtr first_actor, IntPtr var_args); - public void Add(Clutter.Actor actor) { - clutter_group_add(Handle, actor == null ? IntPtr.Zero : actor.Handle); + public void RemoveValist(Clutter.Actor first_actor, IntPtr var_args) { + clutter_container_remove_valist(Handle, first_actor == null ? IntPtr.Zero : first_actor.Handle, var_args); } [DllImport("clutter")] - static extern void clutter_group_foreach(IntPtr raw, ClutterSharp.CallbackNative cb, IntPtr user_data); + static extern void clutter_container_add_valist(IntPtr raw, IntPtr first_actor, IntPtr var_args); + public void AddValist(Clutter.Actor first_actor, IntPtr var_args) { + clutter_container_add_valist(Handle, first_actor == null ? IntPtr.Zero : first_actor.Handle, var_args); + } + + [DllImport("clutter")] + static extern void clutter_container_remove_actor(IntPtr raw, IntPtr actor); + + public void RemoveActor(Clutter.Actor actor) { + clutter_container_remove_actor(Handle, actor == null ? IntPtr.Zero : actor.Handle); + } + + [DllImport("clutter")] + static extern void clutter_container_foreach(IntPtr raw, ClutterSharp.CallbackNative cb, IntPtr user_data); + public void Foreach(Clutter.Callback cb) { ClutterSharp.CallbackWrapper cb_wrapper = new ClutterSharp.CallbackWrapper (cb); - clutter_group_foreach(Handle, cb_wrapper.NativeDelegate, IntPtr.Zero); + clutter_container_foreach(Handle, cb_wrapper.NativeDelegate, IntPtr.Zero); } [DllImport("clutter")] - static extern IntPtr clutter_group_get_children(IntPtr raw); + static extern IntPtr clutter_container_get_children(IntPtr raw); public GLib.List Children { get { - IntPtr raw_ret = clutter_group_get_children(Handle); + IntPtr raw_ret = clutter_container_get_children(Handle); GLib.List ret = new GLib.List(raw_ret); return ret; } } - [DllImport("clutter")] - static extern IntPtr clutter_group_get_type(); + [GLib.CDeclCallback] + delegate void ActorRemovedSignalDelegate (IntPtr arg0, IntPtr arg1, IntPtr gch); - public static new GLib.GType GType { - get { - IntPtr raw_ret = clutter_group_get_type(); - GLib.GType ret = new GLib.GType(raw_ret); - return ret; + static void ActorRemovedSignalCallback (IntPtr arg0, IntPtr arg1, IntPtr gch) + { + GLib.Signal sig = ((GCHandle) gch).Target as GLib.Signal; + if (sig == null) + throw new Exception("Unknown signal GC handle received " + gch); + + Clutter.ActorRemovedArgs args = new Clutter.ActorRemovedArgs (); + args.Args = new object[1]; + args.Args[0] = GLib.Object.GetObject(arg1) as Clutter.Actor; + Clutter.ActorRemovedHandler handler = (Clutter.ActorRemovedHandler) sig.Handler; + handler (GLib.Object.GetObject (arg0), args); + + } + + [GLib.CDeclCallback] + delegate void ActorRemovedVMDelegate (IntPtr container, IntPtr actor); + + static ActorRemovedVMDelegate ActorRemovedVMCallback; + + static void actorremoved_cb (IntPtr container, IntPtr actor) + { + Group container_managed = GLib.Object.GetObject (container, false) as Group; + container_managed.OnActorRemoved (GLib.Object.GetObject(actor) as Clutter.Actor); + } + + private static void OverrideActorRemoved (GLib.GType gtype) + { + if (ActorRemovedVMCallback == null) + ActorRemovedVMCallback = new ActorRemovedVMDelegate (actorremoved_cb); + OverrideVirtualMethod (gtype, "actor-removed", ActorRemovedVMCallback); + } + + [GLib.DefaultSignalHandler(Type=typeof(Clutter.Group), ConnectionMethod="OverrideActorRemoved")] + protected virtual void OnActorRemoved (Clutter.Actor actor) + { + GLib.Value ret = GLib.Value.Empty; + GLib.ValueArray inst_and_params = new GLib.ValueArray (2); + GLib.Value[] vals = new GLib.Value [2]; + vals [0] = new GLib.Value (this); + inst_and_params.Append (vals [0]); + vals [1] = new GLib.Value (actor); + inst_and_params.Append (vals [1]); + g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret); + foreach (GLib.Value v in vals) + v.Dispose (); + } + + [GLib.Signal("actor-removed")] + public event Clutter.ActorRemovedHandler ActorRemoved { + add { + GLib.Signal sig = GLib.Signal.Lookup (this, "actor-removed", new ActorRemovedSignalDelegate(ActorRemovedSignalCallback)); + sig.AddDelegate (value); } + remove { + GLib.Signal sig = GLib.Signal.Lookup (this, "actor-removed", new ActorRemovedSignalDelegate(ActorRemovedSignalCallback)); + sig.RemoveDelegate (value); + } } - [DllImport("clutter")] - static extern void clutter_group_remove_all(IntPtr raw); + [GLib.CDeclCallback] + delegate void ActorAddedSignalDelegate (IntPtr arg0, IntPtr arg1, IntPtr gch); - public void RemoveAll() { - clutter_group_remove_all(Handle); + static void ActorAddedSignalCallback (IntPtr arg0, IntPtr arg1, IntPtr gch) + { + GLib.Signal sig = ((GCHandle) gch).Target as GLib.Signal; + if (sig == null) + throw new Exception("Unknown signal GC handle received " + gch); + + Clutter.ActorAddedArgs args = new Clutter.ActorAddedArgs (); + args.Args = new object[1]; + args.Args[0] = GLib.Object.GetObject(arg1) as Clutter.Actor; + Clutter.ActorAddedHandler handler = (Clutter.ActorAddedHandler) sig.Handler; + handler (GLib.Object.GetObject (arg0), args); + } + [GLib.CDeclCallback] + delegate void ActorAddedVMDelegate (IntPtr container, IntPtr actor); + + static ActorAddedVMDelegate ActorAddedVMCallback; + + static void actoradded_cb (IntPtr container, IntPtr actor) + { + Group container_managed = GLib.Object.GetObject (container, false) as Group; + container_managed.OnActorAdded (GLib.Object.GetObject(actor) as Clutter.Actor); + } + + private static void OverrideActorAdded (GLib.GType gtype) + { + if (ActorAddedVMCallback == null) + ActorAddedVMCallback = new ActorAddedVMDelegate (actoradded_cb); + OverrideVirtualMethod (gtype, "actor-added", ActorAddedVMCallback); + } + + [GLib.DefaultSignalHandler(Type=typeof(Clutter.Group), ConnectionMethod="OverrideActorAdded")] + protected virtual void OnActorAdded (Clutter.Actor actor) + { + GLib.Value ret = GLib.Value.Empty; + GLib.ValueArray inst_and_params = new GLib.ValueArray (2); + GLib.Value[] vals = new GLib.Value [2]; + vals [0] = new GLib.Value (this); + inst_and_params.Append (vals [0]); + vals [1] = new GLib.Value (actor); + inst_and_params.Append (vals [1]); + g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret); + foreach (GLib.Value v in vals) + v.Dispose (); + } + + [GLib.Signal("actor-added")] + public event Clutter.ActorAddedHandler ActorAdded { + add { + GLib.Signal sig = GLib.Signal.Lookup (this, "actor-added", new ActorAddedSignalDelegate(ActorAddedSignalCallback)); + sig.AddDelegate (value); + } + remove { + GLib.Signal sig = GLib.Signal.Lookup (this, "actor-added", new ActorAddedSignalDelegate(ActorAddedSignalCallback)); + sig.RemoveDelegate (value); + } + } + #endregion } } Index: clutter/src/RotateDirection.cs =================================================================== --- clutter/src/RotateDirection.cs (revision 0) +++ clutter/src/RotateDirection.cs (revision 0) @@ -0,0 +1,28 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Clutter { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Clutter.RotateDirectionGType))] + public enum RotateDirection { + + Cw, + Ccw, + } + + internal class RotateDirectionGType { + [DllImport ("clutter")] + static extern IntPtr clutter_rotate_direction_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (clutter_rotate_direction_get_type ()); + } + } + } +#endregion +} Index: clutter/src/Stage.cs =================================================================== --- clutter/src/Stage.cs (revision 1158) +++ clutter/src/Stage.cs (working copy) @@ -24,34 +24,54 @@ CreateNativeObject (new string [0], new GLib.Value [0]); } - [GLib.Property ("hide-cursor")] - public bool HideCursor { + [DllImport("clutter")] + static extern void clutter_stage_set_color(IntPtr raw, ref Clutter.Color color); + + [GLib.Property ("color")] + public Clutter.Color Color { get { - GLib.Value val = GetProperty ("hide-cursor"); + GLib.Value val = GetProperty ("color"); + Clutter.Color ret = (Clutter.Color) val; + val.Dispose (); + return ret; + } + set { + clutter_stage_set_color(Handle, ref value); + } + } + + [GLib.Property ("cursor-visible")] + public bool CursorVisible { + get { + GLib.Value val = GetProperty ("cursor-visible"); bool ret = (bool) val; val.Dispose (); return ret; } set { GLib.Value val = new GLib.Value(value); - SetProperty("hide-cursor", val); + SetProperty("cursor-visible", val); val.Dispose (); } } [DllImport("clutter")] - static extern void clutter_stage_set_color(IntPtr raw, ref Clutter.Color color); + static extern IntPtr clutter_stage_get_title(IntPtr raw); - [GLib.Property ("color")] - public Clutter.Color Color { - get { - GLib.Value val = GetProperty ("color"); - Clutter.Color ret = (Clutter.Color) val; - val.Dispose (); + [DllImport("clutter")] + static extern void clutter_stage_set_title(IntPtr raw, IntPtr title); + + [GLib.Property ("title")] + public string Title { + get { + IntPtr raw_ret = clutter_stage_get_title(Handle); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); return ret; } set { - clutter_stage_set_color(Handle, ref value); + IntPtr title_as_native = GLib.Marshaller.StringToPtrGStrdup (value); + clutter_stage_set_title(Handle, title_as_native); + GLib.Marshaller.Free (title_as_native); } } @@ -86,6 +106,68 @@ } [GLib.CDeclCallback] + delegate void ScrollEventSignalDelegate (IntPtr arg0, ref Clutter.ScrollEvent arg1, IntPtr gch); + + static void ScrollEventSignalCallback (IntPtr arg0, ref Clutter.ScrollEvent arg1, IntPtr gch) + { + GLib.Signal sig = ((GCHandle) gch).Target as GLib.Signal; + if (sig == null) + throw new Exception("Unknown signal GC handle received " + gch); + + Clutter.ScrollEventArgs args = new Clutter.ScrollEventArgs (); + args.Args = new object[1]; + args.Args[0] = arg1; + Clutter.ScrollEventHandler handler = (Clutter.ScrollEventHandler) sig.Handler; + handler (GLib.Object.GetObject (arg0), args); + + } + + [GLib.CDeclCallback] + delegate void ScrollEventVMDelegate (IntPtr stage, ref Clutter.ScrollEvent evnt); + + static ScrollEventVMDelegate ScrollEventVMCallback; + + static void scrollevent_cb (IntPtr stage, ref Clutter.ScrollEvent evnt) + { + Stage stage_managed = GLib.Object.GetObject (stage, false) as Stage; + stage_managed.OnScrollEvent (evnt); + } + + private static void OverrideScrollEvent (GLib.GType gtype) + { + if (ScrollEventVMCallback == null) + ScrollEventVMCallback = new ScrollEventVMDelegate (scrollevent_cb); + OverrideVirtualMethod (gtype, "scroll-event", ScrollEventVMCallback); + } + + [GLib.DefaultSignalHandler(Type=typeof(Clutter.Stage), ConnectionMethod="OverrideScrollEvent")] + protected virtual void OnScrollEvent (Clutter.ScrollEvent evnt) + { + GLib.Value ret = GLib.Value.Empty; + GLib.ValueArray inst_and_params = new GLib.ValueArray (2); + GLib.Value[] vals = new GLib.Value [2]; + vals [0] = new GLib.Value (this); + inst_and_params.Append (vals [0]); + vals [1] = new GLib.Value (evnt); + inst_and_params.Append (vals [1]); + g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret); + foreach (GLib.Value v in vals) + v.Dispose (); + } + + [GLib.Signal("scroll-event")] + public event Clutter.ScrollEventHandler ScrollEvent { + add { + GLib.Signal sig = GLib.Signal.Lookup (this, "scroll-event", new ScrollEventSignalDelegate(ScrollEventSignalCallback)); + sig.AddDelegate (value); + } + remove { + GLib.Signal sig = GLib.Signal.Lookup (this, "scroll-event", new ScrollEventSignalDelegate(ScrollEventSignalCallback)); + sig.RemoveDelegate (value); + } + } + + [GLib.CDeclCallback] delegate void MotionEventSignalDelegate (IntPtr arg0, ref Clutter.MotionEvent arg1, IntPtr gch); static void MotionEventSignalCallback (IntPtr arg0, ref Clutter.MotionEvent arg1, IntPtr gch) @@ -210,42 +292,42 @@ } [GLib.CDeclCallback] - delegate void ButtonReleaseEventSignalDelegate (IntPtr arg0, ref Clutter.ButtonEvent arg1, IntPtr gch); + delegate void KeyPressEventSignalDelegate (IntPtr arg0, ref Clutter.KeyEvent arg1, IntPtr gch); - static void ButtonReleaseEventSignalCallback (IntPtr arg0, ref Clutter.ButtonEvent arg1, IntPtr gch) + static void KeyPressEventSignalCallback (IntPtr arg0, ref Clutter.KeyEvent arg1, IntPtr gch) { GLib.Signal sig = ((GCHandle) gch).Target as GLib.Signal; if (sig == null) throw new Exception("Unknown signal GC handle received " + gch); - Clutter.ButtonReleaseEventArgs args = new Clutter.ButtonReleaseEventArgs (); + Clutter.KeyPressEventArgs args = new Clutter.KeyPressEventArgs (); args.Args = new object[1]; args.Args[0] = arg1; - Clutter.ButtonReleaseEventHandler handler = (Clutter.ButtonReleaseEventHandler) sig.Handler; + Clutter.KeyPressEventHandler handler = (Clutter.KeyPressEventHandler) sig.Handler; handler (GLib.Object.GetObject (arg0), args); } [GLib.CDeclCallback] - delegate void ButtonReleaseEventVMDelegate (IntPtr stage, ref Clutter.ButtonEvent evnt); + delegate void KeyPressEventVMDelegate (IntPtr stage, ref Clutter.KeyEvent evnt); - static ButtonReleaseEventVMDelegate ButtonReleaseEventVMCallback; + static KeyPressEventVMDelegate KeyPressEventVMCallback; - static void buttonreleaseevent_cb (IntPtr stage, ref Clutter.ButtonEvent evnt) + static void keypressevent_cb (IntPtr stage, ref Clutter.KeyEvent evnt) { Stage stage_managed = GLib.Object.GetObject (stage, false) as Stage; - stage_managed.OnButtonReleaseEvent (evnt); + stage_managed.OnKeyPressEvent (evnt); } - private static void OverrideButtonReleaseEvent (GLib.GType gtype) + private static void OverrideKeyPressEvent (GLib.GType gtype) { - if (ButtonReleaseEventVMCallback == null) - ButtonReleaseEventVMCallback = new ButtonReleaseEventVMDelegate (buttonreleaseevent_cb); - OverrideVirtualMethod (gtype, "button-release-event", ButtonReleaseEventVMCallback); + if (KeyPressEventVMCallback == null) + KeyPressEventVMCallback = new KeyPressEventVMDelegate (keypressevent_cb); + OverrideVirtualMethod (gtype, "key-press-event", KeyPressEventVMCallback); } - [GLib.DefaultSignalHandler(Type=typeof(Clutter.Stage), ConnectionMethod="OverrideButtonReleaseEvent")] - protected virtual void OnButtonReleaseEvent (Clutter.ButtonEvent evnt) + [GLib.DefaultSignalHandler(Type=typeof(Clutter.Stage), ConnectionMethod="OverrideKeyPressEvent")] + protected virtual void OnKeyPressEvent (Clutter.KeyEvent evnt) { GLib.Value ret = GLib.Value.Empty; GLib.ValueArray inst_and_params = new GLib.ValueArray (2); @@ -259,55 +341,55 @@ v.Dispose (); } - [GLib.Signal("button-release-event")] - public event Clutter.ButtonReleaseEventHandler ButtonReleaseEvent { + [GLib.Signal("key-press-event")] + public event Clutter.KeyPressEventHandler KeyPressEvent { add { - GLib.Signal sig = GLib.Signal.Lookup (this, "button-release-event", new ButtonReleaseEventSignalDelegate(ButtonReleaseEventSignalCallback)); + GLib.Signal sig = GLib.Signal.Lookup (this, "key-press-event", new KeyPressEventSignalDelegate(KeyPressEventSignalCallback)); sig.AddDelegate (value); } remove { - GLib.Signal sig = GLib.Signal.Lookup (this, "button-release-event", new ButtonReleaseEventSignalDelegate(ButtonReleaseEventSignalCallback)); + GLib.Signal sig = GLib.Signal.Lookup (this, "key-press-event", new KeyPressEventSignalDelegate(KeyPressEventSignalCallback)); sig.RemoveDelegate (value); } } [GLib.CDeclCallback] - delegate void KeyPressEventSignalDelegate (IntPtr arg0, ref Clutter.KeyEvent arg1, IntPtr gch); + delegate void ButtonReleaseEventSignalDelegate (IntPtr arg0, ref Clutter.ButtonEvent arg1, IntPtr gch); - static void KeyPressEventSignalCallback (IntPtr arg0, ref Clutter.KeyEvent arg1, IntPtr gch) + static void ButtonReleaseEventSignalCallback (IntPtr arg0, ref Clutter.ButtonEvent arg1, IntPtr gch) { GLib.Signal sig = ((GCHandle) gch).Target as GLib.Signal; if (sig == null) throw new Exception("Unknown signal GC handle received " + gch); - Clutter.KeyPressEventArgs args = new Clutter.KeyPressEventArgs (); + Clutter.ButtonReleaseEventArgs args = new Clutter.ButtonReleaseEventArgs (); args.Args = new object[1]; args.Args[0] = arg1; - Clutter.KeyPressEventHandler handler = (Clutter.KeyPressEventHandler) sig.Handler; + Clutter.ButtonReleaseEventHandler handler = (Clutter.ButtonReleaseEventHandler) sig.Handler; handler (GLib.Object.GetObject (arg0), args); } [GLib.CDeclCallback] - delegate void KeyPressEventVMDelegate (IntPtr stage, ref Clutter.KeyEvent evnt); + delegate void ButtonReleaseEventVMDelegate (IntPtr stage, ref Clutter.ButtonEvent evnt); - static KeyPressEventVMDelegate KeyPressEventVMCallback; + static ButtonReleaseEventVMDelegate ButtonReleaseEventVMCallback; - static void keypressevent_cb (IntPtr stage, ref Clutter.KeyEvent evnt) + static void buttonreleaseevent_cb (IntPtr stage, ref Clutter.ButtonEvent evnt) { Stage stage_managed = GLib.Object.GetObject (stage, false) as Stage; - stage_managed.OnKeyPressEvent (evnt); + stage_managed.OnButtonReleaseEvent (evnt); } - private static void OverrideKeyPressEvent (GLib.GType gtype) + private static void OverrideButtonReleaseEvent (GLib.GType gtype) { - if (KeyPressEventVMCallback == null) - KeyPressEventVMCallback = new KeyPressEventVMDelegate (keypressevent_cb); - OverrideVirtualMethod (gtype, "key-press-event", KeyPressEventVMCallback); + if (ButtonReleaseEventVMCallback == null) + ButtonReleaseEventVMCallback = new ButtonReleaseEventVMDelegate (buttonreleaseevent_cb); + OverrideVirtualMethod (gtype, "button-release-event", ButtonReleaseEventVMCallback); } - [GLib.DefaultSignalHandler(Type=typeof(Clutter.Stage), ConnectionMethod="OverrideKeyPressEvent")] - protected virtual void OnKeyPressEvent (Clutter.KeyEvent evnt) + [GLib.DefaultSignalHandler(Type=typeof(Clutter.Stage), ConnectionMethod="OverrideButtonReleaseEvent")] + protected virtual void OnButtonReleaseEvent (Clutter.ButtonEvent evnt) { GLib.Value ret = GLib.Value.Empty; GLib.ValueArray inst_and_params = new GLib.ValueArray (2); @@ -321,14 +403,14 @@ v.Dispose (); } - [GLib.Signal("key-press-event")] - public event Clutter.KeyPressEventHandler KeyPressEvent { + [GLib.Signal("button-release-event")] + public event Clutter.ButtonReleaseEventHandler ButtonReleaseEvent { add { - GLib.Signal sig = GLib.Signal.Lookup (this, "key-press-event", new KeyPressEventSignalDelegate(KeyPressEventSignalCallback)); + GLib.Signal sig = GLib.Signal.Lookup (this, "button-release-event", new ButtonReleaseEventSignalDelegate(ButtonReleaseEventSignalCallback)); sig.AddDelegate (value); } remove { - GLib.Signal sig = GLib.Signal.Lookup (this, "key-press-event", new KeyPressEventSignalDelegate(KeyPressEventSignalCallback)); + GLib.Signal sig = GLib.Signal.Lookup (this, "button-release-event", new ButtonReleaseEventSignalDelegate(ButtonReleaseEventSignalCallback)); sig.RemoveDelegate (value); } } @@ -396,6 +478,36 @@ } [DllImport("clutter")] + static extern void clutter_stage_set_perspective(IntPtr raw, float fovy, float aspect, float z_near, float z_far); + + public void SetPerspective(float fovy, float aspect, float z_near, float z_far) { + clutter_stage_set_perspective(Handle, fovy, aspect, z_near, z_far); + } + + [DllImport("clutter")] + static extern IntPtr clutter_stage_snapshot(IntPtr raw, int x, int y, int width, int height); + + public Gdk.Pixbuf Snapshot(int x, int y, int width, int height) { + IntPtr raw_ret = clutter_stage_snapshot(Handle, x, y, width, height); + Gdk.Pixbuf ret = GLib.Object.GetObject(raw_ret) as Gdk.Pixbuf; + return ret; + } + + [DllImport("clutter")] + static extern void clutter_stage_show_cursor(IntPtr raw); + + public void ShowCursor() { + clutter_stage_show_cursor(Handle); + } + + [DllImport("clutter")] + static extern void clutter_stage_hide_cursor(IntPtr raw); + + public void HideCursor() { + clutter_stage_hide_cursor(Handle); + } + + [DllImport("clutter")] static extern IntPtr clutter_stage_get_default(); public static Clutter.Stage Default { @@ -407,15 +519,34 @@ } [DllImport("clutter")] - static extern IntPtr clutter_stage_snapshot(IntPtr raw, int x, int y, int width, int height); + static extern void clutter_stage_set_perspectivex(IntPtr raw, ref Clutter.Perspective perspective); - public Gdk.Pixbuf Snapshot(int x, int y, int width, int height) { - IntPtr raw_ret = clutter_stage_snapshot(Handle, x, y, width, height); - Gdk.Pixbuf ret = GLib.Object.GetObject(raw_ret) as Gdk.Pixbuf; - return ret; + public void SetPerspectivex(Clutter.Perspective perspective) { + clutter_stage_set_perspectivex(Handle, ref perspective); } [DllImport("clutter")] + static extern void clutter_stage_unfullscreen(IntPtr raw); + + public void Unfullscreen() { + clutter_stage_unfullscreen(Handle); + } + + [DllImport("clutter")] + static extern void clutter_stage_get_perspectivex(IntPtr raw, ref Clutter.Perspective perspective); + + public void GetPerspectivex(Clutter.Perspective perspective) { + clutter_stage_get_perspectivex(Handle, ref perspective); + } + + [DllImport("clutter")] + static extern void clutter_stage_get_perspective(IntPtr raw, out float fovy, out float aspect, out float z_near, out float z_far); + + public void GetPerspective(out float fovy, out float aspect, out float z_near, out float z_far) { + clutter_stage_get_perspective(Handle, out fovy, out aspect, out z_near, out z_far); + } + + [DllImport("clutter")] static extern void clutter_stage_get_color(IntPtr raw, ref Clutter.Color color); public void GetColor(Clutter.Color color) { Index: clutter/src/BehaviourRotate.cs =================================================================== --- clutter/src/BehaviourRotate.cs (revision 0) +++ clutter/src/BehaviourRotate.cs (revision 0) @@ -0,0 +1,181 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Clutter { + + using System; + using System.Collections; + using System.Runtime.InteropServices; + +#region Autogenerated code + public class BehaviourRotate : Clutter.Behaviour { + + ~BehaviourRotate() + { + Dispose(); + } + + [Obsolete] + protected BehaviourRotate(GLib.GType gtype) : base(gtype) {} + public BehaviourRotate(IntPtr raw) : base(raw) {} + + [DllImport("clutter")] + static extern IntPtr clutter_behaviour_rotate_new(IntPtr alpha, int axis, int direction, double angle_begin, double angle_end); + + public BehaviourRotate (Clutter.Alpha alpha, Clutter.RotateAxis axis, Clutter.RotateDirection direction, double angle_begin, double angle_end) : base (IntPtr.Zero) + { + if (GetType () != typeof (BehaviourRotate)) { + ArrayList vals = new ArrayList(); + ArrayList names = new ArrayList(); + if (alpha != null) { + names.Add ("alpha"); + vals.Add (new GLib.Value (alpha)); + } + names.Add ("axis"); + vals.Add (new GLib.Value (axis)); + names.Add ("direction"); + vals.Add (new GLib.Value (direction)); + names.Add ("angle_begin"); + vals.Add (new GLib.Value (angle_begin)); + names.Add ("angle_end"); + vals.Add (new GLib.Value (angle_end)); + CreateNativeObject ((string[])names.ToArray (typeof (string)), (GLib.Value[])vals.ToArray (typeof (GLib.Value))); + return; + } + Raw = clutter_behaviour_rotate_new(alpha == nu