Rev 6589 | Rev 6615 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
6391 | ashmew2 | 1 | format coff |
2 | use32 ; Tell compiler to use 32 bit instructions |
||
3 | |||
4 | section '.init' code ; Keep this line before includes or GCC messes up call addresses |
||
5 | |||
6415 | punk_joker | 6 | include '../../../programs/proc32.inc' |
7 | include '../../../programs/macros.inc' |
||
6391 | ashmew2 | 8 | purge section,mov,add,sub |
6589 | siemargl | 9 | |
6415 | punk_joker | 10 | include '../../../programs/develop/libraries/box_lib/trunk/box_lib.mac' |
11 | include '../../../programs/system/run/trunk/txtbut.inc' |
||
12 | include '../../../programs/dll.inc' |
||
6589 | siemargl | 13 | |
6495 | punk_joker | 14 | public init_boxlib as '_kolibri_boxlib_init' |
6470 | siemargl | 15 | public editbox_key_thunk as '_editbox_key@4' ; renamed due to ambiguity |
6393 | punk_joker | 16 | public press_key as '_press_key' |
6391 | ashmew2 | 17 | ;;; Returns 0 on success. -1 on failure. |
18 | |||
19 | proc init_boxlib |
||
6535 | siemargl | 20 | pusha |
6391 | ashmew2 | 21 | mcall 68,11 |
22 | stdcall dll.Load, @IMPORT |
||
6535 | siemargl | 23 | popa |
6391 | ashmew2 | 24 | ret |
6589 | siemargl | 25 | endp |
26 | |||
6391 | ashmew2 | 27 | ;; Wrapper to handle edit_box_key function for editboxes. |
28 | ;; Call this baby from C (refer kolibri_editbox.h for details) |
||
6470 | siemargl | 29 | editbox_key_thunk: |
6391 | ashmew2 | 30 | mov [oldebp], ebp ;Save ebp because GCC is crazy for it otherwise. |
31 | pop ebp ;Save return address in ebp. Stack top is param now. |
||
6393 | punk_joker | 32 | mov eax, dword [press_key] |
6391 | ashmew2 | 33 | call [edit_box_key] ; The pointer we passed should be on the stack already. |
34 | push ebp ;push the return address back to stack |
||
35 | mov ebp, [oldebp] |
||
36 | ret |
||
6589 | siemargl | 37 | |
6391 | ashmew2 | 38 | oldebp dd ? |
6393 | punk_joker | 39 | press_key dd ? |
6391 | ashmew2 | 40 | |
41 | @IMPORT: |
||
42 | library lib_boxlib, 'box_lib.obj' |
||
43 | |||
44 | import lib_boxlib, \ |
||
45 | edit_box_draw, 'edit_box' , \ |
||
46 | edit_box_key, 'edit_box_key' , \ |
||
47 | edit_box_mouse, 'edit_box_mouse', \ |
||
48 | edit_box_set_text, 'edit_box_set_text' , \ |
||
49 | init_checkbox2, 'init_checkbox2' , \ |
||
50 | check_box_draw2, 'check_box_draw2' , \ |
||
51 | check_box_mouse2, 'check_box_mouse2' , \ |
||
52 | option_box_draw, 'option_box_draw' , \ |
||
53 | option_box_mouse, 'option_box_mouse' , \ |
||
6470 | siemargl | 54 | scrollbar_v_draw, 'scrollbar_v_draw' , \ |
55 | scrollbar_v_mouse, 'scrollbar_v_mouse' , \ |
||
56 | scrollbar_h_draw, 'scrollbar_h_draw' , \ |
||
57 | scrollbar_h_mouse, 'scrollbar_h_mouse' , \ |
||
58 | dynamic_button_draw, 'dbutton_draw' , \ |
||
59 | dynamic_button_mouse, 'dbutton_mouse' , \ |
||
6391 | ashmew2 | 60 | menu_bar_draw, 'menu_bar_draw' , \ |
61 | menu_bar_mouse, 'menu_bar_mouse' , \ |
||
62 | menu_bar_activate, 'menu_bar_activate' , \ |
||
6535 | siemargl | 63 | fb_draw_panel, 'FileBrowser_draw' , \ |
64 | fb_mouse, 'FileBrowser_mouse' , \ |
||
65 | fb_key, 'FileBrowser_key' , \ |
||
6391 | ashmew2 | 66 | tl_data_init, 'tl_data_init' , \ |
67 | tl_data_clear, 'tl_data_clear' , \ |
||
68 | tl_info_clear, 'tl_info_clear' , \ |
||
69 | tl_key, 'tl_key' , \ |
||
70 | tl_mouse, 'tl_mouse' , \ |
||
71 | tl_draw, 'tl_draw' , \ |
||
72 | tl_info_undo, 'tl_info_undo' , \ |
||
73 | tl_info_redo, 'tl_info_redo' , \ |
||
74 | tl_node_add, 'tl_node_add' , \ |
||
75 | tl_node_set_data, 'tl_node_set_data' , \ |
||
76 | tl_node_get_data, 'tl_node_get_data' , \ |
||
77 | tl_node_delete, 'tl_node_delete' , \ |
||
78 | tl_cur_beg, 'tl_cur_beg' , \ |
||
79 | tl_cur_next, 'tl_cur_next' , \ |
||
80 | tl_cur_perv, 'tl_cur_perv' , \ |
||
81 | tl_node_close_open, 'tl_node_close_open' , \ |
||
82 | tl_node_lev_inc, 'tl_node_lev_inc' , \ |
||
83 | tl_node_lev_dec, 'tl_node_lev_dec' , \ |
||
84 | tl_node_move_up, 'tl_node_move_up' , \ |
||
85 | tl_node_move_down, 'tl_node_move_down' , \ |
||
86 | tl_node_poi_get_info, 'tl_node_poi_get_info' , \ |
||
87 | tl_node_poi_get_next_info, 'tl_node_poi_get_next_info' , \ |
||
88 | tl_node_poi_get_data, 'tl_node_poi_get_data' , \ |
||
89 | tl_save_mem, 'tl_save_mem' , \ |
||
90 | tl_load_mem, 'tl_load_mem' , \ |
||
91 | tl_get_mem_size, 'tl_get_mem_size' , \ |
||
6526 | siemargl | 92 | path_show_prepare, 'PathShow_prepare' , \ |
93 | path_show_draw, 'PathShow_draw' , \ |
||
6391 | ashmew2 | 94 | ted_but_sumb_upper, 'ted_but_sumb_upper' , \ |
95 | ted_but_sumb_lover, 'ted_but_sumb_lover' , \ |
||
96 | ted_but_convert_by_table, 'ted_but_convert_by_table' , \ |
||
97 | ted_can_save, 'ted_can_save' , \ |
||
98 | ted_clear, 'ted_clear' , \ |
||
99 | ted_delete, 'ted_delete' , \ |
||
100 | ted_draw, 'ted_draw' , \ |
||
101 | ted_init, 'ted_init' , \ |
||
102 | ted_init_scroll_bars, 'ted_init_scroll_bars' , \ |
||
103 | ted_init_syntax_file, 'ted_init_syntax_file' , \ |
||
104 | ted_is_select, 'ted_is_select' , \ |
||
105 | ted_key, 'ted_key' , \ |
||
106 | ted_mouse, 'ted_mouse' , \ |
||
6589 | siemargl | 107 | ted_open_file, 'ted_open_file_asm' , \ |
6391 | ashmew2 | 108 | ted_save_file, 'ted_save_file' , \ |
109 | ted_text_add, 'ted_text_add' , \ |
||
110 | ted_but_select_word, 'ted_but_select_word' , \ |
||
111 | ted_but_cut, 'ted_but_cut' , \ |
||
112 | ted_but_copy, 'ted_but_copy' , \ |
||
113 | ted_but_paste, 'ted_but_paste' , \ |
||
114 | ted_but_undo, 'ted_but_undo' , \ |
||
115 | ted_but_redo, 'ted_but_redo' , \ |
||
116 | ted_but_reverse, 'ted_but_reverse' , \ |
||
117 | ted_but_find_next, 'ted_but_find_next' , \ |
||
118 | ted_text_colored, 'ted_text_colored' , \ |
||
119 | frame_draw, 'frame_draw' , \ |
||
120 | progressbar_draw,'progressbar_draw' , \ |
||
121 | progressbar_progress, 'progressbar_progress' |
||
6470 | siemargl | 122 | |
6589 | siemargl | 123 | |
6391 | ashmew2 | 124 | public edit_box_draw as '_edit_box_draw' |
125 | public edit_box_key as '_edit_box_key' |
||
126 | public edit_box_mouse as '_edit_box_mouse' |
||
6589 | siemargl | 127 | public edit_box_set_text as '_edit_box_set_text' |
6391 | ashmew2 | 128 | |
129 | public check_box_draw2 as '_check_box_draw2' |
||
130 | public check_box_mouse2 as '_check_box_mouse2' |
||
6466 | siemargl | 131 | public init_checkbox2 as '_init_checkbox2' |
6449 | punk_joker | 132 | |
133 | public progressbar_draw as '_progressbar_draw' |
||
134 | public progressbar_progress as '_progressbar_progress' |
||
135 | |||
136 | public frame_draw as '_frame_draw' |
||
6470 | siemargl | 137 | |
138 | public scrollbar_v_draw as '_scrollbar_v_draw' |
||
139 | public scrollbar_v_mouse as '_scrollbar_v_mouse' |
||
140 | public scrollbar_h_draw as '_scrollbar_h_draw' |
||
141 | public scrollbar_h_mouse as '_scrollbar_h_mouse' |
||
6479 | siemargl | 142 | |
143 | public option_box_draw as '_option_box_draw' |
||
144 | public option_box_mouse as '_option_box_mouse' |
||
6482 | siemargl | 145 | |
6589 | siemargl | 146 | public menu_bar_draw as '_menu_bar_draw' |
147 | public menu_bar_mouse as '_menu_bar_mouse' |
||
148 | public menu_bar_activate as '_menu_bar_activate' |
||
6524 | siemargl | 149 | |
150 | public dynamic_button_draw as '_dynamic_button_draw' |
||
151 | public dynamic_button_mouse as '_dynamic_button_mouse' |
||
152 | |||
153 | public path_show_prepare as '_path_show_prepare' |
||
154 | public path_show_draw as '_path_show_draw' |
||
6535 | siemargl | 155 | |
156 | public fb_draw_panel as '_filebrowse_draw' |
||
157 | public fb_mouse as '_filebrowse_mouse' |
||
6589 | siemargl | 158 | public fb_key as '_filebrowse_key' |
159 | |||
160 | public ted_but_sumb_upper as '_ted_but_sumb_upper_asm' |
||
161 | public ted_but_sumb_lover as '_ted_but_sumb_lover_asm' |
||
162 | public ted_but_convert_by_table as '_ted_but_convert_by_table_asm' |
||
163 | public ted_can_save as '_ted_can_save_asm' |
||
164 | public ted_clear as '_ted_clear_asm' |
||
165 | public ted_delete as '_ted_delete_asm' |
||
166 | public ted_draw as '_ted_draw' |
||
167 | public ted_init as '_ted_init_asm' |
||
168 | public ted_init_scroll_bars as '_ted_init_scroll_bars' |
||
169 | public ted_init_syntax_file as '_ted_init_syntax_file' |
||
170 | public ted_is_select as '_ted_is_select_asm' |
||
171 | public ted_key as '_ted_key_asm' |
||
172 | public ted_mouse as '_ted_mouse' |
||
173 | public ted_open_file as '_ted_open_file_asm' |
||
174 | public ted_save_file as '_ted_save_file_asm' |
||
175 | public ted_text_add as '_ted_text_add' |
||
176 | public ted_but_select_word as '_ted_but_select_word' |
||
177 | public ted_but_cut as '_ted_but_cut_asm' |
||
178 | public ted_but_copy as '_ted_but_copy' |
||
179 | public ted_but_paste as '_ted_but_paste' |
||
180 | public ted_but_undo as '_ted_but_undo_asm' |
||
181 | public ted_but_redo as '_ted_but_redo_asm' |
||
182 | public ted_but_reverse as '_ted_but_reverse_asm' |
||
183 | public ted_but_find_next as '_ted_but_find_next' |
||
184 | public ted_text_colored as 'ted_text_colored_asm' |
||
185 | |||
6601 | siemargl | 186 | public tl_data_init as '_tl_data_init_asm' |
187 | public tl_data_clear as '_tl_data_clear_asm' |
||
188 | public tl_info_clear as '_tl_info_clear_asm' |
||
189 | public tl_key as '_tl_key_asm' |
||
190 | public tl_mouse as '_tl_mouse' |
||
191 | public tl_draw as '_tl_draw' |
||
192 | public tl_info_undo as '_tl_info_undo_asm' |
||
193 | public tl_info_redo as '_tl_info_redo_asm' |
||
194 | public tl_node_add as '_tl_node_add_asm' |
||
195 | public tl_node_set_data as '_tl_node_set_data_asm' |
||
196 | public tl_node_get_data as '_tl_node_get_data_asm' |
||
197 | public tl_node_delete as '_tl_node_delete_asm' |
||
198 | public tl_cur_beg as '_tl_cur_beg_asm' |
||
199 | public tl_cur_next as '_tl_cur_next_asm' |
||
200 | public tl_cur_perv as '_tl_cur_perv_asm' |
||
201 | public tl_node_close_open as '_tl_node_close_open_asm' |
||
202 | public tl_node_lev_inc as '_tl_node_lev_inc_asm' |
||
203 | public tl_node_lev_dec as '_tl_node_lev_dec_asm' |
||
204 | public tl_node_move_up as '_tl_node_move_up' |
||
205 | public tl_node_move_down as '_tl_node_move_down' |
||
206 | public tl_node_poi_get_info as '_tl_node_poi_get_info_asm' |
||
207 | public tl_node_poi_get_next_info as '_tl_node_poi_get_next_info_asm' |
||
208 | public tl_node_poi_get_data as '_tl_node_poi_get_data_asm' |
||
209 | public tl_save_mem as '_tl_save_mem_asm' |
||
210 | public tl_load_mem as '_tl_load_mem_asm' |
||
211 | public tl_get_mem_size as '_tl_get_mem_size_asm' |