From 0553a5524dd2208fd8c82484458ac7c02a8b412d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Jard=C3=B3n?= Date: Mon, 18 Apr 2011 00:12:49 +0100 Subject: [PATCH] Move documentation to inline comments: GtkTextBuffer --- docs/reference/gtk/tmpl/.gitignore | 1 + docs/reference/gtk/tmpl/gtktextbuffer.sgml | 974 --------------------- gtk/gtktextbuffer.c | 12 + gtk/gtktextbufferrichtext.h | 32 + 4 files changed, 45 insertions(+), 974 deletions(-) delete mode 100644 docs/reference/gtk/tmpl/gtktextbuffer.sgml diff --git a/docs/reference/gtk/tmpl/.gitignore b/docs/reference/gtk/tmpl/.gitignore index 35d3e2ae27..8c3a63d506 100644 --- a/docs/reference/gtk/tmpl/.gitignore +++ b/docs/reference/gtk/tmpl/.gitignore @@ -113,6 +113,7 @@ gtkstyle.sgml gtktable.sgml gtktearoffmenuitem.sgml gtktesting.sgml +gtktextbuffer.sgml gtktextiter.sgml gtktextmark.sgml gtktexttag.sgml diff --git a/docs/reference/gtk/tmpl/gtktextbuffer.sgml b/docs/reference/gtk/tmpl/gtktextbuffer.sgml deleted file mode 100644 index ff1c01a417..0000000000 --- a/docs/reference/gtk/tmpl/gtktextbuffer.sgml +++ /dev/null @@ -1,974 +0,0 @@ - -GtkTextBuffer - - -Stores attributed text for display in a GtkTextView - - - - -You may wish to begin by reading the text widget -conceptual overview which gives an overview of all the objects and data -types related to the text widget and how they work together. - - - - - - - - -#GtkTextView, #GtkTextIter, #GtkTextMark - - - - - - - - - - - - - - - - - - - -@textbuffer: the object which received the signal. -@arg1: -@arg2: -@arg3: - - - - - - -@textbuffer: the object which received the signal. - - - - - - -@textbuffer: the object which received the signal. - - - - - - -@textbuffer: the object which received the signal. -@arg1: -@arg2: - - - - - - -@textbuffer: the object which received the signal. - - - - - - -@textbuffer: the object which received the signal. -@arg1: -@arg2: - - - - - - -@textbuffer: the object which received the signal. -@arg1: -@arg2: - - - - - - -@textbuffer: the object which received the signal. -@arg1: -@arg2: -@arg3: - - - - - - -@textbuffer: the object which received the signal. -@arg1: - - - - - - -@textbuffer: the object which received the signal. -@arg1: -@arg2: - - - - - - -@textbuffer: the object which received the signal. - - - - - - -@textbuffer: the object which received the signal. -@arg1: - - - - - - -@textbuffer: the object which received the signal. -@arg1: -@arg2: -@arg3: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@table: -@Returns: - - - - - - - -@buffer: -@Returns: - - - - - - - -@buffer: -@Returns: - - - - - - - -@buffer: -@Returns: - - - - - - - -@buffer: -@iter: -@text: -@len: - - - - - - - -@buffer: -@text: -@len: - - - - - - - -@buffer: -@iter: -@text: -@len: -@default_editable: -@Returns: - - - - - - - -@buffer: -@text: -@len: -@default_editable: -@Returns: - - - - - - - -@buffer: -@iter: -@start: -@end: - - - - - - - -@buffer: -@iter: -@start: -@end: -@default_editable: -@Returns: - - - - - - - -@buffer: -@iter: -@text: -@len: -@first_tag: -@Varargs: - - - - - - - -@buffer: -@iter: -@text: -@len: -@first_tag_name: -@Varargs: - - - - - - - -@buffer: -@start: -@end: - - - - - - - -@buffer: -@start_iter: -@end_iter: -@default_editable: -@Returns: - - - - - - - -@buffer: -@iter: -@interactive: -@default_editable: -@Returns: - - - - - - - -@buffer: -@text: -@len: - - - - - - - -@buffer: -@start: -@end: -@include_hidden_chars: -@Returns: - - - - - - - -@buffer: -@start: -@end: -@include_hidden_chars: -@Returns: - - - - - - - -@buffer: -@iter: -@pixbuf: - - - - - - - -@buffer: -@iter: -@anchor: - - - - - - - -@buffer: -@iter: -@Returns: - - - - - - - -@buffer: -@mark_name: -@where: -@left_gravity: -@Returns: - - - - - - - -@buffer: -@mark: -@where: - - - - - - - -@buffer: -@name: -@where: - - - - - - - -@buffer: -@mark: -@where: - - - - - - - -@buffer: -@mark: - - - - - - - -@buffer: -@name: - - - - - - - -@buffer: -@name: -@Returns: - - - - - - - -@buffer: -@Returns: - - - - - - - -@buffer: -@Returns: - - - - - - - -@buffer: -@Returns: - - - - - - - -@buffer: -@where: - - - - - - - -@buffer: -@ins: -@bound: - - - - - - - -@buffer: -@tag: -@start: -@end: - - - - - - - -@buffer: -@tag: -@start: -@end: - - - - - - - -@buffer: -@name: -@start: -@end: - - - - - - - -@buffer: -@name: -@start: -@end: - - - - - - - -@buffer: -@start: -@end: - - - - - - - -@buffer: -@tag_name: -@first_property_name: -@Varargs: -@Returns: - - - - - - - -@buffer: -@iter: -@line_number: -@char_offset: - - - - - - - -@buffer: -@iter: -@char_offset: - - - - - - - -@buffer: -@iter: -@line_number: - - - - - - - -@buffer: -@iter: -@line_number: -@byte_index: - - - - - - - -@buffer: -@iter: -@mark: - - - - - - - -@buffer: -@iter: -@anchor: - - - - - - - -@buffer: -@iter: - - - - - - - -@buffer: -@iter: - - - - - - - -@buffer: -@start: -@end: - - - - - - - -@buffer: -@Returns: - - - - - - - -@buffer: -@setting: - - - - - - - -@buffer: -@interactive: -@default_editable: -@Returns: - - - - - - - -@buffer: -@clipboard: -@override_location: -@default_editable: - - - - - - - -@buffer: -@clipboard: - - - - - - - -@buffer: -@clipboard: -@default_editable: - - - - - - - -@buffer: -@start: -@end: -@Returns: - - - - - - - -@buffer: - - - - - - - -@buffer: - - - - - - - -@buffer: -@clipboard: - - - - - - - -@buffer: -@clipboard: - - - - - - - -@GTK_TEXT_BUFFER_TARGET_INFO_BUFFER_CONTENTS: -@GTK_TEXT_BUFFER_TARGET_INFO_RICH_TEXT: -@GTK_TEXT_BUFFER_TARGET_INFO_TEXT: - - - -A function that is called to deserialize rich text that has been -serialized with gtk_text_buffer_serialize(), and insert it at @iter. - - -@register_buffer: the #GtkTextBuffer the format is registered with -@content_buffer: the #GtkTextBuffer to deserialize into -@iter: insertion point for the deserialized text -@data: data to deserialize -@length: length of %data -@create_tags: %TRUE if deserializing may create tags -@user_data: user data that was specified when registering the format -@error: return location for a #GError -@Returns: %TRUE on success, %FALSE otherwise - - - - - - - -@register_buffer: -@content_buffer: -@format: -@iter: -@data: -@length: -@error: -@Returns: - - - - - - - -@buffer: -@format: -@Returns: - - - - - - - -@buffer: -@format: -@can_create_tags: - - - - - - - -@buffer: -@Returns: - - - - - - - -@buffer: -@n_formats: -@Returns: - - - - - - - -@buffer: -@Returns: - - - - - - - -@buffer: -@n_formats: -@Returns: - - - - - - - -@buffer: -@mime_type: -@function: -@user_data: -@user_data_destroy: -@Returns: - - - - - - - -@buffer: -@tagset_name: -@Returns: - - - - - - - -@buffer: -@mime_type: -@function: -@user_data: -@user_data_destroy: -@Returns: - - - - - - - -@buffer: -@tagset_name: -@Returns: - - - - -A function that is called to serialize the content of a text buffer. -It must return the serialized form of the content. - - -@register_buffer: the #GtkTextBuffer for which the format is registered -@content_buffer: the #GtkTextBuffer to serialize -@start: start of the block of text to serialize -@end: end of the block of text to serialize -@length: Return location for the length of the serialized data -@user_data: user data that was specified when registering the format -@Returns: a newly-allocated array of guint8 which contains the serialized - data, or %NULL if an error occurred - - - - - - - -@register_buffer: -@content_buffer: -@format: -@start: -@end: -@length: -@Returns: - - - - - - - -@buffer: -@format: - - - - - - - -@buffer: -@format: - - diff --git a/gtk/gtktextbuffer.c b/gtk/gtktextbuffer.c index a576c69aa6..24ca6e18e9 100644 --- a/gtk/gtktextbuffer.c +++ b/gtk/gtktextbuffer.c @@ -43,6 +43,18 @@ #include "gtkintl.h" +/** + * SECTION:gtktextbuffer + * @Short_description: Stores attributed text for display in a GtkTextView + * @Title: GtkTextBuffer + * @See_also: #GtkTextView, #GtkTextIter, #GtkTextMark + * + * You may wish to begin by reading the text widget + * conceptual overview which gives an overview of all the objects and data + * types related to the text widget and how they work together. + */ + + typedef struct _GtkTextLogAttrCache GtkTextLogAttrCache; struct _GtkTextBufferPrivate diff --git a/gtk/gtktextbufferrichtext.h b/gtk/gtktextbufferrichtext.h index 614b43dcfd..795247e561 100644 --- a/gtk/gtktextbufferrichtext.h +++ b/gtk/gtktextbufferrichtext.h @@ -30,12 +30,44 @@ G_BEGIN_DECLS +/** + * GtkTextBufferSerializeFunc: + * @register_buffer: the #GtkTextBuffer for which the format is registered + * @content_buffer: the #GtkTextBuffer to serialize + * @start: start of the block of text to serialize + * @end: end of the block of text to serialize + * @length: Return location for the length of the serialized data + * @user_data: user data that was specified when registering the format + * + * A function that is called to serialize the content of a text buffer. + * It must return the serialized form of the content. + * + * Returns: a newly-allocated array of guint8 which contains the serialized + * data, or %NULL if an error occurred + */ typedef guint8 * (* GtkTextBufferSerializeFunc) (GtkTextBuffer *register_buffer, GtkTextBuffer *content_buffer, const GtkTextIter *start, const GtkTextIter *end, gsize *length, gpointer user_data); + +/** + * GtkTextBufferDeserializeFunc: + * @register_buffer: the #GtkTextBuffer the format is registered with + * @content_buffer: the #GtkTextBuffer to deserialize into + * @iter: insertion point for the deserialized text + * @data: data to deserialize + * @length: length of %data + * @create_tags: %TRUE if deserializing may create tags + * @user_data: user data that was specified when registering the format + * @error: return location for a #GError + * + * A function that is called to deserialize rich text that has been + * serialized with gtk_text_buffer_serialize(), and insert it at @iter. + * + * Returns: %TRUE on success, %FALSE otherwise + */ typedef gboolean (* GtkTextBufferDeserializeFunc) (GtkTextBuffer *register_buffer, GtkTextBuffer *content_buffer, GtkTextIter *iter,