GNU Info

Info Node: (gtk.info)Initialization and exit

(gtk.info)Initialization and exit


Next: Customization Prev: Miscellaneous Up: Miscellaneous
Enter node , (file) or (file)node

Initializing and exiting GTK
============================

Initializing
------------

   Before any GTK functions can be utilized the library must be
initialized. This can be accomplished by calling the `gtk_init'
function. The arguments you pass to this function should be the same
arguments that were passed to your application. This function will
parse the arguments that it understands and handle initializing the GDK
library for you.

Exiting
-------

Functions
---------

 - Function: void gtk_init (int *ARGC, char **ARGV)
     Function to initialize GTK and GDK for you. This function will
     remove any command line arguments from ARGC and ARGV that it
     understands.

          int main (int argc, char *argv[])
          {
             ...Any local variables or non GTK/GDK initialization
          
             /* Initialize GTK. */
             gtk_init(&argc, &argc);
          
          }

 - Function: void gtk_exit (int ERROR_CODE)
     Exit GTK and perform any necessary cleanup. `gtk_exit' will call
     the systems `exit' function passing ERROR_CODE as the parameter.

 - Function: gint gtk_events_pending (void)
     Returns the number of events pending on the event queue.

 - Function: void gtk_main (void)

 - Function: guint gtk_main_level (void)

 - Function: void gtk_main_quit (void)
     A call to this function will cause the `gtk_main' function to exit,
     thereby allowing your application to exit.


automatically generated by info2www version 1.2.2.9