summaryrefslogtreecommitdiff
path: root/docs/reference/gobject/tut_howto.xml
Commit message (Collapse)AuthorAgeFilesLines
* Rename GTK+ to GTK (mostly comments and documentation)Arnaud Rebillout2023-05-101-2/+2
| | | | | | | | | | | | | GTK lost it's '+' suffix back in 2019, according to <https://mail.gnome.org/archives/gtk-devel-list/2019-February/msg00000.html> This commit can be re-generated with: git grep -l GTK+ \ | grep -v -e ^NEWS -e ^glib/tests/collate.c \ | xargs sed -i 's/GTK+/GTK/g' Most of the changes are in comments and documentation.
* gtype: Improve documentation for G_TYPE_IS_CLASSED and interfacesPhilip Withnall2023-04-131-1/+1
| | | | | | | | | | | | | | | | | | The documentation previously implicitly said in a few places that interfaces are classed, but reading through the implementation of `GType`, I don’t think they are. If they were, the registration of the fundamental `G_TYPE_INTERFACE` in `gobject_init()` would specify `G_TYPE_FLAG_CLASSED`. It only specifies `G_TYPE_FLAG_DERIVABLE`. I think this makes sense, because you can’t subclass an interface. Subclassing is a key property of being classed. Tweak the `GType` tutorial to remove that implicit statement, and expand the documentation for `G_TYPE_IS_CLASSED`. Signed-off-by: Philip Withnall <pwithnall@endlessos.org> Fixes: #252
* docs: Use G_PARAM_STATIC_STRINGS in examples and explain it morePhilip Withnall2022-05-201-1/+1
| | | | | | | Make it a bit clearer in the documentation that using `G_PARAM_STATIC_STRINGS` everywhere is a good thing. Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
* gobject: Standardise on the term ‘instantiatable’Philip Withnall2020-11-021-1/+1
| | | | | | | Rather than using a mixture of ‘instantiable’ and ‘instantiatable’ everywhere, standardise on the term which is already in the public API. Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
* minor typos in the documentation (a/an)Дилян Палаузов2019-08-241-2/+2
|
* docs: add a missing semicoloneyelash2018-11-181-1/+1
|
* doc: Interface for derivable objectPavlo Solntsev2018-05-251-0/+14
|
* docs: Fix typo in examplesMohammed Sadiq2018-04-101-2/+2
|
* docs: Correct inconsistency in GObject tutorialIvar Trygve Jarlsby2017-11-261-1/+1
| | | | | | | | The example code defines an interface with three methods. The preceding text reads 'This interface defines two methods'. This appears to be because the example code was changed without updating the surrounding text. https://bugzilla.gnome.org/show_bug.cgi?id=790830
* Drop trailing semi-colon from G_DEFINE_ macroEmmanuele Bassi2017-04-101-2/+2
| | | | | | | | It's unnecessary, and only adds visual noise; we have been fairly inconsistent in the past, but the semi-colon-less version clearly dominates in the code base. https://bugzilla.gnome.org/show_bug.cgi?id=669355
* docs: Replace Maman in the tutorial with a more meaningful examplePhilip Withnall2015-10-201-274/+377
| | | | | | | | Change it to a running example of a file viewer application with a file class and various derived classes and related interfaces. Hopefully the reader can relate to this a little better than to their maman. https://bugzilla.gnome.org/show_bug.cgi?id=753935
* docs: Clarify costs of using the generic GObject C closure marshallerPhilip Withnall2015-08-211-4/+15
| | | | | | | The libffi one is slower than type-specific generated ones, but is generally better to use. https://bugzilla.gnome.org/show_bug.cgi?id=744060
* docs: Use generic marshallers in GObject how-to examplesPhilip Withnall2015-08-211-2/+2
| | | | | | They’re the new vogue for handling signals. https://bugzilla.gnome.org/show_bug.cgi?id=744060
* docs: Rename a parameter in a GObject how-to examplePhilip Withnall2015-08-211-2/+2
| | | | | | Make it obvious the parameter is not related to AClass. https://bugzilla.gnome.org/show_bug.cgi?id=744060
* docs: Add vfunc NULL checks to GObject how-to examplesPhilip Withnall2015-08-211-14/+28
| | | | | | | Not setting a pure vfunc is a programmer error, so can be handled with a g_return_if_fail() rather than needing a g_warning(). https://bugzilla.gnome.org/show_bug.cgi?id=744060
* docs: Update interfaces in GObject how-to examplesPhilip Withnall2015-08-211-23/+34
| | | | | | | | Use G_DECLARE_INTERFACE and G_DEFINE_INTERFACE. Fix a couple of typos. Add some comments to empty functions to make it obvious they’re intentionally empty. https://bugzilla.gnome.org/show_bug.cgi?id=744060
* docs: Update instance private data in GObject how-to examplesPhilip Withnall2015-08-211-11/+11
| | | | | | Use get_instance_private(). https://bugzilla.gnome.org/show_bug.cgi?id=744060
* docs: Update property handling in GObject how-to examplesPhilip Withnall2015-08-211-19/+22
| | | | | | Be a bit more consistent about property enum numbering. https://bugzilla.gnome.org/show_bug.cgi?id=744060
* docs: Various wording changes in the GObject how-toPhilip Withnall2015-08-211-127/+78
| | | | | | | | | • Consistently make all titles sentence case • Fix various typos • Remove an unnecessary footnote • Remove first person phrasing https://bugzilla.gnome.org/show_bug.cgi?id=744060
* docs: Remove commented out sections from GObject how-toPhilip Withnall2015-08-211-402/+0
| | | | | | Unused, outdated, and unsalvagable. https://bugzilla.gnome.org/show_bug.cgi?id=744060
* docs: Add missing <function> elements to GObject how-toPhilip Withnall2015-08-211-24/+33
| | | | | | Break the text up a little with some formatting. https://bugzilla.gnome.org/show_bug.cgi?id=744060
* docs: Update GObject how-to for G_DECLARE_*_TYPE macrosPhilip Withnall2015-08-211-112/+171
| | | | | | | | | | | | | Restructure the section of the how-to which covers the header and source code boilerplate for declaring and defining GObjects to use the new G_DECLARE_*_TYPE macros. Present both final and derivable types. Trim various supporting paragraphs. Rename ‘class functions’ to ‘virtual functions’ to use consistent, modern terminology. https://bugzilla.gnome.org/show_bug.cgi?id=744060
* docs: Remove redundant header examples from GObject tutorialPhilip Withnall2015-03-031-69/+4
| | | | | | | These are in the header boilerplate section, but are actually source boilerplate which is covered in later sections. https://bugzilla.gnome.org/show_bug.cgi?id=744060
* docs: Change tutorial encodings from ISO-8859-1 to UTF-8Philip Withnall2015-03-031-1/+1
| | | | | | ISO-8859-1 — that’s a blast from the past. https://bugzilla.gnome.org/show_bug.cgi?id=744060
* docs: Remove a mention of g_clear_object() being atomicPhilip Withnall2014-12-161-1/+1
| | | | | | It is no longer atomic. https://bugzilla.gnome.org/show_bug.cgi?id=741589
* docs: syntax highlighting for the code examplesSébastien Wilmet2014-09-261-78/+78
| | | | | | In the sections Concepts, Tools and Tutorial. https://bugzilla.gnome.org/show_bug.cgi?id=736914
* docs: fix typosMichael Catanzaro2014-06-241-2/+2
|
* docs: Correct param to interface's default_init()Zeeshan Ali (Khattak)2014-06-211-3/+3
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=731979
* gobject: Document that classes/objects/interfaces are zero-filledPhilip Withnall2014-04-291-3/+6
| | | | | | | | | | On initialisation, GObject guarantees to zero-fill class/object/interface structures. Document this so people don’t spend forever writing: my_object->priv->some_member = NULL; my_object->priv->some_other_member = NULL; https://bugzilla.gnome.org/show_bug.cgi?id=729167
* small docs xml fixupRyan Lortie2013-06-241-0/+1
|
* Rename the generated private data getter functionEmmanuele Bassi2013-06-241-6/+6
| | | | | | | As it turns out, we have examples of internal functions called type_name_get_private() in the wild (especially among older libraries), so we need to use a name for the per-instance private data getter function that hopefully won't conflict with anything.
* docs: Clean up the GObject tutorial a bitEmmanuele Bassi2013-06-241-161/+142
| | | | | | | | Started off by using the new instance private data macro, ended up cleaning up the obscure, out of date, or simply broken concepts and paragraphs. https://bugzilla.gnome.org/show_bug.cgi?id=700035
* Fix property example in gobject tutorialWilliam Jon McCann2013-05-301-6/+4
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=692848
* Small cleanup to tutorial headingsMatthias Clasen2013-03-171-2/+2
| | | | | This makes all the subsection headers consistent. https://bugzilla.gnome.org/show_bug.cgi?id=659428
* Fix up GObject interface documentationStef Walter2012-07-091-95/+208
| | | | | | | | | | | | | | | | * Document how to override interfaces already implemented in a base class, and also call those base class implementations from a derived reimplementation. * Don't recomend people use base_init() style functions to initialize interface signals and properties, use default_init() aka class_init() instead (as G_DEFINE_INTERFACE() uses). * The above solves the interface init called multiple times problem, so remove some needless naysaying about that. * Document default_init() in the interface initialization discussion * Linkify more stuff. * Remove some crud and typos https://bugzilla.gnome.org/show_bug.cgi?id=675504
* docs: Use latest docbook dtd: 4.5Javier Jardón2012-04-231-2/+2
|
* docs/gobject/tutorial: Use g_object_class_install_propertiesJavier Jardón2012-01-121-11/+22
|
* Do not use static GTypeInfo and GInterfaceInfoNicola Fontana2011-11-291-1/+1
| | | | | | | | | Either g_type_register_static_simple (used by G_DEFINE_TYPE_EXTENDED) and G_IMPLEMENT_INTERFACE use automatic variables for GTypeInfo and GInterfaceInfo structs, while tutorials and source code often use static variables. This commit consistently adopts the former method. https://bugzilla.gnome.org/show_bug.cgi?id=600161
* GObject docs: resolve broken linksRyan Lortie2011-09-051-2/+2
| | | | | | Some links were broken due to typos, because functionality was removed in GLib 2.0 or for various other reasons. Fix up as many of them as is reasonable.
* Fix missing semi-colon after struct definitionAlexandre Franke2011-09-051-1/+1
|
* docs: shorten var name in exampleStefan Kost2010-09-191-3/+3
| | | | We use 'pspec' instead of 'maman_param_spec' elsewhere too.
* docs: fix docbook validityStefan Kost2010-09-191-5/+5
| | | | 'type' must be inside of 'link'.
* docs: use passive voice.Stefan Kost2010-09-191-2/+2
|
* docs: switch to xi:inbclude for the content to save some more secondsStefan Kost2010-01-071-8/+13
|
* Fix an example.Matthias Clasen2009-01-021-1/+1
| | | | svn path=/trunk/; revision=7757
* Fix some documentation typosMatthias Clasen2008-11-281-1/+1
| | | | svn path=/trunk/; revision=7707
* UpdatesMatthias Clasen2008-07-181-587/+584
| | | | svn path=/trunk/; revision=7201
* Bug 528648 – Extra >s in Object Construction section...Matthias Clasen2008-05-171-1/+1
| | | | | | | * gobject/tut_howto.xml: Fix a formatting glitch svn path=/trunk/; revision=6900
* Add missing *.Matthias Clasen2008-04-081-1/+1
| | | | | | * gobject/tut_howto.xml: Add missing *. svn path=/trunk/; revision=6829
* Documentation fixes. Recommend macro type names such asCody Russell2007-11-131-35/+35
| | | | | | | | | | | | | | | | | | | | 2007-11-13 Cody Russell <bratsche@gnome.org> * docs/reference/gobject/gobject-docs.sgml: * docs/reference/gobject/tut_gsignal.xml: * docs/reference/gobject/tut_gtype.xml: * docs/reference/gobject/tut_intro.xml: * docs/reference/gobject/tut_tools.xml: * docs/reference/gobject/tut_howto.xml: * docs/reference/gobject/tut_gobject.xml: Documentation fixes. Recommend macro type names such as NAUTILUS_TYPE_WINDOW (not NAUTILUS_WINDOW_TYPE). Fixed text which erroneously stated that superclass initializers don't run when an object is instantiated. Fixed numerous spelling mistakes. Minor grammar edits. (#490637, Adam Dingle) svn path=/trunk/; revision=5857