1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */ 2 /* 3 * ianjuta-editor.h -- Autogenerated from libanjuta.idl 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; either version 2 of the License, or 8 * (at your option) any later version. 9 * 10 * This program is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU Library General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public License 16 * along with this program; if not, write to the Free Software 17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 */ 19 20 #ifndef _IANJUTA_EDITOR_H_ 21 #define _IANJUTA_EDITOR_H_ 22 23 #include <glib-object.h> 24 #include <gtk/gtk.h> 25 #include <libanjuta/interfaces/ianjuta-iterable.h> 26 27 G_BEGIN_DECLS 28 29 #define IANJUTA_TYPE_EDITOR (ianjuta_editor_get_type ()) 30 #define IANJUTA_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), IANJUTA_TYPE_EDITOR, IAnjutaEditor)) 31 #define IANJUTA_IS_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), IANJUTA_TYPE_EDITOR)) 32 #define IANJUTA_EDITOR_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), IANJUTA_TYPE_EDITOR, IAnjutaEditorIface)) 33 34 #define IANJUTA_TYPE_EDITOR_ATTRIBUTE (ianjuta_editor_attribute_get_type()) 35 #define IANJUTA_TYPE_EDITOR_ERROR (ianjuta_editor_error_get_type()) 36 37 #define IANJUTA_EDITOR_ERROR ianjuta_editor_error_quark() 38 39 /** 40 * IANJUTA_EDITOR_PREF_SCHEMA: 41 * 42 * Schema id used to store common editor settings. 43 */ 44 #define IANJUTA_EDITOR_PREF_SCHEMA "editor" 45 46 /** 47 * IANJUTA_EDITOR_USE_TABS_KEY: 48 * 49 * Boolean key, true is tabs has to be used for indenting. 50 */ 51 #define IANJUTA_EDITOR_USE_TABS_KEY "use-tabs" 52 53 /** 54 * IANJUTA_EDITOR_TAB_WIDTH_KEY: 55 * 56 * Integer key, defines the size of a tabulation in spaces. 57 */ 58 #define IANJUTA_EDITOR_TAB_WIDTH_KEY "tab-width" 59 60 /** 61 * IANJUTA_EDITOR_INDENT_WIDTH_KEY: 62 * 63 * Integer key, defines the number a space for one indentation step. 64 */ 65 #define IANJUTA_EDITOR_INDENT_WIDTH_KEY "indent-width" 66 67 68 typedef struct _IAnjutaEditor IAnjutaEditor; 69 typedef struct _IAnjutaEditorIface IAnjutaEditorIface; 70 71 /** 72 * IAnjutaEditorAttribute: 73 * @IANJUTA_EDITOR_TEXT: Normal text 74 * @IANJUTA_EDITOR_KEYWORD: A keyword of the programming language 75 * @IANJUTA_EDITOR_COMMENT: A comment 76 * @IANJUTA_EDITOR_STRING: A string 77 * 78 * This enumeration is used to specify the type of text. Note that not all 79 * editors implement this. 80 */ 81 typedef enum { 82 IANJUTA_EDITOR_TEXT, 83 IANJUTA_EDITOR_KEYWORD, 84 IANJUTA_EDITOR_COMMENT, 85 IANJUTA_EDITOR_STRING 86 } IAnjutaEditorAttribute; 87 88 typedef enum { 89 IANJUTA_EDITOR_DOESNT_EXIST 90 } IAnjutaEditorError; 91 92 93 struct _IAnjutaEditorIface { 94 GTypeInterface g_iface; 95 96 /* Signal */ 97 void (*backspace) (IAnjutaEditor *obj); 98 /* Signal */ 99 void (*changed) (IAnjutaEditor *obj, IAnjutaIterable *position, gboolean added, gint length, gint lines, const gchar *text); 100 /* Signal */ 101 void (*char_added) (IAnjutaEditor *obj, IAnjutaIterable *position, gchar ch); 102 /* Signal */ 103 void (*code_changed) (IAnjutaEditor *obj, IAnjutaIterable *position, gchar *code); 104 /* Signal */ 105 void (*cursor_moved) (IAnjutaEditor *obj); 106 /* Signal */ 107 void (*glade_callback_add) (IAnjutaEditor *obj, gchar *widget_typename, gchar *signal_name, gchar *handler_name, gchar *object, gboolean swap, gboolean after, gchar *filename); 108 /* Signal */ 109 void (*glade_member_add) (IAnjutaEditor *obj, gchar *widget_typename, gchar *widget_name, gchar *filename); 110 /* Signal */ 111 void (*line_marks_gutter_clicked) (IAnjutaEditor *obj, gint location); 112 113 void (*append) (IAnjutaEditor *obj, const gchar *text, gint length, GError **err); 114 void (*erase) (IAnjutaEditor *obj, IAnjutaIterable *position_start, IAnjutaIterable *position_end, GError **err); 115 void (*erase_all) (IAnjutaEditor *obj, GError **err); 116 gint (*get_column) (IAnjutaEditor *obj, GError **err); 117 gchar* (*get_current_word) (IAnjutaEditor *obj, GError **err); 118 IAnjutaIterable* (*get_end_position) (IAnjutaEditor *obj, GError **err); 119 gint (*get_indentsize) (IAnjutaEditor *obj, GError **err); 120 gint (*get_length) (IAnjutaEditor *obj, GError **err); 121 IAnjutaIterable* (*get_line_begin_position) (IAnjutaEditor *obj, gint line, GError **err); 122 IAnjutaIterable * (*get_line_end_position) (IAnjutaEditor *obj, gint line, GError **err); 123 int (*get_line_from_position) (IAnjutaEditor *obj, IAnjutaIterable *position, GError **err); 124 gint (*get_lineno) (IAnjutaEditor *obj, GError **err); 125 gint (*get_offset) (IAnjutaEditor *obj, GError **err); 126 gboolean (*get_overwrite) (IAnjutaEditor *obj, GError **err); 127 IAnjutaIterable* (*get_position) (IAnjutaEditor *obj, GError **err); 128 IAnjutaIterable* (*get_position_from_offset) (IAnjutaEditor *obj, gint offset, GError **err); 129 IAnjutaIterable* (*get_start_position) (IAnjutaEditor *obj, GError **err); 130 gint (*get_tabsize) (IAnjutaEditor *obj, GError **err); 131 gchar* (*get_text) (IAnjutaEditor *obj, IAnjutaIterable *begin, IAnjutaIterable *end, GError **err); 132 gchar* (*get_text_all) (IAnjutaEditor *obj, GError **err); 133 gboolean (*get_use_spaces) (IAnjutaEditor *obj, GError **err); 134 void (*goto_end) (IAnjutaEditor *obj, GError **err); 135 void (*goto_line) (IAnjutaEditor *obj, gint lineno, GError **err); 136 void (*goto_position) (IAnjutaEditor *obj, IAnjutaIterable *position, GError **err); 137 void (*goto_start) (IAnjutaEditor *obj, GError **err); 138 void (*insert) (IAnjutaEditor *obj, IAnjutaIterable *position, const gchar *text, gint length, GError **err); 139 void (*set_auto_indent) (IAnjutaEditor *obj, gboolean auto_indent, GError **err); 140 void (*set_indentsize) (IAnjutaEditor *obj, gint indentsize, GError **err); 141 void (*set_popup_menu) (IAnjutaEditor *obj, GtkWidget *menu, GError **err); 142 void (*set_tabsize) (IAnjutaEditor *obj, gint tabsize, GError **err); 143 void (*set_use_spaces) (IAnjutaEditor *obj, gboolean use_spaces, GError **err); 144 145 }; 146 147 GType ianjuta_editor_attribute_get_type (void); 148 GType ianjuta_editor_error_get_type (void); 149 150 GQuark ianjuta_editor_error_quark (void); 151 GType ianjuta_editor_get_type (void); 152 153 void ianjuta_editor_append (IAnjutaEditor *obj, const gchar *text, gint length, GError **err); 154 155 void ianjuta_editor_erase (IAnjutaEditor *obj, IAnjutaIterable *position_start, IAnjutaIterable *position_end, GError **err); 156 157 void ianjuta_editor_erase_all (IAnjutaEditor *obj, GError **err); 158 159 gint ianjuta_editor_get_column (IAnjutaEditor *obj, GError **err); 160 161 gchar* ianjuta_editor_get_current_word (IAnjutaEditor *obj, GError **err); 162 163 IAnjutaIterable* ianjuta_editor_get_end_position (IAnjutaEditor *obj, GError **err); 164 165 gint ianjuta_editor_get_indentsize (IAnjutaEditor *obj, GError **err); 166 167 gint ianjuta_editor_get_length (IAnjutaEditor *obj, GError **err); 168 169 IAnjutaIterable* ianjuta_editor_get_line_begin_position (IAnjutaEditor *obj, gint line, GError **err); 170 171 IAnjutaIterable * ianjuta_editor_get_line_end_position (IAnjutaEditor *obj, gint line, GError **err); 172 173 int ianjuta_editor_get_line_from_position (IAnjutaEditor *obj, IAnjutaIterable *position, GError **err); 174 175 gint ianjuta_editor_get_lineno (IAnjutaEditor *obj, GError **err); 176 177 gint ianjuta_editor_get_offset (IAnjutaEditor *obj, GError **err); 178 179 gboolean ianjuta_editor_get_overwrite (IAnjutaEditor *obj, GError **err); 180 181 IAnjutaIterable* ianjuta_editor_get_position (IAnjutaEditor *obj, GError **err); 182 183 IAnjutaIterable* ianjuta_editor_get_position_from_offset (IAnjutaEditor *obj, gint offset, GError **err); 184 185 IAnjutaIterable* ianjuta_editor_get_start_position (IAnjutaEditor *obj, GError **err); 186 187 gint ianjuta_editor_get_tabsize (IAnjutaEditor *obj, GError **err); 188 189 gchar* ianjuta_editor_get_text (IAnjutaEditor *obj, IAnjutaIterable *begin, IAnjutaIterable *end, GError **err); 190 191 gchar* ianjuta_editor_get_text_all (IAnjutaEditor *obj, GError **err); 192 193 gboolean ianjuta_editor_get_use_spaces (IAnjutaEditor *obj, GError **err); 194 195 void ianjuta_editor_goto_end (IAnjutaEditor *obj, GError **err); 196 197 void ianjuta_editor_goto_line (IAnjutaEditor *obj, gint lineno, GError **err); 198 199 void ianjuta_editor_goto_position (IAnjutaEditor *obj, IAnjutaIterable *position, GError **err); 200 201 void ianjuta_editor_goto_start (IAnjutaEditor *obj, GError **err); 202 203 void ianjuta_editor_insert (IAnjutaEditor *obj, IAnjutaIterable *position, const gchar *text, gint length, GError **err); 204 205 void ianjuta_editor_set_auto_indent (IAnjutaEditor *obj, gboolean auto_indent, GError **err); 206 207 void ianjuta_editor_set_indentsize (IAnjutaEditor *obj, gint indentsize, GError **err); 208 209 void ianjuta_editor_set_popup_menu (IAnjutaEditor *obj, GtkWidget *menu, GError **err); 210 211 void ianjuta_editor_set_tabsize (IAnjutaEditor *obj, gint tabsize, GError **err); 212 213 void ianjuta_editor_set_use_spaces (IAnjutaEditor *obj, gboolean use_spaces, GError **err); 214 215 216 G_END_DECLS 217 218 #endif 219