Rev 1951 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1951 | Rev 2000 | ||
---|---|---|---|
1 | ;--------------------------------------------------------------------- |
1 | ;--------------------------------------------------------------------- |
2 | kfile: |
2 | kfile: |
3 | test dword [status],1 |
3 | test dword [status],1 |
4 | jnz still |
4 | jnz still |
5 | or dword [status],1 |
5 | or dword [status],1 |
6 | 6 | ||
7 | call load_directory.copy_dir_path |
7 | call load_directory.copy_dir_path |
8 | - | ||
9 | ; call get_filter_data |
- | |
10 | - | ||
11 | - | ||
12 | cmp [OpenDialog_path],dword 'NoKe' |
8 | cmp [OpenDialog_path],dword 'NoKe' |
13 | je @f |
9 | je @f |
- | 10 | ||
14 | mov [OpenDialog_data.start_path],dword OpenDialog_path |
11 | mov [OpenDialog_data.start_path],dword OpenDialog_path |
15 | jmp .start_OpenDialog |
12 | jmp .start_OpenDialog |
- | 13 | ;--------------------------------------------------------------------- |
|
16 | @@: |
14 | @@: |
17 | mov ebx,open_dialog_name |
15 | mov ebx,open_dialog_name |
18 | mov esi,path |
16 | mov esi,path |
19 | mov edi,library_path |
17 | mov edi,library_path |
20 | call copy_file_path |
18 | call copy_file_path |
21 | 19 | ||
22 | .start_OpenDialog: |
20 | .start_OpenDialog: |
23 | - | ||
24 | ;start_OpenDialog OpenDialog_data |
- | |
25 | push dword OpenDialog_data |
21 | push dword OpenDialog_data |
26 | call [OpenDialog_Start] |
22 | call [OpenDialog_Start] |
27 | - | ||
28 | call clear_control_key_flag |
23 | call clear_control_key_flag |
29 | - | ||
30 | cmp [OpenDialog_data.status],2 |
24 | cmp [OpenDialog_data.status],2 |
31 | je thread1_start |
25 | je thread1_start |
- | 26 | ||
32 | cmp [OpenDialog_data.status],1 |
27 | cmp [OpenDialog_data.status],1 |
33 | jne @f |
28 | jne @f |
- | 29 | ||
34 | xor dword [status],1 |
30 | xor dword [status],1 |
35 | jmp kopen_1 |
31 | jmp kopen_1 |
- | 32 | ;--------------------------------------------------------------------- |
|
36 | @@: |
33 | @@: |
37 | xor dword [status],1 |
34 | xor dword [status],1 |
38 | jmp still |
35 | jmp still |
39 | - | ||
- | 36 | ;--------------------------------------------------------------------- |
|
40 | thread1_start: |
37 | thread1_start: |
41 | - | ||
42 | call get_memory_for_tread_stack |
38 | call get_memory_for_thread_stack |
43 | mov [thread_stack],eax |
39 | mov [thread_stack],eax |
44 | mcall 51,1,thread1 ;, thread_stack |
40 | mcall 51,1,thread1 ; thread_stack |
45 | jmp still |
41 | jmp still |
46 | ;--------------------------------------------------------------------- |
42 | ;--------------------------------------------------------------------- |
47 | get_filter_data: |
- | |
48 | mov edi,Filter+4 |
- | |
49 | xor eax,eax |
- | |
50 | mov ecx,10 |
- | |
51 | cld |
- | |
52 | @@: |
- | |
53 | mov esi,10 |
- | |
54 | sub esi,ecx |
- | |
55 | lea esi,[esi+esi*2] ; x 3 |
- | |
56 | shl esi,3 ; x 8 |
- | |
57 | add esi,dword Convert_plugin_0.Assoc |
- | |
58 | mov esi,[esi] |
- | |
59 | add esi,4 |
- | |
60 | - | ||
61 | test esi,esi |
- | |
62 | jz @f |
- | |
63 | call .start |
- | |
64 | dec ecx |
- | |
65 | jnz @r |
- | |
66 | @@: |
- | |
67 | mov [edi],byte 0 |
- | |
68 | mov eax,Filter |
- | |
69 | sub edi,eax |
- | |
70 | mov [eax],edi |
- | |
71 | - | ||
72 | ret |
- | |
73 | .start: |
- | |
74 | @@: |
- | |
75 | lodsb |
- | |
76 | stosb |
- | |
77 | test eax,eax |
- | |
78 | jnz @r |
- | |
79 | cmp [esi],ah |
- | |
80 | jne @r |
- | |
81 | ret |
- | |
82 | ;--------------------------------------------------------------------- |
- | |
83 | thread1: ; start of thread1 |
43 | thread1: ; start of thread1 |
84 | mcall 9, procinfo_threads, -1 |
44 | mcall 9,procinfo_threads, -1 |
85 | mov eax,[ebx+30] |
45 | mov eax,[ebx+30] |
86 | mov [PID1],eax |
46 | mov [PID1],eax |
87 | mcall 40, 0x27 |
47 | mcall 40,0x27 |
88 | - | ||
89 | or ecx,-1 ; get information about me |
48 | or ecx,-1 ; get information about me |
90 | call getappinfo |
49 | call getappinfo |
91 | - | ||
92 | mov esi,string |
50 | mov esi,string |
93 | @@: |
- | |
- | 51 | ;------------------------------------- |
|
94 | cld |
52 | cld |
- | 53 | @@: |
|
95 | lodsb |
54 | lodsb |
96 | test al,al |
55 | test al,al |
97 | jne @r |
56 | jne @r |
- | 57 | ;------------------------------------- |
|
98 | sub esi,string |
58 | sub esi,string |
99 | mov eax,esi |
59 | mov eax,esi |
100 | dec eax |
60 | dec eax |
101 | mov edi, edit1 |
61 | mov edi, edit1 |
102 | mov [edi+48], eax ;ed_size |
62 | mov [edi+48], eax ;ed_size |
103 | mov [edi+52], eax ;ed_pos |
63 | mov [edi+52], eax ;ed_pos |
- | 64 | ;------------------------------------- |
|
104 | .red: |
65 | .red: |
105 | call .draw_window |
66 | call .draw_window |
106 | - | ||
- | 67 | ;------------------------------------- |
|
107 | .still: |
68 | .still: |
108 | - | ||
109 | mcall 10 ; wait here for event |
69 | mcall 10 ; wait here for event |
110 | 70 | ||
111 | cmp eax,1 ; redraw request ? |
71 | cmp eax,1 ; redraw request ? |
112 | je .red |
72 | je .red |
- | 73 | ||
113 | cmp eax,2 ; key in buffer ? |
74 | cmp eax,2 ; key in buffer ? |
114 | je .key |
75 | je .key |
- | 76 | ||
115 | cmp eax,3 ; button in buffer ? |
77 | cmp eax,3 ; button in buffer ? |
116 | je .button |
78 | je .button |
117 | 79 | ||
118 | push dword name_editboxes |
80 | push dword name_editboxes |
119 | call [edit_box_mouse] |
81 | call [edit_box_mouse] |
120 | ; mouse_edit_box name_editboxes |
- | |
121 | ; mouse_menubar menu_data_2 |
- | |
122 | jmp .still |
82 | jmp .still |
123 | - | ||
- | 83 | ;--------------------------------------------------------------------- |
|
124 | .key: ; key |
84 | .key: ; key |
125 | mcall 2 |
85 | mcall |
126 | cmp ah,13 |
86 | cmp ah,13 |
127 | je .close_with_open_file |
87 | je .close_with_open_file |
- | 88 | ||
128 | cmp ah,27 |
89 | cmp ah,27 |
129 | je .close |
90 | je .close |
130 | 91 | ||
131 | push dword name_editboxes |
92 | push dword name_editboxes |
132 | call [edit_box_key] |
93 | call [edit_box_key] |
133 | ; key_edit_box name_editboxes |
- | |
134 | jmp .still |
94 | jmp .still |
135 | - | ||
- | 95 | ;--------------------------------------------------------------------- |
|
136 | .close_with_open_file: |
96 | .close_with_open_file: |
137 | mov [open_file_flag],byte 1 |
97 | mov [open_file_flag],byte 1 |
138 | jmp .close |
98 | jmp .close |
139 | - | ||
- | 99 | ;--------------------------------------------------------------------- |
|
140 | .button: ; button |
100 | .button: ; button |
141 | mov eax,17 ; get id |
101 | mcall 17 ; get id |
142 | mcall |
- | |
143 | - | ||
144 | cmp ah,1 ; button id=1 ? |
102 | cmp ah,1 ; button id=1 ? |
145 | jne .still |
103 | jne .still |
146 | .close: |
104 | .close: |
147 | ; bts dword [status],2 |
- | |
148 | ; btr dword [status],0 |
- | |
149 | xor dword [status],1 |
105 | xor dword [status],1 |
150 | xor eax,eax |
106 | xor eax,eax |
151 | mov [PID1],eax |
107 | mov [PID1],eax |
152 | mcall 68,13,[thread_stack] |
108 | mcall 68,13,[thread_stack] |
153 | mov eax,-1 ; close this program |
109 | mcall -1 ; close this program |
154 | mcall |
- | |
155 | - | ||
156 | jmp .still |
110 | jmp .still |
157 | - | ||
- | 111 | ;--------------------------------------------------------------------- |
|
158 | ; ********************************************* |
112 | ; ********************************************* |
159 | ; ******* WINDOW DEFINITIONS AND DRAW ******** |
113 | ; ******* WINDOW DEFINITIONS AND DRAW ******** |
160 | ; ********************************************* |
114 | ; ********************************************* |
161 | - | ||
162 | - | ||
163 | .draw_window: |
115 | .draw_window: |
164 | - | ||
165 | - | ||
166 | mov eax,12 ; function 12:tell os about windowdraw |
- | |
167 | mov ebx,1 ; 1, start of draw |
- | |
168 | mcall |
116 | mcall 12,1 |
169 | - | ||
170 | ; DRAW WINDOW |
- | |
171 | xor eax,eax ; function 0 : define and draw window |
117 | xor eax,eax ; function 0 : define and draw window |
172 | mov ebx,100*65536+300 ; [x start] *65536 + [x size] |
- | |
173 | mov ecx,100*65536+80 ; [y start] *65536 + [y size] |
- | |
174 | mov edx,0x03eeeeee ; color of work area RRGGBB,8->color gl |
- | |
175 | mcall |
118 | xor esi,esi |
176 | - | ||
177 | ; WINDOW LABEL |
- | |
178 | - | ||
179 | mcall 71,1, labelt1 |
119 | mcall ,<100,300>,<100,80>,0x13eeeeee,,labelt1 |
180 | - | ||
181 | push dword name_editboxes |
120 | push dword name_editboxes |
182 | call [edit_box_draw] |
121 | call [edit_box_draw] |
183 | ; draw_edit_box name_editboxes |
- | |
184 | ; mcall 47,0x80000,[PID1],<200, 5>,0xffffff |
122 | ; mcall 47,0x80000,[PID1],<200, 5>,0xffffff |
185 | ; mcall 71,1, proverka |
- | |
186 | ; mcall 47,0x80001,0,<300, 5>,0xffffff |
- | |
187 | ; draw_menu_bar menu_data_2 |
- | |
188 | mov eax,12 ; function 12:tell os about windowdraw |
- | |
189 | mov ebx,2 ; 2, end of draw |
- | |
190 | mcall |
123 | mcall 12,2 |
191 | - | ||
192 | ret |
124 | ret |
193 | - | ||
194 | - | ||
195 | ;---------------------------------------------------------------------300,>200,> |
125 | ;---------------------------------------------------------------------200,>100,80>100,300> |
196 | 126 |