From b00f697582a29c793da2bcffcffd7c3a3433e413 Mon Sep 17 00:00:00 2001 From: Martin Preuss Date: Mon, 6 Apr 2026 19:01:32 +0200 Subject: [PATCH] avr: added MainWindow_GetFirstChildOfContentWidget --- avr/modules/lcd2/gui2/base/mainwindow.asm | 25 +++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/avr/modules/lcd2/gui2/base/mainwindow.asm b/avr/modules/lcd2/gui2/base/mainwindow.asm index a5e2a45..25353ac 100644 --- a/avr/modules/lcd2/gui2/base/mainwindow.asm +++ b/avr/modules/lcd2/gui2/base/mainwindow.asm @@ -120,6 +120,31 @@ MainWindow_GetContentWidget: +; --------------------------------------------------------------------------- +; @routine MainWindow_GetContentWidget @global +; +; @param Y address of widget +; @param X parent widget (if any) +; @return CFLAG set, if found, cleared otherwise +; @return r19:r18 resulting object +; @clobbers r16 + +MainWindow_GetFirstChildOfContentWidget: + push yl + push yh + bigcall MainWindow_GetContentWidget ; r19:r18=content window (R16) + brcc MainWindow_GetFirstChildOfContentWidget_popRet + mov yl, r18 + mov yh, r19 + bigcall OBJ_GetFirstChild ; get first child +MainWindow_GetFirstChildOfContentWidget_popRet: + pop yh + pop yl + ret +; @end + + + ; ***************************************************************************