Rev 5452 | Rev 9465 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5452 | Rev 6179 | ||
---|---|---|---|
1 | ;------------------------------------------------------------------------------ |
1 | ;------------------------------------------------------------------------------ |
2 | align 4 |
2 | align 4 |
3 | context_menu_start: |
3 | context_menu_start: |
4 | mcall 40,00100111b |
4 | mcall 40,00100111b |
5 | mov ecx, [ctx_menu_PID] |
5 | mov ecx, [ctx_menu_PID] |
6 | mcall 18,21 |
6 | mcall 18,21 |
7 | mov ecx, eax |
7 | mov ecx, eax |
8 | mcall 18,3 |
8 | mcall 18,3 |
9 | call draw_ctx_menu |
9 | call draw_ctx_menu |
10 | ;------------------------------------------------------------------------------ |
10 | ;------------------------------------------------------------------------------ |
11 | align 4 |
11 | align 4 |
12 | ctx_menu_still: |
12 | ctx_menu_still: |
13 | mcall 10 |
13 | mcall 10 |
14 | cmp eax, 2 |
14 | cmp eax, 2 |
15 | jz ctx_menu_key |
15 | jz ctx_menu_key |
16 | 16 | ||
17 | cmp eax, 3 |
17 | cmp eax, 3 |
18 | jz ctx_menu_button |
18 | jz ctx_menu_button |
19 | 19 | ||
20 | cmp eax, 6 |
20 | cmp eax, 6 |
21 | jz ctx_menu_mouse |
21 | jz ctx_menu_mouse |
22 | 22 | ||
23 | call draw_ctx_menu |
23 | call draw_ctx_menu |
24 | jmp ctx_menu_still |
24 | jmp ctx_menu_still |
25 | ;------------------------------------------------------------------------------ |
25 | ;------------------------------------------------------------------------------ |
26 | align 4 |
26 | align 4 |
27 | ctx_menu_mouse: |
27 | ctx_menu_mouse: |
28 | mcall 37,2 |
28 | mcall 37,2 |
29 | xchg eax,ecx ; ᫨ ¥ ®¤ ¨§ ª®¯®ª ¥ ¦ â ¢®§¢à é ¥¬áï |
29 | xchg eax,ecx ; ᫨ ¥ ®¤ ¨§ ª®¯®ª ¥ ¦ â ¢®§¢à é ¥¬áï |
30 | ; ¢ £« ¢ë© 横« ¯®â®ª |
30 | ; ¢ £« ¢ë© 横« ¯®â®ª |
31 | jecxz ctx_menu_still |
31 | jecxz ctx_menu_still |
32 | 32 | ||
33 | mcall 37,1 |
33 | mcall 37,1 |
34 | 34 | ||
35 | cmp ax, 0 ; ã⠯஢¥à塞 ¯à®¨§®èñ«-«¨ ª«¨ª § ¯à¥¤¥« ¬¨ ®ª ª®â¥ªá⮣® |
35 | cmp ax, 0 ; ã⠯஢¥à塞 ¯à®¨§®èñ«-«¨ ª«¨ª § ¯à¥¤¥« ¬¨ ®ª ª®â¥ªá⮣® |
36 | jb ctx_menu_exit ; ¬¥î, ¥á«¨ § ¯à¥¤¥« ¬¨ â® § ªàë¢ ¥¬ ª®â¥ªá⮥ ¬¥î |
36 | jb ctx_menu_exit ; ¬¥î, ¥á«¨ § ¯à¥¤¥« ¬¨ â® § ªàë¢ ¥¬ ª®â¥ªá⮥ ¬¥î |
37 | 37 | ||
38 | cmp ax, 60 ; 41 |
38 | cmp ax, 60 ; 41 |
39 | ja ctx_menu_exit |
39 | ja ctx_menu_exit |
40 | 40 | ||
41 | shr eax, 16 |
41 | shr eax, 16 |
42 | cmp ax, 0 |
42 | cmp ax, 0 |
43 | jb ctx_menu_exit |
43 | jb ctx_menu_exit |
44 | 44 | ||
45 | cmp ax, 133 |
45 | cmp ax, 133 |
46 | ja ctx_menu_exit |
46 | ja ctx_menu_exit |
47 | 47 | ||
48 | jmp ctx_menu_still |
48 | jmp ctx_menu_still |
49 | ;------------------------------------------------------------------------------ |
49 | ;------------------------------------------------------------------------------ |
50 | align 4 |
50 | align 4 |
51 | ctx_menu_key: |
51 | ctx_menu_key: |
52 | mcall 2 |
52 | mcall 2 |
53 | ;-------------------------------------- |
53 | ;-------------------------------------- |
54 | align 4 |
54 | align 4 |
55 | ctx_menu_button: |
55 | ctx_menu_button: |
56 | mcall 17 |
56 | mcall 17 |
57 | cmp ah, 1 |
57 | cmp ah, 1 |
58 | jne @f |
58 | jne @f |
59 | 59 | ||
60 | ; mov eax, 18 |
60 | ; mov eax, 18 |
61 | ; mov ebx, 2 |
61 | ; mov ebx, 2 |
62 | ; mov ecx, [n_slot] |
62 | ; mov ecx, [n_slot] |
63 | ; jmp .lllxxx |
63 | ; jmp .lllxxx |
64 | mcall 18,3,[n_slot] |
64 | mcall 18,3,[n_slot] |
65 | mcall 72,1,3,1 |
65 | mcall 72,1,3,1 |
66 | mcall 68,1 |
66 | mcall 68,1 |
67 | jmp ctx_menu_exit |
67 | jmp ctx_menu_exit |
68 | ;-------------------------------------- |
68 | ;-------------------------------------- |
69 | align 4 |
69 | align 4 |
70 | @@: |
70 | @@: |
71 | cmp ah, 2 |
71 | cmp ah, 2 |
72 | jne ctx_menu_still |
72 | jne ctx_menu_still |
73 | mov eax, 18 |
73 | mov eax, 18 |
74 | mov ebx, 22 |
74 | mov ebx, 22 |
75 | mov edx, [n_slot] |
75 | mov edx, [n_slot] |
76 | xor ecx, ecx |
76 | xor ecx, ecx |
77 | 77 | ||
78 | test [procinfo_for_detect+70],byte 2 |
78 | test [procinfo_for_detect+70],byte 2 |
79 | setnz cl |
79 | setnz cl |
80 | add cl, cl |
80 | add cl, cl |
81 | ;-------------------------------------- |
81 | ;-------------------------------------- |
82 | align 4 |
82 | align 4 |
83 | .lllxxx: |
83 | .lllxxx: |
84 | mcall |
84 | mcall |
85 | jmp ctx_menu_exit |
85 | jmp ctx_menu_exit |
86 | ;-------------------------------------- |
86 | ;-------------------------------------- |
87 | align 4 |
87 | align 4 |
88 | ctx_menu_exit: |
88 | ctx_menu_exit: |
89 | or eax,-1 |
89 | or eax,-1 |
90 | mcall |
90 | mcall |
91 | ;------------------------------------------------------------------------------ |
91 | ;------------------------------------------------------------------------------ |
92 | align 4 |
92 | align 4 |
93 | ;func draw_ctx_menu |
93 | ;func draw_ctx_menu |
94 | draw_ctx_menu: |
94 | draw_ctx_menu: |
95 | mcall 12, 1 |
95 | mcall 12, 1 |
96 | 96 | ||
97 | xor eax, eax |
97 | xor eax, eax |
98 | movzx ebx, [x_coord] |
98 | movzx ebx, [x_coord] |
99 | shl ebx, 16 |
99 | shl ebx, 16 |
100 | add ebx, 133 |
100 | add ebx, 133 |
101 | movzx ecx, [y_coord] |
101 | movzx ecx, [y_coord] |
102 | sub ecx, 60 ; 41 |
102 | sub ecx, 60 ; 41 |
103 | shl ecx, 16 |
103 | shl ecx, 16 |
104 | add ecx, 60 ; 41 |
104 | add ecx, 60 ; 41 |
105 | mov esi, [system_colours + 4] ; sc.grab |
105 | mov esi, [system_colours + 4] ; sc.grab |
106 | or esi, 0x81000000 |
106 | or esi, 0x81000000 |
107 | mcall ,,,[system_colours + 20],,[system_colours] |
107 | mcall ,,,[system_colours + 20],,[system_colours+8] |
108 | 108 | ||
109 | mcall 8,<0,133>,<22,17>,0x40000001 |
109 | mcall 8,<0,133>,<22,17>,0x40000001 |
110 | 110 | ||
111 | inc edx |
111 | inc edx |
112 | mcall ,,<40,17> |
112 | mcall ,,<40,17> |
113 | 113 | ||
114 | mov ecx, [system_colours + 16] ; sc.grab_text |
114 | mov ecx, [system_colours + 16] ; sc.grab_text |
115 | or ecx, 0x10000000 |
115 | or ecx, 0x10000000 |
116 | mcall 4,<36,7>,,ctx_menu_title,ctx_menu_title_end - ctx_menu_title |
116 | mcall 4,<32,4>,,ctx_menu_title,ctx_menu_title_end - ctx_menu_title |
117 | 117 | ||
118 | add ebx, 1 * 65536 |
118 | add ebx, 1 * 65536 |
119 | mcall |
119 | mcall |
120 | 120 | ||
121 | mcall ,<4,28>,0x80000000,ctx_menu_text |
121 | mcall ,<4,28>,0x80000000,ctx_menu_text |
122 | 122 | ||
123 | mov edx, ctx_menu_text2 |
123 | mov edx, ctx_menu_text2 |
124 | 124 | ||
125 | test byte [procinfo_for_detect+70], 2 |
125 | test byte [procinfo_for_detect+70], 2 |
126 | jz @f |
126 | jz @f |
127 | mov edx, ctx_menu_text3 |
127 | mov edx, ctx_menu_text3 |
128 | ;-------------------------------------- |
128 | ;-------------------------------------- |
129 | align 4 |
129 | align 4 |
130 | @@: |
130 | @@: |
131 | add bx, 18 |
131 | add bx, 18 |
132 | mcall |
132 | mcall |
133 | 133 | ||
134 | mcall 12,2 |
134 | mcall 12,2 |
135 | ret |
135 | ret |
136 | ;endf |
136 | ;endf |
137 | ;------------------------------------------------------------------------------ |
137 | ;------------------------------------------------------------------------------ |
138 | align 4 |
138 | align 4 |
139 | x_coord rw 1 |
139 | x_coord rw 1 |
140 | y_coord rw 1 |
140 | y_coord rw 1 |
141 | n_slot rd 1 |
141 | n_slot rd 1 |
142 | ctx_menu_PID rd 1 |
142 | ctx_menu_PID rd 1 |
143 | ;------------------------------------------------------------------------------ |
143 | ;------------------------------------------------------------------------------ |
144 | lsz ctx_menu_text,\ |
144 | lsz ctx_menu_text,\ |
145 | ru, <"X ªàëâì Alt + F4",0>,\ |
145 | ru, <"X ªàëâì Alt + F4",0>,\ |
146 | en, <"X Close Alt + F4",0>,\ |
146 | en, <"X Close Alt + F4",0>,\ |
147 | et, <"X Sulge Alt + F4",0>,\ |
147 | et, <"X Sulge Alt + F4",0>,\ |
148 | ;------------------------------------------------------------------------------ |
148 | ;------------------------------------------------------------------------------ |
149 | lsz ctx_menu_text2,\ |
149 | lsz ctx_menu_text2,\ |
150 | ru, <25," ¢¥àãâì ",0>,\ |
150 | ru, <25," ¢¥àãâì ",0>,\ |
151 | en, <25," Minimize ",0>,\ |
151 | en, <25," Minimize ",0>,\ |
152 | et, <25," Minimeeri ",0>,\ |
152 | et, <25," Minimeeri ",0>,\ |
153 | ;------------------------------------------------------------------------------ |
153 | ;------------------------------------------------------------------------------ |
154 | lsz ctx_menu_text3,\ |
154 | lsz ctx_menu_text3,\ |
155 | ru, <24," ®ááâ ®¢¨âì ",0>,\ |
155 | ru, <24," ®ááâ ®¢¨âì ",0>,\ |
156 | en, <24," Restore ",0>,\ |
156 | en, <24," Restore ",0>,\ |
157 | et, <24," Taasta ",0> |
157 | et, <24," Taasta ",0> |
158 | ;------------------------------------------------------------------------------ |
158 | ;------------------------------------------------------------------------------ |
159 | ctx_menu_title: |
159 | ctx_menu_title: |
160 | db 'KolibriOS' |
160 | db 'KolibriOS' |
161 | ctx_menu_title_end: |
161 | ctx_menu_title_end: |
162 | ;------------------------------------------------------------------------------24,">24,">24,">25,">25,">25,">"X>"X>"X>4,28>36,7>40,17>22,17>0,133> |
162 | ;------------------------------------------------------------------------------24,">24,">24,">25,">25,">25,">"X>"X>"X>4,28>32,4>40,17>22,17>0,133> |