Coatzacoalcos, Mexico to

PRINCIPAL

Home
Blog
Conferences
My Photography
Personal Gallery
Joke (Chistes)
Curriculum
Documentation
Contacts me

ARTICLES

Abstract PHP's code with PEAR::DB

Analogs of Windows Software in Linux

El evangelio de Tux (spanish)

Introduction to HTML_QuickForm

The Vi editor

Graphics with Turbo C++

The ftp manual

Installing the Apache Server

How to convert with Latex to PDF file

Configuring Samba.

A basic program in gtk+

OTHER ARTICLES

Introduction to Network security

How to Print Screen with yast.

The DNS Howto's

CONFERENCES

The Information Technology as competitive strategy for PyMEs.

The PHP Extension and Application Repository

A Tutorial for HTML_QuickForm

HTML_QuickForm

What is the impact of Free software in the Organizations and in the Goverment

Free software in the Government

Introduction to Linux

Database Security in MySQL

Stocastics Model for inundations

COURSES

GNU LINUX.
Administration and Configuration.
[See the Chapters]




A basic program in GTK+.

GTK+ is a multi-platform toolkit for creating graphical user interfaces. Offering a complete set of widgets, GTK+ is suitable for projects ranging from small one-off projects to complete application suites.

GTK+ is free software and part of the GNU Project. However, the licensing terms for GTK+, the GNU LGPL, allow it to be used by all developers, including those developing proprietary software, without any license fees or royalties.

The program draw a window with any widgets, the program uses signal that is the base in the gtk+ library.

Example:

#include "libintl.h"
#include "gtk/gtk.h"

gint close1 (GtkWidget *widget, gpointer gdata)
{
        g_print ("Quit.........\n");
        gtk_main_quit();
         return (FALSE);
}

int main(int argc, char *argv[])
{
        GtkWidget *window,*label1;
        gtk_init(&argc,&argv);

        window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
        gtk_window_set_title (GTK_WINDOW (window), "My first aplication in gtk+");

        gtk_signal_connect (GTK_OBJECT (window), "delete_event", GTK_SIGNAL_FUNC (close1), NULL);
        gtk_container_border_width (GTK_CONTAINER (window), 40);
        label1 = gtk_label_new ("Hola mundo gtk+");

        gtk_container_add (GTK_CONTAINER (window),label1 );
        gtk_widget_show (window);
        gtk_widget_show (label1);

        gtk_main();
        return 0;

}

Coments: Note that the widgets are the most important and they are visibles in the aplication with the sentence "gtk_widget_show".


2005 - Farid A. Bielma Lopez

Home | Unix Mexico | El Demonio | OpenBSD | Ubuntu Guide
Internet.com | Barrapunto | Diario Linux | Unam - Cert | Securityfocus
Send me a mail.