2008-09-30 22:03:55 +04:00
|
|
|
|
context_menu_start:
|
2007-08-03 00:16:05 +04:00
|
|
|
|
|
|
|
|
|
mov eax, 40
|
|
|
|
|
mov ebx, 00100111b
|
|
|
|
|
int 0x40
|
|
|
|
|
|
|
|
|
|
;call draw_ctx_menu
|
|
|
|
|
|
2007-09-20 20:35:52 +04:00
|
|
|
|
mov ebp, 2 ; 2 <20><><EFBFBD><EFBFBD><EFBFBD> <20>ᯮ<EFBFBD><E1AFAE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
|
|
|
|
; // Alver 26.08.2007 // {
|
|
|
|
|
; xor ecx, ecx
|
|
|
|
|
; mov edx, [ctx_menu_PID]
|
|
|
|
|
; find_slot:
|
|
|
|
|
; inc ecx
|
|
|
|
|
; mov eax, 9
|
|
|
|
|
; mov ebx, process_info_buffer
|
|
|
|
|
; int 0x40
|
|
|
|
|
; cmp dword [process_info_buffer + 30], edx
|
|
|
|
|
; jne find_slot
|
|
|
|
|
mov ecx, [ctx_menu_PID]
|
|
|
|
|
mcall 18,21
|
|
|
|
|
mov ecx, eax
|
|
|
|
|
; } \\ Alver \\
|
2007-08-03 00:16:05 +04:00
|
|
|
|
mov eax, 18
|
|
|
|
|
mov ebx, 3
|
|
|
|
|
;mov ecx, ecx ; :)
|
|
|
|
|
int 0x40
|
|
|
|
|
|
|
|
|
|
call draw_ctx_menu
|
|
|
|
|
|
|
|
|
|
ctx_menu_still:
|
|
|
|
|
mov eax, 10
|
|
|
|
|
int 0x40
|
|
|
|
|
|
|
|
|
|
cmp eax, ebp ; cmp eax, 2
|
|
|
|
|
jz ctx_menu_key
|
|
|
|
|
cmp eax, 3
|
|
|
|
|
jz ctx_menu_button
|
|
|
|
|
cmp eax, 6
|
|
|
|
|
jz ctx_menu_mouse
|
|
|
|
|
|
|
|
|
|
call draw_ctx_menu
|
|
|
|
|
|
|
|
|
|
jmp ctx_menu_still
|
|
|
|
|
|
|
|
|
|
ctx_menu_key:
|
|
|
|
|
mov eax, ebp ; mov eax, 2
|
|
|
|
|
int 0x40
|
|
|
|
|
|
|
|
|
|
ctx_menu_button:
|
|
|
|
|
mov eax, 17
|
|
|
|
|
int 0x40
|
2008-09-30 22:03:55 +04:00
|
|
|
|
|
2007-08-03 00:16:05 +04:00
|
|
|
|
cmp ah, 1
|
2007-09-20 20:35:52 +04:00
|
|
|
|
; // Alver 26.08.2007 // {
|
|
|
|
|
; jne ctx_menu_still
|
|
|
|
|
jne @f
|
|
|
|
|
; } \\ Alver \\
|
2007-08-03 00:16:05 +04:00
|
|
|
|
mov eax, 18
|
|
|
|
|
mov ebx, ebp ; mov eax, 2
|
|
|
|
|
mov ecx, [n_slot]
|
2007-09-20 20:35:52 +04:00
|
|
|
|
; // Alver 26.08.2007 // {
|
|
|
|
|
jmp .lllxxx
|
|
|
|
|
@@:
|
|
|
|
|
cmp ah, 2
|
|
|
|
|
jne ctx_menu_still
|
|
|
|
|
mov eax, 18
|
|
|
|
|
mov ebx, 22
|
|
|
|
|
mov edx, [n_slot]
|
|
|
|
|
xor ecx, ecx
|
|
|
|
|
; \begin{diamond}[20.09.2007]
|
|
|
|
|
test byte [procinfo_for_detect+70], 2
|
|
|
|
|
setnz cl
|
|
|
|
|
add cl, cl
|
|
|
|
|
; \end{diamond}[20.09.2007]
|
|
|
|
|
.lllxxx:
|
|
|
|
|
; } \\ Alver \\
|
2007-08-03 00:16:05 +04:00
|
|
|
|
int 0x40
|
|
|
|
|
jmp ctx_menu_exit
|
|
|
|
|
|
|
|
|
|
ctx_menu_mouse:
|
|
|
|
|
mov eax, 37
|
|
|
|
|
mov ebx, ebp ; mov ebx, 2
|
|
|
|
|
int 0x40
|
|
|
|
|
|
2007-09-20 20:35:52 +04:00
|
|
|
|
xchg eax, ecx ; cmp eax, 0 <20> <20><> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>頥<EFBFBD><E9A0A5><EFBFBD>
|
|
|
|
|
; <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 横<> <20><>⮪<EFBFBD>
|
2007-08-03 00:16:05 +04:00
|
|
|
|
jecxz ctx_menu_still
|
|
|
|
|
|
|
|
|
|
mov eax, 37
|
|
|
|
|
xor ebx, ebx ; mov ebx, 1
|
|
|
|
|
inc ebx
|
|
|
|
|
int 0x40
|
|
|
|
|
|
2007-09-20 20:35:52 +04:00
|
|
|
|
cmp ax, 0 ; <20><><EFBFBD> <20><EFBFBD><E0AEA2>塞 <20>ந<EFBFBD><E0AEA8><EFBFBD><EFBFBD><EFBFBD>-<2D><> <20><><EFBFBD><EFBFBD> <20><> <20>।<EFBFBD><E0A5A4><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>⥪<EFBFBD>⭮<EFBFBD><E2ADAE>
|
|
|
|
|
jb ctx_menu_exit ; <20><><EFBFBD><EFBFBD>, <20> <20><> <20>।<EFBFBD><E0A5A4><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD>뢠<EFBFBD><EBA2A0> <20><><EFBFBD>⥪<EFBFBD>⭮<EFBFBD> <20><><EFBFBD><EFBFBD>
|
|
|
|
|
cmp ax, 60 ; 41
|
2007-08-03 00:16:05 +04:00
|
|
|
|
ja ctx_menu_exit
|
|
|
|
|
shr eax, 16
|
|
|
|
|
cmp ax, 0
|
|
|
|
|
jb ctx_menu_exit
|
|
|
|
|
cmp ax, 133
|
|
|
|
|
ja ctx_menu_exit
|
|
|
|
|
|
|
|
|
|
jmp ctx_menu_still
|
|
|
|
|
|
|
|
|
|
ctx_menu_exit:
|
2008-09-30 22:03:55 +04:00
|
|
|
|
|
2007-08-03 00:16:05 +04:00
|
|
|
|
xor eax, eax
|
|
|
|
|
dec eax ; mov eax, -1
|
|
|
|
|
int 0x40
|
|
|
|
|
|
|
|
|
|
func draw_ctx_menu
|
|
|
|
|
|
2011-09-16 17:31:37 +04:00
|
|
|
|
mcall 12, 1
|
2007-08-03 00:16:05 +04:00
|
|
|
|
|
|
|
|
|
xor eax, eax ; mov eax, 0
|
|
|
|
|
movzx ebx, [x_coord]
|
|
|
|
|
shl ebx, 16
|
|
|
|
|
add ebx, 133
|
|
|
|
|
movzx ecx, [y_coord]
|
2007-09-20 20:35:52 +04:00
|
|
|
|
sub ecx, 60 ; 41
|
2007-08-03 00:16:05 +04:00
|
|
|
|
shl ecx, 16
|
2007-09-20 20:35:52 +04:00
|
|
|
|
add ecx, 60 ; 41
|
2007-08-03 00:16:05 +04:00
|
|
|
|
mov edx, [system_colours + 20] ; sc.work
|
|
|
|
|
mov esi, [system_colours + 4] ; sc.grab
|
|
|
|
|
or esi, 0x81000000
|
|
|
|
|
mov edi, [system_colours] ; sc.frame
|
|
|
|
|
int 0x40
|
|
|
|
|
|
|
|
|
|
mov eax, 8
|
|
|
|
|
mov ebx, 0 * 65536 + 133
|
2011-09-16 17:31:37 +04:00
|
|
|
|
mov ecx, 22 * 65536 + 17
|
2007-08-03 00:16:05 +04:00
|
|
|
|
mov edx, 0x40000001
|
|
|
|
|
int 0x40
|
|
|
|
|
|
2011-09-16 17:31:37 +04:00
|
|
|
|
;mov eax, 8
|
|
|
|
|
;mov ebx, 0 * 65536 + 133
|
|
|
|
|
;mov ecx, 40 * 65536 + 17
|
|
|
|
|
;mov edx, 0x40000002
|
|
|
|
|
;int 0x40
|
|
|
|
|
mov ecx, 40 * 65536 + 17
|
|
|
|
|
inc edx
|
2007-09-20 20:35:52 +04:00
|
|
|
|
int 0x40
|
2011-09-16 17:31:37 +04:00
|
|
|
|
|
2007-08-03 00:16:05 +04:00
|
|
|
|
shr eax, 1 ; mov eax, 4
|
|
|
|
|
mov ebx, 36 * 65536 + 7
|
|
|
|
|
mov ecx, [system_colours + 16] ; sc.grab_text
|
|
|
|
|
or ecx, 0x10000000
|
|
|
|
|
|
|
|
|
|
mov edx, ctx_menu_title
|
2007-09-20 20:35:52 +04:00
|
|
|
|
|
2007-08-03 00:16:05 +04:00
|
|
|
|
mov esi, ctx_menu_title_end - ctx_menu_title
|
|
|
|
|
int 0x40
|
|
|
|
|
|
|
|
|
|
add ebx, 1 * 65536
|
|
|
|
|
int 0x40
|
|
|
|
|
|
|
|
|
|
mov ebx, 4 * 65536 + 28
|
2007-09-20 20:35:52 +04:00
|
|
|
|
mov ecx, 0x80000000
|
2007-08-03 00:16:05 +04:00
|
|
|
|
mov edx, ctx_menu_text
|
2011-09-16 17:31:37 +04:00
|
|
|
|
|
2007-09-20 20:35:52 +04:00
|
|
|
|
int 0x40
|
|
|
|
|
add bx, 18
|
|
|
|
|
mov edx, ctx_menu_text2
|
2011-09-16 17:31:37 +04:00
|
|
|
|
|
2007-09-20 20:35:52 +04:00
|
|
|
|
test byte [procinfo_for_detect+70], 2
|
|
|
|
|
jz @f
|
|
|
|
|
mov edx, ctx_menu_text3
|
|
|
|
|
@@:
|
2011-09-16 17:31:37 +04:00
|
|
|
|
|
2007-08-03 00:16:05 +04:00
|
|
|
|
int 0x40
|
|
|
|
|
|
2011-09-16 17:31:37 +04:00
|
|
|
|
mcall 12, 2
|
|
|
|
|
|
2007-08-03 00:16:05 +04:00
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
endf
|
|
|
|
|
|
|
|
|
|
x_coord rw 1
|
|
|
|
|
y_coord rw 1
|
|
|
|
|
n_slot rd 1
|
|
|
|
|
lsz ctx_menu_text,\
|
2007-09-20 20:35:52 +04:00
|
|
|
|
ru, <"X <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Alt + F4",0>,\
|
|
|
|
|
en, <"X Close Alt + F4",0>,\
|
2011-09-16 17:31:37 +04:00
|
|
|
|
|
2007-09-20 20:35:52 +04:00
|
|
|
|
lsz ctx_menu_text2,\
|
|
|
|
|
ru, <25," <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ",0>,\
|
|
|
|
|
en, <25," Minimize ",0>,\
|
2011-09-16 17:31:37 +04:00
|
|
|
|
|
2007-09-20 20:35:52 +04:00
|
|
|
|
lsz ctx_menu_text3,\
|
|
|
|
|
ru, <24," <20><><EFBFBD><EFBFBD>⠭<EFBFBD><E2A0AD><EFBFBD><EFBFBD><EFBFBD> ",0>,\
|
|
|
|
|
en, <24," Restore ",0>
|
2011-09-16 17:31:37 +04:00
|
|
|
|
|
2007-08-03 00:16:05 +04:00
|
|
|
|
ctx_menu_PID rd 1
|
|
|
|
|
|
|
|
|
|
ctx_menu_title:
|
|
|
|
|
db 'KolibriOS'
|
2008-09-30 22:03:55 +04:00
|
|
|
|
ctx_menu_title_end:
|