geany  1.38
About: Geany is a text editor (using GTK2) with basic features of an integrated development environment (syntax highlighting, code folding, symbol name auto-completion, ...). F: office T: editor programming GTK+ IDE
  Fossies Dox: geany-1.38.tar.bz2  ("unofficial" and yet experimental doxygen-generated source code documentation)  

tm_workspace.h
Go to the documentation of this file.
1/*
2*
3* Copyright (c) 2001-2002, Biswapesh Chattopadhyay
4* Copyright 2005 The Geany contributors
5*
6* This source code is released for free distribution under the terms of the
7* GNU General Public License.
8*
9*/
10
11
12#ifndef TM_WORKSPACE_H
13#define TM_WORKSPACE_H
14
15#include <glib.h>
16
17#include "tm_tag.h"
18
19G_BEGIN_DECLS
20
21
22/** The Tag Manager Workspace. This is a singleton object containing a list
23 * of individual source files. There is also a global tag list
24 * which can be loaded or created. This contains global tags gleaned from
25 * /usr/include, etc. and should be used for autocompletion, calltips, etc.
26 **/
27typedef struct TMWorkspace
28{
29 GPtrArray *global_tags; /**< Global tags loaded at startup. @elementtype{TMTag} */
30 GPtrArray *source_files; /**< An array of TMSourceFile pointers. @elementtype{TMSourceFile} */
31 GPtrArray *tags_array; /**< Sorted tags from all source files
32 (just pointers to source file tags, the tag objects are owned by the source files). @elementtype{TMTag} */
33 GPtrArray *typename_array; /* Typename tags for syntax highlighting (pointers owned by source files) */
34 GPtrArray *global_typename_array; /* Like above for global tags */
36
37
39
41
42void tm_workspace_add_source_files(GPtrArray *source_files);
43
44void tm_workspace_remove_source_files(GPtrArray *source_files);
45
46
47#ifdef GEANY_PRIVATE
48
49const TMWorkspace *tm_get_workspace(void);
50
51gboolean tm_workspace_load_global_tags(const char *tags_file, TMParserType mode);
52
53gboolean tm_workspace_create_global_tags(const char *pre_process, const char **includes,
54 int includes_count, const char *tags_file, TMParserType lang);
55
56GPtrArray *tm_workspace_find(const char *name, const char *scope, TMTagType type,
57 TMTagAttrType *attrs, TMParserType lang);
58
59GPtrArray *tm_workspace_find_prefix(const char *prefix, TMParserType lang, guint max_num);
60
61GPtrArray *tm_workspace_find_scope_members (TMSourceFile *source_file, const char *name,
62 gboolean function, gboolean member, const gchar *current_scope, gboolean search_namespace);
63
64
66
67void tm_workspace_update_source_file_buffer(TMSourceFile *source_file, guchar* text_buf,
68 gsize buf_size);
69
70void tm_workspace_free(void);
71
72
73#ifdef TM_DEBUG
74void tm_workspace_dump(void);
75#endif /* TM_DEBUG */
76
77
78#endif /* GEANY_PRIVATE */
79
80G_END_DECLS
81
82#endif /* TM_WORKSPACE_H */
const gchar * name
Definition: document.c:3219
static vString * scope
Definition: geany_go.c:78
The TMSourceFile structure represents the source file and its tags in the tag manager.
The Tag Manager Workspace.
Definition: tm_workspace.h:28
GPtrArray * global_typename_array
Definition: tm_workspace.h:34
GPtrArray * typename_array
Definition: tm_workspace.h:33
GPtrArray * global_tags
Global tags loaded at startup.
Definition: tm_workspace.h:29
GPtrArray * source_files
An array of TMSourceFile pointers.
Definition: tm_workspace.h:30
GPtrArray * tags_array
Sorted tags from all source files (just pointers to source file tags, the tag objects are owned by th...
Definition: tm_workspace.h:31
TMTagType
Types of tags.
Definition: tm_parser.h:23
gint TMParserType
Definition: tm_parser.h:52
TMTagAttrType
Tag Attributes.
Definition: tm_tag.h:51
GPtrArray * tm_workspace_find(const char *name, const char *scope, TMTagType type, TMTagAttrType *attrs, TMParserType lang)
Definition: tm_workspace.c:669
GPtrArray * tm_workspace_find_prefix(const char *prefix, TMParserType lang, guint max_num)
Definition: tm_workspace.c:718
void tm_workspace_add_source_file_noupdate(TMSourceFile *source_file)
Definition: tm_workspace.c:190
GPtrArray * tm_workspace_find_scope_members(TMSourceFile *source_file, const char *name, gboolean function, gboolean member, const gchar *current_scope, gboolean search_namespace)
gboolean tm_workspace_load_global_tags(const char *tags_file, TMParserType mode)
Definition: tm_workspace.c:348
gboolean tm_workspace_create_global_tags(const char *pre_process, const char **includes, int includes_count, const char *tags_file, TMParserType lang)
Definition: tm_workspace.c:576
void tm_workspace_free(void)
Definition: tm_workspace.c:90
const TMWorkspace * tm_get_workspace(void)
Definition: tm_workspace.c:116
void tm_workspace_update_source_file_buffer(TMSourceFile *source_file, guchar *text_buf, gsize buf_size)
Definition: tm_workspace.c:210
void tm_workspace_remove_source_files(GPtrArray *source_files)
Removes multiple source files from the workspace and updates the workspace tag arrays.
Definition: tm_workspace.c:317
void tm_workspace_add_source_files(GPtrArray *source_files)
Adds multiple source files to the workspace and updates the workspace tag arrays.
Definition: tm_workspace.c:292
void tm_workspace_remove_source_file(TMSourceFile *source_file)
Removes a source file from the workspace if it exists.
Definition: tm_workspace.c:223
void tm_workspace_add_source_file(TMSourceFile *source_file)
Adds a source file to the workspace, parses it and updates the workspace tags.
Definition: tm_workspace.c:181
struct TMWorkspace TMWorkspace
The Tag Manager Workspace.