aboutsummaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
Diffstat (limited to 'ui')
-rw-r--r--ui/MainWidget.py29
-rw-r--r--ui/__init__.py0
2 files changed, 29 insertions, 0 deletions
diff --git a/ui/MainWidget.py b/ui/MainWidget.py
new file mode 100644
index 0000000..f285efc
--- /dev/null
+++ b/ui/MainWidget.py
@@ -0,0 +1,29 @@
+# Copyright (C) 2020 Jordan Halase <jordan@halase.me>
+#
+# Permission to use, copy, modify, and/or distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+# SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
+# OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+# CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+import gi
+gi.require_version('Gtk', '3.0')
+from gi.repository import Gtk
+
+class MainWidget(Gtk.Box):
+
+ def __init__(self):
+ Gtk.Box.__init__(self)
+
+ self.button = Gtk.Button(label="Python Button")
+ self.button.connect("clicked", self.on_button_clicked)
+ self.pack_start(self.button, True, True, 0)
+
+ def on_button_clicked(self, widget):
+ print("Hello, from a custom Python widget!")
diff --git a/ui/__init__.py b/ui/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/ui/__init__.py