Rev 2346 | Rev 2616 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1851 | mario79 | 1 | ;***************************************************************************** |
1792 | yogev_ezra | 2 | ; KFM - Kolibri File Manager |
1851 | mario79 | 3 | ; Copyright (c) 2006 - 2010, Marat Zakiyanov aka Mario79, aka Mario |
4 | ; All rights reserved. |
||
5 | ; |
||
6 | ; Redistribution and use in source and binary forms, with or without |
||
7 | ; modification, are permitted provided that the following conditions are met: |
||
8 | ; * Redistributions of source code must retain the above copyright |
||
9 | ; notice, this list of conditions and the following disclaimer. |
||
10 | ; * Redistributions in binary form must reproduce the above copyright |
||
11 | ; notice, this list of conditions and the following disclaimer in the |
||
12 | ; documentation and/or other materials provided with the distribution. |
||
13 | ; * Neither the name of the |
||
14 | ; names of its contributors may be used to endorse or promote products |
||
15 | ; derived from this software without specific prior written permission. |
||
16 | ; |
||
17 | ; THIS SOFTWARE IS PROVIDED BY Marat Zakiyanov ''AS IS'' AND ANY |
||
18 | ; EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
||
19 | ; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
||
20 | ; DISCLAIMED. IN NO EVENT SHALL |
||
21 | ; DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
||
22 | ; (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
||
23 | ; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
||
24 | ; ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
||
25 | ; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
||
26 | ; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
||
27 | ;***************************************************************************** |
||
2584 | mario79 | 28 | ; KFM v0.47d 07.04.2012 |
2346 | mario79 | 29 | ;--------------------------------------------------------------------- |
1792 | yogev_ezra | 30 | use32 |
1851 | mario79 | 31 | org 0x0 |
32 | |||
1792 | yogev_ezra | 33 | db 'MENUET01' |
34 | dd 0x01 |
||
35 | dd START |
||
36 | dd I_END |
||
37 | dd mem |
||
38 | dd stacktop |
||
39 | dd 0x0 |
||
40 | dd path |
||
41 | |||
42 | ;include 'lang.inc' |
||
43 | ;include 'kglobals.inc' |
||
1851 | mario79 | 44 | ;include 'macros.inc' |
45 | include '../../../macros.inc' |
||
46 | include '../../../config.inc' ;for nightbuild |
||
47 | |||
1792 | yogev_ezra | 48 | include 'editbox.inc' |
49 | ;use_edit_box |
||
50 | use_edit_box procinfo |
||
51 | ;include 'ASCGL.INC' |
||
52 | ;--------------------------------------------------------------------- |
||
53 | include 'files.inc' |
||
54 | ;--------------------------------------------------------------------- |
||
55 | STRLEN = 1024 |
||
56 | ;--------------------------------------------------------------------- |
||
57 | START: |
||
2148 | mario79 | 58 | ; mcall 9, procinfo, -1 |
59 | ; mov eax,[ebx+30] |
||
60 | ; mov [PID],eax |
||
61 | ; xor ecx,ecx |
||
62 | ;@@: |
||
63 | ; inc ecx |
||
64 | ; mcall 9, procinfo |
||
65 | ; mov eax,[PID] |
||
66 | ; cmp eax,[ebx+30] |
||
67 | ; jne @r |
||
68 | ; mov [active_process],ecx |
||
69 | mcall 9,procinfo,-1 |
||
70 | mov ecx,[ebx+30] ; PID |
||
71 | mcall 18,21 |
||
72 | mov [active_process],eax ; WINDOW SLOT |
||
1792 | yogev_ezra | 73 | mov [appl_memory],mem |
74 | mov ax,[select_disk_char] |
||
75 | mov [read_folder_name],ax |
||
76 | mov [read_folder_1_name],ax |
||
77 | call load_icon_and_convert_to_img |
||
78 | call load_buttons_and_convert_to_img |
||
79 | call load_initiation_file |
||
80 | call add_memory_for_folders |
||
81 | call device_detect |
||
82 | call device_detect_f70 |
||
83 | mcall 66, 1, 1 |
||
84 | ; call draw_window |
||
85 | ; xor eax,eax |
||
86 | mov eax,1 |
||
87 | mov [left_sort_flag],eax |
||
88 | mov [right_sort_flag],eax |
||
89 | |||
90 | call proc_read_left_folder |
||
91 | test eax,eax |
||
92 | jz @f |
||
93 | cmp eax,6 |
||
94 | jne read_folder_error |
||
95 | @@: |
||
96 | call proc_read_right_folder |
||
97 | test eax,eax |
||
98 | jz @f |
||
99 | cmp eax,6 |
||
100 | jne read_folder_1_error |
||
101 | @@: |
||
102 | mcall 40, 0x27 |
||
103 | jmp red_1 |
||
104 | ;--------------------------------------------------------------------- |
||
105 | red: |
||
106 | call get_window_param |
||
107 | test [window_status],10b |
||
108 | jnz red_1 ;still |
||
109 | test [window_status],100b |
||
110 | jnz red_1 |
||
111 | cmp [window_high],180 |
||
112 | ja @f |
||
113 | mov esi,180 |
||
114 | mcall 67,-1,ebx,ebx |
||
115 | @@: |
||
116 | cmp [window_width],495 |
||
117 | ja red_1 |
||
118 | mov edx,495 |
||
119 | mcall 67,-1,ebx, ,ebx |
||
120 | red_1: |
||
121 | call draw_window |
||
122 | ;--------------------------------------------------------------------- |
||
123 | still: |
||
124 | mcall 10 |
||
125 | cmp eax,1 |
||
126 | je red |
||
127 | cmp eax,2 |
||
128 | je key |
||
129 | cmp eax,3 |
||
130 | je button |
||
131 | cmp eax,6 |
||
132 | je mouse |
||
133 | jmp still |
||
134 | ;--------------------------------------------------------------------- |
||
135 | get_window_param: |
||
136 | mcall 9, procinfo, -1 |
||
137 | mov eax,[ebx+46] |
||
138 | mov [window_high],eax |
||
139 | mov eax,[ebx+42] |
||
140 | mov [window_width],eax |
||
141 | mov eax,[ebx+70] |
||
142 | mov [window_status],eax |
||
143 | mcall 48,4 |
||
144 | mov [skin_high],eax |
||
145 | ret |
||
146 | ;--------------------------------------------------------------------- |
||
147 | draw_window: |
||
148 | mcall 12, 1 |
||
149 | ; mcall 0, <20,620>, <20,460>, 0x03cccccc ; 0x805080D0, 0x005080D0 |
||
150 | xor esi,esi |
||
151 | mcall 0, <20,620>, <20,460>, 0x43cccccc ; 0x805080D0, 0x005080D0 |
||
152 | call get_window_param |
||
153 | ; mov ecx,[temp_esi] |
||
2584 | mario79 | 154 | test [window_status],100b ; window is rolled up |
155 | jnz .exit |
||
156 | |||
157 | test [window_status],10b ; window is minimized to panel |
||
158 | jnz .exit |
||
159 | |||
1851 | mario79 | 160 | mcall 71, 1 , header_text |
1792 | yogev_ezra | 161 | ; create_dir_name |
162 | ; start_parameter |
||
163 | ; file_name |
||
164 | ; [temp_edi] |
||
165 | ; header |
||
166 | ; delete_file_data.name |
||
167 | ; start_file_data.name |
||
168 | ; start_parameter |
||
169 | ; start_file_data.name |
||
170 | ; read_icon_file.name |
||
171 | ; read_file_features.name ;path ;header |
||
172 | |||
173 | cmp [window_high],180 |
||
2584 | mario79 | 174 | jb .exit |
1792 | yogev_ezra | 175 | cmp [window_width],495 |
2584 | mario79 | 176 | jb .exit |
1792 | yogev_ezra | 177 | |
178 | ; pusha |
||
179 | ; mcall 4,<15,25>,0,read_folder.name,100 |
||
180 | ; popa |
||
181 | call draw_fbutton |
||
182 | |||
183 | ; mov [left_panel_clear_all],1 |
||
184 | |||
185 | call draw_left_panel |
||
186 | |||
187 | ; mov [right_panel_clear_all],1 |
||
188 | |||
189 | call draw_right_panel |
||
190 | call draw_device_button |
||
191 | call draw_left_select_disk_button |
||
192 | call draw_left_sort_button |
||
193 | call draw_right_select_disk_button |
||
194 | call draw_right_sort_button |
||
195 | call draw_menu_bar |
||
196 | call draw_buttons_panel |
||
197 | call draw_ATAPI_tray_control |
||
198 | |||
199 | ; mcall 47,0x80000,[left_scroll_compens],<300, 5>,0xffffff |
||
200 | ; call mouse.draw_data |
||
201 | ; mcall 18, 7 |
||
202 | ; mov [temp_eax],eax |
||
203 | ; mcall 47,0x80000,[active_process],<300, 5>,0xffffff |
||
204 | ; mcall 47,0x80000,[left_marked_counter],<300, 5>,0xffffff |
||
205 | ; mcall 47,0x80000,[right_marked_counter],<400, 5>,0xffffff |
||
206 | ; mcall 47,0x80000,[sorting_low_limit],<100, 5>,0xffffff |
||
207 | ; mcall 47,0x80000,[sort_counter],<200, 5>,0xffffff |
||
208 | ; mcall 47,0x80000,[sorting_high_limit],<300, 5>,0xffffff |
||
209 | ; mcall 47,0x80000,[dir_temp_counter],<400, 5>,0xffffff |
||
210 | |||
211 | ; mcall 47,0x80000,[timer_tick],<500, 5>,0xffffff |
||
212 | ; mcall 47,0x80000,[temp_eax],<400, 5>,0xffffff |
||
213 | ; mcall 47,0x80000,[temp_ebx],<400, 5>,0xffffff |
||
214 | ; mcall 47,0x80000,[temp_ecx],<500, 5>,0xffffff |
||
215 | ; mcall 47,0x80000,[temp_ebx],<500, 5>,0xffffff |
||
216 | ; mcall 47,0x80000,[ini_file_start],<100, 5>,0xffffff |
||
217 | ; mcall 47,0x80000,[left_folder_data],<200, 5>,0xffffff |
||
218 | ; mcall 47,0x80000,[right_folder_data],<300, 5>,0xffffff |
||
219 | ; mcall 47,0x80000,[appl_memory],<500, 5>,0xffffff |
||
220 | ; mcall 47,0x80000,[temp_znak],<500, 5>,0xffffff |
||
221 | |||
222 | ; mcall 47,0x80000,[sort_counter],<200, 5>,0xffffff |
||
223 | ; mcall 47,0x80000,[temp_edi],<250, 5>,0xffffff |
||
224 | ; mcall 47,0x80000,[temp_esi],<300, 5>,0xffffff |
||
225 | ; mcall 47,0x80000,[temp_ecx],<350, 5>,0xffffff |
||
226 | ; mcall 47,0x80000,[temp_znak],<400, 5>,0xffffff |
||
227 | |||
228 | ; movzx ecx,[left_start_draw_cursor_line] |
||
229 | ; mcall 47,0x40000, ,<300, 5>,0xffffff |
||
230 | ; mcall 47,0x40000,[left_start_draw_line],<400, 5>,0xffffff |
||
231 | |||
232 | ; mcall 47,0x40000,[window_width],<100, 5>,0xffffff |
||
233 | ; mcall 47,0x40000,[window_high],<130, 5>,0xffffff |
||
234 | |||
235 | ; mcall 47,0x80100,[left_panel_x],<200, 5>,0xffffff |
||
236 | ; mcall 47,0x80100,[left_panel_y],<250, 5>,0xffffff |
||
237 | ; mov edx,[temp_counter_dword_1] |
||
238 | ; mcall 4,<150,3>,0x80000000 |
||
239 | ; mov edx,[temp_counter_dword] |
||
240 | ; mcall 4,<5,3>,0x80000000 |
||
2584 | mario79 | 241 | .exit: |
1792 | yogev_ezra | 242 | mcall 12, 2 |
243 | ret |
||
244 | ;temp_eax dd 0 |
||
245 | ;temp_ebx dd 0 |
||
246 | ;temp_ecx dd 0 |
||
247 | ;temp_edx dd 0 |
||
248 | ;temp_esi dd 0 |