Skip to content
ppizarro edited this page Sep 13, 2010 · 4 revisions

Initialization

Before usage, the module must be loaded on lua. You can do this using the require statement (available only in Lua 5.1).
All luasofia modules are loaded using require “luasofia.module_name”.

Example:


glib = require "sofia.glib"

Now you can use the global var glib to invoke the glib module functions. On the examples above we assume this already have been done and the glib module is loaded on the global var glib

Functions

prefer_gsource()
Use su_source implementation when su.root_create() is called.

root_create ()
Create a root that uses GSource as reactor.

  • @return A SURoot object that has a GSource as reactor.

Example:


root = glib.root_create()

see su-glib test

Clone this wiki locally