Package list xapp / a17a80e
all: Allow XAppGtkWindows to be used in builder (ui) files and in Glade. Michael Webster 4 years ago
13 changed file(s) with 91 addition(s) and 25 deletion(s). Raw diff Collapse all Expand all
00 SUBDIRS = libxapp po schemas files docs
1 if ENABLE_PYTHON
2 SUBDIRS += pygobject
3 endif
14
25 ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
36
9898
9999 CFLAGS="$CFLAGS -Wno-declaration-after-statement"
100100
101 # Python support
102
103 PYGOBJECT_REQUIRED=2.90
104
105 PKG_CHECK_EXISTS([pygobject-3.0 >= $PYGOBJECT_REQUIRED],
106 [have_python=yes], [have_python=no])
107
108 AS_IF([test "x$have_python" = "xyes"],
109 [AM_PATH_PYTHON
110 AC_SUBST([pyoverridesdir], [`$PYTHON -c "import gi;print (gi._overridesdir)" 2>/dev/null`])])
111
112 AM_CONDITIONAL([ENABLE_PYTHON], [test "x$have_python" = "xyes"])
113
101114 AC_CONFIG_FILES([
102115 Makefile
103116 docs/Makefile
104117 docs/reference/Makefile
118 pygobject/Makefile
105119 libxapp/Makefile
106120 libxapp/xapp.pc
107121 libxapp/xapp-uninstalled.pc
1717 libgtk-3-dev (>= 3.3.16),
1818 libx11-dev,
1919 python3,
20 python-gi-dev,
2021 yelp-tools,
2122 libgnomekbd-dev
2223 Standards-Version: 3.9.6
0 DEB_PKG_CONFIG_LIBDIR/girepository-1.0/XApp-1.0.typelib
0 DEB_PKG_CONFIG_LIBDIR/girepository-1.0/XApp-1.0.typelib
1 usr/lib/python*/dist-packages/gi/overrides/*.py
11 usr/lib/*/libxapp.so
22 usr/lib/*/pkgconfig/xapp.pc
33 usr/share/gir-1.0/XApp-1.0.gir
4 usr/share/glade/catalogs/xapp-glade-catalog.xml
2121
2222 override_dh_install:
2323 sed 's@DEB_PKG_CONFIG_LIBDIR@${DEB_PKG_CONFIG_LIBDIR}@' debian/gir1.2-xapp-1.0.install.in > debian/gir1.2-xapp-1.0.install
24 dh_install --list-missing
24
25 # install the python3 gir override file as well
26 PYTHON=python3 ./configure --prefix=/usr
27 cd pygobject/ && DESTDIR=../debian/tmp make install && cd ..
28
29 rm debian/tmp/usr/lib/*/*.la
30 rm debian/tmp/usr/lib/python*/dist-packages/gi/overrides/*.pyc
31 rm debian/tmp/usr/lib/python*/dist-packages/gi/overrides/*.pyo
32 rm -rf debian/tmp/usr/lib/python3/dist-packages/gi/overrides/__pycache__/
33
34 dh_install --fail-missing
35 dh_python2 -pgir1.2-xapp-1.0
1616 introspection_sources = \
1717 xapp-monitor-blanker.c \
1818 xapp-kbd-layout-controller.c \
19 xapp-gtk-window.c
19 xapp-gtk-window.c \
20 xapp-glade-catalog.c
2021
2122 libxapp_la_SOURCES = \
2223 $(introspection_sources)
3435
3536 pkgconfigdir = $(libdir)/pkgconfig
3637 pkgconfig_DATA = xapp.pc
38
39 catalogdir = $(prefix)/share/glade/catalogs/
40 catalog_DATA = xapp-glade-catalog.xml
3741
3842 libxappdir = $(includedir)/xapp/libxapp
3943 libxapp_HEADERS = \
0 #include "config.h"
1 #include <glib-object.h>
2
3 #include "xapp-gtk-window.h"
4
5 void
6 xapp_glade_catalog_init (const gchar *catalog_name);
7
8 void
9 xapp_glade_catalog_init (const gchar *catalog_name)
10 {
11 g_type_ensure (XAPP_TYPE_GTK_WINDOW);
12 }
0 <?xml version="1.0" encoding="UTF-8"?>
1 <glade-catalog name="xapp" library="xapp" depends="gtk+">
2 <init-function>xapp_glade_catalog_init</init-function>
3 <glade-widget-classes>
4 <glade-widget-class name="XAppGtkWindow" generic-name="xappgtkwindow"
5 title="XAppGtkWindow" parent="GtkWindow" />
6 </glade-widget-classes>
7
8 <glade-widget-group name="xapp-widgets" title="XApp Widgets">
9 <glade-widget-class-ref name="XAppGtkWindow" />
10 </glade-widget-group>
11 </glade-catalog>
5151 * These functions mirror those of the #XAppGtkWindow class, but allow the properties
5252 * to work with normal GtkWindows and descendants of GtkWindow.
5353 */
54
55 struct _XAppGtkWindow
56 {
57 GtkWindow parent_object;
58
59 XAppGtkWindowPrivate *priv;
60 };
5461
5562 struct _XAppGtkWindowPrivate
5663 {
352359 * Creates a new #XAppGtkWindow of type @type. See gtk_window_new()
353360 * for more details.
354361 *
355 * Returns: A new #XAppGtkWindow
362 * Returns: A new #XAppGtkWindow (transfer: full)
356363 */
357364 GtkWidget *
358365 xapp_gtk_window_new (GtkWindowType type)
77
88 G_BEGIN_DECLS
99
10 #define XAPP_TYPE_GTK_WINDOW (xapp_gtk_window_get_type ())
11 #define XAPP_GTK_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), XAPP_TYPE_GTK_WINDOW, XAppGtkWindow))
12 #define XAPP_GTK_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), XAPP_TYPE_GTK_WINDOW, XAppGtkWindowClass))
13 #define XAPP_IS_GTK_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XAPP_TYPE_GTK_WINDOW))
14 #define XAPP_IS_GTK_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), XAPP_TYPE_GTK_WINDOW))
15 #define XAPP_GTK_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), XAPP_TYPE_GTK_WINDOW, XAppGtkWindowClass))
10 #define XAPP_TYPE_GTK_WINDOW (xapp_gtk_window_get_type ())
11
12 G_DECLARE_FINAL_TYPE (XAppGtkWindow, xapp_gtk_window, XAPP, GTK_WINDOW, GtkWindow)
1613
1714 typedef struct _XAppGtkWindowPrivate XAppGtkWindowPrivate;
18 typedef struct _XAppGtkWindow XAppGtkWindow;
19 typedef struct _XAppGtkWindowClass XAppGtkWindowClass;
20
21 struct _XAppGtkWindow
22 {
23 GtkWindow parent_object;
24
25 XAppGtkWindowPrivate *priv;
26 };
27
28 struct _XAppGtkWindowClass
29 {
30 GtkWindowClass parent_class;
31 };
3215
3316 /* Class */
34 GType xapp_gtk_window_get_type (void);
3517 GtkWidget *xapp_gtk_window_new (GtkWindowType type);
3618
3719 void xapp_gtk_window_set_icon_name (XAppGtkWindow *window,
0 overridesdir = $(pyoverridesdir)
1 overrides_PYTHON = \
2 XApp.py
0 from gi.overrides import override
1 from gi.importer import modules
2
3 XApp = modules['XApp']._introspection_module
4
5 __all__ = []
6
7 class GtkWindow(XApp.GtkWindow):
8
9 def __init__(self, *args, **kwargs):
10 XApp.GtkWindow.__init__(self, *args, **kwargs)
11
12 GtkWindow = override(GtkWindow)
13 __all__.append('GtkWindow')