More convenient data-setting functions
[platform/upstream/glib.git] / gobject / ChangeLog
1 2000-11-20  Havoc Pennington  <hp@redhat.com>
2
3         * gobject.c (g_object_get_data)
4         (g_object_set_data)
5         (g_object_set_data_full)
6         (g_object_steal_data): More convenient data-setting functions
7
8 Wed Nov 15 20:58:05 2000  Owen Taylor  <otaylor@redhat.com>
9
10         * gtypemodule.c (g_type_module_use): If loading the
11         module fails, don't increment the use count.
12
13 Thu Nov  9 01:49:43 2000  Tim Janik  <timj@gtk.org>
14
15         * gobject.h (G_WARN_INVALID_PARAM_ID): doh,
16         s/BSE_OBJECT_TYPE_NAME/G_OBJECT_TYPE_NAME/; reported by Maas-Maarten
17         Zeeman <maas@wanadoo.nl>.
18
19 Mon Nov 13 00:48:39 2000  Owen Taylor  <otaylor@redhat.com>
20
21         * Makefile.am (EXTRA_DIST): Add glib-genmarshal.1
22
23 2000-11-11  Tor Lillqvist  <tml@iki.fi>
24
25         * gtypemodule.c: Include stdlib.h for exit().
26
27         * makefile.{mingw,msc}.in (gobject_OBJECTS): Add gtypemodule.
28
29         * gobject.def: Add missing functions.
30
31 Sun Nov  5 13:21:28 2000  Owen Taylor  <otaylor@redhat.com>
32
33         * Makefile.am gtypemodule.[ch]: New basic implementation of
34         GTypePlugin interface as a GObject. Dynamically loaded modules can
35         register any number of types and interface on the module.
36
37 Sun Nov  5 10:25:40 2000  Owen Taylor  <otaylor@redhat.com>
38
39         * gsignal.c (handlers_find): When appending handlers and
40         not matching on signal_id, use hlist->signal_id instead of 
41         signal_id. Having the correct signal_id when unreffing
42         the handlers makes things work a lot better.
43
44 2000-11-05  Tor Lillqvist  <tml@iki.fi>
45
46         * makefile.{mingw,msc}.in (gobject_OBJECTS): Add gtypeplugin.
47
48         * gobject.def: Update.
49
50 Sun Nov  5 05:22:55 2000  Tim Janik  <timj@gtk.org>
51
52         * gsignal.c:
53         fixed a bag full of subtle bugs of immensive screw-up potential in
54         handlers_find(), luckily no one found out about them yet ;)
55         fixed signal_handlers_foreach_matched_R() so it operates on an
56         initial handler list snapshot provided by handlers_find() to work
57         around general reentrancy problems and to avoid multiple callback()
58         invocations on the same handlers.
59         this code is now officially 80% bug free (10% remaining for interface
60         types, and 10% remaining for destroyed signals ;)
61         
62 Sat Nov  4 02:01:33 2000  Tim Janik  <timj@gtk.org>
63
64         * gsignal.c (_g_signals_destroy): valid signal nodes start out at 1.
65
66         * gtypeplugin.[hc]: new files holding a GTypePlugin interface
67         implementation that provides the API required by GType to deal with
68         dynamically loadable types.
69
70         * gtype.[hc]: displace any GTypePlugin business to gtypeplugin.h.
71
72 Fri Nov  3 07:35:00 2000  Tim Janik  <timj@gtk.org>
73
74         * gsignal.[hc]: prefix internal functions with '_'. renamed
75         g_signal_connect_closure() to g_signal_connect_closure_by_id().
76         added g_signal_parse_name() to retrive signal_id and detail quark
77         from a signal name (internal).
78
79 Wed Nov  1 03:36:54 2000  Tim Janik  <timj@gtk.org>
80
81         * gobject.c (g_object_base_class_finalize): destroy all signals that
82         the finalized obejct type introduced.
83
84         * gsignal.c (g_signals_destroy): don't require itype to have
85         signals.
86
87         * gobject.c (g_object_do_finalize): make sure all signal handlers
88         are destroyed.
89
90         * gsignal.[hc]:
91         (g_signal_handler_find): only match on non-0 masks.
92         (g_signal_handlers_block_matched):
93         (g_signal_handlers_unblock_matched):
94         (g_signal_handlers_disconnect_matched): new functions to block/unblock
95         or disconnect handlers in groups.
96
97 2000-10-30  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
98
99         * gvalue.c (exchange_entries_equal), gparam.c (param_spec_equals):
100         made both functions return gboolean just for the little extra
101         standard conformance now that GEqualFunc is introduced.
102
103 Mon Oct 30 05:52:45 2000  Tim Janik  <timj@gtk.org>
104
105         * gsignal.c (g_signal_list_ids): get rid of inline documentation owen
106         added, the doc system would ignore it anyways (for some reason not
107         aparent to me).
108
109 Mon Oct 30 03:00:07 2000  Tim Janik  <timj@gtk.org>
110
111         * gsignal.[hc] (g_signal_list_ids): renamed owen's g_type_signals(),
112         added required mutex locks.
113
114 Sun Oct 29 02:31:03 2000  Owen Taylor  <otaylor@redhat.com>
115
116         * gsignal.c (g_type_signals): Fix problem where signals
117         with "_" in them appeared twice in the result array.
118
119 Sun Oct 29 01:58:44 2000  Owen Taylor  <otaylor@redhat.com>
120
121         * gsignal.h: Add g_type_signals() - a function to list
122         all signals for a given type.
123
124 Sat Oct 28 00:28:09 2000  Tim Janik  <timj@gtk.org>
125
126         * gclosure.c (g_closure_add_marshal_guards): fixed notifier position
127         for post_marshal guard which was off at 0.
128
129 Fri Oct 27 21:49:31 2000  Tim Janik  <timj@gtk.org>
130
131         * gobject.[hc]: doh, fix argument order in for
132         g_cclosure_new_object_swap and g_cclosure_new_object.
133
134 2000-10-28  Tor Lillqvist  <tml@iki.fi>
135
136         * makefile.{mingw,msc}.in: Make glib-genmarshal.exe.
137
138         * glib-genmarshal.c: Conditionalise include of unistd.h.
139         Include <io.h> on Win32.
140
141         * gobject.def: Add some missing entry points.
142
143 Fri Oct 27 16:33:41 2000  Tim Janik  <timj@gtk.org>
144
145         * gsignal.[hc]: publically define GSignalInvocationHint structure
146         that gets passed in to closure invocations. added signal details.
147         renamed GSignalType to GSignalFlags to comply with conventions.
148         quite some cleanups and minor fixes. avoid uneccessary handler list
149         walks upon invokation of after handlers. relookup handler list for
150         restarted emissions. preliminary abort normal handler invokation if
151         after handler is encountered.
152
153         * glib-genmarshal.c:
154         * gclosure.[hc]: moved invocation_hint to the end of the
155         g_closure_invoke() arguments as sugegsted by kenelson.
156         also made it a gpointer to be more generic. the invocation_hint
157         is a caller specific thing that can be used to pass additional
158         data in to closure invocations as documented with the caller
159         invoking the closure.
160
161 Fri Oct 27 05:35:14 2000  Tim Janik  <timj@gtk.org>
162
163         * gobject.c (g_object_watch_closure): fixed realloc bug, reported
164         by havoc.
165
166         * gsignal.c (g_signal_newv): fixed deadlock scenarion where
167         g_signal_lookup() would be called with the signal lock being
168         held. reported by james henstridge.
169
170         * gclosure.c (g_closure_set_meta_marshal): fixed memcpy/overwrite bug
171         reported by owen.
172
173 2000-10-26  Tor Lillqvist  <tml@iki.fi>
174
175         * gbsearcharray.c (bsearch_array_insert): Fix gccisms (pointer
176         arithmetic on void pointer, label without statement following.
177
178         * gtype.c (type_node_fundamental_info): Don't apply unary minus to
179         result of sizeof operator, it can be unsigned. Cast first to
180         gssize.
181
182         * gobject.def: Add new functions.
183
184         * makefile.{mingw,msc}.in: Add new objects.
185
186 2000-10-26  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
187
188         * Makefile.am: Remove empty SUBDIRS line _again_, as that _still_
189         prevents 'make dist' from working.
190
191 Wed Oct 25 19:11:03 2000  Owen Taylor  <otaylor@redhat.com>
192
193         * gbsearcharray.h (g_bsearch_array_get_nth): Don't use implicit
194         casts from void * since this will get included from C++ too
195         at times.
196         
197 Thu Oct 26 00:30:27 2000  Tim Janik  <timj@gtk.org>
198
199         * gvaluetypes.[hc]: added g_value_set_static_string().
200
201         * gboxed.[hc]: const corrections. added g_value_set_static_boxed().
202
203 Wed Oct 25 20:27:02 2000  Tim Janik  <timj@gtk.org>
204
205         * gtype.c (g_type_free_instance): for the moment, freeing object
206         structures will fill their memory portion with 0xAA. there's a
207         FIXME there, remove this line at a later point.
208
209 Tue Oct 24 23:10:26 2000  Tim Janik  <timj@gtk.org>
210
211         * glib-genmarshal.1:
212         * glib-genmarshal.c: added publically installed marshaller generator.
213
214         * gtype.h: added G_TYPE_INSTANCE_GET_INTERFACE() to retrive a certain
215         interface VTable from instances.
216
217 Mon Oct 23 08:28:15 2000  Tim Janik  <timj@gtk.org>
218
219         * gobject.[hc]: new functions for closure maintenance:
220         (g_object_watch_closure): maintain validity of the object and
221         the closure for objects that are used as data part of a closure.
222         (g_cclosure_new_object): convenience function to create C closures
223         that have an object as data argument.
224         (g_closure_new_object): convenience function to create closures
225         that have an object as data argument.
226
227         * gclosure.[hc]: implementation of GClosure mechanism.
228         a closure is basically an encapsulation of a callback function
229         and its environment. ideally, most places supporting callback
230         functions will simply take a GClosure* pointer and thus unify
231         callback environments wrg destroy notification etc.
232         GClosure provides destroy notifiers for arbitrary data pointers,
233         reference counting, invalidation notification (it can be invalidated
234         which is merely a deactivate state) and a marshallinbg abstraction.
235         GCClosure is also provided in these files, they present a specialized
236         GClosure implementation for C language callbacks.
237
238         * genum.c: macro cleanups.
239         
240         * gboxed.[hc]: new files, for boxed type abstraction.
241         (g_boxed_copy): copy a boxed structure
242         (g_boxed_free): free a boxed structure
243         (g_value_set_boxed):
244         (g_value_get_boxed): standard GValue functions for boxed types
245         (g_boxed_type_register_static): convenience function for easy
246         introduction of new G_TYPE_BOXED derivatives.
247
248         * gparam.[hc]: introduced g_param_type_register_static(), a short hand
249         for creation of new GParamSpec derived types.
250
251         * gtype.[hc]: many fixes, introduced ability to flag individual
252         type nodes as ABSTRACT upon registration, added value_peek_pointer()
253         to the value table to peek at GValue contents as a pointer for types
254         that support this. fixed up GValue checks.
255
256         * gvalue.[hc]: added g_value_fits_pointer() and g_value_get_as_pointer()
257         to peek at the value contents as pointer.
258
259         * *.[hc]: adaptions to type macro fixes and changes in the type
260         registration API.
261
262         * many const corrections over the place.
263
264 Sat Oct 21 02:49:56 2000  Tim Janik  <timj@gtk.org>
265
266         * gtype.c (g_type_conforms_to): this function basically behaves like
267         and is_a check, except that it _additionally_ features interfaces
268         for instantiatable types. enforce this in the second branch as well
269         (`type' conforms_to `type') even if `type' is not an interface type.
270
271 Fri Oct 20 15:31:04 2000  Tim Janik  <timj@gtk.org>
272
273         * gvaluetypes.[hc]: added G_TYPE_POINTER implementation from jrb.
274
275         * gtype.[hc]:
276         * gobject.c:
277         * gvaluetypes.c: added GTypeValueTable.value_peek_pointer and
278         suitable implementations of this for G_TYPE_STRING, G_TYPE_OBJECT
279         and G_TYPE_POINTER.
280
281 Mon Aug 21 04:13:37 2000  Tim Janik  <timj@gtk.org>
282
283         * gbsearcharray.[hc]: long standing needed generic implementation
284         of a binary searchable, sorted and dynamically sized array.
285
286 2000-10-15  Raja R Harinath  <harinath@cs.umn.edu>
287
288         * Makefile.am (BUILT_EXTRA_DIST): New variable.
289         (dist-hook): Handle $(BUILT_EXTRA_DIST).
290         (*): Remove traces of @STRIP_{BEGIN,END}@.
291         
292 2000-09-29  Martin Baulig  <baulig@suse.de>
293         
294         Several minor ANSI C fixes.
295
296         Added missing casts:
297         * gtype.c (type_class_init): 
298         `(gpointer) bnode->data->class.class_init_base'
299         in call to g_slist_prepend() and
300         'GBaseInitFunc class_init_base = (GBaseInitFunc) slist->data'.
301
302         * gobject.c: Put text following #endif into comments.
303
304 2000-09-25  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
305
306         * Makefile.am: Remove empty SUBDIRS line, as that prevents make
307         dist from working.
308
309 Sat Sep  9 20:04:13 2000  Owen Taylor  <otaylor@redhat.com>
310
311         * gobject.c (g_object_last_unref): Move call to
312         g_type_free_instance() here from g_object_do_finalize,
313         since g_type_free_instance() can unload the object's
314         implementation.
315
316 2000-07-27  Tor Lillqvist  <tml@iki.fi>
317
318         * gobject.c: No, don't mark glib_debug_objects for export here,
319         it's handled specially in gtktypeutils.c.
320
321         * gobject.def: Export g_type_fundamental_last (the function).
322
323 2000-07-26  Tor Lillqvist  <tml@iki.fi>
324
325         * gobject.def
326         * gobject.c: Mark glib_debug_objects for export/import as it is
327         used by GTK+.
328
329 Sun Jul 23 17:23:35 2000  Tim Janik  <timj@gtk.org>
330
331         * gtype.[hc]: make g_type_fundamental_last() a function, avoiding all
332         that extern variable clutter and avoiding further problems with thread
333         safety.
334
335 2000-07-19  Tor Lillqvist  <tml@iki.fi>
336
337         * gparam.h
338         * gvalue.h
339         * gparam.c
340         * gtype.c: Shut up Sun's picky compiler.
341
342 2000-07-14  Tor Lillqvist  <tml@iki.fi>
343
344         * gobject.def: Add g_type_get_plugin.
345
346 Thu Jul 13 02:07:54 2000  Tim Janik  <timj@gtk.org>
347
348         * gparam.c (g_param_value_defaults): default initialize the temporary
349         default value, instead of nuking the caller's value contents.
350
351 2000-07-11  Raja R Harinath  <harinath@cs.umn.edu>
352
353         * gtype.c (g_type_get_plugin): Don't return just 0 or 1.
354
355 Tue Jul 11 02:48:13 2000  Tim Janik  <timj@gtk.org>
356
357         * gtype.[hc]: removed g_type_is_dynamic() and added g_type_get_plugin().
358
359 2000-07-10  Tor Lillqvist  <tml@iki.fi>
360
361         * gobject-query.c: Include ../config.h for HAVE_UNISTD_H. Use it
362         to guard inclusion of <unistd.h>.
363
364         * gtype.h: Fix copy-paste errors in the ifdefs on how to declare a
365         variable for export. Call the macro GOBJECT_VAR.
366
367         * gtype.c: Declare _g_type_fundamental_last for export here, too.
368         (type_node_any_new): Use only constant expressions for sizeof
369         operator (for instance MSVC requires this).
370
371         * makefile.mingw.in: Define GOBJECT_COMPILATION.
372
373 Sun Jul  9 21:21:46 2000  Owen Taylor  <otaylor@redhat.com>
374
375         * genums.c: Move string.h include into the .c file
376         instead of where it was in the .h file by mistake.
377
378 Thu Jul  6 15:30:27 2000  Owen Taylor  <otaylor@redhat.com>
379
380         * Makefile.am (EXTRA_DIST): dist fixes.
381
382         * gobject.c: Add a global variable glib_debug_objects
383         (not in header file) to control object tracing.
384
385 2000-07-01  Tor Lillqvist  <tml@iki.fi>
386
387         * gobject.def: Update added and renamed entry points.
388
389         * makefile.mingw.in: Add gvaluetypes.o.
390
391 Thu Jun 29 16:02:07 2000  Owen Taylor  <otaylor@redhat.com>
392
393         * gobject.c:include string.h for memset
394         * genums.h: include string.h for strcpy
395         * gvalue.c: include string.h for memset, memcpy.
396
397 Sat Jun 24 23:03:04 2000  Tim Janik  <timj@gtk.org>
398
399         * gtype.[hc]: provide G_TYPE_CHAR, G_TYPE_UCHAR, G_TYPE_BOOLEAN,
400         G_TYPE_INT, G_TYPE_UINT, G_TYPE_LONG, G_TYPE_ULONG, G_TYPE_FLOAT,
401         G_TYPE_DOUBLE and G_TYPE_STRING fundamental types.
402         added a GTypeValueTable* pointer to GTypeInfo structure for types
403         to implement GValue handling functions.
404         GTypeValueTable contains the following members:
405           value_init(): initialize a GValue structure.
406           value_free(): free GValue structure contents (optional).
407           value_copy(): copy one GValue contents to another GValue structure of
408           collect_type: varargs collection type for the first variable argument
409           to be collected by collect_value().
410           collect_value(): variable arguments collection function (optional).
411           lcopy_type: varargs collection type for the first variable argument
412           to be location copyied by lcopy_value().
413           lcopy_value(): variable arguments location copy function (optional).
414         g_type_value_table_peek(): new function to retrive the GTypeValueTable*
415         for a type node. ValueTables get inherited from parent types, unless
416         overridden through the GTypeInfo structure. internally, GTypeValueTable
417         support means an added overhead of one pointer per static or used
418         dynamic type node.
419         g_type_add_class_cache_func(): provide a cache_func/data pair to be
420         called  prior to a type nodes last_unref() function, this can be used
421         to prevent premature class destruction. multiple installed cache_func()
422         will be chained upon last_unref() untill one of them returns TRUE.
423         the cache_func()s have to check the class id passed in to figure whether
424         they actually want to cache the class of this type (since all classes
425         are routed through the cache_func() chain).
426         g_type_remove_class_cache_func(): remove a previously installed
427         cache_func/data pair. the cache maintained by this function has to be
428         clear when calling g_type_remove_class_cache_func() to avoid leaks.
429         g_type_class_unref_uncached(): class unref function for cache_func()
430         implementations, unreferences a class omitting the cache chain (and
431         therefore unref->cache->unref->... loops).
432
433         * gvaluetypes.[hc]: provide the value setters/getters for the primitive
434         fundamental types boolean, char, uchar, int, uint, long, ulong, float,
435         double and string.
436
437         * gvalue.[hc]: provide G_TYPE_IS_VALUE() in terms of whether a
438         GTypeValueTable is provided for this type.
439         removed g_value_init_default(), g_value_validate(), g_value_defaults(),
440         g_value_set_default() and g_values_cmp() as these are supplied by the
441         GParamSpec API now.
442         moved g_values_exchange() into the "implementation details" section,
443         since it just provides the underlying functionality for
444         g_value_convert().
445
446         * gvaluecollector.h: renamed the varargs value container from
447         GParamCValue to GTypeCValue as the value collection methods are
448         supplied by the type system now.
449         G_PARAM_COLLECT_VALUE() and G_PARAM_LCOPY_VALUE() got renamed to
450         G_VALUE_COLLECT() and G_VALUE_LCOPY() and operate without a
451         GParamSpec structure now.
452
453         * genums.h: macros cleanups/fixes.
454
455         * genum.c: provide G_TYPE_ENUM and G_TYPE_FLAGS type
456         and assorted g_value_{s|g}et_{enum|flags}() implementations.
457
458         * gobject.[hc]:
459         provide G_IS_VALUE_OBJECT(), G_TYPE_OBJECT ValueTable methods
460         and g_value_{s|g}et_object().
461
462         * gparam.[hc]: reduced class to value_set_default(),
463         value_validate() and values_cmp(). also parameters now need to fill
464         in a GType value_type; field to indicate the GValue type they
465         are handling. provide g_param_value_set_default(),
466         g_param_value_defaults(), g_param_value_validate() and
467         g_param_values_cmp().
468
469         * gparamspecs.[hc]: got rid of the g_value_* functions and
470         the G_IS_VALUE_* macros. adapted param spec implementations
471         according to the GParamSpecClass changes.
472
473 Sat Jun 10 08:38:27 2000  Tim Janik  <timj@gtk.org>
474
475         * gtype.c (type_class_init): fetch the nth iface entry of the
476         type node in the nth loop iteration, not alwys the first.
477         bug discovered by Walt Pohl <cher@suitware.com>.
478         (type_data_finalize_class_ifaces): same here, cut and paste
479         rulez.
480
481 Wed Jun  7 09:21:05 2000  Owen Taylor  <otaylor@redhat.com>
482
483         * Makefile.am (INCLUDES): Add top_builddir so glibconfig.h
484         is found properly when build srcdir != builddir. (Patch from
485         Eric Lemings)
486
487 2000-05-13  Tor Lillqvist  <tml@iki.fi>
488
489         * makefile.mingw.in
490         * gobject.def
491         * gobject.rc.in: New files, for Win32 (mingw) build.
492
493         * Makefile.am: Add to EXTRA_DIST. Add rules to produce the
494         corresponding non-*.in files.
495
496         * gtype.h: (Win32:) Mark _g_type_fundamental_last for
497         export/import from DLL.
498
499 Fri May  5 01:15:48 2000  Tim Janik  <timj@gtk.org>
500
501         * gtype.h: add reserved fundamental ids for gtk types (for transition
502         time). added G_TYPE_FUNDAMENTAL_MAX for gtk.
503
504 Mon Apr 17 20:45:50 2000  Tim Janik  <timj@gtk.org>
505
506         * glib-gobject.c (g_object_base_class_finalize): oops, don't unset
507         n_params prior to destructing them.
508
509 Tue Apr 11 04:28:10 2000  Tim Janik  <timj@gtk.org>
510
511         * fixed a couple of bugs in the initial parameter/object
512         implementations, after getting beast running on GObject and GValue.
513
514 Fri Apr  7 04:27:49 2000  Tim Janik  <timj@gtk.org>
515
516         * glib-gobject.[hc]: completed parameter set/get implementations,
517         along with asyncronous parameter changed notification queue.
518
519 Sun Apr  2 04:54:36 2000  Tim Janik  <timj@gtk.org>
520
521         * glib-gobject.[hc]: GObject implementation, that is facilities
522         for setting/getting quarked data and reference counting.
523
524         * glib-gparamspecs.[hc]: first actuall parameter implementations
525         for GLib, so far we have: char, uchar, bool, int, uint, long,
526         ulong, enum, flags, float, double, string and object. each of these
527         GParamSpecs is a new instantiatable type in its own respect,
528         so the .c file derives 13 new types from G_TYPE_PARAM and
529         defines over 50 (*2) conversion facilities.
530
531         * glib-gvaluecollector.h: generic varargs handling stubs for
532         GParamSpecs, private header file (does get installed for
533         inclusion into user code though).
534
535         * glib-gvalue.[hc]: GValue functionality implementation.
536
537         * glib-gparam.[hc]: basis GParamSpec implementation for
538         the virtual base type G_TYPE_PARAM.
539
540         * glib-genums.[hc]: enum/flags type implementation, based on
541         bseenum.[hc].
542
543         * glib-gtype.[hc]: GLib Type System implementation, heavily
544         based on BSE's dynamic type system.