From 760fb45fab539d3b228076f64c3d6480e9e57fd7 Mon Sep 17 00:00:00 2001 From: Jordan Halase Date: Mon, 9 Mar 2020 13:40:51 -0500 Subject: First commit --- readme.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 readme.md (limited to 'readme.md') diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..cd78d67 --- /dev/null +++ b/readme.md @@ -0,0 +1,22 @@ +# PyGObject From C + +Normally when creating graphical user interfaces using [GTK](https://gtk.org), +one would choose to write their whole project in C or another programming +language for which GTK bindings exist. + +For this example, we wish to use [PyGObject](https://pygobject.readthedocs.io) +to write a GTK application in Python, due to its simplicity, ubiquity, and +ablilty to do rapid ad-hoc development. However, if our application is part of +a larger user interface *not* written in Python, we need a way to bridge the +interface between Python and the host language. + +This proof-of-concept bridges PyGObject and C so that one may create GTK-based +user interfaces in Python as part of a larger interface with a C interface. +It does this by extracting the raw `GObject` C-pointer from the user-defined +`PyGObject` and passes it as a `GtkWidget` to the host. + +Please note that this is a proof-of-concept and may have issues with memory +management, error handling, and versioning. Whether Python or GTK is a good +fit for plugin UI development is debatable, the motivation for creating this +is for rapid ad-hoc UI creation during the development stage only, and not +intended for use in production. -- cgit v1.2.1