Questions tagged [gobject]

GObject(GLib Object System) provides a portable object system and transparent cross-language interoperability.

336 questions
9
votes
2 answers

PyGObject on Windows

Over the last few days of headaches, I've found 3 possible methods to do this, all of which have issues. PyGObject's pip install fails due to a lack of Cairo and probably other dependencies. While this would be my preferred method, it would…
FierySwordswoman
  • 181
  • 1
  • 2
  • 7
9
votes
2 answers

Is there a good way to copy a Gtk widget?

Is there a way, using the Gtk library in C, to clone a Gtk button (for instance), and pack it somewhere else in the app. I know you can't pack the same widget twice. And that this code obviously wouldn't work, but shows what happens when I attempt a…
Jake
  • 225
  • 3
  • 6
9
votes
2 answers

In GTK what is the difference between "signals" and "events"?

I am trying to get started with GTK, but I find the documentation for signals (https://developer.gnome.org/gobject/stable/signal.html) hard to understand. It seems as there is a difference between a "signal" and an "event". For example, the…
JayStrictor
  • 468
  • 1
  • 4
  • 10
9
votes
1 answer

Are Vala and Genie production ready?

I am working with some legacy C code which I need to refactor and generally clean up, to remove spaghetti type programming, adhere to the DRY principle etc. I was thinking of rewriting using C++, but I don't want to go that far, and would like to…
Homunculus Reticulli
  • 65,167
  • 81
  • 216
  • 341
8
votes
2 answers

Gtk Switch activate signal not firing

I'm trying to use a Gtk.Switch widget in an app but "activate" signal is not firing by clicks. It works fine when using the widget with keyboard by hitting reture/space key on it but clicks don't fire the "activate" event. Any Idea what is to be…
user250145
8
votes
3 answers

What is the correct way of casting const char* to char* without changing the API and not getting a warning

In my plain C99 project, I have an external C library that defines an interface (via GObject interfaces) that I need to implement: void interface_function (const char *address, [...]); Now, within the implementation (that I need to write) I need to…
Dynalon
  • 6,577
  • 10
  • 54
  • 84
8
votes
1 answer

Purpose of GValue, GTypeValueTable, GTypeInfo and GParamSpec

GObject library is really awfully documented. It's damn hard to figure the purposes of entities created. Namely, I don't get the roles of GValue, GTypeValueTable, GTypeInfo, GParamSpec and TypeData. In brief, the process of type registration is as…
Boris Burkov
  • 13,420
  • 17
  • 74
  • 109
7
votes
3 answers

How do I create a new signal in pygtk

I've created a python object, but I want to send signals on it. I made it inherit from gobject.GObject, but there doesn't seem to be any way to create a new signal on my object.
clahey
  • 4,795
  • 3
  • 27
  • 20
7
votes
1 answer

Get GTK+ theme colors with python and GObject introspection

With introduction of GObject introspection the way to access theme colors through widget.get_style() method is gone. I am interested on how to get theme colors when GTK+ is used through GOBject introspection. The solution should preferably work with…
MeanEYE
  • 967
  • 8
  • 24
7
votes
2 answers

image loading performance problems with python and gobject

I have a script with a GTK(GObject) interface I use for posting to my photo blog. I'm trying to improve it's responsiveness by loading the images in a background thread. I've had no luck trying to populate GdkPixbuf objects from a background thread,…
Gordon Wrigley
  • 11,015
  • 10
  • 48
  • 62
7
votes
2 answers

Should a g_object_new have a matching g_object_unref?

I'm using libnotify to show desktop notifications in my application; notify_notification_new() returns a NotifyNotification*, which should be passed as the first param to further function calls of the notification library. There is no…
legends2k
  • 31,634
  • 25
  • 118
  • 222
7
votes
1 answer

How to create custom widget in GTK3 in C?

do you know how do you create a custom widget in GTK 3 ? I tried to subclass GtkDrawingArea in C for hours. Gnome.org only provides a succinct tutorial on how to subclass G_OBJECT. My issue is that G_Object/GTK fails to view my custom…
Lærne
  • 3,010
  • 1
  • 22
  • 33
7
votes
1 answer

Gtk 3, python, appindicator, disable icon near label

I write openweathermap site appindicator in python, but i need only text label in indicator without icon. But when i leave "" then show me empty icon. Why, i need only text. In Ubuntu 12.04 python-appindicator don't need a icon if leave "" then not…
7
votes
4 answers

How much optimized is Vala generated C code over hand written C code?

Is Vala generated code are optimized like normal hand-written C code? Is there any performance overhead in using GObject system over not using it? NOTE: In my next C project I am researching over to use Vala or not. The project is not a GUI…
Anindya Chatterjee
  • 5,824
  • 13
  • 58
  • 82
6
votes
1 answer

What does gobject.type_register() do?

In PyGTK, what does gobject.type_register() do? The documentation merely says registers the specified Python class as a PyGTK type Well, duh. What does registering a class as a PyGtk type do?
Nathan
  • 5,272
  • 2
  • 26
  • 28
1
2
3
22 23