1 /* gedit.vapi generated by vapigen, do not modify. */
3 [CCode (cprefix = "Gedit", gir_namespace = "Gedit", gir_version = "3.0", lower_case_cprefix = "gedit_")]
4 [Version (replacement = "bindings distributed with gedit", deprecated_since = "3.12")]
6 [CCode (cheader_filename = "gedit/gedit-app.h", type_id = "gedit_app_get_type ()")]
7 public abstract class App : Gtk.Application, GLib.ActionGroup, GLib.ActionMap {
8 [CCode (has_construct_function = false)]
10 public unowned Gedit.Window create_window (Gdk.Screen? screen);
11 public GLib.List<weak Gedit.Document> get_documents ();
12 public Gedit.LockdownMask get_lockdown ();
13 public GLib.List<weak Gedit.View> get_views ();
15 public virtual string help_link_id (string name, string link_id);
16 public virtual bool process_window_event (Gedit.Window window, Gdk.Event event);
17 public virtual void set_window_title (Gedit.Window window, string title);
18 public virtual bool show_help (Gtk.Window parent, string name, string link_id);
19 public Gedit.LockdownMask lockdown { get; }
21 [CCode (cheader_filename = "gedit/gedit-document.h", type_id = "gedit_document_get_type ()")]
22 public class Document : Gtk.SourceBuffer {
23 [CCode (has_construct_function = false)]
25 [CCode (cname = "gedit_document_save")]
26 public void do_save (Gedit.DocumentSaveFlags flags);
27 public static GLib.Quark error_quark ();
28 [Version (deprecated_since = "3.10")]
29 public bool get_can_search_again ();
30 public Gedit.DocumentCompressionType get_compression_type ();
31 public string get_content_type ();
32 public bool get_deleted ();
33 [Version (deprecated_since = "3.10")]
34 public bool get_enable_search_highlighting ();
35 public unowned Gedit.Encoding get_encoding ();
36 public unowned Gtk.SourceLanguage get_language ();
37 public GLib.File get_location ();
38 public string get_metadata (string key);
39 public string get_mime_type ();
40 public Gedit.DocumentNewlineType get_newline_type ();
41 public bool get_readonly ();
42 [Version (deprecated_since = "3.10")]
43 public string get_search_text (uint? flags);
44 public string get_short_name_for_display ();
45 public string get_uri_for_display ();
46 public bool goto_line (int line);
47 public bool goto_line_offset (int line, int line_offset);
48 public bool is_local ();
49 public bool is_untitled ();
50 public bool is_untouched ();
51 public virtual void load (GLib.File location, Gedit.Encoding? encoding, int line_pos, int column_pos, bool create);
52 public bool load_cancel ();
53 public void load_stream (GLib.InputStream stream, Gedit.Encoding? encoding, int line_pos, int column_pos);
54 [Version (deprecated_since = "3.10")]
55 public int replace_all (string find, string replace, uint flags);
56 public void save_as (GLib.File location, Gedit.Encoding encoding, Gedit.DocumentNewlineType newline_type, Gedit.DocumentCompressionType compression_type, Gedit.DocumentSaveFlags flags);
57 [Version (deprecated_since = "3.10")]
58 public bool search_backward (Gtk.TextIter? start, Gtk.TextIter? end, Gtk.TextIter? match_start, Gtk.TextIter? match_end);
59 [Version (deprecated_since = "3.10")]
60 public bool search_forward (Gtk.TextIter? start, Gtk.TextIter? end, Gtk.TextIter? match_start, Gtk.TextIter? match_end);
61 public void set_content_type (string? content_type);
62 [Version (deprecated_since = "3.10")]
63 public void set_enable_search_highlighting (bool enable);
64 public void set_language (Gtk.SourceLanguage? lang);
65 public void set_location (GLib.File location);
66 [Version (deprecated_since = "3.10")]
67 public void set_search_text (string? text, uint flags);
68 public void set_short_name_for_display (string? short_name);
69 [Version (deprecated_since = "3.10")]
70 public bool can_search_again { get; }
72 public Gedit.DocumentCompressionType compression_type { get; set construct; }
73 public string content_type { owned get; set; }
75 public bool empty_search { get; }
76 [Version (deprecated_since = "3.10")]
77 public bool enable_search_highlighting { get; set; }
78 public Gedit.Encoding encoding { get; }
79 public GLib.File location { owned get; set; }
80 public string mime_type { owned get; }
82 public Gedit.DocumentNewlineType newline_type { get; set construct; }
84 public bool read_only { get; }
86 public string shortname { owned get; set; }
87 public virtual signal void cursor_moved ();
88 public virtual signal void loaded (GLib.Error error);
89 public virtual signal void loading (uint64 size, uint64 total_size);
90 public virtual signal void save (GLib.File location, Gedit.Encoding encoding, Gedit.DocumentNewlineType newline_type, Gedit.DocumentCompressionType compression_type, Gedit.DocumentSaveFlags flags);
91 public virtual signal void saved (GLib.Error error);
92 public virtual signal void saving (uint64 size, uint64 total_size);
93 [Version (deprecated_since = "3.10")]
94 public virtual signal void search_highlight_updated (Gtk.TextIter start, Gtk.TextIter end);
96 [CCode (cheader_filename = "gedit/gedit-encodings.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "gedit_encoding_get_type ()")]
98 public class Encoding {
99 public Gedit.Encoding copy ();
101 public unowned string get_charset ();
102 public static unowned Gedit.Encoding get_current ();
103 public static unowned Gedit.Encoding get_from_charset (string charset);
104 public static unowned Gedit.Encoding get_from_index (int index);
105 public unowned string get_name ();
106 public static unowned Gedit.Encoding get_utf8 ();
107 public string to_string ();
109 [CCode (cheader_filename = "gedit/gedit-encodings-combo-box.h", type_id = "gedit_encodings_combo_box_get_type ()")]
110 public class EncodingsComboBox : Gtk.ComboBox, Atk.Implementor, Gtk.Buildable, Gtk.CellEditable, Gtk.CellLayout {
111 [CCode (has_construct_function = false, type = "GtkWidget*")]
112 public EncodingsComboBox (bool save_mode);
113 public unowned Gedit.Encoding get_selected_encoding ();
114 public void set_selected_encoding (Gedit.Encoding? encoding);
116 public bool save_mode { get; set construct; }
118 [CCode (cheader_filename = "gedit/gedit-message.h", type_id = "gedit_message_get_type ()")]
119 public class Message : GLib.Object {
120 [CCode (has_construct_function = false)]
121 protected Message ();
122 public unowned string get_method ();
123 public unowned string get_object_path ();
124 public bool has (string propname);
125 public static bool is_valid_object_path (string? object_path);
126 public static bool type_check (GLib.Type gtype, string propname, GLib.Type value_type);
127 public static bool type_has (GLib.Type gtype, string propname);
128 public static string type_identifier (string? object_path, string? method);
130 public string method { owned get; set construct; }
132 public string object_path { owned get; set construct; }
134 [CCode (cheader_filename = "gedit/gedit-message-bus.h", type_id = "gedit_message_bus_get_type ()")]
135 public class MessageBus : GLib.Object {
136 [CCode (has_construct_function = false)]
137 public MessageBus ();
138 public void block (uint id);
139 public void block_by_func (string object_path, string method, Gedit.MessageCallback callback);
140 public uint connect (string object_path, string method, owned Gedit.MessageCallback callback);
141 public void disconnect (uint id);
142 public void disconnect_by_func (string object_path, string method, Gedit.MessageCallback callback);
143 public void @foreach (Gedit.MessageBusForeach func);
144 public static unowned Gedit.MessageBus get_default ();
145 public bool is_registered (string object_path, string method);
146 public GLib.Type lookup (string object_path, string method);
147 public void register (GLib.Type message_type, string object_path, string method);
148 public void send_message (Gedit.Message message);
149 public void send_message_sync (Gedit.Message message);
150 public void unblock (uint id);
151 public void unblock_by_func (string object_path, string method, Gedit.MessageCallback callback);
152 public void unregister (string object_path, string method);
153 public void unregister_all (string object_path);
154 public virtual signal void dispatch (Gedit.Message message);
155 public virtual signal void registered (string object_path, string method);
156 public virtual signal void unregistered (string object_path, string method);
158 [CCode (cheader_filename = "gedit/gedit-panel.h", type_id = "gedit_panel_get_type ()")]
159 public class Panel : Gtk.Bin, Atk.Implementor, Gtk.Buildable {
160 [CCode (has_construct_function = false, type = "GtkWidget*")]
161 public Panel (Gtk.Orientation orientation);
162 public bool activate_item (Gtk.Widget item);
163 public bool add_item (Gtk.Widget item, string id, string display_name, Gtk.Widget? image);
164 public bool add_item_with_stock_icon (Gtk.Widget item, string id, string display_name, string? stock_id);
165 public unowned Gtk.Widget get_active ();
166 public int get_n_items ();
167 public Gtk.Orientation get_orientation ();
168 public bool item_is_active (Gtk.Widget item);
169 public bool remove_item (Gtk.Widget item);
170 public Gtk.Orientation orientation { get; construct; }
171 public virtual signal void close ();
172 public virtual signal void focus_document ();
173 public virtual signal void item_added (Gtk.Widget item);
174 public virtual signal void item_removed (Gtk.Widget item);
176 [CCode (cheader_filename = "gedit/gedit-progress-info-bar.h", type_id = "gedit_progress_info_bar_get_type ()")]
177 public class ProgressInfoBar : Gtk.InfoBar, Atk.Implementor, Gtk.Buildable, Gtk.Orientable {
178 [CCode (has_construct_function = false, type = "GtkWidget*")]
179 public ProgressInfoBar (string stock_id, string markup, bool has_cancel);
180 public void pulse ();
181 public void set_fraction (double fraction);
182 public void set_markup (string markup);
183 public void set_stock_image (string stock_id);
184 public void set_text (string text);
185 public bool has_cancel_button { construct; }
187 [CCode (cheader_filename = "gedit/gedit-statusbar.h", type_id = "gedit_statusbar_get_type ()")]
188 public class Statusbar : Gtk.Statusbar, Atk.Implementor, Gtk.Buildable, Gtk.Orientable {
189 [CCode (has_construct_function = false, type = "GtkWidget*")]
191 public void clear_overwrite ();
192 public void set_cursor_position (int line, int col);
193 public void set_overwrite (bool overwrite);
194 public void set_window_state (Gedit.WindowState state, int num_of_errors);
196 [CCode (cheader_filename = "gedit/gedit-tab.h", type_id = "gedit_tab_get_type ()")]
197 public class Tab : Gtk.Box, Atk.Implementor, Gtk.Buildable, Gtk.Orientable {
198 [CCode (has_construct_function = false)]
200 public bool get_auto_save_enabled ();
201 public int get_auto_save_interval ();
202 public unowned Gedit.Document get_document ();
203 public static unowned Gedit.Tab get_from_document (Gedit.Document doc);
204 public Gedit.TabState get_state ();
205 public unowned Gedit.View get_view ();
206 public void set_auto_save_enabled (bool enable);
207 public void set_auto_save_interval (int interval);
208 public void set_info_bar (Gtk.Widget info_bar);
210 public bool autosave { get; set; }
212 public int autosave_interval { get; set; }
214 public bool can_close { get; }
216 public string name { owned get; }
217 public Gedit.TabState state { get; }
218 public virtual signal void drop_uris ([CCode (array_length = false, array_null_terminated = true)] string[] uri_list);
220 [CCode (cheader_filename = "gedit/gedit-view.h", type_id = "gedit_view_get_type ()")]
221 public class View : Gtk.SourceView, Atk.Implementor, Gtk.Buildable, Gtk.Scrollable {
222 [CCode (has_construct_function = false, type = "GtkWidget*")]
223 public View (Gedit.Document doc);
224 public void copy_clipboard ();
225 public void cut_clipboard ();
226 public void delete_selection ();
227 public void paste_clipboard ();
228 public void scroll_to_cursor ();
229 public void select_all ();
230 public void set_font (bool def, string font_name);
231 public virtual signal void drop_uris ([CCode (array_length = false, array_null_terminated = true)] string[] uri_list);
233 [CCode (cheader_filename = "gedit/gedit-window.h", type_id = "gedit_window_get_type ()")]
234 public class Window : Gtk.ApplicationWindow, Atk.Implementor, GLib.ActionGroup, GLib.ActionMap, Gtk.Buildable {
235 [CCode (has_construct_function = false)]
237 public void close_all_tabs ();
238 public void close_tab (Gedit.Tab tab);
239 public void close_tabs (GLib.List<Gedit.Tab> tabs);
240 public unowned Gedit.Tab create_tab (bool jump_to);
241 public unowned Gedit.Tab create_tab_from_location (GLib.File location, Gedit.Encoding? encoding, int line_pos, int column_pos, bool create, bool jump_to);
242 public unowned Gedit.Tab create_tab_from_stream (GLib.InputStream stream, Gedit.Encoding? encoding, int line_pos, int column_pos, bool jump_to);
243 public unowned Gedit.Document get_active_document ();
244 public unowned Gedit.Tab get_active_tab ();
245 public unowned Gedit.View get_active_view ();
246 public unowned Gedit.Panel get_bottom_panel ();
247 public GLib.List<weak Gedit.Document> get_documents ();
248 public unowned Gtk.WindowGroup get_group ();
249 public unowned Gedit.MessageBus get_message_bus ();
250 public unowned Gedit.Panel get_side_panel ();
251 public Gedit.WindowState get_state ();
252 public unowned Gtk.Widget get_statusbar ();
253 public unowned Gedit.Tab get_tab_from_location (GLib.File location);
254 public unowned Gtk.UIManager get_ui_manager ();
255 public GLib.List<weak Gedit.Document> get_unsaved_documents ();
256 public GLib.List<weak Gedit.View> get_views ();
257 public void set_active_tab (Gedit.Tab tab);
258 public Gedit.WindowState state { get; }
259 public virtual signal void active_tab_changed (Gedit.Tab tab);
260 public virtual signal void active_tab_state_changed ();
261 public virtual signal void tab_added (Gedit.Tab tab);
262 public virtual signal void tab_removed (Gedit.Tab tab);
263 public virtual signal void tabs_reordered ();
265 [CCode (cheader_filename = "gedit/gedit-app-activatable.h", type_cname = "GeditAppActivatableInterface", type_id = "gedit_app_activatable_get_type ()")]
266 public interface AppActivatable : GLib.Object {
267 public abstract void activate ();
268 public abstract void deactivate ();
270 public abstract Gedit.App app { owned get; construct; }
272 [CCode (cheader_filename = "gedit/gedit-view-activatable.h", type_cname = "GeditViewActivatableInterface", type_id = "gedit_view_activatable_get_type ()")]
273 public interface ViewActivatable : GLib.Object {
274 public abstract void activate ();
275 public abstract void deactivate ();
277 public abstract Gedit.View view { owned get; construct; }
279 [CCode (cheader_filename = "gedit/gedit-window-activatable.h", type_cname = "GeditWindowActivatableInterface", type_id = "gedit_window_activatable_get_type ()")]
280 public interface WindowActivatable : GLib.Object {
281 public abstract void activate ();
282 public abstract void deactivate ();
283 public abstract void update_state ();
285 public abstract Gedit.Window window { owned get; construct; }
287 [CCode (cheader_filename = "gedit/gedit-debug.h", cprefix = "GEDIT_", type_id = "gedit_debug_section_get_type ()")]
289 public enum DebugSection {
309 [CCode (cheader_filename = "gedit/gedit-document.h", cprefix = "GEDIT_DOCUMENT_COMPRESSION_TYPE_", type_id = "gedit_document_compression_type_get_type ()")]
310 public enum DocumentCompressionType {
314 [CCode (cheader_filename = "gedit/gedit-document.h", cprefix = "GEDIT_DOCUMENT_NEWLINE_TYPE_", type_id = "gedit_document_newline_type_get_type ()")]
315 public enum DocumentNewlineType {
320 [CCode (cheader_filename = "gedit/gedit-document.h", cprefix = "GEDIT_DOCUMENT_SAVE_", type_id = "gedit_document_save_flags_get_type ()")]
322 public enum DocumentSaveFlags {
328 [CCode (cheader_filename = "gedit/gedit-app.h", cprefix = "GEDIT_LOCKDOWN_", type_id = "gedit_lockdown_mask_get_type ()")]
330 public enum LockdownMask {
336 [CCode (cheader_filename = "gedit/gedit-document.h", cprefix = "GEDIT_SEARCH_", type_id = "gedit_search_flags_get_type ()")]
337 [Version (deprecated_since = "3.10")]
339 public enum SearchFlags {
344 [CCode (cheader_filename = "gedit/gedit-tab.h", cprefix = "GEDIT_TAB_", type_id = "gedit_tab_state_get_type ()")]
345 public enum TabState {
351 STATE_PRINT_PREVIEWING,
352 STATE_SHOWING_PRINT_PREVIEW,
353 STATE_GENERIC_NOT_EDITABLE,
355 STATE_REVERTING_ERROR,
359 STATE_EXTERNALLY_MODIFIED_NOTIFICATION,
362 [CCode (cheader_filename = "gedit/gedit-window.h", cprefix = "GEDIT_WINDOW_STATE_", type_id = "gedit_window_state_get_type ()")]
364 public enum WindowState {
371 [CCode (cheader_filename = "gedit/gedit-message-bus.h", instance_pos = 2.9)]
372 public delegate void MessageBusForeach (string object_path, string method);
373 [CCode (cheader_filename = "gedit/gedit-message-bus.h", instance_pos = 2.9)]
374 public delegate void MessageCallback (Gedit.MessageBus bus, Gedit.Message message);
375 [CCode (cheader_filename = "gedit/gedit-app.h", cname = "GEDIT_LOCKDOWN_ALL")]
376 public const int LOCKDOWN_ALL;
377 [CCode (cheader_filename = "gedit/gedit-document.h", cname = "GEDIT_METADATA_ATTRIBUTE_ENCODING")]
378 public const string METADATA_ATTRIBUTE_ENCODING;
379 [CCode (cheader_filename = "gedit/gedit-document.h", cname = "GEDIT_METADATA_ATTRIBUTE_LANGUAGE")]
380 public const string METADATA_ATTRIBUTE_LANGUAGE;
381 [CCode (cheader_filename = "gedit/gedit-document.h", cname = "GEDIT_METADATA_ATTRIBUTE_POSITION")]
382 public const string METADATA_ATTRIBUTE_POSITION;
383 [CCode (cheader_filename = "gedit/gedit-commands.h")]
384 public static void commands_load_location (Gedit.Window window, GLib.File location, Gedit.Encoding? encoding, int line_pos, int column_pos);
385 [CCode (cheader_filename = "gedit/gedit-commands.h")]
386 public static GLib.SList<weak Gedit.Document> commands_load_locations (Gedit.Window window, GLib.SList<GLib.File> locations, Gedit.Encoding? encoding, int line_pos, int column_pos);
387 [CCode (cheader_filename = "gedit/gedit-commands.h")]
388 public static void commands_save_all_documents (Gedit.Window window);
389 [CCode (cheader_filename = "gedit/gedit-commands.h")]
390 public static void commands_save_document (Gedit.Window window, Gedit.Document document);
391 [CCode (cheader_filename = "gedit/gedit-debug.h")]
392 public static void debug (Gedit.DebugSection section, string file, int line, string function);
393 [CCode (cheader_filename = "gedit/gedit-debug.h")]
394 public static void debug_init ();
395 [CCode (cheader_filename = "gedit/gedit-debug.h")]
396 public static void debug_plugin_message (string file, int line, string function, string message);
397 [CCode (cheader_filename = "gedit/gedit-utils.h")]
398 public static unowned Gtk.Widget dialog_add_button (Gtk.Dialog dialog, string text, string stock_id, int response_id);
399 [CCode (cheader_filename = "gedit/gedit-utils.h")]
400 public static Gtk.Widget gtk_button_new_with_stock_icon (string label, string stock_id);
401 [CCode (cheader_filename = "gedit/gedit-utils.h")]
402 public static string utils_basename_for_display (GLib.File location);
403 [CCode (cheader_filename = "gedit/gedit-utils.h")]
404 public static bool utils_decode_uri (string uri, out string scheme, out string user, out string port, out string host, out string path);
405 [CCode (array_length = false, array_null_terminated = true, cheader_filename = "gedit/gedit-utils.h")]
406 public static string[] utils_drop_get_uris (Gtk.SelectionData selection_data);
407 [CCode (cheader_filename = "gedit/gedit-utils.h")]
408 [Version (deprecated_since = "3.10")]
409 public static string utils_escape_search_text (string text);
410 [CCode (cheader_filename = "gedit/gedit-utils.h")]
411 public static string utils_escape_underscores (string text, ssize_t length);
412 [CCode (cheader_filename = "gedit/gedit-utils.h")]
413 public static Gedit.DocumentCompressionType utils_get_compression_type_from_content_type (string content_type);
414 [CCode (cheader_filename = "gedit/gedit-utils.h")]
415 public static void utils_get_current_viewport (Gdk.Screen screen, out int x, out int y);
416 [CCode (cheader_filename = "gedit/gedit-utils.h")]
417 public static uint utils_get_current_workspace (Gdk.Screen screen);
418 [CCode (cheader_filename = "gedit/gedit-utils.h")]
419 public static uint utils_get_window_workspace (Gtk.Window gtkwindow);
420 [CCode (cheader_filename = "gedit/gedit-utils.h")]
421 public static bool utils_is_valid_location (GLib.File location);
422 [CCode (cheader_filename = "gedit/gedit-utils.h")]
423 public static string utils_location_get_dirname_for_display (GLib.File location);
424 [CCode (cheader_filename = "gedit/gedit-utils.h")]
425 public static string utils_make_canonical_uri_from_shell_arg (string str);
426 [CCode (cheader_filename = "gedit/gedit-utils.h")]
427 public static string utils_make_valid_utf8 (string name);
428 [CCode (cheader_filename = "gedit/gedit-utils.h")]
429 public static void utils_menu_position_under_tree_view (Gtk.Menu menu, int x, int y, bool push_in, void* user_data);
430 [CCode (cheader_filename = "gedit/gedit-utils.h")]
431 public static void utils_menu_position_under_widget (Gtk.Menu menu, int x, int y, bool push_in, void* user_data);
432 [CCode (cheader_filename = "gedit/gedit-utils.h")]
433 public static string utils_replace_home_dir_with_tilde (string uri);
434 [CCode (cheader_filename = "gedit/gedit-utils.h")]
435 public static void utils_set_atk_name_description (Gtk.Widget widget, string name, string description);
436 [CCode (cheader_filename = "gedit/gedit-utils.h")]
437 public static void utils_set_atk_relation (Gtk.Widget obj1, Gtk.Widget obj2, Atk.RelationType rel_type);
438 [CCode (cheader_filename = "gedit/gedit-utils.h")]
439 public static string utils_str_end_truncate (string string, uint truncate_length);
440 [CCode (cheader_filename = "gedit/gedit-utils.h")]
441 public static string utils_str_middle_truncate (string string, uint truncate_length);
442 [CCode (cheader_filename = "gedit/gedit-utils.h")]
443 [Version (deprecated_since = "3.10")]
444 public static string utils_unescape_search_text (string text);
445 [CCode (cheader_filename = "gedit/gedit-utils.h")]
446 public static string utils_uri_get_dirname (string uri);