Jump to content
  • Advertisement
Sign in to follow this  
sakky

Programming with X

This topic is 5004 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Do any of you know how to program with X? I'm trying to find some good tutorials that will eventually teach me the complete inner workings of it or close to it. If not a link, how about a good book then?

Share this post


Link to post
Share on other sites
Advertisement
O'Reilly publishes the XLib books. That's probably about as good as you're going to get, beyond Googling for XLib or X11 programming.

I'll tell you this, from what I know of it, it's a pain in the ass.

Share this post


Link to post
Share on other sites
Quote:
Original post by RenderTarget
I'll tell you this, from what I know of it, it's a pain in the ass.


I'll second that, if your final goal is to become comfortable with GUI programming you might be better off learning some of the common toolkits (GTK, QT, wxWidgets, etc.).

If you really are interested in X itself you might want to play around with the code for one of the simpler window managers (I'm thinking the *box ones in particular), and it might be a reasonable way to start off.

Share this post


Link to post
Share on other sites
XLib is quite strange, but in some respects, quite similar to Win32's GDI.

Unfortunately it doesn't have an equivalent of Win32's USER library, i.e. there are no standard widgets (If you ignore Xaw).

Xaw is the X "athena widgets" library which dates back to the year ? and can be used to create applications which look... well.... dated :)

For examples of Xaw look at xedit or xfig.

I haven't made anything significant using Xlib, but I recommend that you DON'T write your own WM - everyone seems to have done that already. Plus also WMs are quite arcane beasties.

NOTE: I've just looked on my machine and it seems that my distro has a Xaw library with "3d-look" widgets - which means they almost look 90s vintage :)

Mark

Share this post


Link to post
Share on other sites
I'm interested in X it's self because the NVIDIA driver. But I seam to have forgot about the NVIDIA module that doesn't need X at all. From my understanding, all I need is the interface to the module and I can do what ever I want with it. So I wouldn't need X to run my GeForce I only need the module interfaces that came with the driver. I'm more concerned about hardware acceleration and OpenGL.

I though about writing my own VM but I though that I needed X for most of the support that I will need in my applications. But I guess just using the modules directly would be the same. The main reason I'm wanting to do this type of thing is so that I can make a very custom and unique desktop. I've though about implementing directly with a shell or sort of shell / desktop. Not to be M$ like but to make it easier when programming with it (for me any ways).

Lets see, I don't really need X if I can use may hardware with out it. I can write my own GUI, it's not that hard (in my eyes) but it's very time consuming. I don't mean to shit on everything with Linux, but I just want a support custom OS. X seams to be a little out there if you know what I mean; judging my some of you posts, you do.

I'm looking for something less complicated and more direct. The GUI is just that and that is all I need it for. I think that X uses it's own drivers for stuff, correct? I wouldn't do that, I would leave it to the Kernel to handle it's hardware but have interfaces the components and there implementation just simple accesses those modules. On the other end, the user sees the same thing and so does the programmer.

I'm leaving out a ton of stuff that I've though about and wrote little designs for over some time now. But I want to merge the shell and windowing system into one. You may not agree with me, but wait until I'm finished with it. So the whole reason I'm wanting to learn X is so that I know X, and that I will be able to understand it's architecture better.

Share this post


Link to post
Share on other sites
I didn't know you hadto pay for Qt! I was wanting to get all the KDE sources but I couldn't. I found that I had to pay for Qt unless I get the GPL version. Either of these libraries will not download because of FTP. I can do anthing with FTP for some reason.

Share this post


Link to post
Share on other sites
Although I'd suggest GTK,
What is wrong with the
GPL'd version of QT? It is
the same thing as the commercial
version, just different licensing.
Edit: Both GTK and QT should
be in your distro.

http://www.trolltech.com/download/qt/x11.html
just in case.

Share this post


Link to post
Share on other sites
I'm not running a distro right now. I'm running XP. I've been studying Linux a lot so it'll be easier to use and install. The SuSE Linux that I bought is all messed. So I'm going to build my own Linux from scratch and rewrite any applications I need to. In order to write my own mods for Linuix stuff I need to know it's software architecture. I also need to know what's junk and what isn't.

Share this post


Link to post
Share on other sites
This is my story:

I've read lots of material that dogs on X. I was lucky to find a few articles wrote specifically for it. I see that it's architecture is screwy and that it has it's own driver type of things. I really don't like this because I don't think a window system or GUI should even worry about drivers; that's the Kernel's job. So I need to learn X so I can rewrite the applications I use that use X. I can't convert any applications that use X if I don't understand it.

My type of system is purely interface driven. Implementations are wrote to use the Kernel's drivers modules. The programmer write applications that uses these interfaces. Keeping from them, all the internal workings of things. If a programmer would like to change or add new things to the system, they only need to write the implementation that interfaces with the correct module.

With my system, applications deal directly with the Kernel module's via interface implementation. A programmer doesn't need to worry about the implementations, unless they wish to create there own. It's hard to explain and I'm leaving out lots of details, but it'll be cool when I'm finished with it.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!