From 989af29bb14853f9eb793f8ea4a664188d447384 Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Mon, 27 Jun 2016 22:59:56 +0200 Subject: [PATCH 1/3] api: formally put struct TMTag into the API It's members are already documented so it's kind of half-exported anyway. Since geanygendoc already uses the structure (and I plan on writing a plugin that requires it too) just make it official. --- tagmanager/src/tm_tag.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tagmanager/src/tm_tag.h b/tagmanager/src/tm_tag.h index f58fa64a2d..0ca0c5eabd 100644 --- a/tagmanager/src/tm_tag.h +++ b/tagmanager/src/tm_tag.h @@ -80,7 +80,10 @@ typedef enum #define TAG_IMPL_VIRTUAL 'v' /**< Virtual implementation */ #define TAG_IMPL_UNKNOWN 'x' /**< Unknown implementation */ -typedef struct _TMTag +/** + * The TMTag structure represents a single tag in the tag manager. + **/ +typedef struct TMTag { char *name; /**< Name of tag */ TMTagType type; /**< Tag Type */ From cef4751fa4e6f4770770c5e20a55a11feb42ded2 Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Mon, 27 Jun 2016 23:01:42 +0200 Subject: [PATCH 2/3] doxygen: make doxygen scan necessary tagmanager files tm_tag.h and tm_parser.h contain documented symbols so doxygen shall process them. --- doc/Doxyfile.in | 1 + doc/Makefile.am | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/Doxyfile.in b/doc/Doxyfile.in index 6d83977a14..4373dfe5e5 100644 --- a/doc/Doxyfile.in +++ b/doc/Doxyfile.in @@ -794,6 +794,7 @@ INPUT = @top_srcdir@/src/ \ @top_srcdir@/tagmanager/src/tm_source_file.h \ @top_srcdir@/tagmanager/src/tm_workspace.c \ @top_srcdir@/tagmanager/src/tm_workspace.h \ + @top_srcdir@/tagmanager/src/tm_tag.h \ @top_srcdir@/tagmanager/src/tm_parser.h # This tag can be used to specify the character encoding of the source files diff --git a/doc/Makefile.am b/doc/Makefile.am index 3c57960c65..46553b32fe 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -97,7 +97,9 @@ doxygen_sources = \ $(top_srcdir)/src/*.[ch] \ $(top_srcdir)/plugins/geanyplugin.h \ $(top_srcdir)/tagmanager/src/tm_source_file.[ch] \ - $(top_srcdir)/tagmanager/src/tm_workspace.[ch] + $(top_srcdir)/tagmanager/src/tm_workspace.[ch] \ + $(top_srcdir)/tagmanager/src/tm_tag.h \ + $(top_srcdir)/tagmanager/src/tm_parser.h Doxyfile.stamp: Doxyfile $(doxygen_sources) $(AM_V_GEN)$(DOXYGEN) Doxyfile && echo "" > $@ From 659b277ef6861ea1b55e996e62ece24f9134a94b Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Tue, 28 Jun 2016 16:52:46 +0200 Subject: [PATCH 3/3] api: annotate element types in the TMWorkspace arrays This allows GI-based plugins to traverse/inspect the array and consequently Geany loaded tags. --- tagmanager/src/tm_workspace.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tagmanager/src/tm_workspace.h b/tagmanager/src/tm_workspace.h index f49445d75d..2e800ac917 100644 --- a/tagmanager/src/tm_workspace.h +++ b/tagmanager/src/tm_workspace.h @@ -25,10 +25,10 @@ G_BEGIN_DECLS **/ typedef struct TMWorkspace { - GPtrArray *global_tags; /**< Global tags loaded at startup */ - GPtrArray *source_files; /**< An array of TMSourceFile pointers */ - GPtrArray *tags_array; /**< Sorted tags from all source files - (just pointers to source file tags, the tag objects are owned by the source files) */ + GPtrArray *global_tags; /**< Global tags loaded at startup. @elementtype{TMTag} */ + GPtrArray *source_files; /**< An array of TMSourceFile pointers. @elementtype{TMSourceFile} */ + GPtrArray *tags_array; /**< Sorted tags from all source files + (just pointers to source file tags, the tag objects are owned by the source files). @elementtype{TMTag} */ GPtrArray *typename_array; /* Typename tags for syntax highlighting (pointers owned by source files) */ GPtrArray *global_typename_array; /* Like above for global tags */ } TMWorkspace;