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