Commit e773d7db authored by Tim Janik's avatar Tim Janik Committed by Tim Janik

fixed dealing with collection/lcopy of NULL values.

Mon Dec 11 04:44:11 2000  Tim Janik  <timj@gtk.org>

	* gboxed.c: fixed dealing with collection/lcopy of NULL values.

	* gclosure.h: removed insane ramblings, added G_CALLBACK() a casting
	convenience macro.

	* Makefile.am: cleanups, marshaller generation rules.

	* gmarshal.[hc]: new files with GRuntime standard marshallers.

	* glib-genmarshal.c: fix log domain, support gruntime standard
	marshallers, suport G_TYPE_PARAM, come with extern "C" and
	#include gmarshal.h.

	* glib-genmarshal.1: reflect glib-genmarshal.c updates.

	* gobject.[hc]: implement object constructor. rework parameter
	changed notification queueing, we support queue freezes now and
	don't dispatch from an idle handler anymore.
	parameter->property rename hassle.
	implemented ::properties_changed and ::notify::* signals for
	property change notification (the later supports property names
	as details). added signal connection and named data properties.
	(g_signal_connect_object): new function to setup while_alive
	connections.
	(g_object_class_install_property): sink properties now, since they
	are initially floating.
	(g_object_steal_data):
	(g_object_set_data_full):
	(g_object_set_data):
	(g_object_get_data): set/get data by using g_datalist_*() functions
	directly.
	(g_object_queue_param_changed): nuked.
	(g_object_freeze_notify): start queueing of property changes (freeze/
	thaw calls stack).
	(g_object_notify): announce changes of a certain property directly.
	(g_object_thaw_notify): process queue of property changes, therefore
	emitting GObject::notify::detail with detail being the changed
	properties names.
	(G_OBJECT_WARN_INVALID_PROPERTY_ID): saner macro variant of former
	G_WARN_INVALID_PARAM_ID().

	* gparam.[hc]: param specs are now initially floating and need to be
	sunken with g_param_spec_sink(), support G_TYPE_PARAM values.
	added G_PARAM_CONSTRUCT and G_PARAM_CONSTRUCT_ONLY parameter flags,
	required by GObjectClass.constructor().

	* gparamspecs.[hc]: added GParamSpecParam, GParamSpecPointer and
	GParamSpecCCallback, param specs for G_TYPE_PARAM, G_TYPE_POINTER
	and G_TYPE_CCALLBACK respectively.

	* gsignal.[hc]: cleanups.
	(signal_id_lookup): after walking the anchestry, try interfaces as well.
	(g_signal_new): new function to create signals from varargs type list.
	(g_signal_connect_closure): closure connection variant that works from
	signal name+detail.
	(g_signal_connect_data): c handler connection variant that works from
	signal name+detail.
	(g_signal_emit_valist): emit signal for an instance with paraneters
	collected from a va_list.
	(g_signal_emit): emit signal, taking parameters from varargs list.
	(g_signal_emit_by_name): same as g_signal_emit, working from
	signal name+detail.
	(signal_emit_R): return whether return_value needs to be altered.

	* gtype.[hc]: set log-domain to GRuntime, i'm slowly getting to all
	the points that need to reflect the upcoming rename.
	melt g_type_conforms_to() functionality into g_type_is_a(), as that
	is what we really want (liskov substitution principle).
	assorted changes to other files due to conforms_to->is_a.

	* gvalue.[hc]: implemented g_value_set_instance() that sets a value
	from an instantiatable type via the value_table's collect_value()
	function (based on an idea from James Henstridge <james@daa.com.au>).
	cleanups/fixes.

	* gvaluetypes.[hc]: implement G_TYPE_CCALLBACK and G_TYPE_PARAM.
parent cbd74878
......@@ -109,6 +109,7 @@ AC_ARG_ENABLE(ansi, [ --enable-ansi turn on strict ansi [default=no]]
, enable_ansi=no)
AC_ARG_ENABLE(threads, [ --enable-threads turn on basic thread support [default=yes]
([=no] will override --with-threads)],,enable_threads=yes)
AC_ARG_ENABLE(rebuilds, [ --disable-rebuilds disable all source autogeneration rules],,enable_rebuilds=yes)
if test "x$enable_threads" != "xyes"; then
enable_threads=no
......@@ -163,6 +164,21 @@ AC_PROG_CC
AM_PROG_CC_STDC
AC_PROG_INSTALL
# define a MAINT-like variable REBUILD which is set if Perl
# and awk are found, so autogenerated sources can be rebuilt
AC_PROG_AWK
AC_CHECK_PROGS(PERL, perl5 perl)
# We would like indent, but don't require it.
AC_CHECK_PROG(INDENT, indent, indent)
REBUILD=\#
if test "x$enable_rebuilds" = "xyes" && \
test -n "$PERL" && \
$PERL -e 'exit !($] >= 5.002)' > /dev/null 2>&1 && \
test -n "$AWK" ; then
REBUILD=
fi
AC_SUBST(REBUILD)
dnl Initialize libtool
AM_PROG_LIBTOOL
......
......@@ -209,25 +209,6 @@ g_array_remove_index().
@Returns: the #GArray.
<!-- ##### FUNCTION g_array_sort ##### -->
<para>
</para>
@array:
@compare_func:
<!-- ##### FUNCTION g_array_sort_with_data ##### -->
<para>
</para>
@array:
@compare_func:
@user_data:
<!-- ##### MACRO g_array_index ##### -->
<para>
Returns the element of a #GArray at the given index.
......
......@@ -123,25 +123,6 @@ g_byte_array_remove_index().
@Returns: the #GByteArray.
<!-- ##### FUNCTION g_byte_array_sort ##### -->
<para>
</para>
@array:
@compare_func:
<!-- ##### FUNCTION g_byte_array_sort_with_data ##### -->
<para>
</para>
@array:
@compare_func:
@user_data:
<!-- ##### FUNCTION g_byte_array_set_size ##### -->
<para>
Sets the size of the #GByteArray, expanding it if necessary.
......
......@@ -156,25 +156,6 @@ g_ptr_array_remove_index().
@Returns: the pointer which was removed.
<!-- ##### FUNCTION g_ptr_array_sort ##### -->
<para>
</para>
@array:
@compare_func:
<!-- ##### FUNCTION g_ptr_array_sort_with_data ##### -->
<para>
</para>
@array:
@compare_func:
@user_data:
<!-- ##### FUNCTION g_ptr_array_set_size ##### -->
<para>
Sets the size of the array, expanding it if necessary.
......
......@@ -51,11 +51,11 @@ called by g_cache_remove() when the object is no longer needed (i.e. its
reference count drops to 0).
@hash_key_func: a function to create a hash value from a key.
@hash_value_func: a function to create a hash value from a value.
@key_equal_func: a function to compare two keys. It should return TRUE if
the two keys are equivalent.
@key_compare_func:
@Returns: a new #GCache.
<!-- # Unused Parameters # -->
@key_compare_func:
@key_equal_func: a function to compare two keys. It should return TRUE if
the two keys are equivalent.
<!-- ##### FUNCTION g_cache_insert ##### -->
......
......@@ -47,7 +47,6 @@ g_completion_complete().
@func:
@prefix:
@cache:
@strncmp_func:
<!-- ##### FUNCTION g_completion_new ##### -->
<para>
......@@ -71,16 +70,6 @@ This is used when you use data structures as #GCompletion items.
@Returns: the string corresponding to the item.
<!-- ##### USER_FUNCTION GCompletionStrcmpFunc ##### -->
<para>
</para>
@s1:
@s2:
@Returns:
<!-- ##### FUNCTION g_completion_add_items ##### -->
<para>
Adds items to the #GCompletion.
......
......@@ -52,56 +52,15 @@ Character Set Conversion
<!-- ##### FUNCTION g_iconv_open ##### -->
<para>
</para>
@to_codeset:
@from_codeset:
@Returns:
<!-- ##### FUNCTION g_iconv ##### -->
<para>
</para>
@converter:
@inbuf:
@inbytes_left:
@outbuf:
@outbytes_left:
@Returns:
<!-- ##### FUNCTION g_iconv_close ##### -->
<para>
</para>
@converter:
@Returns:
<!-- ##### FUNCTION g_locale_to_utf8 ##### -->
<para>
</para>
@opsysstring:
@error:
@Returns:
<!-- ##### FUNCTION g_filename_to_utf8 ##### -->
<para>
</para>
@opsysstring:
@error:
@Returns:
<!-- # Unused Parameters # -->
@error:
<!-- ##### FUNCTION g_filename_from_utf8 ##### -->
......@@ -110,18 +69,9 @@ Character Set Conversion
</para>
@utf8string:
@error:
@Returns:
<!-- ##### FUNCTION g_locale_from_utf8 ##### -->
<para>
</para>
@utf8string:
<!-- # Unused Parameters # -->
@error:
@Returns:
<!-- ##### ENUM GConvertError ##### -->
......@@ -132,5 +82,4 @@ Character Set Conversion
@G_CONVERT_ERROR_NO_CONVERSION:
@G_CONVERT_ERROR_ILLEGAL_SEQUENCE:
@G_CONVERT_ERROR_FAILED:
@G_CONVERT_ERROR_PARTIAL_INPUT:
......@@ -93,23 +93,3 @@ File Utilities
@Returns:
<!-- ##### FUNCTION g_mkstemp ##### -->
<para>
</para>
@tmpl:
@Returns:
<!-- ##### FUNCTION g_file_open_tmp ##### -->
<para>
</para>
@tmpl:
@name_used:
@error:
@Returns:
<!-- ##### FUNCTION g_main_remove_poll ##### -->
<!-- ##### FUNCTION g_markup_parse_context_parse ##### -->
<para>
Removes a file descriptor from the list being polled.
</para>
@fd: the #GPollFD to remove.
@context:
@text:
@text_len:
@error:
@Returns:
<!-- ##### MACRO lseek ##### -->
<!-- ##### STRUCT GSource ##### -->
<para>
</para>
<!-- ##### FUNCTION g_convert_error_quark ##### -->
<!-- ##### FUNCTION g_source_connect_indirect ##### -->
<para>
</para>
@source:
@callback_data:
@callback_funcs:
<!-- ##### FUNCTION g_locale_to_utf8 ##### -->
<para>
</para>
@opsysstring:
@error:
@Returns:
<!-- ##### MACRO write ##### -->
<!-- ##### FUNCTION g_iconv_close ##### -->
<para>
</para>
@converter:
@Returns:
<!-- ##### MACRO popen ##### -->
<para>
</para>
<!-- ##### FUNCTION g_source_set_can_recurse ##### -->
<para>
</para>
@source:
@can_recurse:
<!-- ##### MACRO pclose ##### -->
<para>
</para>
......@@ -40,26 +77,122 @@ the results may be needed.
See #G_PRIORITY_DEFAULT, #G_PRIORITY_DEFAULT_IDLE, #G_PRIORITY_HIGH,
#G_PRIORITY_HIGH_IDLE, and #G_PRIORITY_LOW.
<!-- ##### MACRO pclose ##### -->
<!-- ##### ENUM GMarkupError ##### -->
<para>
</para>
@G_MARKUP_ERROR_BAD_UTF8: text being parsed was not valid UTF-8
@G_MARKUP_ERROR_EMPTY: document contained nothing, or only whitespace
@G_MARKUP_ERROR_PARSE: document was ill-formed
@G_MARKUP_ERROR_UNKNOWN_ELEMENT: error should be set by #GMarkupParser functions; element wasn't known
@G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE: error should be set by #GMarkupParser functions; attribute wasn't known
@G_MARKUP_ERROR_INVALID_CONTENT: error should be set by #GMarkupParser functions; something was wrong with contents of the document, e.g. invalid attribute value
<!-- ##### MACRO g_string ##### -->
<!-- ##### FUNCTION g_main_context_add_poll ##### -->
<para>
Turns the argument into a string literal by using the '#' stringizing operator.
</para>
@x: text to convert to a literal string.
@context:
@fd:
@priority:
<!-- ##### MACRO popen ##### -->
<!-- ##### MACRO lseek ##### -->
<para>
</para>
<!-- ##### MACRO access ##### -->
<!-- ##### FUNCTION g_string_new_len ##### -->
<para>
</para>
@init:
@len:
@Returns:
<!-- ##### STRUCT GSourceCallbackFuncs ##### -->
<para>
</para>
@ref:
@unref:
@get:
<!-- ##### FUNCTION g_array_sort ##### -->
<para>
</para>
@array:
@compare_func:
<!-- ##### FUNCTION g_main_context_find_source_by_funcs_user_data ##### -->
<para>
</para>
@context:
@funcs:
@user_data:
@Returns:
@source_data:
<!-- ##### FUNCTION g_markup_parse_context_free ##### -->
<para>
</para>
@context:
<!-- ##### STRUCT GMarkupParseContext ##### -->
<para>
</para>
<!-- ##### FUNCTION g_ptr_array_sort ##### -->
<para>
</para>
@array:
@compare_func:
<!-- ##### FUNCTION g_main_context_query ##### -->
<para>
</para>
@context:
@max_priority:
@timeout:
@fds:
@n_fds:
@Returns:
<!-- ##### FUNCTION g_iconv_open ##### -->
<para>
</para>
@to_codeset:
@from_codeset:
@Returns:
<!-- ##### FUNCTION g_source_new ##### -->
<para>
</para>
@source_funcs:
@struct_size:
@Returns:
<!-- ##### MACRO getpid ##### -->
<para>
</para>
......@@ -78,17 +211,43 @@ priority are stored in the order in which they were added.
type of source.
@Returns: TRUE if an event source was found and removed.
<!-- ##### MACRO open ##### -->
<!-- ##### MACRO close ##### -->
<para>
</para>
<!-- ##### MACRO getpid ##### -->
<!-- ##### FUNCTION g_source_get_id ##### -->
<para>
</para>
@source:
@Returns:
<!-- ##### FUNCTION g_mkstemp ##### -->
<para>
</para>
@tmpl:
@Returns:
<!-- ##### FUNCTION g_main_context_get_poll_func ##### -->
<para>
</para>
@context:
@Returns:
<!-- ##### FUNCTION g_source_add_poll ##### -->
<para>
</para>
@source:
@fd:
<!-- ##### MACRO fdopen ##### -->
<para>
......@@ -96,11 +255,240 @@ type of source.
</para>
<!-- ##### MACRO close ##### -->
<!-- ##### FUNCTION g_source_get_current_time ##### -->
<para>
</para>
@source:
@timeval:
<!-- ##### USER_FUNCTION GCompletionStrcmpFunc ##### -->
<para>
</para>
@s1:
@s2:
@Returns:
<!-- ##### FUNCTION g_main_loop_new ##### -->
<para>
</para>
@context:
@is_running:
@Returns:
<!-- ##### FUNCTION g_iconv ##### -->
<para>
</para>
@converter:
@inbuf:
@inbytes_left:
@outbuf:
@outbytes_left:
@Returns:
<!-- ##### FUNCTION g_source_ref ##### -->
<para>
</para>
@source:
@Returns:
<!-- ##### FUNCTION g_byte_array_sort ##### -->
<para>
</para>
@array:
@compare_func:
<!-- ##### FUNCTION g_markup_parse_context_get_position ##### -->
<para>
</para>
@context:
@line_number:
@char_number:
<!-- ##### FUNCTION g_locale_from_utf8 ##### -->
<para>
</para>
@utf8string:
@error:
@Returns:
<!-- ##### FUNCTION g_main_loop_is_running ##### -->
<para>
</para>
@loop:
@Returns:
<!-- ##### FUNCTION g_main_context_remove_poll ##### -->
<para>
</para>
@context:
@fd:
<!-- ##### FUNCTION g_byte_array_sort_with_data ##### -->
<para>
</para>
@array:
@compare_func:
@user_data:
<!-- ##### FUNCTION g_markup_parse_context_new ##### -->
<para>
</para>
@parser:
@flags:
@user_data:
@user_data_dnotify:
@Returns:
<!-- ##### FUNCTION g_source_get_can_recurse ##### -->
<para>
</para>
@source:
@Returns:
<!-- ##### FUNCTION g_main_context_get ##### -->
<para>
</para>
@thread:
@Returns:
<!-- ##### FUNCTION g_source_remove_poll ##### -->
<para>
</para>
@source:
@fd:
<!-- ##### FUNCTION g_tree_new_with_data ##### -->
<para>
</para>
@key_compare_func:
@user_data:
@Returns:
<!-- ##### FUNCTION g_source_get_priority ##### -->
<para>
</para>
@source:
@Returns:
<!-- ##### FUNCTION g_source_connect ##### -->
<para>
</para>
@source:
@func:
@data:
@notify:
<!-- ##### FUNCTION g_main_context_iteration ##### -->
<para>
</para>
@context:
@may_block:
@Returns:
<!-- ##### FUNCTION g_main_context_dispatch ##### -->
<para>
</para>
@context:
<!-- ##### FUNCTION g_main_loop_quit ##### -->
<para>
</para>
@loop:
<!-- ##### FUNCTION g_main_context_prepare ##### -->
<para>
</para>
@context:
@priority:
@Returns:
<!-- ##### FUNCTION g_source_set_priority ##### -->
<para>
</para>
@source:
@priority:
<!-- ##### FUNCTION g_ptr_array_sort_with_data ##### -->
<para>
</para>
@array:
@compare_func:
@user_data:
<!-- ##### FUNCTION g_list_sort_with_data ##### -->
<para>
</para>
@list:
@compare_func:
@user_data:
@Returns:
<!-- ##### FUNCTION g_main_context_find_source_by_user_data ##### -->
<para>
</para>
@context:
@user_data:
@Returns:
<!-- ##### FUNCTION g_main_context_set_poll_func ##### -->
<para>
</para>