<attr path="/api/namespace/enum[@cname='GstMixerMessageType']" name="name">MixerMessageType</attr>
<attr path="/api/namespace/enum[@cname='GstMixerTrackFlags']" name="name">MixerTrackFlags</attr>
<attr path="/api/namespace/enum[@cname='GstMixerType']" name="name">MixerType</attr>
+
<attr path="/api/namespace/enum[@cname='GstNavigationCommand']" name="name">NavigationCommand</attr>
+ <add-node path="/api/namespace/enum[@cname='GstNavigationCommand']">
+ <member cname="GST_NAVIGATION_COMMAND_MENU1" name="DvdMenu" value="1" />
+ <member cname="GST_NAVIGATION_COMMAND_MENU2" name="DvdTitleMenu" value="2" />
+ <member cname="GST_NAVIGATION_COMMAND_MENU3" name="DvdRootMenu" value="3" />
+ <member cname="GST_NAVIGATION_COMMAND_MENU4" name="DvdSubPictureMenu" value="4" />
+ <member cname="GST_NAVIGATION_COMMAND_MENU5" name="DvdAudioMenu" value="5" />
+ <member cname="GST_NAVIGATION_COMMAND_MENU6" name="DvdAngleMenu" value="6" />
+ <member cname="GST_NAVIGATION_COMMAND_MENU7" name="DvdChapterMenu" value="7" />
+ </add-node>
+
<attr path="/api/namespace/enum[@cname='GstNavigationEventType']" name="name">NavigationEventType</attr>
<attr path="/api/namespace/enum[@cname='GstNavigationMessageType']" name="name">NavigationMessageType</attr>
<attr path="/api/namespace/enum[@cname='GstNavigationQueryType']" name="name">NavigationQueryType</attr>
<attr path="/api/namespace/object[@cname='GstMixerOptions']/virtual_method[@cname='get_values']/return-type" name="element_type">gchar*</attr>
<move-node path="/api/namespace/object[@cname='GstMixerOptions']/method[@cname='gst_mixer_options_list_changed']">/api/namespace/interface[@cname='GstMixer']</move-node>
- <attr path="/api/namespace/interface[@cname='GstNavigation']" name="hidden">1</attr>
+ <attr path="/api/namespace/interface[@cname='GstNavigation']" name="name">Navigation</attr>
+ <attr path="/api/namespace/interface[@cname='GstNavigation']/virtual_method[@cname='send_event']/parameters/parameter" name="owned">true</attr>
+ <attr path="/api/namespace/interface[@cname='GstNavigation']/method[@cname='gst_navigation_message_get_type']" name="hidden">1</attr>
+ <attr path="/api/namespace/interface[@cname='GstNavigation']/method[@cname='gst_navigation_message_new_angles_changed']" name="hidden">1</attr>
+ <attr path="/api/namespace/interface[@cname='GstNavigation']/method[@cname='gst_navigation_message_parse_angles_changed']" name="hidden">1</attr>
+ <attr path="/api/namespace/interface[@cname='GstNavigation']/method[@cname='gst_navigation_message_new_commands_changed']" name="hidden">1</attr>
+ <attr path="/api/namespace/interface[@cname='GstNavigation']/method[@cname='gst_navigation_message_new_mouse_over']" name="hidden">1</attr>
+ <attr path="/api/namespace/interface[@cname='GstNavigation']/method[@cname='gst_navigation_message_parse_mouse_over']" name="hidden">1</attr>
+ <attr path="/api/namespace/interface[@cname='GstNavigation']/method[@cname='gst_navigation_query_get_type']" name="hidden">1</attr>
+ <attr path="/api/namespace/interface[@cname='GstNavigation']/method[@cname='gst_navigation_query_new_angles']" name="hidden">1</attr>
+ <attr path="/api/namespace/interface[@cname='GstNavigation']/method[@cname='gst_navigation_query_new_commands']" name="hidden">1</attr>
+ <attr path="/api/namespace/interface[@cname='GstNavigation']/method[@cname='gst_navigation_query_parse_angles']" name="hidden">1</attr>
+ <attr path="/api/namespace/interface[@cname='GstNavigation']/method[@cname='gst_navigation_query_parse_commands_length']" name="hidden">1</attr>
+ <attr path="/api/namespace/interface[@cname='GstNavigation']/method[@cname='gst_navigation_query_parse_commands_nth']" name="hidden">1</attr>
+ <attr path="/api/namespace/interface[@cname='GstNavigation']/method[@cname='gst_navigation_query_set_angles']" name="hidden">1</attr>
+ <attr path="/api/namespace/interface[@cname='GstNavigation']/method[@cname='gst_navigation_query_set_commands']" name="hidden">1</attr>
+ <attr path="/api/namespace/interface[@cname='GstNavigation']/method[@cname='gst_navigation_query_set_commandsv']" name="hidden">1</attr>
+ <attr path="/api/namespace/interface[@cname='GstNavigation']/method[@cname='gst_navigation_event_get_type']" name="hidden">1</attr>
+ <attr path="/api/namespace/interface[@cname='GstNavigation']/method[@cname='gst_navigation_event_parse_key_event']" name="hidden">1</attr>
+ <attr path="/api/namespace/interface[@cname='GstNavigation']/method[@cname='gst_navigation_event_parse_mouse_button_event']" name="hidden">1</attr>
+ <attr path="/api/namespace/interface[@cname='GstNavigation']/method[@cname='gst_navigation_event_parse_mouse_move_event']" name="hidden">1</attr>
+ <attr path="/api/namespace/interface[@cname='GstNavigation']/method[@cname='gst_navigation_event_parse_command']" name="hidden">1</attr>
+
+
<attr path="/api/namespace/interface[@cname='GstPropertyProbe']" name="name">PropertyProbe</attr>
<attr path="/api/namespace/interface[@cname='GstTuner']" name="name">Tuner</attr>
TypeFindDelegates.cs \
PresetDefault.cs \
MixerMessage.cs \
+ NavigationMessage.cs \
+ NavigationEvent.cs \
+ NavigationQuery.cs \
coreplugins/*.cs \
baseplugins/*.cs
override/MixerAdapter.cs \
override/PropertyProbe.cs \
override/PropertyProbeAdapter.cs \
- override/ProbeNeededHandler.cs
+ override/ProbeNeededHandler.cs \
+ override/NavigationAdapter.cs
build_sources = $(addprefix $(srcdir)/, $(sources))
--- /dev/null
+namespace Gst.Interfaces {
+
+ using System;
+ using System.Runtime.InteropServices;
+ using System.Reflection;
+ using GLib;
+ using Gst;
+ using Gst.Interfaces;
+
+ public static class NavigationEvent {
+ [DllImport("gstinterfaces-0.10.dll")]
+ static extern int gst_navigation_event_get_type(IntPtr evnt);
+
+ public static Gst.Interfaces.NavigationEventType EventGetType(Gst.Event evnt) {
+ int raw_ret = gst_navigation_event_get_type(evnt == null ? IntPtr.Zero : evnt.Handle);
+ Gst.Interfaces.NavigationEventType ret = (Gst.Interfaces.NavigationEventType) raw_ret;
+ return ret;
+ }
+
+ [DllImport("gstinterfaces-0.10.dll")]
+ static extern bool gst_navigation_event_parse_key_event (IntPtr evnt, out IntPtr key);
+
+ public static bool ParseKeyEvent (Gst.Event evnt, out string key) {
+ IntPtr raw_key;
+ bool ret = gst_navigation_event_parse_key_event (evnt.Handle, out raw_key);
+
+ key = GLib.Marshaller.Utf8PtrToString (raw_key);
+
+ return ret;
+ }
+
+ [DllImport("gstinterfaces-0.10.dll")]
+ static extern bool gst_navigation_event_parse_mouse_button_event (IntPtr evnt, out int button, out double x, out double y);
+
+ public static bool ParseMouseButtonEvent (Gst.Event evnt, out int button, out double x, out double y) {
+ return gst_navigation_event_parse_mouse_button_event (evnt.Handle, out button, out x, out y);
+ }
+
+ [DllImport("gstinterfaces-0.10.dll")]
+ static extern bool gst_navigation_event_parse_mouse_move_event (IntPtr evnt, out double x, out double y);
+
+ public static bool ParseMouseMoveEvent (Gst.Event evnt, out double x, out double y) {
+ return gst_navigation_event_parse_mouse_move_event (evnt.Handle, out x, out y);
+ }
+
+ [DllImport("gstinterfaces-0.10.dll")]
+ static extern bool gst_navigation_event_parse_command (IntPtr evnt, out int command);
+
+ public static bool ParseCommand (Gst.Event evnt, out Gst.Interfaces.NavigationCommand command) {
+ int raw_command;
+ bool ret = gst_navigation_event_parse_command (evnt.Handle, out raw_command);
+
+ command = (Gst.Interfaces.NavigationCommand) raw_command;
+
+ return ret;
+ }
+
+ }
+}
--- /dev/null
+namespace Gst.Interfaces {
+
+ using System;
+ using System.Runtime.InteropServices;
+ using System.Reflection;
+ using GLib;
+ using Gst;
+ using Gst.Interfaces;
+
+ public static class NavigationMessage {
+ [DllImport("gstinterfaces-0.10.dll")]
+ static extern int gst_navigation_message_get_type(IntPtr message);
+
+ public static Gst.Interfaces.NavigationMessageType MessageGetType(Gst.Message message) {
+ int raw_ret = gst_navigation_message_get_type(message == null ? IntPtr.Zero : message.Handle);
+ Gst.Interfaces.NavigationMessageType ret = (Gst.Interfaces.NavigationMessageType) raw_ret;
+ return ret;
+ }
+
+ [DllImport("gstinterfaces-0.10.dll")]
+ static extern IntPtr gst_navigation_message_new_mouse_over (IntPtr src, bool active);
+
+ public static Gst.Message NewMouseOver (Gst.Object src, bool active) {
+ Message msg = (Message) GLib.Opaque.GetOpaque (gst_navigation_message_new_mouse_over (src.Handle, active), typeof (Message), true);
+ return msg;
+ }
+
+ [DllImport("gstinterfaces-0.10.dll")]
+ static extern bool gst_navigation_message_parse_mouse_over (IntPtr msg, out bool active);
+
+ public static bool ParseMouseOver (Gst.Message msg, out bool active) {
+ return gst_navigation_message_parse_mouse_over (msg.Handle, out active);
+ }
+
+ [DllImport("gstinterfaces-0.10.dll")]
+ static extern IntPtr gst_navigation_message_new_angles_changed (IntPtr src, uint cur_angle, uint n_angles);
+
+ public static Gst.Message NewAnglesChanged (Gst.Object src, uint cur_angle, uint n_angles) {
+ Message msg = (Message) GLib.Opaque.GetOpaque (gst_navigation_message_new_angles_changed (src.Handle, cur_angle, n_angles), typeof (Message), true);
+ return msg;
+ }
+
+ [DllImport("gstinterfaces-0.10.dll")]
+ static extern bool gst_navigation_message_parse_angles_changed (IntPtr msg, out uint cur_angle, out uint n_angles);
+
+ public static bool ParseMouseOver (Gst.Message msg, out uint cur_angle, out uint n_angles) {
+ return gst_navigation_message_parse_angles_changed (msg.Handle, out cur_angle, out n_angles);
+ }
+
+ [DllImport("gstinterfaces-0.10.dll")]
+ static extern IntPtr gst_navigation_message_new_commands_changed (IntPtr src);
+
+ public static Gst.Message NewCommandsChanged (Gst.Object src) {
+ Message msg = (Message) GLib.Opaque.GetOpaque (gst_navigation_message_new_commands_changed (src.Handle), typeof (Message), true);
+ return msg;
+ }
+ }
+}
--- /dev/null
+namespace Gst.Interfaces {
+
+ using System;
+ using System.Runtime.InteropServices;
+ using System.Reflection;
+ using GLib;
+ using Gst;
+ using Gst.Interfaces;
+
+ public static class NavigationQuery {
+ [DllImport("gstinterfaces-0.10.dll")]
+ static extern int gst_navigation_query_get_type(IntPtr query);
+
+ public static Gst.Interfaces.NavigationQueryType QueryGetType(Gst.Query query) {
+ int raw_ret = gst_navigation_query_get_type(query == null ? IntPtr.Zero : query.Handle);
+ Gst.Interfaces.NavigationQueryType ret = (Gst.Interfaces.NavigationQueryType) raw_ret;
+ return ret;
+ }
+
+ [DllImport("gstinterfaces-0.10.dll")]
+ static extern IntPtr gst_navigation_query_new_commands ();
+
+ public static Gst.Query NewCommands () {
+ Gst.Query query = (Gst.Query) GLib.Opaque.GetOpaque (gst_navigation_query_new_commands (), typeof (Gst.Query), true);
+ return query;
+ }
+
+ [DllImport("gstinterfaces-0.10.dll")]
+ static extern void gst_navigation_query_set_commandsv (IntPtr query, uint n_commands, int[] cmds);
+
+ public static void SetCommands (Gst.Query query, Gst.Interfaces.NavigationCommand[] cmds) {
+ if (!query.IsWritable)
+ throw new ApplicationException ();
+
+ int[] raw_cmds = new int[cmds.Length];
+ for (int i = 0; i < cmds.Length; i++)
+ raw_cmds[i] = (int) cmds[i];
+
+ gst_navigation_query_set_commandsv (query.Handle, (uint) raw_cmds.Length, raw_cmds);
+ }
+
+ [DllImport("gstinterfaces-0.10.dll")]
+ static extern bool gst_navigation_query_parse_commands_length (IntPtr query, out uint n_commands);
+ [DllImport("gstinterfaces-0.10.dll")]
+ static extern bool gst_navigation_query_parse_commands_nth (IntPtr query, uint nth, out int cmd);
+
+ public static bool ParseCommands (Gst.Query query, out Gst.Interfaces.NavigationCommand[] cmds) {
+ uint len;
+
+ cmds = null;
+ if (!gst_navigation_query_parse_commands_length (query.Handle, out len))
+ return false;
+
+ cmds = new Gst.Interfaces.NavigationCommand[len];
+
+ for (uint i = 0; i < len; i++) {
+ int cmd;
+
+ if (!gst_navigation_query_parse_commands_nth (query.Handle, i, out cmd))
+ return false;
+ cmds[i] = (Gst.Interfaces.NavigationCommand) cmd;
+ }
+
+ return true;
+ }
+
+ [DllImport("gstinterfaces-0.10.dll")]
+ static extern IntPtr gst_navigation_query_new_angles ();
+
+ public static Gst.Query NewAngles () {
+ Gst.Query query = (Gst.Query) GLib.Opaque.GetOpaque (gst_navigation_query_new_angles (), typeof (Gst.Query), true);
+ return query;
+ }
+
+ [DllImport("gstinterfaces-0.10.dll")]
+ static extern void gst_navigation_query_set_angles (IntPtr query, uint cur_angle, uint n_angles);
+
+ public static void SetAngles (Gst.Query query, uint cur_angle, uint n_angles) {
+ if (!query.IsWritable)
+ throw new ApplicationException ();
+
+ gst_navigation_query_set_angles (query.Handle, cur_angle, n_angles);
+ }
+
+ [DllImport("gstinterfaces-0.10.dll")]
+ static extern bool gst_navigation_query_parse_angles (IntPtr query, out uint cur_angle, out uint n_angles);
+
+ public static bool ParseAngles (Gst.Query query, out uint cur_angle, out uint n_angles) {
+ return gst_navigation_query_parse_angles (query.Handle, out cur_angle, out n_angles);
+ }
+ }
+}
--- /dev/null
+// This file was generated by the Gtk# code generator.
+// Changed to copy the structure in SendEvent ().
+
+namespace Gst.Interfaces {
+
+ using System;
+ using System.Runtime.InteropServices;
+
+#region Autogenerated code
+ public class NavigationAdapter : GLib.GInterfaceAdapter, Gst.Interfaces.Navigation {
+
+ [StructLayout (LayoutKind.Sequential)]
+ struct GstNavigationInterface {
+ public SendEventNativeDelegate SendEvent;
+ [MarshalAs (UnmanagedType.ByValArray, SizeConst=4)]
+ public IntPtr[] GstReserved;
+ }
+
+ static GstNavigationInterface iface;
+
+ static NavigationAdapter ()
+ {
+ GLib.GType.Register (_gtype, typeof(NavigationAdapter));
+ iface.SendEvent = new SendEventNativeDelegate (SendEvent_cb);
+ }
+
+ [GLib.CDeclCallback]
+ delegate void SendEventNativeDelegate (IntPtr inst, IntPtr structure);
+
+ static void SendEvent_cb (IntPtr inst, IntPtr structure)
+ {
+ try {
+ NavigationImplementor __obj = GLib.Object.GetObject (inst, false) as NavigationImplementor;
+ __obj.SendEvent (structure == IntPtr.Zero ? null : (Gst.Structure) GLib.Opaque.GetOpaque (structure, typeof (Gst.Structure), true));
+ } catch (Exception e) {
+ GLib.ExceptionManager.RaiseUnhandledException (e, false);
+ }
+ }
+
+ static int class_offset = 2 * IntPtr.Size;
+
+ static void Initialize (IntPtr ptr, IntPtr data)
+ {
+ IntPtr ifaceptr = new IntPtr (ptr.ToInt64 () + class_offset);
+ GstNavigationInterface native_iface = (GstNavigationInterface) Marshal.PtrToStructure (ifaceptr, typeof (GstNavigationInterface));
+ native_iface.SendEvent = iface.SendEvent;
+ Marshal.StructureToPtr (native_iface, ifaceptr, false);
+ GCHandle gch = (GCHandle) data;
+ gch.Free ();
+ }
+
+ public NavigationAdapter ()
+ {
+ InitHandler = new GLib.GInterfaceInitHandler (Initialize);
+ }
+
+ NavigationImplementor implementor;
+
+ public NavigationAdapter (NavigationImplementor implementor)
+ {
+ if (implementor == null)
+ throw new ArgumentNullException ("implementor");
+ this.implementor = implementor;
+ }
+
+ public NavigationAdapter (IntPtr handle)
+ {
+ if (!_gtype.IsInstance (handle))
+ throw new ArgumentException ("The gobject doesn't implement the GInterface of this adapter", "handle");
+ this.handle = handle;
+ }
+
+ [DllImport("gstinterfaces-0.10.dll")]
+ static extern IntPtr gst_navigation_get_type();
+
+ private static GLib.GType _gtype = new GLib.GType (gst_navigation_get_type ());
+
+ public override GLib.GType GType {
+ get {
+ return _gtype;
+ }
+ }
+
+ IntPtr handle;
+ public override IntPtr Handle {
+ get {
+ if (handle != IntPtr.Zero)
+ return handle;
+ return implementor == null ? IntPtr.Zero : implementor.Handle;
+ }
+ }
+
+ public static Navigation GetObject (IntPtr handle, bool owned)
+ {
+ GLib.Object obj = GLib.Object.GetObject (handle, owned);
+ return GetObject (obj);
+ }
+
+ public static Navigation GetObject (GLib.Object obj)
+ {
+ if (obj == null)
+ return null;
+ else if (obj is NavigationImplementor)
+ return new NavigationAdapter (obj as NavigationImplementor);
+ else if (obj as Navigation == null)
+ return new NavigationAdapter (obj.Handle);
+ else
+ return obj as Navigation;
+ }
+
+ public NavigationImplementor Implementor {
+ get {
+ return implementor;
+ }
+ }
+
+ [DllImport("gstinterfaces-0.10.dll")]
+ static extern void gst_navigation_send_event(IntPtr raw, IntPtr structure);
+
+ [DllImport("gstreamer-0.10.dll")]
+ static extern IntPtr gst_structure_copy (IntPtr raw);
+
+ public void SendEvent(Gst.Structure structure) {
+ gst_navigation_send_event(Handle, structure == null ? IntPtr.Zero : gst_structure_copy (structure.Handle));
+ }
+
+ [DllImport("gstinterfaces-0.10.dll")]
+ static extern void gst_navigation_send_mouse_event(IntPtr raw, IntPtr evnt, int button, double x, double y);
+
+ public void SendMouseEvent(string evnt, int button, double x, double y) {
+ IntPtr native_evnt = GLib.Marshaller.StringToPtrGStrdup (evnt);
+ gst_navigation_send_mouse_event(Handle, native_evnt, button, x, y);
+ GLib.Marshaller.Free (native_evnt);
+ }
+
+ [DllImport("gstinterfaces-0.10.dll")]
+ static extern void gst_navigation_send_key_event(IntPtr raw, IntPtr evnt, IntPtr key);
+
+ public void SendKeyEvent(string evnt, string key) {
+ IntPtr native_evnt = GLib.Marshaller.StringToPtrGStrdup (evnt);
+ IntPtr native_key = GLib.Marshaller.StringToPtrGStrdup (key);
+ gst_navigation_send_key_event(Handle, native_evnt, native_key);
+ GLib.Marshaller.Free (native_evnt);
+ GLib.Marshaller.Free (native_key);
+ }
+
+ [DllImport("gstinterfaces-0.10.dll")]
+ static extern void gst_navigation_send_command(IntPtr raw, int command);
+
+ public void SendCommand(Gst.Interfaces.NavigationCommand command) {
+ gst_navigation_send_command(Handle, (int) command);
+ }
+
+#endregion
+ }
+}