PangoCairo: Use create_layout instead of layout_create

There is no function called pango_cairo_layout_create(), but
pango_cairo_create_layout() really does exist.

Signed-off-by: Uli Schlachter <psychon@znc.in>
Merge pull request #30 from psychon/pango-cairo-layout-constructor

PangoCairo: Use create_layout instead of layout_create
Gtk: add submenu into the list of children of MenuItem

https://github.com/pavouk/lgi/issues/31
Add a LUA version option to lgi/Makefile

This adds an option to change the target building version easily so that
it would be easier to build against different lua versions.

Signed-off-by: Ignas Anikevicius (gns_ank) <anikevicius@gmail.com>
Merge pull request #35 from gns-ank/master
Add generic closure creation method core.marshal.callback()
Store type to objects as userdata into proxy tables

Apart from speedup by avoiding type-search for every access of any
type instance, this also allows overriding type for specific instances
and is thus base for implementing sane syntax for virtual method
chaining.
Get rid of cache for callable objects

It was not effective because clients weren't duping objects, and broke
when creating dynamic callables from dynamic addresses.
Convert NULL callbacks to 'nil'.

Previously we created callable object which just crashed upon call.
Yielding 'nil' instead not only avoids crash, but also allows easier
testing of NULL (e.g. when chaining up to parent vtable methods).
Avoid circular dependency

When trying to use ffi in class.lua, circular dependency occured.
Avoid error in error reporting
Make record's _resolve() work recursively for records with parents
Avoid global access in cairo override
FFI records: avoid keeping parent for by-ref substructs
Add _index_<category> optional handlers for components
Avoid sinking input argument calls

Sinking input argument objects wreaks havoc to virtual functions
called during object construction (i.e. constructor(), init() and
constructed()) when constructing InitiallyUnowned descendant, because
sinking them during construction means that g_object_new() returns
already sunk object, which is quite unexpected and breaks things.
Add support for tying user_data to callbacks

This allows Lua-implementing virtual functions and callbacks which
take another callbacks and user-data context for it as arguments.  The
prime example is Gtk.Contatiner.forall() vfunc.
Gtk: Small fixes and extensions to Gtk override
Fix handling if closures with output arguments

Previous implementation was based on invalid assumption that output
values are stored backs to GValue arguments.  In reality, output
values are filled into slots pointed to by GValue of gpointer type.
Revamp GObject.Closure accordingly, implement helper inside
marshal (wrapper for allocating/marshalling GIArgument from Lua-side).
Gdk: add convenience mode for Gdk.RGBA.parse()

Add 'constructing' version of Gdk.RGBA.parse() which creates new
Gdk.RGBA instance and returns it, or returns 'nil' if parsing fails.