Remove not useless tm_source_file_ctags_init() indirection
[geany-mirror.git] / tagmanager / src / tm_source_file.h
blobee60c4e16173a5a15575e53f9df4d7534d6fac7b
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 */
10 #ifndef TM_SOURCE_FILE_H
11 #define TM_SOURCE_FILE_H
13 #include <stdio.h>
14 #include <glib.h>
15 #include <glib-object.h>
17 #include "tm_parser.h"
19 G_BEGIN_DECLS
21 /* Casts a pointer to a pointer to a TMSourceFile structure */
22 #define TM_SOURCE_FILE(source_file) ((TMSourceFile *) source_file)
24 /* Evaluates to X is X is defined, else evaluates to Y */
25 #define FALLBACK(X,Y) (X)?(X):(Y)
28 /**
29 * The TMSourceFile structure represents the source file and its tags in the tag manager.
30 **/
31 typedef struct TMSourceFile
33 TMParserType lang; /* Programming language used */
34 char *file_name; /**< Full file name (inc. path) */
35 char *short_name; /**< Just the name of the file (without the path) */
36 GPtrArray *tags_array; /**< Sorted tag array obtained by parsing the object */
37 } TMSourceFile;
39 GType tm_source_file_get_type(void);
41 TMSourceFile *tm_source_file_new(const char *file_name, const char *name);
43 void tm_source_file_free(TMSourceFile *source_file);
45 gchar *tm_get_real_path(const gchar *file_name);
47 #ifdef GEANY_PRIVATE
49 const gchar *tm_source_file_get_lang_name(TMParserType lang);
51 TMParserType tm_source_file_get_named_lang(const gchar *name);
53 gboolean tm_source_file_parse(TMSourceFile *source_file, guchar* text_buf, gsize buf_size,
54 gboolean use_buffer);
56 GPtrArray *tm_source_file_read_tags_file(const gchar *tags_file, TMParserType mode);
58 gboolean tm_source_file_write_tags_file(const gchar *tags_file, GPtrArray *tags_array);
60 #endif /* GEANY_PRIVATE */
62 G_END_DECLS
64 #endif /* TM_SOURCE_FILE_H */