File: Gtk_RecentChooserDefault.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 (367 lines) | stat: -rw-r--r-- 12,610 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
// 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
	public partial class RecentChooserDefault : Gtk.Box, Gtk.IRecentChooser, Gtk.IActivatable {

		public RecentChooserDefault (IntPtr raw) : base(raw) {}

		protected RecentChooserDefault() : base(IntPtr.Zero)
		{
			CreateNativeObject (new string [0], new GLib.Value [0]);
		}

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

		public void AddFilter(Gtk.RecentFilter filter) {
			gtk_recent_chooser_add_filter(Handle, filter == null ? IntPtr.Zero : filter.Handle);
		}

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

		public Gtk.RecentInfo CurrentItem { 
			get {
				IntPtr raw_ret = gtk_recent_chooser_get_current_item(Handle);
				Gtk.RecentInfo ret = raw_ret == IntPtr.Zero ? null : (Gtk.RecentInfo) GLib.Opaque.GetOpaque (raw_ret, typeof (Gtk.RecentInfo), false);
				return ret;
			}
		}

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

		public string CurrentUri { 
			get {
				IntPtr raw_ret = gtk_recent_chooser_get_current_uri(Handle);
				string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
				return ret;
			}
		}

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

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

		public Gtk.RecentFilter Filter { 
			get {
				IntPtr raw_ret = gtk_recent_chooser_get_filter(Handle);
				Gtk.RecentFilter ret = GLib.Object.GetObject(raw_ret) as Gtk.RecentFilter;
				return ret;
			}
			set {
				gtk_recent_chooser_set_filter(Handle, value == null ? IntPtr.Zero : value.Handle);
			}
		}

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

		public Gtk.RecentInfo[] Items { 
			get {
				IntPtr raw_ret = gtk_recent_chooser_get_items(Handle);
				Gtk.RecentInfo[] ret = (Gtk.RecentInfo[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), true, true, typeof(Gtk.RecentInfo));
				return ret;
			}
		}

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

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

		public int Limit { 
			get {
				int raw_ret = gtk_recent_chooser_get_limit(Handle);
				int ret = raw_ret;
				return ret;
			}
			set {
				gtk_recent_chooser_set_limit(Handle, value);
			}
		}

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

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

		public bool LocalOnly { 
			get {
				bool raw_ret = gtk_recent_chooser_get_local_only(Handle);
				bool ret = raw_ret;
				return ret;
			}
			set {
				gtk_recent_chooser_set_local_only(Handle, value);
			}
		}

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

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

		public bool SelectMultiple { 
			get {
				bool raw_ret = gtk_recent_chooser_get_select_multiple(Handle);
				bool ret = raw_ret;
				return ret;
			}
			set {
				gtk_recent_chooser_set_select_multiple(Handle, value);
			}
		}

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

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

		public bool ShowIcons { 
			get {
				bool raw_ret = gtk_recent_chooser_get_show_icons(Handle);
				bool ret = raw_ret;
				return ret;
			}
			set {
				gtk_recent_chooser_set_show_icons(Handle, value);
			}
		}

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

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

		public bool ShowNotFound { 
			get {
				bool raw_ret = gtk_recent_chooser_get_show_not_found(Handle);
				bool ret = raw_ret;
				return ret;
			}
			set {
				gtk_recent_chooser_set_show_not_found(Handle, value);
			}
		}

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

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

		public bool ShowPrivate { 
			get {
				bool raw_ret = gtk_recent_chooser_get_show_private(Handle);
				bool ret = raw_ret;
				return ret;
			}
			set {
				gtk_recent_chooser_set_show_private(Handle, value);
			}
		}

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

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

		public bool ShowTips { 
			get {
				bool raw_ret = gtk_recent_chooser_get_show_tips(Handle);
				bool ret = raw_ret;
				return ret;
			}
			set {
				gtk_recent_chooser_set_show_tips(Handle, value);
			}
		}

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

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

		public Gtk.RecentSortType SortType { 
			get {
				int raw_ret = gtk_recent_chooser_get_sort_type(Handle);
				Gtk.RecentSortType ret = (Gtk.RecentSortType) raw_ret;
				return ret;
			}
			set {
				gtk_recent_chooser_set_sort_type(Handle, (int) value);
			}
		}

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

		public string[] GetUris(out ulong length) {
			UIntPtr native_length;
			IntPtr raw_ret = gtk_recent_chooser_get_uris(Handle, out native_length);
			string[] ret = GLib.Marshaller.NullTermPtrToStringArray (raw_ret, false);
			length = (ulong) native_length;
			return ret;
		}

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

		public Gtk.RecentFilter[] Filters { 
			get {
				IntPtr raw_ret = gtk_recent_chooser_list_filters(Handle);
				Gtk.RecentFilter[] ret = (Gtk.RecentFilter[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.SList), true, false, typeof(Gtk.RecentFilter));
				return ret;
			}
		}

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

		public void RemoveFilter(Gtk.RecentFilter filter) {
			gtk_recent_chooser_remove_filter(Handle, filter == null ? IntPtr.Zero : filter.Handle);
		}

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

		public void SelectAll() {
			gtk_recent_chooser_select_all(Handle);
		}

		[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern bool gtk_recent_chooser_select_uri(IntPtr raw, IntPtr uri, out IntPtr error);

		public bool SelectUri(string uri) {
			IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri);
			IntPtr error = IntPtr.Zero;
			bool raw_ret = gtk_recent_chooser_select_uri(Handle, native_uri, out error);
			bool ret = raw_ret;
			GLib.Marshaller.Free (native_uri);
			if (error != IntPtr.Zero) throw new GLib.GException (error);
			return ret;
		}

		[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern bool gtk_recent_chooser_set_current_uri(IntPtr raw, IntPtr uri, out IntPtr error);

		public bool SetCurrentUri(string uri) {
			IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri);
			IntPtr error = IntPtr.Zero;
			bool raw_ret = gtk_recent_chooser_set_current_uri(Handle, native_uri, out error);
			bool ret = raw_ret;
			GLib.Marshaller.Free (native_uri);
			if (error != IntPtr.Zero) throw new GLib.GException (error);
			return ret;
		}

		[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gtk_recent_chooser_set_sort_func(IntPtr raw, GtkSharp.RecentSortFuncNative sort_func, IntPtr sort_data, GLib.DestroyNotify data_destroy);

		public Gtk.RecentSortFunc SortFunc { 
			set {
				GtkSharp.RecentSortFuncWrapper value_wrapper = new GtkSharp.RecentSortFuncWrapper (value);
				IntPtr sort_data;
				GLib.DestroyNotify data_destroy;
				if (value == null) {
					sort_data = IntPtr.Zero;
					data_destroy = null;
				} else {
					sort_data = (IntPtr) GCHandle.Alloc (value_wrapper);
					data_destroy = GLib.DestroyHelper.NotifyHandler;
				}
				gtk_recent_chooser_set_sort_func(Handle, value_wrapper.NativeDelegate, sort_data, data_destroy);
			}
		}

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

		public void UnselectAll() {
			gtk_recent_chooser_unselect_all(Handle);
		}

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

		public void UnselectUri(string uri) {
			IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri);
			gtk_recent_chooser_unselect_uri(Handle, native_uri);
			GLib.Marshaller.Free (native_uri);
		}

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

		[Obsolete]
		public void DoSetRelatedAction(Gtk.Action action) {
			gtk_activatable_do_set_related_action(Handle, action == null ? IntPtr.Zero : action.Handle);
		}

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

		[Obsolete]
		public void SyncActionProperties(Gtk.Action action) {
			gtk_activatable_sync_action_properties(Handle, action == null ? IntPtr.Zero : action.Handle);
		}

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

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

		[Obsolete]
		[GLib.Property ("related-action")]
		public Gtk.Action RelatedAction {
			get  {
				IntPtr raw_ret = gtk_activatable_get_related_action(Handle);
				Gtk.Action ret = GLib.Object.GetObject(raw_ret) as Gtk.Action;
				return ret;
			}
			set  {
				gtk_activatable_set_related_action(Handle, value == null ? IntPtr.Zero : value.Handle);
			}
		}

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

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

		[Obsolete]
		[GLib.Property ("use-action-appearance")]
		public bool UseActionAppearance {
			get  {
				bool raw_ret = gtk_activatable_get_use_action_appearance(Handle);
				bool ret = raw_ret;
				return ret;
			}
			set  {
				gtk_activatable_set_use_action_appearance(Handle, value);
			}
		}

#endregion
	}
}