Subversion Repositories Kolibri OS

Rev

Rev 6213 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6213 Rev 8408
Line 1... Line 1...
1
use32
1
use32
2
	org 0x0
2
	org 0
3
	db 'MENUET01' ;¨¤¥­â¨ä. ¨á¯®«­ï¥¬®£® ä ©«  ¢á¥£¤  8 ¡ ©â
3
	db 'MENUET01' ;¨¤¥­â¨ä. ¨á¯®«­ï¥¬®£® ä ©«  ¢á¥£¤  8 ¡ ©â
4
	dd 1,start,i_end,mem,stacktop,0,sys_path
4
	dd 1,start,i_end,mem,stacktop,0,sys_path
Line 5... Line 5...
5
 
5
 
6
ini_def_c_bkgnd equ 0
6
ini_def_c_bkgnd equ 0
Line 40... Line 40...
40
 
40
 
41
include '../../../macros.inc'
41
include '../../../macros.inc'
42
include '../../../proc32.inc'
42
include '../../../proc32.inc'
43
include '../../../KOSfuncs.inc'
43
include '../../../KOSfuncs.inc'
-
 
44
include '../../../load_img.inc'
44
include '../../../load_img.inc'
45
include '../../../load_lib.mac'
45
include '../../../develop/libraries/box_lib/trunk/box_lib.mac'
46
include '../../../develop/libraries/box_lib/trunk/box_lib.mac'
46
include 'le_pole.inc'
47
include 'le_pole.inc'
Line 47... Line 48...
47
include 'le_signal.inc'
48
include 'le_signal.inc'
48
 
49
 
Line 49... Line 50...
49
@use_library_mem mem.Alloc,mem.Free,mem.ReAlloc,dll.Load
50
@use_library mem.Alloc,mem.Free,mem.ReAlloc,dll.Load
50
caption db '‹®£¨ç¥áª¨¥ í«¥¬¥­âë 13.02.16',0 ;¯®¤¯¨áì ®ª­ 
51
caption db '‹®£¨ç¥áª¨¥ í«¥¬¥­âë 13.02.16',0 ;¯®¤¯¨áì ®ª­ 
51
 
52
 
Line 169... Line 170...
169
	   0, 1,-1, 0,\
170
	   0, 1,-1, 0,\
170
	  -1, 0, 0,-1,\
171
	  -1, 0, 0,-1,\
171
	   0,-1, 1, 0
172
	   0,-1, 1, 0
Line 172... Line 173...
172
 
173
 
173
IMAGE_TOOLBAR_ICON_SIZE equ 16*16*3
-
 
174
image_data_toolbar dd 0
-
 
175
 
-
 
176
icon_tl_sys dd 0 ;㪠§ â¥«ì ­  ¯ ¬ïâì ¤«ï åà ­¥­¨ï á¨á⥬­ëå ¨ª®­®ª
-
 
177
icon_toolbar dd 0 ;㪠§ â¥«ì ­  ¯ ¬ïâì ¤«ï åà ­¥­¨ï ¨ª®­®ª ®¡ê¥ªâ®¢
-
 
178
 
-
 
Line 179... Line 174...
179
image_data_gray dd 0 ;¯ ¬ïâì á ¢à¥¬¥­­ë¬¨ á¥à묨 ¨§®¡à ¦¥­¨ï¬¨ ¢ ä®à¬ â¥ 24-bit, ¨§ ª®â®àëå ¡ã¤ãâ ᮧ¤ ¢ âìáï âà ä à¥âë
174
IMAGE_TOOLBAR_ICON_SIZE equ 16*16*3
Line 180... Line 175...
180
 
175
 
181
cursors_count equ 4
176
cursors_count equ 4
Line 194... Line 189...
194
 
189
 
195
align 4
190
align 4
196
start:
191
start:
197
	load_libraries l_libs_start,l_libs_end
192
	load_libraries l_libs_start,l_libs_end
198
	;¯à®¢¥àª  ­  ᪮«ìª® 㤠筮 § £ã§¨« áì ¡¨¡«¨®â¥ª 
193
	;¯à®¢¥àª  ­  ᪮«ìª® 㤠筮 § £ã§¨« áì ¡¨¡«¨®â¥ª 
199
	mov	ebp,lib_7
194
	mov	ebp,lib4
200
	cmp	dword [ebp+ll_struc_size-4],0
195
	cmp	dword [ebp+ll_struc_size-4],0
201
	jz	@f
196
	jz	@f
202
		mcall SF_TERMINATE_PROCESS
197
		mcall SF_TERMINATE_PROCESS
203
	@@:
198
	@@:
204
	mcall SF_STYLE_SETTINGS,SSF_GET_COLORS,sc,sizeof.system_colors
199
	mcall SF_STYLE_SETTINGS,SSF_GET_COLORS,sc,sizeof.system_colors
Line 205... Line 200...
205
	mcall SF_SET_EVENTS_MASK,0x27
200
	mcall SF_SET_EVENTS_MASK,0x27
206
 
201
 
Line 207... Line 202...
207
	;*** áç¨â뢠­¨¥ ­ áâ஥ª ¨§ *.ini ä ©« 
202
	;*** áç¨â뢠­¨¥ ­ áâ஥ª ¨§ *.ini ä ©« 
208
	copy_path ini_name,sys_path,file_name,0x0
203
	copy_path ini_name,sys_path,file_name,0
209
 
204
 
210
	stdcall dword[ini_get_color],file_name,ini_sec_color,key_color_bkgnd,ini_def_c_bkgnd
205
	stdcall dword[ini_get_color],file_name,ini_sec_color,key_color_bkgnd,ini_def_c_bkgnd
Line 640... Line 635...
640
	or  edx,(3 shl 24)+0x10000000+0x20000000
635
	or  edx,(3 shl 24)+0x10000000+0x20000000
641
	mov edi,caption
636
	mov edi,caption
642
	mcall SF_CREATE_WINDOW, (20 shl 16)+580,(20 shl 16)+415
637
	mcall SF_CREATE_WINDOW, (20 shl 16)+580,(20 shl 16)+415
Line 643... Line 638...
643
 
638
 
644
	; *** ᮧ¤ ­¨¥ ª­®¯®ª ­  ¯ ­¥«ì ***
639
	; *** ᮧ¤ ­¨¥ ª­®¯®ª ­  ¯ ­¥«ì ***
Line 645... Line 640...
645
	mcall SF_DEFINE_BUTTON, (5 shl 16)+20, (panel_0_coord_top shl 16)+20, 3,, [sc.work_button]
640
	mcall SF_DEFINE_BUTTON, (5 shl 16)+20, (panel_0_coord_top shl 16)+20, 3, [sc.work_button]
646
 
641
 
647
	add ebx,25 shl 16
642
	add ebx,25 shl 16
Line 756... Line 751...
756
	mov dword[wScr2.all_redraw],1
751
	mov dword[wScr2.all_redraw],1
757
	stdcall [tl_draw], tree2
752
	stdcall [tl_draw], tree2
758
	stdcall pole_draw_pok, pole
753
	stdcall pole_draw_pok, pole
Line 759... Line 754...
759
 
754
 
760
	; *** ᮧ¤ ­¨¥ ª­®¯®ª ãáâ ­®¢ª¨ ᨣ­ «®¢ set_0 ¨ set_1 ***
-
 
761
	mov esi,[sc.work_button]
755
	; *** ᮧ¤ ­¨¥ ª­®¯®ª ãáâ ­®¢ª¨ ᨣ­ «®¢ set_0 ¨ set_1 ***
Line 762... Line 756...
762
	mcall SF_DEFINE_BUTTON, (5 shl 16)+20, (panel_1_coord_top shl 16)+20, 20
756
	mcall SF_DEFINE_BUTTON, (5 shl 16)+20, (panel_1_coord_top shl 16)+20, 20, [sc.work_button]
763
 
757
 
764
	add ebx,25 shl 16
758
	add ebx,25 shl 16
Line 765... Line 759...
765
	mov edx,21
759
	inc edx
766
	int 0x40
760
	int 0x40
767
 
761
 
Line 768... Line 762...
768
	add ebx,30 shl 16
762
	add ebx,30 shl 16
769
	mov edx,22
763
	inc edx
770
	int 0x40
764
	int 0x40
Line 771... Line 765...
771
 
765
 
772
	add ebx,25 shl 16
766
	add ebx,25 shl 16
773
	mov edx,23
767
	inc edx
Line 774... Line 768...
774
	int 0x40
768
	int 0x40
775
 
769
 
776
	add ebx,25 shl 16
770
	add ebx,25 shl 16
Line 777... Line 771...
777
	mov edx,24
771
	inc edx
778
	int 0x40
772
	int 0x40
779
 
773
 
Line 806... Line 800...
806
	add ebx,IMAGE_TOOLBAR_ICON_SIZE
800
	add ebx,IMAGE_TOOLBAR_ICON_SIZE
807
	add edx,(25 shl 16)
801
	add edx,(25 shl 16)
808
	int 0x40
802
	int 0x40
Line 809... Line 803...
809
 
803
 
810
	; *** ᮧ¤ ­¨¥ ª­®¯®ª à¨á®¢ ­¨ï ¯à®¢®¤  ***
-
 
811
	mov esi,[sc.work_button]
804
	; *** ᮧ¤ ­¨¥ ª­®¯®ª à¨á®¢ ­¨ï ¯à®¢®¤  ***
Line 812... Line 805...
812
	mcall SF_DEFINE_BUTTON, (5 shl 16)+20, (panel_2_coord_top shl 16)+20, 30
805
	mcall SF_DEFINE_BUTTON, (5 shl 16)+20, (panel_2_coord_top shl 16)+20, 30, [sc.work_button]
813
 
806
 
814
	add ebx,30 shl 16
807
	add ebx,30 shl 16
Line 1041... Line 1034...
1041
shem_colors:
1034
shem_colors:
1042
	dd color_s0, color_s1, color_s2, color_s3
1035
	dd color_s0, color_s1, color_s2, color_s3
1043
color_captions dd 0x808080
1036
color_captions dd 0x808080
Line 1044... Line 1037...
1044
 
1037
 
1045
align 4
-
 
1046
open_file_lif:
-
 
1047
	rb 2*4096 ;®¡« áâì ¤«ï ®âªàëâ¨ï ä ©«®¢
-
 
1048
.end:
-
 
1049
 
-
 
1050
align 4
1038
align 4
1051
but_open_file:
1039
but_open_file:
1052
	pushad
1040
	pushad
1053
	copy_path open_dialog_name,communication_area_default_path,file_name,0
1041
	copy_path open_dialog_name,communication_area_default_path,file_name,0
1054
	mov [OpenDialog_data.type],0
1042
	mov [OpenDialog_data.type],0
Line 1078... Line 1066...
1078
		mov dword[shem_w],5
1066
		mov dword[shem_w],5
1079
		mov dword[shem_h],5
1067
		mov dword[shem_h],5
Line 1080... Line 1068...
1080
 
1068
 
1081
		mov esi,txt_size
1069
		mov esi,txt_size
1082
		call str_analiz_r
1070
		call str_analiz_r
1083
		cmp edi,0
1071
		or edi,edi
1084
		je @f
1072
		jz @f
1085
			stdcall str_len,esi
1073
			stdcall str_len,esi
1086
			add edi,eax
1074
			add edi,eax
1087
			stdcall conv_str_to_int,edi
1075
			stdcall conv_str_to_int,edi
1088
			cmp eax,5
1076
			cmp eax,5
Line 1102... Line 1090...
1102
		stdcall [tl_node_add], tree1,(el_icon_group shl 16),txt_elements-capt_offs
1090
		stdcall [tl_node_add], tree1,(el_icon_group shl 16),txt_elements-capt_offs
1103
		stdcall [tl_cur_next], tree1
1091
		stdcall [tl_cur_next], tree1
Line 1104... Line 1092...
1104
 
1092
 
1105
		mov esi,txt_elements
1093
		mov esi,txt_elements
1106
		call str_analiz_r
1094
		call str_analiz_r
1107
		cmp edi,0
1095
		or edi,edi
1108
		je .end_elems
1096
		jz .end_elems
1109
			stdcall str_len,esi
1097
			stdcall str_len,esi
1110
			add edi,eax
1098
			add edi,eax
1111
			stdcall conv_str_to_int,edi
1099
			stdcall conv_str_to_int,edi
1112
			cmp eax,0
1100
			cmp eax,0
Line 1414... Line 1402...
1414
		push edx
1402
		push edx
1415
		mov edx,[ebx+offs_cell_x]
1403
		mov edx,[ebx+offs_cell_x]
1416
		inc edx
1404
		inc edx
1417
		push edx
1405
		push edx
1418
		stdcall pole_cell_find, edi
1406
		stdcall pole_cell_find, edi
1419
		cmp eax,0
1407
		or eax,eax
1420
		je @f
1408
		jz @f
1421
			or dword[napr],1
1409
			or dword[napr],1
1422
		@@:
1410
		@@:
Line 1423... Line 1411...
1423
 
1411
 
1424
		mov edx,[ebx+offs_cell_y]
1412
		mov edx,[ebx+offs_cell_y]
1425
		inc edx
1413
		inc edx
1426
		push edx
1414
		push edx
1427
		mov edx,[ebx+offs_cell_x]
1415
		mov edx,[ebx+offs_cell_x]
1428
		push edx
1416
		push edx
1429
		stdcall pole_cell_find, edi
1417
		stdcall pole_cell_find, edi
1430
		cmp eax,0
1418
		or eax,eax
1431
		je @f
1419
		jz @f
1432
			or dword[napr],2
1420
			or dword[napr],2
Line 1433... Line 1421...
1433
		@@:
1421
		@@:
1434
 
1422
 
1435
		mov edx,[ebx+offs_cell_y]
1423
		mov edx,[ebx+offs_cell_y]
1436
		push edx
1424
		push edx
1437
		mov edx,[ebx+offs_cell_x]
1425
		mov edx,[ebx+offs_cell_x]
1438
		dec edx
1426
		dec edx
1439
		push edx
1427
		push edx
1440
		stdcall pole_cell_find, edi
1428
		stdcall pole_cell_find, edi
1441
		cmp eax,0
1429
		or eax,eax
1442
		je @f
1430
		jz @f
Line 1443... Line 1431...
1443
			or dword[napr],4
1431
			or dword[napr],4
1444
		@@:
1432
		@@:
1445
 
1433
 
1446
		mov edx,[ebx+offs_cell_y]
1434
		mov edx,[ebx+offs_cell_y]
1447
		dec edx
1435
		dec edx
1448
		push edx
1436
		push edx
1449
		mov edx,[ebx+offs_cell_x]
1437
		mov edx,[ebx+offs_cell_x]
1450
		push edx
1438
		push edx
1451
		stdcall pole_cell_find, edi
1439
		stdcall pole_cell_find, edi
1452
		cmp eax,0
1440
		or eax,eax
Line 1453... Line 1441...
1453
		je @f
1441
		jz @f
1454
			or dword[napr],8
1442
			or dword[napr],8
Line 1968... Line 1956...
1968
	add ebx,ecx
1956
	add ebx,ecx
1969
	ret
1957
	ret
1970
endp
1958
endp
Line 1971... Line 1959...
1971
 
1959
 
1972
align 4
1960
align 4
1973
proc mem_copy, destination:dword, source:dword, len:dword
-
 
1974
  push ecx esi edi
1961
proc mem_copy uses ecx esi edi, destination:dword, source:dword, len:dword
1975
    cld
1962
	cld
1976
    mov esi, dword[source]
1963
	mov edi,[destination]
1977
    mov edi, dword[destination]
1964
	mov esi,[source]
1978
    mov ecx, dword[len]
1965
	mov ecx,[len]
1979
    rep movsb
-
 
1980
  pop edi esi ecx
1966
	rep movsb
1981
  ret
1967
	ret
Line 1982... Line 1968...
1982
endp
1968
endp
1983
 
1969
 
Line 2288... Line 2274...
2288
		mov ecx,[icon]
2274
		mov ecx,[icon]
2289
		shl ecx,12 ;㬭®¦ ¥¬ ­  4 ª¡
2275
		shl ecx,12 ;㬭®¦ ¥¬ ­  4 ª¡
2290
		add ecx,[buf_curs.data]
2276
		add ecx,[buf_curs.data]
2291
		mcall SF_MOUSE_GET,SSF_LOAD_CURSOR
2277
		mcall SF_MOUSE_GET,SSF_LOAD_CURSOR
Line 2292... Line 2278...
2292
 
2278
 
2293
		cmp eax,0
2279
		or eax,eax
2294
		je @f
2280
		jz @f
2295
			mov [cursor_pointer],eax
2281
			mov [cursor_pointer],eax
2296
			mcall SF_MOUSE_GET,SSF_SET_CURSOR,[cursor_pointer]
2282
			mcall SF_MOUSE_GET,SSF_SET_CURSOR,[cursor_pointer]
2297
	@@:
2283
	@@:
2298
	ret
2284
	ret
Line 2337... Line 2323...
2337
.end:
2323
.end:
2338
db 0
2324
db 0
Line 2339... Line 2325...
2339
 
2325
 
Line 2340... Line -...
2340
include 'le_libs.inc'
-
 
2341
 
-
 
2342
mouse_dd dd 0x0
-
 
2343
sc system_colors
-
 
2344
last_time dd 0
-
 
2345
 
-
 
2346
 
-
 
2347
 
-
 
2348
align 16
-
 
2349
procinfo process_information
2326
include 'le_libs.inc'
2350
 
2327
 
2351
align 4
2328
align 4
2352
buf_0: dd 0 ;
2329
buf_0: dd 0 ;
2353
.l: dw 170 ;+4 left
2330
.l: dw 170 ;+4 left
Line 2358... Line 2335...
2358
	db 24 ;+20 bit in pixel
2335
	db 24 ;+20 bit in pixel
Line 2359... Line 2336...
2359
 
2336
 
2360
align 4
2337
align 4
2361
buf_font: ;¡ãä¥à á® èà¨ä⮬
2338
buf_font: ;¡ãä¥à á® èà¨ä⮬
2362
	dd 0 ;㪠§ â¥«ì ­  ¡ãä¥à ¨§®¡à ¦¥­¨ï
2339
	dd 0 ;㪠§ â¥«ì ­  ¡ãä¥à ¨§®¡à ¦¥­¨ï
2363
	dw 25 ;+4 left
-
 
2364
	dw 25 ;+6 top
2340
	dw 25,25 ;+4 left,top
2365
	dd 96 ;+8 w
2341
	dd 96 ;+8 w
2366
	dd 144 ;+12 h
2342
	dd 144 ;+12 h
2367
	dd 0 ;+16 color
2343
	dd 0 ;+16 color
Line 2368... Line 2344...
2368
	db 24 ;+20 bit in pixel
2344
	db 24 ;+20 bit in pixel
2369
 
2345
 
2370
align 4
2346
align 4
2371
buf_curs: ;¡ãä¥à á ªãàá®à ¬¨
2347
buf_curs: ;¡ãä¥à á ªãàá®à ¬¨
2372
.data: dd 0 ;㪠§ â¥«ì ­  ¡ãä¥à ¨§®¡à ¦¥­¨ï
-
 
2373
	dw 0 ;+4 left
2348
.data: dd 0 ;㪠§ â¥«ì ­  ¡ãä¥à ¨§®¡à ¦¥­¨ï
2374
	dw 0 ;+6 top
2349
	dw 0,0 ;+4 left,top
2375
	dd 32 ;+8 w
2350
	dd 32 ;+8 w
2376
	dd 32*cursors_count ;+12 h
2351
	dd 32*cursors_count ;+12 h
Line 2377... Line 2352...
2377
	dd 0 ;+16 color
2352
	dd 0 ;+16 color
2378
	db 24 ;+20 bit in pixel
2353
	db 24 ;+20 bit in pixel
2379
 
2354
 
2380
align 4
2355
align 4
2381
buf_curs_8: ;¡ãä¥à á ªãàá®à ¬¨
-
 
2382
.data: dd 0 ;㪠§ â¥«ì ­  ¡ãä¥à ¨§®¡à ¦¥­¨ï
2356
buf_curs_8: ;¡ãä¥à á ªãàá®à ¬¨
2383
	dw 0 ;+4 left
2357
.data: dd 0 ;㪠§ â¥«ì ­  ¡ãä¥à ¨§®¡à ¦¥­¨ï
2384
	dw 0 ;+6 top
2358
	dw 0,0 ;+4 left,top
2385
	dd 32 ;+8 w
2359
	dd 32 ;+8 w
Line 2616... Line 2590...
2616
	stosb	    ;§ ¯¨á âì í«¥¬¥­â ¨§ ॣ¨áâà  al ¢ ï祪㠯 ¬ï⨠es:edi
2590
	stosb	    ;§ ¯¨á âì í«¥¬¥­â ¨§ ॣ¨áâà  al ¢ ï祪㠯 ¬ï⨠es:edi
2617
	ret	      ;¢¥à­ãâìáï ®ç¥­ì ¨­â¥à¥á­ë© 室 â.ª. ¯®ª  ¢ á⥪¥ åà ­¨âìáï ª®«-¢® ¢ë§®¢®¢ â® á⮫쪮 à § ¬ë ¨ ¡ã¤¥¬ ¢ë§ë¢ âìáï
2591
	ret	      ;¢¥à­ãâìáï ®ç¥­ì ¨­â¥à¥á­ë© 室 â.ª. ¯®ª  ¢ á⥪¥ åà ­¨âìáï ª®«-¢® ¢ë§®¢®¢ â® á⮫쪮 à § ¬ë ¨ ¡ã¤¥¬ ¢ë§ë¢ âìáï
Line 2618... Line 2592...
2618
 
2592
 
2619
align 16
2593
align 16
-
 
2594
i_end:
-
 
2595
	image_data_toolbar dd 0
-
 
2596
	icon_tl_sys dd 0 ;㪠§ â¥«ì ­  ¯ ¬ïâì ¤«ï åà ­¥­¨ï á¨á⥬­ëå ¨ª®­®ª
-
 
2597
	icon_toolbar dd 0 ;㪠§ â¥«ì ­  ¯ ¬ïâì ¤«ï åà ­¥­¨ï ¨ª®­®ª ®¡ê¥ªâ®¢
-
 
2598
	image_data_gray dd 0 ;¯ ¬ïâì á ¢à¥¬¥­­ë¬¨ á¥à묨 ¨§®¡à ¦¥­¨ï¬¨ ¢ ä®à¬ â¥ 24-bit, ¨§ ª®â®àëå ¡ã¤ãâ ᮧ¤ ¢ âìáï âà ä à¥âë
-
 
2599
	mouse_dd dd 0
-
 
2600
	last_time dd 0
-
 
2601
	sc system_colors
2620
i_end:
2602
	procinfo process_information
-
 
2603
	run_file_70 FileInfoBlock
-
 
2604
	open_file_lif:
-
 
2605
		rb 2*4096 ;®¡« áâì ¤«ï ®âªàëâ¨ï ä ©«®¢
2621
	run_file_70 FileInfoBlock
2606
	.end:
2622
	rb 1024
2607
	rb 1024
2623
stacktop:
2608
stacktop:
2624
	sys_path rb 1024
-
 
2625
	file_name:
2609
	sys_path rb 1024
2626
		rb 1024 ;4096
-
 
2627
	library_path rb 1024
2610
	file_name rb 2048 ;4096
2628
	plugin_path rb 4096
2611
	plugin_path rb 4096
2629
	openfile_path rb 4096
2612
	openfile_path rb 4096
2630
	filename_area rb 256
2613
	filename_area rb 256