| 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_FILE_TYPE |
| 22 |
#define H_GGD_FILE_TYPE |
| 23 |
|
| 24 |
#include <stdio.h> |
| 25 |
#include <glib.h> |
| 26 |
#include <ctpl/ctpl.h> |
| 27 |
#include <geanyplugin.h> |
| 28 |
|
| 29 |
#include "ggd-doc-type.h" |
| 30 |
#include "ggd-macros.h" |
| 31 |
|
| 32 |
G_BEGIN_DECLS |
| 33 |
GGD_BEGIN_PLUGIN_API |
| 34 |
|
| 35 |
|
| 36 |
typedef struct _GgdFileType GgdFileType; |
| 37 |
|
| 38 |
struct _GgdFileType |
| 39 |
{ |
| 40 |
gint ref_count; |
| 41 |
GeanyFiletypeID geany_ft; |
| 42 |
|
| 43 |
/* TODO: add support for custom environment variables, which may be used |
| 44 |
* for tuning the templates easily (e.g. Doxygen's prefix character, |
| 45 |
* whether to add a since tag and so on) */ |
| 46 |
GRegex *match_function_arguments; |
| 47 |
/*GRegex *match_function_start;*/ |
| 48 |
CtplEnviron *user_env; |
| 49 |
GHashTable *doctypes; |
| 50 |
}; |
| 51 |
|
| 52 |
|
| 53 |
GgdFileType *ggd_file_type_new (GeanyFiletypeID type); |
| 54 |
GgdFileType *ggd_file_type_ref (GgdFileType *filetype); |
| 55 |
void ggd_file_type_unref (GgdFileType *filetype); |
| 56 |
void ggd_file_type_dump (const GgdFileType *filetype, |
| 57 |
FILE *stream); |
| 58 |
void ggd_file_type_add_doc (GgdFileType *filetype, |
| 59 |
GgdDocType *doctype); |
| 60 |
GgdDocType *ggd_file_type_get_doc (const GgdFileType *filetype, |
| 61 |
const gchar *name); |
| 62 |
|
| 63 |
|
| 64 |
GGD_END_PLUGIN_API |
| 65 |
G_END_DECLS |
| 66 |
|
| 67 |
#endif /* guard */ |