Include a Other Software section in Help file
[geeqie.git] / src / layout.h
1 /*
2  * Copyright (C) 2004 John Ellis
3  * Copyright (C) 2008 - 2016 The Geeqie Team
4  *
5  * Author: John Ellis
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License along
18  * with this program; if not, write to the Free Software Foundation, Inc.,
19  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20  */
21
22 #ifndef LAYOUT_H
23 #define LAYOUT_H
24
25 #define LAYOUT_ID_CURRENT "_current_"
26
27 extern GList *layout_window_list;
28
29
30 LayoutWindow *layout_new(FileData *dir_fd, LayoutOptions *lop);
31 LayoutWindow *layout_new_with_geometry(FileData *dir_fd, LayoutOptions *lop,
32                                        const gchar *geometry);
33 LayoutWindow *layout_new_from_config(const gchar **attribute_names, const gchar **attribute_values, gboolean use_commandline);
34 void layout_update_from_config(LayoutWindow *lw, const gchar **attribute_names, const gchar **attribute_values);
35
36 void layout_close(LayoutWindow *lw);
37 void layout_free(LayoutWindow *lw);
38
39 gboolean layout_valid(LayoutWindow **lw);
40
41 void layout_show_config_window(LayoutWindow *lw);
42
43 void layout_apply_options(LayoutWindow *lw, LayoutOptions *lop);
44
45 void layout_sync_options_with_current_state(LayoutWindow *lw);
46 void layout_load_attributes(LayoutOptions *layout, const gchar **attribute_names, const gchar **attribute_values);
47 void layout_write_attributes(LayoutOptions *layout, GString *outstr, gint indent);
48 void layout_write_config(LayoutWindow *lw, GString *outstr, gint indent);
49
50
51 LayoutWindow *layout_find_by_image(ImageWindow *imd);
52 LayoutWindow *layout_find_by_image_fd(ImageWindow *imd);
53 LayoutWindow *layout_find_by_layout_id(const gchar *id);
54
55
56 const gchar *layout_get_path(LayoutWindow *lw);
57 gboolean layout_set_path(LayoutWindow *lw, const gchar *path);
58 gboolean layout_set_fd(LayoutWindow *lw, FileData *fd);
59
60 void layout_status_update_progress(LayoutWindow *lw, gdouble val, const gchar *text);
61 void layout_status_update_info(LayoutWindow *lw, const gchar *text);
62 void layout_status_update_image(LayoutWindow *lw);
63 void layout_status_update_all(LayoutWindow *lw);
64
65 GList *layout_list(LayoutWindow *lw);
66 guint layout_list_count(LayoutWindow *lw, gint64 *bytes);
67 FileData *layout_list_get_fd(LayoutWindow *lw, gint index);
68 gint layout_list_get_index(LayoutWindow *lw, FileData *fd);
69 void layout_list_sync_fd(LayoutWindow *lw, FileData *fd);
70
71 GList *layout_selection_list(LayoutWindow *lw);
72 /* return list of pointers to int for selection */
73 GList *layout_selection_list_by_index(LayoutWindow *lw);
74 guint layout_selection_count(LayoutWindow *lw, gint64 *bytes);
75 void layout_select_all(LayoutWindow *lw);
76 void layout_select_none(LayoutWindow *lw);
77 void layout_select_invert(LayoutWindow *lw);
78 void layout_select_list(LayoutWindow *lw, GList *list);
79
80 void layout_mark_to_selection(LayoutWindow *lw, gint mark, MarkToSelectionMode mode);
81 void layout_selection_to_mark(LayoutWindow *lw, gint mark, SelectionToMarkMode mode);
82
83 void layout_mark_filter_toggle(LayoutWindow *lw, gint mark);
84
85 void layout_refresh(LayoutWindow *lw);
86
87 void layout_thumb_set(LayoutWindow *lw, gboolean enable);
88 gboolean layout_thumb_get(LayoutWindow *lw);
89
90 void layout_marks_set(LayoutWindow *lw, gboolean enable);
91 gboolean layout_marks_get(LayoutWindow *lw);
92
93 void layout_file_filter_set(LayoutWindow *lw, gboolean enable);
94
95 void layout_sort_set(LayoutWindow *lw, SortType type, gboolean ascend);
96 gboolean layout_sort_get(LayoutWindow *lw, SortType *type, gboolean *ascend);
97
98 gboolean layout_geometry_get(LayoutWindow *lw, gint *x, gint *y, gint *w, gint *h);
99 gboolean layout_geometry_get_dividers(LayoutWindow *lw, gint *h, gint *v);
100
101 void layout_views_set(LayoutWindow *lw, DirViewType dir_view_type, FileViewType file_view_type);
102 gboolean layout_views_get(LayoutWindow *lw, DirViewType *dir_view_type, FileViewType *file_view_type);
103
104 void layout_views_set_sort(LayoutWindow *lw, SortType method, gboolean ascend);
105
106 void layout_status_update(LayoutWindow *lw, const gchar *text);
107
108 void layout_style_set(LayoutWindow *lw, gint style, const gchar *order);
109
110 void layout_menu_update_edit(void);
111 void layout_styles_update(void);
112 void layout_colors_update(void);
113
114
115 gboolean layout_geometry_get_tools(LayoutWindow *lw, gint *x, gint *y, gint *w, gint *h, gint *divider_pos);
116 void layout_tools_float_set(LayoutWindow *lw, gboolean popped, gboolean hidden);
117 gboolean layout_tools_float_get(LayoutWindow *lw, gboolean *popped, gboolean *hidden);
118
119 void layout_tools_float_toggle(LayoutWindow *lw);
120 void layout_tools_hide_toggle(LayoutWindow *lw);
121
122
123 void layout_toolbar_toggle(LayoutWindow *lw);
124 void layout_info_pixel_set(LayoutWindow *lw, gboolean show);
125
126 void layout_split_change(LayoutWindow *lw, ImageSplitMode mode);
127
128 void save_layout(LayoutWindow *lw);
129 gchar *layout_get_unique_id();
130 #endif
131 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */