LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 12-18-2004, 06:27 AM   #1
Maidros
Member
 
Registered: Jan 2004
Location: Haifa, Israel
Distribution: Debian, FreeBSD, Solaris
Posts: 101

Rep: Reputation: 15
X windows toolkits - to use or not to use?


Hello folks,
I am writing a GUI to a set of programs of mine. My main requirement is that it should work across several platforms (all UNIXs and Linux), not the beauty of the interface. The interface is also very simple (a few menus, and buttons), so I do not need advanced features of the toolkits. Should I use any toolkit (if so, which would be convenient across several platforms)?

My programs are completely ANSI C compliant, so porting them across UNIXs and Linux should be pretty simple. I thought of writing using just the Xlibs, without any toolkit. Would this be frowned upon? Also I would be happy to know if writing using only Xlibs would help overcome portability problems or if there are UNIX platforms that do not support Xlibs
Regards,
Maidros
 
Old 12-18-2004, 11:43 AM   #2
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,994

Rep: Reputation: 76
All UNIX programs support XLib, and there's probably implementations for Windows too.

Don't use XLib. Take a look at the API; it's very low-level. You have routines to draw primative shapes, copy graphics around and capture mouse and keyboard events, and that's about it.

Qt is a very good cross-platform widget set that uses C++ (together with a metacompiler) and makes creating GUIs easy. There are also pleanty of cross-platform APIs out there that you could use. One such is SDL (www.libsdl.org) which is also quite low-level but at least takes advantage of hardware acceleration transparantly.

Searching freshmeat.net for “cross-platform widget toolkit” yields literally hundreds of results, many of which may be useful to you. http://freshmeat.net/search/?q=cross...&Go.x=0&Go.y=0
 
Old 12-18-2004, 05:21 PM   #3
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 244Reputation: 244Reputation: 244
You could also programing with motif widgets if your application is for unix and linux
 
Old 12-19-2004, 01:40 AM   #4
Maidros
Member
 
Registered: Jan 2004
Location: Haifa, Israel
Distribution: Debian, FreeBSD, Solaris
Posts: 101

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by rjlee
All UNIX programs support XLib, and there's probably implementations for Windows too.

Don't use XLib. Take a look at the API; it's very low-level. You have routines to draw primative shapes, copy graphics around and capture mouse and keyboard events, and that's about it.

Qt is a very good cross-platform widget set that uses C++ (together with a metacompiler) and makes creating GUIs easy. There are also pleanty of cross-platform APIs out there that you could use. One such is SDL (www.libsdl.org) which is also quite low-level but at least takes advantage of hardware acceleration transparantly.

Searching freshmeat.net for “cross-platform widget toolkit” yields literally hundreds of results, many of which may be useful to you. http://freshmeat.net/search/?q=cross...&Go.x=0&Go.y=0
Thanks for the info. Will check Qt and freshmeat.
 
Old 12-19-2004, 01:42 AM   #5
Maidros
Member
 
Registered: Jan 2004
Location: Haifa, Israel
Distribution: Debian, FreeBSD, Solaris
Posts: 101

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by Cedrik
You could also programing with motif widgets if your application is for unix and linux
If Motif is supported on all UNIXs and Linux, it would serve my purpose admirably. Thanks for the info. I will check if
it is supported on all UNIXs.
 
Old 12-19-2004, 08:25 AM   #6
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
How wide does "all UNIXs" mean for you ?

I guess that for a new project, you mean all Unixes that are still widely used:
Gnu/Linux major distributions (RH/Debian/Suse/...)
FreeBSD/OpenBSD
MacOS/X
Solaris
AIX
HP-UX
Irix
and probably a couple of others I'm missing.

There's a free open source motif clone available at:
http://www.lesstif.org/
that should work with all the O/S I listed.
Motif is included with Solaris, HP-UX and AIX (as part of CDE).
You'll find also information about the original motif, and specially the fact that it is now free to download/use on open source platforms:
http://www.opengroup.org/openmotif/datasheet.html
 
Old 12-20-2004, 01:21 AM   #7
Maidros
Member
 
Registered: Jan 2004
Location: Haifa, Israel
Distribution: Debian, FreeBSD, Solaris
Posts: 101

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by jlliagre
How wide does "all UNIXs" mean for you ?

I guess that for a new project, you mean all Unixes that are still widely used:
Gnu/Linux major distributions (RH/Debian/Suse/...)
FreeBSD/OpenBSD
MacOS/X
Solaris
AIX
HP-UX
Irix
and probably a couple of others I'm missing.


Well, the platforms on which my program is expected to work include
GNU/ Linux (RH, Debian, Slackware, and other major ones)
*BSD (FreeBSD, OpenBSD, NetBSD)
AIX
Solaris
Irix
- that would be all, I think.

Quote:
There's a free open source motif clone available at:
http://www.lesstif.org/
that should work with all the O/S I listed.
Motif is included with Solaris, HP-UX and AIX (as part of CDE).
You'll find also information about the original motif, and specially the fact that it is now free to download/use on open source platforms:
http://www.opengroup.org/openmotif/datasheet.html
Thanks - will check about the lesstif, and what platforms it is supported on. Thanks for the info.
Regards,
Maidros
 
  


Reply



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
ARM-Linux Cross compilation Toolkits 2.95 hazzyb Programming 3 02-06-2009 10:21 AM
Red Hat Linux 9 + Windows Server 2003 + Windows XP + Fedora in same domain wolfy339 Linux - Networking 5 03-02-2005 06:03 AM
SuSE 9.1 and Windows Xp refuse to live in harmony: error loading windows through GRUB sanctumtacete Linux - Newbie 3 10-19-2004 07:47 AM
GUI application design toolkits. which one? name_in_use450 Programming 3 08-25-2004 07:56 PM
Learning more than one toolkits? melinda_sayang Programming 4 04-28-2004 11:11 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:08 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration