Questions tagged [gobject-introspection]

GObject introspection is a middleware layer between C GObject libraries and language bindings. The C library is scanned at compile time to generate a metadata file. At runtime, language bindings can read this metadata and automatically provide bindings to call into the native C library.

GObject introspection is a middleware layer between C libraries (which must use ) and language bindings. The C library can be scanned at compile time and generate a metadata file, in addition to the actual native C library. Then at runtime, language bindings can read this metadata and automatically provide bindings to call into the C library.

Two-level applications: C and your favorite runtime.

It makes sense to build many kinds of applications using (at least) two different levels and languages. Those being C + GObject, and a managed () runtime. C is good for graphics, multimedia, and lower level systems. However, writing complex software is difficult and error-prone without garbage collection. A managed runtime such as Vala, JavaScript, Python, Java, Lua, .NET, Scheme etc. makes a lot of sense for non-fast-path application logic such as configuration, layout and dialogs.

Thus, one of the major goals of the GObject introspection project is to be a convenient bridge between these two worlds, and allow you to choose the right tool for the job, rather than being limited inside one or the other. With the introspection project, you can write for example a ClutterActor or GtkWidget subclass in C, and then without any additional work use that class in JavaScript.

95 questions
0
votes
1 answer

pixbuf.subpixbuf alternative in Gtk3

I have a GTK+ 2 application I am porting to GTK+ 3. I have a function to cut out some part of an image - scaled_pb = pb.scale_simple(w,h, GdkPixbuf.InterpType.BILINEAR) scaled_pb = scaled_pb.subpixbuf(abs((width-w)/2),abs((height-h)/2), width,…
svineet
  • 1,859
  • 1
  • 17
  • 28
0
votes
2 answers

Which languages does libpeas support?

The plugin description for a libpeas plugin contains a line determining the Loader and with this the programming language the plugin is written in. It seems the documentation includes not list of available languages. Inspecting the git repository of…
XZS
  • 2,374
  • 2
  • 19
  • 38
0
votes
1 answer

Code completion with introspective bindings

I just started coding using the GObject, GTK and various other libraries in gi.repository, and because of import time introspective bindings, code completion doesn't really work in any IDE. Any method to make it work? I use Pycharm in…
user1265125
  • 2,608
  • 8
  • 42
  • 65
0
votes
1 answer

Debugging python gtk3 application

I'm writing a text editor in python and gtk3 and I keep getting vague warnings from somewhere within glib when I close a window: /usr/lib/python2.7/dist-packages/gi/types.py:47: Warning: invalid (NULL) pointer instance return info.invoke(*args,…
realh
  • 962
  • 2
  • 7
  • 22
-1
votes
2 answers

Strange behaviour for Gtk.TreeView keypress events

I have a Gtk.Treeview which shows rows with items. I want to select lines with button 1 (default behaviour), and, on clicking with button 3 (right), a context menu should appear. Here are the results I get: 1 - Using connect to connect to the…
jcoppens
  • 5,306
  • 6
  • 27
  • 47
1 2 3 4 5 6
7