Commit Graph

1557 Commits

Author SHA1 Message Date
Matthias Clasen
653c2f701a Fix gtk-doc cross-linking among glib/gobject/gio
Patch by Daniel Macks, bug 644687.
2011-07-10 23:55:52 -04:00
Javier Jardón
6079443b48 docs: G_GNUC_DEPRECATED_FOR was added in Glib 2.26 2011-07-08 16:16:27 +01:00
Javier Jardón
c2dc66ccf2 Move documentation to inline comments: spawn 2011-07-06 22:13:05 +01:00
Javier Jardón
0e27a71899 Move documentation to inline comments: conversions 2011-07-06 21:49:55 +01:00
Colin Walters
e9d0c82252 gio: Fix srcdir != builddir build for docs 2011-07-05 09:44:13 -04:00
Ryan Lortie
7dd25022ee Add g_simple_action_group_add_entries()
A convenience API for creating lots of actions quickly.
2011-06-29 16:20:52 +01:00
Ryan Lortie
5ff65d8695 Make 4 incompatible changes to the GAction API
This commit represents an API break to GAction in the following ways:

  - the 'set_state' entry in the GActionInterface vtable has been
    renamed to 'change_state'.  The number and order of vtable items has
    not otherwise changed.

  - g_action_set_state() has been renamed to g_action_change_state() to
    match the updated vtable entry.

  - the "state" property of the GAction interface has been changed to
    read-only to reflect the fact that g_action_set_state() no longer
    exists.

  - GSimpleActionClass has been hidden.  GSimpleAction can no longer be
    subclassed.

>> Rationale

g_action_set_state() has never been a true setter in the sense that
calling it will update the value of the "state" property.  It has always
been closer to "request 'state' to be changed to this value" with
semantics defined by the implementor of the interface.  This is why the
equivalent method in GActionGroup had its name changed from 'set' to
'change'.  This change makes the two interfaces more consistent and
removes any implication about the effect that calling set_state() should
have on the 'state' property.

>> Impact

This incompatible API break was undertaken only because I strongly
suspect that it will go entirely unnoticed.  If the break actually
affects anybody, then we will accommodate them (possibly going as far as
to revert this commit entirely).

The virtual table change only impacts implementors of GAction.  I
strongly suspect that this is nobody (except for GSimpleAction).

The hiding of GSimpleActionClass only impacts impacts subclasses of
GSimpleAction.  I strongly suspect that none of these exist.

The changing of the property to be read-only only affects people who
were trying to change the state by using GObject properties.  I strongly
suspect that this is nobody at all.

The removal of the g_action_set_state() call is the most dangerous, but
I still suspect that it will impact nobody outside of GLib.  If anybody
is impacted by this change then, at their request, I will reintroduce
the API as a deprecated alias for g_action_change_state().
2011-06-29 11:38:21 +01:00
Matthias Clasen
9eb65dd3ed Unicode: add a g_utf8_substring convenience api
This function is useful in the GTK+ accessibility implementations,
and seems like a nice thing to have around in general.
2011-06-23 21:31:40 -04:00
Christian Persch
316efa1b5d Add boxed GType for GMatchInfo 2011-06-24 01:03:50 +02:00
Christian Persch
00afe3fed3 Make GMatchInfo refcounted 2011-06-24 01:03:46 +02:00
Patrick Welche
3393711f42 build: fix gtk-doc when srcdir != builddir
https://bugzilla.gnome.org/show_bug.cgi?id=653250
2011-06-23 12:52:13 -04:00
Sebastian Dröge
1e58d11a44 Fix typo in GTime docs
deprected -> deprecated
2011-06-23 09:34:59 +02:00
Philip Van Hoof
f6ed357101 Add iter_replace API to GHashTableIter
https://bugzilla.gnome.org/show_bug.cgi?id=652822
2011-06-20 23:05:59 -04:00
Colin Walters
19610184c4 gdatainputstream: Add Since: tags and update gio-sections.txt
https://bugzilla.gnome.org/show_bug.cgi?id=652758
2011-06-17 08:52:23 -04:00
Patrick Welche
de0519581a Fix build due to trivial typos in ab0e9dbf.
https://bugzilla.gnome.org/show_bug.cgi?id=652750
2011-06-16 13:09:42 -04:00
Matthias Clasen
114b9b2504 Fix up symbol lists and docs 2011-06-14 07:17:06 -04:00
Matthias Clasen
a0361ec049 Fix doc generation
It helps to use the same file name on both ends...
2011-06-13 23:20:32 -04:00
David Zeuthen
30dfc35392 gdbus: Add --recurse and --only-properties options
These options are useful when debugging D-Bus services and working
with bug reports.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-06-09 13:22:18 -04:00
David Zeuthen
c672b73602 gdbus: Clarify the --xml option in the man page
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-06-09 12:25:27 -04:00
Ryan Lortie
caa8d2ae18 Document the deprecatation of G_CONST_RETURN
...but don't actually deprecate it yet.
2011-06-09 11:42:35 -04:00
Matthias Clasen
b04f6dbca0 Move gmain docs inline 2011-06-08 23:48:55 -04:00
Matthias Clasen
7648415a50 Move gutils docs inline 2011-06-08 23:44:39 -04:00
Matthias Clasen
e89f183cf6 Remove unused template 2011-06-08 23:29:21 -04:00
Colin Walters
ab0e9dbfa7 Generate $module-public-headers.txt file, feed it to gtk-doc
Rather than having the gtk-doc build machinery have a list of header
files to exclude, change the GLib build to dump a list of public
header files generated from the maintained Makefile.am files for
each of glib/, gobject/, gio/.

Also, for glib, always install glib-unix.h, even on non-Unix
platforms, for the same reason we install gwin32.h even on Unix.

https://bugzilla.gnome.org/show_bug.cgi?id=651745
2011-06-07 14:18:36 -04:00
Colin Walters
a6f09e104c GBuffer: Suffix header with private.h
This makes it clearer it's not public API yet.

https://bugzilla.gnome.org/show_bug.cgi?id=651745
2011-06-06 09:58:21 -04:00
Matthias Clasen
01f63b19f9 Fix links in gio docs 2011-06-04 18:48:19 -04:00
Matthias Clasen
75f7eef9cd Fix doc typos
Now with fewer broken links...
2011-06-04 14:43:52 -04:00
David Zeuthen
635f5373c2 Fix up gdbus invocation in example
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-06-04 12:43:00 -04:00
David Zeuthen
0b41002474 gdbus: Add a way to emit a signal
See https://bugs.freedesktop.org/show_bug.cgi?id=37890#c6 where it was
discovered that dbus-send(1) actually doesn't work (either libdbus-1's
flush implementation or dbus-send(1)'s usage of it is broken) so it's
useful to have here.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-06-04 12:36:38 -04:00
David Zeuthen
0c8bb8d479 Fix typos in "Migrating to GDBus" docs
It's Skeleton now, not Stub.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-06-04 11:52:59 -04:00
Matthias Clasen
4cd0b86103 Add pointer bitlocks to the docs 2011-06-03 20:54:32 -04:00
David Zeuthen
53ced63c6d Fix include path for gdbus-codegen example XML
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-06-03 14:45:29 -04:00
David Zeuthen
6d54505b2d Fix docs for D-Bus introspection data structures
Mark structs as boxed types and use /*< public >*/ so the struct
members are properly shown.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-06-03 14:39:04 -04:00
David Zeuthen
723adbc2fe Move gdbus-codegen example code and docs into separate directories
This avoids the generated types (e.g. ExampleAnimal, ExampleCat,
ExampleObject and ExampleObjectManagerClient) being referenced in the
core gio docs. This was requested by Matthias.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-06-03 14:18:56 -04:00
Colin Walters
3bd3067ffc gobject: Use _ prefixing in private headers over G_GNUC_INTERNAL in public headers
This helps out gtk-doc and g-ir-scanner, and also makes much clearer
what's private versus public.

https://bugzilla.gnome.org/show_bug.cgi?id=651745
2011-06-03 12:40:01 -04:00
Matthias Clasen
807d41b89b Documentation fixups 2011-05-29 00:05:07 -04:00
Matthias Clasen
d35e83d337 Documentation tweaks
Add Since tags, etc.
2011-05-28 21:12:52 -04:00
Ryan Lortie
8382135265 glib: Rewrite gatomic.[ch]
- remove all inline assembly versions

 - implement the atomic operations using either GCC intrinsics, the
   Windows interlocked API or a mutex-based fallback

 - drop gatomic-gcc.c since these are now defined in the header file.
   Adjust Makefile.am accordingly.

 - expand the set of operations: support 'get', 'set', 'compare and
   exchange', 'add', 'or', and 'xor' for both integers and pointers

 - deprecate g_atomic_int_exchange_and_add since g_atomic_int_add (as
   with all the new arithmetic operations) now returns the prior value

 - unify the use of macros: all functions are now wrapped in macros that
   perform the proper casts and checks

 - remove G_GNUC_MAY_ALIAS use; it was never required for the integer
   operations (since casting between pointers that only vary in
   signedness of the target is explicitly permitted) and we avoid the
   need for the pointer operations by using simple 'void *' instead of
   'gpointer *' (which caused the 'type-punned pointer' warning)

 - provide function implementations of g_atomic_int_inc and
   g_atomic_int_dec_and_test: these were strictly macros before

 - improve the documentation to make it very clear exactly which types
   of pointers these operations may be used with

 - remove a few uses of the now-deprecated g_atomic_int_exchange_and_add

 - drop initialisation of gatomic from gthread (by using a GStaticMutex
   instead of a GMutex)

 - update glib.symbols and documentation sections files

Closes #650823 and #650935
2011-05-28 16:10:44 -04:00
Ryan Lortie
c00ef0a17a Add G_STATIC_ASSERT_EXPR macro
https://bugzilla.gnome.org/show_bug.cgi?id=626549
2011-05-27 22:36:16 -04:00
David Zeuthen
3f569d2b5b gdbus-codegen: Fix up example to not use non-existant method
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-05-24 07:34:30 -04:00
David Zeuthen
ab18737ead gdbus-codegen: Properly render @param and %TRUE in generated Docbook
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-05-24 00:27:43 -04:00
Colin Walters
9966fe4493 g_key_file_has_key_full: New function to fix g_key_file_has_key()'s GError semantics
See https://bugzilla.gnome.org/show_bug.cgi?id=649657 for discussion
of why it's bad for bindings for gerror return values to both signal
errors and carry meaning.

https://bugzilla.gnome.org/show_bug.cgi?id=650345
2011-05-18 11:53:21 -04:00
David Zeuthen
11e01802ab gdbus-codegen: Ensure that generated skeletons are MT-safe
For example, if setting a property on a skeleton from another thread
than where it was constructed, the idle handler responsible for
emitting the PropertiesChanged() signal could run immediately and
clear skeleton->priv->changed_properties_idle_source causing
g_source_unref() to be called with a NULL pointer. This race was
easily be fixed by adding a lock to the skeleton object.

In addition to fixing this race, also move the code for setting up the
idle handler to a class handler for the GObject::notify signal. This
change allows use of g_object_freeze_notify() and g_object_thaw_notify()
to perform atomic property changes from another thread than the one
that the skeleton was created in.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-05-15 12:38:24 -04:00
David Zeuthen
5a811135f7 Add g_dbus_method_invocation_take_error() convenience method
Similar in spirit to g_simple_async_result_take_error().

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-05-11 20:57:54 -04:00
David Zeuthen
720d6ec8e4 gdbus: Add a --timeout option
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-05-06 15:27:52 -04:00
Ray Strode
7bcede9301 gdbus-codegen: fix typo in man page
s/on_handle_hello-world/on_handle_hello_world/
2011-05-06 13:00:38 -04:00
David Zeuthen
1ab29b6c4a GDBusObjectManagerServer: Allow setting :connection property
.. and add a C setter to do this. Also make the C getter return a
reference since the property may be set from another thread. Also
change the constructor to _not_ take a GDBusConnection since this is
something you almost always want to do _after_ creating it. The
API/ABI break is fine as there has never been a GLib release with this
type.

https://bugzilla.gnome.org/show_bug.cgi?id=648959

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-05-04 03:43:52 -04:00
Colin Walters
542215b78a Rename g_unix_pipe_flags to g_unix_open_pipe
From IRC discussion, people liked this name more.

https://bugzilla.gnome.org/show_bug.cgi?id=649322
2011-05-03 23:34:17 -04:00
Matthias Clasen
f4cff2b923 Some documentation additions 2011-05-01 23:02:53 -04:00
David Zeuthen
92aed13eb8 Update docs to take comments/suggestions from Matthias into account
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-29 13:11:22 -04:00