Mercurial > MadButterfly
comparison examples/calculator/main.c @ 283:7d106e4ef66d
Fix the compilation error of the inkscape
author | wycc@wycc-desktop |
---|---|
date | Sat, 31 Jan 2009 13:01:07 +0800 |
parents | c8b6ca46950b |
children | 331467b8e778 |
comparison
equal
deleted
inserted
replaced
282:61aebecbb994 | 283:7d106e4ef66d |
---|---|
64 redraw_man_t *rdman; | 64 redraw_man_t *rdman; |
65 | 65 |
66 rdman = X_MB_rdman(calc_data->rt); | 66 rdman = X_MB_rdman(calc_data->rt); |
67 | 67 |
68 sprintf(buf, "%d%s", num, suffix); | 68 sprintf(buf, "%d%s", num, suffix); |
69 sh_text_set_text(calc_data->code->screen_text, buf); | 69 sh_text_set_text(calc_data->code->screen_text_u, buf); |
70 rdman_shape_changed(rdman, calc_data->code->screen_text); | 70 rdman_shape_changed(rdman, calc_data->code->screen_text_u); |
71 | 71 |
72 if(op == 'n') | 72 if(op == 'n') |
73 sprintf(buf, "None"); | 73 sprintf(buf, "None"); |
74 else | 74 else |
75 sprintf(buf, "%d%c", saved, op); | 75 sprintf(buf, "%d%c", saved, op); |
142 static void buttons_handler(event_t *evt, void *arg) { | 142 static void buttons_handler(event_t *evt, void *arg) { |
143 calc_data_t *calc_data = (calc_data_t *)arg; | 143 calc_data_t *calc_data = (calc_data_t *)arg; |
144 | 144 |
145 switch(evt->type) { | 145 switch(evt->type) { |
146 case EVT_MOUSE_BUT_PRESS: | 146 case EVT_MOUSE_BUT_PRESS: |
147 compute(calc_data, (coord_t *)evt->cur_tgt); | 147 compute(calc_data, (coord_t *)evt->cur_tgt->obj); |
148 break; | 148 break; |
149 } | 149 } |
150 } | 150 } |
151 | 151 |
152 static void setup_observers(calc_data_t *calc_data) { | 152 static void setup_observers(calc_data_t *calc_data) { |