mirror of
https://github.com/A2osX/A2osX.git
synced 2024-11-04 03:05:43 +00:00
104 lines
1.9 KiB
Plaintext
104 lines
1.9 KiB
Plaintext
NEW
|
||
AUTO 3,1
|
||
*--------------------------------------
|
||
WND.Init >PUSHBI 0
|
||
>LDYA L.DEVNAME.GFX
|
||
>SYSCALL2 open
|
||
bcs .9
|
||
|
||
sta WND.Screen+S.OBJ.hPARENT
|
||
|
||
>LDYA L.DCB.GFX
|
||
>STYA IOCTL+S.IOCTL.BUFPTR
|
||
lda #S.IOCTL.STATCODE.GETDCB
|
||
sta IOCTL+S.IOCTL.STATCODE
|
||
|
||
>PUSHB WND.Screen+S.OBJ.hPARENT
|
||
>PUSHBI IOCTL.STATUS
|
||
>PUSHW L.IOCTL
|
||
>SYSCALL2 IOCTL
|
||
|
||
.9 rts
|
||
*--------------------------------------
|
||
WND.Setup >LDYA DCB.GFX+S.DCB.GFX.W
|
||
>STYA WND.Screen+S.OBJ.W
|
||
>STYA WND.Desktop+S.OBJ.W
|
||
>STYA WND.SysBar+S.OBJ.W
|
||
|
||
lda SYSFON.H
|
||
clc
|
||
adc #6
|
||
sta WND.SysBar+S.OBJ.H
|
||
|
||
lda DCB.GFX+S.DCB.GFX.H
|
||
sta WND.Screen+S.OBJ.H
|
||
sec
|
||
sbc WND.SysBar+S.OBJ.H
|
||
sta WND.Desktop+S.OBJ.H
|
||
sta WND.SysBar+S.OBJ.X1
|
||
|
||
lda DCB.GFX+S.DCB.GFX.H+1
|
||
sta WND.SysBar+S.OBJ.H+1
|
||
sbc #0
|
||
sta WND.Desktop+S.OBJ.H+1
|
||
sta WND.SysBar+S.OBJ.X1+1
|
||
|
||
>LDYA L.WND.Screen
|
||
jsr OBJ.SetX2Y2
|
||
|
||
>LDYA L.WND.Desktop
|
||
>STYA WND.Screen.Childs
|
||
jsr OBJ.SetX2Y2
|
||
|
||
>LDYA L.WND.SysBar
|
||
>STYA WND.Screen.Childs+2
|
||
jsr OBJ.SetX2Y2
|
||
|
||
lda #CUR.T.ARROW
|
||
sta WND.Desktop+S.WND.hCUR
|
||
sta WND.SysBar+S.WND.hCUR
|
||
|
||
rts
|
||
*--------------------------------------
|
||
WND.Quit lda WND.Screen+S.OBJ.hPARENT
|
||
beq .8
|
||
|
||
pha
|
||
>PUSHBI IOCTL.CLOSE
|
||
>PUSHWZ
|
||
pla
|
||
>SYSCALL2 IOCTL
|
||
|
||
.8 clc
|
||
rts
|
||
*--------------------------------------
|
||
WND.New >STYA ZPPtr1
|
||
|
||
>LDYAI S.WND
|
||
>SYSCALL2 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 clc
|
||
rts
|
||
*--------------------------------------
|
||
MAN
|
||
SAVE usr/src/lib/libgui.s.wnd
|
||
LOAD usr/src/lib/libgui.s
|
||
ASM
|