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 10-30-2005, 02:05 PM   #1
J_K9
Member
 
Registered: Nov 2004
Distribution: Slackware 11, Ubuntu 6.06 LTS
Posts: 700

Rep: Reputation: 30
Learning C with Glade/for GTK+


Hi,

I'm learning C, but I'd rather take the jump to learn how to program GUI apps in C. I've tried out programming in C (just a simple Hello World app) with Glade, and I discovered that it is vastly different to standard ANSI C. My questions is: what is the difference between the two, and which should I learn?

I'm also looking for a lengthy tutorial on using Anjuta or Glade for C (GTK+) development. So far, I have managed to find Starting off in Glade/GTK+ and Learning to use Glade/Learning to use Anjuta, but none of them are long enough to be useful. I have stumbled across the GTK.org Tutorial, but in that it is coding the entire application (instead of doing the layout visually). I'm just looking for some guidelines, because I would really love to learn how to program GNOME applicatoins in C. Thanks in advance,

M.

Last edited by J_K9; 10-31-2005 at 10:21 AM.
 
Old 10-31-2005, 09:01 AM   #2
naf
Member
 
Registered: Oct 2005
Location: Chicago, USA
Distribution: Slackware & Fedora
Posts: 66

Rep: Reputation: 15
Gnome and GTK based applications rely heavily on other libraries and operating specific extensions. Both build upon the GDK library which encapsulates the X Windows system beautifully. These libraries also use GLIB (not to be confused with glibc) which makes lots of the coding for different platforms easier. It redefines many of the methods provided by the standard C library and redefines the standard types. Moreover, GLIB provides popular data structures such as linked lists, trees, pointer arrays, etc. which makes development easier in C. ANSI C does not offer standard GUI development, so any GUI programming with C will be platform specific.
 
Old 10-31-2005, 10:23 AM   #3
J_K9
Member
 
Registered: Nov 2004
Distribution: Slackware 11, Ubuntu 6.06 LTS
Posts: 700

Original Poster
Rep: Reputation: 30
naf - Thank you for clearing that up. And how would you suggest learning to code GNOME apps in C (using GLIB and the other libraries)? As I said, I only learned some basic stuff in those tutorials (like g_print, gtk_label_set_text and the like), and the other one was just the full whack - no GUI manipulation. So I'm basically looking for a tutorial which is similar to an extention of those simpler ones. Thanks!

M.
 
Old 10-31-2005, 11:12 AM   #4
naf
Member
 
Registered: Oct 2005
Location: Chicago, USA
Distribution: Slackware & Fedora
Posts: 66

Rep: Reputation: 15
Now this is just my opinion. Eveyone learns differently, but perhaps you would be better off learning C first and then introduce yourself to those libraries. In particular, you should be familiar with memory allocation, file I/O, structures, typedefs, pointers (to data and functions), macros and enumerations. At which point, follow the GTK tutorial again (and you will understand it better).
 
Old 10-31-2005, 02:21 PM   #5
J_K9
Member
 
Registered: Nov 2004
Distribution: Slackware 11, Ubuntu 6.06 LTS
Posts: 700

Original Poster
Rep: Reputation: 30
naf - that is probably a better idea, you're right. I actually have K&R right next to me (and I recently ordered an 'Objective C' book, which I'm hoping will be good!), so I'll get going with that! I already have a fair base in C, but nowhere near professional - just the basics. Oh well, thanks for your reply!

Let me get down to learning C now....

M.
 
  


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
Make GTK frontends with Glade objorkum Programming 4 04-12-2005 11:06 AM
Glade / GTK 2.4 Kane635 Linux - Software 0 09-07-2004 07:53 PM
Glade, GTK problem jpostma Programming 0 07-17-2004 01:39 PM
Help with GTK and Glade autogen gtkmike Programming 0 06-13-2004 04:21 PM
Using optionmenu with Glade/GTk robw Programming 0 11-16-2003 03:38 PM

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

All times are GMT -5. The time now is 11:39 PM.

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