mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 00:36:51 +00:00
62 lines
1.7 KiB
C#
62 lines
1.7 KiB
C#
// This file was generated by the Gtk# code generator.
|
|
// Any changes made will be lost if regenerated.
|
|
|
|
namespace Gst {
|
|
|
|
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using System.Runtime.InteropServices;
|
|
|
|
#region Autogenerated code
|
|
[StructLayout(LayoutKind.Sequential)]
|
|
public partial struct PollFD : IEquatable<PollFD> {
|
|
|
|
public int Fd;
|
|
private int idx;
|
|
|
|
public static Gst.PollFD Zero = new Gst.PollFD ();
|
|
|
|
public static Gst.PollFD New(IntPtr raw) {
|
|
if (raw == IntPtr.Zero)
|
|
return Gst.PollFD.Zero;
|
|
return (Gst.PollFD) Marshal.PtrToStructure (raw, typeof (Gst.PollFD));
|
|
}
|
|
|
|
[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
|
static extern void gst_poll_fd_init(IntPtr raw);
|
|
|
|
public void Init() {
|
|
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
|
|
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
|
|
gst_poll_fd_init(this_as_native);
|
|
ReadNative (this_as_native, ref this);
|
|
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
|
|
}
|
|
|
|
static void ReadNative (IntPtr native, ref Gst.PollFD target)
|
|
{
|
|
target = New (native);
|
|
}
|
|
|
|
public bool Equals (PollFD other)
|
|
{
|
|
return true && Fd.Equals (other.Fd) && idx.Equals (other.idx);
|
|
}
|
|
|
|
public override bool Equals (object other)
|
|
{
|
|
return other is PollFD && Equals ((PollFD) other);
|
|
}
|
|
|
|
public override int GetHashCode ()
|
|
{
|
|
return this.GetType ().FullName.GetHashCode () ^ Fd.GetHashCode () ^ idx.GetHashCode ();
|
|
}
|
|
|
|
private static GLib.GType GType {
|
|
get { return GLib.GType.Pointer; }
|
|
}
|
|
#endregion
|
|
}
|
|
}
|