ui/motif/button.c

changeset 98
efaae97bd95b
parent 62
70d2aee84432
child 112
fdd33964b35f
equal deleted inserted replaced
97:1a786201465f 98:efaae97bd95b
52 if(f) { 52 if(f) {
53 UiEventData *event = ucx_mempool_malloc( 53 UiEventData *event = ucx_mempool_malloc(
54 obj->ctx->mempool, 54 obj->ctx->mempool,
55 sizeof(UiEventData)); 55 sizeof(UiEventData));
56 event->obj = obj; 56 event->obj = obj;
57 event->user_data = data; 57 event->userdata = data;
58 event->callback = f; 58 event->callback = f;
59 event->value = 0; 59 event->value = 0;
60 XtAddCallback( 60 XtAddCallback(
61 button, 61 button,
62 XmNactivateCallback, 62 XmNactivateCallback,
92 UiEvent e; 92 UiEvent e;
93 e.obj = event->obj; 93 e.obj = event->obj;
94 e.window = event->obj->window; 94 e.window = event->obj->window;
95 // TODO: e.document 95 // TODO: e.document
96 e.intval = tb->set; 96 e.intval = tb->set;
97 event->callback(&e, event->user_data); 97 event->callback(&e, event->userdata);
98 } 98 }
99 99
100 void ui_push_button_callback(Widget widget, UiEventData *event, XtPointer d) { 100 void ui_push_button_callback(Widget widget, UiEventData *event, XtPointer d) {
101 UiEvent e; 101 UiEvent e;
102 e.obj = event->obj; 102 e.obj = event->obj;
103 e.window = event->obj->window; 103 e.window = event->obj->window;
104 e.document = event->obj->ctx->document; 104 e.document = event->obj->ctx->document;
105 e.intval = event->value; 105 e.intval = event->value;
106 event->callback(&e, event->user_data); 106 event->callback(&e, event->userdata);
107 } 107 }

mercurial