diff --git a/docs/tutorial/gtk-tut.sgml b/docs/tutorial/C/gtk-tut.xml old mode 100755 new mode 100644 similarity index 97% rename from docs/tutorial/gtk-tut.sgml rename to docs/tutorial/C/gtk-tut.xml index d140cd0d92..341df9fb2f --- a/docs/tutorial/gtk-tut.sgml +++ b/docs/tutorial/C/gtk-tut.xml @@ -1,8 +1,9 @@ - - -]> - + + + + + January 24th, 2003 @@ -17,16 +18,15 @@ Main - & the GTK team + & the GTK team - + This is a tutorial on how to use GTK (the GIMP Toolkit) through its C interface. - @@ -157,7 +157,7 @@ has no way of exiting except to be killed by using the shell. - + @@ -209,7 +209,7 @@ This function initializes the library for use, sets up default signal handlers, checks the arguments passed to your application on the command line, looking for one of the following: - + --gtk-module --g-fatal-warnings @@ -262,7 +262,7 @@ When control reaches this point, GTK will sleep waiting for X events (such as button or key presses), timeouts, or file IO notifications to occur. In our simple example, however, events are ignored. - + Hello World in GTK @@ -272,7 +272,7 @@ hello world a la GTK. - + @@ -383,7 +383,7 @@ int main( int argc, - + Compiling Hello World @@ -438,7 +438,7 @@ to load run time extensions. The GLib library (-lglib), containing miscellaneous functions; only g_print() is used in this particular example. GTK is built on top of GLib so you will always require this library. See the section on -GLib for details. +GLib for details. The Xlib library (-lX11) which is used by GDK. @@ -455,7 +455,7 @@ for various purposes. - + Theory of Signals and Callbacks @@ -546,7 +546,7 @@ of g_signal_connect_swapped(). - + Events @@ -554,7 +554,7 @@ of g_signal_connect_swapped(). of events that reflect the X event mechanism. Callbacks may also be attached to these events. These events are: - + event button_press_event @@ -707,7 +707,7 @@ linkend="sec-SignalsOnSourceWidgets">Signals on the source widget and
  • Signals on the destination widget for details on the signatures of the callback functions for these signals: - + selection_received selection_get @@ -730,7 +730,7 @@ for details on the signatures of the callback functions for these signals: - + Stepping Through Hello World @@ -952,7 +952,7 @@ callback, exiting GTK. Moving On - + Data Types @@ -974,7 +974,7 @@ is an object. - + More on Signal Handlers @@ -1025,7 +1025,7 @@ void g_signal_handlers_unblock_by_func( gpointer object, - + An Upgraded Hello World @@ -1036,7 +1036,7 @@ topic, packing widgets. - + @@ -1162,7 +1162,7 @@ widget into the window. But when you want to put more than one widget into a window, how do you control where that widget is positioned? This is where packing comes in. - + Theory of Packing Boxes @@ -1196,7 +1196,7 @@ placing and creating widgets. - + Details of Boxes @@ -1208,7 +1208,7 @@ different styles. - + @@ -1267,7 +1267,7 @@ following figure should make it clearer: - + @@ -1278,7 +1278,7 @@ it. Compile it yourself and play with it. - + Packing Demonstration Program @@ -1580,7 +1580,7 @@ int main( int argc, - + Packing Using Tables @@ -1740,7 +1740,7 @@ any spacing. - + Table Packing Example @@ -1752,7 +1752,7 @@ Which means it should look something like this: - + @@ -1898,7 +1898,7 @@ individual widgets come up on the screen as they're formed. The children of a widget (a window is a widget too) will not be displayed until the window itself is shown using the gtk_widget_show() function. - + Casting @@ -1949,7 +1949,7 @@ function declarations. - + Widget Hierarchy @@ -2054,7 +2054,7 @@ GObject - + Widgets Without Windows @@ -2101,7 +2101,7 @@ is the testgtk program that comes with GTK. It can be found i The Button Widget - + Normal Buttons @@ -2123,7 +2123,7 @@ later in the tutorial. - + @@ -2248,7 +2248,7 @@ released within Button widget - + Toggle Buttons @@ -2328,7 +2328,7 @@ TRUE/FALSE value. - + Check Buttons @@ -2356,7 +2356,7 @@ toggle button. - + Radio Buttons @@ -2442,7 +2442,7 @@ the second will emit its "toggled" signal (to report becoming active). - + @@ -2577,7 +2577,7 @@ that incorporate them: Viewports, Scrolled Windows, and others. - + Creating an Adjustment @@ -2609,7 +2609,7 @@ usually non-zero. - + Using Adjustments the Easy Way @@ -2652,7 +2652,7 @@ automagically adjust the viewport widget? Of course it will! Just like this:

    - + Adjustment Internals @@ -2779,7 +2779,7 @@ they calculate the length of the slider and its position within the trough. When the user manipulates the slider, the range widget will change the value of the adjustment. - + Scrollbar Widgets @@ -2809,7 +2809,7 @@ widget. - + Scale Widgets @@ -2820,7 +2820,7 @@ zoomed preview of a picture, or to control the brightness of a color, or to specify the number of minutes of inactivity before a screensaver takes over the screen. - + Creating a Scale Widget @@ -2859,7 +2859,7 @@ manipulate them.) - + Functions and Signals (well, functions, at least) @@ -2920,7 +2920,7 @@ and features. - + Common Range Functions @@ -2932,7 +2932,7 @@ derived widgets. There are, however, a few useful functions that are defined in <gtk/gtkrange.h> and will work on all range widgets. - + Setting the Update Policy @@ -2977,7 +2977,7 @@ void gtk_range_set_update_policy( GtkRange *range, - + Getting and Setting Adjustments @@ -3013,7 +3013,7 @@ g_signal_emit_by_name (adjustment, "changed"); - + Key and Mouse bindings @@ -3043,7 +3043,7 @@ and End keys. - + Example @@ -3057,7 +3057,7 @@ these widgets work for the user. - + @@ -3373,7 +3373,7 @@ window. Miscellaneous Widgets - + Labels @@ -3470,7 +3470,7 @@ won't be explained here. - + @@ -3582,7 +3582,7 @@ int main( int argc, - + Arrows @@ -3629,7 +3629,7 @@ point. The shadow_type argument may take one of these values: - + @@ -3713,7 +3713,7 @@ int main( int argc, - + The Tooltips Object @@ -3788,7 +3788,7 @@ you'll ever want to know :-) - + Progress Bars @@ -3886,7 +3886,7 @@ code also shows you how to reset the Progress Bar. - + @@ -4096,7 +4096,7 @@ int main( int argc, - + Dialogs @@ -4184,7 +4184,7 @@ parent.
    - + Rulers @@ -4273,7 +4273,7 @@ Placement of the drawing area and the rulers is done using a table. - + @@ -4360,7 +4360,7 @@ int main( int argc, - + Statusbars @@ -4431,7 +4431,7 @@ back off. - + @@ -4517,7 +4517,7 @@ int main( int argc, - + Text Entries @@ -4597,7 +4597,7 @@ removed. - + @@ -4709,7 +4709,7 @@ int main( int argc, - + Spin Buttons @@ -4932,7 +4932,7 @@ void gtk_spin_button_update( GtkSpinButton *spin_button ); - + @@ -5165,7 +5165,7 @@ int main( int argc, - + Combo Box @@ -5339,7 +5339,7 @@ appropriate Item. Frankly, I have no idea how to do that. - + Calendar @@ -5511,7 +5511,7 @@ example code. - + @@ -5936,7 +5936,7 @@ int main (int argc, - + Color Selection @@ -6016,7 +6016,7 @@ received a "color_changed" signal, you use these functions. + File Selections @@ -6231,7 +6231,7 @@ screen, it does nothing as there is not a signal attached to it. - + @@ -6288,7 +6288,7 @@ int main( int argc, Container Widgets - + The EventBox @@ -6329,7 +6329,7 @@ window reveals varying amounts of the label. - + @@ -6394,7 +6394,7 @@ int main( int argc, - + The Alignment widget @@ -6439,7 +6439,7 @@ the Progress Bar widget. - + Fixed Container @@ -6490,7 +6490,7 @@ realizing the widget. - + @@ -6574,7 +6574,7 @@ int main( int argc, - + Layout Container @@ -6636,7 +6636,7 @@ void gtk_layout_set_vadjustment( GtkLayout *layout, - + Frames @@ -6695,7 +6695,7 @@ void gtk_frame_set_shadow_type( GtkFrame *frame, - + @@ -6754,7 +6754,7 @@ int main( int argc, - + Aspect Frames @@ -6798,7 +6798,7 @@ user resizes the top-level window. - + @@ -6852,7 +6852,7 @@ int main( int argc, - + Paned Window Widgets @@ -6900,7 +6900,7 @@ window. - + @@ -7048,7 +7048,7 @@ int main( int argc, - + Viewports @@ -7106,8 +7106,8 @@ void gtk_viewport_set_shadow_type( GtkViewport *viewport, - - + Scrolled Windows Scrolled windows are used to create a scrollable area with another @@ -7157,7 +7157,7 @@ new to you. - + @@ -7266,7 +7266,7 @@ the default size of the window or other widgets. - + Button Boxes @@ -7293,7 +7293,7 @@ for Button Boxes. - + @@ -7425,7 +7425,7 @@ int main( int argc, - + Toolbar @@ -7832,7 +7832,7 @@ static char * gtk_xpm[] = { - + Notebooks @@ -7984,7 +7984,7 @@ backward manner, and exit the program. - + @@ -8192,7 +8192,7 @@ manual method could go a long way towards usability. With the Itemfactory, it is not possible to add images or the character '/' to the menus. - + Manual Menu Creation @@ -8412,7 +8412,7 @@ by a menu bar, as shown in the sample code. - + Manual Menu Example @@ -8421,7 +8421,7 @@ by a menu bar, as shown in the sample code. - + @@ -8570,7 +8570,7 @@ table, bind keys to menu functions. - + Using ItemFactory @@ -8581,7 +8581,7 @@ gtk_item_factory calls. means you can define your menu in its simplest form and then create the menu/menubar widgets with a minimum of function calls. - + ItemFactory entries @@ -8669,7 +8669,7 @@ NULL or "" or "<Item>" - create a simple item Note that <LastBranch> is only useful for one submenu of a menubar. - + Callback Description @@ -8704,7 +8704,7 @@ is set during the call to gtk_item_factory_create_items(). - + ItemFactory entry examples @@ -8774,7 +8774,7 @@ required in the same group then it would be defined in the same way as equal to "/View/Low Resolution". - + ItemFactoryEntry Arrays @@ -8794,7 +8794,7 @@ static GtkItemFactoryEntry entries[] = { - + Creating an ItemFactory @@ -8859,7 +8859,7 @@ void gtk_window_add_accel_group( GtkWindow *window, - + Making use of the menu and its menu items @@ -8902,7 +8902,7 @@ section. - + Item Factory Example @@ -9111,7 +9111,7 @@ it should be no problem. widget, please consider writing a tutorial on it so others may benefit from your time. - + Accel Label @@ -9119,7 +9119,7 @@ from your time. - + Option Menu @@ -9127,7 +9127,7 @@ from your time. - + Menu Items @@ -9158,7 +9158,7 @@ from your time. - + Curves @@ -9166,7 +9166,7 @@ from your time. - + Drawing Area @@ -9174,7 +9174,7 @@ from your time. - + Font Selection Dialog @@ -9182,7 +9182,7 @@ from your time. - + Message Dialog @@ -9190,7 +9190,7 @@ from your time. - + Gamma Curve @@ -9198,7 +9198,7 @@ from your time. - + Image @@ -9206,7 +9206,7 @@ from your time. - + Plugs and Sockets @@ -9214,7 +9214,7 @@ from your time. - + Tree View @@ -9222,7 +9222,7 @@ from your time. - + Text View @@ -9275,7 +9275,7 @@ void gtk_widget_hide( GtkWidget *widget ); Timeouts, IO and Idle Functions - + Timeouts @@ -9313,7 +9313,7 @@ gint timeout_callback (gpointer data); - + Monitoring IO @@ -9366,7 +9366,7 @@ void input_callback( gpointer data, - + Idle Functions @@ -9399,11 +9399,11 @@ called. Advanced Event and Signal Handling - + Signal Functions - + Connecting and Disconnecting Signal Handlers @@ -9433,7 +9433,7 @@ void g_signal_handlers_disconnect_by_func( GObject *object, - + Blocking and Unblocking Signal Handlers @@ -9455,7 +9455,7 @@ void g_signal_handler_unblock_by_func( GObject *object, - + Emitting and Stopping Signals @@ -9484,7 +9484,7 @@ void g_signal_stop_emission_by_name( GObject *object, - + Signal Emission and Propagation @@ -9542,7 +9542,7 @@ the signal is propagated, not the current emission. Managing Selections - + Overview @@ -9580,7 +9580,7 @@ and gdk_atom_name(), to get the name of an atom. Both selections and targets are identified by atoms. - + Retrieving the selection @@ -9742,7 +9742,7 @@ int main( int argc, - + Supplying the selection @@ -9938,7 +9938,7 @@ communication via the drag-and-drop system. GTK+ can perform drag-and-drop on top of the low level Xdnd and Motif drag-and-drop protocols. - + Overview @@ -9985,7 +9985,7 @@ will get into detail about that later. - + Properties @@ -10033,11 +10033,11 @@ received. - + Functions - + Setting up the source widget @@ -10096,7 +10096,7 @@ void gtk_drag_source_unset( GtkWidget *widget ); - + Signals on the source widget: @@ -10106,8 +10106,8 @@ drag-and-drop operation. Source widget signals - - + + drag_begin @@ -10145,7 +10145,7 @@ GdkDragContext *dc, gpointer data) - + Setting up a destination widget: @@ -10168,7 +10168,7 @@ void gtk_drag_dest_unset( GtkWidget *widget ); - + Signals on the destination widget: @@ -10178,8 +10178,8 @@ drag-and-drop operation.
    Destination widget signals - - + + drag_data_received @@ -10225,7 +10225,7 @@ language's binding documentation. In some cases your language may have equivalent functionality built-in, while in other cases it may not. - + Definitions @@ -10288,7 +10288,7 @@ guint64 - + Doubly Linked Lists @@ -10384,7 +10384,7 @@ void g_list_foreach( GList *list, - + Singly Linked Lists @@ -10428,7 +10428,7 @@ void g_slist_foreach( GSList *list, - + Memory Management @@ -10476,7 +10476,7 @@ MEM_CHECK to the top of gmem.c and re-make and make install. - + Timers @@ -10503,7 +10503,7 @@ gdouble g_timer_elapsed( GTimer *timer, - + String Handling @@ -10581,7 +10581,7 @@ void g_string_sprintfa ( GString *string, - + Utility and Error Functions @@ -10659,7 +10659,7 @@ to document any function, just send me an email! files. These can be used to set the colors of just about any widget, and can also be used to tile pixmaps onto the background of some widgets. - + Functions For rc Files @@ -10694,7 +10694,7 @@ gtk_widget_set_name (button, "special button"); Then this button is given the name "special button" and may be addressed by -name in the rc file as "special button.GtkButton". [<--- Verify ME!] +name in the rc file as "special button.GtkButton". The example rc file below, sets the properties of the main window, and lets all children of that main window inherit the style described by the "main @@ -10719,7 +10719,7 @@ imagination as to how best to take advantage of this. - + GTK's rc File Format @@ -10800,7 +10800,7 @@ widget on a per widget basis, rather than setting the attributes of an entire widget class. I urge you to document any of these special widgets so users may customize them. -When the keyword parent is used as an attribute, the widget will take on +When the keyword parent is used as an attribute, the widget will take on the attributes of its parent in the application. When defining a style, you may assign the attributes of a previously defined @@ -10823,7 +10823,7 @@ simple matter of common sense really. Anything that could apply, should. - + Example rc file @@ -10961,7 +10961,7 @@ widget "main window.*GtkButton*" style "main_button" Writing Your Own Widgets - + Overview @@ -10987,7 +10987,7 @@ got this tutorial, or from: - + The Anatomy Of A Widget @@ -11049,11 +11049,11 @@ cast to the parent class' object structure as needed. - + Creating a Composite widget - + Introduction @@ -11076,14 +11076,14 @@ below is in the Code Examples Appendix - + - + Choosing a parent class @@ -11095,7 +11095,7 @@ is natural to make our parent class the Table class. - + The header file @@ -11136,7 +11136,7 @@ if an object is a Tictactoe widget respectively. - + The <literal>_get_type()</literal> function @@ -11211,7 +11211,7 @@ this structure, it knows how to create objects of a particular type. - + The <literal>_class_init()</literal> function @@ -11343,7 +11343,7 @@ instead. - + The <literal>_init()</literal> function @@ -11377,7 +11377,7 @@ tictactoe_init (Tictactoe *ttt) - + And the rest... @@ -11513,11 +11513,11 @@ main (int argc, char *argv[]) - + Creating a widget from scratch - + Introduction @@ -11529,14 +11529,14 @@ set the value. - + - + Displaying a widget on the screen @@ -11594,7 +11594,7 @@ an expose() function. - + The origins of the Dial Widget @@ -11613,7 +11613,7 @@ would be a good idea to look them over before continuing. - + The Basics @@ -11895,7 +11895,7 @@ gtk_dial_set_adjustment (GtkDial *dial, - + <literal>gtk_dial_realize()</literal> @@ -11954,7 +11954,7 @@ gtk_dial_realize (GtkWidget *widget) - + Size negotiation @@ -12013,7 +12013,7 @@ gtk_dial_size_allocate (GtkWidget *widget, - + <literal>gtk_dial_expose()</literal> @@ -12055,7 +12055,7 @@ gtk_dial_expose( GtkWidget *widget, /* Draw ticks */ - for (i=0; i<25; i++) + for (i=0; i<25; i++) { theta = (i*M_PI/18. - M_PI/6.); s = sin(theta); @@ -12097,7 +12097,7 @@ gtk_dial_expose( GtkWidget *widget, - + Event handling @@ -12151,8 +12151,8 @@ gtk_dial_button_press( GtkWidget *widget, d_parallel = s*dy + c*dx; d_perpendicular = fabs(s*dx - c*dy); - if (!dial->button && - (d_perpendicular < dial->pointer_width/2) && + if (!dial->button && + (d_perpendicular < dial->pointer_width/2) && (d_parallel > - dial->pointer_width)) { gtk_grab_add (widget); @@ -12186,7 +12186,7 @@ gtk_dial_button_release( GtkWidget *widget, if (dial->policy == GTK_UPDATE_DELAYED) g_source_remove (dial->timer); - if ((dial->policy != GTK_UPDATE_CONTINUOUS) && + if ((dial->policy != GTK_UPDATE_CONTINUOUS) && (dial->old_value != dial->adjustment->value)) gtk_signal_emit_by_name (GTK_OBJECT (dial->adjustment), "value_changed"); } @@ -12232,7 +12232,7 @@ gtk_dial_motion_notify( GtkWidget *widget, break; } - if (mods & mask) + if (mods & mask) gtk_dial_update_mouse (dial, x,y); } @@ -12266,10 +12266,10 @@ gtk_dial_update_mouse (GtkDial *dial, gint x, gint y) old_value = dial->adjustment->value; dial->angle = atan2(yc-y, x-xc); - if (dial->angle < -M_PI/2.) + if (dial->angle < -M_PI/2.) dial->angle += 2*M_PI; - if (dial->angle < -M_PI/6) + if (dial->angle < -M_PI/6) dial->angle = -M_PI/6; if (dial->angle > 7.*M_PI/6.) @@ -12319,7 +12319,7 @@ gtk_dial_update (GtkDial *dial) new_value = dial->adjustment->value; - if (new_value < dial->adjustment->lower) + if (new_value < dial->adjustment->lower) new_value = dial->adjustment->lower; if (new_value > dial->adjustment->upper) @@ -12382,7 +12382,7 @@ gtk_dial_adjustment_value_changed (GtkAdjustment *adjustment, - + Possible Enhancements @@ -12423,7 +12423,7 @@ entry widget to display the current value of the dial. - + Learning More @@ -12442,7 +12442,7 @@ Good luck! Scribble, A Simple Example Drawing Program - + Overview @@ -12457,14 +12457,14 @@ pressure and tilt, from such devices quite easy. - + - + Event Handling @@ -12676,7 +12676,7 @@ motion_notify_event( GtkWidget *widget, GdkEventMotion *event ) - + The DrawingArea Widget, And Drawing @@ -12903,7 +12903,7 @@ mundane details like creating the main window. - + Adding XInput support @@ -12971,7 +12971,7 @@ be used to find out further information about the device using the GDK_CORE_POINTER is used for the core pointer device. (Usually the mouse.) - + Enabling extended device information @@ -13046,7 +13046,7 @@ implement saving of XInput options in this program. - + Using extended device information @@ -13164,7 +13164,7 @@ draw_brush (GtkWidget *widget, GdkInputSource source, - + Finding out more about a device @@ -13236,7 +13236,7 @@ print_button_press (guint32 deviceid) - + Further sophistications @@ -13455,7 +13455,7 @@ inheritance. This inheritance mechanism applies for signals. Therefore, you should refer to the widget hierarchy tree when using the signals listed in this section. - + GtkObject @@ -13466,7 +13466,7 @@ void GtkObject::destroy (GtkObject *, - + GtkWidget @@ -13646,7 +13646,7 @@ void GtkWidget::debug-msg (GtkWidget *, - + GtkData @@ -13657,7 +13657,7 @@ void GtkData::disconnect (GtkData *, - + GtkContainer @@ -13680,7 +13680,7 @@ void GtkContainer::set-focus-child (GtkContainer *, - + GtkCalendar @@ -13703,7 +13703,7 @@ void GtkCalendar::next-year (GtkCalendar *, - + GtkEditable @@ -13760,7 +13760,7 @@ void GtkEditable::paste-clipboard (GtkEditable *, - + GtkNotebook @@ -13773,7 +13773,7 @@ void GtkNotebook::switch-page (GtkNotebook *, - + GtkList @@ -13790,7 +13790,7 @@ void GtkList::unselect-child (GtkList *, - + GtkMenuShell @@ -13811,7 +13811,7 @@ void GtkMenuShell::cancel (GtkMenuShell *, - + GtkToolbar @@ -13826,7 +13826,7 @@ void GtkToolbar::style-changed (GtkToolbar *, - + GtkButton @@ -13845,7 +13845,7 @@ void GtkButton::leave (GtkButton *, - + GtkItem @@ -13860,7 +13860,7 @@ void GtkItem::toggle (GtkItem *, - + GtkWindow @@ -13872,7 +13872,7 @@ void GtkWindow::set-focus (GtkWindow *, - + GtkHandleBox @@ -13887,7 +13887,7 @@ void GtkHandleBox::child-detached (GtkHandleBox *, - + GtkToggleButton @@ -13898,7 +13898,7 @@ void GtkToggleButton::toggled (GtkToggleButton *, - + GtkMenuItem @@ -13911,7 +13911,7 @@ void GtkMenuItem::activate-item (GtkMenuItem *, - + GtkCheckMenuItem @@ -13922,7 +13922,7 @@ void GtkCheckMenuItem::toggled (GtkCheckMenuItem *, - + GtkInputDialog @@ -13937,7 +13937,7 @@ void GtkInputDialog::disable-device (GtkInputDialog *, - + GtkColorSelection @@ -13948,7 +13948,7 @@ void GtkColorSelection::color-changed (GtkColorSelection *, - + GtkStatusBar @@ -13965,7 +13965,7 @@ void GtkStatusbar::text-popped (GtkStatusbar *, - + GtkCurve @@ -13976,7 +13976,7 @@ void GtkCurve::curve-type-changed (GtkCurve *, - + GtkAdjustment @@ -14005,7 +14005,7 @@ each data type listed, the signals that use this data type are listed. - GdkEventType< + GdkEventType GdkEventAny @@ -14483,10 +14483,10 @@ struct _GdkEventOther Below are the code examples that are used in the above text which are not included in complete form elsewhere. - + Tictactoe - + tictactoe.h @@ -14558,7 +14558,7 @@ G_END_DECLS - + tictactoe.c @@ -14727,7 +14727,7 @@ tictactoe_toggle (GtkWidget *widget, Tictactoe *ttt) - + ttt_test.c @@ -14784,11 +14784,11 @@ int main( int argc, - + GtkDial - + gtkdial.h @@ -14890,7 +14890,7 @@ void gtk_dial_set_adjustment (GtkDial *dial, - + gtkdial.c @@ -15565,7 +15565,7 @@ gtk_dial_adjustment_value_changed (GtkAdjustment *adjustment, - + dial_test.c @@ -15644,11 +15644,11 @@ int main( int argc, - + Scribble - + scribble-simple.c @@ -15840,7 +15840,7 @@ int main( int argc, - + scribble-xinput.c diff --git a/docs/tutorial/images/arrow.eps b/docs/tutorial/C/images/arrow.eps similarity index 100% rename from docs/tutorial/images/arrow.eps rename to docs/tutorial/C/images/arrow.eps diff --git a/docs/tutorial/images/arrow.png b/docs/tutorial/C/images/arrow.png similarity index 100% rename from docs/tutorial/images/arrow.png rename to docs/tutorial/C/images/arrow.png diff --git a/docs/tutorial/images/aspectframe.eps b/docs/tutorial/C/images/aspectframe.eps similarity index 100% rename from docs/tutorial/images/aspectframe.eps rename to docs/tutorial/C/images/aspectframe.eps diff --git a/docs/tutorial/images/aspectframe.png b/docs/tutorial/C/images/aspectframe.png similarity index 100% rename from docs/tutorial/images/aspectframe.png rename to docs/tutorial/C/images/aspectframe.png diff --git a/docs/tutorial/images/base.eps b/docs/tutorial/C/images/base.eps similarity index 100% rename from docs/tutorial/images/base.eps rename to docs/tutorial/C/images/base.eps diff --git a/docs/tutorial/images/base.png b/docs/tutorial/C/images/base.png similarity index 100% rename from docs/tutorial/images/base.png rename to docs/tutorial/C/images/base.png diff --git a/docs/tutorial/images/buttonbox.eps b/docs/tutorial/C/images/buttonbox.eps similarity index 100% rename from docs/tutorial/images/buttonbox.eps rename to docs/tutorial/C/images/buttonbox.eps diff --git a/docs/tutorial/images/buttonbox.png b/docs/tutorial/C/images/buttonbox.png similarity index 100% rename from docs/tutorial/images/buttonbox.png rename to docs/tutorial/C/images/buttonbox.png diff --git a/docs/tutorial/images/buttons.eps b/docs/tutorial/C/images/buttons.eps similarity index 100% rename from docs/tutorial/images/buttons.eps rename to docs/tutorial/C/images/buttons.eps diff --git a/docs/tutorial/images/buttons.png b/docs/tutorial/C/images/buttons.png similarity index 100% rename from docs/tutorial/images/buttons.png rename to docs/tutorial/C/images/buttons.png diff --git a/docs/tutorial/images/calendar.eps b/docs/tutorial/C/images/calendar.eps similarity index 100% rename from docs/tutorial/images/calendar.eps rename to docs/tutorial/C/images/calendar.eps diff --git a/docs/tutorial/images/calendar.png b/docs/tutorial/C/images/calendar.png similarity index 100% rename from docs/tutorial/images/calendar.png rename to docs/tutorial/C/images/calendar.png diff --git a/docs/tutorial/images/colorsel.eps b/docs/tutorial/C/images/colorsel.eps similarity index 100% rename from docs/tutorial/images/colorsel.eps rename to docs/tutorial/C/images/colorsel.eps diff --git a/docs/tutorial/images/colorsel.png b/docs/tutorial/C/images/colorsel.png similarity index 100% rename from docs/tutorial/images/colorsel.png rename to docs/tutorial/C/images/colorsel.png diff --git a/docs/tutorial/images/entry.eps b/docs/tutorial/C/images/entry.eps similarity index 100% rename from docs/tutorial/images/entry.eps rename to docs/tutorial/C/images/entry.eps diff --git a/docs/tutorial/images/entry.png b/docs/tutorial/C/images/entry.png similarity index 100% rename from docs/tutorial/images/entry.png rename to docs/tutorial/C/images/entry.png diff --git a/docs/tutorial/images/eventbox.eps b/docs/tutorial/C/images/eventbox.eps similarity index 100% rename from docs/tutorial/images/eventbox.eps rename to docs/tutorial/C/images/eventbox.eps diff --git a/docs/tutorial/images/eventbox.png b/docs/tutorial/C/images/eventbox.png similarity index 100% rename from docs/tutorial/images/eventbox.png rename to docs/tutorial/C/images/eventbox.png diff --git a/docs/tutorial/images/filesel.eps b/docs/tutorial/C/images/filesel.eps similarity index 100% rename from docs/tutorial/images/filesel.eps rename to docs/tutorial/C/images/filesel.eps diff --git a/docs/tutorial/images/filesel.png b/docs/tutorial/C/images/filesel.png similarity index 100% rename from docs/tutorial/images/filesel.png rename to docs/tutorial/C/images/filesel.png diff --git a/docs/tutorial/images/fixed.eps b/docs/tutorial/C/images/fixed.eps similarity index 100% rename from docs/tutorial/images/fixed.eps rename to docs/tutorial/C/images/fixed.eps diff --git a/docs/tutorial/images/fixed.png b/docs/tutorial/C/images/fixed.png similarity index 100% rename from docs/tutorial/images/fixed.png rename to docs/tutorial/C/images/fixed.png diff --git a/docs/tutorial/images/frame.eps b/docs/tutorial/C/images/frame.eps similarity index 100% rename from docs/tutorial/images/frame.eps rename to docs/tutorial/C/images/frame.eps diff --git a/docs/tutorial/images/frame.png b/docs/tutorial/C/images/frame.png similarity index 100% rename from docs/tutorial/images/frame.png rename to docs/tutorial/C/images/frame.png diff --git a/docs/tutorial/images/gtkdial.eps b/docs/tutorial/C/images/gtkdial.eps similarity index 100% rename from docs/tutorial/images/gtkdial.eps rename to docs/tutorial/C/images/gtkdial.eps diff --git a/docs/tutorial/images/gtkdial.png b/docs/tutorial/C/images/gtkdial.png similarity index 100% rename from docs/tutorial/images/gtkdial.png rename to docs/tutorial/C/images/gtkdial.png diff --git a/docs/tutorial/images/helloworld.eps b/docs/tutorial/C/images/helloworld.eps similarity index 100% rename from docs/tutorial/images/helloworld.eps rename to docs/tutorial/C/images/helloworld.eps diff --git a/docs/tutorial/images/helloworld.png b/docs/tutorial/C/images/helloworld.png similarity index 100% rename from docs/tutorial/images/helloworld.png rename to docs/tutorial/C/images/helloworld.png diff --git a/docs/tutorial/images/helloworld2.eps b/docs/tutorial/C/images/helloworld2.eps similarity index 100% rename from docs/tutorial/images/helloworld2.eps rename to docs/tutorial/C/images/helloworld2.eps diff --git a/docs/tutorial/images/helloworld2.png b/docs/tutorial/C/images/helloworld2.png similarity index 100% rename from docs/tutorial/images/helloworld2.png rename to docs/tutorial/C/images/helloworld2.png diff --git a/docs/tutorial/images/label.eps b/docs/tutorial/C/images/label.eps similarity index 100% rename from docs/tutorial/images/label.eps rename to docs/tutorial/C/images/label.eps diff --git a/docs/tutorial/images/label.png b/docs/tutorial/C/images/label.png similarity index 100% rename from docs/tutorial/images/label.png rename to docs/tutorial/C/images/label.png diff --git a/docs/tutorial/images/menu.eps b/docs/tutorial/C/images/menu.eps similarity index 100% rename from docs/tutorial/images/menu.eps rename to docs/tutorial/C/images/menu.eps diff --git a/docs/tutorial/images/menu.png b/docs/tutorial/C/images/menu.png similarity index 100% rename from docs/tutorial/images/menu.png rename to docs/tutorial/C/images/menu.png diff --git a/docs/tutorial/images/notebook.eps b/docs/tutorial/C/images/notebook.eps similarity index 100% rename from docs/tutorial/images/notebook.eps rename to docs/tutorial/C/images/notebook.eps diff --git a/docs/tutorial/images/notebook.png b/docs/tutorial/C/images/notebook.png similarity index 100% rename from docs/tutorial/images/notebook.png rename to docs/tutorial/C/images/notebook.png diff --git a/docs/tutorial/images/packbox1.eps b/docs/tutorial/C/images/packbox1.eps similarity index 100% rename from docs/tutorial/images/packbox1.eps rename to docs/tutorial/C/images/packbox1.eps diff --git a/docs/tutorial/images/packbox1.png b/docs/tutorial/C/images/packbox1.png similarity index 100% rename from docs/tutorial/images/packbox1.png rename to docs/tutorial/C/images/packbox1.png diff --git a/docs/tutorial/images/packbox2.eps b/docs/tutorial/C/images/packbox2.eps similarity index 100% rename from docs/tutorial/images/packbox2.eps rename to docs/tutorial/C/images/packbox2.eps diff --git a/docs/tutorial/images/packbox2.png b/docs/tutorial/C/images/packbox2.png similarity index 100% rename from docs/tutorial/images/packbox2.png rename to docs/tutorial/C/images/packbox2.png diff --git a/docs/tutorial/images/paned.eps b/docs/tutorial/C/images/paned.eps similarity index 100% rename from docs/tutorial/images/paned.eps rename to docs/tutorial/C/images/paned.eps diff --git a/docs/tutorial/images/paned.png b/docs/tutorial/C/images/paned.png similarity index 100% rename from docs/tutorial/images/paned.png rename to docs/tutorial/C/images/paned.png diff --git a/docs/tutorial/images/progressbar.eps b/docs/tutorial/C/images/progressbar.eps similarity index 100% rename from docs/tutorial/images/progressbar.eps rename to docs/tutorial/C/images/progressbar.eps diff --git a/docs/tutorial/images/progressbar.png b/docs/tutorial/C/images/progressbar.png similarity index 100% rename from docs/tutorial/images/progressbar.png rename to docs/tutorial/C/images/progressbar.png diff --git a/docs/tutorial/images/radiobuttons.eps b/docs/tutorial/C/images/radiobuttons.eps similarity index 100% rename from docs/tutorial/images/radiobuttons.eps rename to docs/tutorial/C/images/radiobuttons.eps diff --git a/docs/tutorial/images/radiobuttons.png b/docs/tutorial/C/images/radiobuttons.png similarity index 100% rename from docs/tutorial/images/radiobuttons.png rename to docs/tutorial/C/images/radiobuttons.png diff --git a/docs/tutorial/images/rangewidgets.eps b/docs/tutorial/C/images/rangewidgets.eps similarity index 100% rename from docs/tutorial/images/rangewidgets.eps rename to docs/tutorial/C/images/rangewidgets.eps diff --git a/docs/tutorial/images/rangewidgets.png b/docs/tutorial/C/images/rangewidgets.png similarity index 100% rename from docs/tutorial/images/rangewidgets.png rename to docs/tutorial/C/images/rangewidgets.png diff --git a/docs/tutorial/images/rulers.eps b/docs/tutorial/C/images/rulers.eps similarity index 100% rename from docs/tutorial/images/rulers.eps rename to docs/tutorial/C/images/rulers.eps diff --git a/docs/tutorial/images/rulers.png b/docs/tutorial/C/images/rulers.png similarity index 100% rename from docs/tutorial/images/rulers.png rename to docs/tutorial/C/images/rulers.png diff --git a/docs/tutorial/images/scribble.eps b/docs/tutorial/C/images/scribble.eps similarity index 100% rename from docs/tutorial/images/scribble.eps rename to docs/tutorial/C/images/scribble.eps diff --git a/docs/tutorial/images/scribble.png b/docs/tutorial/C/images/scribble.png similarity index 100% rename from docs/tutorial/images/scribble.png rename to docs/tutorial/C/images/scribble.png diff --git a/docs/tutorial/images/scrolledwin.eps b/docs/tutorial/C/images/scrolledwin.eps similarity index 100% rename from docs/tutorial/images/scrolledwin.eps rename to docs/tutorial/C/images/scrolledwin.eps diff --git a/docs/tutorial/images/scrolledwin.png b/docs/tutorial/C/images/scrolledwin.png similarity index 100% rename from docs/tutorial/images/scrolledwin.png rename to docs/tutorial/C/images/scrolledwin.png diff --git a/docs/tutorial/images/spinbutton.eps b/docs/tutorial/C/images/spinbutton.eps similarity index 100% rename from docs/tutorial/images/spinbutton.eps rename to docs/tutorial/C/images/spinbutton.eps diff --git a/docs/tutorial/images/spinbutton.png b/docs/tutorial/C/images/spinbutton.png similarity index 100% rename from docs/tutorial/images/spinbutton.png rename to docs/tutorial/C/images/spinbutton.png diff --git a/docs/tutorial/images/statusbar.eps b/docs/tutorial/C/images/statusbar.eps similarity index 100% rename from docs/tutorial/images/statusbar.eps rename to docs/tutorial/C/images/statusbar.eps diff --git a/docs/tutorial/images/statusbar.png b/docs/tutorial/C/images/statusbar.png similarity index 100% rename from docs/tutorial/images/statusbar.png rename to docs/tutorial/C/images/statusbar.png diff --git a/docs/tutorial/images/table.eps b/docs/tutorial/C/images/table.eps similarity index 100% rename from docs/tutorial/images/table.eps rename to docs/tutorial/C/images/table.eps diff --git a/docs/tutorial/images/table.png b/docs/tutorial/C/images/table.png similarity index 100% rename from docs/tutorial/images/table.png rename to docs/tutorial/C/images/table.png diff --git a/docs/tutorial/images/tictactoe.eps b/docs/tutorial/C/images/tictactoe.eps similarity index 100% rename from docs/tutorial/images/tictactoe.eps rename to docs/tutorial/C/images/tictactoe.eps diff --git a/docs/tutorial/images/tictactoe.png b/docs/tutorial/C/images/tictactoe.png similarity index 100% rename from docs/tutorial/images/tictactoe.png rename to docs/tutorial/C/images/tictactoe.png diff --git a/docs/tutorial/Makefile.am b/docs/tutorial/Makefile.am index 5448bd2960..766655cbc1 100644 --- a/docs/tutorial/Makefile.am +++ b/docs/tutorial/Makefile.am @@ -1,9 +1,9 @@ -include $(top_srcdir)/Makefile.decl - -.PHONY: html pdf - -EXTRA_DIST += \ - gtk-tut.sgml \ +include $(top_srcdir)/gnome-doc-utils.make +dist-hook: doc-dist-hook +DOC_MODULE = gtk-tut +DOC_ENTITIES = +DOC_INCLUDES = +DOC_FIGURES = \ images/arrow.png \ images/aspectframe.png \ images/base.png \ @@ -35,42 +35,4 @@ EXTRA_DIST += \ images/statusbar.png \ images/table.png \ images/tictactoe.png - -if HAVE_DOCBOOK -html: - if test -w $(srcdir); then \ - (cd $(srcdir); \ - db2html gtk-tut.sgml; \ - test -d html && rm -r html; \ - mv gtk-tut html; \ - mkdir html/images; \ - cp images/*.png html/images); \ - fi - -pdf: - if test -w $(srcdir); then \ - (cd $(srcdir); db2pdf gtk-tut.sgml); \ - fi - -dist-hook: html - cp -Rp $(srcdir)/html $(distdir) -else -html: - echo "***" - echo "*** Warning: Tutorial not built" - echo "***" - -pdf: - echo "***" - echo "*** Warning: Tutorial not built" - echo "***" - -dist-hook: - echo "***" - echo "*** Warning: Tutorial not built" - echo "*** DISTRIBUTION IS INCOMPLETE" - echo "***" -endif - - --include $(top_srcdir)/git.mk +DOC_LINGUAS = diff --git a/docs/tutorial/gtk-tut.omf.in b/docs/tutorial/gtk-tut.omf.in new file mode 100644 index 0000000000..53c36e8d75 --- /dev/null +++ b/docs/tutorial/gtk-tut.omf.in @@ -0,0 +1,9 @@ + + + + + tutorial + + + + diff --git a/docs/tutorial/package-db-tutorial.sh b/docs/tutorial/package-db-tutorial.sh deleted file mode 100755 index 8e17162ac8..0000000000 --- a/docs/tutorial/package-db-tutorial.sh +++ /dev/null @@ -1,137 +0,0 @@ -#! /bin/sh -# package-db-tutorial.sh - Package up the tutorial into various formats -# Copyright (C) Tony Gale 2000-2002 -# Contact: gale@gtk.org -# -# NOTE: This script requires the following to be installed: -# o DocBook -# o DocBook-Utils -# o Jade -# o Jadetex - -TARGETDIR=`pwd`/2.0/ - -SOURCE=`pwd`/gtk-tut.sgml -IMAGES="`pwd`/images" -IMAGESDIR="images" -EXAMPLES=`pwd`/../../examples - -DATE=`date '+%Y%m%d'` -BUILDDIR=gtk-tutorial.$DATE - -PATH=`pwd`:$PATH - -# Check target directory -if [ ! -d $TARGETDIR ]; then - if [ -e $TARGETDIR ]; then - echo "ERROR: target directory is not a directory" - exit - fi - if ! mkdir $TARGETDIR; then - echo "mkdir for target directory failed" - exit - fi -fi - -# Check top level build directory -if [ ! -d $BUILDDIR ]; then - if [ -e $BUILDDIR ]; then - echo "ERROR: build directory is not a directory" - exit - fi - if ! mkdir $BUILDDIR; then - echo "mkdir of build directory failed" - exit 1 - fi -fi - -if ! cd $BUILDDIR; then - echo "cd to build directory failed" - exit 1 -fi - -cp $SOURCE . -cp -R $IMAGES . - -# SGML Format -echo -n "Copy SGML and images.... " -if [ ! -d gtk-tutorial.sgml ]; then - if [ -e gtk-tutorial.sgml ]; then - echo "ERROR: gtk-tutorial.sgml is not a directory" - exit - fi - mkdir gtk-tutorial.sgml -fi - -(cd gtk-tutorial.sgml && cp $SOURCE . && cp -R $IMAGES . && rm -rf $IMAGESDIR/CVS) -tar cvfz $TARGETDIR/gtk-tutorial.sgml.tgz gtk-tutorial.sgml -echo "done" - -# HTML Format -echo -n "Formatting into HTML.... " -if [ ! -d gtk-tutorial.html ]; then - if [ -e gtk-tutorial.html ]; then - echo "ERROR: gtk-tutorial.html is not a directory" - exit - fi - mkdir gtk-tutorial.html -fi - -(db2html -o gtk-tutorial.html $SOURCE && cp -R $IMAGES gtk-tutorial.html && rm gtk-tutorial.html/$IMAGESDIR/*.eps) > /dev/null -(cd gtk-tutorial.html && rm -rf $IMAGESDIR/CVS && ln -s book1.html index.html) -tar cvfz $TARGETDIR/gtk-tutorial.html.tgz gtk-tutorial.html -echo "done" - -# PS and PDF Format -echo -n "Formatting into PS and PDF.... " -if [ ! -d gtk-tutorial.ps ]; then - if [ -e gtk-tutorial.ps ]; then - echo "ERROR: gtk-tutorial.ps is not a directory" - exit - fi - mkdir gtk-tutorial.ps -fi - -if [ ! -d gtk-tutorial.pdf ]; then - if [ -e gtk-tutorial.pdf ]; then - echo "ERROR: gtk-tutorial.pdf is not a directory" - exit - fi - mkdir gtk-tutorial.pdf -fi - -sed "s/images\/\(.*\)\.png/images\/\1.eps/g" $SOURCE > gtk-tutorial.ps/gtk-tut.sgml -cp -R $IMAGES gtk-tutorial.ps -(cd gtk-tutorial.ps && db2dvi gtk-tut.sgml && dvips gtk-tut.dvi -o gtk-tut.ps && dvipdf gtk-tut.dvi ../gtk-tutorial.pdf/gtk-tut.pdf) -gzip -c gtk-tutorial.ps/gtk-tut.ps > $TARGETDIR/gtk-tutorial.ps.gz -gzip -c gtk-tutorial.pdf/gtk-tut.pdf > $TARGETDIR/gtk-tutorial.pdf.gz -echo "done" - -# RTF Format -#echo -n "Formatting into RTF.... " -#if [ ! -d gtk-tutorial.rtf ]; then -# if [ -e gtk-tutorial.rtf ]; then -# echo "ERROR: is not a directory" -# exit -# fi -# mkdir gtk-tutorial.rtf -#fi - -#cp -R $IMAGES gtk-tutorial.rtf -#(cd gtk-tutorial.rtf && db2rtf $SOURCE) # > /dev/null -#gzip -c gtk-tutorial.rtf/gtk-tut.rtf > $TARGETDIR/gtk-tutorial.rtf.gz -#echo "done" - -# Copy examples -echo -n "Copying examples" -cp -R $EXAMPLES . -(cd examples && make clean && rm -rf CVS */CVS */.cvsignore README.1ST extract.awk extract.sh find-examples.sh) -tar cfz $TARGETDIR/examples.tgz examples -echo "done" - -cd .. -rm -rf $BUILDDIR - -echo -echo Packages created. -echo