1from gi.overrides import override
2from gi.importer import modules
3
4"""
5The only purpose of this file is to ensure the XApp widget GType is registered
6at the time of import.  Otherwise any user of XApp.GtkWindow would have to create
7a dummy widget prior to using a GtkBuilder to parse a ui file containing an
8XAppGtkWindow.
9
10The gi import machinery sweeps usr/lib/python*/dist-packages/gi/overrides for file
11matching the module name at the time of execution.
12
13This file needs to be in both python2 and python3 overrides locations.
14
15"""
16
17XApp = modules['XApp']._introspection_module
18
19__all__ = []
20
21class GtkWindow(XApp.GtkWindow):
22    pass
23
24class GtkButton(XApp.IconChooserButton):
25    pass
26
27class GtkBin(XApp.StackSidebar):
28    pass
29
30GtkWindow = override(GtkWindow)
31GtkButton = override(GtkButton)
32GtkBin = override(GtkBin)
33__all__.append('GtkWindow')
34__all__.append('GtkButton')
35__all__.append('GtkBin')
36