Version bump.
[geany-mirror.git] / src / templates.h
blob74a1555f732217e13bd4f725f4d49be26656abe9
1 /*
2 * templates.h - this file is part of Geany, a fast and lightweight IDE
4 * Copyright 2005-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
5 * Copyright 2006-2010 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
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 * $Id$
24 /**
25 * @file templates.h
26 * Templates (prefs).
27 **/
30 #ifndef GEANY_TEMPLATES_H
31 #define GEANY_TEMPLATES_H 1
33 enum
35 GEANY_TEMPLATE_GPL = 0,
36 GEANY_TEMPLATE_BSD,
37 GEANY_TEMPLATE_FILEHEADER,
38 GEANY_TEMPLATE_CHANGELOG,
39 GEANY_TEMPLATE_FUNCTION,
40 GEANY_MAX_TEMPLATES
44 /** Template preferences. */
45 typedef struct GeanyTemplatePrefs
47 gchar *developer; /**< Name */
48 gchar *company; /**< Company */
49 gchar *mail; /**< Email */
50 gchar *initials; /**< Initials */
51 gchar *version; /**< Initial version */
52 gchar *year_format;
53 gchar *date_format;
54 gchar *datetime_format;
56 GeanyTemplatePrefs;
58 extern GeanyTemplatePrefs template_prefs;
61 struct filetype;
63 void templates_init(void);
65 gchar *templates_get_template_fileheader(gint filetype_idx, const gchar *fname);
67 gchar *templates_get_template_new_file(GeanyFiletype *ft);
69 gchar *templates_get_template_changelog(GeanyDocument *doc);
71 gchar *templates_get_template_function(GeanyDocument *doc, const gchar *func_name);
73 gchar *templates_get_template_licence(GeanyDocument *doc, gint licence_type);
75 void templates_replace_common(GString *template, const gchar *fname,
76 GeanyFiletype *ft, const gchar *func_name);
78 void templates_replace_valist(GString *text,
79 const gchar *first_wildcard, ...) G_GNUC_NULL_TERMINATED;
81 void templates_free_templates(void);
83 #endif