/simpletypesystem/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/simpletypesystem/trunk

« back to all changes in this revision

Viewing changes to src/Callback.h

  • Committer: Gustav Hartvigsson
  • Date: 2015-04-10 21:36:10 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20150410213610-r1q96ym4nmulpax9
* Added a few skeletal functions to Callback.h
* Re-wrote parts of SDynamicArray to be more sane.
  * removed s_dynamic_array_len() and s_dynamic_array_add()
  * added s_dynamic_array_set() and s_dynamic_array_last_item()
  * use calloc instead of malloc.
* added unsubscribe function to SGlobalNotify.
* Added decumentation in Interface.h
* Made s_dbg_print() more helpful.

-- Testing --
* Made test_case() macro more useful.
* added tests for the dynamic array.

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
 * @{
15
15
 * Callbacks are used to signals one part of the a program to an other.
16
16
 * It is manly used in SObject s and its children.
17
 
 * 
 
17
 *
 
18
 * Please note that this is the best way to implement an "interface".
 
19
 *
18
20
 * @sa GlobalNotify
19
21
 */
20
22
 
78
80
 */
79
81
void s_object_install_callback (SObject * obj, SCallbackEntry * callbackentry);
80
82
 
 
83
/**
 
84
 * 
 
85
 */
 
86
spointer s_object_notify (SObject * self, char * name, spointer * data);
 
87
 
 
88
/**
 
89
 * Alias to s_object_notify()
 
90
 */
 
91
#define s_object_call(o, n, d) s_object_notify (o, n, d)
 
92
 
81
93
/**@}*/
82
94
 
83
95
END_DECLS