File: Gtk_PrintJob.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-- 11,657 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 PrintJob : GLib.Object {

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

		[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gtk_print_job_new(IntPtr title, IntPtr printer, IntPtr settings, IntPtr page_setup);

		public PrintJob (string title, Gtk.Printer printer, Gtk.PrintSettings settings, Gtk.PageSetup page_setup) : base (IntPtr.Zero)
		{
			if (GetType () != typeof (PrintJob)) {
				var vals = new List<GLib.Value> ();
				var names = new List<string> ();
				names.Add ("title");
				vals.Add (new GLib.Value (title));
				if (printer != null) {
					names.Add ("printer");
					vals.Add (new GLib.Value (printer));
				}
				if (settings != null) {
					names.Add ("settings");
					vals.Add (new GLib.Value (settings));
				}
				if (page_setup != null) {
					names.Add ("page_setup");
					vals.Add (new GLib.Value (page_setup));
				}
				CreateNativeObject (names.ToArray (), vals.ToArray ());
				return;
			}
			IntPtr native_title = GLib.Marshaller.StringToPtrGStrdup (title);
			Raw = gtk_print_job_new(native_title, printer == null ? IntPtr.Zero : printer.Handle, settings == null ? IntPtr.Zero : settings.Handle, page_setup == null ? IntPtr.Zero : page_setup.Handle);
			GLib.Marshaller.Free (native_title);
		}

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

		[GLib.Property ("title")]
		public string Title {
			get  {
				IntPtr raw_ret = gtk_print_job_get_title(Handle);
				string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
				return ret;
			}
		}

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

		[GLib.Property ("printer")]
		public Gtk.Printer Printer {
			get  {
				IntPtr raw_ret = gtk_print_job_get_printer(Handle);
				Gtk.Printer ret = GLib.Object.GetObject(raw_ret) as Gtk.Printer;
				return ret;
			}
		}

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

		[GLib.Property ("settings")]
		public Gtk.PrintSettings Settings {
			get  {
				IntPtr raw_ret = gtk_print_job_get_settings(Handle);
				Gtk.PrintSettings ret = GLib.Object.GetObject(raw_ret) as Gtk.PrintSettings;
				return ret;
			}
		}

		[GLib.Property ("page-setup")]
		public Gtk.PageSetup PageSetup {
			get {
				GLib.Value val = GetProperty ("page-setup");
				Gtk.PageSetup ret = (Gtk.PageSetup) val;
				val.Dispose ();
				return ret;
			}
		}

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

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

		[GLib.Property ("track-print-status")]
		public bool TrackPrintStatus {
			get  {
				bool raw_ret = gtk_print_job_get_track_print_status(Handle);
				bool ret = raw_ret;
				return ret;
			}
			set  {
				gtk_print_job_set_track_print_status(Handle, value);
			}
		}

		[GLib.Signal("status-changed")]
		public event System.EventHandler StatusChanged {
			add {
				this.AddSignalHandler ("status-changed", value);
			}
			remove {
				this.RemoveSignalHandler ("status-changed", value);
			}
		}

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

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

		public bool Collate { 
			get {
				bool raw_ret = gtk_print_job_get_collate(Handle);
				bool ret = raw_ret;
				return ret;
			}
			set {
				gtk_print_job_set_collate(Handle, value);
			}
		}

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

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

		public uint NUp { 
			get {
				uint raw_ret = gtk_print_job_get_n_up(Handle);
				uint ret = raw_ret;
				return ret;
			}
			set {
				gtk_print_job_set_n_up(Handle, value);
			}
		}

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

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

		public Gtk.NumberUpLayout NUpLayout { 
			get {
				int raw_ret = gtk_print_job_get_n_up_layout(Handle);
				Gtk.NumberUpLayout ret = (Gtk.NumberUpLayout) raw_ret;
				return ret;
			}
			set {
				gtk_print_job_set_n_up_layout(Handle, (int) value);
			}
		}

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

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

		public int NumCopies { 
			get {
				int raw_ret = gtk_print_job_get_num_copies(Handle);
				int ret = raw_ret;
				return ret;
			}
			set {
				gtk_print_job_set_num_copies(Handle, value);
			}
		}

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

		public Gtk.PageRange GetPageRanges(out int n_ranges) {
			IntPtr raw_ret = gtk_print_job_get_page_ranges(Handle, out n_ranges);
			Gtk.PageRange ret = Gtk.PageRange.New (raw_ret);
			return ret;
		}

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

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

		public Gtk.PageSet PageSet { 
			get {
				int raw_ret = gtk_print_job_get_page_set(Handle);
				Gtk.PageSet ret = (Gtk.PageSet) raw_ret;
				return ret;
			}
			set {
				gtk_print_job_set_page_set(Handle, (int) value);
			}
		}

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

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

		public Gtk.PrintPages Pages { 
			get {
				int raw_ret = gtk_print_job_get_pages(Handle);
				Gtk.PrintPages ret = (Gtk.PrintPages) raw_ret;
				return ret;
			}
			set {
				gtk_print_job_set_pages(Handle, (int) value);
			}
		}

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

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

		public bool Reverse { 
			get {
				bool raw_ret = gtk_print_job_get_reverse(Handle);
				bool ret = raw_ret;
				return ret;
			}
			set {
				gtk_print_job_set_reverse(Handle, value);
			}
		}

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

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

		public bool Rotate { 
			get {
				bool raw_ret = gtk_print_job_get_rotate(Handle);
				bool ret = raw_ret;
				return ret;
			}
			set {
				gtk_print_job_set_rotate(Handle, value);
			}
		}

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

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

		public double Scale { 
			get {
				double raw_ret = gtk_print_job_get_scale(Handle);
				double ret = raw_ret;
				return ret;
			}
			set {
				gtk_print_job_set_scale(Handle, value);
			}
		}

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

		public Gtk.PrintStatus Status { 
			get {
				int raw_ret = gtk_print_job_get_status(Handle);
				Gtk.PrintStatus ret = (Gtk.PrintStatus) raw_ret;
				return ret;
			}
		}

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

		public unsafe Cairo.Surface GetSurface() {
			IntPtr error = IntPtr.Zero;
			IntPtr raw_ret = gtk_print_job_get_surface(Handle, out error);
			Cairo.Surface ret = Cairo.Surface.Lookup (raw_ret, true);
			if (error != IntPtr.Zero) throw new GLib.GException (error);
			return ret;
		}

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

		public static new GLib.GType GType { 
			get {
				IntPtr raw_ret = gtk_print_job_get_type();
				GLib.GType ret = new GLib.GType(raw_ret);
				return ret;
			}
		}

		[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gtk_print_job_send(IntPtr raw, GtkSharp.PrintJobCompleteFuncNative cb, IntPtr user_data, GLib.DestroyNotify dnotify);

		public void Send(Gtk.PrintJobCompleteFunc cb) {
			GtkSharp.PrintJobCompleteFuncWrapper cb_wrapper = new GtkSharp.PrintJobCompleteFuncWrapper (cb);
			IntPtr user_data;
			GLib.DestroyNotify dnotify;
			if (cb == null) {
				user_data = IntPtr.Zero;
				dnotify = null;
			} else {
				user_data = (IntPtr) GCHandle.Alloc (cb_wrapper);
				dnotify = GLib.DestroyHelper.NotifyHandler;
			}
			gtk_print_job_send(Handle, cb_wrapper.NativeDelegate, user_data, dnotify);
		}

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

		public void SetPageRanges(Gtk.PageRange ranges, int n_ranges) {
			IntPtr native_ranges = GLib.Marshaller.StructureToPtrAlloc (ranges);
			gtk_print_job_set_page_ranges(Handle, native_ranges, n_ranges);
			Marshal.FreeHGlobal (native_ranges);
		}

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

		public unsafe bool SetSourceFd(int fd) {
			IntPtr error = IntPtr.Zero;
			bool raw_ret = gtk_print_job_set_source_fd(Handle, fd, out error);
			bool ret = raw_ret;
			if (error != IntPtr.Zero) throw new GLib.GException (error);
			return ret;
		}

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

		public unsafe bool SetSourceFile(string filename) {
			IntPtr native_filename = GLib.Marshaller.StringToPtrGStrdup (filename);
			IntPtr error = IntPtr.Zero;
			bool raw_ret = gtk_print_job_set_source_file(Handle, native_filename, out error);
			bool ret = raw_ret;
			GLib.Marshaller.Free (native_filename);
			if (error != IntPtr.Zero) throw new GLib.GException (error);
			return ret;
		}

#endregion
	}
}