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.
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.
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
28 GHashTable
*option_hash
;
29 GHashTable
*check_hash
;
30 GHashTable
*spin_hash
;
33 GtkWidget
*pref_indent_combo
;
34 GtkWidget
*pref_indent_options
;
35 gboolean checkbutton_blocked
;
36 AnjutaPreferences
*prefs
;
39 typedef struct _IndentStyle
47 typedef struct _IndentOption
56 typedef struct _OptionData
63 typedef struct _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
);