32
32
SObjectClass parent_class;
36
#define S_BOX(o) (SBox *)(o);
37
#define S_BOX_CLASS(k) (SBoxClass *)(k);
36
40
* Creates a new SBox object.
38
42
* @param object The object to be boxed.
39
* @param type The type of object that is being boxed.
40
43
* @param freefunc The Function to be used when freeing the boxed object.
42
45
* @return A new SBox object.
44
* @note if freefunc is NULL, then standard free() will be used.
46
SBox * s_box_new (spointer object, SType type, FreeFunc freefunc);
47
SBox * s_box_new_pointer (spointer object);
49
SBox * s_box_new_sobject (SObject * object);
51
SBox * s_box_new_int (int i);
53
SBox * s_box_new_long (long l);
55
SBox * s_box_new_short (short s);
57
SBox * s_box_new_char (char c);
59
SBox * s_box_new_wchar (wchar_t wc);
61
SBox * s_box_new_uint (unsigned int ui);
63
SBox * s_box_new_ulong (long l);
65
SBox * s_box_new_ushort (short s);
67
SBox * s_box_new_string (char * s);
69
SBox * s_box_new_wstring (wchar_t * ws);
49
72
* Free the an SBox.
51
74
* @param box The SBox to be freed.
53
* @warning Freeing an SBox will free the object that is held by it.
55
76
void s_box_free (SBox * box);
77
98
* @note caller must free the string.
79
char * s_box_get_object_type_name (SBox * box);
100
char * s_box_get_type_name (SBox * box);
102
void s_box_set_free_func (SBox * box, FreeFunc free_func);
107
void s_box_set_free_data_on_free (SBox * self, sboolean free_data);