ui/common/object.c

changeset 870
e167cf006213
parent 802
cc73993a3ff9
child 886
6f5e02fcb7b9
equal deleted inserted replaced
869:6b7a178cff7c 870:e167cf006213
26 * POSSIBILITY OF SUCH DAMAGE. 26 * POSSIBILITY OF SUCH DAMAGE.
27 */ 27 */
28 28
29 #include <stdio.h> 29 #include <stdio.h>
30 #include <stdlib.h> 30 #include <stdlib.h>
31
32 #include "object.h" 31 #include "object.h"
33 #include "context.h" 32 #include "context.h"
34 33
35 #include <cx/linked_list.h> 34 #include <cx/linked_list.h>
36 35
105 uic_object_destroyed(obj); 104 uic_object_destroyed(obj);
106 cxMempoolFree(obj->ctx->mp); 105 cxMempoolFree(obj->ctx->mp);
107 } 106 }
108 107
109 UiObject* uic_object_new_toplevel(void) { 108 UiObject* uic_object_new_toplevel(void) {
109 fflush(stdout);
110 CxMempool *mp = cxMempoolCreateSimple(256); 110 CxMempool *mp = cxMempoolCreateSimple(256);
111 UiObject *obj = cxCalloc(mp->allocator, 1, sizeof(UiObject)); 111 UiObject *obj = cxCalloc(mp->allocator, 1, sizeof(UiObject));
112 fflush(stdout);
112 obj->ctx = uic_context(obj, mp); 113 obj->ctx = uic_context(obj, mp);
113 obj->ctx->parent = ui_global_context(); 114 obj->ctx->parent = ui_global_context();
115 fflush(stdout);
114 uic_object_created(obj); 116 uic_object_created(obj);
117 fflush(stdout);
115 return obj; 118 return obj;
116 } 119 }
117 120
118 UiObject* uic_ctx_object_new(UiContext *ctx, UIWIDGET widget) { 121 UiObject* uic_ctx_object_new(UiContext *ctx, UIWIDGET widget) {
119 UiObject *newobj = cxCalloc(ctx->allocator, 1, sizeof(UiObject)); 122 UiObject *newobj = cxCalloc(ctx->allocator, 1, sizeof(UiObject));

mercurial