File: Gtk_StockItem.cs

package info (click to toggle)
gnome-subtitles 1.8-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 103,144 kB
  • sloc: xml: 406,395; cs: 364,495; ansic: 3,104; perl: 1,477; sh: 769; python: 545; javascript: 500; makefile: 49
file content (80 lines) | stat: -rw-r--r-- 2,737 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.

namespace Gtk {

	using System;
	using System.Collections;
	using System.Collections.Generic;
	using System.Runtime.InteropServices;

#region Autogenerated code
	[StructLayout(LayoutKind.Sequential)]
	public partial struct StockItem : IEquatable<StockItem> {

		public string StockId;
		public string Label;
		public Gdk.ModifierType Modifier;
		public uint Keyval;
		public string TranslationDomain;

		public static Gtk.StockItem Zero = new Gtk.StockItem ();

		public static Gtk.StockItem New(IntPtr raw) {
			if (raw == IntPtr.Zero)
				return Gtk.StockItem.Zero;
			return (Gtk.StockItem) Marshal.PtrToStructure (raw, typeof (Gtk.StockItem));
		}

		[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gtk_stock_item_copy(IntPtr raw);

		[Obsolete]
		public Gtk.StockItem Copy() {
			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);
			IntPtr raw_ret = gtk_stock_item_copy(this_as_native);
			Gtk.StockItem ret = Gtk.StockItem.New (raw_ret);
			ReadNative (this_as_native, ref this);
			System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
			return ret;
		}

		[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gtk_stock_item_free(IntPtr raw);

		[Obsolete]
		public void Free() {
			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);
			gtk_stock_item_free(this_as_native);
			ReadNative (this_as_native, ref this);
			System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
		}

		static void ReadNative (IntPtr native, ref Gtk.StockItem target)
		{
			target = New (native);
		}

		public bool Equals (StockItem other)
		{
			return true && StockId.Equals (other.StockId) && Label.Equals (other.Label) && Modifier.Equals (other.Modifier) && Keyval.Equals (other.Keyval) && TranslationDomain.Equals (other.TranslationDomain);
		}

		public override bool Equals (object other)
		{
			return other is StockItem && Equals ((StockItem) other);
		}

		public override int GetHashCode ()
		{
			return this.GetType ().FullName.GetHashCode () ^ StockId.GetHashCode () ^ Label.GetHashCode () ^ Modifier.GetHashCode () ^ Keyval.GetHashCode () ^ TranslationDomain.GetHashCode ();
		}

		private static GLib.GType GType {
			get { return GLib.GType.Pointer; }
		}
#endregion
	}
}