annotate src/bar.h @ 1811:f405ec9b696b default tip

Some small logic mistakes Use boolean operators for booleans and bitwise otherwise only.
author mow
date Mon, 10 May 2010 11:33:13 +0000
parents 956aab097ea7
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1291
50ae02a4a675 replaced bar_info with an universal bar, restored the original
nadvornik
parents:
diff changeset
1 /*
50ae02a4a675 replaced bar_info with an universal bar, restored the original
nadvornik
parents:
diff changeset
2 * Geeqie
50ae02a4a675 replaced bar_info with an universal bar, restored the original
nadvornik
parents:
diff changeset
3 * (C) 2004 John Ellis
1802
956aab097ea7 added 2010 to copyright text
nadvornik
parents: 1604
diff changeset
4 * Copyright (C) 2008 - 2010 The Geeqie Team
1291
50ae02a4a675 replaced bar_info with an universal bar, restored the original
nadvornik
parents:
diff changeset
5 *
50ae02a4a675 replaced bar_info with an universal bar, restored the original
nadvornik
parents:
diff changeset
6 * Author: Vladimir Nadvornik
50ae02a4a675 replaced bar_info with an universal bar, restored the original
nadvornik
parents:
diff changeset
7 *
50ae02a4a675 replaced bar_info with an universal bar, restored the original
nadvornik
parents:
diff changeset
8 * This software is released under the GNU General Public License (GNU GPL).
50ae02a4a675 replaced bar_info with an universal bar, restored the original
nadvornik
parents:
diff changeset
9 * Please read the included file COPYING for more information.
50ae02a4a675 replaced bar_info with an universal bar, restored the original
nadvornik
parents:
diff changeset
10 * This software comes with no warranty of any kind, use at your own risk!
50ae02a4a675 replaced bar_info with an universal bar, restored the original
nadvornik
parents:
diff changeset
11 */
50ae02a4a675 replaced bar_info with an universal bar, restored the original
nadvornik
parents:
diff changeset
12
50ae02a4a675 replaced bar_info with an universal bar, restored the original
nadvornik
parents:
diff changeset
13
50ae02a4a675 replaced bar_info with an universal bar, restored the original
nadvornik
parents:
diff changeset
14 #ifndef BAR_H
50ae02a4a675 replaced bar_info with an universal bar, restored the original
nadvornik
parents:
diff changeset
15 #define BAR_H
50ae02a4a675 replaced bar_info with an universal bar, restored the original
nadvornik
parents:
diff changeset
16
1469
607c60506863 added a possibility to update existing bars from config
nadvornik
parents: 1417
diff changeset
17 typedef enum {
1471
65a5c27823c2 update translated pane titles
nadvornik
parents: 1469
diff changeset
18 PANE_UNDEF = 0,
1469
607c60506863 added a possibility to update existing bars from config
nadvornik
parents: 1417
diff changeset
19 PANE_COMMENT,
607c60506863 added a possibility to update existing bars from config
nadvornik
parents: 1417
diff changeset
20 PANE_EXIF,
607c60506863 added a possibility to update existing bars from config
nadvornik
parents: 1417
diff changeset
21 PANE_HISTOGRAM,
1604
c6d522fe3e5e added GPS map support - patch by Colin Clark
nadvornik
parents: 1520
diff changeset
22 PANE_KEYWORDS,
c6d522fe3e5e added GPS map support - patch by Colin Clark
nadvornik
parents: 1520
diff changeset
23 PANE_GPS
1469
607c60506863 added a possibility to update existing bars from config
nadvornik
parents: 1417
diff changeset
24 } PaneType;
607c60506863 added a possibility to update existing bars from config
nadvornik
parents: 1417
diff changeset
25
1291
50ae02a4a675 replaced bar_info with an universal bar, restored the original
nadvornik
parents:
diff changeset
26 typedef struct _PaneData PaneData;
50ae02a4a675 replaced bar_info with an universal bar, restored the original
nadvornik
parents:
diff changeset
27
50ae02a4a675 replaced bar_info with an universal bar, restored the original
nadvornik
parents:
diff changeset
28 struct _PaneData {
1387
6f31fa931d3f simplified bar interface
nadvornik
parents: 1383
diff changeset
29 /* filled in by pane */
1291
50ae02a4a675 replaced bar_info with an universal bar, restored the original
nadvornik
parents:
diff changeset
30 void (*pane_set_fd)(GtkWidget *pane, FileData *fd);
1520
7216f4a45698 added pane_notify_selection to pane API
nadvornik
parents: 1484
diff changeset
31 void (*pane_notify_selection)(GtkWidget *pane, gint count);
1291
50ae02a4a675 replaced bar_info with an universal bar, restored the original
nadvornik
parents:
diff changeset
32 gint (*pane_event)(GtkWidget *pane, GdkEvent *event);
1309
55ea4962887a config file format changed to XML
nadvornik
parents: 1291
diff changeset
33 void (*pane_write_config)(GtkWidget *pane, GString *outstr, gint indent);
1343
eebb8d0cb677 give the panes more control over expander title
nadvornik
parents: 1317
diff changeset
34 GtkWidget *title;
1309
55ea4962887a config file format changed to XML
nadvornik
parents: 1291
diff changeset
35 gboolean expanded;
1469
607c60506863 added a possibility to update existing bars from config
nadvornik
parents: 1417
diff changeset
36 gchar *id;
607c60506863 added a possibility to update existing bars from config
nadvornik
parents: 1417
diff changeset
37 PaneType type;
1291
50ae02a4a675 replaced bar_info with an universal bar, restored the original
nadvornik
parents:
diff changeset
38
1387
6f31fa931d3f simplified bar interface
nadvornik
parents: 1383
diff changeset
39 /* filled in by bar */
6f31fa931d3f simplified bar interface
nadvornik
parents: 1383
diff changeset
40 GtkWidget *bar;
6f31fa931d3f simplified bar interface
nadvornik
parents: 1383
diff changeset
41 LayoutWindow *lw;
1291
50ae02a4a675 replaced bar_info with an universal bar, restored the original
nadvornik
parents:
diff changeset
42 };
50ae02a4a675 replaced bar_info with an universal bar, restored the original
nadvornik
parents:
diff changeset
43
50ae02a4a675 replaced bar_info with an universal bar, restored the original
nadvornik
parents:
diff changeset
44
50ae02a4a675 replaced bar_info with an universal bar, restored the original
nadvornik
parents:
diff changeset
45
1469
607c60506863 added a possibility to update existing bars from config
nadvornik
parents: 1417
diff changeset
46
1387
6f31fa931d3f simplified bar interface
nadvornik
parents: 1383
diff changeset
47 GtkWidget *bar_new(LayoutWindow *lw);
6f31fa931d3f simplified bar interface
nadvornik
parents: 1383
diff changeset
48 GtkWidget *bar_new_from_config(LayoutWindow *lw, const gchar **attribute_names, const gchar **attribute_values);
1469
607c60506863 added a possibility to update existing bars from config
nadvornik
parents: 1417
diff changeset
49 GtkWidget *bar_update_from_config(GtkWidget *bar, const gchar **attribute_names, const gchar **attribute_values);
1309
55ea4962887a config file format changed to XML
nadvornik
parents: 1291
diff changeset
50
1291
50ae02a4a675 replaced bar_info with an universal bar, restored the original
nadvornik
parents:
diff changeset
51 void bar_close(GtkWidget *bar);
50ae02a4a675 replaced bar_info with an universal bar, restored the original
nadvornik
parents:
diff changeset
52
1309
55ea4962887a config file format changed to XML
nadvornik
parents: 1291
diff changeset
53 void bar_write_config(GtkWidget *bar, GString *outstr, gint indent);
55ea4962887a config file format changed to XML
nadvornik
parents: 1291
diff changeset
54
1484
9c16a93a0fdf improved sidebar configuration
nadvornik
parents: 1471
diff changeset
55 void bar_populate_default(GtkWidget *bar);
9c16a93a0fdf improved sidebar configuration
nadvornik
parents: 1471
diff changeset
56
1309
55ea4962887a config file format changed to XML
nadvornik
parents: 1291
diff changeset
57 void bar_add(GtkWidget *bar, GtkWidget *pane);
1469
607c60506863 added a possibility to update existing bars from config
nadvornik
parents: 1417
diff changeset
58 GtkWidget *bar_find_pane_by_id(GtkWidget *bar, PaneType type, const gchar *id);
1309
55ea4962887a config file format changed to XML
nadvornik
parents: 1291
diff changeset
59
1469
607c60506863 added a possibility to update existing bars from config
nadvornik
parents: 1417
diff changeset
60 void bar_clear(GtkWidget *bar);
1309
55ea4962887a config file format changed to XML
nadvornik
parents: 1291
diff changeset
61
1291
50ae02a4a675 replaced bar_info with an universal bar, restored the original
nadvornik
parents:
diff changeset
62 void bar_set_fd(GtkWidget *bar, FileData *fd);
1520
7216f4a45698 added pane_notify_selection to pane API
nadvornik
parents: 1484
diff changeset
63 void bar_notify_selection(GtkWidget *bar, gint count);
1417
8036c5b779ca Tidy up.
zas_
parents: 1389
diff changeset
64 gboolean bar_event(GtkWidget *bar, GdkEvent *event);
1291
50ae02a4a675 replaced bar_info with an universal bar, restored the original
nadvornik
parents:
diff changeset
65
1383
3c9abbc05792 use standard GtkHPaned for sidebar width
nadvornik
parents: 1343
diff changeset
66 gint bar_get_width(GtkWidget *bar);
1291
50ae02a4a675 replaced bar_info with an universal bar, restored the original
nadvornik
parents:
diff changeset
67
1389
c44f21235ffe Use a common function bar_pane_expander_title() to set expanders title widget.
zas_
parents: 1387
diff changeset
68 GtkWidget *bar_pane_expander_title(const gchar *title);
1469
607c60506863 added a possibility to update existing bars from config
nadvornik
parents: 1417
diff changeset
69 void bar_update_expander(GtkWidget *pane);
1471
65a5c27823c2 update translated pane titles
nadvornik
parents: 1469
diff changeset
70 gboolean bar_pane_translate_title(PaneType type, const gchar *id, gchar **title);
1484
9c16a93a0fdf improved sidebar configuration
nadvornik
parents: 1471
diff changeset
71 const gchar *bar_pane_get_default_config(const gchar *id);
9c16a93a0fdf improved sidebar configuration
nadvornik
parents: 1471
diff changeset
72
1291
50ae02a4a675 replaced bar_info with an universal bar, restored the original
nadvornik
parents:
diff changeset
73 #endif
50ae02a4a675 replaced bar_info with an universal bar, restored the original
nadvornik
parents:
diff changeset
74 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */