Commit Graph

802 Commits

Author SHA1 Message Date
Ryan Lortie
b3b7ea8e22 Replace -I with $(glib_INCLUDES) and friends
Stop using ad hoc -I in all of our Makefile.am.  Use the new variables
instead.
2010-08-06 13:10:34 -04:00
paul
9f6faaffb6 Add $(top_builddir)/glib to includes
This is required to find glibconfig.h during srcdir != builddir builds
2010-08-05 09:08:34 -04:00
Emmanuele Bassi
4bc9654c63 binding: Add a default marshaller for the closure API
The g_object_bind_property_with_closures() function should set a
marshaller if the two GClosures don't have one already. This simplifies
the caller code and avoids duplication.

We need to add a new marshaller to the gmarshal.list matching the
signature of the GBindingTransformFunc function.
2010-08-04 01:09:28 +01:00
Mark Wielaard
f8ec75620d Don't add (extra) DESTDIR to tapsetdir for tapset_DATA.
https://bugzilla.gnome.org/show_bug.cgi?id=625876
2010-08-03 08:04:58 -04:00
Emmanuele Bassi
5e1c4b18a8 docs: Clarify user_data behavior for bind_property_full() 2010-08-03 10:34:59 +01:00
Emmanuele Bassi
90f7f171e6 binding: Add G_BINDING_INVERT_BOOLEAN
Since GSettings got the same functionality and flag in commit ca3b7b75b
GBinding should also have the ability to automatically invert a boolean
value without requiring a custom transformation function.
2010-08-03 10:29:50 +01:00
Emmanuele Bassi
3be3ad61d1 binding: Add a closure-based variant of bind_property_full()
Since using the function pointer version muddles the memory management
requirements of language bindings, we should implement a GClosure-based
variant on top of g_object_bind_property_full().

https://bugzilla.gnome.org/show_bug.cgi?id=622278
2010-08-03 09:51:49 +01:00
Benjamin Otte
86040bb2eb Revert "notify: Remove unused g_object_notify_queue_clear()"
This reverts commit 0201a81f04 and adds
locks in the right place.

As this file is a public header (see last commit), we cannot just remove
functions from it.
2010-07-23 10:52:51 +02:00
Benjamin Otte
2819dd60b7 notify: Readd g_object_notify_queue_from_object()
gobjectnotifyqueue.c is a public header, so we cannot remove files from
it. (Yes you read that right, this .c file is a public header. See your
installation directory.)
2010-07-23 10:52:51 +02:00
Benjamin Otte
0483ef000a notify: Make dedup code clearer
A for loops seems easier to understand to me than gotos.
2010-07-22 21:56:21 +02:00
Olivier Crête
9026b11e38 notify: Make GObject property change notifications thread safe
Adds locking around object property change notification handling. The
notifications are only emitted after all threads have called
g_object_thaw_notify().

https://bugzilla.gnome.org/show_bug.cgi?id=166020
2010-07-22 21:56:20 +02:00
Olivier Crête
65797f7e54 notify: Remove g_object_notify_queue_from_object()
The function will not be safe with object locking in place, so we remove
it. The workaround is somewhat ugly, but it works.

https://bugzilla.gnome.org/show_bug.cgi?id=166020
2010-07-22 21:56:20 +02:00
Olivier Crête
83026092eb notify: Refactor g_object_notify_queue_thaw()
This adds better error reporting and simplifies the code for adding
thread safety.

https://bugzilla.gnome.org/show_bug.cgi?id=166020
2010-07-22 21:56:20 +02:00
Olivier Crête
0201a81f04 notify: Remove unused g_object_notify_queue_clear()
https://bugzilla.gnome.org/show_bug.cgi?id=166020
2010-07-22 21:56:20 +02:00
Benjamin Otte
a2c5bba31d notify: Emit a g_critical() instead g_return_if_fail()ing
This does not change the code semantically in any way but avoids a
return in the middle of the code.

https://bugzilla.gnome.org/show_bug.cgi?id=166020
2010-07-22 21:56:20 +02:00
Benjamin Otte
24161d9c46 binding: Cast to avoid compiler warning 2010-07-22 21:56:20 +02:00
Ryan Lortie
adde752ec5 More docs fixes
Remove the g*alias.h from the ignore lists

  Remove other old files from ignore lists

  Clean up gobject docs
2010-07-12 17:46:17 -04:00
Ryan Lortie
83d67bf2e7 move glibconfig.h to glib/ 2010-07-12 15:33:05 -04:00
Will Thompson
2504ec988e Document NULL shortcut to g_value_array_insert etc.
You can pass a NULL GValue * to any of g_value_array_insert, _prepend or
_append to add a new, uninitialized value. This is a very useful
shortcut, and it should be documented rather than left languishing in a
comment in the implementation.

Fixes Gnome bug #552363.
2010-07-08 19:30:53 -04:00
Ryan Lortie
0fc50fa5f7 gobject/: fully remove gobjectalias hacks 2010-07-07 19:40:48 -04:00
Matthias Clasen
c2997efb66 Add some more checks to the binding tests 2010-07-05 23:13:18 -04:00
Matthias Clasen
4e97c96654 Remove a redundant branch
Since the name has been interned already at pspec creation time,
we can just call g_intern_string().
2010-07-05 23:13:18 -04:00
Colin Walters
499ece9b52 [gbinding] Move argument reference out of first column
It makes gobject-introspection complain.
2010-06-25 09:26:23 -04:00
Christian Dywan
272836936e Introduce G_PARAM_DEPRECATED and G_ENABLE_DIAGNOSTIC
See https://bugzilla.gnome.org/show_bug.cgi?id=601686
2010-06-23 16:45:12 +02:00
Emmanuele Bassi
f587cb57f2 binding: Add SYNC_CREATE to the flags
When creating a binding between two object properties we might want to
automatically synchronize the two values at the moment of the binding
creation, instead of waiting for the next change.

The G_BINDING_SYNC_CREATE flag does exactly what it says on the tin.

https://bugzilla.gnome.org/show_bug.cgi?id=622281
2010-06-23 15:19:24 +01:00
Ryan Lortie
d3af9c0ec5 neutralise pltcheck.sh 2010-06-23 10:12:14 -04:00
Matthias Clasen
fadac4bd0f Document g_cclosure_marshal_VOID__VARIANT 2010-06-23 09:25:30 -04:00
Ryan Lortie
c9553af68f Use -Bsymbolic-functions, drop g*alias PLT hackery
This is a minimal patch-out of the galias functionality.  We will do a
release like this so that we can easily back it out if there are
reported problems.

A more substantial cleanup (mostly removing #includes from every file)
will follow if there are no issues.
2010-06-21 13:55:28 -04:00
Christian Persch
2d4e48b73c Tiny docs fix 2010-06-19 20:04:20 +02:00
Christian Persch
db68f8203a Add g_value_take_variant
Turns out we do need g_value_take_variant(), so we can correctly
implement VARIANT:* marshalers.

Bug #621947.
2010-06-19 19:07:36 +02:00
Christian Persch
bdd8fef4c0 Fix VARIANT out args
Use g_value_set_variant(), not the nonexistent g_value_take_variant().
2010-06-18 00:38:46 +02:00
Christian Persch
86d681ba3e Distcheck fix
Add a missing symbol to gobject.symbols.
2010-06-17 23:50:10 +02:00
Matthias Clasen
19a752a5f4 fix a typo 2010-06-17 15:53:08 -04:00
Christian Persch
4708b8ecc3 Add fundamental type and pspec for GVariant
Make G_TYPE_VARIANT a fundamental type instead of boxed, and add
g_variant_{set,get,dup}_variant.

Add GParamSpecVariant.

Bug #610863.
2010-06-17 21:00:54 +02:00
Christian Persch
6a1cb9f697 Typo fix 2010-06-16 18:47:20 +02:00
Emmanuele Bassi
33aa4b4c66 binding: Use a hash table
Since an object instance might have a lot of bindings, using a list
might become a performance issue when removing them. Using a simple
hash table guarantees constant time lookup, which is the most common
operation.
2010-06-16 15:08:10 +01:00
Emmanuele Bassi
f72f65643f tests: Add a chain binding
Test the case with a chain like A → B, B → C, and what happens when
switching to a direct A → C link.

https://bugzilla.gnome.org/show_bug.cgi?id=621782
2010-06-16 14:56:59 +01:00
Christian Persch
1b8ee5196e Sprinkle some $(AM_V_GEN) around to make the build more silent. 2010-06-15 22:01:02 -04:00
Emmanuele Bassi
6d1d9cf1b5 gobject: Add GBinding
GBinding is a simple, opaque object that represents a binding between a
property on a GObject instance (source) and property on another GObject
instance (target).

https://bugzilla.gnome.org/show_bug.cgi?id=348080
2010-06-15 16:06:18 +01:00
Damien Lespiau
f3879a4bdc Introduce g_object_notify_by_pspec()
g_object_notify_by_pspec() will emit the "notify" signal on the given
pspec, short-circuiting the hash table lookup needed by
g_object_notify(). The suggested and documented way of using
g_object_notify_by_pspec() is similar to the way of emitting signals
with their ID.

Emission tests (with no handler attached to the notify signal) show a
10-15% speedup over using g_object_notify().

https://bugzilla.gnome.org/show_bug.cgi?id=615425
2010-06-15 10:51:36 +01:00
Alexander Larsson
8e41be13ef Add dtrace and systemtap support for gobject
This adds static markers and systemtap tapsets for:

* type creation
* object lifetimes (creation, ref, unref, dispose, finalize)
* signal creation and emission

Signal emissions and finalization marker have a corresponding
*_end (or *-end in dtrace) version that is when the corresponding
operation is finished.

https://bugzilla.gnome.org/show_bug.cgi?id=606044
2010-05-27 14:51:41 -04:00
Matthias Clasen
8db946fdfb Clean up man page handling
Remove all formatted man pages from git, and use the same
Makefile fragment in all doc dirs.
2010-05-21 22:28:42 -04:00
Sebastian Dröge
936ff022f2 Don't include __bss_start, _edata and _end symbols in the abichecks
They are added by the binutils gold linker.
2010-05-11 06:17:25 +02:00
Ryan Lortie
47805f4e0c Bug 617947 - glib-mkenums: add @valuenum@ support
Add a @valuenum@ substitution that outputs the integer value of a
particular enum value.  The value is determined by using (sandboxed)
perl to evaluate C expression.  If evaluation fails then glib-mkenums
dies loudly.  Evaluation is only enabled if '@valuenum@' appears in the
template file, so existing users will not be affected.
2010-05-06 14:21:39 -05:00
Ryan Lortie
7aa71527e5 glib-mkenums: Fix support for comment templates
Currently, specifying a comment template in the template file results in
the given template being appended to the default (C-style) one rather
than replacing it.

This causes it to be replaced outright.

Bug 617940.
2010-05-06 13:27:26 -05:00
Matthias Clasen
b440cc1546 Add a boxed type for GError
Patch by Sebastian Dröge, bug 614541
2010-04-22 20:10:56 -04:00
Javier Jardón
0f51e99565 Fix g_type_class_add_private() documentation
This fixes commit 81e2aa941b

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=614185
2010-03-29 18:17:40 +02:00
Matthias Clasen
81e2aa941b Some more doc cleanups 2010-03-26 10:11:46 -04:00
Ryan Lortie
2a209cb251 make check / makedistcheck fixes 2010-03-21 12:54:36 -05:00
Tor Lillqvist
226cc663e4 Avoid much of duplication in lists of source files
Don't keep the lists of source files for libglib, libgobject and
libgio in the VS project files in addition to the canonical location,
the corresponding Makefile.am files.

Instead, generate the corresponding .vcproj files at make dist time
using the C preprocessor, from template files called .vcprojin. We
still list explicitly in the .vcprojin files some of the
Windows-specific source files, and the sources files of gnulib and
pcre.
2010-03-21 16:15:02 +02:00