Use GRecMutex instead of deprecated GStaticRecMutex

Avoids ugly compilation warning.  But we still leave the old codepath
for compiling against ancient glib.
Gtk: gtk-2.0 compatibility hack

Gtk-2.0 exposes internal implementation fields in .gir, and 'child'
field of Gtk.Bin clashes with lgi's own 'child' mechanism.  Moreover,
offsets to fields are calculated incorrectly in .typelib file for 64b
platforms, therefore it results in crash.

Solve everything by just removing 'child' field from Gtk.Bin

https://github.com/pavouk/lgi/issues/58
Ignore is_pointer on uint8 array elements when marshalling

This is workaround for wrong .gir generated for g_bytes_get_data().
Although incorrect in strict sense, fixes the real case, and broken
case is really strange and hypothetical (an array of uint8*).

https://github.com/pavouk/lgi/issues/57
Pango: add workaround for incorrect (transfer full) annotation

Pango.Layout.set_attributes() has incorrectly marked 'attrs' arg as
transfer-full, which caused memory leak.

https://github.com/pavouk/lgi/issues/60
Gio: adapt to API change of InputStream.[read|read_all|read_async]

Upstream added annotation which hide buffer size argument, which
changed API.  Modify sample accordingly, and add compatibility layer
which allows running this API change even on older glib versions
without that annotation.

https://github.com/pavouk/lgi/issues/59
gtkdemo: cosmetic fixes

Make class names in demo descriptions more Lua-like instead of C-like
gtkdemo: fix images loading

Another instance hit by Gio.InputStream[read|read_all|read_async] API change.
Prepare release of 0.7.2
Optimization - speedup of lookup of compound attributes

Remove unused _access_element abstraction, which was never overriden
but its lookup/invocation had quite significant cost.  Speedup of
simple method and property accesses varies between 10% and 20% (of
lgi-introduced overhead).
Optimization - cache attributes lookup

instead of always going through lookup of side category tables, cache
results directly in the type table (which means that lookup is done
automatically by Lua) or in _cached table (when element's category is
significant).  This optimization significantly cuts time needed for
lookup of type attributes.
Fix crash when marshalling nil for callback

Previously, garbage was left in destroy_handler. Some callees (notably
gtk_menu_popup_for_device()) invoked garbage destroy handler even when
target callback address was NULL.  Fix by setting destroy handler to
NULL in this case too.
Gtk: fix handling of Gtk.Menu.popup

lgi Gtk override previously assigned Gtk.Menu.popup to
popup_for_device, but in the meantime an annotation was added to
Gtk.Menu.popup.  Fix the resulting mess by adding override for
Gtk.Menu.popup which tries to accept arguments for both forms.
cairo: Fix a mistaken mask_surface signature
Merge pull request #62 from dafrito/master

cairo: Fix a mistaken mask_surface signature
cairo: Add complete tests for cairo.Matrix

Signed-off-by: Uli Schlachter <psychon@znc.in>
cairo: Remove extents() method from cairo.Path

This calls the C function cairo_path_extents(). However, this function expects a
cairo context (cairo_t*) as its first argument and returns the extents of the
current path. This function is already correctly described for cairo.Context.

cairo_path_t is just a public struct without any methods.

Signed-off-by: Uli Schlachter <psychon@znc.in>
cairo: Add new properties to cairo contexts

This adds the group_target, matrix and font_matrix properties to cairo contexts.

This uses cairo_get_group_target() which is already handled correctly. This new
group_target property complements the existing target property, which is
read-only, too.

Similar, the setters and getters for matrix and font_matrix already exist and
can easily be turned into a property

Signed-off-by: Uli Schlachter <psychon@znc.in>
cairo: Add tests for all context properties

Signed-off-by: Uli Schlachter <psychon@znc.in>
Merge pull request #63 from psychon/more-cairo-tests

Some more cairo tests (and small fixes/improvements)
Add '_allow' record/class field, which turns off field access checks

Also change ad-hoc condition to turn them off for class structs to use
this field instead.