Subversion Repositories Kolibri OS

Rev

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

Rev 1219 Rev 1417
Line 1... Line 1...
1
;*****************************************************************************
1
;*****************************************************************************
2
; Macro for use Open Dialog - for Kolibri OS
2
; Macro for use Open Dialog - for Kolibri OS
3
; Copyright (c) 2009, Marat Zakiyanov aka Mario79, aka Mario
3
; Copyright (c) 2009 2010, Marat Zakiyanov aka Mario79, aka Mario
4
; All rights reserved.
4
; All rights reserved.
5
;
5
;
6
; Redistribution and use in source and binary forms, with or without
6
; Redistribution and use in source and binary forms, with or without
7
; modification, are permitted provided that the following conditions are met:
7
; modification, are permitted provided that the following conditions are met:
8
;	 * Redistributions of source code must retain the above copyright
8
;	 * Redistributions of source code must retain the above copyright
Line 33... Line 33...
33
}
33
}
34
;*****************************************************************************
34
;*****************************************************************************
35
macro	use_OpenDialog
35
macro	use_OpenDialog
36
{
36
{
37
OpenDialog:
37
OpenDialog:
38
od_type			equ dword [ebp]
38
od_type			equ dword [ebp] ; 0-Open, 1-Save, 2-Dir
39
od_procinfo		equ dword [ebp+4]
39
od_procinfo		equ dword [ebp+4] ; Process info area for function 9
40
od_com_area_name	equ dword [ebp+8]
40
od_com_area_name	equ dword [ebp+8] ; Name for shared area
41
od_com_area		equ dword [ebp+12]
41
od_com_area		equ dword [ebp+12] ; Adress of shared area
42
od_opendir_pach		equ dword [ebp+16]
42
od_opendir_pach		equ dword [ebp+16] ; Temp area the directory for show
43
od_dir_default_pach	equ dword [ebp+20]
43
od_dir_default_pach	equ dword [ebp+20] ; Default path of directory, 
44
od_start_path		equ dword [ebp+24]
44
od_start_path		equ dword [ebp+24] ; Location path to OpenDialog
45
od_draw_window		equ dword [ebp+28]
45
od_draw_window		equ dword [ebp+28] ; Adress of  procedure - draw_window
46
od_status		equ dword [ebp+32]
46
od_status		equ dword [ebp+32] ; 0-Cancel, 1-Get path OK, 2-Use alternatives
47
od_openfile_pach	equ dword [ebp+36]
47
od_openfile_pach	equ dword [ebp+36] ; Getting path to file
48
;*****************************************************************************
48
;*****************************************************************************
49
.init:
49
.init:
50
	pusha
50
	pusha
51
	mcall	9, od_procinfo, -1
51
	mcall	9, od_procinfo, -1
52
	mov	ebx,[ebx+30]
52
	mov	ebx,[ebx+30]
53
	mov	edi,od_com_area_name
53
	mov	edi,od_com_area_name
54
	add	edi,7
54
	add	edi,7
55
;	mov	edi,communication_area_name+7
-
 
56
	std
55
	std
57
	mov	ecx,4
56
	mov	ecx,4
58
@@:
57
@@:
59
	mov	al,bl
58
	mov	al,bl
60
	and	al,1111b
59
	and	al,1111b
Line 78... Line 77...
78
.start:
77
.start:
79
	pusha
78
	pusha
80
	mov	eax,od_com_area
79
	mov	eax,od_com_area
81
	test	eax,eax
80
	test	eax,eax
82
	jz	.1
81
	jz	.1
-
 
82
	mov ebx,od_type
-
 
83
	mov [eax+2],bx
-
 
84
	
83
	mov	[eax],dword 2 ; folder for open
85
	mov	[eax],word 2 ; folder for open
84
	mov	edi,eax
86
	mov	edi,eax
85
	add	edi,4
87
	add	edi,4
Line 86... Line 88...
86
 
88
 
87
	mov	esi,od_opendir_pach
89
	mov	esi,od_opendir_pach
Line 111... Line 113...
111
.still:
113
.still:
112
	mcall	23, 50
114
	mcall	23, 50
113
	cmp	eax,1
115
	cmp	eax,1
114
	je	.red
116
	je	.red
115
	mov	eax,od_com_area
117
	mov	eax,od_com_area
116
	mov	ebx,[eax]
118
	movzx	ebx,word [eax]
117
	test	ebx,ebx
119
	test	ebx,ebx
118
	jz	.still
120
	jz	.still
119
	cmp	ebx,3
121
	cmp	ebx,3
120
	je	.2 ;still
122
	je	.2 ;still
121
	cmp	ebx,1
123
	cmp	ebx,1