Fix file names of generated tags files for C, PHP and Python
[geany-mirror.git] / src / tagmanager / tm_workspace.h
blob2e800ac9172b7b238b96d833f6ac01c6a5279180
1 /*
3 * Copyright (c) 2001-2002, Biswapesh Chattopadhyay
5 * This source code is released for free distribution under the terms of the
6 * GNU General Public License.
8 */
11 #ifndef TM_WORKSPACE_H
12 #define TM_WORKSPACE_H
14 #include <glib.h>
16 #include "tm_tag.h"
18 G_BEGIN_DECLS
21 /** The Tag Manager Workspace. This is a singleton object containing a list
22 * of individual source files. There is also a global tag list
23 * which can be loaded or created. This contains global tags gleaned from
24 * /usr/include, etc. and should be used for autocompletion, calltips, etc.
25 **/
26 typedef struct TMWorkspace
28 GPtrArray *global_tags; /**< Global tags loaded at startup. @elementtype{TMTag} */
29 GPtrArray *source_files; /**< An array of TMSourceFile pointers. @elementtype{TMSourceFile} */
30 GPtrArray *tags_array; /**< Sorted tags from all source files
31 (just pointers to source file tags, the tag objects are owned by the source files). @elementtype{TMTag} */
32 GPtrArray *typename_array; /* Typename tags for syntax highlighting (pointers owned by source files) */
33 GPtrArray *global_typename_array; /* Like above for global tags */
34 } TMWorkspace;
37 void tm_workspace_add_source_file(TMSourceFile *source_file);
39 void tm_workspace_remove_source_file(TMSourceFile *source_file);
41 void tm_workspace_add_source_files(GPtrArray *source_files);
43 void tm_workspace_remove_source_files(GPtrArray *source_files);
46 #ifdef GEANY_PRIVATE
48 const TMWorkspace *tm_get_workspace(void);
50 gboolean tm_workspace_load_global_tags(const char *tags_file, TMParserType mode);
52 gboolean tm_workspace_create_global_tags(const char *pre_process, const char **includes,
53 int includes_count, const char *tags_file, TMParserType lang);
55 GPtrArray *tm_workspace_find(const char *name, const char *scope, TMTagType type,
56 TMTagAttrType *attrs, TMParserType lang);
58 GPtrArray *tm_workspace_find_prefix(const char *prefix, TMParserType lang, guint max_num);
60 GPtrArray *tm_workspace_find_scope_members (TMSourceFile *source_file, const char *name,
61 gboolean function, gboolean member, const gchar *current_scope, gboolean search_namespace);
64 void tm_workspace_add_source_file_noupdate(TMSourceFile *source_file);
66 void tm_workspace_update_source_file_buffer(TMSourceFile *source_file, guchar* text_buf,
67 gsize buf_size);
69 void tm_workspace_free(void);
72 #ifdef TM_DEBUG
73 void tm_workspace_dump(void);
74 #endif /* TM_DEBUG */
77 #endif /* GEANY_PRIVATE */
79 G_END_DECLS
81 #endif /* TM_WORKSPACE_H */