diff --git a/docs/reference/gobject/gobject-docs.sgml b/docs/reference/gobject/gobject-docs.sgml index c44856abf..40e71d6ee 100644 --- a/docs/reference/gobject/gobject-docs.sgml +++ b/docs/reference/gobject/gobject-docs.sgml @@ -1,29 +1,6 @@ - - - - - - - - - - - - - - - - - - - - - - @@ -85,46 +62,38 @@ Concepts - &tutorial-Intro; - &tutorial-GType; - &tutorial-GObject; - &tutorial-GSignal; + + + + API Reference - - &gobject-GType; - &gobject-GTypePlugin; - &gobject-GTypeModule; - &gobject-The-Base-Object-Type; - &gobject-Enumeration-and-Flag-Types; - &gobject-Boxed-Types; - &gobject-Generic-values; - &gobject-param-value-types; - &gobject-Varargs-Value-Collection; - &gobject-GParamSpec; - &gobject-Signals; - &gobject-Closures; - &gobject-Value-Arrays; - + + + + + + + + + + + + + + Tools Reference - &glib-mkenums; - &glib-genmarshal; - &gobject-query; + + + - - Tutorial - &tutorial-HowTo; - - - Related Tools - - &tutorial-Tools; - + + Index diff --git a/docs/reference/gobject/tut_gobject.xml b/docs/reference/gobject/tut_gobject.xml index 75ad2eaac..4c5e7079d 100644 --- a/docs/reference/gobject/tut_gobject.xml +++ b/docs/reference/gobject/tut_gobject.xml @@ -1,4 +1,7 @@ + The GObject base class diff --git a/docs/reference/gobject/tut_gsignal.xml b/docs/reference/gobject/tut_gsignal.xml index 74ccd982c..41a1d7d8e 100644 --- a/docs/reference/gobject/tut_gsignal.xml +++ b/docs/reference/gobject/tut_gsignal.xml @@ -1,4 +1,7 @@ + The GObject messaging system diff --git a/docs/reference/gobject/tut_gtype.xml b/docs/reference/gobject/tut_gtype.xml index 2ea2bf3c8..96f612373 100644 --- a/docs/reference/gobject/tut_gtype.xml +++ b/docs/reference/gobject/tut_gtype.xml @@ -1,4 +1,7 @@ + The GLib Dynamic Type System @@ -900,7 +903,7 @@ maman_ibaz_base_init (gpointer g_iface) The above process can be summarized as follows: - +
Interface Finalization diff --git a/docs/reference/gobject/tut_howto.xml b/docs/reference/gobject/tut_howto.xml index 319d9512e..d428168ec 100644 --- a/docs/reference/gobject/tut_howto.xml +++ b/docs/reference/gobject/tut_howto.xml @@ -1,11 +1,16 @@ - - - This chapter tries to answer the real-life questions of users and presents - the most common scenario use cases I could come up with. - The use cases are presented from most likely to less likely. - - + + + Tutorial + + + This chapter tries to answer the real-life questions of users and presents + the most common scenario use cases I could come up with. + The use cases are presented from most likely to less likely. + + How to define and implement a new GObject @@ -1712,4 +1717,4 @@ g_object_do_class_init (GObjectClass *class) --> - + diff --git a/docs/reference/gobject/tut_intro.xml b/docs/reference/gobject/tut_intro.xml index b71935894..54d46dc8f 100644 --- a/docs/reference/gobject/tut_intro.xml +++ b/docs/reference/gobject/tut_intro.xml @@ -1,4 +1,7 @@ + Background diff --git a/docs/reference/gobject/tut_tools.xml b/docs/reference/gobject/tut_tools.xml index 7b3a41d42..b344abb1a 100644 --- a/docs/reference/gobject/tut_tools.xml +++ b/docs/reference/gobject/tut_tools.xml @@ -1,106 +1,112 @@ - - - Several useful developer tools have been build around GObject - technology. The next sections briefly introduce them and link to - the respective project pages. - - - - For example, writing GObjects is often seen as a tedious task. It - requires a lot of typing and just doing a copy/paste requires a - great deal of care. A lot of projects and scripts have been - written to generate GObject skeleton form boilerplate code, or - even translating higher-level language into plain C. - - - - - Vala - - From the Vala - homepage itself: Vala is a new programming language - that aims to bring modern programming language features to GNOME - developers without imposing any additional runtime requirements - and without using a different ABI compared to applications and - libraries written in C. - - - - The syntax of Vala is similar to C#. The available compiler - translates Vala into GObject C code. It can also compile - non-GObject C, using plain C API. - - - - - GObject builder - - - In order to help a GObject class developper, one obvious idea is - to use some sort of templates for the skeletons. and then run - them through a special tool to generate the real C files. GOB (or GOB2) is - such a tool. It is a preprocessor which can be used to build - GObjects with inline C code so that there is no need to edit the - generated C code. The syntax is inspired by Java and Yacc or - Lex. The implementation is intentionally kept simple: the inline C - code provided by the user is not parsed. - - - - - Graphical inspection of GObjects - - - Yet another tool that you may find helpful when working with - GObjects is G-Inspector. It - is able to display GLib/GTK+ objects and their properties. - - - - - Debugging reference count problems - - - The reference counting scheme used by GObject does solve quite - a few memory management problems but also introduces new sources of bugs. - In large applications, finding the exact spot where the reference count - of an Object is not properly handled can be very difficult. Hopefully, - there exist a tool named refdbg - which can be used to automate the task of tracking down the location - of invalid code with regard to reference counting. This application - intercepts the reference counting calls and tries to detect invalid behavior. - It supports a filter-rule mechanism to let you trace only the objects you are - interested in and it can be used together with GDB. - - - g_trap_object_ref - Note that if GObject has been compiled with , - it exports a trap variable - -static volatile GObject *g_trap_object_ref; - - If set to a non-NULL value, g_object_ref() - and g_object_unref() will be intercepted - when called with that value. - - + + + Related Tools - - Writing API docs - - The API documentation for most of the GLib, GObject, GTK+ and GNOME - libraries is built with a combination of complex tools. Typically, the part of - the documentation which describes the behavior of each function is extracted - from the specially-formatted source code comments by a tool named gtk-doc which - generates DocBook XML and merges this DocBook XML with a set of master XML - DocBook files. These XML DocBook files are finally processed with xsltproc - (a small program part of the libxslt library) to generate the final HTML - output. Other tools can be used to generate PDF output from the source XML. - The following code excerpt shows what these comments look like. - + + + Several useful developer tools have been build around GObject + technology. The next sections briefly introduce them and link to + the respective project pages. + + + + For example, writing GObjects is often seen as a tedious task. It + requires a lot of typing and just doing a copy/paste requires a + great deal of care. A lot of projects and scripts have been + written to generate GObject skeleton form boilerplate code, or + even translating higher-level language into plain C. + + + + + Vala + + From the Vala + homepage itself: Vala is a new programming language + that aims to bring modern programming language features to GNOME + developers without imposing any additional runtime requirements + and without using a different ABI compared to applications and + libraries written in C. + + + + The syntax of Vala is similar to C#. The available compiler + translates Vala into GObject C code. It can also compile + non-GObject C, using plain C API. + + + + + GObject builder + + + In order to help a GObject class developper, one obvious idea is + to use some sort of templates for the skeletons. and then run + them through a special tool to generate the real C files. GOB (or GOB2) is + such a tool. It is a preprocessor which can be used to build + GObjects with inline C code so that there is no need to edit the + generated C code. The syntax is inspired by Java and Yacc or + Lex. The implementation is intentionally kept simple: the inline C + code provided by the user is not parsed. + + + + + Graphical inspection of GObjects + + + Yet another tool that you may find helpful when working with + GObjects is G-Inspector. It + is able to display GLib/GTK+ objects and their properties. + + + + + Debugging reference count problems + + + The reference counting scheme used by GObject does solve quite + a few memory management problems but also introduces new sources of bugs. + In large applications, finding the exact spot where the reference count + of an Object is not properly handled can be very difficult. Hopefully, + there exist a tool named refdbg + which can be used to automate the task of tracking down the location + of invalid code with regard to reference counting. This application + intercepts the reference counting calls and tries to detect invalid behavior. + It supports a filter-rule mechanism to let you trace only the objects you are + interested in and it can be used together with GDB. + + + g_trap_object_ref + Note that if GObject has been compiled with , + it exports a trap variable + +static volatile GObject *g_trap_object_ref; + + If set to a non-NULL value, g_object_ref() + and g_object_unref() will be intercepted + when called with that value. + + + + + Writing API docs + + The API documentation for most of the GLib, GObject, GTK+ and GNOME + libraries is built with a combination of complex tools. Typically, the part of + the documentation which describes the behavior of each function is extracted + from the specially-formatted source code comments by a tool named gtk-doc which + generates DocBook XML and merges this DocBook XML with a set of master XML + DocBook files. These XML DocBook files are finally processed with xsltproc + (a small program part of the libxslt library) to generate the final HTML + output. Other tools can be used to generate PDF output from the source XML. + The following code excerpt shows what these comments look like. + /** * gtk_widget_freeze_child_notify: * @widget: a #GtkWidget @@ -114,12 +120,13 @@ void gtk_widget_freeze_child_notify (GtkWidget *widget) { ... - - - - Thorough - documentation - on how to set up and use gtk-doc in your - project is provided on the GNOME developer website. - - + + + + Thorough + documentation + on how to set up and use gtk-doc in your + project is provided on the GNOME developer website. + + +