forked from KolibriOS/kolibrios
use box_lib.obj
git-svn-id: svn://kolibrios.org@1070 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
02fbec18ca
commit
944bcba007
@ -3,7 +3,7 @@
|
|||||||
;
|
;
|
||||||
; Mario79 2005
|
; Mario79 2005
|
||||||
; Heavyiron 12.02.2007
|
; Heavyiron 12.02.2007
|
||||||
;
|
; <Lrz> 11.05.2009 - ¤«ï à ¡®âë 㦠á¨á⥬ ï ¡¨¡«¨®â¥ª box_lib.obj
|
||||||
; Š®¬¯¨«¨à®¢ âì FASM'®¬
|
; Š®¬¯¨«¨à®¢ âì FASM'®¬
|
||||||
;
|
;
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
@ -23,18 +23,27 @@ version equ '1.2'
|
|||||||
dd I_END ; ª®«¨ç¥á⢮ ¯ ¬ïâ¨
|
dd I_END ; ª®«¨ç¥á⢮ ¯ ¬ïâ¨
|
||||||
dd I_END ; ¤à¥á ¢¥àè¨ë áâíª
|
dd I_END ; ¤à¥á ¢¥àè¨ë áâíª
|
||||||
dd 0x0 ; ¤à¥á ¡ãä¥à ¤«ï ¯ à ¬¥â஢ (¥ ¨á¯®«ì§ã¥âáï)
|
dd 0x0 ; ¤à¥á ¡ãä¥à ¤«ï ¯ à ¬¥â஢ (¥ ¨á¯®«ì§ã¥âáï)
|
||||||
dd 0x0 ; § १¥à¢¨à®¢ ®
|
dd cur_dir_path
|
||||||
|
|
||||||
include '..\..\..\develop\examples\editbox\trunk\editbox.inc'
|
;include '..\..\..\develop\examples\editbox\trunk\editbox.inc'
|
||||||
use_edit_box
|
include '../../../develop/libraries/box_lib/trunk/load_lib.mac'
|
||||||
|
include '../../../develop/libraries/box_lib/trunk/editbox_ex.mac'
|
||||||
|
@use_library
|
||||||
|
|
||||||
|
;use_edit_box
|
||||||
al equ eax ; \ decrease kpack'ed size
|
al equ eax ; \ decrease kpack'ed size
|
||||||
purge mov ; /
|
purge mov ; /
|
||||||
|
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
;--- <20>€—€‹Ž <20><>Žƒ<C5BD>€ŒŒ› ----------------------------------------------
|
;--- <20>€—€‹Ž <20><>Žƒ<C5BD>€ŒŒ› ----------------------------------------------
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
|
align 4
|
||||||
START:
|
START:
|
||||||
|
sys_load_library library_name, cur_dir_path, library_path, system_path, \
|
||||||
|
err_message_found_lib, head_f_l, myimport, err_message_import, head_f_i
|
||||||
|
cmp eax,-1
|
||||||
|
jz close
|
||||||
|
|
||||||
mov eax, 40
|
mov eax, 40
|
||||||
mov ebx, 100111b
|
mov ebx, 100111b
|
||||||
mcall
|
mcall
|
||||||
@ -56,7 +65,10 @@ still:
|
|||||||
jz button
|
jz button
|
||||||
|
|
||||||
mouse:
|
mouse:
|
||||||
mouse_edit_box editbox
|
; mouse_edit_box editbox
|
||||||
|
push dword editbox
|
||||||
|
call [edit_box_mouse]
|
||||||
|
|
||||||
jmp still
|
jmp still
|
||||||
|
|
||||||
button:
|
button:
|
||||||
@ -65,6 +77,7 @@ button:
|
|||||||
|
|
||||||
cmp ah,1 ; ª®¯ª á id=1("§ ªàëâì")?
|
cmp ah,1 ; ª®¯ª á id=1("§ ªàëâì")?
|
||||||
jne noclose
|
jne noclose
|
||||||
|
close:
|
||||||
or eax,-1 ; äãªæ¨ï -1: § ¢¥àè¨âì ¯à®£à ¬¬ã
|
or eax,-1 ; äãªæ¨ï -1: § ¢¥àè¨âì ¯à®£à ¬¬ã
|
||||||
mcall
|
mcall
|
||||||
|
|
||||||
@ -96,7 +109,10 @@ doit:
|
|||||||
key:
|
key:
|
||||||
mov al,2
|
mov al,2
|
||||||
mcall
|
mcall
|
||||||
key_edit_box editbox
|
; key_edit_box editbox
|
||||||
|
push dword editbox
|
||||||
|
call [edit_box_key]
|
||||||
|
|
||||||
jmp still
|
jmp still
|
||||||
|
|
||||||
|
|
||||||
@ -170,7 +186,10 @@ draw_window:
|
|||||||
mov edi,title ; ‡€ƒŽ‹Ž‚ŽŠ ŽŠ<C5BD>€
|
mov edi,title ; ‡€ƒŽ‹Ž‚ŽŠ ŽŠ<C5BD>€
|
||||||
mcall
|
mcall
|
||||||
|
|
||||||
draw_edit_box editbox ;à¨á®¢ ¨¥ edit box
|
push dword editbox
|
||||||
|
call [edit_box_draw]
|
||||||
|
|
||||||
|
;draw_edit_box editbox ;à¨á®¢ ¨¥ edit box
|
||||||
|
|
||||||
mov al,13 ;®âà¨á®¢ª ⥥© ª®¯®ª
|
mov al,13 ;®âà¨á®¢ª ⥥© ª®¯®ª
|
||||||
mov ebx,194 shl 16 + 60
|
mov ebx,194 shl 16 + 60
|
||||||
@ -307,8 +326,35 @@ error11 db 'Device error',0
|
|||||||
aUnknownError db 'Unknown error',0
|
aUnknownError db 'Unknown error',0
|
||||||
|
|
||||||
end if
|
end if
|
||||||
|
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
||||||
|
;DATA ¤ ë¥
|
||||||
|
;‚ᥣ¤ ᮡ«î¤ âì ¯®á«¥¤®¢ ⥫ì®áâì ¢ ¨¬¥¨.
|
||||||
|
system_path db '/sys/lib/'
|
||||||
|
library_name db 'box_lib.obj',0
|
||||||
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
mouse_flag: dd 0x0
|
err_message_found_lib db 'Sorry I cannot load library box_lib.obj',0
|
||||||
|
head_f_i:
|
||||||
|
head_f_l db 'System error',0
|
||||||
|
err_message_import db 'Error on load import library box_lib.obj',0
|
||||||
|
align 4
|
||||||
|
myimport:
|
||||||
|
|
||||||
|
edit_box_draw dd aEdit_box_draw
|
||||||
|
edit_box_key dd aEdit_box_key
|
||||||
|
edit_box_mouse dd aEdit_box_mouse
|
||||||
|
version_ed dd aVersion_ed
|
||||||
|
|
||||||
|
dd 0
|
||||||
|
dd 0
|
||||||
|
|
||||||
|
aEdit_box_draw db 'edit_box',0
|
||||||
|
aEdit_box_key db 'edit_box_key',0
|
||||||
|
aEdit_box_mouse db 'edit_box_mouse',0
|
||||||
|
aVersion_ed db 'version_ed',0
|
||||||
|
|
||||||
|
|
||||||
|
;mouse_flag: dd 0x0
|
||||||
|
|
||||||
path1 db '/fd/1/',0
|
path1 db '/fd/1/',0
|
||||||
path2 db '/fd/2/',0
|
path2 db '/fd/2/',0
|
||||||
@ -321,6 +367,8 @@ rb 514
|
|||||||
|
|
||||||
sc system_colors
|
sc system_colors
|
||||||
|
|
||||||
|
cur_dir_path rb 4096
|
||||||
|
library_path rb 4096
|
||||||
align 4
|
align 4
|
||||||
rb 0x100 ; for stack
|
rb 0x100 ; for stack
|
||||||
I_END: ; ¬¥âª ª®æ ¯à®£à ¬¬ë
|
I_END: ; ¬¥âª ª®æ ¯à®£à ¬¬ë
|
||||||
|
Loading…
Reference in New Issue
Block a user