2024-01-21 12:23:12 +01:00
|
|
|
|
;------------------------------------------------------------------------------
|
2012-03-31 18:34:52 +02:00
|
|
|
|
align 4
|
2008-09-30 20:03:55 +02:00
|
|
|
|
context_menu_start:
|
2024-01-21 12:23:12 +01:00
|
|
|
|
mcall 40, EVM_REDRAW + EVM_KEY + EVM_BUTTON + EVM_MOUSE ;00100111b
|
|
|
|
|
mov ecx, [ctx_menu_PID]
|
|
|
|
|
mcall 18,21
|
|
|
|
|
mov ecx, eax
|
|
|
|
|
mcall 18,3
|
|
|
|
|
call draw_ctx_menu
|
|
|
|
|
;------------------------------------------------------------------------------
|
2012-03-31 18:34:52 +02:00
|
|
|
|
align 4
|
|
|
|
|
ctx_menu_still:
|
2024-01-21 12:23:12 +01:00
|
|
|
|
mcall 10
|
|
|
|
|
cmp eax, EV_KEY
|
|
|
|
|
jz ctx_menu_key
|
2012-03-31 18:34:52 +02:00
|
|
|
|
|
2024-01-21 12:23:12 +01:00
|
|
|
|
cmp eax, EV_BUTTON
|
|
|
|
|
jz ctx_menu_button
|
2012-03-31 18:34:52 +02:00
|
|
|
|
|
2024-01-21 12:23:12 +01:00
|
|
|
|
cmp eax, EV_MOUSE
|
|
|
|
|
jz ctx_menu_mouse
|
2012-03-31 18:34:52 +02:00
|
|
|
|
|
2024-01-21 12:23:12 +01:00
|
|
|
|
call draw_ctx_menu
|
|
|
|
|
jmp ctx_menu_still
|
|
|
|
|
;------------------------------------------------------------------------------
|
2012-03-31 18:34:52 +02:00
|
|
|
|
align 4
|
2013-03-02 22:35:56 +01:00
|
|
|
|
ctx_menu_mouse:
|
2024-01-21 12:23:12 +01:00
|
|
|
|
mcall 37,2
|
|
|
|
|
xchg eax,ecx ; <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>
|
|
|
|
|
jecxz ctx_menu_still
|
2013-03-02 22:35:56 +01:00
|
|
|
|
|
2024-01-21 12:23:12 +01:00
|
|
|
|
mcall 37,1
|
2013-03-02 22:35:56 +01:00
|
|
|
|
|
2024-01-21 12:23:12 +01: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>
|
2013-03-02 22:35:56 +01:00
|
|
|
|
|
2024-01-21 12:23:12 +01:00
|
|
|
|
cmp ax, 60 ; 41
|
|
|
|
|
ja ctx_menu_exit
|
2013-03-02 22:35:56 +01:00
|
|
|
|
|
2024-01-21 12:23:12 +01:00
|
|
|
|
shr eax, 16
|
|
|
|
|
cmp ax, 0
|
|
|
|
|
jb ctx_menu_exit
|
2013-03-02 22:35:56 +01:00
|
|
|
|
|
2024-01-21 12:23:12 +01:00
|
|
|
|
cmp ax, 133
|
|
|
|
|
ja ctx_menu_exit
|
2013-03-02 22:35:56 +01:00
|
|
|
|
|
2024-01-21 12:23:12 +01:00
|
|
|
|
jmp ctx_menu_still
|
|
|
|
|
;------------------------------------------------------------------------------
|
2013-03-02 22:35:56 +01:00
|
|
|
|
align 4
|
2012-03-31 18:34:52 +02:00
|
|
|
|
ctx_menu_key:
|
2024-01-21 12:23:12 +01:00
|
|
|
|
mcall 2
|
2012-03-31 18:34:52 +02:00
|
|
|
|
;--------------------------------------
|
|
|
|
|
align 4
|
|
|
|
|
ctx_menu_button:
|
2024-01-21 12:23:12 +01:00
|
|
|
|
mcall 17
|
|
|
|
|
cmp ah, 1
|
|
|
|
|
jne @f
|
|
|
|
|
|
|
|
|
|
; mov eax, 18
|
|
|
|
|
; mov ebx, 2
|
|
|
|
|
; mov ecx, [n_slot]
|
|
|
|
|
; jmp .lllxxx
|
|
|
|
|
mcall 18,3,[n_slot]
|
|
|
|
|
mcall 72,1,3,1
|
|
|
|
|
mcall 68,1
|
|
|
|
|
jmp ctx_menu_exit
|
2012-03-31 18:34:52 +02:00
|
|
|
|
;--------------------------------------
|
|
|
|
|
align 4
|
2007-09-20 18:35:52 +02:00
|
|
|
|
@@:
|
2024-01-21 12:23:12 +01:00
|
|
|
|
cmp ah, 2
|
|
|
|
|
jne ctx_menu_still
|
|
|
|
|
mov eax, 18
|
|
|
|
|
mov ebx, 22
|
|
|
|
|
mov edx, [n_slot]
|
|
|
|
|
xor ecx, ecx
|
|
|
|
|
|
|
|
|
|
test [procinfo_for_detect.wnd_state],byte 2
|
|
|
|
|
setnz cl
|
|
|
|
|
add cl, cl
|
2012-03-31 18:34:52 +02:00
|
|
|
|
;--------------------------------------
|
|
|
|
|
align 4
|
|
|
|
|
.lllxxx:
|
2024-01-21 12:23:12 +01:00
|
|
|
|
mcall
|
|
|
|
|
jmp ctx_menu_exit
|
2012-03-31 18:34:52 +02:00
|
|
|
|
;--------------------------------------
|
|
|
|
|
align 4
|
|
|
|
|
ctx_menu_exit:
|
2024-01-21 12:23:12 +01:00
|
|
|
|
or eax,-1
|
|
|
|
|
mcall
|
|
|
|
|
;------------------------------------------------------------------------------
|
2012-03-31 18:34:52 +02:00
|
|
|
|
align 4
|
|
|
|
|
;func draw_ctx_menu
|
|
|
|
|
draw_ctx_menu:
|
2024-01-21 12:23:12 +01:00
|
|
|
|
mcall 12, 1
|
|
|
|
|
|
|
|
|
|
xor eax, eax
|
|
|
|
|
movzx ebx, [x_coord]
|
|
|
|
|
shl ebx, 16
|
|
|
|
|
add ebx, 133
|
|
|
|
|
movzx ecx, [y_coord]
|
|
|
|
|
sub ecx, 60 ; 41
|
|
|
|
|
shl ecx, 16
|
|
|
|
|
add ecx, 60 ; 41
|
|
|
|
|
mov esi, [system_colours.grab] ; sc.grab
|
|
|
|
|
or esi, 0x81000000
|
|
|
|
|
mcall ,,,[system_colours.work],,[system_colours.work_dark]
|
|
|
|
|
|
|
|
|
|
mcall 8,<0,133>,<22,17>,0x40000001
|
|
|
|
|
|
|
|
|
|
inc edx
|
|
|
|
|
mcall ,,<40,17>
|
|
|
|
|
|
|
|
|
|
mov ecx, [system_colours.grab_text] ; sc.grab_text
|
|
|
|
|
or ecx, 0x10000000
|
|
|
|
|
mcall 4,<32,4>,,ctx_menu_title,ctx_menu_title_end - ctx_menu_title
|
|
|
|
|
|
|
|
|
|
add ebx, 1 * 65536
|
|
|
|
|
mcall
|
|
|
|
|
|
|
|
|
|
mov ecx, [system_colours.work_text] ; sc.work_text
|
|
|
|
|
or ecx, 0x80000000
|
|
|
|
|
mcall ,<4,28>,,ctx_menu_text
|
|
|
|
|
|
|
|
|
|
mov edx, ctx_menu_text2
|
|
|
|
|
|
|
|
|
|
test byte [procinfo_for_detect.wnd_state], 2
|
|
|
|
|
jz @f
|
|
|
|
|
mov edx, ctx_menu_text3
|
2012-03-31 18:34:52 +02:00
|
|
|
|
;--------------------------------------
|
|
|
|
|
align 4
|
2007-09-20 18:35:52 +02:00
|
|
|
|
@@:
|
2024-01-21 12:23:12 +01:00
|
|
|
|
add bx, 18
|
|
|
|
|
mcall
|
2012-03-31 18:34:52 +02:00
|
|
|
|
|
2024-01-21 12:23:12 +01:00
|
|
|
|
mcall 12,2
|
|
|
|
|
ret
|
2012-03-31 18:34:52 +02:00
|
|
|
|
;endf
|
2024-01-21 12:23:12 +01:00
|
|
|
|
;------------------------------------------------------------------------------
|
2012-03-31 18:34:52 +02:00
|
|
|
|
align 4
|
2024-01-21 12:23:12 +01:00
|
|
|
|
x_coord rw 1
|
|
|
|
|
y_coord rw 1
|
|
|
|
|
n_slot rd 1
|
|
|
|
|
ctx_menu_PID rd 1
|
|
|
|
|
;------------------------------------------------------------------------------
|
2007-08-02 22:16:05 +02:00
|
|
|
|
lsz ctx_menu_text,\
|
2024-07-10 05:57:18 +02:00
|
|
|
|
ru_RU, <"X <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Alt + F4",0>,\
|
|
|
|
|
en_US, <"X Close Alt + F4",0>,\
|
|
|
|
|
et_EE, <"X Sulge Alt + F4",0>,\
|
2024-01-21 12:23:12 +01:00
|
|
|
|
;------------------------------------------------------------------------------
|
2007-09-20 18:35:52 +02:00
|
|
|
|
lsz ctx_menu_text2,\
|
2024-07-10 05:57:18 +02:00
|
|
|
|
ru_RU, <25," <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ",0>,\
|
|
|
|
|
en_US, <25," Minimize ",0>,\
|
|
|
|
|
et_EE, <25," Minimeeri ",0>,\
|
2024-01-21 12:23:12 +01:00
|
|
|
|
;------------------------------------------------------------------------------
|
2007-09-20 18:35:52 +02:00
|
|
|
|
lsz ctx_menu_text3,\
|
2024-07-10 05:57:18 +02:00
|
|
|
|
ru_RU, <24," <20><><EFBFBD><EFBFBD>⠭<EFBFBD><E2A0AD><EFBFBD><EFBFBD><EFBFBD> ",0>,\
|
|
|
|
|
en_US, <24," Restore ",0>,\
|
|
|
|
|
et_EE, <24," Taasta ",0>
|
2024-01-21 12:23:12 +01:00
|
|
|
|
;------------------------------------------------------------------------------
|
2007-08-02 22:16:05 +02:00
|
|
|
|
ctx_menu_title:
|
2024-01-21 12:23:12 +01:00
|
|
|
|
db 'KolibriOS'
|
2008-09-30 20:03:55 +02:00
|
|
|
|
ctx_menu_title_end:
|
2024-07-10 05:57:18 +02:00
|
|
|
|
;------------------------------------------------------------------------------
|