another GUI approach, this time more generic.
This commit is contained in:
@@ -194,7 +194,9 @@ onMessageReceived:
|
||||
; Called every 100ms. Add your routine calls here. No arguments, no results.
|
||||
|
||||
onEvery100ms:
|
||||
bigcall DialogMgr_Every100ms
|
||||
ldi zl, LOW(testCntrl*2)
|
||||
ldi zh, HIGH(testCntrl*2)
|
||||
bigcall GuiCntrl_Every100ms
|
||||
ret
|
||||
|
||||
onEveryMinute:
|
||||
@@ -221,9 +223,17 @@ onEveryLoop:
|
||||
|
||||
|
||||
test:
|
||||
bigcall DialogMgr_Init
|
||||
bigcall DlgNetStats_Init
|
||||
bigcall DialogMgr_PushDialog
|
||||
ldi zl, LOW(testCntrl*2)
|
||||
ldi zh, HIGH(testCntrl*2)
|
||||
|
||||
; init GuiAppCntrl
|
||||
ldi r16, OBJECT_SIGNAL_CREATE
|
||||
clr r17
|
||||
bigcall OBJ_TreeAllHandleSignal
|
||||
|
||||
; show first app
|
||||
bigcall GuiCntrl_ShowFirstApp
|
||||
|
||||
ret
|
||||
|
||||
|
||||
@@ -238,16 +248,16 @@ test:
|
||||
|
||||
.include "common/debug.asm"
|
||||
|
||||
.include "modules/lcd2/gui/titlewindow2.asm"
|
||||
.include "modules/lcd2/gui/dialog.asm"
|
||||
.include "modules/lcd2/gui/button.asm"
|
||||
;.include "modules/lcd2/font/font2.asm"
|
||||
;.include "modules/lcd2/font/font3.asm"
|
||||
;.include "modules/lcd2/font/font16x26.asm"
|
||||
;.include "modules/lcd2/font/font4.asm"
|
||||
;.include "modules/lcd2/font/font12x16.asm"
|
||||
.include "modules/lcd2/ili9341/font12x16.asm"
|
||||
.include "modules/lcd2/ili9341/font12x16_1.asm"
|
||||
|
||||
;.include "modules/lcd2/ili9341/font12x16.asm"
|
||||
;.include "modules/lcd2/ili9341/font12x16_1.asm"
|
||||
.equ ili9341Font12x16_1 = 0
|
||||
|
||||
;.include "modules/lcd2/ili9341/font12x20.asm"
|
||||
;.include "modules/lcd2/ili9341/font12x20_1.asm"
|
||||
;.include "common/list_t.asm"
|
||||
@@ -255,8 +265,14 @@ test:
|
||||
.include "common/divide.asm"
|
||||
.include "common/ressource.asm"
|
||||
|
||||
.include "modules/lcd2/gui/style.asm"
|
||||
.include "dlg_netstats.asm"
|
||||
.include "modules/lcd2/gui2/style.asm"
|
||||
.include "modules/lcd2/gui2/object.asm"
|
||||
.include "modules/lcd2/gui2/widget.asm"
|
||||
.include "modules/lcd2/gui2/guiapp.asm"
|
||||
.include "modules/lcd2/gui2/guicntrl.asm"
|
||||
|
||||
.include "testwin.asm"
|
||||
|
||||
.include "ressources.inc"
|
||||
|
||||
|
||||
|
||||
101
avr/devices/c03/main/testwin.asm
Normal file
101
avr/devices/c03/main/testwin.asm
Normal file
@@ -0,0 +1,101 @@
|
||||
; ***************************************************************************
|
||||
; copyright : (C) 2025 by Martin Preuss
|
||||
; email : martin@libchipcard.de
|
||||
;
|
||||
; ***************************************************************************
|
||||
; * This file is part of the project "AqHome". *
|
||||
; * Please see toplevel file COPYING of that project for license details. *
|
||||
; ***************************************************************************
|
||||
|
||||
#ifndef AQH_AVR_DEVICE_C03_TESTWIN_ASM
|
||||
#define AQH_AVR_DEVICE_C03_TESTWIN_ASM
|
||||
|
||||
|
||||
; ***************************************************************************
|
||||
; defines
|
||||
|
||||
|
||||
|
||||
; ***************************************************************************
|
||||
; data
|
||||
|
||||
.dseg
|
||||
|
||||
testApp_ramdata:
|
||||
.byte GUIAPP_SD_SIZE
|
||||
|
||||
|
||||
testWin_ramdata:
|
||||
.byte WIDGET_SD_SIZE
|
||||
|
||||
|
||||
|
||||
; ***************************************************************************
|
||||
; code
|
||||
|
||||
.cseg
|
||||
|
||||
testCntrl:
|
||||
; OBJECT
|
||||
.dw 0 ; next
|
||||
.dw 0 ; parent
|
||||
.dw testApp_flashdata*2 ; first child
|
||||
.dw 0 ; target
|
||||
.dw 0 ; selector (ony lower 8 bits used)
|
||||
.dw testCntrl_signalmap*2 ; signal map
|
||||
|
||||
testCntrl_signalmap:
|
||||
.db 0, OBJECT_SIGNAL_CREATE, LOW(GuiCntlr_OnCreate), HIGH(GuiCntlr_OnCreate)
|
||||
.db 0, GUIAPP_SIGNAL_RAISE, LOW(GuiCntlr_OnRaise), HIGH(GuiCntlr_OnRaise)
|
||||
.db 0, 0, 0, 0 ; end of table
|
||||
|
||||
|
||||
testApp_flashdata:
|
||||
; OBJECT
|
||||
.dw 0 ; next
|
||||
.dw testCntrl*2 ; parent
|
||||
.dw 0 ; first child
|
||||
.dw testCntrl*2 ; target
|
||||
.dw 0 ; selector (ony lower 8 bits used)
|
||||
.dw testApp_signalmap*2 ; signal map
|
||||
; GUIAPP
|
||||
.dw testApp_ramdata ; SDRAM data
|
||||
.dw testWin_flashdata*2 ; root widget
|
||||
.dw 0 ; root timer
|
||||
|
||||
testApp_signalmap:
|
||||
.db 0, OBJECT_SIGNAL_CREATE, LOW(GuiApp_OnCreate), HIGH(GuiApp_OnCreate)
|
||||
.db 0, 0, 0, 0 ; end of table
|
||||
|
||||
|
||||
testWin_flashdata:
|
||||
; OBJECT
|
||||
.dw 0 ; next
|
||||
.dw 0 ; parent
|
||||
.dw 0 ; first child
|
||||
.dw 0 ; target
|
||||
.dw 0 ; selector (ony lower 8 bits used)
|
||||
.dw testWin_signalmap*2 ; signal map
|
||||
; WIDGET
|
||||
.db 0, 0 ; opts lo, hi
|
||||
.dw 0 ; X
|
||||
.dw 0 ; Y
|
||||
.dw DISPLAY_WIDTH ; W
|
||||
.dw DISPLAY_HEIGHT ; H
|
||||
.dw 0 ; front color
|
||||
.dw DISPLAY_COLOR_PURPLE ; back color
|
||||
; .dw STYLE_WIN_FONT*2 ; font
|
||||
.dw 0 ; font
|
||||
.dw testWin_ramdata ; ptr to SDRAM
|
||||
testWin_signalmap:
|
||||
.db 0, OBJECT_SIGNAL_CREATE, LOW(Widget_OnCreate), HIGH(Widget_OnCreate)
|
||||
.db 0, WIDGET_SIGNAL_DRAW, LOW(Widget_OnDraw), HIGH(Widget_OnDraw)
|
||||
.db 0, 0, 0, 0 ; end of table
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user