1 | #ifndef PANEL_CONFIG_H |
---|
2 | #define PANEL_CONFIG_H |
---|
3 | |
---|
4 | #include "panel-widget.h" |
---|
5 | #include "border-widget.h" |
---|
6 | #include "aligned-widget.h" |
---|
7 | #include "sliding-widget.h" |
---|
8 | #include "drawer-widget.h" |
---|
9 | |
---|
10 | #include "panel-util.h" |
---|
11 | |
---|
12 | #define NUMBER_OF_SIZES 5 |
---|
13 | |
---|
14 | /* used to temporarily store config values until the 'Apply' |
---|
15 | button is pressed. */ |
---|
16 | typedef struct _PerPanelConfig PerPanelConfig; |
---|
17 | struct _PerPanelConfig { |
---|
18 | GtkWidget *panel; |
---|
19 | |
---|
20 | UpdateFunction update_function; |
---|
21 | gpointer update_data; |
---|
22 | |
---|
23 | /*basep types*/ |
---|
24 | int screen; |
---|
25 | gboolean hidebuttons; |
---|
26 | gboolean hidebutton_pixmaps; |
---|
27 | BasePMode mode; |
---|
28 | BasePLevel level; |
---|
29 | gboolean avoid_on_maximize; |
---|
30 | |
---|
31 | /*floating widget*/ |
---|
32 | PanelOrientation orient; |
---|
33 | int x, y; |
---|
34 | |
---|
35 | /*indexes for toggle*/ |
---|
36 | int edge; |
---|
37 | int align; |
---|
38 | |
---|
39 | gint16 offset; |
---|
40 | |
---|
41 | |
---|
42 | /*panel types*/ |
---|
43 | int sz; |
---|
44 | gboolean fit_pixmap_bg; |
---|
45 | gboolean strech_pixmap_bg; |
---|
46 | gboolean rotate_pixmap_bg; |
---|
47 | PanelBackType back_type; |
---|
48 | char *back_pixmap; |
---|
49 | GdkColor back_color; |
---|
50 | |
---|
51 | gboolean register_changes; /*used for startup*/ |
---|
52 | gboolean ppc_origin_change; /* if true then the dialog |
---|
53 | will NOT be updated on changes, |
---|
54 | so that we don't get into infinite |
---|
55 | loops, set before we ourselves |
---|
56 | apply changes. */ |
---|
57 | GtkWidget *config_window; |
---|
58 | GtkWidget *type_tab; /* the type specific tab of |
---|
59 | the notebook, this is just |
---|
60 | an eventbox, which we will |
---|
61 | be able to change contents |
---|
62 | of */ |
---|
63 | GtkWidget *type_tab_label; |
---|
64 | |
---|
65 | GtkWidget *pix_entry; |
---|
66 | |
---|
67 | /*levels*/ |
---|
68 | GtkWidget *level_menu; |
---|
69 | |
---|
70 | /*avoid_on_maximize*/ |
---|
71 | GtkWidget *avoid_on_maximize_button; |
---|
72 | |
---|
73 | /*avoid_on_maximize*/ |
---|
74 | GtkWidget *screen_spin; |
---|
75 | |
---|
76 | /*hiding stuff*/ |
---|
77 | GtkWidget *autohide_button; |
---|
78 | GtkWidget *hidebuttons_button; |
---|
79 | GtkWidget *hidebutton_pixmaps_button; |
---|
80 | |
---|
81 | /*size*/ |
---|
82 | GtkWidget *size_menu; |
---|
83 | |
---|
84 | /*color buttons*/ |
---|
85 | GtkWidget *non; |
---|
86 | GtkWidget *pix; |
---|
87 | GtkWidget *col; |
---|
88 | GtkWidget *trans; |
---|
89 | GtkWidget *backsel; |
---|
90 | GtkWidget *back_om; /* the back type option menu */ |
---|
91 | |
---|
92 | /*position widgets*/ |
---|
93 | #define POSITION_EDGES 4 |
---|
94 | #define POSITION_ALIGNS 3 |
---|
95 | GtkWidget *toggle[POSITION_EDGES][POSITION_ALIGNS]; |
---|
96 | |
---|
97 | /*floating buttons*/ |
---|
98 | GtkWidget *h_orient; |
---|
99 | GtkWidget *v_orient; |
---|
100 | GtkWidget *x_spin; |
---|
101 | GtkWidget *y_spin; |
---|
102 | |
---|
103 | /*sliding buttons*/ |
---|
104 | GtkWidget *offset_spin; |
---|
105 | }; |
---|
106 | |
---|
107 | void panel_config_register_changes (PerPanelConfig *ppc); |
---|
108 | |
---|
109 | void panel_config (GtkWidget *panel); |
---|
110 | void update_config_size (GtkWidget *panel); |
---|
111 | void update_config_level (BasePWidget *panel); |
---|
112 | void update_config_avoid_on_maximize (BasePWidget *panel); |
---|
113 | void update_config_screen (BasePWidget *panel); |
---|
114 | void update_config_mode (BasePWidget *panel); |
---|
115 | void update_config_hidebuttons (BasePWidget *panel); |
---|
116 | void update_config_back (PanelWidget *panel); |
---|
117 | void update_config_edge (BasePWidget *w); |
---|
118 | void update_config_anchor (BasePWidget *w); |
---|
119 | void update_config_offset (BasePWidget *w); |
---|
120 | void update_config_offset_limit (BasePWidget *panel); |
---|
121 | void update_config_align (BasePWidget *w); |
---|
122 | void update_config_floating_pos (BasePWidget *panel); |
---|
123 | void update_config_floating_orient (BasePWidget *panel); |
---|
124 | void update_config_floating_pos_limits (BasePWidget *panel); |
---|
125 | void update_config_type (BasePWidget *panel); |
---|
126 | void kill_config_dialog (GtkWidget *panel); |
---|
127 | |
---|
128 | GtkWidget *make_level_widget (PerPanelConfig *ppc); |
---|
129 | GtkWidget *make_size_widget (PerPanelConfig *ppc); |
---|
130 | |
---|
131 | |
---|
132 | #endif /* PANEL_CONFIG_H */ |
---|