summaryrefslogtreecommitdiffstats
path: root/python/dbus_glib_bindings.pyx
blob: 3e2e33bdf1f62d2140905d26b5750b1b89fbc194 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
cimport dbus_bindings
import dbus_bindings

cdef extern from "dbus-glib.h":
    ctypedef struct GMainContext
    cdef void dbus_g_thread_init ()

cdef extern from "dbus-glib-lowlevel.h":
    cdef void dbus_connection_setup_with_g_main (dbus_bindings.DBusConnection *connection,
                                                 GMainContext   *context)
def setup_with_g_main(conn):
   cdef dbus_bindings.Connection connection
   connection = conn
   dbus_connection_setup_with_g_main(connection._get_conn(), NULL)

def gthreads_init ():
    dbus_g_thread_init ()