177:e79a60b3a7cb | 178:7c3ff86ee9d4 |
---|---|
29 #include <stdio.h> | 29 #include <stdio.h> |
30 #include <stdlib.h> | 30 #include <stdlib.h> |
31 | 31 |
32 #include "range.h" | 32 #include "range.h" |
33 #include "container.h" | 33 #include "container.h" |
34 #include <ucx/mempool.h> | |
35 #include "../common/context.h" | 34 #include "../common/context.h" |
36 #include "../common/object.h" | 35 #include "../common/object.h" |
37 | 36 |
38 | 37 |
39 static UIWIDGET ui_scrollbar(UiObject *obj, UiOrientation orientation, UiRange *range, ui_callback f, void *userdata) { | 38 static UIWIDGET ui_scrollbar(UiObject *obj, UiOrientation orientation, UiRange *range, ui_callback f, void *userdata) { |
59 range->setextent = ui_scrollbar_setextent; | 58 range->setextent = ui_scrollbar_setextent; |
60 range->obj = scrollbar; | 59 range->obj = scrollbar; |
61 } | 60 } |
62 | 61 |
63 if(f) { | 62 if(f) { |
64 UiEventData *event = ucx_mempool_malloc( | 63 UiEventData *event = cxMalloc( |
65 obj->ctx->mempool, | 64 obj->ctx->allocator, |
66 sizeof(UiEventData)); | 65 sizeof(UiEventData)); |
67 event->obj = obj; | 66 event->obj = obj; |
68 event->userdata = userdata; | 67 event->userdata = userdata; |
69 event->callback = f; | 68 event->callback = f; |
70 event->value = 0; | 69 event->value = 0; |