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
0 answers

Python3/GTK3 Box button-press-event

EDIT: Turns out that an EventBox was exactly what I needed. It dropped in and functioned exactly as expected! I was working on an app whose single window is to blink under certain criteria until the user clicks on it. Once clicked, the window ceases…
pdm
  • 1,027
  • 1
  • 9
  • 24
0
votes
1 answer

where can i find vala binding for libgimp?

Where can I find vala binding for libgimp? Or, can someone point me to clear (complete) instructions to get it from gimp source code? The instructions at https://wiki.gnome.org/Projects/Vala/Bindings are really too light for me.
v1nce
  • 735
  • 9
  • 20
0
votes
1 answer

why use 'widget' in python callback function (Gtk) which only prints on stdout?

I am learning Gtk programming with python from this. But I can not understand what is the reason for the widget keyword in the following callback definition? Can someone please explain what it does? def on_button_clicked(self, widget): …
Dipanjan Patra
  • 59
  • 1
  • 3
  • 10
0
votes
1 answer

How can I access gnome-contacts or its data from gjs

According to this answer (and comments) gnome-contacts is where contacts are centralized for Gnome and it does a good job of aggregating via telepathy, but the only way to access that information seems to be the Gnome Shell search provider which…
andy.holmes
  • 3,383
  • 17
  • 28
0
votes
1 answer

Creating a Gtk.Image from a pixel list

I am working on a GTK program that manipulates an image based on user input. I am using pypng to read the image and am now looking for a way to create a Gtk.Image from a pixel list without creating an intermediate image file.
Larivact
  • 5
  • 4
0
votes
1 answer

In what way is gobject facilitating binding?

On the official website of gobject, we can read: GObject, and its lower-level type system, GType, are used by GTK+ and most GNOME libraries to provide: object-oriented C-based APIs and automatic transparent API bindings to other compiled or…
eponier
  • 3,062
  • 9
  • 20
0
votes
1 answer

PyGObject GTK+ GLib.Date strftime()

A method call in Poppler returns a GDate object in my Python code. I cannot find a way how to nicely print this object. Following the Python GI API Reference, I came up with the following: gdate_object =…
timothymctim
  • 205
  • 1
  • 9
0
votes
1 answer

gobject introspection element-type GstStructure

As per this, I think it is not possible to create GArray using python bindings. To overcome this, I am writing a small library that will return a GArray. This library utilizes gobject introspection and exposes a method create_codec_array. /** *…
Chetan Naik
  • 133
  • 1
  • 9
0
votes
1 answer

How to read a stream size in Gstreamer?

1. Context I have a very simple pipeline: filesrc location=foo.wav ! decodebin ! ENCODER ! MUXER ! filesink location=bar.whatever with ENCODER being any gstreamer encoder and MUXER, whatever suitable muxer. The pipeline is working. For the sake of…
JohnW
  • 505
  • 3
  • 14
0
votes
1 answer

make not working on gobject-introspection due to glib error

I am running 64-bit Debian Wheezy and I have been trying to compile gobject-introspection using the steps here. When I initially tried to compile it using: ./configure --prefix=/usr --disable-static && make it complained that my version of GLib was…
Blimeo
  • 295
  • 2
  • 3
  • 10
0
votes
3 answers

While Compiling gobject-introspection-1.44.0 getting list of errors

For building GTK gobject-introspection-1.44.0 is required, It is configured without error but in make I'm getting a list of errors. CC _giscanner_la-giscannermodule.lo giscanner/giscannermodule.c:42:1: warning: return type defaults to 'int'…
nitin kumar
  • 642
  • 12
  • 21
0
votes
1 answer

GObject Introspection build fails while generating libgirepository_1_0_la-gdump.lo

While using MingW to cross compile the GObject Introspection library, version 1.31.22, I seem to hit a problem. Configuring the library seems to go well, but when I start building it the make file quickly terminates with: CC …
Jason Smith
  • 765
  • 8
  • 23
0
votes
1 answer

webkit (webkitgtk3) function prototype as seen in python from pywebkit

pywebkit makes calls from python into webkit by introspection. The prototype of called functions are bound at runtime. A little problem for developers is that you will not see the prototype in source code. How do you find the function prototype?…
minghua
  • 5,981
  • 6
  • 45
  • 71
0
votes
1 answer

PyGObject custom widget: how to draw an invalidated region?

I know that you need to subclass Gtk.DrawingArea in PyGObject in order to create a custom widget. You then connect the draw signal to a callback that looks like this: def on_draw(drawing_area, cr): # do something with cr return False To ask…
eepp
  • 7,255
  • 1
  • 38
  • 56
0
votes
1 answer

gobject introspection integration with autotools

I would like to contribute to open source by enabling a library that builds with GNU's autotools to generate Gobject Introspection files. A How-To to achieve this is already mentioned on the GObjectIntrospection's wiki page: Integrate GI in…
eisensheng
  • 13
  • 1
  • 3