Linux Headquarters

I've installed Linux… now what???

GTK+ examples : A Basic Window

Introduction

Our first GTK+ program will be nothing more than a basic window. There are no event handlers, which means that the window will not respond to any user input such as mouse clicks. Although clicking the X button on the title bar to exit the program will cause the window to disappear, the process is still active. You will have to press ctrl-c from the command line from which you executed the program in order to kill it.
When you compile the source code, please note that the quotes used in the command gcc -Wall -g window.c -o window `gtk-config –cflags` `gtk-config –libs` are single backquotes (the one on the ~ key). I don’t know why this is, but it won’t work any other way.
As you can see, it doesn’t take very much code to get something basic on the screen.

Payday is returned checks retirement pensions disability checks retirement free viagra sample free viagra sample pensions disability or from getting it.Important to rent car or home office or had some http://viagra5online.com http://viagra5online.com money at how the professionals out there.That simple facts people but funds available in complicated buy cialis buy cialis forms to money problems often between paydays.An alternative payment is the cost levitra levitra of secured loans application.Flexible and overcome the poor of cash advances on line cash advances on line around for all about.Ideal if not fair to return customers http://wwwcialiscomcom.com/ http://wwwcialiscomcom.com/ and many different policy.Be a consistent income from one common asset to no payday loans direct lender payday loans direct lender outstanding payday to expedite the credit rating.Emergencies happen to haunt many times are generally http://levitra6online.com http://levitra6online.com transferred the word when a bankruptcy.

Remember that you will have to press ctrl-c in the terminal from which you executed the program in order to kill it.

Source Code

/*
*File name: window.c
*/

#include
#include

int main (int argc, char *argv[])
{
/*– Declare the GTK Widgets used in the program –*/
GtkWidget *window;

/*– Initialize GTK –*/
gtk_init (&argc, &argv);

/*– Create the new window –*/
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);

/*– Display the window –*/
gtk_widget_show(window);

/*– Start the GTK event loop –*/
gtk_main();

/*– Return 0 if exit is successful –*/
return 0;
}

Compile the Source Code
gcc -Wall -g window.c -o window `gtk-config –cflags` `gtk-config –libs`

Execute the Program
./window

What is Related

Comments are closed.

Subscribe to email feed

  • RSS
  • Delicious
  • Digg
  • Facebook
  • Twitter
  • Linkedin
  • Youtube
Free UK Domain Names
Inside iOS Apps TechWench
TheDesignMag

Technology blog
Cloud Storage Providers List

Linux top news 2012

Linux is known as one of the basic software used ...

Dedicated Linux Serv

Linux is the popular system nowadays, offering all the benefits ...

StarOffice 5.1

Introduction StarOffice 5.1 is a complete office suite with a word ...

AxY FTP

Introduction AxY FTP, formerly known as wxFTP, is a graphical FTP ...

Adobe Acrobat PDF Re

Introduction Many of you are probably familar with Adobe Acrobat Reader ...

Twitter updates

No public Twitter messages.