~ubuntu-branches/ubuntu/wily/geany/wily

« back to all changes in this revision

Viewing changes to src/document.h

  • Committer: Package Import Robot
  • Author(s): Chow Loong Jin
  • Date: 2011-12-10 07:43:26 UTC
  • mfrom: (3.3.7 sid)
  • Revision ID: package-import@ubuntu.com-20111210074326-s8yqbew5i20h33tf
Tags: 0.21-1ubuntu1
* Merge from Debian Unstable, remaining changes:
  - debian/patches/20_use_evince_viewer.patch:
     + use evince as viewer for pdf and dvi files
  - debian/patches/20_use_x_terminal_emulator.patch:
     + use x-terminal-emulator as terminal
  - debian/control
     + Add breaks on geany-plugins-common << 0.20
* Also fixes bugs:
  - Filter for MATLAB/Octave files filters everythign (LP: 885505)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 *      document.h - this file is part of Geany, a fast and lightweight IDE
3
3
 *
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>
 
4
 *      Copyright 2005-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
 
5
 *      Copyright 2006-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
6
6
 *
7
7
 *      This program is free software; you can redistribute it and/or modify
8
8
 *      it under the terms of the GNU General Public License as published by
18
18
 *      along with this program; if not, write to the Free Software
19
19
 *      Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20
20
 *
21
 
 *  $Id: document.h 5430 2010-11-23 16:23:22Z ntrel $
 
21
 *  $Id: document.h 5904 2011-08-25 20:15:02Z colombanw $
22
22
 */
23
23
 
24
24
/**
33
33
 
34
34
#include "Scintilla.h"
35
35
#include "ScintillaWidget.h"
 
36
#include "editor.h"
36
37
 
37
38
#if defined(G_OS_WIN32)
38
39
# define GEANY_DEFAULT_EOL_CHARACTER SC_EOL_CRLF
61
62
        gboolean                use_safe_file_saving;
62
63
        gboolean                ensure_convert_new_lines;
63
64
        gboolean                gio_unsafe_save_backup;
 
65
        gboolean                use_gio_unsafe_file_saving; /* whether to use GIO as the unsafe backend */
64
66
}
65
67
GeanyFilePrefs;
66
68
 
141
143
 * @note This should not be used to check the result of the main API functions,
142
144
 * these only need a NULL-pointer check - @c document_get_current() != @c NULL. */
143
145
#define DOC_VALID(doc_ptr) \
144
 
        (G_LIKELY((doc_ptr) != NULL) && G_LIKELY((doc_ptr)->is_valid))
 
146
        (G_LIKELY((doc_ptr) != NULL && (doc_ptr)->is_valid))
145
147
 
146
148
/**
147
149
 *  Returns the filename of the document passed or @c GEANY_STRING_UNTITLED
149
151
 *  This macro never returns @c NULL.
150
152
 **/
151
153
#define DOC_FILENAME(doc) \
152
 
        (G_LIKELY(doc->file_name != NULL) ? (doc->file_name) : GEANY_STRING_UNTITLED)
 
154
        (G_LIKELY((doc)->file_name != NULL) ? ((doc)->file_name) : GEANY_STRING_UNTITLED)
153
155
 
154
156
 
155
157
 
209
211
GeanyDocument *document_open_file_full(GeanyDocument *doc, const gchar *filename, gint pos,
210
212
                gboolean readonly, GeanyFiletype *ft, const gchar *forced_enc);
211
213
 
212
 
void document_open_file_list(const gchar *data, gssize length);
 
214
void document_open_file_list(const gchar *data, gsize length);
213
215
 
214
216
void document_open_files(const GSList *filenames, gboolean readonly, GeanyFiletype *ft,
215
217
                const gchar *forced_enc);
216
218
 
217
 
gboolean document_search_bar_find(GeanyDocument *doc, const gchar *text, gint flags, gboolean inc);
218
 
 
219
 
gint document_find_text(GeanyDocument *doc, const gchar *text, gint flags, gboolean search_backwards,
220
 
                gboolean scroll, GtkWidget *parent);
221
 
 
222
 
gint document_replace_text(GeanyDocument *doc, const gchar *find_text, const gchar *replace_text,
223
 
                gint flags, gboolean search_backwards);
 
219
gboolean document_search_bar_find(GeanyDocument *doc, const gchar *text, gint flags, gboolean inc,
 
220
                gboolean backwards);
 
221
 
 
222
gint document_find_text(GeanyDocument *doc, const gchar *text, const gchar *original_text,
 
223
                gint flags, gboolean search_backwards, gboolean scroll, GtkWidget *parent);
 
224
 
 
225
gint document_replace_text(GeanyDocument *doc, const gchar *find_text, const gchar *original_find_text,
 
226
                const gchar *replace_text, gint flags, gboolean search_backwards);
224
227
 
225
228
gint document_replace_all(GeanyDocument *doc, const gchar *find_text, const gchar *replace_text,
226
 
                gint flags, gboolean escaped_chars);
 
229
                const gchar *original_find_text, const gchar *original_replace_text, gint flags);
227
230
 
228
 
void document_replace_sel(GeanyDocument *doc, const gchar *find_text, const gchar *replace_text, gint flags,
229
 
                                                  gboolean escaped_chars);
 
231
void document_replace_sel(GeanyDocument *doc, const gchar *find_text, const gchar *replace_text,
 
232
                                                  const gchar *original_find_text, const gchar *original_replace_text, gint flags);
230
233
 
231
234
void document_update_tag_list(GeanyDocument *doc, gboolean update);
232
235
 
 
236
void document_update_tag_list_in_idle(GeanyDocument *doc);
 
237
 
233
238
void document_set_encoding(GeanyDocument *doc, const gchar *new_encoding);
234
239
 
235
240
gboolean document_check_disk_status(GeanyDocument *doc, gboolean force);
256
261
 
257
262
gboolean document_need_save_as(GeanyDocument *doc);
258
263
 
 
264
gboolean document_detect_indent_type(GeanyDocument *doc, GeanyIndentType *type_);
 
265
 
 
266
gboolean document_detect_indent_width(GeanyDocument *doc, gint *width_);
 
267
 
259
268
void document_apply_indent_settings(GeanyDocument *doc);
260
269
 
 
270
gint document_compare_by_display_name(gconstpointer a, gconstpointer b);
 
271
 
 
272
gint document_compare_by_tab_order(gconstpointer a, gconstpointer b);
 
273
 
 
274
gint document_compare_by_tab_order_reverse(gconstpointer a, gconstpointer b);
 
275
 
 
276
void document_grab_focus(GeanyDocument *doc);
 
277
 
261
278
#endif