Replies: 1 comment 2 replies
-
To answer the question most directly you are looking for the App.Lifecycle() api which will run a callback when the app is foregrounded (window is completely shown). Alternatively you can run your capture code from a goroutine that is started before you run the app. However running the app headless using the default driver will still use the main display to show the window - is that what you want? There is also the software renderer like we use in unit testing which does not use the screen at all, and does not have the event loop to work around. Of course the trade-off is that you would have to handle events but I expect you'll have to do that anyway with your eink device. |
Beta Was this translation helpful? Give feedback.
-
Hello :)
I am currently working on a project using eink display like this one
I first started drawing raw image but as the layout gets more complex it's getting really painful so I was thinking to use fyne to render the GUI an an image.
I can make a screenshot responding to a button for example like this
But then now I am trying to make it completely headless like this
but the
window.ShowAndRun
being blocking, the code never reach the screenshot part.How can I achieve this ? Is there a way to define something like a
OnShow
event on the Window to run this code of code like I could do to respond tu a button click ?Thanks
Beta Was this translation helpful? Give feedback.
All reactions