Questions tagged [gobject]

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

336 questions
4
votes
1 answer

How to stop a dbus gobject loop

I try to stop a gobject.MainLoop() after a few seconds. I don't know if it's possible to set a timeout to this kind of loop, it would be perfect but I have not found that. So, I tried to workaround this with threading but unfortunately, the main…
Tezonis
  • 43
  • 1
  • 6
4
votes
1 answer

Passing array in dbus-glib server

I have some writing a server exporting and interface over dbus, using dbus-glib. I'm trying write a method that takes an array of bytes as an input, but I'm having difficulty working out what types to use in my method arguments. For example, if I…
WillW
  • 871
  • 6
  • 18
4
votes
2 answers

Check if a gobject was correctly freed

I'm using glib's Testing framework for unit testing. My library also uses gobject, in my test unities I want to check if after the last _unref of each object the object was correctly freed. When g_test_trap_fork was available I used it after each…
4
votes
5 answers

Strangest Error I Have Ever Seen, a.k.a. ) *

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…
stojanman
  • 325
  • 3
  • 15
4
votes
1 answer

Python threads don't work with pygobject?

Take a look at this trivial python gobject program: import threading import gobject import time def f(): while True: print "HELLO" time.sleep(1) threading.Thread(target=f).start() gobject.MainLoop().run() It spawns a thread…
Dog
  • 7,707
  • 8
  • 40
  • 74
4
votes
1 answer

What are the problems addressed by a "COM-like" framework?

Often I see the GObject library compared to the COM-Windows-like solutions, In general I don't really get what kind of problems this frameworks are supposed to solve and what are the benefits originated from their adoption. I have found small…
juio
  • 154
  • 2
  • 9
4
votes
1 answer

python gtk gobject toggle visibility of windows

I wrote global shortcut example for hide and show my windows with key like 'F12', I used python-xlib and some script named 'pyxhook' everything works fine except when i want to hide() and show() window few times my proccess turning a zombie, but…
Özcan Esen
  • 340
  • 1
  • 13
3
votes
1 answer

How to create python bindings for a glib/gobject based library

I would like to create Python3 bindings for a glib/gobject based library, namely infinote/libinfinity. I am a bit puzzled about the necessary steps to accomplish this. Does PyGObject help here or not? Is this guide still valid for python3 and…
Fabian Henze
  • 980
  • 1
  • 10
  • 27
3
votes
1 answer

Disconnect a WiFi access point using NetworkManager and Python

I’m building an Python application that has to connect and disconnect from Wifi on linux box. I’m using NetworkManager layer, through the nice networkmanager lib found in cnetworkmanager (a python CLI for NetworkManager…
Olivier D.
  • 45
  • 8
3
votes
0 answers

Getting a C GObject pointer from a Python gobject

I'm working with pywebkitgtk, which is a codegen'd binding- so there are a ton of GObject subclasses. The binding isn't complete, and I use ctypes to do a bunch of stuff in addition. But now I need to use an object I've got- in Python- as an…
Matt Luongo
  • 14,371
  • 6
  • 53
  • 64
3
votes
2 answers

Initialize a GObject with parameters which are not GObject properties?

I have a GObject "A" which creates an instance of another GObject "B" in its constructor. The "B" object needs to be passed several construction-only properties. Now when creating an instance of object "A" I want to allow passing values for these…
user996839
  • 33
  • 3
3
votes
1 answer

does gobject depend on glib or glib depend on gobject?

I read a wikipedia page on gobject where it says, Depending only on GLib and libc, GObject is a cornerstone of GNOME and is used throughout GTK, Pango, ATK but this GLib API reference page lists GObject in its dependencies and this GObject API…
Some Nerd
  • 31
  • 2
3
votes
1 answer

GObject Compilation Error in Macro Expansion While Defining Class

Problem Using GObject and C, I am trying to create a subclass of the class GObject named "Bar" in module "Foo". However, the macro "G_DECLARE_FINAL_TYPE" (defined in gobject/gtype.h) expands incorrectly. Instead of expanding into FOO_BAR, it expands…
4X3L
  • 63
  • 7
3
votes
2 answers

What is the gnome keyring api for PyGi?

Does anyone where I can find the gnome keyring api in PyGi? I used to do: import gnomekeyring Now I want to use the new python/gobject introspection so it would be something like: from gi.repository import GnomeKeyring But I can't find the module…
Leon
  • 841
  • 3
  • 10
  • 21
3
votes
1 answer

Mixing ctypes and python classes in _fields_

I am trying to create a ctypes wrapper for a struct that uses gobject. The struct is defined as follows: struct GstMetaStruc { GstMeta meta; GstStructure* structure; }; GstMeta has an existing introspection wrapper that offers me accress…
edt_devel
  • 523
  • 1
  • 8
  • 16