A2osX/LIB/LIBGUI.S.WND.txt
2018-07-20 13:51:08 +02:00

83 lines
1.4 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

NEW
PREFIX /A2OSX.BUILD
AUTO 4,1
*--------------------------------------
WND.Init >LDYA L.DEVNAME.GFX
>SYSCALL GetDevByName.YA
bcs .9
stx hDevScreen
txa
>SYSCALL GetDevStatus
bcs .9
>STYA ZPPtr1
ldy #S.DIB.GFX.W
lda (ZPPtr1),y
sta WND.Cache+S.OBJ.W
iny
lda (ZPPtr1),y
sta WND.Cache+S.OBJ.W+1
lda SYSFONB.H
clc
adc #6
sta WND.TB.H
iny #S.DIB.GFX.H
lda (ZPPtr1),y
sec
sbc SYSFONB.H
sta WND.Cache+S.OBJ.H
iny
lda (ZPPtr1),y
sbc #0
sta WND.Cache+S.OBJ.H+1
lda #S.WND.F.NOBORDER
sta WND.Cache+S.OBJ.F
lda #CUR.T.ARROW
sta WND.Cache+S.WND.hCUR
>LDYA L.WND.CACHE
jsr WND.New
bcs .9
stx WND.Stack
.9 rts
*--------------------------------------
WND.Quit
clc
rts
*--------------------------------------
WND.New >STYA ZPPtr1
>SYSCALL getmem
bcs .9
>STYA ZPWNDPtr
ldy #S.WND-1
.1 lda (ZPPtr1),y
sta (ZPWNDPtr),y
dey
bpl .1
.9 rts
*--------------------------------------
WND.Paint >STYA ZPPtr1
clc
rts
*--------------------------------------
WND.Close
*--------------------------------------
MAN
SAVE /A2OSX.SRC/LIB/LIBGUI.S.WND
LOAD /A2OSX.SRC/LIB/LIBGUI.S
ASM