summaryrefslogtreecommitdiff
path: root/examples/gtk4/simple-bar/py/src/main.in.py
diff options
context:
space:
mode:
authorAylur <[email protected]>2025-03-01 20:59:09 +0100
committerAylur <[email protected]>2025-03-01 21:02:29 +0100
commit23cdbc8088b5c308a068b432a6b03213ede68f07 (patch)
tree1e8bd6ffde5273fcd80aca0d30cbb38dbe5f9461 /examples/gtk4/simple-bar/py/src/main.in.py
parentdfd1f23c7562694e571d44c45aa74fcea9b1ba01 (diff)
add gtk4 examples
Diffstat (limited to 'examples/gtk4/simple-bar/py/src/main.in.py')
-rwxr-xr-xexamples/gtk4/simple-bar/py/src/main.in.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/examples/gtk4/simple-bar/py/src/main.in.py b/examples/gtk4/simple-bar/py/src/main.in.py
new file mode 100755
index 0000000..58042f4
--- /dev/null
+++ b/examples/gtk4/simple-bar/py/src/main.in.py
@@ -0,0 +1,19 @@
+#!@PYTHON@
+
+import gi
+
+gi.require_version("Gio", "2.0")
+
+from gi.repository import Gio
+from sys import argv, path
+from ctypes import CDLL
+
+CDLL("@LAYER_SHELL_PREFIX@/lib/libgtk4-layer-shell.so")
+path.insert(1, "@PKGDATADIR@")
+Gio.Resource.load("@PKGDATADIR@/data.gresource")._register()
+
+
+if __name__ == "__main__":
+ from py.App import App
+
+ App.main(argv[2:])