2016-11-08 01:23:52 +01:00
|
|
|
|
; <20><><EFBFBD><EFBFBD>⮩ <20>ਬ<EFBFBD><E0A8AC> <20>ணࠬ<E0AEA3><E0A0AC> <20><><EFBFBD> KolibriOS
|
|
|
|
|
; <20><><EFBFBD><EFBFBD>稢<EFBFBD><E7A8A2><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD>⮩ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
; - <20><>।<EFBFBD><E0A5A4><EFBFBD><EFBFBD> <20><><EFBFBD> <20>ਬ<EFBFBD><E0A8AC> <20>ᯮ<EFBFBD>짮<EFBFBD><ECA7AE><EFBFBD><EFBFBD><EFBFBD> tooltip
|
|
|
|
|
|
|
|
|
|
use32 ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 32-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ०<><E0A5A6> <20><>ᥬ<EFBFBD><E1A5AC><EFBFBD><EFBFBD><EFBFBD>
|
2022-01-03 22:03:06 +01:00
|
|
|
|
org 0 ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD>
|
2016-11-08 01:23:52 +01:00
|
|
|
|
|
|
|
|
|
db 'MENUET01' ; 8-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>䨪<EFBFBD><E4A8AA><EFBFBD><EFBFBD> MenuetOS
|
2022-01-03 22:03:06 +01:00
|
|
|
|
dd 1 ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<28>ᥣ<EFBFBD><E1A5A3> 1)
|
2016-11-08 01:23:52 +01:00
|
|
|
|
dd START ; <20><><EFBFBD><EFBFBD><EFBFBD> <20><>ࢮ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
dd CODE_END ; ࠧ<><E0A0A7><EFBFBD> <20>ணࠬ<E0AEA3><E0A0AC>
|
|
|
|
|
dd DATA_END ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⢮ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
dd STACK_END ; <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>設<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
2022-01-03 22:03:06 +01:00
|
|
|
|
dd 0 ; <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><>ࠬ<EFBFBD><E0A0AC>
|
2016-11-08 01:23:52 +01:00
|
|
|
|
dd cur_dir_path ; 㪠<><E3AAA0>⥫<EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>, <20>㤠 <20><><EFBFBD><EFBFBD>頥<EFBFBD><E9A0A5><EFBFBD> <20><>ப<EFBFBD>, ᮤ<>ঠ<EFBFBD><E0A6A0><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20>ணࠬ<E0AEA3><E0A0AC> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>᪠.
|
|
|
|
|
|
|
|
|
|
include '../../../../../proc32.inc'
|
|
|
|
|
include '../../../../../macros.inc'
|
|
|
|
|
include '../../../../../KOSfuncs.inc'
|
2016-11-08 13:40:37 +01:00
|
|
|
|
include '../../../../../dll.inc' ; malloc fn
|
2016-11-08 01:23:52 +01:00
|
|
|
|
include '../../trunk/box_lib.mac'
|
2022-01-03 22:03:06 +01:00
|
|
|
|
include '../../../../../load_lib.mac'
|
|
|
|
|
|
2016-11-08 01:23:52 +01:00
|
|
|
|
|
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
|
;--- <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ----------------------------------------------
|
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
|
; <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>易⥫<EFA7A0><E2A5AB> <20><><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⮢, <20>ᯮ<EFBFBD><E1AFAE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> heap
|
|
|
|
|
; <20><EFBFBD> ⮣<>, <20><>易⥫쭮 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E0AEA2><EFBFBD> lib_init - <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>।<EFBFBD><E0A5A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
; <20>㭪樨 娯<> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⥪<EFBFBD>
|
2022-01-03 22:03:06 +01:00
|
|
|
|
@use_library mem.Alloc,mem.Free,mem.ReAlloc,dll.Load
|
2016-11-08 01:23:52 +01:00
|
|
|
|
|
|
|
|
|
START:
|
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
|
;--- <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ----------------------------------------
|
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
|
mcall 68, 11
|
|
|
|
|
|
|
|
|
|
mcall 40, $C0000027 ; <20><>᪠ ᮡ<>⨩ - <20><><EFBFBD><EFBFBD> ⮫쪮 <20> <20><>⨢<EFBFBD><E2A8A2><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|
|
|
|
|
2022-01-03 22:03:06 +01:00
|
|
|
|
sys_load_library lib_name, lib_path, sys_path, myimport
|
2016-11-08 01:23:52 +01:00
|
|
|
|
test eax,eax
|
|
|
|
|
jz @f
|
|
|
|
|
mcall -1 ; alarm exit
|
|
|
|
|
@@:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
invoke tooltip_init, redbox_tt ; only begin of list
|
|
|
|
|
|
|
|
|
|
red: ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ᮢ<EFBFBD><E1AEA2><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|
|
|
|
|
|
|
|
|
call draw_window ; <20><><EFBFBD>뢠<EFBFBD><EBA2A0> <20><><EFBFBD>楤<EFBFBD><E6A5A4><EFBFBD> <20><><EFBFBD><EFBFBD>ᮢ<EFBFBD><E1AEA2> <20><><EFBFBD><EFBFBD>
|
|
|
|
|
|
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
|
;--- <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ----------------------------------------
|
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
still:
|
|
|
|
|
mcall 23, 5 ; <20>㭪<EFBFBD><E3ADAA><EFBFBD> 23 - <20><><EFBFBD><EFBFBD><EFBFBD> ᮡ<><E1AEA1><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD> 祬 0.05<EFBFBD>
|
|
|
|
|
test eax, eax ; <20><><EFBFBD> ᮡ<>⨩ - <20><EFBFBD><E0AEA2><EFBFBD><EFBFBD><EFBFBD> <20><>ᮢ<EFBFBD><E1AEA2><EFBFBD><EFBFBD> <20><><EFBFBD>⨯<EFBFBD><E2A8AF> <20><> ⠩<><E2A0A9><EFBFBD><EFBFBD>
|
|
|
|
|
je yield
|
|
|
|
|
cmp eax,1 ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ᮢ<EFBFBD><E1AEA2><EFBFBD> <20><><EFBFBD><EFBFBD> ?
|
|
|
|
|
je red ; <20> <20><> - <20><> <20><><EFBFBD><EFBFBD><EFBFBD> red
|
|
|
|
|
cmp eax,2 ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ?
|
|
|
|
|
je key ; <20> <20><> - <20><> key
|
|
|
|
|
cmp eax,3 ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ?
|
|
|
|
|
je button ; <20> <20><> - <20><> button
|
|
|
|
|
cmp eax,6 ; ᮡ<>⨥ <20><><EFBFBD><EFBFBD>
|
|
|
|
|
je mouse ; <20> <20><> - <20><> mouse
|
|
|
|
|
|
|
|
|
|
jmp still ; <20> <20><>㣮<EFBFBD> ᮡ<>⨥ - <20> <20><>砫<EFBFBD> 横<><E6A8AA>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
|
yield:
|
|
|
|
|
invoke tooltip_test_show, redbox_tt
|
|
|
|
|
jmp still ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><>砫<EFBFBD> 横<><E6A8AA>
|
|
|
|
|
|
|
|
|
|
mouse:
|
|
|
|
|
invoke tooltip_mouse, redbox_tt
|
|
|
|
|
jmp still ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><>砫<EFBFBD> 横<><E6A8AA>
|
|
|
|
|
|
|
|
|
|
key: ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mcall 2 ; <20>㭪<EFBFBD><E3ADAA><EFBFBD> 2 - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> ᨬ<><E1A8AC><EFBFBD><EFBFBD> (<28> ah)
|
|
|
|
|
|
|
|
|
|
jmp still ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><>砫<EFBFBD> 横<><E6A8AA>
|
|
|
|
|
|
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
button:
|
|
|
|
|
mcall 17 ; 17 - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>䨪<EFBFBD><E4A8AA><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>⮩ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
|
|
|
|
cmp ah, 1 ; <20> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD> 1,
|
|
|
|
|
jne still ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
|
|
|
|
pexit:
|
|
|
|
|
invoke tooltip_delete, redbox_tt ; <20><EFBFBD><E1A2AE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mcall -1 ; <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20>ணࠬ<E0AEA3><E0A0AC>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
|
;--- <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> ----------------------------------
|
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
draw_window:
|
|
|
|
|
|
|
|
|
|
mcall 12, 1 ; <20>㭪<EFBFBD><E3ADAA><EFBFBD> 12: ᮮ<><E1AEAE><EFBFBD><EFBFBD><EFBFBD> <20><> <20> <20><>砫<EFBFBD> <20><><EFBFBD><EFBFBD>ᮢ<EFBFBD><E1AEA2>
|
|
|
|
|
|
|
|
|
|
mcall 48, 3, sc,sizeof.system_colors
|
|
|
|
|
|
|
|
|
|
mov edx, [sc.work] ; 梥<> 䮭<>
|
|
|
|
|
or edx, 0x33000000 ; <20> ⨯ <20><><EFBFBD><EFBFBD> 3
|
|
|
|
|
mcall 0, <200,300>, <200,150>, , ,title
|
|
|
|
|
|
|
|
|
|
; <20>뢮<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⨪<EFBFBD><E2A8AA>
|
|
|
|
|
mcall 13, <60,50>, <50,50>, $FF0000
|
|
|
|
|
mcall 13, <140,50>, <50,50>, $FF
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mcall 12, 2 ; <20>㭪<EFBFBD><E3ADAA><EFBFBD> 12.2, <20><><EFBFBD><EFBFBD><EFBFBD>稫<EFBFBD> <20><>ᮢ<EFBFBD><E1AEA2><EFBFBD>
|
|
|
|
|
|
|
|
|
|
ret ; <20><>室<EFBFBD><E5AEA4> <20><> <20><><EFBFBD>楤<EFBFBD><E6A5A4><EFBFBD>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CODE_END: ; <20><>⪠ <20><><EFBFBD><EFBFBD><EFBFBD> <20>ணࠬ<E0AEA3><E0A0AC>; --------------------------------------------;
|
|
|
|
|
|
|
|
|
|
; ---------------------------------------------------------------------------- ;
|
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
|
;--- <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ----------------------------------------------
|
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
sys_path db '/sys/lib/'
|
|
|
|
|
;sys_path db '/tmp0/1/'
|
|
|
|
|
lib_name db 'box_lib.obj',0
|
|
|
|
|
cur_dir_path rb 4096
|
|
|
|
|
lib_path rb 4096
|
|
|
|
|
|
|
|
|
|
myimport:
|
|
|
|
|
dd sz_lib_init ;<3B>㭪<EFBFBD><E3ADAA><EFBFBD> <20><><EFBFBD><EFBFBD>᪠<EFBFBD><E1AAA0><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ᮬ 1 ࠧ <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>祭<EFBFBD><E7A5AD>
|
|
|
|
|
;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⥪<EFBFBD>, <20><>⮬<EFBFBD> <20> <20>ணࠬ<E0AEA3><E0A0AC> <20><>⪠ <20><> <20><><EFBFBD> <20><> <20>㦭<EFBFBD>
|
|
|
|
|
tooltip_init dd sz_tooltip_init
|
|
|
|
|
tooltip_delete dd sz_tooltip_delete
|
|
|
|
|
tooltip_test_show dd sz_tooltip_test_show
|
|
|
|
|
tooltip_mouse dd sz_tooltip_mouse
|
|
|
|
|
get_font_size dd sz_get_font_size
|
2022-01-03 22:03:06 +01:00
|
|
|
|
dd 0,0
|
2016-11-08 01:23:52 +01:00
|
|
|
|
|
|
|
|
|
sz_lib_init db 'lib_init',0
|
|
|
|
|
sz_tooltip_init db 'tooltip_init', 0
|
|
|
|
|
sz_tooltip_delete db 'tooltip_delete', 0
|
|
|
|
|
sz_tooltip_test_show db 'tooltip_test_show', 0
|
|
|
|
|
sz_tooltip_mouse db 'tooltip_mouse', 0
|
|
|
|
|
sz_get_font_size db 'get_font_size', 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;tooltip txt, next, zone_x, zone_w, zone_y, zone_h, col_txt, col_bkg, tm_wait
|
|
|
|
|
redbox_tt tooltip redboxtxt, blubox_tt, 60, 50, 50, 50, 0, $FFF473, 100
|
|
|
|
|
blubox_tt tooltip bluboxtxt, 0, 140, 50, 50, 50, $110000FF, $FFF473, 100
|
|
|
|
|
|
|
|
|
|
redboxtxt db 'Red Box Tooltip', 13, 'May be multilined', 13, 13, 'Even with empty lines', 0
|
|
|
|
|
bluboxtxt db 'Blue Box Tooltip', 0
|
|
|
|
|
|
|
|
|
|
sc system_colors
|
|
|
|
|
|
|
|
|
|
title db 'Toooltip demo',0
|
|
|
|
|
|
|
|
|
|
; stack----------------------------------------------------------------------- ;
|
|
|
|
|
rb 4096
|
|
|
|
|
STACK_END dd ?
|
|
|
|
|
|
|
|
|
|
DATA_END: ; <20><>⪠ <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ணࠬ<E0AEA3><E0A0AC>; ------------------------------------ ;
|