A2osX/LIB/LIBGUI.S.WND.txt

107 lines
2.0 KiB
Plaintext
Raw Normal View History

NEW
2018-11-17 17:17:13 +00:00
PREFIX
AUTO 4,1
*--------------------------------------
2019-01-08 16:29:26 +00:00
WND.Init >PUSHBI 0
>LDYA L.DEVNAME.GFX
>SYSCALL open
2018-05-16 06:02:57 +00:00
bcs .9
2019-01-10 16:26:58 +00:00
sta SCR+S.SCREEN.hDEV
2019-01-09 16:42:20 +00:00
>LDYA L.DCB.GFX
>STYA IOCTL+S.IOCTL.BUFPTR
lda #S.IOCTL.STATCODE.GETDCB
sta IOCTL+S.IOCTL.STATCODE
>PUSHW L.IOCTL
>PUSHBI IOCTL.STATUS
2019-01-10 16:26:58 +00:00
lda SCR+S.SCREEN.hDEV
2019-01-09 16:42:20 +00:00
>SYSCALL IOCTL
2019-01-10 16:26:58 +00:00
.9 rts
*--------------------------------------
WND.Setup >LDYA DCB.GFX+S.DCB.GFX.W
>STYA SCR+S.OBJ.W
>STYA WND.Desktop+S.OBJ.W
>STYA WND.SysBar+S.OBJ.W
2018-05-16 06:02:57 +00:00
2019-01-08 16:29:26 +00:00
lda SYSFON.H
2018-05-16 06:02:57 +00:00
clc
2019-01-14 07:11:50 +00:00
adc #6
2019-01-10 16:26:58 +00:00
sta WND.SysBar+S.OBJ.H
2018-05-16 06:02:57 +00:00
2019-01-09 06:58:19 +00:00
lda DCB.GFX+S.DCB.GFX.H
2019-01-10 16:26:58 +00:00
sta SCR+S.OBJ.H
2018-05-16 06:02:57 +00:00
sec
2019-01-10 16:26:58 +00:00
sbc WND.SysBar+S.OBJ.H
sta WND.Desktop+S.OBJ.H
sta WND.SysBar+S.OBJ.X1
2018-05-16 06:02:57 +00:00
2019-01-10 16:26:58 +00:00
lda DCB.GFX+S.DCB.GFX.H+1
sta WND.SysBar+S.OBJ.H+1
2018-05-16 06:02:57 +00:00
sbc #0
2019-01-10 16:26:58 +00:00
sta WND.Desktop+S.OBJ.H+1
sta WND.SysBar+S.OBJ.X1+1
>LDYA L.SCR
jsr OBJ.SetX2Y2
2018-05-16 06:02:57 +00:00
2019-01-10 16:26:58 +00:00
>LDYA L.WND.Desktop
>STYA SCR.Childs
jsr OBJ.SetX2Y2
2018-05-16 06:02:57 +00:00
2019-01-10 16:26:58 +00:00
>LDYA L.WND.SysBar
jsr OBJ.SetX2Y2
>STYA SCR.Childs+2
>LDYA L.WND.Desktop
2018-05-16 06:02:57 +00:00
lda #CUR.T.ARROW
2019-01-10 16:26:58 +00:00
sta WND.Desktop+S.WND.hCUR
sta WND.SysBar+S.WND.hCUR
rts
2018-05-16 06:02:57 +00:00
*--------------------------------------
2019-01-10 16:26:58 +00:00
WND.Quit lda SCR+S.SCREEN.hDEV
2019-01-08 16:29:26 +00:00
beq .8
pha
>PUSHBI IOCTL.CLOSE
>PUSHWI 0
pla
>SYSCALL IOCTL
.8
clc
rts
*--------------------------------------
2018-05-16 06:02:57 +00:00
WND.New >STYA ZPPtr1
2019-01-09 06:58:19 +00:00
>LDYAI S.WND
2018-07-20 11:51:08 +00:00
>SYSCALL getmem
2018-05-16 06:02:57 +00:00
bcs .9
>STYA ZPWNDPtr
ldy #S.WND-1
.1 lda (ZPPtr1),y
sta (ZPWNDPtr),y
dey
bpl .1
.9 rts
*--------------------------------------
WND.Paint >STYA ZPPtr1
2018-05-16 06:02:57 +00:00
clc
rts
*--------------------------------------
2019-01-10 16:26:58 +00:00
WND.Close clc
rts
*--------------------------------------
MAN
2018-11-17 17:17:13 +00:00
SAVE USR/SRC/LIB/LIBGUI.S.WND
LOAD USR/SRC/LIB/LIBGUI.S
ASM