From 063818335663e7aa626434d5dc035f8b5455e5ae Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sun, 2 Mar 2025 13:34:09 -0600 Subject: start moving to standard internal TK functions --- structs.go | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) (limited to 'structs.go') diff --git a/structs.go b/structs.go index a9702a4..425698e 100644 --- a/structs.go +++ b/structs.go @@ -77,13 +77,14 @@ type config struct { stdout stdout // information for the STDOUT window dropdown dropdown // the dropdown menu textbox dropdown // the textbox popup window - clock dropdown // the textbox popup window - allwin []*guiWidget // for tracking which window is next - dark bool // use a 'dark' color palette - mouse mouse // mouse settings - showDebug bool // todo: move this into config struct - debug bool // todo: move this into config struct - starttime time.Time // checks how long it takes on startup + // clock dropdown // the textbox popup window + notify libnotify // emulates the desktop libnotify menu + allwin []*guiWidget // for tracking which window is next + dark bool // use a 'dark' color palette + mouse mouse // mouse settings + showDebug bool // todo: move this into config struct + debug bool // todo: move this into config struct + starttime time.Time // checks how long it takes on startup } // stuff controlling how the mouse works @@ -127,14 +128,23 @@ type dropdown struct { h int // the height active bool // is the dropdown menu currently in use? init bool // moves the window offscreen on startup - Id int `default:"-78"` // the widget id to use - wId int `default:"-78"` // the widget id to use + // Id int `default:"-78"` // the widget id to use + wId int `default:"-78"` // the widget id to use +} + +// settings for the dropdown window +type internalTK struct { + tk *guiWidget // where to show STDOUT + callerTK *guiWidget // which widget called the dropdown menu + wId int // the widget id to use + active bool // is the internal widget currently in use? } // the desktop libnotify menu type libnotify struct { - clock *guiWidget // where to show the clock - menu *guiWidget // where to show the clock + clock internalTK // widget for the clock + menu internalTK // libnotify menu icon + window internalTK // the libnotify menu } // this is the gocui way -- cgit v1.2.3