Update of Galician translation by José Manuel Castroagudín Silva
[geany-mirror.git] / src / templates.h
blobbcadf6305c1150108141c75b99c6d57f2c8142e1
1 /*
2 * templates.h - this file is part of Geany, a fast and lightweight IDE
4 * Copyright 2005-2012 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
5 * Copyright 2006-2012 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License along
18 * with this program; if not, write to the Free Software Foundation, Inc.,
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22 /**
23 * @file templates.h
24 * Templates (prefs).
25 **/
28 #ifndef GEANY_TEMPLATES_H
29 #define GEANY_TEMPLATES_H 1
31 G_BEGIN_DECLS
33 #define GEANY_TEMPLATES_INDENT 3
34 #define GEANY_TEMPLATES_FORMAT_YEAR C_("DefaultYear", "%Y")
35 #define GEANY_TEMPLATES_FORMAT_DATE C_("DefaultDate", "%Y-%m-%d")
36 #define GEANY_TEMPLATES_FORMAT_DATETIME C_("DefaultDateTime", "%d.%m.%Y %H:%M:%S %Z")
38 enum
40 GEANY_TEMPLATE_GPL = 0,
41 GEANY_TEMPLATE_BSD,
42 GEANY_TEMPLATE_FILEHEADER,
43 GEANY_TEMPLATE_CHANGELOG,
44 GEANY_TEMPLATE_FUNCTION,
45 GEANY_MAX_TEMPLATES
49 /** Template preferences. */
50 typedef struct GeanyTemplatePrefs
52 gchar *developer; /**< Name */
53 gchar *company; /**< Company */
54 gchar *mail; /**< Email */
55 gchar *initials; /**< Initials */
56 gchar *version; /**< Initial version */
57 gchar *year_format;
58 gchar *date_format;
59 gchar *datetime_format;
61 GeanyTemplatePrefs;
63 extern GeanyTemplatePrefs template_prefs;
66 struct filetype;
68 void templates_init(void);
70 gchar *templates_get_template_fileheader(gint filetype_idx, const gchar *fname);
72 gchar *templates_get_template_changelog(GeanyDocument *doc);
74 gchar *templates_get_template_function(GeanyDocument *doc, const gchar *func_name);
76 gchar *templates_get_template_licence(GeanyDocument *doc, gint licence_type);
78 void templates_replace_common(GString *tmpl, const gchar *fname,
79 GeanyFiletype *ft, const gchar *func_name);
81 void templates_replace_valist(GString *text,
82 const gchar *first_wildcard, ...) G_GNUC_NULL_TERMINATED;
84 void templates_free_templates(void);
86 G_END_DECLS
88 #endif