; *************************************************************************** ; copyright : (C) 2026 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_GUI2_AQHOME_D_LIGHT_CONNS_ASM #define AQH_AVR_GUI2_AQHOME_D_LIGHT_CONNS_ASM ; *************************************************************************** ; defines ; widget .equ DLGLIGHTCONNS_OFFS_BEGIN = CDIALOG_SIZE .equ DLGLIGHTCONNS_OFFS_SETTINGS_LO = DLGLIGHTCONNS_OFFS_BEGIN+0 .equ DLGLIGHTCONNS_OFFS_SETTINGS_HI = DLGLIGHTCONNS_OFFS_BEGIN+1 .equ DLGLIGHTCONNS_OFFS_CURRDLG_LO = DLGLIGHTCONNS_OFFS_BEGIN+2 .equ DLGLIGHTCONNS_OFFS_CURRDLG_HI = DLGLIGHTCONNS_OFFS_BEGIN+3 .equ DLGLIGHTCONNS_SIZE = DLGLIGHTCONNS_OFFS_BEGIN+4 ; selectors .equ DLGLIGHTCONNS_SEL_BTN_MOTION1 = DIALOG_SEL_NEXTFREE+0 .equ DLGLIGHTCONNS_SEL_ADDR_MOTION1 = DIALOG_SEL_NEXTFREE+1 .equ DLGLIGHTCONNS_SEL_VALUE_MOTION1 = DIALOG_SEL_NEXTFREE+2 .equ DLGLIGHTCONNS_SEL_DLG_MOTION1 = DIALOG_SEL_NEXTFREE+3 .equ DLGLIGHTCONNS_SEL_BTN_MOTION2 = DIALOG_SEL_NEXTFREE+4 .equ DLGLIGHTCONNS_SEL_ADDR_MOTION2 = DIALOG_SEL_NEXTFREE+5 .equ DLGLIGHTCONNS_SEL_VALUE_MOTION2 = DIALOG_SEL_NEXTFREE+6 .equ DLGLIGHTCONNS_SEL_DLG_MOTION2 = DIALOG_SEL_NEXTFREE+7 .equ DLGLIGHTCONNS_SEL_BTN_LIGHT = DIALOG_SEL_NEXTFREE+8 .equ DLGLIGHTCONNS_SEL_ADDR_LIGHT = DIALOG_SEL_NEXTFREE+9 .equ DLGLIGHTCONNS_SEL_VALUE_LIGHT = DIALOG_SEL_NEXTFREE+10 .equ DLGLIGHTCONNS_SEL_DLG_LIGHT = DIALOG_SEL_NEXTFREE+11 .equ DLGLIGHTCONNS_SEL_BTN_NEXTFREE = DIALOG_SEL_NEXTFREE+12 ; *************************************************************************** ; code .cseg ; --------------------------------------------------------------------------- ; @routine DlgLightConns_new @global ; ; @param Y pointer to GUIAPP ; @return CFLAG set of okay, cleared otherwise ; @return Y address of newly created object ; @param r21:r20 pointer to settings DlgLightConns_new: bigcall GuiApp_GetRootWindow ; r19:r18=root window (none) brcc DlgLightConns_new_ret mov xl, r18 ; use root window as parent for main window mov xh, r19 ldi r24, LOW(DLGLIGHTCONNS_SIZE) ldi r25, HIGH(DLGLIGHTCONNS_SIZE) push r20 push r21 bigcall Object_Alloc ; Y=space (!r16, !r17, !X) pop r21 pop r20 brcc DlgLightConns_new_ret rcall DlgLightConns_Init DlgLightConns_new_ret: ret ; @end ; --------------------------------------------------------------------------- ; @routine DlgLightConns_Init @global ; ; @param Y pointer to dialog ; @param X pointer to root window ; @return CFLAG set of okay, cleared otherwise ; @param r21:r20 pointer to settings ; @clobbers any, !Y DlgLightConns_Init: push r20 push r21 ldi r16, 0 ; OPTS ldi r17, (WIDGET_PACK_FILLED<