Debian Codegraph @

geanygendoc/src/ggd-tag-utils.h

raw
1 /*
2 *
3 * GeanyGenDoc, a Geany plugin to ease generation of source code documentation
4 * Copyright (C) 2010-2011 Colomban Wendling <[email protected]>
5 *
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 *
19 */
20
21 #ifndef H_GGD_TAG_UTILS
22 #define H_GGD_TAG_UTILS
23
24 #include <glib.h>
25 #include <geanyplugin.h>
26
27 #include "ggd-macros.h"
28
29 G_BEGIN_DECLS
30 GGD_BEGIN_PLUGIN_API
31
32
33 /**
34 * GGD_SORT_ASC:
35 *
36 * Constant representing ascending sort
37 */
38 #define GGD_SORT_ASC (1)
39 /**
40 * GGD_SORT_DESC:
41 *
42 * Constant representing descending sort
43 */
44 #define GGD_SORT_DESC (-1)
45
46 void ggd_tag_sort_by_line (GPtrArray *tags,
47 gint direction);
48 GList *ggd_tag_sort_by_line_to_list (const GPtrArray *tags,
49 gint direction);
50 TMTag *ggd_tag_find_from_line (const GPtrArray *tags,
51 gulong line);
52 TMTag *ggd_tag_find_at_current_pos (GeanyDocument *doc);
53 TMTag *ggd_tag_find_parent (const GPtrArray *tags,
54 GeanyFiletypeID geany_ft,
55 const TMTag *child);
56 GList *ggd_tag_find_children_filtered (const GPtrArray *tags,
57 const TMTag *parent,
58 GeanyFiletypeID geany_ft,
59 TMTagType filter);
60 GList *ggd_tag_find_children (const GPtrArray *tags,
61 const TMTag *parent,
62 GeanyFiletypeID geany_ft);
63 gchar *ggd_tag_resolve_type_hierarchy (const GPtrArray *tags,
64 GeanyFiletypeID geany_ft,
65 const TMTag *tag);
66 TMTag *ggd_tag_find_from_name (const GPtrArray *tags,
67 const gchar *name);
68 const gchar *ggd_tag_get_type_name (const TMTag *tag);
69 const gchar *ggd_tag_type_get_name (TMTagType type);
70 TMTagType ggd_tag_type_from_name (const gchar *name);
71
72
73 GGD_END_PLUGIN_API
74 G_END_DECLS
75
76 #endif /* guard */