You are not logged in.

#1 2006-09-29 14:52:38

clownfish
Member
Registered: 2006-09-04
Posts: 72

Desktop apps developing: where to start

Hi!

I wanna develop some nifty little helpers doing common daily stuff, like checking the up time of the internet connection and displaying it anywhere on the desktop or in the gnome-panel. that's just an example. a lot of this tasks can be done with cronjobs and bash-scripts, but for graphical stuff there's somethin' else needed.

The question: Where to start? I know, a forum search and googling brings up a lot of tutorials, but I even don't have a point where to start, which programming language is best for apps like this.
And no, I'm not looking for general programming tutorials.

Thanks in advice!

Offline

#2 2006-09-29 16:53:35

bboozzoo
Member
From: Poland
Registered: 2006-08-01
Posts: 125

Re: Desktop apps developing: where to start

Well there's plethora of ways you can do build desktop apps. The language is mostly irrelevant nowadays, choose whichever you prefer, C, C++, C#, python, perl, tcl. You may start with deciding on language and possibly toolkint you would wish to use. Some hints, using C you have GTK as your primary toolking, then goes GNUstep thing, Xlib as an option if you need sort of hackish feeling, Motif if you have access to libraries and some ancient Unix system. If you would prefer C++, there's Qt (excellent documentation on http://doc.trolltech.com) and GTKmm.  I personally prefer Qt since it's easy, intuitive and is a base of KDE.
You may end up using python which, surprisingly,  seems to be preferred by most of people on the forums. If so then pygtk or pyqt is a must.
I would discourage from using horrid toolkits like wxWidgets, no fun at all.
Other thing for desktop apps would be inter-app communication and sharing common functionality, which is handled by Kparts & DCOP for KDE3, and (correct me if I'm wrong) bonobo - a CORBA-like thing for gnome (?).
For KDE these will be useful:
http://developer.kde.org/documentation/
API reference
http://developer.kde.org/documentation/library/
Both Qt and GTKmm have nice tutorial which help you get started quite easily.
However if you would like to write conky like stuff, then unfortunately Xlib is the way:
http://www.tronche.com/gui/x/
Some common desktop standards (system tray, iccm window manager etc.) are provided here:
http://standards.freedesktop.org/

Offline

#3 2006-10-24 16:41:46

aquila_deus
Member
From: Taipei
Registered: 2005-07-02
Posts: 348
Website

Re: Desktop apps developing: where to start

clownfish wrote:

Hi!

I wanna develop some nifty little helpers doing common daily stuff, like checking the up time of the internet connection and displaying it anywhere on the desktop or in the gnome-panel. that's just an example. a lot of this tasks can be done with cronjobs and bash-scripts, but for graphical stuff there's somethin' else needed.

The question: Where to start? I know, a forum search and googling brings up a lot of tutorials, but I even don't have a point where to start, which programming language is best for apps like this.
And no, I'm not looking for general programming tutorials.

Thanks in advice!

0.C would be sufficient. There are bindings for other languages too but they usually lack documents (typical for gnome's stuff...)
1.Read http://developer.gnome.org/doc/API/2.0/glib/ and http://developer.gnome.org/doc/API/2.0/gtk/index.html
2.get the source of gnome-applets, or look at mine => http://aur.archlinux.org/packages/gnome … nu-applet/ smile

Panel applet is a bit different from normal desktop app, and not very easy to test. It may be better if you first make a prototype as standalone app and convert to applet later.

Offline

#4 2006-10-24 17:56:41

pauldonnelly
Member
Registered: 2006-06-19
Posts: 776

Re: Desktop apps developing: where to start

For very simple displays just writing them with xlib won't be too hard. Unless you really need what a toolkit provides (buttons, text boxes, scroll bars, and whatnot), then they're not going to offer you much that X doesn't already offer. I've only written X code in Lisp, which is very pleasant. I hear horror stories about doing it in C, but I'm not sure what those people were trying to accomplish.

I'm not sure how panel apps are written. Maybe GTK is needed for the Gnome panel.

Offline

#5 2006-10-25 02:20:18

aquila_deus
Member
From: Taipei
Registered: 2005-07-02
Posts: 348
Website

Re: Desktop apps developing: where to start

pauldonnelly wrote:

For very simple displays just writing them with xlib won't be too hard. Unless you really need what a toolkit provides (buttons, text boxes, scroll bars, and whatnot), then they're not going to offer you much that X doesn't already offer. I've only written X code in Lisp, which is very pleasant. I hear horror stories about doing it in C, but I'm not sure what those people were trying to accomplish.

I'm not sure how panel apps are written. Maybe GTK is needed for the Gnome panel.

Read WMs' code and you'd see how horrible it is wink It would also limit the functions he could add in future, such as DnD, anti-aliasing text, etc.

There is no reason to use Xlib directly; if you want to make a simple window and paint, gdk+cairo would be great.

Offline

#6 2006-10-25 02:23:05

lessthanjake
Member
From: Norway
Registered: 2005-11-09
Posts: 319
Website

Re: Desktop apps developing: where to start

This one may be of interest: http://www.gnome.org/~newren/tutorials/ … ith-gnome/

If you want results fast, then pygtk is great. I find it really easy and intuitive.

No mater where you decide to start you should look at the examples that come with the toolkits source code. They are usualy of great help.

Offline

Board footer

Powered by FluxBB