Commit Graph

62 Commits

Author SHA1 Message Date
Jasper St. Pierre
5e62827efd gmarkup: Make GMarkupParseContext a boxed type
At the same time, add a refcount and public ref/unref methods.
This makes it usable from introspectable.

https://bugzilla.gnome.org/show_bug.cgi?id=690084
2013-01-01 11:03:19 -05:00
Colin Walters
bf1e63c2aa Make GChecksum more fully introspectable
In 2.34, g_compute_checksum_for_bytes() was added, but this patch
allows binding users to use the incremental update API; this is
significantly more efficient than reading entire files into memory.

https://bugzilla.gnome.org/show_bug.cgi?id=689982
2012-12-10 20:08:09 -05:00
Sebastian Dröge
46a92a760b Add boxed GType for GThread
https://bugzilla.gnome.org/show_bug.cgi?id=688704
2012-11-20 15:03:06 +01:00
Martin Pitt
1af1b2b2bb Box GPollFD to make it introspectable
https://bugzilla.gnome.org/show_bug.cgi?id=686797
2012-11-05 14:41:31 +01:00
Martin Pitt
a5c5730085 Revert "Box GPollFD to make it introspectable"
This reverts commit 932f4250b8.

This got pushed accidentally and has not been accepted yet. It's also not clear
whether we want this in the first place.

https://bugzilla.gnome.org/show_bug.cgi?id=686797
2012-10-25 11:27:39 +02:00
Martin Pitt
932f4250b8 Box GPollFD to make it introspectable
https://bugzilla.gnome.org/show_bug.cgi?id=686797
2012-10-25 07:58:09 +02:00
Martin Pitt
02f143c2d9 Box GTimeZone to make it introspectable
https://bugzilla.gnome.org/show_bug.cgi?id=683167
2012-09-06 06:18:42 +02:00
Christian Persch
d70634526d regex: Remove --disable-regex option
https://bugzilla.gnome.org/show_bug.cgi?id=622149
2012-02-26 22:22:56 -05:00
Emmanuele Bassi
0ac9ab4e27 Deprecate GValueArray
The GValueArray type was added in a time, during the Jurassic era or so,
when GArray did not have a representable GType. The GValueArray API has
various issues as well:

  - it doesn't match the other GLib array types;
  - it is not reference counted;
  - the structure is fully exposed on the stack, so it cannot be
    extended to add reference counting;
  - it cannot be forcibly resized.

The nice thing is that now we have a GArray type that can replace in
full GValueArray, so we can deprecate the latter, and reduce the
complexity in GLib, application code, and bindings.

https://bugzilla.gnome.org/show_bug.cgi?id=667228
2012-01-24 23:37:24 -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
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
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
Pavel Holejsovsky
fe4fc3e8b5 Make GMainLoop, GMainContext and GSource boxed types
Also add some annotations for better usage of these types in bindings.

https://bugzilla.gnome.org/show_bug.cgi?id=657725
2011-08-31 09:37:51 +02:00
Matthias Clasen
1b28408b8b Spelling fixes
Spelling fixes in comments and docs, provided by
Kjartan Maraas in bug 657336.
2011-08-29 14:49:32 -04:00
Pavel Holejsovsky
d4c5e3b156 Add (allow-none) annotation for GValue setters.
Assorted g_value_set_xxx() and g_value_take_xxx() functions actually
allow NULL in source parameter.
2011-08-17 12:55:12 +02:00
Christian Persch
316efa1b5d Add boxed GType for GMatchInfo 2011-06-24 01:03:50 +02: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
Colin Walters
a06863de60 Add a boxed type for GVariantBuilder, mark GVariantIter as (skip)
Based on a patch by Giovanni Campagna <gcampagna@src.gnome.org>

From discussion, GVariantIter is not useful for bindings, but
GVariantBuilder may be.

https://bugzilla.gnome.org/show_bug.cgi?id=646635
2011-05-31 13:37:14 -04:00
Pavel Holejsovsky
ea577d60d4 Add GI annotations to GValue and GValueArray. 2010-12-19 10:39:36 +01:00
Thiago Santos
e35ed21f43 datetime: Add GDateTime to the GType system
As with other GLib data types, use a GBoxed.
2010-08-24 23:41:21 +01:00
Christian Persch
71e73ffdfb Use G_DEFINE_[BOXED|POINTER]_TYPE instead of handwritten code
Now that we have convenience macros to implement boxed and pointer
types, use them.
2010-08-18 00:12:28 +02:00
Ryan Lortie
0fc50fa5f7 gobject/: fully remove gobjectalias hacks 2010-07-07 19:40:48 -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
Matthias Clasen
b440cc1546 Add a boxed type for GError
Patch by Sebastian Dröge, bug 614541
2010-04-22 20:10:56 -04:00
Ryan Lortie
1e655eb02c merge GVariant 2010-02-10 11:35:01 -05:00
Benjamin Otte
11d4e59712 Move the boxed private type data to TypeNode
This way we don't need to keep a custom array that we bsearch on (and
that isn't threadsafe) but can use the gtype.c machinery that is
threadsafe. And fast, too!

https://bugzilla.gnome.org/show_bug.cgi?id=554887
2010-01-25 15:30:38 +01:00
Benjamin Otte
ac666d2ae3 Put calls to registered copy/free functions into separate functions
This eases cleaning up these functions.

One optimization in value_set_internal() was lost in the process. It
shouldn't cause too many issues when all is said and done.

https://bugzilla.gnome.org/show_bug.cgi?id=554887
2010-01-25 15:30:38 +01:00
David Zeuthen
402847c887 Bug 580450 – Reference counting and boxed types for arrays
Add reference counting and boxed types for GArray, GByteArray and GPtrArray.

Signed-off-by: Matthias Clasen <mclasen@redhat.com>
2009-04-29 11:17:23 -04:00
Matthias Clasen
a5fd60a8ac Define an ENABLE_REGEX macro
* configure.in: Define an ENABLE_REGEX macro

        * gobject/gboxed.c: Don't refer to g_regex_ref if ENABLE_REGEX
        is not defined.


svn path=/trunk/; revision=7815
2009-01-18 06:53:44 +00:00
Matthias Clasen
d6d221911d Fix up section comments
svn path=/trunk/; revision=7137
2008-07-02 03:43:13 +00:00
Michael Natterer
6347be5fb6 remove trailing whitespace from newly added gtk-doc comments and
2008-06-22  Michael Natterer  <mitch@imendio.com>

	* *.c: remove trailing whitespace from newly added gtk-doc
	comments and reformatted some where they contained overly long or
	ill-formatted lines.


svn path=/trunk/; revision=7090
2008-06-22 14:53:09 +00:00
Michael Natterer
5602b7e275 moved includes back to the top of the files (before gtk-doc SECTION
2008-06-22  Michael Natterer  <mitch@imendio.com>

	* *.c: moved includes back to the top of the files (before gtk-doc
	SECTION comments). Add "config.h" in all files and move system
	included before glib includes. Remove trailing whitespace from
	SECTION comments and did some reformatting where lines were overly
	long, no documentation content was changed.


svn path=/trunk/; revision=7089
2008-06-22 14:29:25 +00:00
Stefan Kost
fca3fb5818 Migrating docs.
* docs/reference/gobject/tmpl/param_value_types.sgml:
	* gobject/gboxed.c:
	* gobject/gboxed.h:
	* gobject/genums.c:
	* gobject/genums.h:
	* gobject/gobject.c:
	* gobject/gobject.h:
	* gobject/gparam.c:
	* gobject/gparam.h:
	* gobject/gparamspecs.c:
	* gobject/gparamspecs.h:
	* gobject/gvaluetypes.c:
	* gobject/gvaluetypes.h:
	  Migrating docs.


svn path=/trunk/; revision=7081
2008-06-21 22:16:14 +00:00
Stefan Kost
bce5ebd421 Add titles back from tmpl.
* gobject/gboxed.c:
	* gobject/gclosure.c:
	* gobject/genums.c:
	* gobject/gparam.c:
	* gobject/gvalue.c:
	  Add titles back from tmpl.


svn path=/trunk/; revision=7076
2008-06-21 16:24:52 +00:00
Stefan Kost
d5f1c71fde Use file-names from the section file for SECTION: comments.
* gobject/gboxed.c:
	* gobject/gclosure.c:
	* gobject/genums.c:
	* gobject/gvalue.c:
	  Use file-names from the section file for SECTION: comments.


svn path=/trunk/; revision=7072
2008-06-21 12:57:06 +00:00
Stefan Kost
86a0f779f6 Migrating docs.
* docs/reference/gobject/tmpl/gboxed.sgml:
	* gobject/gboxed.c:
	* gobject/gboxed.h:
	* gobject/gvaluetypes.c:
	  Migrating docs.


svn path=/trunk/; revision=7065
2008-06-21 10:19:58 +00:00
Cody Russell
49f802b83e Added GRegex boxed type. (#445065, Carlos Garnacho)
2007-06-15  Cody Russell  <bratsche@gnome.org>

	* docs/reference/gobject/tmpl/gboxed.sgml:
	* docs/reference/gobject/gobject-sections.txt:
	* glib/gregex.c:
	* gobject/gboxed.[ch]:
	* gobject/gobject.symbols: Added GRegex boxed type.
	(#445065, Carlos Garnacho)


svn path=/trunk/; revision=5566
2007-06-15 16:31:21 +00:00
Tim Janik
02b62d08cc minor cleanups, implemented G_TYPE_HASH_TABLE.
Wed Nov 23 13:36:02 2005  Tim Janik  <timj@gtk.org>

        * gboxed.[hc]: minor cleanups, implemented G_TYPE_HASH_TABLE.
2005-11-23 12:37:01 +00:00
Matthias Clasen
63b1b0c187 More string interning 2005-08-31 17:56:49 +00:00
Matthias Clasen
07c4d80d55 Intern type names before registering the type to avoid unnecessary copies.
2005-08-31  Matthias Clasen  <mclasen@redhat.com>

	* gvaluetypes.c (g_value_types_init):
	* gtypeplugin.c (g_type_plugin_get_type):
	* gtypemodule.c (g_type_module_get_type):
	* gparam.c (g_param_type_init):
	* gobject.c (g_object_type_init):
	* genums.c (g_enum_types_init):
	* gboxed.c (g_boxed_type_init): Intern type names
	before registering the type to avoid unnecessary
	copies.
2005-08-31 14:38:18 +00:00
Matthias Clasen
a82bcb3107 Add a boxed type for GDate. (#301787, Tim-Philipp Müller)
2005-04-29  Matthias Clasen  <mclasen@redhat.com>

	* gobject.symbols:
	* gboxed.h (G_TYPE_DATE):
	* gboxed.c: Add a boxed type for GDate. (#301787, Tim-Philipp
	Müller)
2005-04-29 18:33:41 +00:00
Matthias Clasen
3448a27829 Make work again.
2005-03-14  Matthias Clasen  <mclasen@redhat.com>

	* abicheck.sh: Make work again.

	* gsourceclosure.c: Fix a typo.

	Make PLT-reduction work with gcc4, and don't include
	everything in gobjectalias.h:

	* gobject.symbols: Group symbols by header and source
	file.
	* makegobjectalias.pl: Protect definitions by the same
	preprocessor symbols used to guard the headers. Move
	the alias declarations to a separate file which is
	produced when calling makegalias.pl -def
	* Makefile.am (gobjectaliasdef.c): Add a rule to
	build this file.
	* *.c: Include gobjectalias.h after the other i
        GLib headers, include gobjectaliasdef.c at the bottom.
2005-03-14 06:47:51 +00:00
Matthias Clasen
465c7d1ead Implement the same PLT reduction technique used in GTK+:
2004-09-16  Matthias Clasen  <mclasen@redhat.com>

	Implement the same PLT reduction technique used in GTK+:

	* Makefile.am: Generate gobjectalias.h from gobject.symbols.
	(BUILT_SOURCES): Add gobjectalias.h.

	* makegobjectalias.pl: Script to generate gobjectalias.h.

	* *.c: Include gobjectalias.h
2004-09-16 18:52:40 +00:00
Matthias Clasen
b4f769efaf Add a boxed type for nul-terminated string arrays. (#110528)
Fri Jan  9 23:41:00 2004  Matthias Clasen  <maclas@gmx.de>

	* gboxed.h:
	* gboxed.c (g_strv_get_type): Add a boxed type for nul-terminated
	string arrays.  (#110528)
2004-01-09 22:39:55 +00:00
Matthias Clasen
c3acb9da0c Make the g_value_set_x_take_ownership() functions "official" part of the
2003-09-12  Matthias Clasen  <maclas@gmx.de>

	Make the g_value_set_x_take_ownership() functions "official"
	part of the API (#100948):

	* gvaluetypes.[hc]: Add g_value_take_string() (synonym to the
	now deprecated g_value_set_string_take_ownership()).

	* gparam.[hc]: Add g_value_take_param() (synonym to the
	now deprecated g_value_set_param_take_ownership()).

	* gobject.[hc]: Add g_value_take_object() (synonym to the
	now deprecated g_value_set_object_take_ownership()).

	* gboxed.[hc]: Add g_value_take_boxed() (synonym to the
	now deprecated g_value_set_boxed_take_ownership()).

	* gobject/gobject-sections.txt: Add new g_value_take_x() functions.

	* gobject/tmpl/param_value_types.sgml: Document new g_value_take_x()
	functions.  (#100948)
2003-09-12 20:11:38 +00:00
Tim Janik
6d6e68f3e4 adapt to new gbsearcharray.h code. (g_value_register_transform_func): turn
Tue Aug 19 04:08:14 2003  Tim Janik  <timj@gtk.org>

        * gvalue.c: adapt to new gbsearcharray.h code.
        (g_value_register_transform_func): turn transform function
        replacement into a valid operation.

        * gsignal.c: adapt to new gbsearcharray.h code.

        * gboxed.c: adapt to new gbsearcharray.h code.
2003-08-19 02:15:40 +00:00
Soeren Sandmann
d56989f3f2 remove lookup of unused BoxedNode.
Sun Feb  9 13:44:01 2003  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gboxed.c (boxed_proxy_value_init): remove lookup of unused
	BoxedNode.
2003-02-09 12:40:53 +00:00
Owen Taylor
26a6730547 [ merged from stable ]
Mon May  6 16:06:23 2002  Owen Taylor  <otaylor@redhat.com>

	[ merged from stable ]

        * gobject.c: Remove PROPERTIES_CHANGED enumeration
        value that wasn't used any more. (#78833,
        Matthias Clasen)

        * gboxed.c (g_boxed_copy): Remove check on data[2]
        that no longer exists. (#80814, Daniel Elstner)
2002-05-06 20:08:17 +00:00
Tim Janik
a0f5e304b2 provide marshaller specific value_set_*_take_ownership() variants.
Sun Feb 16 22:08:48 2002  Tim Janik  <timj@gtk.org>

        * gobject.[hc]:
        * gparam.[hc]: provide marshaller specific value_set_*_take_ownership()
        variants.

        * gvalue.h: shrink GValue's data contents to 2 unions.

        * glib-genmarshal.c: fix release and realeas_check hackage by always
        using _take_ownership() variants. directly access value contents if
        G_ENABLE_DEBUG is not defined.

        * gobject.h: add padding pointers to the class struct.
2002-02-19 17:38:45 +00:00
Tim Janik
a05a4b7660 implemented closure chaining.
Thu Dec 13 08:03:17 2001  Tim Janik  <timj@gtk.org>

        * gsignal.c: implemented closure chaining.
2001-12-13 07:04:41 +00:00