Subversion Repositories Kolibri OS

Rev

Rev 4336 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
3853 GerdtR 1
proc MovingWnd
2
local MySlot:DWORD
4336 GerdtR 3
	mcall	40,0	;SetMaskMessage 000b
3853 GerdtR 4
 
4336 GerdtR 5
	mcall	12,1	;RedrawWinBeg
3853 GerdtR 6
 
4336 GerdtR 7
	mcall	14
8
	xor	ebx,ebx
9
	xor	ecx,ecx
10
	mov	cx,ax
11
	shr	eax,16
12
	mov	cx,ax
13
	dec	ebx
14
	dec	ecx
15
	mcall	0,,,01000000h
16
	mcall	12,2	;RedrawWinEnd
3853 GerdtR 17
 
18
 
4336 GerdtR 19
	mov	eax,[SelIcon]
20
	call	DrawIconToArea
3853 GerdtR 21
 
4336 GerdtR 22
	mcall	37,4,IconArea,10100002h
23
	push	eax
24
	test	eax,eax
25
	jz	@f
26
	mov	ecx,eax
27
	mcall	37,5
3853 GerdtR 28
 
29
     @@:
4336 GerdtR 30
	mcall	9,RBProcInfo,-1    ;+30
31
	mcall	18,21,dword[RBProcInfo+30]
32
	mov	[MySlot],eax
3853 GerdtR 33
 
34
  .messages:
4336 GerdtR 35
	cmp	[MovingActiv],1
36
	jne	.close
37
	mcall	18,7
38
	cmp	eax,[MySlot]
39
	je	@f
40
	mcall	18,3,[MySlot]
3853 GerdtR 41
     @@:
42
 
4336 GerdtR 43
	mcall	5,1	;Yield
44
	jmp	.messages
3853 GerdtR 45
 
46
.close:
4336 GerdtR 47
	pop	ecx
48
	test	ecx,ecx
49
	jz	@f
50
	mcall	37,6
3853 GerdtR 51
     @@:
52
 
53
 
4336 GerdtR 54
	mcall	-1
3853 GerdtR 55
 
56
endp
57
 
58
 
59
 
60
;eax = NumIcon
61
proc DrawIconToArea  ;предназначен для иконок размером = 32x32
4336 GerdtR 62
	push	edi esi
3853 GerdtR 63
 
4336 GerdtR 64
	;mov     eax,[NumIcon]
65
	mov	edi,[IconsOffs+eax*4]
66
	xor	al,al
67
	or	ecx,-1
68
	repne	scasb
69
	repne	scasb
70
	repne	scasb
8942 leency 71
	stdcall strToInt,edi
72
 
4336 GerdtR 73
     @@:	     ;eax=num icon
74
	cmp	eax,[icon_count]
75
	jb	@f
76
	xor	eax,eax
3853 GerdtR 77
     @@:
4336 GerdtR 78
	test	eax,eax
79
	je	.DIA
80
	mov	ecx,eax
81
	xor	eax,eax
3853 GerdtR 82
      @@:
4336 GerdtR 83
	add	eax,32*32*4;IMG_SIZE*IMG_SIZE*4
84
	loop	@b
3853 GerdtR 85
     .DIA:
4336 GerdtR 86
	mov	esi,eax
87
	add	esi,[raw_pointer]
88
	add	esi,44
3853 GerdtR 89
 
4336 GerdtR 90
	mov	edi,IconArea;+((IMAGE_TOP_Y*ICON_SIZE)+((ICON_SIZE-IMG_SIZE)/2))*4
3853 GerdtR 91
;int3
4336 GerdtR 92
	mov	eax,32;IMG_SIZE
93
	mov	edx,eax
3853 GerdtR 94
      @@:
4336 GerdtR 95
	mov	ecx,eax
96
	rep	movsd
3853 GerdtR 97
     ;   add     edi,32*4
4336 GerdtR 98
	dec	edx
99
	jnz	@b
3853 GerdtR 100
 
4336 GerdtR 101
	pop	esi edi
102
	ret
3853 GerdtR 103
endp