# How to start writing GNOME/KDE application



## sganesh (Aug 20, 2008)

Hi
  I am interested in Developing /writing  GNOME/KDE Application thro GNU softwares, ,i found Anjuta IDE found to be more applicable for dveloping GNOME application,but i found its much difficult to start with,PL help me in giving link for some sample programs?Pl share us your LINUX devlopment?How to start?
  Any ideas or suggestion?Is there any tutorial for such?
Thanks in advance!


----------



## ray|raven (Aug 20, 2008)

Choose a language and a toolkit to work with.

KDE uses Qt, while Gnome/Xfce use GTK+.
Both toolkits have a wide range of language bindings.

*www.gtk.org/language-bindings.html


----------



## abhinandh (Aug 20, 2008)

if you are talking about GUI programming u need to learn GTK or Qt
if u know only C the GTK cos QT got no bindings for C afaik.
if u know some others like python,c++ IMO Qt is better.


----------



## MetalheadGautham (Aug 20, 2008)

Simple.

Glade Interface Designer for +designing+ gnome apps.+
+QT4 designer a+nd KDevelop for kde apps.


----------



## sganesh (Aug 20, 2008)

MetalheadGautham said:


> Simple.
> 
> Glade Interface Designer for +designing+ gnome apps.+
> +QT4 designer a+nd KDevelop for kde apps.


For Glad wat programming stuffs i need to learn!!!
i know c,c++ and java!!!


----------



## ray|raven (Aug 20, 2008)

^Glade is an interface designer, it lets you create GTK+ UI's that can then be deployed using C/C++/Java or whatever.


----------



## MetalheadGautham (Aug 20, 2008)

sganesh said:


> For Glad wat programming stuffs i need to learn!!!
> i know c,c++ and java!!!


Cool. Glade can be programmed with in C++, C and Java too. Choose one and start designing. 

QT4 is used MAINLY with C++, then with Java (qt4-jambi) and then with Python (PyQt).


----------



## sganesh (Aug 20, 2008)

Thanks,But in net i found many Ebooks onGNome GUI  programming only at cost!!
But i need free tutorials,resources or ebook which guides me in programming,i am unable to find it!!!
pl Help!


----------



## MetalheadGautham (Aug 20, 2008)

sganesh said:


> Thanks,But in net i found many Ebooks onGNome GUI  programming only at cost!!
> But i need free tutorials,resources or ebook which guides me in programming,i am unable to find it!!!
> pl Help!


WTH ? There are LOTS of free ebooks available. Go and check glade's own website.
And see gnome doccumentation.

These interface designers help you place widgets on windows. Then they generate source code.

For a shortcut, with old fashioned text coding, use *gtkmm.h* headder file in C++. You can use its objects in your program as you like.


----------



## nitish_mythology (Aug 20, 2008)

If we r familiar with swings in java...do we need to learn gtk fr dev gnome applications?


----------



## ray|raven (Aug 20, 2008)

^Yes, you would have to learn gtk  , there is java-gnome project that offers an api for java.

You could also learn swt -Standard Widget Toolkit for java, which draws native widgets , unlike swing which tries to emulate the look-and-feel.


----------



## nitish_mythology (Aug 20, 2008)

^^but why?? dont u have a platform independent VM ?? Why wont swings work in Linux???

Ps: Coding in java will be independent of kde/gnome ?? wont it be??


----------



## ray|raven (Aug 20, 2008)

SWT is platform independent.

If you code with gtk , you will need gtk installed for the app to run.
Swing will work in linux, But the UI _emulates_ the gtk look.
However , its getting quite close to the real thing.


----------



## nitish_mythology (Aug 20, 2008)

So we will have the speed advantage if using gtk??


----------



## ray|raven (Aug 20, 2008)

Yes, because the widget drawing is not handled by jvm.
However , the same is the case with SWT.


----------



## MetalheadGautham (Aug 20, 2008)

nitish_mythology said:


> So we will have the speed advantage if using gtk??


doubt it. but personally speaking, I think its better to stick to native java instead of a gtk _skin_ for java.
and gtk itself is in C. gtk-java is just a way to use gtk widgets and program with them in java.

And if you need something more professional that blends with gtk, why don't you try wxWidgets ?


----------



## nitish_mythology (Aug 20, 2008)

How do u practically implement java+gtk code together??


----------



## ray|raven (Aug 20, 2008)

@Metal
SWT is a waay better way of getting a native ui using java than using wxwidgets.

@nitish
Java Gnome provides the api of using gtk widgets through java.
*java-gnome.sourceforge.net/


----------



## nitish_mythology (Aug 20, 2008)

Anyways m better off wth swings..

@Rayraven
Teacher teaching history of comp n binary system


----------



## MetalheadGautham (Aug 20, 2008)

ray|raven said:


> @Metal
> SWT is a waay better way of getting a native ui using java than using wxwidgets


i din day using java. i said wx is the best gtk toolkit.+


----------



## ray|raven (Aug 20, 2008)

MetalheadGautham said:


> i din day using java.



You seriously need a new keyboard.



MetalheadGautham said:


> i said wx is the best gtk toolkit.+



wx is the best gtk toolkit?
Either your nuts or you're drunk.


----------



## MetalheadGautham (Aug 20, 2008)

ray|raven said:


> wx is the best gtk toolkit?
> Either your nuts or you're drunk.


i used wx and the thing i liked was its ease of use.
never tried py-gtk or gnome-java though.

But TO HELL with gtk. QT pwns 'em all


----------



## ray|raven (Aug 20, 2008)

^You didnt get the point yet.


> i said *wx* is the best *gtk* toolkit.+


wxwidgets and gtk are two seperate ui toolkits.


----------



## MetalheadGautham (Aug 20, 2008)

ray|raven said:


> ^You didnt get the point yet.
> 
> wxwidgets and gtk are two seperate ui toolkits.


wx is BASED on gtk.
and you can use wx to make native looking apps for gnome and xfce.
vlc is an example.


----------



## sganesh (Aug 20, 2008)

How about Anjuta IDE to start with(It comes bundled with OpenSuse11),i saw using that we can Develop KDE/GNOME application?
Have anyone tried?


----------



## ray|raven (Aug 20, 2008)

@MetalHeadGautham.

How abt you backup your extraordinary claims for once?
wxwidgets are NOT based on GTK+.

wxwidgets , like SWT , provide a layer to use the native widgets of the platform.


----------



## mehulved (Aug 20, 2008)

sganesh said:


> How about Anjuta IDE to start with(It comes bundled with OpenSuse11),i saw using that we can Develop KDE/GNOME application?
> Have anyone tried?


Yes, you can start but you will have to learn one of the GUI toolkits to get any further.


----------



## MetalheadGautham (Aug 21, 2008)

ray|raven said:


> @MetalHeadGautham.
> 
> How abt you backup your extraordinary claims for once?
> wxwidgets are NOT based on GTK+.
> ...


maybe my basic concepts are wrong, but...
till today I thought libwx was an extention to libgtk


----------



## gary4gar (Aug 23, 2008)

MetalheadGautham said:


> Cool. Glade can be programmed with in C++, C and Java too. Choose one and start designing.
> 
> QT4 is used MAINLY with C++, then with Java (qt4-jambi) and then with Python (PyQt).


I tried glade once, and i was disappointed
in my view its still not upto the mark, though it does work pretty well


----------



## sganesh (Aug 24, 2008)

ya,GLade IDE is diificult to follow!!,and It's very tedious to see documentation and start programming!!


----------

