webkit - Getting a C GObject pointer from a Python gobject -
webkit - Getting a C GObject pointer from a Python gobject -
i'm working pywebkitgtk, codegen'd binding- there ton of gobject subclasses. binding isn't complete, , utilize ctypes bunch of stuff in addition.
but need utilize object i've got- in python- argument ctypes library call. clearly, won't work, , passing memory address of python object isn't winner, either. how can memory reference gobject backing python object?
here's illustration of doesn't work, might give thought i'm talking about.
>>> import ctypes >>> libwebkit = ctypes.cdll('libwebkit-1.0.so') >>> import webkit >>> webview = webkit.webview() >>> libwebkit.webkit_web_view_get_zoom_level(webview) #yes, know binding exposes argumenterror: argument 1: <type 'exceptions.typeerror'>: don't know how convert parameter 1
again, illustration illustrate point- want memory refs gobjects utilize ctypes.
python webkit gobject
Comments
Post a Comment