Subversion Repositories Kolibri OS

Rev

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

Rev 605 Rev 633
Line 4... Line 4...
4
    mov        ebx, 00100111b
4
    mov        ebx, 00100111b
5
    int        0x40
5
    int        0x40
Line 6... Line 6...
6
 
6
 
Line 7... Line 7...
7
    ;call       draw_ctx_menu
7
    ;call       draw_ctx_menu
8
 
-
 
-
 
8
 
9
    mov        ebp, 2		; 2 ÷àñòî èñïîëüçóåòñÿ.
9
    mov        ebp, 2		; 2 ç áâ® ¨á¯®«ì§ã¥âáï.
10
 
10
; // Alver 26.08.2007 // {
11
    xor        ecx, ecx
11
;    xor        ecx, ecx
12
    mov        edx, [ctx_menu_PID]
12
;    mov        edx, [ctx_menu_PID]
13
  find_slot:
-
 
14
    inc        ecx
13
;  find_slot:
15
 
14
;    inc        ecx
16
    mov        eax, 9
15
;    mov        eax, 9
17
    mov        ebx, process_info_buffer
-
 
18
    int        0x40
16
;    mov        ebx, process_info_buffer
19
 
17
;    int        0x40
-
 
18
;    cmp        dword [process_info_buffer + 30], edx
-
 
19
;    jne        find_slot
-
 
20
    mov        ecx, [ctx_menu_PID]
20
    cmp        dword [process_info_buffer + 30], edx
21
    mcall      18,21
21
    jne        find_slot
22
    mov        ecx, eax
22
 
23
; } \\ Alver \\
23
    mov        eax, 18
24
    mov        eax, 18
24
    mov        ebx, 3
25
    mov        ebx, 3
Line 48... Line 49...
48
 
49
 
49
  ctx_menu_button:
50
  ctx_menu_button:
50
    mov        eax, 17
51
    mov        eax, 17
51
    int        0x40
52
    int        0x40
-
 
53
    cmp        ah, 1
52
    cmp        ah, 1
54
; // Alver 26.08.2007 // {
-
 
55
;    jne        ctx_menu_still
-
 
56
    jne        @f
53
    jne        ctx_menu_still
57
; } \\ Alver \\
54
    mov        eax, 18
58
    mov        eax, 18
55
    mov        ebx, ebp 	; mov     eax, 2
59
    mov        ebx, ebp 	; mov     eax, 2
-
 
60
    mov        ecx, [n_slot]
-
 
61
; // Alver 26.08.2007 // {
56
    mov        ecx, [n_slot]
62
    jmp        .lllxxx
-
 
63
@@:
-
 
64
    cmp        ah, 2
-
 
65
    jne        ctx_menu_still
-
 
66
    mov        eax, 18
-
 
67
    mov        ebx, 22
-
 
68
    mov        edx, [n_slot]
-
 
69
    xor        ecx, ecx
-
 
70
; \begin{diamond}[20.09.2007]
-
 
71
    test       byte [procinfo_for_detect+70], 2
-
 
72
    setnz      cl
-
 
73
    add        cl, cl
-
 
74
; \end{diamond}[20.09.2007]
-
 
75
  .lllxxx:
57
 
76
; } \\ Alver \\
58
    int        0x40
77
    int        0x40
Line 59... Line 78...
59
    jmp        ctx_menu_exit
78
    jmp        ctx_menu_exit
60
 
79
 
61
  ctx_menu_mouse:
80
  ctx_menu_mouse:
62
    mov        eax, 37
81
    mov        eax, 37
Line 63... Line 82...
63
    mov        ebx, ebp 	; mov     ebx, 2
82
    mov        ebx, ebp 	; mov     ebx, 2
64
    int        0x40
83
    int        0x40
65
 
84
 
Line 66... Line 85...
66
    xchg       eax, ecx 	; cmp     eax, 0  Åñëè íå îäíà èç êíîïîê íå íàæàòà âîçâðàùàåìñÿ
85
    xchg       eax, ecx 	; cmp     eax, 0  …᫨ ­¥ ®¤­  ¨§ ª­®¯®ª ­¥ ­ ¦ â  ¢®§¢à é ¥¬áï
67
				;                 â ãëàâíûé öèêë ïîòîêà
86
				;                 ¢ £« ¢­ë© 横« ¯®â®ª 
68
    jecxz      ctx_menu_still
87
    jecxz      ctx_menu_still
69
 
88
 
Line 70... Line 89...
70
    mov        eax, 37
89
    mov        eax, 37
71
    xor        ebx, ebx 	; mov     ebx, 1
90
    xor        ebx, ebx 	; mov     ebx, 1
72
    inc        ebx
91
    inc        ebx
73
    int        0x40
92
    int        0x40
74
 
93
 
75
    cmp        ax, 0		; Òóò ïðîâåðÿåì ïðîèçîø¸ë-ëè êëèê çà ïðåäåëàìè îêíà êîíòåêñòíîãî
94
    cmp        ax, 0		; ’ã⠯஢¥à塞 ¯à®¨§®èñ«-«¨ ª«¨ª §  ¯à¥¤¥« ¬¨ ®ª­  ª®­â¥ªáâ­®£®
76
    jb	       ctx_menu_exit	; ìåíþ, åñëè çà ïðåäåëàìè òî çàêðûâàåì êîíòåêñòíîå ìåíþ
95
    jb	       ctx_menu_exit	; ¬¥­î, ¥á«¨ §  ¯à¥¤¥« ¬¨ â® § ªà뢠¥¬ ª®­â¥ªáâ­®¥ ¬¥­î
77
    cmp        ax, 41
96
    cmp        ax, 60           ; 41
Line 99... Line 118...
99
    xor        eax, eax 	; mov        eax, 0
118
    xor        eax, eax 	; mov        eax, 0
100
    movzx      ebx, [x_coord]
119
    movzx      ebx, [x_coord]
101
    shl        ebx, 16
120
    shl        ebx, 16
102
    add        ebx, 133
121
    add        ebx, 133
103
    movzx      ecx, [y_coord]
122
    movzx      ecx, [y_coord]
104
    sub        ecx, 41
123
    sub        ecx, 60         ; 41
105
    shl        ecx, 16
124
    shl        ecx, 16
106
    add        ecx, 41
125
    add        ecx, 60         ; 41
107
    mov        edx, [system_colours + 20]    ; sc.work
126
    mov        edx, [system_colours + 20]    ; sc.work
108
    mov        esi, [system_colours + 4]     ; sc.grab
127
    mov        esi, [system_colours + 4]     ; sc.grab
109
    or	       esi, 0x81000000
128
    or	       esi, 0x81000000
110
    mov        edi, [system_colours]	     ; sc.frame
129
    mov        edi, [system_colours]	     ; sc.frame
111
    int        0x40
130
    int        0x40
Line 112... Line 131...
112
 
131
 
113
    mov        eax, 8
132
    mov        eax, 8
114
    mov        ebx, 0 * 65536 + 133
133
    mov        ebx, 0 * 65536 + 133
115
    mov        ecx, 22 * 65536 + 18
134
    mov        ecx, 22 * 65536 + 16
116
    mov        edx, 0x40000001
135
    mov        edx, 0x40000001
Line -... Line 136...
-
 
136
    int        0x40
-
 
137
 
-
 
138
    mov        eax, 8
-
 
139
    mov        ebx, 0 * 65536 + 133
-
 
140
    mov        ecx, 40 * 65536 + 18
-
 
141
    mov        edx, 0x40000002
117
    int        0x40
142
    int        0x40
118
 
143
 
119
    shr        eax, 1	; mov   eax, 4
144
    shr        eax, 1	; mov   eax, 4
120
    mov        ebx, 36 * 65536 + 7
145
    mov        ebx, 36 * 65536 + 7
Line 121... Line 146...
121
    mov        ecx, [system_colours + 16]    ; sc.grab_text
146
    mov        ecx, [system_colours + 16]    ; sc.grab_text
-
 
147
    or	       ecx, 0x10000000
122
    or	       ecx, 0x10000000
148
 
123
 
149
    mov        edx, ctx_menu_title
Line 124... Line 150...
124
    mov        edx, ctx_menu_title
150
 
125
    mov        esi, ctx_menu_title_end - ctx_menu_title
151
    mov        esi, ctx_menu_title_end - ctx_menu_title
Line 126... Line 152...
126
    int        0x40
152
    int        0x40
127
 
153
 
128
    add        ebx, 1 * 65536
154
    add        ebx, 1 * 65536
129
    int        0x40
155
    int        0x40
130
 
156
 
-
 
157
    mov        ebx, 4 * 65536 + 28
-
 
158
    mov        ecx, 0x80000000
-
 
159
    mov        edx, ctx_menu_text
-
 
160
; // Alver 26.08.2007 // {
-
 
161
    int        0x40
-
 
162
    add        bx, 18
131
    mov        ebx, 4 * 65536 + 28
163
    mov        edx, ctx_menu_text2
-
 
164
; \begin{diamond}[20.09.2007]
-
 
165
    test       byte [procinfo_for_detect+70], 2
-
 
166
    jz         @f
132
    xor        ecx, ecx 	; mov        ecx, 0x00000000
167
    mov        edx, ctx_menu_text3
133
    mov        edx, ctx_menu_text
168
@@:
134
    mov        esi, ctx_menu_text_end - ctx_menu_text
169
; \end{diamond}[20.09.2007]
Line 135... Line 170...
135
    int        0x40
170
    int        0x40
Line 144... Line 179...
144
 
179
 
145
x_coord rw	1
180
x_coord rw	1
146
y_coord rw	1
181
y_coord rw	1
147
n_slot	rd	1
182
n_slot	rd	1
148
lsz ctx_menu_text,\
183
lsz ctx_menu_text,\
149
  ru, "X ‡ ªàëâì    Alt + F4",\
184
  ru, <"X ‡ ªàëâì    Alt + F4",0>,\
150
  en, "X Close      Alt + F4",\
185
  en, <"X Close      Alt + F4",0>,\
-
 
186
  et, <"X Sulge      Alt + F4",0>      ; Now correct
-
 
187
; // Alver 26.08.2007 // {
-
 
188
lsz ctx_menu_text2,\
-
 
189
  ru, <25," ‘¢¥à­ãâì           ",0>,\
151
  et, "X Sulge      Alt + F4"	   ; Now correct
190
  en, <25," Minimize           ",0>,\
-
 
191
; } \\ Alver \\
152
 
192
; \begin{diamond}[20.09.2007]
-
 
193
lsz ctx_menu_text3,\
-
 
194
  ru, <24," ‚®ááâ ­®¢¨âì       ",0>,\
-
 
195
  en, <24," Restore            ",0>
153
ctx_menu_text_end:
196
; \end{diamond}[20.09.2007]
Line 154... Line 197...
154
ctx_menu_PID	rd	1
197
ctx_menu_PID	rd	1
155
 
198
 
156
ctx_menu_title:
199
ctx_menu_title:
157
	db	'KolibriOS'
200
	db	'KolibriOS'