C program under Linux ------ GNOME: Window

zhaozj2021-02-16  103

#include

Static void button_clicked (gtkwidget * button, gpointer data)

{

CHAR * STRING = DATA;

g_print (string);

}

Int main (int Argc, char * argv [])

{

Gtkwidget * app;

Gtkwidget * button;

GNOME_INIT ("GNomewin", "0.1", Argc, Argv);

App = gnome_app_new ("eXample", "window title");

Button = gtk_button_new_with_label ("Hello WORLD / N");

GTK_SIGNAL_CONNECT (GTK_Object (app), "delete_event", gtk_signal_func (gtk_main_quit), null;

GTK_SIGNAL_CONNECT (GTK_Object (Button), "Clicked", GTK_SIGNAL_FUNC (Button_Clicked), "OUCK! / N");

GNOME_APP_SET_CONTENTS (GNOME_APP (App), Button;

GTK_WIDGET_SHOW_ALL (AP);

gtk_main ();

Return 0;

}

转载请注明原文地址:https://www.9cbs.com/read-10783.html

New Post(0)