121
void s_object_set_initialize_method (SObject * self, MethodFunc method);
124
s_object_set_initialize_method (SObject * self, MethodFunc method);
124
127
* This function is used to set the method to deinitialize an object.
126
129
* set it to a method that deinitialize your object.
128
void s_object_set_deinitialize_method (SObject * self, MethodFunc method);
132
s_object_set_deinitialize_method (SObject * self, MethodFunc method);
131
135
* This function is used to set the ref method.
133
137
* @warning DO NOT USE THIS UNLESS YOU KNOW WHAT YOU ARE DOING.
135
void s_object_set_ref_method (SObject * self, MethodFuncInt method);
140
s_object_set_ref_method (SObject * self, MethodFuncInt method);
138
143
* This function is used to set the unref method.
140
145
* @warning DO NOT USE THIS UNLESS YOU KNOW WHAT YOU ARE DOING.
142
void s_object_set_unref_method (SObject * self, MethodFuncInt method);
148
s_object_set_unref_method (SObject * self, MethodFuncInt method);
145
151
* This function is used to set the get_refcount method.
147
153
* @warning DO NOT USE THIS UNLESS YOU KNOW WHAT YOU ARE DOING.
149
void s_object_set_get_refcount_method (SObject * self, MethodFuncInt method);
156
s_object_set_get_refcount_method (SObject * self, MethodFuncInt method);
152
159
* This function is used to set the to_string method.
154
void s_object_set_to_string_method (SObject * self, ToStringFunc method);
162
s_object_set_to_string_method (SObject * self, ToStringFunc method);
159
void s_object_set_free_method (SObject * self, MethodFunc method);
168
s_object_set_free_method (SObject * self, MethodFunc method);
162
171
/* concrete functions are defined in the C file.
175
184
* This function initializes an instance of the SObject, it also sets
176
185
* the methods to be used with the object and sets the reference count to one.
178
void s_object_initialize (SObject * self, const char * name);
188
s_object_initialize (SObject * self, const char * name);
181
191
* This function creates a new base object.
183
193
* @return a new SObject
185
SObject * s_object_new ();
188
199
* This function desensitizes/frees an object even if it is still referenced.
189
200
* This is usually a bad idea, use s_object_unref () instead.
191
void s_object_free (SObject * self);
203
s_object_free (SObject * self);
194
206
* This function gets the class (which hold the object methods).
196
SObjectClass * s_object_get_class (SObject * self);
209
s_object_get_class (SObject * self);
199
212
* This function sets the instance class of an object.
201
void s_object_set_class (SObject * self, SObjectClass * klass);
215
s_object_set_class (SObject * self, SObjectClass * klass);
204
218
* This function is used to decrese the reference count of an object.
208
222
* It returns the current (after change) reference count.
210
int s_object_unref (SObject * self);
225
s_object_unref (SObject * self);
213
228
* This function is used to increase the reference count of an object.
215
230
* Returns the current (after change) reference count.
217
int s_object_ref (SObject * self);
233
s_object_ref (SObject * self);
220
236
* This function returns the current reference count without changing it.
222
int s_object_get_refcount (SObject * self);
239
s_object_get_refcount (SObject * self);
225
242
* This function returns a textual (string) that represents the object.