LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 05-02-2008, 05:58 AM   #1
cpetzol2
LQ Newbie
 
Registered: Jan 2007
Posts: 3

Rep: Reputation: 0
Lightweight GUI/Library for X11 (ideally a C++ interface)


Hello,

I have been in search of a simple user interface layer to sit on top of X. I have already dabbled with GTK and QT, but they are way more complex than needed for my project.

I do not need to build a multifunctional application that is cross-platform with a trillion widgets. I need to make an interface that will always be fullscreen on a public computer.

I only need a few things out of the library; keyboard and mouse events, an OpenGL capable widget, some type of built in image support(loading and displaying), and video display. The video display is the one I have the most problems with.

I have looked at a couple of libs that do one thing or another, but never meet all my demands, and the ones that do are often way more than I want.

The solution may be to use multiple libs, but I would like to avoid that if possible. GLUT meets all my needs except the video requirements, and the same for GuiChan and SDL. Several game libraries have what I want but come with to much extra baggage.

Has anyone ran across or used such a library? Out of the many options, which one would you suggest?

Again, I am looking for the smallest, most straightforward solution available. (As few bells and whistles as possible)

Thanks
 
Old 05-02-2008, 09:33 AM   #2
95se
Member
 
Registered: Apr 2002
Location: Windsor, ON, CA
Distribution: Ubuntu
Posts: 740

Rep: Reputation: 32
Would Tk be good? I am pretty sure it covers everything you mentioned, including an OpenGL widget.

http://cpptk.sourceforge.net/
http://togl.sourceforge.net/

Last edited by 95se; 05-02-2008 at 09:34 AM.
 
Old 05-02-2008, 09:41 AM   #3
SciYro
Senior Member
 
Registered: Oct 2003
Location: hopefully not here
Distribution: Gentoo
Posts: 2,038

Rep: Reputation: 51
What do you mean by video display?

SDL can output video, so can OpenGL (both proven by games running at faster FPS then videos run, and video players that use them to output).

Also, fltk has OpenGL and Image widgets.
 
Old 05-02-2008, 11:43 AM   #4
cpetzol2
LQ Newbie
 
Registered: Jan 2007
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks for the replies. I had never even realized Tk was an interface library. I always associated it with Tcl, thinking it was a language component/addon. Tk doesn't seem to have a c++ interface, or at least its not mentioned on the website, http://www.tkdocs.com/resources/languages.html .

Since my first post, I have really taken a liking to glfw (it doesn't even have widgets!)

What I meant by video display was creating a small frame where I need to display steaming avi, alongside some of my OpenGL (video) animations. This is not as straightforward as I thought.

I found one tutorial, http://nehe.gamedev.net/data/lessons....asp?lesson=35 , but it uses a Windows video library. This is totally new stuff for me, and I cant find much documentation. Im guessing I need a lib that can take a .avi frame, spit out a bitmap, and then feed that to OpenGL.

I was hoping to find an interface/library that would handle this for me as easily as possible. But for now, the search continues. The avi playback is still my biggest problem.

Thanks for the help.
 
Old 05-02-2008, 03:21 PM   #5
paulsm4
Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Suggestion - maybe you're looking at this from the wrong angle.

Why not look at some Linux players that "kind-of" do what you want to do ... then look at the source, and see how they're written.

This article's fairly old, but it might be a good starting point:

http://www.linuxjournal.com/article/4698

PS:
From you're first post, I'd suggest either
a) SDL (as far as "simplicity" vs "power", I think that's your best bet)
... or ...
b) Program Xlib directly (DIY/minimalism to the max)

IMHO .. PSM

PS:
Are you by any chance a fan of the (legendary) "Programming Windows" Charlies Petzold?

Last edited by paulsm4; 05-02-2008 at 03:23 PM.
 
Old 05-02-2008, 06:34 PM   #6
cpetzol2
LQ Newbie
 
Registered: Jan 2007
Posts: 3

Original Poster
Rep: Reputation: 0
paulsm4 - Sorry, never heard of the guy (until now). My name just happens to be my old UIUC student ID.

As for the video playback, SDL seems to make it pretty easy, http://www.webkinesia.com/games/rawvideo.php . But I have also been trying to parse some source code, and it may not be extremely difficult to make my own little avi player that would work through OpenGL (instead of using SDL).

I never really even considered going as low-level as xlib (and I probably shouldnt, but that could be fun too). As soon as I started aiming for libs built on xlib, I opened a whole new can of worms that I completely overlooked. Now, I get to read about GLX, Xt, and glitz. I think that some of them may be a little more industrial than I need, but I am very new to OpenGL, and some of the reading on those libs has been very enlightening.

What to do. I am now pretty confident that their are several solutions for me, and I need to quit finding more options, and just pick one. Im not even close to a guru, so I wont be able fully make use of any library I choose anyway. There are just so many options, each with its pros and cons, and it's just a little intimidating/exciting.

I thank you guys for your posts, and you'll probably see me in many more threads with many more questions (hopefully I can narrow it down by then)

Last edited by cpetzol2; 05-02-2008 at 06:44 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Looking for a lightweight distro with good GUI and hardware support senzmail Linux - Newbie 5 01-23-2008 09:59 PM
LXer: The Lightweight X11 Desktop Environment: A return to basics LXer Syndicated Linux News 0 12-05-2007 03:50 AM
programming a lightweight GUI in C thethinker Programming 3 07-13-2007 02:58 PM
How to install Linux (ideally SuSE 9) on a SATA HD? dmazzoni Linux - Hardware 2 03-12-2004 10:00 AM
What's a good lightweight GUI based browser? kleptophobiac Linux - Software 12 12-28-2003 08:23 PM


All times are GMT -5. The time now is 06:57 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration