Subversion Repositories Kolibri OS

Rev

Rev 682 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
648 andrew_pro 1
 
2
im_redraw_all                  = 10000000b
3
im_redraw_all_off              = 01111111b
4
;im_special_redraw_on           = 00000001b
675 andrew_pro 5
;im_special_redraw_off          = 11111110b
6
648 andrew_pro 7
 
8
;*******************craete Image**********************
9
;****************************************************
10
;IN
11
;pointer to parend
12
;pointer to Image's structure
13
;OUT
14
;pointer to initialized Image's structure
15
align 4
16
17
 
18
19
 
706 andrew_pro 20
      push ecx
21
      push edx
22
      push esi
23
      push edi
24
      push ebp
25
648 andrew_pro 26
 
706 andrew_pro 27
      mov eax,[esp+24+8]
28
29
 
648 andrew_pro 30
31
 
32
      call craete_control
33
34
 
35
      mov [eax],dword image
36
37
 
38
      mov esi,[PointerToStructureForImage]
39
      mov edi,eax
40
      add edi,control_header_size
41
      rep movsb
42
43
 
44
45
 
46
      mov ecx,[ebx+6]   ;x
47
      mov edx,[ebx+10]  ;y
48
      mov esi,[ebx+14]  ;size x
49
      mov edi,[ebx+18]  ;size y
50
      add ecx,border_width
51
      add edx,[skin_height]
52
      ;copy information to control
53
      mov [eax+24],ecx
54
      mov [eax+28],edx
55
      mov [eax+32],esi
56
      mov [eax+36],edi
57
58
 
706 andrew_pro 59
      pop edi
60
      pop esi
61
      pop edx
62
      pop ecx
63
      pop ebx
64
65
 
648 andrew_pro 66
67
 
68
;********************Draw Image**********************
69
;****************************************************
70
;IN
71
;pointer to control of button
72
;message
73
;OUT
74
;not returned value
75
align 4
76
77
 
78
79
 
80
      mov eax,[esp+8]
81
82
 
83
      mov esi,[esp+4]
84
      mov [PointerForImage],esi
85
      ;copy control to local control
86
      add esi,control_header_size
87
      mov edi,dword Image
88
      mov ecx,im_control_data_size
89
      rep movsb
90
91
 
92
 
93
      jne no_redraw_all_image
94
95
 
96
      no_redraw_all_image:
97
98
 
99
      jne no_special_message_image
100
101
 
102
       mov al,[Image.type]
103
       and al,activate_trap
675 andrew_pro 104
       test al,al
648 andrew_pro 105
       jz no_activate_redraw_image
106
107
 
675 andrew_pro 108
         or [Image.type],im_redraw_all
648 andrew_pro 109
       no_activate_redraw_image:
110
111
 
112
113
 
114
      mov eax,[PointerForImage]
115
      mov ebx,[eax+24]           ;x
116
      mov ecx,[eax+28]           ;y
117
      mov edx,[eax+32]           ;size x
118
      mov esi,[eax+36]           ;size y
119
      ;set current coordinats and sizes in zakladka
120
      mov [Image.x],ebx
121
      mov [Image.y],ecx
122
      mov [Image.sizex],edx
123
      mov [Image.sizey],esi
124
125
 
126
      mov al,[Image.type]
127
      and al,im_redraw_all
128
      test al,al
129
      jz no_redraw_image_
130
131
 
132
133
 
134
       mov edi,[PointerForImage]
135
       add edi,control_header_size
136
       mov ecx,2
137
       rep movsb
138
139
 
140
       mov ebx,[Image.pointer]
141
       mov ecx,[Image.sizex]
142
       shl ecx,16
143
       add ecx,[Image.sizey]
144
       mov edx,[Image.x]
145
       shl edx,16
146
       add edx,[Image.y]
147
       mcall
148
149
 
150
151
 
152
153
 
682 andrew_pro 154
      add edi,control_header_size
155
      mov esi,dword Image
156
      mov ecx,im_control_data_size
157
      rep movsb
158
159
 
648 andrew_pro 160