| // This file was generated by the Gtk# code generator. | |
| // Any changes made will be lost if regenerated. | |
| namespace Gst.Video { | |
| using System; | |
| using System.Runtime.InteropServices; | |
| #region Autogenerated code | |
| public partial class NavigationAdapter : GLib.GInterfaceAdapter, Gst.Video.INavigation { | |
| [StructLayout (LayoutKind.Sequential)] | |
| struct GstNavigationInterface { | |
| public SendEventNativeDelegate SendEvent; | |
| public SendEventSimpleNativeDelegate SendEventSimple; | |
| } | |
| static GstNavigationInterface iface; | |
| static NavigationAdapter () | |
| { | |
| GLib.GType.Register (_gtype, typeof (NavigationAdapter)); | |
| iface.SendEvent = new SendEventNativeDelegate (SendEvent_cb); | |
| iface.SendEventSimple = new SendEventSimpleNativeDelegate (SendEventSimple_cb); | |
| } | |
| [UnmanagedFunctionPointer (CallingConvention.Cdecl)] | |
| delegate void SendEventNativeDelegate (IntPtr inst, IntPtr structure); | |
| static void SendEvent_cb (IntPtr inst, IntPtr structure) | |
| { | |
| try { | |
| INavigationImplementor __obj = GLib.Object.GetObject (inst, false) as INavigationImplementor; | |
| __obj.SendEvent (structure == IntPtr.Zero ? null : (Gst.Structure) GLib.Opaque.GetOpaque (structure, typeof (Gst.Structure), false)); | |
| } catch (Exception e) { | |
| GLib.ExceptionManager.RaiseUnhandledException (e, false); | |
| } | |
| } | |
| [UnmanagedFunctionPointer (CallingConvention.Cdecl)] | |
| delegate void SendEventSimpleNativeDelegate (IntPtr inst, IntPtr evnt); | |
| static void SendEventSimple_cb (IntPtr inst, IntPtr evnt) | |
| { | |
| try { | |
| INavigationImplementor __obj = GLib.Object.GetObject (inst, false) as INavigationImplementor; | |
| __obj.SendEventSimple (evnt == IntPtr.Zero ? null : (Gst.Event) GLib.Opaque.GetOpaque (evnt, typeof (Gst.Event), 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; | |
| native_iface.SendEventSimple = iface.SendEventSimple; | |
| Marshal.StructureToPtr (native_iface, ifaceptr, false); | |
| } | |
| GLib.Object implementor; | |
| public NavigationAdapter () | |
| { | |
| InitHandler = new GLib.GInterfaceInitHandler (Initialize); | |
| } | |
| public NavigationAdapter (INavigationImplementor implementor) | |
| { | |
| if (implementor == null) | |
| throw new ArgumentNullException ("implementor"); | |
| else if (!(implementor is GLib.Object)) | |
| throw new ArgumentException ("implementor must be a subclass of GLib.Object"); | |
| this.implementor = implementor as GLib.Object; | |
| } | |
| public NavigationAdapter (IntPtr handle) | |
| { | |
| if (!_gtype.IsInstance (handle)) | |
| throw new ArgumentException ("The gobject doesn't implement the GInterface of this adapter", "handle"); | |
| implementor = GLib.Object.GetObject (handle); | |
| } | |
| [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
| static extern IntPtr gst_navigation_get_type(); | |
| private static GLib.GType _gtype = new GLib.GType (gst_navigation_get_type ()); | |
| public static GLib.GType GType { | |
| get { | |
| return _gtype; | |
| } | |
| } | |
| public override GLib.GType GInterfaceGType { | |
| get { | |
| return _gtype; | |
| } | |
| } | |
| public override IntPtr Handle { | |
| get { | |
| return implementor.Handle; | |
| } | |
| } | |
| public IntPtr OwnedHandle { | |
| get { | |
| return implementor.OwnedHandle; | |
| } | |
| } | |
| public static INavigation GetObject (IntPtr handle, bool owned) | |
| { | |
| GLib.Object obj = GLib.Object.GetObject (handle, owned); | |
| return GetObject (obj); | |
| } | |
| public static INavigation GetObject (GLib.Object obj) | |
| { | |
| if (obj == null) | |
| return null; | |
| else if (obj is INavigationImplementor) | |
| return new NavigationAdapter (obj as INavigationImplementor); | |
| else if (obj as INavigation == null) | |
| return new NavigationAdapter (obj.Handle); | |
| else | |
| return obj as INavigation; | |
| } | |
| public INavigationImplementor Implementor { | |
| get { | |
| return implementor as INavigationImplementor; | |
| } | |
| } | |
| [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
| static extern bool gst_navigation_event_get_coordinates(IntPtr evnt, out double x, out double y); | |
| public static bool EventGetCoordinates(Gst.Event evnt, out double x, out double y) { | |
| bool raw_ret = gst_navigation_event_get_coordinates(evnt == null ? IntPtr.Zero : evnt.Handle, out x, out y); | |
| bool ret = raw_ret; | |
| return ret; | |
| } | |
| [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
| static extern int gst_navigation_event_get_type(IntPtr evnt); | |
| public static Gst.Video.NavigationEventType EventGetType(Gst.Event evnt) { | |
| int raw_ret = gst_navigation_event_get_type(evnt == null ? IntPtr.Zero : evnt.Handle); | |
| Gst.Video.NavigationEventType ret = (Gst.Video.NavigationEventType) raw_ret; | |
| return ret; | |
| } | |
| [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
| static extern IntPtr gst_navigation_event_new_command(int command); | |
| public static Gst.Event EventNewCommand(Gst.Video.NavigationCommand command) { | |
| IntPtr raw_ret = gst_navigation_event_new_command((int) command); | |
| Gst.Event ret = raw_ret == IntPtr.Zero ? null : (Gst.Event) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Event), true); | |
| return ret; | |
| } | |
| [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
| static extern IntPtr gst_navigation_event_new_key_press(IntPtr key, int state); | |
| public static Gst.Event EventNewKeyPress(string key, Gst.Video.NavigationModifierType state) { | |
| IntPtr native_key = GLib.Marshaller.StringToPtrGStrdup (key); | |
| IntPtr raw_ret = gst_navigation_event_new_key_press(native_key, (int) state); | |
| Gst.Event ret = raw_ret == IntPtr.Zero ? null : (Gst.Event) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Event), true); | |
| GLib.Marshaller.Free (native_key); | |
| return ret; | |
| } | |
| [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
| static extern IntPtr gst_navigation_event_new_key_release(IntPtr key, int state); | |
| public static Gst.Event EventNewKeyRelease(string key, Gst.Video.NavigationModifierType state) { | |
| IntPtr native_key = GLib.Marshaller.StringToPtrGStrdup (key); | |
| IntPtr raw_ret = gst_navigation_event_new_key_release(native_key, (int) state); | |
| Gst.Event ret = raw_ret == IntPtr.Zero ? null : (Gst.Event) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Event), true); | |
| GLib.Marshaller.Free (native_key); | |
| return ret; | |
| } | |
| [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
| static extern IntPtr gst_navigation_event_new_mouse_button_press(int button, double x, double y, int state); | |
| public static Gst.Event EventNewMouseButtonPress(int button, double x, double y, Gst.Video.NavigationModifierType state) { | |
| IntPtr raw_ret = gst_navigation_event_new_mouse_button_press(button, x, y, (int) state); | |
| Gst.Event ret = raw_ret == IntPtr.Zero ? null : (Gst.Event) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Event), true); | |
| return ret; | |
| } | |
| [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
| static extern IntPtr gst_navigation_event_new_mouse_button_release(int button, double x, double y, int state); | |
| public static Gst.Event EventNewMouseButtonRelease(int button, double x, double y, Gst.Video.NavigationModifierType state) { | |
| IntPtr raw_ret = gst_navigation_event_new_mouse_button_release(button, x, y, (int) state); | |
| Gst.Event ret = raw_ret == IntPtr.Zero ? null : (Gst.Event) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Event), true); | |
| return ret; | |
| } | |
| [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
| static extern IntPtr gst_navigation_event_new_mouse_move(double x, double y, int state); | |
| public static Gst.Event EventNewMouseMove(double x, double y, Gst.Video.NavigationModifierType state) { | |
| IntPtr raw_ret = gst_navigation_event_new_mouse_move(x, y, (int) state); | |
| Gst.Event ret = raw_ret == IntPtr.Zero ? null : (Gst.Event) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Event), true); | |
| return ret; | |
| } | |
| [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
| static extern IntPtr gst_navigation_event_new_mouse_scroll(double x, double y, double delta_x, double delta_y, int state); | |
| public static Gst.Event EventNewMouseScroll(double x, double y, double delta_x, double delta_y, Gst.Video.NavigationModifierType state) { | |
| IntPtr raw_ret = gst_navigation_event_new_mouse_scroll(x, y, delta_x, delta_y, (int) state); | |
| Gst.Event ret = raw_ret == IntPtr.Zero ? null : (Gst.Event) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Event), true); | |
| return ret; | |
| } | |
| [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
| static extern IntPtr gst_navigation_event_new_touch_cancel(int state); | |
| public static Gst.Event EventNewTouchCancel(Gst.Video.NavigationModifierType state) { | |
| IntPtr raw_ret = gst_navigation_event_new_touch_cancel((int) state); | |
| Gst.Event ret = raw_ret == IntPtr.Zero ? null : (Gst.Event) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Event), true); | |
| return ret; | |
| } | |
| [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
| static extern IntPtr gst_navigation_event_new_touch_down(uint identifier, double x, double y, double pressure, int state); | |
| public static Gst.Event EventNewTouchDown(uint identifier, double x, double y, double pressure, Gst.Video.NavigationModifierType state) { | |
| IntPtr raw_ret = gst_navigation_event_new_touch_down(identifier, x, y, pressure, (int) state); | |
| Gst.Event ret = raw_ret == IntPtr.Zero ? null : (Gst.Event) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Event), true); | |
| return ret; | |
| } | |
| [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
| static extern IntPtr gst_navigation_event_new_touch_frame(int state); | |
| public static Gst.Event EventNewTouchFrame(Gst.Video.NavigationModifierType state) { | |
| IntPtr raw_ret = gst_navigation_event_new_touch_frame((int) state); | |
| Gst.Event ret = raw_ret == IntPtr.Zero ? null : (Gst.Event) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Event), true); | |
| return ret; | |
| } | |
| [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
| static extern IntPtr gst_navigation_event_new_touch_motion(uint identifier, double x, double y, double pressure, int state); | |
| public static Gst.Event EventNewTouchMotion(uint identifier, double x, double y, double pressure, Gst.Video.NavigationModifierType state) { | |
| IntPtr raw_ret = gst_navigation_event_new_touch_motion(identifier, x, y, pressure, (int) state); | |
| Gst.Event ret = raw_ret == IntPtr.Zero ? null : (Gst.Event) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Event), true); | |
| return ret; | |
| } | |
| [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
| static extern IntPtr gst_navigation_event_new_touch_up(uint identifier, double x, double y, int state); | |
| public static Gst.Event EventNewTouchUp(uint identifier, double x, double y, Gst.Video.NavigationModifierType state) { | |
| IntPtr raw_ret = gst_navigation_event_new_touch_up(identifier, x, y, (int) state); | |
| Gst.Event ret = raw_ret == IntPtr.Zero ? null : (Gst.Event) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Event), true); | |
| return ret; | |
| } | |
| [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
| static extern bool gst_navigation_event_parse_command(IntPtr evnt, out int command); | |
| public static bool EventParseCommand(Gst.Event evnt, out Gst.Video.NavigationCommand command) { | |
| int native_command; | |
| bool raw_ret = gst_navigation_event_parse_command(evnt == null ? IntPtr.Zero : evnt.Handle, out native_command); | |
| bool ret = raw_ret; | |
| command = (Gst.Video.NavigationCommand) native_command; | |
| return ret; | |
| } | |
| [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
| static extern bool gst_navigation_event_parse_key_event(IntPtr evnt, out IntPtr key); | |
| public static bool EventParseKeyEvent(Gst.Event evnt, out string key) { | |
| IntPtr native_key; | |
| bool raw_ret = gst_navigation_event_parse_key_event(evnt == null ? IntPtr.Zero : evnt.Handle, out native_key); | |
| bool ret = raw_ret; | |
| key = GLib.Marshaller.Utf8PtrToString (native_key); | |
| return ret; | |
| } | |
| [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
| static extern bool gst_navigation_event_parse_modifier_state(IntPtr evnt, int state); | |
| public static bool EventParseModifierState(Gst.Event evnt, Gst.Video.NavigationModifierType state) { | |
| bool raw_ret = gst_navigation_event_parse_modifier_state(evnt == null ? IntPtr.Zero : evnt.Handle, (int) state); | |
| bool ret = raw_ret; | |
| return ret; | |
| } | |
| [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
| static extern bool gst_navigation_event_parse_mouse_button_event(IntPtr evnt, out int button, out double x, out double y); | |
| public static bool EventParseMouseButtonEvent(Gst.Event evnt, out int button, out double x, out double y) { | |
| bool raw_ret = gst_navigation_event_parse_mouse_button_event(evnt == null ? IntPtr.Zero : evnt.Handle, out button, out x, out y); | |
| bool ret = raw_ret; | |
| return ret; | |
| } | |
| [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
| static extern bool gst_navigation_event_parse_mouse_move_event(IntPtr evnt, out double x, out double y); | |
| public static bool EventParseMouseMoveEvent(Gst.Event evnt, out double x, out double y) { | |
| bool raw_ret = gst_navigation_event_parse_mouse_move_event(evnt == null ? IntPtr.Zero : evnt.Handle, out x, out y); | |
| bool ret = raw_ret; | |
| return ret; | |
| } | |
| [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
| static extern bool gst_navigation_event_parse_mouse_scroll_event(IntPtr evnt, out double x, out double y, out double delta_x, out double delta_y); | |
| public static bool EventParseMouseScrollEvent(Gst.Event evnt, out double x, out double y, out double delta_x, out double delta_y) { | |
| bool raw_ret = gst_navigation_event_parse_mouse_scroll_event(evnt == null ? IntPtr.Zero : evnt.Handle, out x, out y, out delta_x, out delta_y); | |
| bool ret = raw_ret; | |
| return ret; | |
| } | |
| [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
| static extern bool gst_navigation_event_parse_touch_event(IntPtr evnt, out uint identifier, out double x, out double y, out double pressure); | |
| public static bool EventParseTouchEvent(Gst.Event evnt, out uint identifier, out double x, out double y, out double pressure) { | |
| bool raw_ret = gst_navigation_event_parse_touch_event(evnt == null ? IntPtr.Zero : evnt.Handle, out identifier, out x, out y, out pressure); | |
| bool ret = raw_ret; | |
| return ret; | |
| } | |
| [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
| static extern bool gst_navigation_event_parse_touch_up_event(IntPtr evnt, out uint identifier, out double x, out double y); | |
| public static bool EventParseTouchUpEvent(Gst.Event evnt, out uint identifier, out double x, out double y) { | |
| bool raw_ret = gst_navigation_event_parse_touch_up_event(evnt == null ? IntPtr.Zero : evnt.Handle, out identifier, out x, out y); | |
| bool ret = raw_ret; | |
| return ret; | |
| } | |
| [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
| static extern bool gst_navigation_event_set_coordinates(IntPtr evnt, double x, double y); | |
| public static bool EventSetCoordinates(Gst.Event evnt, double x, double y) { | |
| bool raw_ret = gst_navigation_event_set_coordinates(evnt == null ? IntPtr.Zero : evnt.Handle, x, y); | |
| bool ret = raw_ret; | |
| return ret; | |
| } | |
| [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
| static extern int gst_navigation_message_get_type(IntPtr message); | |
| public static Gst.Video.NavigationMessageType MessageGetType(Gst.Message message) { | |
| int raw_ret = gst_navigation_message_get_type(message == null ? IntPtr.Zero : message.Handle); | |
| Gst.Video.NavigationMessageType ret = (Gst.Video.NavigationMessageType) raw_ret; | |
| return ret; | |
| } | |
| [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
| static extern IntPtr gst_navigation_message_new_angles_changed(IntPtr src, uint cur_angle, uint n_angles); | |
| public static Gst.Message MessageNewAnglesChanged(Gst.Object src, uint cur_angle, uint n_angles) { | |
| IntPtr raw_ret = gst_navigation_message_new_angles_changed(src == null ? IntPtr.Zero : src.Handle, cur_angle, n_angles); | |
| Gst.Message ret = raw_ret == IntPtr.Zero ? null : (Gst.Message) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Message), true); | |
| return ret; | |
| } | |
| [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
| static extern IntPtr gst_navigation_message_new_commands_changed(IntPtr src); | |
| public static Gst.Message MessageNewCommandsChanged(Gst.Object src) { | |
| IntPtr raw_ret = gst_navigation_message_new_commands_changed(src == null ? IntPtr.Zero : src.Handle); | |
| Gst.Message ret = raw_ret == IntPtr.Zero ? null : (Gst.Message) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Message), true); | |
| return ret; | |
| } | |
| [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
| static extern IntPtr gst_navigation_message_new_event(IntPtr src, IntPtr evnt); | |
| public static Gst.Message MessageNewEvent(Gst.Object src, Gst.Event evnt) { | |
| IntPtr raw_ret = gst_navigation_message_new_event(src == null ? IntPtr.Zero : src.Handle, evnt == null ? IntPtr.Zero : evnt.Handle); | |
| Gst.Message ret = raw_ret == IntPtr.Zero ? null : (Gst.Message) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Message), true); | |
| return ret; | |
| } | |
| [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
| static extern IntPtr gst_navigation_message_new_mouse_over(IntPtr src, bool active); | |
| public static Gst.Message MessageNewMouseOver(Gst.Object src, bool active) { | |
| IntPtr raw_ret = gst_navigation_message_new_mouse_over(src == null ? IntPtr.Zero : src.Handle, active); | |
| Gst.Message ret = raw_ret == IntPtr.Zero ? null : (Gst.Message) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Message), true); | |
| return ret; | |
| } | |
| [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
| static extern bool gst_navigation_message_parse_angles_changed(IntPtr message, out uint cur_angle, out uint n_angles); | |
| public static bool MessageParseAnglesChanged(Gst.Message message, out uint cur_angle, out uint n_angles) { | |
| bool raw_ret = gst_navigation_message_parse_angles_changed(message == null ? IntPtr.Zero : message.Handle, out cur_angle, out n_angles); | |
| bool ret = raw_ret; | |
| return ret; | |
| } | |
| [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
| static extern bool gst_navigation_message_parse_event(IntPtr message, out IntPtr evnt); | |
| public static bool MessageParseEvent(Gst.Message message, out Gst.Event evnt) { | |
| IntPtr native_evnt; | |
| bool raw_ret = gst_navigation_message_parse_event(message == null ? IntPtr.Zero : message.Handle, out native_evnt); | |
| bool ret = raw_ret; | |
| evnt = native_evnt == IntPtr.Zero ? null : (Gst.Event) GLib.Opaque.GetOpaque (native_evnt, typeof (Gst.Event), true); | |
| return ret; | |
| } | |
| [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
| static extern bool gst_navigation_message_parse_mouse_over(IntPtr message, out bool active); | |
| public static bool MessageParseMouseOver(Gst.Message message, out bool active) { | |
| bool raw_ret = gst_navigation_message_parse_mouse_over(message == null ? IntPtr.Zero : message.Handle, out active); | |
| bool ret = raw_ret; | |
| return ret; | |
| } | |
| [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
| static extern int gst_navigation_query_get_type(IntPtr query); | |
| public static Gst.Video.NavigationQueryType QueryGetType(Gst.Query query) { | |
| int raw_ret = gst_navigation_query_get_type(query == null ? IntPtr.Zero : query.Handle); | |
| Gst.Video.NavigationQueryType ret = (Gst.Video.NavigationQueryType) raw_ret; | |
| return ret; | |
| } | |
| [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
| static extern IntPtr gst_navigation_query_new_angles(); | |
| public static Gst.Query QueryNewAngles() { | |
| IntPtr raw_ret = gst_navigation_query_new_angles(); | |
| Gst.Query ret = raw_ret == IntPtr.Zero ? null : (Gst.Query) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Query), true); | |
| return ret; | |
| } | |
| [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
| static extern IntPtr gst_navigation_query_new_commands(); | |
| public static Gst.Query QueryNewCommands() { | |
| IntPtr raw_ret = gst_navigation_query_new_commands(); | |
| Gst.Query ret = raw_ret == IntPtr.Zero ? null : (Gst.Query) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Query), true); | |
| return ret; | |
| } | |
| [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
| static extern bool gst_navigation_query_parse_angles(IntPtr query, out uint cur_angle, out uint n_angles); | |
| public static bool QueryParseAngles(Gst.Query query, out uint cur_angle, out uint n_angles) { | |
| bool raw_ret = gst_navigation_query_parse_angles(query == null ? IntPtr.Zero : query.Handle, out cur_angle, out n_angles); | |
| bool ret = raw_ret; | |
| return ret; | |
| } | |
| [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
| static extern bool gst_navigation_query_parse_commands_length(IntPtr query, out uint n_cmds); | |
| public static bool QueryParseCommandsLength(Gst.Query query, out uint n_cmds) { | |
| bool raw_ret = gst_navigation_query_parse_commands_length(query == null ? IntPtr.Zero : query.Handle, out n_cmds); | |
| bool ret = raw_ret; | |
| return ret; | |
| } | |
| [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
| static extern bool gst_navigation_query_parse_commands_nth(IntPtr query, uint nth, out int cmd); | |
| public static bool QueryParseCommandsNth(Gst.Query query, uint nth, out Gst.Video.NavigationCommand cmd) { | |
| int native_cmd; | |
| bool raw_ret = gst_navigation_query_parse_commands_nth(query == null ? IntPtr.Zero : query.Handle, nth, out native_cmd); | |
| bool ret = raw_ret; | |
| cmd = (Gst.Video.NavigationCommand) native_cmd; | |
| return ret; | |
| } | |
| [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
| static extern void gst_navigation_query_set_angles(IntPtr query, uint cur_angle, uint n_angles); | |
| public static void QuerySetAngles(Gst.Query query, uint cur_angle, uint n_angles) { | |
| gst_navigation_query_set_angles(query == null ? IntPtr.Zero : query.Handle, cur_angle, n_angles); | |
| } | |
| [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
| static extern void gst_navigation_query_set_commandsv(IntPtr query, int n_cmds, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex=1)]int[] cmds); | |
| public static void QuerySetCommandsv(Gst.Query query, Gst.Video.NavigationCommand[] cmds) { | |
| int n_cmds = (cmds == null ? 0 : cmds.Length); | |
| int[] native_cmds = new int [n_cmds]; | |
| for (int i = 0; i < n_cmds; i++) | |
| native_cmds [i] = (int) cmds[i]; | |
| gst_navigation_query_set_commandsv(query == null ? IntPtr.Zero : query.Handle, n_cmds, native_cmds); | |
| } | |
| [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
| static extern void gst_navigation_send_command(IntPtr raw, int command); | |
| public void SendCommand(Gst.Video.NavigationCommand command) { | |
| gst_navigation_send_command(Handle, (int) command); | |
| } | |
| [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
| static extern void gst_navigation_send_event(IntPtr raw, IntPtr structure); | |
| public void SendEvent(Gst.Structure structure) { | |
| gst_navigation_send_event(Handle, structure == null ? IntPtr.Zero : structure.Handle); | |
| } | |
| [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
| static extern void gst_navigation_send_event_simple(IntPtr raw, IntPtr evnt); | |
| public void SendEventSimple(Gst.Event evnt) { | |
| evnt.Owned = false; | |
| gst_navigation_send_event_simple(Handle, evnt == null ? IntPtr.Zero : evnt.Handle); | |
| } | |
| [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
| 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("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
| 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("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
| static extern void gst_navigation_send_mouse_scroll_event(IntPtr raw, double x, double y, double delta_x, double delta_y); | |
| public void SendMouseScrollEvent(double x, double y, double delta_x, double delta_y) { | |
| gst_navigation_send_mouse_scroll_event(Handle, x, y, delta_x, delta_y); | |
| } | |
| #endregion | |
| } | |
| } |