Mercurial > geeqie
annotate src/editors.h @ 777:088b71bf5715
Reduce indentation level.
author | zas_ |
---|---|
date | Tue, 03 Jun 2008 08:57:46 +0000 |
parents | ff51413f098d |
children | cee16cea5f23 |
rev | line source |
---|---|
9 | 1 /* |
196 | 2 * Geeqie |
9 | 3 * (C) 2004 John Ellis |
475 | 4 * Copyright (C) 2008 The Geeqie Team |
9 | 5 * |
6 * Author: John Ellis | |
7 * | |
8 * This software is released under the GNU General Public License (GNU GPL). | |
9 * Please read the included file COPYING for more information. | |
10 * This software comes with no warranty of any kind, use at your own risk! | |
11 */ | |
12 | |
13 | |
14 #ifndef EDITORS_H | |
15 #define EDITORS_H | |
16 | |
140 | 17 enum { |
18 EDITOR_KEEP_FS = 0x00000001, | |
19 EDITOR_VERBOSE = 0x00000002, | |
20 EDITOR_VERBOSE_MULTI = 0x00000004, | |
442 | 21 |
140 | 22 EDITOR_DEST = 0x00000100, |
23 EDITOR_FOR_EACH = 0x00000200, | |
24 EDITOR_SINGLE_COMMAND = 0x00000400, | |
442 | 25 |
140 | 26 EDITOR_ERROR_EMPTY = 0x00020000, |
27 EDITOR_ERROR_SYNTAX = 0x00040000, | |
28 EDITOR_ERROR_INCOMPATIBLE = 0x00080000, | |
29 EDITOR_ERROR_NO_FILE = 0x00100000, | |
30 EDITOR_ERROR_CANT_EXEC = 0x00200000, | |
31 EDITOR_ERROR_STATUS = 0x00400000, | |
32 EDITOR_ERROR_SKIPPED = 0x00800000, | |
33 | |
34 EDITOR_ERROR_MASK = 0xffff0000 | |
442 | 35 |
140 | 36 }; |
37 | |
38 /* return values from callback function */ | |
39 enum { | |
40 EDITOR_CB_CONTINUE = 0, /* continue multiple editor execution on remaining files*/ | |
41 EDITOR_CB_SKIP, /* skip the remaining files */ | |
42 EDITOR_CB_SUSPEND /* suspend execution, one of editor_resume or editor_skip | |
442 | 43 must be called later */ |
140 | 44 }; |
45 | |
46 | |
47 /* | |
442 | 48 Callback is called even on skipped files, with the EDITOR_ERROR_SKIPPED flag set. |
140 | 49 It is a good place to call file_data_change_info_free(). |
50 | |
51 ed - pointer that can be used for editor_resume/editor_skip or NULL if all files were already processed | |
52 flags - flags above | |
53 list - list of procesed FileData structures, typically single file or whole list passed to start_editor_* | |
54 data - generic pointer | |
55 */ | |
56 typedef gint (*EditorCallback) (gpointer ed, gint flags, GList *list, gpointer data); | |
57 | |
768
ff51413f098d
Use functions to set editors name and command and ensure they are
zas_
parents:
766
diff
changeset
|
58 void editor_set_name(gint n, gchar *name); |
ff51413f098d
Use functions to set editors name and command and ensure they are
zas_
parents:
766
diff
changeset
|
59 void editor_set_command(gint n, gchar *command); |
140 | 60 |
61 | |
62 void editor_resume(gpointer ed); | |
63 void editor_skip(gpointer ed); | |
64 | |
65 | |
66 gint editor_command_parse(const gchar *template, GList *list, gchar **output); | |
9 | 67 |
68 void editor_reset_defaults(void); | |
138 | 69 gint start_editor_from_file(gint n, FileData *fd); |
234 | 70 gint start_editor_from_filelist(gint n, GList *list); |
140 | 71 gint start_editor_from_file_full(gint n, FileData *fd, EditorCallback cb, gpointer data); |
234 | 72 gint start_editor_from_filelist_full(gint n, GList *list, EditorCallback cb, gpointer data); |
60
9c0c402b0ef3
Mon Jun 13 17:31:46 2005 John Ellis <johne@verizon.net>
gqview
parents:
9
diff
changeset
|
73 gint editor_window_flag_set(gint n); |
753 | 74 gint editor_is_filter(gint n); |
140 | 75 const gchar *editor_get_error_str(gint flags); |
9 | 76 |
731
fa8f7d7396cf
Introduce an helper function that returns the name of an editor.
zas_
parents:
475
diff
changeset
|
77 const gchar *editor_get_name(gint n); |
fa8f7d7396cf
Introduce an helper function that returns the name of an editor.
zas_
parents:
475
diff
changeset
|
78 |
766
7148e125bf23
Check for existing editor command using is_valid_editor_command().
zas_
parents:
753
diff
changeset
|
79 gboolean is_valid_editor_command(gint n); |
7148e125bf23
Check for existing editor command using is_valid_editor_command().
zas_
parents:
753
diff
changeset
|
80 |
9 | 81 #endif |