Updated Spanish translation
[anjuta-git-plugin.git] / plugins / indent / indent-util.h
blobec0eb489c619c78635f9e87465858b3d7d27cb26
1 /*
2 * This program is free software; you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License as published by
4 * the Free Software Foundation; either version 2 of the License, or
5 * (at your option) any later version.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU Library General Public License for more details.
12 * You should have received a copy of the GNU General Public License
13 * along with this program; if not, write to the Free Software
14 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15 */
17 #ifndef _INDENT_UTIL_H_
18 #define _INDENT_UTIL_H_
20 #include <gconf/gconf-client.h>
21 #include <libanjuta/anjuta-preferences.h>
24 typedef struct _IndentData
26 GladeXML *xml;
27 GtkWidget *dialog;
28 GHashTable *option_hash;
29 GHashTable *check_hash;
30 GHashTable *spin_hash;
31 GList *style_list;
32 gint style_active;
33 GtkWidget *pref_indent_combo;
34 GtkWidget *pref_indent_options;
35 gboolean checkbutton_blocked;
36 AnjutaPreferences *prefs;
37 } IndentData;
39 typedef struct _IndentStyle
41 gchar *name;
42 gchar *options;
43 gboolean modifiable;
44 } IndentStyle;
47 typedef struct _IndentOption
49 gchar *option;
50 gboolean not_option;
51 gchar *checkbutton;
52 gchar *spinbutton;
53 } IndentOption;
56 typedef struct _OptionData
58 gboolean not_option;
59 gchar *checkbutton;
60 gchar *spinbutton;
61 } OptionData;
63 typedef struct _CheckData
65 gchar *option;
66 gboolean not_option;
67 gchar *spinbutton;
68 } CheckData;
70 IndentData *indent_init(AnjutaPreferences *prefs);
73 void indent_free_data(IndentData *idt);
74 void indent_init_load_style(IndentData *idt);
76 gchar *indent_find_style(gchar *style_name, IndentData *idt);
77 void indent_save_active_style(gchar *style_name, gchar *options, IndentData *idt);
78 gchar * indent_delete_option(gchar *line, gchar *short_option, gboolean num);
79 gchar * indent_insert_option(gchar *line, gchar *option);
80 void indent_anal_line_option(gchar *line, IndentData *idt);
81 gint indent_execute(gchar *line_option, IndentData *idt);
82 gchar *indent_get_buffer(void);
83 gboolean indent_add_style(gchar *style_name, IndentData *idt);
84 void indent_save_all_style(IndentData *idt);
85 gint indent_find_index(gchar *style_name, IndentData *idt);
86 gboolean indent_update_style(gchar *style_name, gchar *options, IndentData *idt);
87 void indent_save_style(gchar *style_name, gchar *options, IndentData *idt);
88 gboolean indent_remove_style(gchar *style_name, IndentData *idt);
90 void indent_free(IndentData *idt);
92 #endif