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. ...
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. ...
I am comfortable with C. but need to learn GObject and Glib for gstreamer. All i found on net is Gobject reference manual. Its good but looking for tutorial for Gobject/Glib as the main focus is on gstreamer. So pls share any other resources to learn the glib and gobject. ...
I've got a problem with using the io_add_watch monitor in python (via gobject). I want to do a nonblocking read of the whole buffer after every notification. Here's the code (shortened a bit): class SomeApp(object): def __init__(self): # some other init that does a lot of stderr debug writes fl = fcntl.fcntl(0, fcntl.F_G...
Gojbect class A implements interface IA, B is subclass of A. How can B override A's method that is part of the interface? Or, is this possible for gobject? I know how to override parent class method, but when inheritance meets interface, things seems to be more complicated. Thanks a lot! ...
Hi, does anyone have an alternative to using pygobject as i can't seem to get this to run at all in Mac OS X. I'm trying to use papyon which fails amazingly well if gobject isn't around. Joe ...
I'm writing this awesome application, at least I think it awesome, in C with the magnificent blend of GObject and after a while I start getting this very, extremely strange error. I also believe to have noticed it not appearing always. However this might just be the IDE's fault. Anyhow... GCC, apparently, complains: expected ')' before ...
I am trying to implement a customized CellRenderer in Ruby/GTK, and I've already found this suggestion: GObject subclassing in Ruby However, when I try the following: class CellRendererCustom < Gtk::CellRendererText type_register #register within gobject system? def initialize super end def get_size(widget, cell_area) ...
I was kindly directed to use GObject's "add_emission_hook" following a recent question on SO but I can't seem to find a usage example. Does anyone have one to share, please? ...
It seems that Pydev (1.5.4) on Eclipse (3.5.1) with Python 2.6 isn't able to correctly cross-reference the package gobject. Putting import gobject works OK but any more than that (e.g. class X(gobject.GObject) causes Pydev to report "unresolved reference" errors. What could be the problem? Note that every other package I use doesn't t...
According to GObject reference g_signal_connect_swapped(instance, detailed_signal, c_handler, data); connects a GCallback function to a signal for a particular object. The instance on which the signal is emitted and data will be swapped when calling the handler. I don't quite get what this means. Does this mean that the data will ...
I have been looking through the source of GLib and GObject and writing programs to use certain features of each. But now I'd like to debug though something in the GLib source code without installing anything on my system. I have a built version of the source code somewhere and I'd like to use those .so files rather than the system inst...
Hi there, I'm using gobject.timeout_add() to display a timer in my project (dojotools). I was wondering if there is any other way to achieve the same results, but without the gobject dependency. The requirement is just calling a method repeatedly, in a certain time interval. ...
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 notify_notification_free() which frees the pointer it returns. I looked up the source of notify_notifi...
I'm looking for up-to-date documentation and tutorials on creating Python bindings for gobjects. Everything I can find on the web is either incomplete or out of date. ...
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 shallow copy of the button: GtkButton *a = g_object_new(GTK_TYPE_BUTTON, "label", "o_0",...
I am trying to create python bindings to a vala library using the following IBM tutorial as a reference. My initial directory has the following two files: test.vala using GLib; namespace Test { public class Test : Object { public int sum(int x, int y) { return x + y; } } } test.override %% header...
This tutorial on using GObject in Python only covers using a property of type gobject.TYPE_FLOAT. I've adapted it to use an enumerated type: import pygtk pygtk.require('2.0') import gobject FUEL_NONE = 0 FUEL_SOME = 1 FUEL_FULL = 2 class Car(gobject.GObject): __gproperties__ = { 'fuel' : (gobject.TYPE_ENUM, ...
How to prevent further signal handlers to be called from the first signal handler callback in GSignal? For example, i register three functions - func1, func2 and func3 for the same signal "mysignal". If func1 is called first, how can i prevent func2 and func3 to be called from func1? This should not be made permanent. It should be runt...
I have written a python script to use gstreamer (pygst and gst modules) to calculate replaygain tags, and it was crashing inconsistently with various gobject errors. I found somewhere that you could fix this by putting the following boilerplate at the top of your script: import gobject gobject.threads_init() I tried it, and it worked....
I've just started using Seed for development. One thing that Seed's web page mentions is that it "Maps C-isms (say, out arguments, or enums) to things that make sense in JavaScript." Unfortunately, I can't find any documentation or examples for how out arguments should work. So, for example, the following call in Seed: window.get_size()...