Add introspection annotations and missing docs.

parent a17cdaae
...@@ -72,9 +72,9 @@ gucharmap_chapters_model_class_init (GucharmapChaptersModelClass *klass) ...@@ -72,9 +72,9 @@ gucharmap_chapters_model_class_init (GucharmapChaptersModelClass *klass)
* Creates a new #GucharmapCodepointList representing the characters in the * Creates a new #GucharmapCodepointList representing the characters in the
* current chapter. * current chapter.
* *
* Return value: the newly-created #GucharmapCodepointList, or NULL if * Return value: (transfer full): the newly-created #GucharmapCodepointList,
* there is no chapter selected. The caller should release the result with * or NULL if there is no chapter selected. The caller should release the
* g_object_unref() when finished. * result with g_object_unref() when finished.
**/ **/
GucharmapCodepointList * GucharmapCodepointList *
gucharmap_chapters_model_get_codepoint_list (GucharmapChaptersModel *chapters, gucharmap_chapters_model_get_codepoint_list (GucharmapChaptersModel *chapters,
...@@ -86,11 +86,12 @@ gucharmap_chapters_model_get_codepoint_list (GucharmapChaptersModel *chapters, ...@@ -86,11 +86,12 @@ gucharmap_chapters_model_get_codepoint_list (GucharmapChaptersModel *chapters,
} }
/** /**
* gucharmap_chapters_model_get_codepoint_list: * gucharmap_chapters_model_get_book_codepoint_list:
* @chapters: a #GucharmapChaptersModel * @chapters: a #GucharmapChaptersModel
* *
* Return value: a reference to a #GucharmapCodepointList representing all the characters * Return value: (transfer full): a reference to a #GucharmapCodepointList
* in all the chapters. It should not be modified, but must be g_object_unref()'d after use. * representing all the characters in all the chapters. It should not be
* modified, but must be g_object_unref()'d after use.
**/ **/
GucharmapCodepointList * GucharmapCodepointList *
gucharmap_chapters_model_get_book_codepoint_list (GucharmapChaptersModel *chapters) gucharmap_chapters_model_get_book_codepoint_list (GucharmapChaptersModel *chapters)
......
...@@ -79,12 +79,27 @@ gucharmap_chapters_view_class_init (GucharmapChaptersViewClass *klass) ...@@ -79,12 +79,27 @@ gucharmap_chapters_view_class_init (GucharmapChaptersViewClass *klass)
G_DEFINE_TYPE (GucharmapChaptersView, gucharmap_chapters_view, GTK_TYPE_TREE_VIEW) G_DEFINE_TYPE (GucharmapChaptersView, gucharmap_chapters_view, GTK_TYPE_TREE_VIEW)
/**
* gucharmap_chapters_view_new:
*
* Creates a new #GucharmapChaptersView object.
*
* Returns: (transfer full): a new #GucharmapChaptersView
*/
GtkWidget * GtkWidget *
gucharmap_chapters_view_new (void) gucharmap_chapters_view_new (void)
{ {
return g_object_new (gucharmap_chapters_view_get_type (), NULL); return g_object_new (gucharmap_chapters_view_get_type (), NULL);
} }
/**
* gucharmap_chapters_view_get_model:
* @view: a #GucharmapChaptersView
*
* Gets the #GucharmapChaptersModel of #view.
*
* Returns: (transfer none): the #GucharmapChaptersModel
*/
GucharmapChaptersModel * GucharmapChaptersModel *
gucharmap_chapters_view_get_model (GucharmapChaptersView *view) gucharmap_chapters_view_get_model (GucharmapChaptersView *view)
{ {
...@@ -241,9 +256,9 @@ gucharmap_chapters_view_select_character (GucharmapChaptersView *view, ...@@ -241,9 +256,9 @@ gucharmap_chapters_view_select_character (GucharmapChaptersView *view,
* Creates a new #GucharmapCodepointList representing the characters in the * Creates a new #GucharmapCodepointList representing the characters in the
* current chapter. * current chapter.
* *
* Return value: the newly-created #GucharmapCodepointList, or NULL if * Return value: (transfer full): the newly-created #GucharmapCodepointList,
* there is no chapter selected. The caller should release the result with * or NULL if there is no chapter selected. The caller should release the
* g_object_unref() when finished. * result with g_object_unref() when finished.
**/ **/
GucharmapCodepointList * GucharmapCodepointList *
gucharmap_chapters_view_get_codepoint_list (GucharmapChaptersView *view) gucharmap_chapters_view_get_codepoint_list (GucharmapChaptersView *view)
...@@ -262,11 +277,12 @@ gucharmap_chapters_view_get_codepoint_list (GucharmapChaptersView *view) ...@@ -262,11 +277,12 @@ gucharmap_chapters_view_get_codepoint_list (GucharmapChaptersView *view)
} }
/** /**
* gucharmap_chapters_view_get_codepoint_list: * gucharmap_chapters_view_get_book_codepoint_list:
* @view: a #GucharmapChaptersView * @view: a #GucharmapChaptersView
* *
* Return value: a reference to a #GucharmapCodepointList representing all the characters * Return value: (transfer full): a reference to a #GucharmapCodepointList representing
* in all the chapters. It should not be modified, but must be g_object_unref()'d after use. * all the characters in all the chapters. It should not be modified, but must
* be g_object_unref()'d after use.
**/ **/
GucharmapCodepointList * GucharmapCodepointList *
gucharmap_chapters_view_get_book_codepoint_list (GucharmapChaptersView *view) gucharmap_chapters_view_get_book_codepoint_list (GucharmapChaptersView *view)
......
...@@ -1474,6 +1474,12 @@ gucharmap_charmap_previous_chapter (GucharmapCharmap *charmap) ...@@ -1474,6 +1474,12 @@ gucharmap_charmap_previous_chapter (GucharmapCharmap *charmap)
gucharmap_chapters_view_previous (priv->chapters_view); gucharmap_chapters_view_previous (priv->chapters_view);
} }
/**
* gucharmap_charmap_get_chartable:
* @charmap: a #GucharmapCharmap
*
* Returns: (transfer none): a #GucharmapChartable
*/
GucharmapChartable * GucharmapChartable *
gucharmap_charmap_get_chartable (GucharmapCharmap *charmap) gucharmap_charmap_get_chartable (GucharmapCharmap *charmap)
{ {
...@@ -1510,6 +1516,15 @@ gucharmap_charmap_set_chapters_model (GucharmapCharmap *charmap, ...@@ -1510,6 +1516,15 @@ gucharmap_charmap_set_chapters_model (GucharmapCharmap *charmap,
g_object_thaw_notify (object); g_object_thaw_notify (object);
} }
/**
* gucharmap_charmap_get_chapters_model:
* @charmap: a #GucharmapCharmap
*
* Gets the #GucharmapChaptersModel associated with the #GucharmapChaptersView
* of @charmap.
*
* Returns: (transfer none): a #GucharmapChaptersModel
*/
GucharmapChaptersModel * GucharmapChaptersModel *
gucharmap_charmap_get_chapters_model (GucharmapCharmap *charmap) gucharmap_charmap_get_chapters_model (GucharmapCharmap *charmap)
{ {
...@@ -1518,14 +1533,29 @@ gucharmap_charmap_get_chapters_model (GucharmapCharmap *charmap) ...@@ -1518,14 +1533,29 @@ gucharmap_charmap_get_chapters_model (GucharmapCharmap *charmap)
return gucharmap_chapters_view_get_model (priv->chapters_view); return gucharmap_chapters_view_get_model (priv->chapters_view);
} }
/**
* gucharmap_charmap_get_chapters_view:
* @charmap: a #GucharmapCharmap
*
* Gets the #GucharmapChaptersView of @charmap
*
* Returns: (transfer none): the #GucharmapChaptersView
*/
GucharmapChaptersView * GucharmapChaptersView *
gucharmap_charmap_get_chapters_view (GucharmapCharmap *charmap) gucharmap_charmap_get_chapters_view (GucharmapCharmap *charmap)
{ {
GucharmapCharmapPrivate *priv = charmap->priv; GucharmapCharmapPrivate *priv = charmap->priv;
return priv->chapters_view; return priv->chapters_view;
} }
/**
* gucharmap_charmap_get_book_codepoint_list:
* @charmap: a #GucharmapCharmap
*
* Returns: (transfer full): the GucharmapCodepointList. Must be freed with
* g_object_unref().
*/
GucharmapCodepointList * GucharmapCodepointList *
gucharmap_charmap_get_book_codepoint_list (GucharmapCharmap *charmap) gucharmap_charmap_get_book_codepoint_list (GucharmapCharmap *charmap)
{ {
...@@ -1605,6 +1635,15 @@ gucharmap_charmap_get_active_page (GucharmapCharmap *charmap) ...@@ -1605,6 +1635,15 @@ gucharmap_charmap_get_active_page (GucharmapCharmap *charmap)
return priv->active_page; return priv->active_page;
} }
/**
* gucharmap_charmap_get_active_codepoint_list:
* @charmap: a #GucharmapCharmap
*
* Gets the @GucharmapCodepointList associated with the #GucharmapChartable of
* @charmap.
*
* Returns: (transfer none): the #GucharmapCodepointList
*/
GucharmapCodepointList * GucharmapCodepointList *
gucharmap_charmap_get_active_codepoint_list (GucharmapCharmap *charmap) gucharmap_charmap_get_active_codepoint_list (GucharmapCharmap *charmap)
{ {
......
...@@ -2783,7 +2783,7 @@ gucharmap_chartable_get_active_character (GucharmapChartable *chartable) ...@@ -2783,7 +2783,7 @@ gucharmap_chartable_get_active_character (GucharmapChartable *chartable)
} }
/** /**
* gucharmap_chartable_get_active_character: * gucharmap_chartable_set_active_character:
* @chartable: a #GucharmapChartable * @chartable: a #GucharmapChartable
* @wc: a unicode character (UTF-32) * @wc: a unicode character (UTF-32)
* *
...@@ -2838,9 +2838,9 @@ gucharmap_chartable_get_snap_pow2 (GucharmapChartable *chartable) ...@@ -2838,9 +2838,9 @@ gucharmap_chartable_get_snap_pow2 (GucharmapChartable *chartable)
} }
/** /**
* gucharmap_chartable_get_active_character: * gucharmap_chartable_set_codepoint_list:
* @chartable: a #GucharmapChartable * @chartable: a #GucharmapChartable
* @list: a #GucharmapCodepointList * @codepoint_list: a #GucharmapCodepointList
* *
* Sets the codepoint list to show in the character table. * Sets the codepoint list to show in the character table.
*/ */
...@@ -2882,7 +2882,7 @@ gucharmap_chartable_set_codepoint_list (GucharmapChartable *chartable, ...@@ -2882,7 +2882,7 @@ gucharmap_chartable_set_codepoint_list (GucharmapChartable *chartable,
* gucharmap_chartable_get_codepoint_list: * gucharmap_chartable_get_codepoint_list:
* @chartable: a #GucharmapChartable * @chartable: a #GucharmapChartable
* *
* Returns: the current codepoint list * Returns: (transfer none): the current codepoint list
*/ */
GucharmapCodepointList * GucharmapCodepointList *
gucharmap_chartable_get_codepoint_list (GucharmapChartable *chartable) gucharmap_chartable_get_codepoint_list (GucharmapChartable *chartable)
......
...@@ -76,8 +76,8 @@ void gucharmap_chartable_set_font_fallback (GucharmapChartable *chartable, ...@@ -76,8 +76,8 @@ void gucharmap_chartable_set_font_fallback (GucharmapChartable *chartable,
gboolean enable_font_fallback); gboolean enable_font_fallback);
gboolean gucharmap_chartable_get_font_fallback (GucharmapChartable *chartable); gboolean gucharmap_chartable_get_font_fallback (GucharmapChartable *chartable);
gunichar gucharmap_chartable_get_active_character (GucharmapChartable *chartable); gunichar gucharmap_chartable_get_active_character (GucharmapChartable *chartable);
void gucharmap_chartable_set_active_character (GucharmapChartable *chartable, void gucharmap_chartable_set_active_character (GucharmapChartable *chartable,
gunichar uc); gunichar wc);
void gucharmap_chartable_set_zoom_enabled (GucharmapChartable *chartable, void gucharmap_chartable_set_zoom_enabled (GucharmapChartable *chartable,
gboolean enabled); gboolean enabled);
gboolean gucharmap_chartable_get_zoom_enabled (GucharmapChartable *chartable); gboolean gucharmap_chartable_get_zoom_enabled (GucharmapChartable *chartable);
...@@ -85,7 +85,7 @@ void gucharmap_chartable_set_snap_pow2 (GucharmapChartable *chartable, ...@@ -85,7 +85,7 @@ void gucharmap_chartable_set_snap_pow2 (GucharmapChartable *chartable,
gboolean snap); gboolean snap);
gboolean gucharmap_chartable_get_snap_pow2 (GucharmapChartable *chartable); gboolean gucharmap_chartable_get_snap_pow2 (GucharmapChartable *chartable);
void gucharmap_chartable_set_codepoint_list (GucharmapChartable *chartable, void gucharmap_chartable_set_codepoint_list (GucharmapChartable *chartable,
GucharmapCodepointList *list); GucharmapCodepointList *codepoint_list);
GucharmapCodepointList * gucharmap_chartable_get_codepoint_list (GucharmapChartable *chartable); GucharmapCodepointList * gucharmap_chartable_get_codepoint_list (GucharmapChartable *chartable);
G_END_DECLS G_END_DECLS
......
...@@ -411,7 +411,7 @@ gucharmap_script_codepoint_list_append_script (GucharmapScriptCodepointList *li ...@@ -411,7 +411,7 @@ gucharmap_script_codepoint_list_append_script (GucharmapScriptCodepointList *li
* modified or free; the array itself however is allocated and should * modified or free; the array itself however is allocated and should
* be freed with g_free(). * be freed with g_free().
* *
* Returns: a newly allocated %NULL-terminated array of strings * Returns: (transfer container): a newly allocated %NULL-terminated array of strings
**/ **/
const gchar ** const gchar **
gucharmap_unicode_list_scripts (void) gucharmap_unicode_list_scripts (void)
......
...@@ -394,8 +394,13 @@ gucharmap_get_nameslist_exes (gunichar uc) ...@@ -394,8 +394,13 @@ gucharmap_get_nameslist_exes (gunichar uc)
return exes; return exes;
} }
/* returns newly allocated null-terminated array of gchar* */ /**
/* the items are const, but the array should be freed by the caller */ * gucharmap_get_nameslist_equals:
* @uc: a gunichar
*
* Returns: (transfer container): newly allocated null-terminated array of gchar*
* the items are const, but the array should be freed by the caller
*/
G_CONST_RETURN gchar ** G_CONST_RETURN gchar **
gucharmap_get_nameslist_equals (gunichar uc) gucharmap_get_nameslist_equals (gunichar uc)
{ {
...@@ -420,8 +425,13 @@ gucharmap_get_nameslist_equals (gunichar uc) ...@@ -420,8 +425,13 @@ gucharmap_get_nameslist_equals (gunichar uc)
return equals; return equals;
} }
/* returns newly allocated null-terminated array of gchar* */ /**
/* the items are const, but the array should be freed by the caller */ * gucharmap_get_nameslist_stars:
* @uc: a #gunichar
*
* Returns: (transfer container): newly allocated null-terminated array of gchar*
* the items are const, but the array should be freed by the caller
*/
G_CONST_RETURN gchar ** G_CONST_RETURN gchar **
gucharmap_get_nameslist_stars (gunichar uc) gucharmap_get_nameslist_stars (gunichar uc)
{ {
...@@ -446,8 +456,13 @@ gucharmap_get_nameslist_stars (gunichar uc) ...@@ -446,8 +456,13 @@ gucharmap_get_nameslist_stars (gunichar uc)
return stars; return stars;
} }
/* returns newly allocated null-terminated array of gchar* */ /**
/* the items are const, but the array should be freed by the caller */ * gucharmap_get_nameslist_pounds:
* @uc: a #gunichar
*
* Returns: (transfer container): newly allocated null-terminated array of gchar*
* the items are const, but the array should be freed by the caller
*/
G_CONST_RETURN gchar ** G_CONST_RETURN gchar **
gucharmap_get_nameslist_pounds (gunichar uc) gucharmap_get_nameslist_pounds (gunichar uc)
{ {
...@@ -472,8 +487,13 @@ gucharmap_get_nameslist_pounds (gunichar uc) ...@@ -472,8 +487,13 @@ gucharmap_get_nameslist_pounds (gunichar uc)
return pounds; return pounds;
} }
/* returns newly allocated null-terminated array of gchar* */ /**
/* the items are const, but the array should be freed by the caller */ * gucharmap_get_nameslist_colons:
* @uc: a #gunichar
*
* Returns: (transfer container): newly allocated null-terminated array of gchar*
* the items are const, but the array should be freed by the caller
*/
G_CONST_RETURN gchar ** G_CONST_RETURN gchar **
gucharmap_get_nameslist_colons (gunichar uc) gucharmap_get_nameslist_colons (gunichar uc)
{ {
...@@ -560,7 +580,7 @@ gucharmap_unichar_to_printable_utf8 (gunichar uc, gchar *outbuf) ...@@ -560,7 +580,7 @@ gucharmap_unichar_to_printable_utf8 (gunichar uc, gchar *outbuf)
/** /**
* gucharmap_unichar_type: * gucharmap_unichar_type:
* @c: a Unicode character * @uc: a Unicode character
* *
* Classifies a Unicode character by type. * Classifies a Unicode character by type.
* *
......
...@@ -48,7 +48,7 @@ typedef enum { ...@@ -48,7 +48,7 @@ typedef enum {
G_CONST_RETURN gchar * gucharmap_get_unicode_name (gunichar uc); G_CONST_RETURN gchar * gucharmap_get_unicode_name (gunichar uc);
G_CONST_RETURN gchar * gucharmap_get_unicode_data_name (gunichar uc); G_CONST_RETURN gchar * gucharmap_get_unicode_data_name (gunichar uc);
gint gucharmap_get_unicode_data_name_count (void); gint gucharmap_get_unicode_data_name_count (void);
GucharmapUnicodeVersion gucharmap_get_unicode_version (gunichar wc); GucharmapUnicodeVersion gucharmap_get_unicode_version (gunichar uc);
G_CONST_RETURN gchar * gucharmap_get_unicode_category_name (gunichar uc); G_CONST_RETURN gchar * gucharmap_get_unicode_category_name (gunichar uc);
gint gucharmap_get_unihan_count (void); gint gucharmap_get_unihan_count (void);
G_CONST_RETURN gchar * gucharmap_get_unicode_kDefinition (gunichar uc); G_CONST_RETURN gchar * gucharmap_get_unicode_kDefinition (gunichar uc);
...@@ -60,17 +60,17 @@ G_CONST_RETURN gchar * gucharmap_get_unicode_kJapaneseKun (gunichar uc); ...@@ -60,17 +60,17 @@ G_CONST_RETURN gchar * gucharmap_get_unicode_kJapaneseKun (gunichar uc);
G_CONST_RETURN gchar * gucharmap_get_unicode_kJapaneseOn (gunichar uc); G_CONST_RETURN gchar * gucharmap_get_unicode_kJapaneseOn (gunichar uc);
/* nameslist stuff */ /* nameslist stuff */
G_CONST_RETURN gchar ** gucharmap_get_nameslist_stars (gunichar wc); G_CONST_RETURN gchar ** gucharmap_get_nameslist_stars (gunichar uc);
G_CONST_RETURN gchar ** gucharmap_get_nameslist_equals (gunichar wc); G_CONST_RETURN gchar ** gucharmap_get_nameslist_equals (gunichar uc);
gunichar * gucharmap_get_nameslist_exes (gunichar wc); gunichar * gucharmap_get_nameslist_exes (gunichar uc);
G_CONST_RETURN gchar ** gucharmap_get_nameslist_pounds (gunichar wc); G_CONST_RETURN gchar ** gucharmap_get_nameslist_pounds (gunichar uc);
G_CONST_RETURN gchar ** gucharmap_get_nameslist_colons (gunichar wc); G_CONST_RETURN gchar ** gucharmap_get_nameslist_colons (gunichar uc);
gboolean gucharmap_unichar_validate (gunichar wc); gboolean gucharmap_unichar_validate (gunichar uc);
gint gucharmap_unichar_to_printable_utf8 (gunichar wc, gint gucharmap_unichar_to_printable_utf8 (gunichar uc,
gchar *outbuf); gchar *outbuf);
GUnicodeType gucharmap_unichar_type (gunichar wc); GUnicodeType gucharmap_unichar_type (gunichar uc);
gboolean gucharmap_unichar_isdefined (gunichar wc); gboolean gucharmap_unichar_isdefined (gunichar uc);
gboolean gucharmap_unichar_isgraph (gunichar wc); gboolean gucharmap_unichar_isgraph (gunichar uc);
/* defined in gucharmap-script-codepoint-list.c */ /* defined in gucharmap-script-codepoint-list.c */
G_CONST_RETURN gchar ** gucharmap_unicode_list_scripts (void); G_CONST_RETURN gchar ** gucharmap_unicode_list_scripts (void);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment