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_source_file.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#ifndef TM_SOURCE_FILE_H
12#define TM_SOURCE_FILE_H
13
14#include <stdio.h>
15#include <glib.h>
16#include <glib-object.h>
17
18#include "tm_parser.h"
19
20G_BEGIN_DECLS
21
22/* Casts a pointer to a pointer to a TMSourceFile structure */
23#define TM_SOURCE_FILE(source_file) ((TMSourceFile *) source_file)
24
25/* Evaluates to X is X is defined, else evaluates to Y */
26#define FALLBACK(X,Y) (X)?(X):(Y)
27
28
29/**
30 * The TMSourceFile structure represents the source file and its tags in the tag manager.
31 **/
32typedef struct TMSourceFile
33{
34 TMParserType lang; /* Programming language used */
35 char *file_name; /**< Full file name (inc. path) */
36 char *short_name; /**< Just the name of the file (without the path) */
37 GPtrArray *tags_array; /**< Sorted tag array obtained by parsing the object. @elementtype{TMTag} */
39
41
42TMSourceFile *tm_source_file_new(const char *file_name, const char *name);
43
44void tm_source_file_free(TMSourceFile *source_file);
45
46gchar *tm_get_real_path(const gchar *file_name)
47#ifndef GEANY_PRIVATE
48G_DEPRECATED_FOR(utils_get_real_path)
49#endif
50;
51
52#ifdef GEANY_PRIVATE
53
55
57
58gboolean tm_source_file_parse(TMSourceFile *source_file, guchar* text_buf, gsize buf_size,
59 gboolean use_buffer);
60
61GPtrArray *tm_source_file_read_tags_file(const gchar *tags_file, TMParserType mode);
62
63gboolean tm_source_file_write_tags_file(const gchar *tags_file, GPtrArray *tags_array);
64
65gchar tm_source_file_get_tag_impl(const gchar *impl);
66
67gchar tm_source_file_get_tag_access(const gchar *access);
68
69#endif /* GEANY_PRIVATE */
70
71G_END_DECLS
72
73#endif /* TM_SOURCE_FILE_H */
const gchar * name
Definition: document.c:3219
implType impl
Definition: geany_php.c:233
accessType access
Definition: geany_php.c:232
The TMSourceFile structure represents the source file and its tags in the tag manager.
TMParserType lang
GPtrArray * tags_array
Sorted tag array obtained by parsing the object.
char * file_name
Full file name (inc.
char * short_name
Just the name of the file (without the path)
gint TMParserType
Definition: tm_parser.h:52
GPtrArray * tm_source_file_read_tags_file(const gchar *tags_file, TMParserType mode)
TMParserType tm_source_file_get_named_lang(const gchar *name)
gchar tm_source_file_get_tag_access(const gchar *access)
gboolean tm_source_file_write_tags_file(const gchar *tags_file, GPtrArray *tags_array)
gboolean tm_source_file_parse(TMSourceFile *source_file, guchar *text_buf, gsize buf_size, gboolean use_buffer)
const gchar * tm_source_file_get_lang_name(TMParserType lang)
gchar tm_source_file_get_tag_impl(const gchar *impl)
void tm_source_file_free(TMSourceFile *source_file)
Decrements the reference count of source_file.
TMSourceFile * tm_source_file_new(const char *file_name, const char *name)
Initializes a TMSourceFile structure and returns a pointer to it.
struct TMSourceFile TMSourceFile
The TMSourceFile structure represents the source file and its tags in the tag manager.
GType tm_source_file_get_type(void)
gchar * tm_get_real_path(const gchar *file_name)
Given a file name, returns a newly allocated string containing the realpath() of the file.
gchar * utils_get_real_path(const gchar *file_name)
Get a link-dereferenced, absolute version of a file name.
Definition: utils.c:2406