Darkhand
Posts: 7
Joined: Sun Sep 28, 2014 3:43 pm

Modern UI frameworks?

Sun Sep 28, 2014 5:31 pm

I've been doing quite a bit of Googling on the subject and haven't found any definitive answers, so I thought I'd ask here before I just go any try every available option... Maybe someone can save me quite a bit of time!

I'm working on an embedded project and am looking for a modern GUI framework to control it via touchscreen. Hoping to avoid running a window manager and use the framebuffer, or perhaps X with a composite manager alone, but that's not a requirement if it causes difficulty.

I'm hoping the Pi Foundation's DSI display come outs around the time I'm finished, so I'm looking to eventually make use of that. I've looked at GTK+, Qt, HTML5, PyGame, Kivy, and a host of other UI frameworks. Before I go and try to code a test in each and every one, I'm wondering if anyone has any experience with modern UIs on the Pi?

Basically looking to have something that's pretty to look at all day, as it'll be visible most of the time. The interface will be displaying a set of default data as well as the need to switch between other sources of information, so I'm looking for some smooth transitions, transparency, etc. Doesn't need to be at the functionality of, say, iOS or Android, but if I can fake it for a few screens I'd be happy. :)

I haven't found any plug and play frameworks that are guaranteed to run smoothly on the Pi. The ones that do don't seem to have much of a UI framework, and starting from scratch is a bit beyond my skill and time available.

Question comes down to this: Can I get a modern UI to run smoothly on the Pi without starting from scratch? Does anyone have any recommendations and or examples? Apps running on the Pi with modern UIs in GTK+, Qt, etc?

Any help would be appreciated! Thanks!

User avatar
PeterO
Posts: 4942
Joined: Sun Jul 22, 2012 4:14 pm

Re: Modern UI frameworks?

Sun Sep 28, 2014 5:48 pm

I run a fairly complex real time application which uses GTK+ on the PI, and it runs just fine.

Just one data point for you ...

PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

Darkhand
Posts: 7
Joined: Sun Sep 28, 2014 3:43 pm

Re: Modern UI frameworks?

Sun Sep 28, 2014 11:44 pm

That's fantastic to know, thanks! I'll start with that.

Any other opinions? I really liked the concept of Kivy but I'm not sure it's quite ready for the Pi yet, even though it says it supports it.

User avatar
Gavinmc42
Posts: 3617
Joined: Wed Aug 28, 2013 3:31 am

Re: Modern UI frameworks?

Tue Sep 30, 2014 7:15 am

Just been looking for the same thing, an OpenVG accelerated display UI framework.
Lots of reading at Khronos web site.
OpenKODE looks like fun.

Altia was looking good but no RPi target.
AndroidVG based on Skia?

Have been using Python with Pygame over Poyray generated bitmaps.
Done a few projects now this way, Pygame OpenVG plugin please?
A Bitmap background with Pygame moving overlay.

OpenSCAD is a 3D CAD generator for programmers.
Maybe Povray source could be a start for a generated background.
With OpenVG layer over the top for instrument needle.

I do like the biplane demo in Pi3D.
Was thinking about start there.
Will have a look at GTK+

Open sourced Tesla Motors instrument cluster?
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

User avatar
Gavinmc42
Posts: 3617
Joined: Wed Aug 28, 2013 3:31 am

Re: Modern UI frameworks?

Wed Oct 01, 2014 1:59 am

Been going through all the Python stuff I downloaded and installed last week.

There is a Python OpenGL ES plugin for Pygame.
https://github.com/stephanh42/rpigl

It does seem to work, mainly GLES2 based, not much OpenVG.
Could be a start for accelerating Pygame enough to be usable.
Gnuplot with OpenVG output is my next requirement, for instrument data display.
Going to try rpigl to see how hard it is to make a UI library.

Most UI's seem to cost $$$
Open Source Automotive UI's will come.
OpenBrick/Tizen etc
http://automotive.linuxfoundation.org/

Hopefully a 12 yr old will figure something for us:)
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

User avatar
Gavinmc42
Posts: 3617
Joined: Wed Aug 28, 2013 3:31 am

Re: Modern UI frameworks?

Thu Oct 02, 2014 2:54 am

Java 8 is now on RPi.

I have used Processing with the early release JDK before to make GUI's.
It was a bit slow which is why I went back to Python/Pygame.

If we could get Java working with OpenVG etc then we could use Java UI tools?

Might have to go QT and C++ otherwise?
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

User avatar
Gavinmc42
Posts: 3617
Joined: Wed Aug 28, 2013 3:31 am

Re: Modern UI frameworks?

Thu Oct 02, 2014 4:28 am

Java 1.8 uses accelerated video hardware for JavaFX?
http://www.raspberrypi.org/forums/viewt ... 5&start=25

Now updating all my Java tools and looking at UI plugins.

There is also JavaME for Raspberry Pi too, GPIO i2c access etc
http://www.oracle.com/technetwork/java/ ... 48924.html

So maybe Java for UIs on RPi maybe a better way, lots of mobile phone out there so should be lots of UI tools around.
The RPi does use a Broadcom mobile phone chip:)

Develop on PC with Netbeans and ssh into the Pi.

Wonder if latest Processing can use the JavaFX hardware accelerator?
http://www.processing.org/ it does use OpenGL
OpenVG/OpenGL ES?
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

User avatar
ajstarks
Posts: 129
Joined: Fri Jun 22, 2012 2:14 am

Re: Modern UI frameworks?

Fri Oct 03, 2014 10:35 am

OpenVG does not provide a UI, but the building blocks are there for the 2D display.
If you are familiar with Processing, the Raspberry Pi OpenVG library:

https://github.com/ajstarks/openvg

might be useful to you. It provides a high-level abstraction to the built-in OpenVG facilities in both C and Go. See:

http://mindchunk.blogspot.com/2012/09/o ... ry-pi.html

User avatar
Gavinmc42
Posts: 3617
Joined: Wed Aug 28, 2013 3:31 am

Re: Modern UI frameworks?

Tue Oct 07, 2014 1:59 am

Yep looked at these first, then went looking for Python interface to OpenVG with UI.
GTK+, TKinter etc, but no good (3D looking ) gadgets.
Life is too short and I have too much to do, to do C/C++ coding, need quick UI's.

Came across lots of Java based UI's instead, for mobile phone etc.
So I went back to look at JDK 1.8, it comes with JavaFX which is supposed to be GPU aware.
Got latest Netbeans + JDK for Windows, compiled StopWatch demo on PC, USB sticked to RPi.
And it works sort of.

JavaME is supposed to be i2c, GPIO aware etc.
Now need to find out if JavaSE ARM is also I/O aware.
Or can JavaME do JavaFX?

Anyway it is worth learning at bit more about Java on the RPi as a UI.
Geany knows Java, not sure if Netbeans works on RPi?
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

User avatar
Gavinmc42
Posts: 3617
Joined: Wed Aug 28, 2013 3:31 am

Re: Modern UI frameworks?

Tue Oct 07, 2014 3:02 am

JavaFX needs a 256MB memory split.

Looks like JavaFX based UI are one way to go for 3D realistic looking UI's.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

User avatar
Gavinmc42
Posts: 3617
Joined: Wed Aug 28, 2013 3:31 am

Re: Modern UI frameworks?

Tue Oct 07, 2014 7:13 am

Maybe this should be moved to the Java forum:)

OK latest update.
There is a JavaFX Scene Builder , a UI designer.
http://docs.oracle.com/javafx/scenebuil ... tarted.htm

Based on FXML, JavaFX Markup Language?

So far the example program StopWatch.jar has been running 6+ hours on a RPi.
I'm impressed, might have to learn another few languages:(
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

nicoswan
Posts: 1
Joined: Wed Jan 14, 2015 4:03 pm

Re: Modern UI frameworks?

Wed Jan 14, 2015 4:14 pm

Hi,
If you want to experiment with a bleeding edge technology you can try Polymer from Google.
https://www.polymer-project.org/
Nico

RudyB
Posts: 35
Joined: Thu Apr 05, 2012 5:58 am

Re: Modern UI frameworks?

Sun Jan 18, 2015 8:40 am

Hi,
Nice discussion, been reading with great interrest.
Currently i am looking for UI / graphics lib to be used on the PiTFT (http://www.adafruit.com/product/1601).
Does any of you know if the UI / graphics tools you use work on this screen?
Because it uses FRAMEBUFFER /dev/fb1 instead of fb0. And i don't want to fbcopy (framebuffercopy) between the buffers, because i will loose framerate.

As far as i know Pygame works and javaFX doesn't, because it is hardcoded to fb0.
Any other UI / graphics libs that work on PiTFT are also welcome.

User avatar
iinnovations
Posts: 621
Joined: Thu Jun 06, 2013 5:17 pm

Re: Modern UI frameworks?

Sun Jan 18, 2015 9:40 am

Surprised nobody suggested a browser. Pi slow. Client(s) fast. Css infinitely flexible.
CuPID Controls :: Open Source browser-based sensor and device control
interfaceinnovations.org/cupidcontrols.html
cupidcontrols.com

RudyB
Posts: 35
Joined: Thu Apr 05, 2012 5:58 am

Re: Modern UI frameworks?

Sun Jan 18, 2015 10:49 am

Why not à browser?
Because i don't wanna start Xwindows. Just console graphics.

m][sko
Posts: 104
Joined: Fri Jul 20, 2012 6:37 am
Location: Slovakia

Re: Modern UI frameworks?

Tue Jan 20, 2015 3:32 pm

Qt5/QML is not good enough?

User avatar
ReBoot
Posts: 147
Joined: Mon Sep 17, 2012 2:23 pm
Location: Germany
Contact: Website

Re: Modern UI frameworks?

Wed Feb 11, 2015 12:59 pm

Console graphics might suck on such a small screen. Unless of course you fiddle with the font size. What's so bad about starting X and using a GUI toolkit? Speaking of which, I've been using Mono's Windows.Forms a lot and find it easy.

darryletter
Posts: 76
Joined: Thu Jan 01, 2015 8:52 pm
Location: KC,MO

Re: Modern UI frameworks?

Thu Feb 19, 2015 2:44 am

i am a visual studio guy and would really like to know if there is a framework like vs or can i use vs to create a UI for the rpi
Life After 60 sucks

User avatar
ReBoot
Posts: 147
Joined: Mon Sep 17, 2012 2:23 pm
Location: Germany
Contact: Website

Re: Modern UI frameworks?

Thu Feb 19, 2015 12:09 pm

Make a Windows.Forms .NET app and run it on the Pi using Mono.
As an example: weatherslice.codeplex.com

darryletter
Posts: 76
Joined: Thu Jan 01, 2015 8:52 pm
Location: KC,MO

Re: Modern UI frameworks?

Mon Feb 23, 2015 1:10 am

ReBoot wrote:Make a Windows.Forms .NET app and run it on the Pi using Mono.
As an example: weatherslice.codeplex.com
I have tried to figure out the best way to do this and it is very time consuming. I am trying glade 3 and gtk+ but i can't find anything on porting to linux from windows and since i am on windows 8.1 with net 4.5 the vb.net projects won't load as they don't support net 4.5.

So should i just dev one the pi its self or is there a way to use windows 8.1 to do it.
Life After 60 sucks

User avatar
ReBoot
Posts: 147
Joined: Mon Sep 17, 2012 2:23 pm
Location: Germany
Contact: Website

Re: Modern UI frameworks?

Mon Feb 23, 2015 9:09 am

darryletter wrote:
ReBoot wrote:Make a Windows.Forms .NET app and run it on the Pi using Mono.
As an example: weatherslice.codeplex.com
I have tried to figure out the best way to do this and it is very time consuming. I am trying glade 3 and gtk+ but i can't find anything on porting to linux from windows and since i am on windows 8.1 with net 4.5 the vb.net projects won't load as they don't support net 4.5.

So should i just dev one the pi its self or is there a way to use windows 8.1 to do it.
Just check out the app. It doesn't use Glade, GTK or whatever, it's just Windows.Forms. Windows.Forms. Why do you want to use GTK? Also, try to compile for the 4.0 profile. Weather Slice runs just fine on the 3.5 Compact profile.

I feel that you're deliberately trying the more complicated way instead of the easiest way.

FYI: I develop with VS 2013 on Windows 10 preview.

PiGraham
Posts: 3575
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: Modern UI frameworks?

Mon Feb 23, 2015 9:17 am

I was just trying out mono-develop on Pi2 yesterday. It seems to be usable for the simple 'hello world' apps I tried.

The controls provided do seem to be based on GTK+

User avatar
ReBoot
Posts: 147
Joined: Mon Sep 17, 2012 2:23 pm
Location: Germany
Contact: Website

Re: Modern UI frameworks?

Mon Feb 23, 2015 9:41 am

Question: do you want to develop on Windows & deloy on Pi or do you want to develop & deploy on Pi?

darryletter
Posts: 76
Joined: Thu Jan 01, 2015 8:52 pm
Location: KC,MO

Re: Modern UI frameworks?

Mon Feb 23, 2015 11:24 am

ReBoot wrote:Question: do you want to develop on Windows & deloy on Pi or do you want to develop & deploy on Pi?
I was kind of hoping to devep on windows and deploy on rpi. The reason for this is the rpi b+ is resource deprived and i was not sure how time consuming it would be to do directly on the rpi.

I could very well be making it a lot more complicated then it should be but there are so many different lib's, app, frameworks, and so on. and some do one thing while others to things differently its a night mare to nav to get a good setup for dev.

As apposed to VS one dev framework for everything.
Last edited by darryletter on Mon Feb 23, 2015 11:32 am, edited 1 time in total.
Life After 60 sucks

PiGraham
Posts: 3575
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: Modern UI frameworks?

Mon Feb 23, 2015 11:30 am

I think that is the idea of Mono. You can develop on Windows and deploy to Pi, or even develop on Pi and deploy to Windows.

I assume Mono maps Windows Forms to whatever native API is appropriate to the target. It appears that may be GTK+ on Raspbian.

Return to “Graphics programming”