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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
11-12-2006, 03:00 AM
|
#1
|
|
Member
Registered: Dec 2004
Distribution: Slackware
Posts: 425
Rep:
|
API for X that works with KDE XFCE etc.
About a year ago, I was working on a library for Windows which would make my life much easier. I simply used the Windows API. I can't seem to find an equivalent in Linux. Everyone wants to use Qt, GTK+, wxWidgets or some other library to design their apps. Then I hear people saying not use Qt because it uses KDE libraries which must be loaded by XFCE or another windows manager and therefore increases memory consumption bla, bla. I want to take things back a step and design the library (I know I'm reinventing the wheel, but I have learned a tremendous amount about Windows this way and hope to do the same with Linux and maybe, just maybe there is a one in a million chance I can make a better library). Where do I start?
|
|
|
|
11-13-2006, 12:31 AM
|
#2
|
|
Guru
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,209
Rep: 
|
Quote:
|
About a year ago, I was working on a library for Windows which would make my life much easier. I simply used the Windows API. I can't seem to find an equivalent in Linux.
|
It dosn't exist. Instead, you have access to the entire source code for the entire thing.
Of course, you could always use java.
|
|
|
|
11-16-2006, 01:23 AM
|
#3
|
|
Member
Registered: Dec 2004
Distribution: Slackware
Posts: 425
Original Poster
Rep:
|
You mean the KDE, Gnome and XFCE do not develop off the X interface? Or do you mean that KDE, Gnome and XFCE all provide their own API and I should not use X?
|
|
|
|
11-16-2006, 05:17 AM
|
#4
|
|
Guru
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,209
Rep: 
|
Neither - I mean there is no equivalent for the Windows API in Linux. You get API functionality through the libraries.
|
|
|
|
11-16-2006, 08:04 AM
|
#5
|
|
Member
Registered: Apr 2002
Location: Windsor, ON, CA
Distribution: Ubuntu
Posts: 740
Rep:
|
^ there is Wine.
|
|
|
|
11-16-2006, 02:45 PM
|
#6
|
|
Guru
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,861
Rep: 
|
binarybob0001 -
The biggest difference between "the Windows Platform API" (aka "Win32") and Linux is that Win32 is basically one, big, "everything and the kitchen sink" API that includes both OS-level as well as GUI stuff.
But yes, you can safely say that "Xlib" is the Linux equivalent of Win32 for "GUI stuff", just as you can safely say that the GCC runtime is the Linux equivalent of Win32's "OS stuff".
And yes, KDE, Gnome, XFCE (and many others) all sit on top of Xlib.
'Hope that helps .. PSM
|
|
|
|
11-17-2006, 02:35 AM
|
#7
|
|
Guru
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,209
Rep: 
|
OT - slightly: I understand that ATI complained about the lack of a windows-like api for the linux kernel in a conference earlier this year. The advantage would be that they wouldn't have to revise their drivers for each individual kernel ... the responce, of course, is that if they open-sourced their drivers, the hackers would do it for them.
(ATI then went on to state that 3D graphics is too complicated for the open-source community to make any contribution... that was an interesting conference.)
Anyway, it can be tricky for programmers used to windows to understand why there isn't a similar all-in-one for linux. It's soo hany, after all. (OTOH: 3rd party software is notoriously shakey under windows...)
|
|
|
|
11-17-2006, 03:12 AM
|
#8
|
|
Member
Registered: Dec 2004
Distribution: Slackware
Posts: 425
Original Poster
Rep:
|
See, I'm learning a lot already  If all the GUI stuff sits on Xlib, then if I make an Xlib program it should run in KDE, Gnome and XFCE? I imagine a problem would be that KDE probably has a library built on top of Xlib to provide say a standard form of dialog box. Which means if I made my own library on top of Xlib, I may not be able to get the appearance to match the current running windows managers appearance. Is this a valid problem, or are there ways of taking care of these differences?
Just one other thing. Do any of you know of books or websites where I can find the kind of information I'm looking for. I really hate to bug others with (probably stupid) questions if it can be avoided.
Thanks for the help.
|
|
|
|
11-17-2006, 03:36 AM
|
#9
|
|
Guru
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,209
Rep: 
|
There are ways of tying in with the current running windows manager as well.
gnome uses gtk and kde uses qt and so forth. I understand that if you issue an instruction to draw a window (say) of a given size and so on, this will get passed to the appropriate windows manager and thus get drawn by it. So anything basic should come out right.
Xlib Programming Manual
By Adrian Nye, Tim O'Reilly
|
|
|
|
11-18-2006, 04:52 AM
|
#10
|
|
Member
Registered: Dec 2004
Distribution: Slackware
Posts: 425
Original Poster
Rep:
|
Thanks Simon, you have helped my tremendously. I am definitely going to look at that book too.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 11:36 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|