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.RootIF;
26 
27 private import gdk.Display;
28 private import gobject.ObjectG;
29 private import gtk.Widget;
30 private import gtk.c.functions;
31 public  import gtk.c.types;
32 
33 
34 /**
35  * `GtkRoot` is the interface implemented by all widgets that can act as a toplevel
36  * widget.
37  * 
38  * The root widget takes care of providing the connection to the windowing system
39  * and manages layout, drawing and event delivery for its widget hierarchy.
40  * 
41  * The obvious example of a `GtkRoot` is `GtkWindow`.
42  * 
43  * To get the display to which a `GtkRoot` belongs, use
44  * [method@Gtk.Root.get_display].
45  * 
46  * `GtkRoot` also maintains the location of keyboard focus inside its widget
47  * hierarchy, with [method@Gtk.Root.set_focus] and [method@Gtk.Root.get_focus].
48  */
49 public interface RootIF{
50 	/** Get the main Gtk struct */
51 	public GtkRoot* getRootStruct(bool transferOwnership = false);
52 
53 	/** the main Gtk struct as a void* */
54 	protected void* getStruct();
55 
56 
57 	/** */
58 	public static GType getType()
59 	{
60 		return gtk_root_get_type();
61 	}
62 
63 	/**
64 	 * Returns the display that this `GtkRoot` is on.
65 	 *
66 	 * Returns: the display of @root
67 	 */
68 	public Display getDisplayRoot();
69 
70 	/**
71 	 * Retrieves the current focused widget within the root.
72 	 *
73 	 * Note that this is the widget that would have the focus
74 	 * if the root is active; if the root is not focused then
75 	 * `gtk_widget_has_focus (widget)` will be %FALSE for the
76 	 * widget.
77 	 *
78 	 * Returns: the currently focused
79 	 *     widget, or %NULL if there is none.
80 	 */
81 	public Widget getFocus();
82 
83 	/**
84 	 * If @focus is not the current focus widget, and is focusable, sets
85 	 * it as the focus widget for the root.
86 	 *
87 	 * If @focus is %NULL, unsets the focus widget for the root.
88 	 *
89 	 * To set the focus to a particular widget in the root, it is usually
90 	 * more convenient to use [method@Gtk.Widget.grab_focus] instead of
91 	 * this function.
92 	 *
93 	 * Params:
94 	 *     focus = widget to be the new focus widget, or %NULL
95 	 *         to unset the focus widget
96 	 */
97 	public void setFocus(Widget focus);
98 }