-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What's required to write a GUI App? #2
Comments
Hi @Skeeve, This library is relatively low level, as it exposes the API provided by the InkView SDK. You can check device info, get events, draw on screen, force it to refresh. But there is no complete GUI framework to use. So you either need to try building a GUI app using those primitives (e.g. drawing lines, boxes and pixels) or we need to think which existing Golang framework can be used with this SDK. If you want to try the first way, you will need to implement the App interface, and call Run. This will start the event loop handle by the SDK. Events will automatically call the related callback on the interface: // Key is called on each key-related event.
Key(e KeyEvent) bool
// Pointer is called on each pointer-related event.
Pointer(e PointerEvent) bool
// Touch is called on each touch-related event.
Touch(e TouchEvent) bool
// Orientation is called each time an orientation of device changes.
Orientation(o Orientation) bool In the If this is too much trouble for the app you want to build, we definitely need to explore ways to integrate with existing GUI frameworks for Go. |
I really would prefer to "explore ways to integrate with existing GUI frameworks for Go." I think that would be most beneficial for everyone. |
Currently you see me completely clueless in regards what this is about and what's required to get it to work. |
After a chat with guys at Fyne, it seems like there is a way to make it work with this kind of renderer as well. This might take a while, though. |
I looked into it and the first step that is required is to get a direct access to PB framebuffer. The short path is to just render to a bitmap and then draw it using Inkview API. Unfortunately I hit some issues when trying to render RGB images (it should be supported according to docs). Grayscale works, but it would require too many copy operations which may affect performance significantly (get RGB framebuffer, copy it to grayscale, copy to PB). So I started to look into a different direction: reverse engineer the |
Hi Denys… |
Might be interesting: "Building cross-platform Go GUIs fast using Fyne" With the growing popularity of Go many people are asking how to build a solid GUI. The language design to target concurrency and portability makes it a great match for cross-platform development. This talk shows how the Fyne toolkit is designed to help make beautiful and idiomatic native apps with Go. This talk explores the Fyne toolkit and what is new with the recently released version 2.0. We will explore the main features including canvas, widgets, data binding, test support and app store packaging. We will step through how to build an application using standard widgets, data binding and storage, and then see how it can be distributed for practically all graphical operating systems and app stores. |
I think this project is dead, did you guys created something before and can share some more information, tips etc.? |
Hi.
I do not understand how to write a GUI app for Pocketbook. Did you already do it? Do you have an example?
I think I need to include some GUI library (which one) to be able to paint windows and buttons and to react to button presses.
But as I never ever did that in any language (besides Javascript in a browser), I'm clueless here.
Do you have some guidance, please?
The text was updated successfully, but these errors were encountered: