From 8ac34068ba42d927c74e0a8f6d628014c4d426d0 Mon Sep 17 00:00:00 2001 From: BST 2000 Tony Gale Date: Wed, 19 Jul 2000 13:10:41 +0000 Subject: [PATCH] Yet more clean ups. Completes first pass. Hurrah! Wed Jul 19 14:07:57 BST 2000 Tony Gale * docs/tutorial/gtk-tut.sgml: Yet more clean ups. Completes first pass. Hurrah! --- ChangeLog | 5 + ChangeLog.pre-2-0 | 5 + ChangeLog.pre-2-10 | 5 + ChangeLog.pre-2-2 | 5 + ChangeLog.pre-2-4 | 5 + ChangeLog.pre-2-6 | 5 + ChangeLog.pre-2-8 | 5 + docs/tutorial/gtk-tut.sgml | 1751 +++++++++++++++++++----------------- 8 files changed, 963 insertions(+), 823 deletions(-) diff --git a/ChangeLog b/ChangeLog index f642eb4b1f..022dad334f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Wed Jul 19 14:07:57 BST 2000 Tony Gale + + * docs/tutorial/gtk-tut.sgml: Yet more clean ups. + Completes first pass. Hurrah! + Tue Jul 18 17:17:55 BST 2000 Tony Gale * docs/tutorial/gtk-tut.sgml: More clean ups. diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index f642eb4b1f..022dad334f 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,8 @@ +Wed Jul 19 14:07:57 BST 2000 Tony Gale + + * docs/tutorial/gtk-tut.sgml: Yet more clean ups. + Completes first pass. Hurrah! + Tue Jul 18 17:17:55 BST 2000 Tony Gale * docs/tutorial/gtk-tut.sgml: More clean ups. diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index f642eb4b1f..022dad334f 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,8 @@ +Wed Jul 19 14:07:57 BST 2000 Tony Gale + + * docs/tutorial/gtk-tut.sgml: Yet more clean ups. + Completes first pass. Hurrah! + Tue Jul 18 17:17:55 BST 2000 Tony Gale * docs/tutorial/gtk-tut.sgml: More clean ups. diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index f642eb4b1f..022dad334f 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,8 @@ +Wed Jul 19 14:07:57 BST 2000 Tony Gale + + * docs/tutorial/gtk-tut.sgml: Yet more clean ups. + Completes first pass. Hurrah! + Tue Jul 18 17:17:55 BST 2000 Tony Gale * docs/tutorial/gtk-tut.sgml: More clean ups. diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index f642eb4b1f..022dad334f 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,8 @@ +Wed Jul 19 14:07:57 BST 2000 Tony Gale + + * docs/tutorial/gtk-tut.sgml: Yet more clean ups. + Completes first pass. Hurrah! + Tue Jul 18 17:17:55 BST 2000 Tony Gale * docs/tutorial/gtk-tut.sgml: More clean ups. diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index f642eb4b1f..022dad334f 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,8 @@ +Wed Jul 19 14:07:57 BST 2000 Tony Gale + + * docs/tutorial/gtk-tut.sgml: Yet more clean ups. + Completes first pass. Hurrah! + Tue Jul 18 17:17:55 BST 2000 Tony Gale * docs/tutorial/gtk-tut.sgml: More clean ups. diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index f642eb4b1f..022dad334f 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,8 @@ +Wed Jul 19 14:07:57 BST 2000 Tony Gale + + * docs/tutorial/gtk-tut.sgml: Yet more clean ups. + Completes first pass. Hurrah! + Tue Jul 18 17:17:55 BST 2000 Tony Gale * docs/tutorial/gtk-tut.sgml: More clean ups. diff --git a/docs/tutorial/gtk-tut.sgml b/docs/tutorial/gtk-tut.sgml index 0a0a9ac2fe..fc16fa0287 100755 --- a/docs/tutorial/gtk-tut.sgml +++ b/docs/tutorial/gtk-tut.sgml @@ -157,7 +157,7 @@ int main( int argc, The meaning of the unusual compilation options is explained below in -Compiling Hello World. +Compiling Hello World. All programs will of course include gtk/gtk.h which declares the variables, functions, structures, etc. that will be used in your GTK @@ -346,7 +346,7 @@ int main( int argc, - + Compiling Hello World To compile use: @@ -637,11 +637,11 @@ should be propagated further by the GTK event handling mechanism. Returning TRUE indicates that the event has been handled, and that it should not propagate further. Returning FALSE continues the normal event handling. See the section on -Advanced Event and Signal Handling for more details on this +Advanced Event and Signal Handling for more details on this propagation process. For details on the GdkEvent data types, see the appendix entitled -GDK Event Types. +GDK Event Types. @@ -1974,7 +1974,7 @@ learn how a widget works just by looking at the function declarations. The following widgets do not have an associated window. If you want to capture events, you'll have to use the EventBox. See the section on -the EventBox widget. +the EventBox widget. GtkAlignment @@ -2146,7 +2146,7 @@ selection, and other graphics data relevant to a widget. These style values are defaulted in each widget, and are required by many GDK function calls, such as gdk_pixmap_create_from_xpm, which here is given the "normal" background color. The style data of widgets may -be customized, using GTK's rc files. +be customized, using GTK's rc files. Also notice the call to gtk_widget_realize after setting the window's border width. This function uses GDK to create the X @@ -2280,7 +2280,7 @@ toggle button. - + Radio Buttons Radio buttons are similar to check buttons except they are grouped so @@ -2433,7 +2433,7 @@ int main( int argc, - Adjustments +Adjustments GTK has various widgets that can be visually adjusted by the user using the mouse or the keyboard, such as the range widgets, described @@ -2469,9 +2469,9 @@ propagate adjustment values transparently between adjustable widgets. You will see how adjustments fit in when you see the other widgets that incorporate them: -Progress Bars, -Viewports, -Scrolled Windows, and others. +Progress Bars, +Viewports, +Scrolled Windows, and others. @@ -2668,7 +2668,7 @@ clicking in the trough advances the slider towards the location of the click, either completely, or by a designated amount, depending on which mouse button is used. -As mentioned in Adjustments above, +As mentioned in Adjustments above, all range widgets are associated with an adjustment object, from which they calculate the length of the slider and its position within the trough. When the user manipulates the slider, the range widget will @@ -2742,7 +2742,7 @@ order to avoid confusing yourself, you probably want to create your adjustment with a page_size of 0.0 so that its upper value actually corresponds to the highest value the user can select. (If you're already thoroughly confused, read the section on Adjustments again for an explanation of +linkend="ch-Adjustments">Adjustments again for an explanation of what exactly adjustments do and how to create and manipulate them.) @@ -3280,7 +3280,7 @@ window. Labels are used a lot in GTK, and are relatively simple. Labels emit no signals as they do not have an associated X window. If you need to -catch signals, or do clipping, place it inside a +catch signals, or do clipping, place it inside a EventBox widget or a Button widget. To create a new label, use: @@ -3357,7 +3357,7 @@ first two characters and eight and ninth characters. Below is a short example to illustrate these functions. This example makes use of the Frame widget to better demonstrate the label -styles. You can ignore this for now as the Frame widget is explained later on. +styles. You can ignore this for now as the Frame widget is explained later on. /* example-start label label.c */ @@ -3680,7 +3680,7 @@ you'll ever want to know :-) - + Progress Bars Progress bars are used to show the status of an operation. They are @@ -4192,7 +4192,7 @@ vertical box. - + Pixmaps Pixmaps are data structures that contain pictures. These pictures can @@ -5168,7 +5168,7 @@ action of holding down one of the buttons optionally results in an acceleration of change in the value according to how long it is depressed. -The Spin Button uses an Adjustment +The Spin Button uses an Adjustment object to hold information about the range of values that the spin button can take. This makes for a powerful Spin Button widget. @@ -6749,7 +6749,7 @@ int main( int argc, Container Widgets - + The EventBox Some GTK widgets don't have associated X windows, so they just draw on @@ -6886,7 +6886,7 @@ space allocated to the widget. For an example of using an Alignment widget, refer to the example for -the Progress Bar widget. +the Progress Bar widget. @@ -7083,7 +7083,7 @@ void gtk_layout_set_vadjustment( GtkLayout *layout, - + Frames Frames can be used to enclose one or a group of widgets with a box @@ -7492,17 +7492,17 @@ int main( int argc, - + Viewports It is unlikely that you will ever need to use the Viewport widget directly. You are much more likely to use the -Scrolled Window widget which +Scrolled Window widget which itself uses the Viewport. A viewport widget allows you to place a larger widget within it such that you can view a part of it at a time. It uses -Adjustments to define the area that +Adjustments to define the area that is currently in view. A Viewport is created with the function @@ -7550,7 +7550,7 @@ void gtk_viewport_set_shadow_type( GtkViewport *viewport, - +Scrolled Windows Scrolled windows are used to create a scrollable area with another @@ -8147,7 +8147,7 @@ together quite often. Well, what we do above is just a straightforward initialization of the toolbar widget and creation of a GDK pixmap with its mask. If you want to know something more about using pixmaps, refer to GDK -documentation or to the Pixmaps section +documentation or to the Pixmaps section earlier in this tutorial. @@ -8195,7 +8195,7 @@ or +GTK_TOOLBAR_CHILD_BUTTON). In the above case we start creating a radio group. In creating other radio buttons for this group a pointer to the previous button in the group is required, so that a list of buttons can be easily constructed (see the section on Radio Buttons earlier in this +linkend="sec-RadioButtons"> Radio Buttons earlier in this tutorial). @@ -9714,7 +9714,7 @@ scrolled window to ensure that it is big enough to see the tree's items, as the default size for ScrolledWindow is quite small. Now that you have a tree, you'll probably want to add some items to -it. The Tree Item Widget below +it. The Tree Item Widget below explains the gory details of TreeItem. For now, it'll suffice to create one, using: @@ -9723,7 +9723,7 @@ GtkWidget *gtk_tree_item_new_with_label( gchar *label ); You can then add it to the tree using one of the following (see -Functions and Macros +Functions and Macros below for more options): @@ -9783,7 +9783,7 @@ void gtk_tree_set_selection_mode( GtkTree *tree, The semantics associated with the various selection modes are described in the section on the CList widget. As with the CList widget, the "select_child", "unselect_child" (not really - see Signals below for an explanation), +linkend="sec-TreeSignals">Signals below for an explanation), and "selection_changed" signals are emitted when list items are selected or unselected. However, in order to take advantage of these signals, you need to know which Tree widget they will be @@ -9870,7 +9870,7 @@ a level one greater than the parent level. This field is set only after a Tree widget is actually mapped (i.e. drawn on the screen). - + Signals @@ -9907,7 +9907,7 @@ child, nor on emission of the "toggle" signal by gtk_item_toggle(). - + Functions and Macros @@ -10090,7 +10090,7 @@ above warning applies here, too. - + Tree Item Widget The TreeItem widget, like CListItem, is derived from Item, @@ -10541,7 +10541,8 @@ the menus. In the true tradition of teaching, we'll show you the hard way first. :) -There are three widgets that go into making a menubar and submenus: +There are three widgets that go into making a menubar and submenus: + a menu item, which is what the user wants to select, e.g., "Save" @@ -10561,11 +10562,9 @@ which, when selected, activates the menu. Let's look at the functions that are used to create menus and menubars. This first function is used to create a new menubar. - - + GtkWidget *gtk_menu_bar_new( void ); - - + This rather self explanatory function creates a new menubar. You use gtk_container_add to pack this into a window, or the box_pack @@ -10612,32 +10611,32 @@ standard File menu, with the options Open, Quit, the code would look something like: - file_menu = gtk_menu_new (); /* Don't need to show menus */ + file_menu = gtk_menu_new (); /* Don't need to show menus */ - /* Create the menu items */ + /* Create the menu items */ open_item = gtk_menu_item_new_with_label ("Open"); save_item = gtk_menu_item_new_with_label ("Save"); - quit_item = gtk_menu_item_new_with_label ("Quit"); + quit_item = gtk_menu_item_new_with_label ("Quit"); - /* Add them to the menu */ + /* Add them to the menu */ gtk_menu_append (GTK_MENU (file_menu), open_item); gtk_menu_append (GTK_MENU (file_menu), save_item); - gtk_menu_append (GTK_MENU (file_menu), quit_item); + gtk_menu_append (GTK_MENU (file_menu), quit_item); - /* Attach the callback functions to the activate signal */ + /* Attach the callback functions to the activate signal */ gtk_signal_connect_object (GTK_OBJECT (open_items), "activate", GTK_SIGNAL_FUNC (menuitem_response), (gpointer) "file.open"); gtk_signal_connect_object (GTK_OBJECT (save_items), "activate", GTK_SIGNAL_FUNC (menuitem_response), - (gpointer) "file.save"); + (gpointer) "file.save"); - /* We can attach the Quit menu item to our exit function */ + /* We can attach the Quit menu item to our exit function */ gtk_signal_connect_object (GTK_OBJECT (quit_items), "activate", GTK_SIGNAL_FUNC (destroy), - (gpointer) "file.quit"); + (gpointer) "file.quit"); - /* We do need to show menu items */ + /* We do need to show menu items */ gtk_widget_show (open_item); gtk_widget_show (save_item); gtk_widget_show (quit_item); @@ -10650,19 +10649,19 @@ looks like this: menu_bar = gtk_menu_bar_new (); gtk_container_add (GTK_CONTAINER (window), menu_bar); - gtk_widget_show (menu_bar); + gtk_widget_show (menu_bar); - file_item = gtk_menu_item_new_with_label ("File"); + file_item = gtk_menu_item_new_with_label ("File"); gtk_widget_show (file_item); Now we need to associate the menu with file_item. This is done with the function - + void gtk_menu_item_set_submenu( GtkMenuItem *menu_item, GtkWidget *submenu ); - + So, our example would continue with @@ -10673,10 +10672,10 @@ void gtk_menu_item_set_submenu( GtkMenuItem *menu_item, All that is left to do is to add the menu to the menubar, which is accomplished using the function - + void gtk_menu_bar_append( GtkMenuBar *menu_bar, GtkWidget *menu_item ); - + which in our case looks like this: @@ -10699,20 +10698,25 @@ attached: Create a new menu using gtk_menu_new() + Use multiple calls to gtk_menu_item_new() for each item you wish to have on your menu. And use gtk_menu_append() to put each of these new items on to the menu. + Create a menu item using gtk_menu_item_new(). This will be the root of the menu, the text appearing here will be on the menubar itself. + Use gtk_menu_item_set_submenu() to attach the menu to the root menu item (the one created in the above step). + Create a new menubar using gtk_menu_bar_new. This step only needs to be done once when creating a series of menus on one menu bar. + Use gtk_menu_bar_append() to put the root menu onto the menubar. @@ -10724,24 +10728,26 @@ example. Take these steps: Create an event handling function. It needs to have the -prototype - +prototype + static gint handler (GtkWidget *widget, GdkEvent *event); - -and it will use the event to find out where to pop up the menu. + +and it will use the event to find out where to pop up the menu. + In the event handler, if the event is a mouse button press, treat event as a button event (which it is) and use it as shown in the sample code to pass information to gtk_menu_popup(). -Bind that event handler to a widget with - + +Bind that event handler to a widget with + gtk_signal_connect_object (GTK_OBJECT (widget), "event", GTK_SIGNAL_FUNC (handler), GTK_OBJECT (menu)); - -where widget is the widget you are binding to, + +where widget is the widget you are binding to, handler is the handling function, and menu is a menu created with gtk_menu_new(). This can be a menu which is also posted by a menu bar, as shown in the sample code. @@ -10936,30 +10942,30 @@ static void print_hello( GtkWidget *w, Item 5: The item type, used to define what kind of an item it is. Here are the possible values: - NULL -> "" - "" -> "" - "" -> create a title item - "<Item>" -> create a simple item - "<CheckItem>" -> create a check item - "<ToggleItem>" -> create a toggle item - "<RadioItem>" -> create a radio item - <path> -> path of a radio item to link against - "<Separator>" -> create a separator - "<Branch>" -> create an item to hold sub items (optional) - "<LastBranch>" -> create a right justified branch + NULL -> "<Item>" + "" -> "<Item>" + "<Title>" -> create a title item + "<Item>" -> create a simple item + "<CheckItem>" -> create a check item + "<ToggleItem>" -> create a toggle item + "<RadioItem>" -> create a radio item + <path> -> path of a radio item to link against + "<Separator>" -> create a separator + "<Branch>" -> create an item to hold sub items (optional) + "<LastBranch>" -> create a right justified branch */ static GtkItemFactoryEntry menu_items[] = { - { "/_File", NULL, NULL, 0, "<Branch>" }, - { "/File/_New", "<control>N", print_hello, 0, NULL }, - { "/File/_Open", "<control>O", print_hello, 0, NULL }, - { "/File/_Save", "<control>S", print_hello, 0, NULL }, + { "/_File", NULL, NULL, 0, "<Branch>" }, + { "/File/_New", "<control>N", print_hello, 0, NULL }, + { "/File/_Open", "<control>O", print_hello, 0, NULL }, + { "/File/_Save", "<control>S", print_hello, 0, NULL }, { "/File/Save _As", NULL, NULL, 0, NULL }, - { "/File/sep1", NULL, NULL, 0, "<Separator>" }, - { "/File/Quit", "<control>Q", gtk_main_quit, 0, NULL }, - { "/_Options", NULL, NULL, 0, "<Branch>" }, + { "/File/sep1", NULL, NULL, 0, "<Separator>" }, + { "/File/Quit", "<control>Q", gtk_main_quit, 0, NULL }, + { "/_Options", NULL, NULL, 0, "<Branch>" }, { "/Options/Test", NULL, NULL, 0, NULL }, - { "/_Help", NULL, NULL, 0, "<LastBranch>" }, + { "/_Help", NULL, NULL, 0, "<LastBranch>" }, { "/_Help/About", NULL, NULL, 0, NULL }, }; @@ -10981,7 +10987,7 @@ void get_main_menu( GtkWidget *window, the accelerator table while generating menus. */ - item_factory = gtk_item_factory_new (GTK_TYPE_MENU_BAR, "<main>", + item_factory = gtk_item_factory_new (GTK_TYPE_MENU_BAR, "<main>", accel_group); /* This function generates the menu items. Pass the item factory, @@ -10994,7 +11000,7 @@ void get_main_menu( GtkWidget *window, if (menubar) /* Finally, return the actual menu bar created by the item factory. */ - *menubar = gtk_item_factory_get_widget (item_factory, "<main>"); + *menubar = gtk_item_factory_get_widget (item_factory, "<main>"); } int main( int argc, @@ -11030,8 +11036,7 @@ int main( int argc, /* example-end */ </programlisting> -<para> -For now, there's only this example. An explanation and lots 'o' comments +<para>For now, there's only this example. An explanation and lots 'o' comments will follow later.</para> </sect1> @@ -11128,9 +11133,11 @@ TRUE or FALSE value.</para> </sect1> <!-- ----------------------------------------------------------------- --> -<sect1>Text Manipulation -<P> -The current insertion point of a Text widget can be set using</para> +<sect1> +<title>Text Manipulation + +The current insertion point of a Text widget can be set using + void gtk_text_set_point( GtkText *text, guint index ); @@ -11189,9 +11196,9 @@ updates are complete. The following two functions perform this freeze and thaw action: -void gtk_text_freeze( GtkText *text ); +void gtk_text_freeze( GtkText *text ); -void gtk_text_thaw( GtkText *text ); +void gtk_text_thaw( GtkText *text ); Text is deleted from the text widget relative to the current insertion @@ -11200,9 +11207,9 @@ FALSE indicator of whether the operation was successful. gint gtk_text_backward_delete( GtkText *text, - guint nchars ); + guint nchars ); -gint gtk_text_forward_delete ( GtkText *text, +gint gtk_text_forward_delete ( GtkText *text, guint nchars ); @@ -11224,7 +11231,7 @@ text starts at 0. The function allocates a new chunk of memory for the text block, so don't forget to free it with a call to g_free when you have finished -with it. +with it. @@ -11241,10 +11248,11 @@ key movement will move the cursor by words rather than characters. Holding down Shift whilst using cursor movement will extend the selection. - + + Motion Shortcuts - + Ctrl-A Beginning of line Ctrl-E End of line @@ -11263,10 +11271,13 @@ extend the selection. - + + + + Editing Shortcuts - + Ctrl-H Delete Backward Character (Backspace) Ctrl-D Delete Forward Character (Delete) @@ -11281,10 +11292,13 @@ extend the selection. - + + + + Selection Shortcuts - + Ctrl-X Cut to clipboard Ctrl-C Copy to clipboard @@ -11293,6 +11307,7 @@ extend the selection. + @@ -11510,7 +11525,9 @@ from your time. - CTree +CTree + + @@ -11518,48 +11535,64 @@ from your time. Curves + + Drawing Area + + Font Selection Dialog + + Gamma Curve + + Image + + Packer + + Plugs and Sockets + + Preview + + - Overview +Overview One type of interprocess communication supported by X and GTK is selections. A selection identifies a chunk of data, for @@ -12426,7 +12460,7 @@ gint gtk_selection_convert( GtkWidget *widget, GdkAtom selection, GdkAtom target, guint32 time ); - + This converts the selection into the form specified by target. If at all possible, the time field should be the time @@ -12523,7 +12557,7 @@ void selection_received( GtkWidget *widget, atoms = (GdkAtom *)selection_data->data; item_list = NULL; - for (i=0; ilength/sizeof(GdkAtom); i++) + for (i=0; i<selection_data->length/sizeof(GdkAtom); i++) { char *name; name = gdk_atom_name (atoms[i]); @@ -12576,7 +12610,7 @@ int main( int argc, - Supplying the selection +Supplying the selection Supplying the selection is a bit more complicated. You must register handlers that will be called when your selection is requested. For @@ -12779,7 +12813,7 @@ data which can be indexed on any number of fields), and caches. A summary of some of GLib's capabilities follows; not every function, data structure, or operation is covered here. For more complete information about the GLib routines, see the GLib documentation. One -source of GLib documentation is http://www.gtk.org/ . +source of GLib documentation is http://www.gtk.org/. If you are using a language other than C, you should consult your language's binding documentation. In some cases your language may @@ -12815,20 +12849,20 @@ char gchar; short gshort; long glong; int gint; -char gboolean; +char gboolean; -unsigned char guchar; +unsigned char guchar; unsigned short gushort; unsigned long gulong; -unsigned int guint; +unsigned int guint; -float gfloat; +float gfloat; double gdouble; -long double gldouble; +long double gldouble; -void* gpointer; +void* gpointer; -gint8 +gint8 guint8 gint16 guint16 @@ -12869,9 +12903,9 @@ GList *g_list_append( GList *list, This adds a new element (with value data) onto the end of the -list. +list. - + GList *g_list_prepend( GList *list, gpointer data ); @@ -12879,12 +12913,11 @@ GList *g_list_prepend( GList *list, This adds a new element (with value data) to the beginning of the list. - + GList *g_list_insert( GList *list, gpointer data, - gint position ); - - + gint position ); + This inserts a new element (with value data) into the list at the given position. If position is 0, this is just like g_list_prepend(); @@ -12910,29 +12943,28 @@ first. see the glib documentation for more information. Here are a few of the more useful functions' signatures: - + GList *g_list_remove_link( GList *list, - GList *link ); + GList *link ); -GList *g_list_reverse( GList *list ); +GList *g_list_reverse( GList *list ); -GList *g_list_nth( GList *list, +GList *g_list_nth( GList *list, gint n ); GList *g_list_find( GList *list, - gpointer data ); + gpointer data ); -GList *g_list_last( GList *list ); +GList *g_list_last( GList *list ); -GList *g_list_first( GList *list ); +GList *g_list_first( GList *list ); -gint g_list_length( GList *list ); +gint g_list_length( GList *list ); -void g_list_foreach( GList *list, +void g_list_foreach( GList *list, GFunc func, gpointer user_data ); - - + @@ -12960,19 +12992,19 @@ GSList *g_slist_remove( GSList *list, GSList *g_slist_remove_link( GSList *list, GSList *link ); -GSList *g_slist_reverse( GSList *list ); +GSList *g_slist_reverse( GSList *list ); -GSList *g_slist_nth( GSList *list, +GSList *g_slist_nth( GSList *list, gint n ); GSList *g_slist_find( GSList *list, gpointer data ); -GSList *g_slist_last( GSList *list ); +GSList *g_slist_last( GSList *list ); -gint g_slist_length( GSList *list ); +gint g_slist_length( GSList *list ); -void g_slist_foreach( GSList *list, +void g_slist_foreach( GSList *list, GFunc func, gpointer user_data ); @@ -13039,19 +13071,19 @@ g_timer_stop() to stop timing an operation, and g_timer_elapsed() to determine the elapsed time. -GTimer *g_timer_new( void ); +GTimer *g_timer_new( void ); -void g_timer_destroy( GTimer *timer ); +void g_timer_destroy( GTimer *timer ); -void g_timer_start( GTimer *timer ); +void g_timer_start( GTimer *timer ); -void g_timer_stop( GTimer *timer ); +void g_timer_stop( GTimer *timer ); -void g_timer_reset( GTimer *timer ); +void g_timer_reset( GTimer *timer ); -gdouble g_timer_elapsed( GTimer *timer, +gdouble g_timer_elapsed( GTimer *timer, gulong *microseconds ); - + @@ -13083,19 +13115,17 @@ GString *g_string_new( gchar *init ); This constructs a GString, copying the string value of init into the GString and returning a pointer to it. NULL may be given as -the argument for an initially empty GString. - - +the argument for an initially empty GString. -void g_string_free( GString *string, + +void g_string_free( GString *string, gint free_segment ); This frees the memory for the given GString. If free_segment is TRUE, then this also frees its character data. - - + GString *g_string_assign( GString *lval, const gchar *rval ); @@ -13107,8 +13137,8 @@ function. The rest of these functions should be relatively obvious (the _c versions accept a character instead of a string): - - + + GString *g_string_truncate( GString *string, gint len ); @@ -13131,8 +13161,7 @@ void g_string_sprintf( GString *string, void g_string_sprintfa ( GString *string, gchar *fmt, ... ); - - + @@ -13320,7 +13349,7 @@ activated, it will take these attributes. format is: -fg[] = { Red, Green, Blue } +fg[<STATE>] = { Red, Green, Blue } Where STATE is one of the above states (PRELIGHT, ACTIVE, etc), and the Red, @@ -13336,8 +13365,9 @@ filename. searched for any pixmap you specify. The font directive is simply: + -font = "" +font = "<font name>" The only hard part is figuring out the font string. Using xfontsel or @@ -13382,19 +13412,18 @@ simple matter of common sense really. Anything that could apply, should. Example rc file -# pixmap_path ":::..." +# pixmap_path "<dir 1>:<dir 2>:<dir 3>:..." # pixmap_path "/usr/include/X11R6/pixmaps:/home/imain/pixmaps" # -# style [= ] +# style <name> [= <name>] # { -#