- re-write the GtkProgressBar section to the 1.1 API. - add an Appendix
Thu Dec 10 17:58:49 GMT 1998 Tony Gale <gale@gtk.org> * docs/gtk_tut.sgml: - re-write the GtkProgressBar section to the 1.1 API. - add an Appendix listing all the signals (apologies to TimJ for taking so long in using his hard work in automating the extraction - thanx Tim). * examples/*: bring them all upto the tutorial versions
This commit is contained in:
committed by
Tony Gale
parent
600ef4e7d1
commit
3821880398
@ -1,6 +1,4 @@
|
||||
/* This file extracted from the GTK tutorial. */
|
||||
|
||||
/* wheelbarrow.c */
|
||||
/* example-start wheelbarrow wheelbarrow.c */
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
@ -121,8 +119,7 @@ static char * WheelbarrowFull_xpm[] = {
|
||||
" "};
|
||||
|
||||
|
||||
/* when invoked (via signal delete_event), terminates the application.
|
||||
*/
|
||||
/* When invoked (via signal delete_event), terminates the application */
|
||||
void close_application( GtkWidget *widget, GdkEvent *event, gpointer data ) {
|
||||
gtk_main_quit();
|
||||
}
|
||||
@ -136,16 +133,16 @@ int main (int argc, char *argv[])
|
||||
GtkStyle *style;
|
||||
GdkGC *gc;
|
||||
|
||||
/* create the main window, and attach delete_event signal to terminate
|
||||
the application. Note that the main window will not have a titlebar
|
||||
since we're making it a popup. */
|
||||
/* Create the main window, and attach delete_event signal to terminate
|
||||
* the application. Note that the main window will not have a titlebar
|
||||
* since we're making it a popup. */
|
||||
gtk_init (&argc, &argv);
|
||||
window = gtk_window_new( GTK_WINDOW_POPUP );
|
||||
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
|
||||
GTK_SIGNAL_FUNC (close_application), NULL);
|
||||
gtk_widget_realize (window);
|
||||
gtk_widget_show (window);
|
||||
|
||||
/* now for the pixmap and the pixmap widget */
|
||||
/* Now for the pixmap and the pixmap widget */
|
||||
style = gtk_widget_get_default_style();
|
||||
gc = style->black_gc;
|
||||
gdk_pixmap = gdk_pixmap_create_from_xpm_d( window->window, &mask,
|
||||
@ -169,5 +166,6 @@ int main (int argc, char *argv[])
|
||||
gtk_widget_show( window );
|
||||
gtk_main ();
|
||||
|
||||
return 0;
|
||||
return(0);
|
||||
}
|
||||
/* example-end */
|
||||
|
||||
Reference in New Issue
Block a user