1 /*
2  * This file is part of gtkD.
3  *
4  * gtkD is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License
6  * as published by the Free Software Foundation; either version 3
7  * of the License, or (at your option) any later version, with
8  * some exceptions, please read the COPYING file.
9  *
10  * gtkD is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with gtkD; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
18  */
19 
20 // generated automatically - do not change
21 // find conversion definition on APILookup.txt
22 // implement new conversion functionalities on the wrap.utils pakage
23 
24 
25 module gtk.PrintOperationPreviewIF;
26 
27 private import gobject.Signals;
28 private import gtk.PageSetup;
29 private import gtk.PrintContext;
30 public  import gtkc.gdktypes;
31 private import gtkc.gtk;
32 public  import gtkc.gtktypes;
33 
34 
35 /** */
36 public interface PrintOperationPreviewIF{
37 	/** Get the main Gtk struct */
38 	public GtkPrintOperationPreview* getPrintOperationPreviewStruct();
39 
40 	/** the main Gtk struct as a void* */
41 	protected void* getStruct();
42 
43 
44 	/**
45 	 * Ends a preview.
46 	 *
47 	 * This function must be called to finish a custom print preview.
48 	 *
49 	 * Since: 2.10
50 	 */
51 	public void endPreview();
52 
53 	/**
54 	 * Returns whether the given page is included in the set of pages that
55 	 * have been selected for printing.
56 	 *
57 	 * Params:
58 	 *     pageNr = a page number
59 	 *
60 	 * Return: %TRUE if the page has been selected for printing
61 	 *
62 	 * Since: 2.10
63 	 */
64 	public bool isSelected(int pageNr);
65 
66 	/**
67 	 * Renders a page to the preview, using the print context that
68 	 * was passed to the #GtkPrintOperation::preview handler together
69 	 * with @preview.
70 	 *
71 	 * A custom iprint preview should use this function in its ::expose
72 	 * handler to render the currently selected page.
73 	 *
74 	 * Note that this function requires a suitable cairo context to
75 	 * be associated with the print context.
76 	 *
77 	 * Params:
78 	 *     pageNr = the page to render
79 	 *
80 	 * Since: 2.10
81 	 */
82 	public void renderPage(int pageNr);
83 	@property void delegate(PrintContext, PageSetup, PrintOperationPreviewIF)[] onGotPageSizeListeners();
84 	/**
85 	 * The ::got-page-size signal is emitted once for each page
86 	 * that gets rendered to the preview.
87 	 *
88 	 * A handler for this signal should update the @context
89 	 * according to @page_setup and set up a suitable cairo
90 	 * context, using gtk_print_context_set_cairo_context().
91 	 *
92 	 * Params:
93 	 *     context = the current #GtkPrintContext
94 	 *     pageSetup = the #GtkPageSetup for the current page
95 	 */
96 	void addOnGotPageSize(void delegate(PrintContext, PageSetup, PrintOperationPreviewIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0);
97 
98 	@property void delegate(PrintContext, PrintOperationPreviewIF)[] onReadyListeners();
99 	/**
100 	 * The ::ready signal gets emitted once per preview operation,
101 	 * before the first page is rendered.
102 	 *
103 	 * A handler for this signal can be used for setup tasks.
104 	 *
105 	 * Params:
106 	 *     context = the current #GtkPrintContext
107 	 */
108 	void addOnReady(void delegate(PrintContext, PrintOperationPreviewIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0);
109 
110 }