Subversion Repositories Kolibri OS

Rev

Rev 6495 | Rev 6526 | 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
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'
6391 ashmew2 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
20
	mcall 68,11
21
	stdcall dll.Load, @IMPORT
22
	ret
23
endp
24
 
25
;; Wrapper to handle edit_box_key function for editboxes.
26
;; Call this baby from C (refer kolibri_editbox.h for details)
6470 siemargl 27
editbox_key_thunk:
6391 ashmew2 28
	mov [oldebp], ebp	;Save ebp because GCC is crazy for it otherwise.
29
	pop ebp			;Save return address in ebp. Stack top is param now.
6393 punk_joker 30
	mov eax, dword [press_key]
6391 ashmew2 31
	call [edit_box_key]	; The pointer we passed should be on the stack already.
32
	push ebp		;push the return address back to stack
33
	mov ebp, [oldebp]
34
	ret
35
 
36
oldebp dd ?
6393 punk_joker 37
press_key dd ?
6391 ashmew2 38
 
39
@IMPORT:
40
library lib_boxlib, 	'box_lib.obj'
41
 
42
import lib_boxlib, \
43
	edit_box_draw, 'edit_box' , \
44
	edit_box_key, 'edit_box_key' , \
45
	edit_box_mouse, 'edit_box_mouse', \
46
	edit_box_set_text, 'edit_box_set_text' , \
47
	init_checkbox2,  'init_checkbox2' , \
48
	check_box_draw2, 'check_box_draw2' , \
49
	check_box_mouse2, 'check_box_mouse2' , \
50
	option_box_draw,  'option_box_draw' , \
51
	option_box_mouse, 'option_box_mouse' , \
6470 siemargl 52
	scrollbar_v_draw, 'scrollbar_v_draw' , \
53
	scrollbar_v_mouse, 'scrollbar_v_mouse' , \
54
	scrollbar_h_draw, 'scrollbar_h_draw' , \
55
	scrollbar_h_mouse, 'scrollbar_h_mouse' , \
56
	dynamic_button_draw, 'dbutton_draw' , \
57
	dynamic_button_mouse, 'dbutton_mouse' , \
6391 ashmew2 58
	menu_bar_draw, 'menu_bar_draw' , \
59
	menu_bar_mouse, 'menu_bar_mouse' , \
60
	menu_bar_activate, 'menu_bar_activate' , \
61
	fb_draw_panel, 'filebrowser_draw' , \
62
	fb_mouse, 'filebrowser_mouse' , \
63
	fb_key, 'filebrowser_key' , \
64
	tl_data_init, 'tl_data_init' , \
65
	tl_data_clear, 'tl_data_clear' , \
66
	tl_info_clear, 'tl_info_clear' , \
67
	tl_key, 'tl_key' , \
68
	tl_mouse, 'tl_mouse' , \
69
	tl_draw, 'tl_draw' , \
70
	tl_info_undo, 'tl_info_undo' , \
71
	tl_info_redo, 'tl_info_redo' , \
72
	tl_node_add, 'tl_node_add' , \
73
	tl_node_set_data, 'tl_node_set_data' , \
74
	tl_node_get_data, 'tl_node_get_data' , \
75
	tl_node_delete, 'tl_node_delete' , \
76
	tl_cur_beg, 'tl_cur_beg' , \
77
	tl_cur_next, 'tl_cur_next' , \
78
	tl_cur_perv, 'tl_cur_perv' , \
79
	tl_node_close_open, 'tl_node_close_open' , \
80
	tl_node_lev_inc, 'tl_node_lev_inc' , \
81
	tl_node_lev_dec, 'tl_node_lev_dec' , \
82
	tl_node_move_up, 'tl_node_move_up' , \
83
	tl_node_move_down, 'tl_node_move_down' , \
84
	tl_node_poi_get_info, 'tl_node_poi_get_info' , \
85
	tl_node_poi_get_next_info, 'tl_node_poi_get_next_info' , \
86
	tl_node_poi_get_data, 'tl_node_poi_get_data' , \
87
	tl_save_mem, 'tl_save_mem' , \
88
	tl_load_mem, 'tl_load_mem' , \
89
	tl_get_mem_size, 'tl_get_mem_size' , \
90
	path_show_prepare, 'pathshow_prepare' , \
91
	path_show_draw, 'pathshow_draw' , \
92
	ted_but_sumb_upper, 'ted_but_sumb_upper' , \
93
	ted_but_sumb_lover, 'ted_but_sumb_lover' , \
94
	ted_but_convert_by_table, 'ted_but_convert_by_table' , \
95
	ted_can_save, 'ted_can_save' , \
96
	ted_clear, 'ted_clear' , \
97
	ted_delete, 'ted_delete' , \
98
	ted_draw, 'ted_draw' , \
99
	ted_init, 'ted_init' , \
100
	ted_init_scroll_bars, 'ted_init_scroll_bars' , \
101
	ted_init_syntax_file, 'ted_init_syntax_file' , \
102
	ted_is_select, 'ted_is_select' , \
103
	ted_key, 'ted_key' , \
104
	ted_mouse, 'ted_mouse' , \
105
	ted_open_file, 'ted_open_file' , \
106
	ted_save_file, 'ted_save_file' , \
107
	ted_text_add, 'ted_text_add' , \
108
	ted_but_select_word, 'ted_but_select_word' , \
109
	ted_but_cut, 'ted_but_cut' , \
110
	ted_but_copy, 'ted_but_copy' , \
111
	ted_but_paste, 'ted_but_paste' , \
112
	ted_but_undo, 'ted_but_undo' , \
113
	ted_but_redo, 'ted_but_redo' , \
114
	ted_but_reverse, 'ted_but_reverse' , \
115
	ted_but_find_next, 'ted_but_find_next' , \
116
	ted_text_colored, 'ted_text_colored' , \
117
	frame_draw, 'frame_draw' , \
118
	progressbar_draw,'progressbar_draw' , \
119
	progressbar_progress, 'progressbar_progress'
6470 siemargl 120
 
6391 ashmew2 121
 
122
public edit_box_draw as '_edit_box_draw'
123
public edit_box_key as '_edit_box_key'
124
public edit_box_mouse as '_edit_box_mouse'
6470 siemargl 125
public edit_box_set_text as '_edit_box_set_text'
6391 ashmew2 126
 
127
public check_box_draw2 as '_check_box_draw2'
128
public check_box_mouse2 as '_check_box_mouse2'
6466 siemargl 129
public init_checkbox2 as '_init_checkbox2'
6449 punk_joker 130
 
131
public progressbar_draw as '_progressbar_draw'
132
public progressbar_progress as '_progressbar_progress'
133
 
134
public frame_draw as '_frame_draw'
6470 siemargl 135
 
136
public scrollbar_v_draw as '_scrollbar_v_draw'
137
public scrollbar_v_mouse as '_scrollbar_v_mouse'
138
public scrollbar_h_draw as '_scrollbar_h_draw'
139
public scrollbar_h_mouse as '_scrollbar_h_mouse'
6479 siemargl 140
 
141
public option_box_draw as '_option_box_draw'
142
public option_box_mouse as '_option_box_mouse'
6482 siemargl 143
 
144
public menu_bar_draw as '_menu_bar_draw'
145
public menu_bar_mouse as '_menu_bar_mouse'
146
public menu_bar_activate as '_menu_bar_activate'
6524 siemargl 147
 
148
public dynamic_button_draw as '_dynamic_button_draw'
149
public dynamic_button_mouse as '_dynamic_button_mouse'
150
 
151
public path_show_prepare as '_path_show_prepare'
152
public path_show_draw as '_path_show_draw'