Commit Graph

1828 Commits

Author SHA1 Message Date
Matthias Clasen
7e542e97a9 Trivial docs fix
I like GLib to be consistently capitalized in the docs.
2012-01-15 21:10:54 -05:00
Alexander Larsson
c7dfea30b3 Add documentation for GResource 2012-01-13 17:12:57 +01:00
Javier Jardón
9e732ab0ea docs/gobject/tutorial: Use g_object_class_install_properties 2012-01-12 14:13:07 +00:00
Matthias Clasen
00c00e2f3f Add G_FILE_ATTRIBUTE_FILESYSTEM_USED to get exact used space
This is implemented by with statfs_buffer.f_bavail (free blocks
for unprivileged users) as a default way to retrieve real free space.
Based on a patch by Marcus Carlson, bug 625751.
2012-01-09 21:49:08 -05:00
Ravi Sankar Guntur
fd7e443838 add g_queue_free_full to glib-sections.txt
Signed-off-by: Ravi Sankar Guntur <ravi.g@samsung.com>

https://bugzilla.gnome.org/show_bug.cgi?id=667331
2012-01-09 19:27:41 -05:00
Ryan Lortie
752f0cac15 GHashTable: new 'add' and 'contains' APIs
These are both convenience APIs that make it slightly nicer to use
GHashTable as a set (which is something we document as officially
supported).
2012-01-06 10:18:41 -05:00
Matthias Clasen
e6a5c2efb2 Add GWeakRef to the docs 2012-01-03 08:02:49 -05:00
Matthias Clasen
030bf82340 Some minor updates of building.sgml
https://bugzilla.gnome.org/show_bug.cgi?id=664830
2011-12-27 21:49:19 -05:00
Simon McVittie
993de34a77 Add undefined/no-undefined mode options to GTester
https://bugzilla.gnome.org/show_bug.cgi?id=666116
2011-12-27 17:51:11 -05:00
Dan Winship
3f3e141ec8 Add GSocketClient::event, for tracking socket client status
This can be used for debugging, or for progress UIs ("Connecting to
example.com..."), or to do low-level tweaking on the connection at
various points in the process.

https://bugzilla.gnome.org/show_bug.cgi?id=665805
2011-12-22 15:44:24 -05:00
Dan Winship
57f279988c Add g_socket_connection_connect(), etc
Previously it was more or less assumed that GSocketConnections were
always connected, although this was not enforced. Make it explicit
that they don't need to be, and add methods to connect them, and
simplify GSocketClient by using those methods.

https://bugzilla.gnome.org/show_bug.cgi?id=665805
2011-12-22 13:22:25 -05:00
Ryan Lortie
adbfa38c8e docs: remove duplicate GMenuModel from gio.types 2011-12-19 22:56:05 -05:00
Ryan Lortie
5e8a10daf1 gitignore 2011-12-19 13:38:09 -05:00
Ryan Lortie
0a22f63ebe Drop public menu APIs from GApplication
This is moving to Gtk, but we don't want to do it all right now.
2011-12-19 12:34:16 -05:00
Matthias Clasen
4041349037 Teach gtk-doc about G_GNUC_WARN_UNUSED_RESULT 2011-12-19 07:45:43 -05:00
Ryan Lortie
eefd08996f introduce GRemoteActionGroup
This interfaceifies the extra functions that were on GDBusActionGroup
for dealing with platform data.

The two main benefits of doing this:

  - no longer have to do a silly song and dance in GApplication to avoid
    calling GDBusActionGroup API from non-dbus-aware code

  - the interface can be reused by the action group exporter to avoid
    ugly and unbindable hook callbacks

https://bugzilla.gnome.org/show_bug.cgi?id=665737
2011-12-17 12:54:02 -05:00
Ryan Lortie
f58df66d4d GDBusActionGroup: add _full variants of activation
This allows the platform_data to be explicitly specified.
2011-12-16 22:23:30 -05:00
Stef Walter
7e92997539 documentation fixes
Fixes for gtk-doc warnings.

http://bugzilla.gnome.org/show_bug.cgi?id=66469

https://bugzilla.gnome.org/show_bug.cgi?id=664699
2011-12-13 23:01:51 -05:00
Matthias Clasen
b0c3997fdd Improve GNetworkMonitor docs
Make sure we get signal and property docs, and mention
the extension point in the overview.
2011-12-13 13:21:55 -05:00
Matthias Clasen
d50f77b394 Add g_application_set/get_default to the docs 2011-12-10 21:42:49 -05:00
Ryan Lortie
829b4dfb43 Clean up GApplication docs
Clean up the docs for GApplication and related classes.

I'm no longer writing documentation for the structure type of classes
and interfaces.  See https://bugzilla.gnome.org/show_bug.cgi?id=665926
for discussin on the correct way forward on this point.

Also: stop putting gtk-doc comments in installed headers.
2011-12-10 17:23:28 -05:00
Thomas Hindoe Paaboel Andersen
721667399a GFile: add g_file_new_temp
A convenience function that creates a temporary file and returns
a GFile and GFileIOStream for it.

The file is created using g_file_open_tmp.

https://bugzilla.gnome.org/show_bug.cgi?id=657085
2011-12-09 08:58:05 -05:00
Ryan Lortie
a6366dc289 GDBusActionGroup: make API just like GDBusMenuModel
Have one simple _get() API that returns the group immediately, in an
empty state.  The group is initialised on the first attempt to interact
with it.

Leave a secret 'back door' for GApplication to do a blocking
initialisation.
2011-12-08 18:07:47 -05:00
Matthias Clasen
04aab0cd46 Fix up docs 2011-12-08 18:05:15 -05:00
Ryan Lortie
4f2c207745 menu/action exporter docs fixup 2011-12-08 18:05:14 -05:00
Ryan Lortie
3821627366 GApplication: make distinction about menus
Rename g_application_set_menu to g_application_set_app_menu and make a
couple of fixups.  Clarify the documentation about exactly what this
menu is meant to be.

Add g_application_set_menubar and document that as well.
2011-12-08 18:05:14 -05:00
Matthias Clasen
eb09099f65 Minor doc improvements 2011-12-08 18:05:14 -05:00
Matthias Clasen
c8e76fdda2 Add GActionMap to the docs 2011-12-08 18:05:14 -05:00
Matthias Clasen
db34b1aebe Rename exporter APIs
There are no public 'exporter' objects, so don't allude to them
in the function names. At the same time, we want to make it clear
that these functions are D-Bus specific.

The new APIs are
g_action_group_dbus_export_start
g_action_group_dbus_export_query
g_action_group_dbus_export_stop
g_menu_model_dbus_export_start
g_menu_model_dbus_export_query
g_menu_model_dbus_export_stop
2011-12-08 18:05:12 -05:00
Matthias Clasen
ae0bd032ca Add g_application_set_menu
This adds ane asy way to export menu information alongside
the actions that are already exported by GApplication.
2011-12-08 18:05:12 -05:00
Ryan Lortie
d110fd9202 Add GMenuProxy
GMenuProxy can be used as a client-side wrapper
for the a menu model that has been exported on D-Bus.
2011-12-08 18:05:12 -05:00
Matthias Clasen
66e089f086 Add GMenuModel D-Bus exporter 2011-12-08 18:05:12 -05:00
Matthias Clasen
6b40d4eb6b Add GMenu markup
These functions serialize and deserialize a GMenuModel
to and from XML.
2011-12-08 18:05:12 -05:00
Matthias Clasen
13f5977735 Add GMenu 2011-12-08 18:05:12 -05:00
Matthias Clasen
12a39a05d3 Add GMenuModel 2011-12-08 18:05:12 -05:00
Ryan Lortie
c249e10d11 Add GDBusActionGroup
GDBusActionGroup can be used as a client-side wrapper
for the an action group that has been exported on D-Bus.
2011-12-08 18:05:12 -05:00
Ryan Lortie
940ec94f0a Add GActionGroup D-Bus exporter 2011-12-08 18:05:12 -05:00
Philip Withnall
386bb0faad unicode: Fix a few issues with G_UNICHAR_MAX_DECOMPOSITION_LENGTH
Raised by Matthias in bgo#665685 but which I didn't spot until after pushing
commit 3ac7c35656.

Renames G_UNICHAR_MAX_DECOMPOSITION_LEN to G_UNICHAR_MAX_DECOMPOSITION_LENGTH
and fixes a few documentation issues.

See: bgo#665685
2011-12-06 19:41:31 +00:00
Tristan Van Berkom
a00530ecb0 GDBusInterfaceSkeleton: make it possible to export on multiple connections
This is useful in peer-to-peer connections.

With minor changes by David Zeuthen <davidz@redhat.com>.

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

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-12-02 11:20:21 -05:00
Nicola Fontana
f24d8247b3 Do not use static GTypeInfo and GInterfaceInfo
Either g_type_register_static_simple (used by G_DEFINE_TYPE_EXTENDED)
and G_IMPLEMENT_INTERFACE use automatic variables for GTypeInfo and
GInterfaceInfo structs, while tutorials and source code often use
static variables. This commit consistently adopts the former method.

https://bugzilla.gnome.org/show_bug.cgi?id=600161
2011-11-29 22:03:25 -05:00
Carlos Garcia Campos
4ce5a11daf gtester: Add command line option to skip tests
https://bugzilla.gnome.org/show_bug.cgi?id=664809
2011-11-27 14:33:47 +01:00
Matthias Clasen
e4b7cfcb03 Rearrange GApplication docs
Move the GApplication docs to the front of the section,
where they belong.
2011-11-26 22:38:32 -05:00
Ryan Lortie
f468e9c309 Add g_action_group_query_action()
This new API allows requesting multiple pieces of information about a
particular action in one go and also simplifies the burden for
GActionGroup implementations -- they need not implement all the separate
APIs now.
2011-11-26 19:25:32 -05:00
Stef Walter
fcc69fd318 GBytes: A new type for an immutable set of bytes.
* Represents an immutable reference counted block of memory.
 * This is basically the internal glib GBuffer structure exposed,
   renamed, and with some additional capabilities.
 * The GBytes name comes from python3's immutable 'bytes' type
 * GBytes can be safely used as keys in hash tables, and have
   functions for doing so: g_bytes_hash, g_bytes_equal
 * GByteArray is a mutable form of GBytes, and vice versa. There
   are functions for converting from one to the other efficiently:
   g_bytes_unref_to_array() and g_byte_array_free_to_bytes()
 * Adds g_byte_array_new_take() to support above functions

https://bugzilla.gnome.org/show_bug.cgi?id=663291
2011-11-24 08:58:38 +01:00
Matthias Clasen
069ec3719c Fix distcheck
Now that we have switched to template-free docs, these
hand-rolled cleanup rules get in the way.
2011-11-23 18:13:44 -05:00
Ryan Lortie
a4421529b8 Add gtk-doc for gsettingsschema{,source} 2011-11-17 14:03:39 +00:00
Benjamin Otte
1985d54bb2 fileinfo: Add g_file_attribute_matcher_subtract()
Added as public API so I can write tests, the use case is local.
2011-11-16 17:19:02 +01:00
Benjamin Otte
b400127b3e fileinfo: Add g_file_attribute_matcher_to_string()
This is to be mainly used for debugging and tests.
2011-11-16 17:18:13 +01:00
Javier Jardón
f08a1d126c docs: Remove tmpl directory
We use inline comments now
2011-11-15 12:11:55 +00:00
Matthias Clasen
3f0d275295 Move remaining docs inline
This introduces a fake source file just for holding
docs that have no good place elsewhere. Not great, but
better than templates.
2011-11-14 21:22:46 -05:00
Matthias Clasen
127df9bd83 Move GModule docs inline 2011-11-14 21:22:46 -05:00
Matthias Clasen
2195e20dce Move GDate docs inline 2011-11-14 21:22:46 -05:00
Matthias Clasen
18da6e6be9 Move i18n docs inline 2011-11-14 21:22:46 -05:00
Matthias Clasen
c8b0617a2b Move slice and hook docs inline 2011-11-14 21:22:37 -05:00
Dan Winship
fe5ba0f291 add GNetworkMonitor, for... monitoring the network
Add GNetworkMonitor and its associated extension point, provide a base
implementation that always claims the network is available, and a
netlink-based implementation built on top of that that actually tracks
the network state.

https://bugzilla.gnome.org/show_bug.cgi?id=620932
2011-11-14 13:42:30 -05:00
Dan Winship
eb9755dc9c GInetAddressMask: new type for internet address range matching
Eg, for matching a GInetAddress to a range like "10.0.0.0/8" or
"fe80::/10"

https://bugzilla.gnome.org/show_bug.cgi?id=620932
2011-11-14 13:42:29 -05:00
Matthias Clasen
e60846dc78 Some more docs reshuffling 2011-11-12 22:52:24 -05:00
Matthias Clasen
06bb6c75a2 More consistent doc formatting
Move some things around, make capitalization of short descriptions
more consistent.
2011-11-12 21:54:42 -05:00
Dan Winship
a5bf1c117b Fix g_variant_get_gtype() deprecation message
Instead of:

warning: ‘g_variant_get_gtype’ is deprecated (declared at ../../gobject/glib-types.h:242): Use '((GType) ((21) << (2)))' instead [-Wdeprecated-declarations]

show:

warning: ‘g_variant_get_gtype’ is deprecated (declared at ../../gobject/glib-types.h:242): Use ''G_VARIANT_GET_TYPE'' instead [-Wdeprecated-declarations]

Also, document the macro-expansion problem in the
G_GNUC_DEPRECATED_FOR docs
2011-11-07 13:48:30 -05:00
Matthias Clasen
d2d62ecfcd Make the default log handler more useful
We make the default log handler only print default and informational
messages if the log domain is explicitly requested.

https://bugzilla.gnome.org/show_bug.cgi?id=661926
2011-11-03 01:50:29 -04:00
Matthias Clasen
07bcb3f8d6 Update deprecation docs 2011-11-03 00:05:29 -04:00
Dan Winship
f9c2362e43 glib-mkenums: add --identifier-prefix and --symbol-prefix args
Allow passing --identifier-prefix and --symbol-prefix to glib-mkenums,
with the same meanings as in g-ir-scanner, to allow fixing up the enum
name parsing globally rather than needing to add a /<* *>/ override to
each enum.

https://bugzilla.gnome.org/show_bug.cgi?id=661797
2011-10-28 18:04:28 -04:00
Dan Winship
78a0dbd853 docs: don't refer to a deprecated glib-mkenums flag
Refer to the new flag instead

https://bugzilla.gnome.org/show_bug.cgi?id=661797
2011-10-28 18:04:28 -04:00
Sjoerd Simons
6a81ced72d Fix document generation in out of tree builds
https://bugzilla.gnome.org/show_bug.cgi?id=662390
2011-10-24 20:40:35 -04:00
Ryan Lortie
3d13ee1b5f GVariant format string docs: fix maybe types
The documentation for maybe types failed to mention 'a' as one of the
types that was handled with a single pointer for which NULL means
"nothing".  Correct that omission.

Problem caught by Shaun McCance.
2011-10-21 15:04:37 -04:00
Ryan Lortie
2a98cc635e The usual docs unbreaking... 2011-10-19 15:07:22 -04:00
Ryan Lortie
aba0f0c38b gatomic: introduce G_ATOMIC_LOCK_FREE
We clean up the detection of if we should do 'real' atomic operations or
mutex-emulated ones with the introduction of a new (public) macro:
G_ATOMIC_LOCK_FREE.  If defined, our atomic operations are guaranteed to
be done in hardware.

We need to use __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 to determine if our
compiler supports GCC-style atomic operations from the gatomic.h header
because we might be building a program against GLib using a different
set of compiler options (or a different compiler) than was used to build
GLib itself.

Unfortunately, this macro is not available on clang, so it has currently
regressed to using the mutex emulation.  A bug about that has been
opened here:

  http://llvm.org/bugs/show_bug.cgi?id=11174
2011-10-18 16:45:28 -04:00
David Zeuthen
915e2238c4 gio: Introduce get_sort_key() methods on GDrive, GVolume and GMount
This is needed to implement efficient and predictable proxy volume
monitors, see

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

for details.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-10-18 14:29:18 -04:00
Matthias Clasen
45f221c32f Move GTrashStack out of gutils.[hc]
Reducing the mess in gutils, and moving docs inline
at the same time. Double win.
2011-10-16 16:52:24 -04:00
Matthias Clasen
d0bb1e0b0a Move g_get_codeset next to g_get_charset
g_get_codeset is a close relatove to g_get_charset, and up to now
it lived a shadowy existence without any header presence.
2011-10-15 23:27:28 -04:00
Giovanni Campagna
96817746d9 Turn GKeyFile into a boxed for introspection
Using the new refcounting API, introduce a boxed type wrapping
GKeyFile and expose it introspection bindings in glib-types.h.
2011-10-15 17:51:25 -04:00
Christian Persch
a57c9148cf GKeyFile: Add refcounting API
Adds g_key_file_ref and g_key_file_unref, to be used by a future
GKeyFile boxed type for language bindings.

Based on the patch by Christian Persch and Emmanuele Bassi.

Author: Christian Persch
Signed-off-by: Johan Dahlin
Signed-off-by: Giovanni Campagna

https://bugzilla.gnome.org/show_bug.cgi?id=590808
2011-10-15 17:44:45 -04:00
Matthias Clasen
dfd75d2ead Add 'Since 2.32' indexes to gio and gobject docs 2011-10-15 17:31:47 -04:00
Dan Winship
de834bed30 GAppLaunchContext: add environment-manipulating functions
Add functions for manipulating the environment under which a
GAppLaunchContext will launch its children, to avoid thread-related
bugs with using setenv() directly.

FIXME: win32 side isn't implemented yet

https://bugzilla.gnome.org/show_bug.cgi?id=659326
2011-10-15 17:30:55 -04:00
Matthias Clasen
117e534091 Misc doc formatting fixes 2011-10-15 17:00:56 -04:00
Dan Winship
409d93148f gutils: Add functions for working with environment arrays
When spawning a child process, it is not safe to call setenv() before
the fork() (because setenv() isn't thread-safe), but it's also not
safe to call it after the fork() (because it's not async-signal-safe).
So the only safe way to alter the environment for a child process from
a threaded program is to pass a fully-formed envp array to
exec*/g_spawn*/etc.

So, add g_environ_getenv(), g_environ_setenv(), and
g_environ_unsetenv(), which act like their namesakes, but work on
arbitrary arrays rather than working directly on the environment.

http://bugzilla.gnome.org/show_bug.cgi?id=659326
2011-10-15 15:54:45 -04:00
Ryan Lortie
e75e9c3044 Rename g_thread_try to g_thread_try_new 2011-10-15 09:48:10 -04:00
Matthias Clasen
81431fa5b8 Add g_thread_try to the docs 2011-10-14 23:12:06 -04:00
Matthias Clasen
d000bf67f7 Update doc lists 2011-10-14 23:01:05 -04:00
Ryan Lortie
51773c6c64 Mask all signals in GLib worker thread
Some code using GLib (gnome-keyring-daemon, for example) assumes that
they can catch signals by masking them out in the main thread and
calling sigwait() from a worker.

The problem is that our new worker thread catches the signals before
sigwait() has a chance and the default action occurs (typically
resulting in program termination).

If we mask all the signals in our worker, then this can't happen.
2011-10-14 20:01:22 -04:00
Florian Müllner
1ed88f0615 desktop-app-info: Add support for X-GNOME-Keywords
With search gaining traction as being the preferred way to locate
applications, the existing .desktop file fields meant for browsing
often produce insufficient results.
gnome-control-center introduced a custom X-GNOME-Keywords field for
that purpose, which we plan to support in gnome-shell as well.

https://bugzilla.gnome.org/show_bug.cgi?id=661763
2011-10-14 23:30:21 +02:00
Ryan Lortie
4033c616ff GCond: use monotonic time for timed waits
Switch GCond to using monotonic time for timed waits by introducing a
new API based on monotonic time in a gint64: g_cond_wait_until().

Deprecate the old API based on wallclock time in a GTimeVal.

Fix up the gtk-doc for GCond while we're at it: update the examples to
use static-allocated GCond and GMutex and clarify some things a bit.
Also explain the rationale behind using an absolute time instead of a
relative time.
2011-10-13 23:44:17 -04:00
Matthias Clasen
6613b2f8fd Move more docs inline 2011-10-12 22:29:53 -04:00
Matthias Clasen
75ea14e885 Move GScanner docs inline 2011-10-12 21:49:44 -04:00
Matthias Clasen
2da83bbd36 Deprecate GCache
Ryan said it would be 'deprecated soon in GLib', when he removed
the use of this in GTK+. That was a year ago, so its about time
we act on it.
2011-10-12 19:55:02 -04:00
Matthias Clasen
7455dd370e Make single includes mandatory
This has been the official line since 2.17, which seems plenty
long enough for a transition phase.
2011-10-12 00:25:38 -04:00
Matthias Clasen
c6016458ba Update deprecation docs 2011-10-11 23:50:34 -04:00
Matthias Clasen
a1acf35653 Add our own deprecation macros
This will allow to suppress deprecation warnings on a per-module
basis, if needed. They are on by default now, though.
2011-10-11 13:42:58 -04:00
Matthias Clasen
0da0411a4a Add better deprecation macros
Unlike G_GNUC_... macros, the new G_DEPRECATED[_FOR] are
meant as abstractions that work with different compilers.
Using a new name also lets us restrict it to 'must be placed
before the declaration', which works with more compilers.

https://bugzilla.gnome.org/show_bug.cgi?id=661438
2011-10-11 13:13:27 -04:00
Dan Winship
59f1f54655 Add g_main_context_ref_thread_default()
Add g_main_context_ref_thread_default(), which always returns a
reffed GMainContext, rather than sometimes returning a (non-reffed)
GMainContext, and sometimes returning NULL. This simplifies the
bookkeeping in any code that needs to keep a reference to the
thread-default context for a while.

https://bugzilla.gnome.org/show_bug.cgi?id=660994
2011-10-07 10:14:34 -04:00
Ryan Lortie
e76927006a Move G_LOCK below GMutex in the docs
The flow is currently a bit wrong since G_LOCK makes reference to GMutex
which was not yet defined, so switch things around.
2011-10-06 12:24:21 -04:00
Ryan Lortie
761e75f849 .gitignore 2011-10-06 12:21:33 -04:00
Ryan Lortie
083812f854 Several docs cleanups 2011-10-06 12:19:58 -04:00
Ryan Lortie
94b7d2ee6c Cleanup thread documentation 2011-10-06 12:01:53 -04:00
Matthias Clasen
47c7fa2ccd Remove mention of gthread-2.0.pc from 'Compiling' section
At the same time, add one or two other corrections.
2011-10-05 22:31:17 -04:00
David Zeuthen
3f982cb9ab GUnixMountPoint: expose options
Make the options from an /etc/fstab entry available as public API -
this can be used to support options such as

 comment=gvfs.name=Foo\040Bar

to e.g. set the name of an fstab mount in the UI to "Foo Bar".

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

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-10-03 14:06:47 -04:00
Matthias Clasen
fa6710ab6f Documentation fixes 2011-10-02 23:43:45 -04:00
Ryan Lortie
2a677d1370 locks: drop _INIT macros
All locks are now zero-initialised, so we can drop the G_*_INIT macros
for them.

Adjust various users around GLib accordingly and change the docs.

https://bugzilla.gnome.org/show_bug.cgi?id=659866
2011-10-02 22:33:10 -04:00
Ryan Lortie
8e43470c38 Stop dithering over GPrivate
Take out the half-private g_private_init() stuff and replace it with a
G_PRIVATE_INIT macro that allows specifying a GDestroyNotify.

Expose the GPrivate structure in a public header.

Add a g_private_replace() to (sort of) match the functionality of
g_static_mutex_set().

Improve the documentation.

Deprecate g_private_new().
2011-10-02 20:04:03 -04:00
Javier Jardón
91713e950f docs: Use G_VALUE_INIT 2011-10-02 17:22:18 +01:00
Matthias Clasen
0e8bcc3ed7 Move GString docs inline 2011-10-01 23:27:45 -04:00
Matthias Clasen
7154d44c5c Move file utility docs inline 2011-10-01 23:03:09 -04:00
Matthias Clasen
ca77b0e252 Move string utility docs inline 2011-10-01 22:48:27 -04:00
Matthias Clasen
793ff83527 Move test docs inline 2011-10-01 22:00:41 -04:00
Matthias Clasen
9d3b37ac3f Move keyfile docs inline 2011-10-01 21:03:14 -04:00
Matthias Clasen
1af5ac0179 Add an index for 2.32 api additions 2011-10-01 13:47:54 -04:00
Stef Walter
5a95e19a46 gvariant: Add g_variant_get_fixed_array()
Using g_variant_new_from_data() for creating new byte arrays is non-obvious.
This patch adds a g_variant_new_fixed_array() function.

https://bugzilla.gnome.org/show_bug.cgi?id=659923
2011-09-25 07:57:26 +02:00
Matthias Clasen
81e395b00b More GThread docs tweaks 2011-09-25 01:32:41 -04:00
Matthias Clasen
4e44e23517 Drop G_THREADS_IMPL_NONE from the docs
GLib can no longer be built without thread support.
2011-09-25 01:00:59 -04:00
Matthias Clasen
a485a0e565 Document G_THREADS_IMPL_WIN32 2011-09-24 19:04:46 -04:00
Matthias Clasen
d6b0af99d7 GThread doc additions 2011-09-24 19:01:02 -04:00
Ryan Lortie
14e6377a60 Deprecate g_thread_create_full()
Replace it with g_thread_create_with_stack_size() and a real function
implementation of g_thread_create().

Modify a testcase that was calling g_thread_create_full()
inappropriately (it was using the default values anyway).
2011-09-21 16:06:55 -04:00
David Zeuthen
933ad70c32 gdbus-codegen: Clarify how naming and Ugly_Case handling works
Basically, move some paragraphs around.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-09-21 07:14:28 -04:00
David Zeuthen
30537b84de gdbus-codegen: Update man page to reflect how --annotate actually works
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-09-21 07:14:28 -04:00
Ryan Lortie
a2ea02d01e Move GAllocator/GMemChunk to separate file
Create a deprecated/ directory that we can start moving ancient chunks
of code to.  Start with GAllocator, GMemChunk and related APIs.

Also drop all mention of them from the docs.

https://bugzilla.gnome.org/show_bug.cgi?id=659427
2011-09-18 22:00:58 -04:00
Matthias Clasen
f18eab2ac7 GMappedFile: return an error when trying to map a device
Previously, we were returning an empty buffer for all filenames
where fstat() gives a size of 0. But this is only appropriate
for regular files.

Also improve the documentation around this issue. Based on a
patch by Ryan Lortie.

Conflicts:

	glib/tests/mappedfile.c

https://bugzilla.gnome.org/show_bug.cgi?id=659212
2011-09-17 20:03:00 -04:00
Ryan Lortie
cab5b8abd3 GType tutorial: clarify class struct initialisation
Make the information on how the class structure is initialised less
confusing to first-time readers.
2011-09-11 15:48:47 -04:00
Emmanuele Bassi
e15d5313af Add macros for GSourceFunc return values
The boolean values to be returned by a GSourceFunc are always ambiguous,
and even in case of experienced developers then can lead to confusion.

The Perl bindings for GLib have two simple constants, mapping to TRUE
and FALSE, that make the return values less confusing: G_SOURCE_CONTINUE
and G_SOURCE_REMOVE respectively.

https://bugzilla.gnome.org/show_bug.cgi?id=631413
2011-09-09 22:08:58 -04:00
Ryan Lortie
715f94e951 Remove support for DCE threads 2011-09-09 12:47:40 -04:00
Ryan Lortie
3534ff418c Update building docs to mention mandatory threads
The docs used to say thread support was optional -- it's mandatory now.
2011-09-09 12:47:39 -04:00
Ryan Lortie
8060a7a207 'master' is now glib 2.31.0 2011-09-06 10:55:09 -04:00
Ryan Lortie
8a7d33024a gio docs: lots more fixes 2011-09-06 00:31:49 -04:00
Ryan Lortie
e88d735787 gio docs: only include GTlsInteraction once
It was included twice in the gio-docs.xml file.
2011-09-06 00:01:29 -04:00
Ryan Lortie
f333aeb297 gio docs: drop GTimeZoneMonitor from docs 2011-09-05 23:56:33 -04:00
Ryan Lortie
a44b225ae7 Remove enums from gio.types
Only objects and interfaces should go in here.  If enums are in here
then gtk-doc responds by outputting two anchors for the same name (which
results in many warnings being printed).
2011-09-05 23:54:42 -04:00
Ryan Lortie
fb700d7ea3 GDBus object manager example: update -sections.txt 2011-09-05 19:41:16 -04:00
Ryan Lortie
c2e7ef17ac gio docs: ignore private .h files 2011-09-05 19:35:16 -04:00
Ryan Lortie
1f9c189e20 gio docs: don't scan subdirectories
This clears up >50% of the huge warning spew from building GIO docs.
2011-09-05 19:10:04 -04:00
Ryan Lortie
c14a971f32 docs fixups for glib/ 2011-09-05 19:00:11 -04:00
Ryan Lortie
9829d04be8 GObject docs: resolve broken links
Some links were broken due to typos, because functionality was removed
in GLib 2.0 or for various other reasons.  Fix up as many of them as is
reasonable.
2011-09-05 18:46:59 -04:00
Ryan Lortie
b402c3f014 gobject docs: add symbols from GMainLoop boxing 2011-09-05 18:05:05 -04:00
Ryan Lortie
b407086b38 Back out some changes to docs Makefiles
Commit ab0e9dbfa7 introduced some changes
to the documentation Makefiles designed to clean-up the process of
deciding which headers get scanned for the docs.

Unfortunately, the gtk-doc Makefile doesn't use HFILE_GLOB for actually
generating the docs -- only for knowing when it needs to redo the
generation.  Because of this, we need to use IGNORE_HFILES or otherwise
we get hundreds of symbols in the *-unused.txt files.

Revert the changes that that commit made to the docs Makefiles (but
leave the generation of the *-public-headers.txt files in place).
2011-09-05 18:01:39 -04:00
Ryan Lortie
ba6d70a99e include 'hmac' in the docs
It wasn't added to glib-docs.sgml, so it wasn't being included in the html.
2011-09-05 11:36:48 -04:00
Ryan Lortie
3b25e975b3 gtk-doc fixups for glib/ 2011-09-05 11:30:58 -04:00
Alexandre Franke
c32c9526ad Fix missing semi-colon after struct definition 2011-09-05 13:22:37 +02:00
Ryan Lortie
ab8938c64d Revert "gdatetime: Add g_date_time_source_new()"
This reverts three commits:

 - 1feb752996
 - 5763c63147
 - 21a5389340

https://bugzilla.gnome.org/show_bug.cgi?id=655129
2011-08-31 12:56:28 -04:00
Ryan Lortie
c0eb77bfc8 unix signal watch: make API match other sources
Change the unix signal watch API to match other sources in both
available functions, names of those functions and order of the
parameters to the _full function.

https://bugzilla.gnome.org/show_bug.cgi?id=657705
2011-08-30 19:22:54 -04:00
Matthias Clasen
d156492c83 Add a forgotten section 2011-08-30 00:09:51 -04:00
Matthias Clasen
258ecdfbe6 More doc additions 2011-08-30 00:09:51 -04:00
Matthias Clasen
b57f2e9327 Clean up gobject docs 2011-08-30 00:09:51 -04:00
Matthias Clasen
a8b128a01c Remove no-longer existing api 2011-08-30 00:09:51 -04:00
Matthias Clasen
c938250c33 Add a 'since 2.30' index to gobject docs 2011-08-29 21:43:50 -04:00
Colin Walters
1feb752996 gdatetime: Add g_date_time_source_new()
Several different codebases in GNOME want to implement wall clocks.
While we could pretty easily share a private library, it's not a
substantial amount of code, and GLib already has a lot of the
necessary system-specific detection and handling infrastructure.

Note this initial implementation just wakes up once a second in the
cancel_on_set case; we'll add the Linux-specific handling in a
subsequent commit.

https://bugzilla.gnome.org/show_bug.cgi?id=655129
2011-08-29 10:24:08 -04:00
Stef Walter
d789e78dff giomodule: When loading GIO_EXTRA_MODULES skip duplicates
* Load modules from paths listed in GIO_EXTRA_MODULES environment
   variable first.
 * Ignore duplicate modules based on module basename.
 * Add the concept of GIOModuleScope which allows other callers to
   skip duplicate loaded modules, or block specific modules based on
   basename.
 * Document behavior.

https://bugzilla.gnome.org/show_bug.cgi?id=656914
2011-08-26 15:27:19 +02:00
David Zeuthen
05448a6bef gdbus-codegen: Rework C property getters
Rework property getters to use a vfunc so we can take the fast path
and avoid allocating memory for both the skeleton and the proxy
cases. This requires some special case because of how GVariant expects
you to free memory in some cases, see #657100. Add test cases for
this.

Document the _get_ functions as not being thread-safe and also
generate _dup_ C getters (which are thread-safe).

Mark all the generated _get_, _dup_ and _set_ as (skip) as non-C
languages should just use GObject properties and not the (socalled)
"C binding".

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-08-23 12:54:27 -04:00
Colin Walters
5b68b49b20 GTimeZoneMonitor: Revert addition of this class
The main rationale for adding it was to avoid having gnome-shell
mmap'ing /etc/localtime once a second.  However, we can just as easily
run inotify there, and given no one else was clamoring for a way to
detect when the time zone changes, I don't see a need for public API
here - at least not yet.

In the bigger picture, I just don't believe that the vast majority of
applications are going to go out of their way to instantiate and keep
around a random GTimeZoneMonitor class.  And if they do, it's has the
side effect that for other bits of code in the process, local GDateTime
instances may start varying again!

So, if code can't rely on local GDateTime instances being in a
consistent state anyways, let's just do that always.  The
documentation now says that this is the case.  Applications have
always been able to work in a consistent local time zone by
instantiating a zone and then using it for GDateTime constructors.

We fix the "gnome-shell stats /etc/localtime once a second" issue by
using timerfd (in glib) and inotify (in gnome-shell).

https://bugzilla.gnome.org/show_bug.cgi?id=655129
2011-08-22 11:12:37 -04:00
Matthias Clasen
b76bb6713b Add g_mkdtemp in the spirit of g_mkstemp
At the same time, also add g_mkdtemp_full and g_dir_make_tmp
variants. The patch also unifies the unique-name-generating
code for all variants of mkstemp and mkdtemp and adds tests
for the new functions.

Based on patches by Paolo Bonzini,
http://bugzilla.gnome.org/show_bug.cgi?id=118563
2011-08-14 14:09:58 -04:00
Stef Walter
acbcb8f7e3 hmac: Implementation of HMAC in glib
This implements g_hmac_xxx() functionality using the standard checksum
functions supported by glib.

HMAC is a secure way to hash a key and a password. Many other
approaches fraught with append and prepend issues.

Includes test cases defined in relevant RFCs

https://bugzilla.gnome.org/show_bug.cgi?id=652480
2011-08-14 09:27:45 +02:00
Marc-André Lureau
d2ca14c270 Add G_VALUE_INIT
The implementation of GValue is not public or documented.  When
allocated on the stack, initializing a GValue is usually done as
documented with:

GValue value = { 0, };

There is lot code around (including WebKit) that added all the missing
fields, resulting in this ugly and non-obvious:

GValue value = { 0, { { 0 } } };

However, this doesn't play nice with -Wmissing-field-initializers for
example. Thus, G_VALUE_INIT.

http://bugzilla.gnome.org/show_bug.cgi?id=654793
http://bugzilla.gnome.org/show_bug.cgi?id=577231
2011-08-13 18:16:44 -04:00
Stef Walter
0f99cfa882 GTlsDatabase and related objects
The database is an abstract object implemented by the various TLS
backends, which is used by GTlsConnection to lookup certificates
and keys, as well as verify certificate chains.

Also add GTlsInteraction, which can be used to prompt the user
for a password or PIN (used with the database).

https://bugzilla.gnome.org/show_bug.cgi?id=636572
2011-08-04 08:54:55 +02:00