|
| 1 | +/* |
| 2 | + * MATE panel drawer module. |
| 3 | + * |
| 4 | + * List static function prototypes separate |
| 5 | + * to prevent errors when compiling panel.c |
| 6 | + * |
| 7 | + |
| 8 | + */ |
| 9 | + |
| 10 | + |
| 11 | +#ifndef DRAWER_PRIVATE_H |
| 12 | +#define DRAWER_PRIVATE_H |
| 13 | + |
| 14 | +#ifdef __cplusplus |
| 15 | +extern "C" { |
| 16 | +#endif |
| 17 | + |
| 18 | + |
| 19 | +/* Internal functions */ |
| 20 | +/* event handlers */ |
| 21 | + |
| 22 | +static void drawer_click (GtkWidget *widget, |
| 23 | + Drawer *drawer); |
| 24 | + |
| 25 | +static void drawer_focus_panel_widget (Drawer *drawer, |
| 26 | + GtkDirectionType direction); |
| 27 | + |
| 28 | +static gboolean key_press_drawer (GtkWidget *widget, |
| 29 | + GdkEventKey *event, |
| 30 | + Drawer *drawer); |
| 31 | + |
| 32 | +static gboolean key_press_drawer_widget (GtkWidget *widget, |
| 33 | + GdkEventKey *event, |
| 34 | + Drawer *drawer); |
| 35 | + |
| 36 | + /* drag and drop handlers */ |
| 37 | + |
| 38 | +static void drag_data_get_cb (GtkWidget *widget, |
| 39 | + GdkDragContext *context, |
| 40 | + GtkSelectionData *selection_data, |
| 41 | + guint info, |
| 42 | + guint time, |
| 43 | + Drawer *drawer); |
| 44 | + |
| 45 | +static gboolean drag_motion_cb (GtkWidget *widget, |
| 46 | + GdkDragContext *context, |
| 47 | + int x, |
| 48 | + int y, |
| 49 | + guint time_, |
| 50 | + Drawer *drawer); |
| 51 | + |
| 52 | +static gboolean drag_drop_cb (GtkWidget *widget, |
| 53 | + GdkDragContext *context, |
| 54 | + int x, |
| 55 | + int y, |
| 56 | + guint time_, |
| 57 | + Drawer *drawer); |
| 58 | + |
| 59 | +static void drag_data_received_cb (GtkWidget *widget, |
| 60 | + GdkDragContext *context, |
| 61 | + gint x, |
| 62 | + gint y, |
| 63 | + GtkSelectionData *selection_data, |
| 64 | + guint info, |
| 65 | + guint time_, |
| 66 | + Drawer *drawer); |
| 67 | + |
| 68 | +static gboolean close_drawer_in_idle (gpointer data); |
| 69 | + |
| 70 | +static void queue_drawer_close_for_drag (Drawer *drawer); |
| 71 | + |
| 72 | +static void drag_leave_cb (GtkWidget *widget, |
| 73 | + GdkDragContext *context, |
| 74 | + guint time_, |
| 75 | + Drawer *drawer); |
| 76 | + |
| 77 | + /* load_drawer_applet handlers */ |
| 78 | + |
| 79 | +static void drawer_button_size_allocated (GtkWidget *widget, |
| 80 | + GtkAllocation *alloc, |
| 81 | + Drawer *drawer); |
| 82 | + |
| 83 | +static gboolean drawer_changes_enabled (void); |
| 84 | + |
| 85 | + /* gsettings handlers */ |
| 86 | + |
| 87 | +static void panel_drawer_custom_icon_changed (GSettings *settings, |
| 88 | + gchar *key, |
| 89 | + Drawer *drawer); |
| 90 | + |
| 91 | +static void panel_drawer_tooltip_changed (GSettings *settings, |
| 92 | + gchar *key, |
| 93 | + Drawer *drawer); |
| 94 | + |
| 95 | + /* destroy handlers */ |
| 96 | + |
| 97 | +static void toplevel_destroyed (GtkWidget *widget, |
| 98 | + Drawer *drawer); |
| 99 | + |
| 100 | +static void destroy_drawer (GtkWidget *widget, |
| 101 | + Drawer *drawer); |
| 102 | + |
| 103 | +static void drawer_deletion_response (GtkWidget *dialog, |
| 104 | + int response, |
| 105 | + Drawer *drawer); |
| 106 | + |
| 107 | +/* end event handlers */ |
| 108 | + |
| 109 | +static PanelToplevel *create_drawer_toplevel (const char *drawer_id, |
| 110 | + GSettings *settings); |
| 111 | + |
| 112 | +static void set_tooltip_and_name (Drawer *drawer, |
| 113 | + const char *tooltip); |
| 114 | + |
| 115 | +static Drawer *create_drawer_applet (PanelToplevel *toplevel, |
| 116 | + PanelToplevel *parent_toplevel, |
| 117 | + const char *tooltip, |
| 118 | + const char *custom_icon, |
| 119 | + gboolean use_custom_icon, |
| 120 | + PanelOrientation orientation); |
| 121 | + |
| 122 | +static void panel_drawer_connect_to_gsettings (Drawer *drawer); |
| 123 | + |
| 124 | +static void load_drawer_applet (char *toplevel_id, |
| 125 | + GSettings *settings, |
| 126 | + const char *custom_icon, |
| 127 | + gboolean use_custom_icon, |
| 128 | + const char *tooltip, |
| 129 | + PanelToplevel *parent_toplevel, |
| 130 | + gboolean locked, |
| 131 | + int pos, |
| 132 | + gboolean exactpos, |
| 133 | + const char *id); |
| 134 | + |
| 135 | +static void panel_drawer_prepare (const char *drawer_id, |
| 136 | + const char *custom_icon, |
| 137 | + gboolean use_custom_icon, |
| 138 | + const char *tooltip, |
| 139 | + char **attached_toplevel_id); |
| 140 | + |
| 141 | + |
| 142 | +#ifdef __cplusplus |
| 143 | +} |
| 144 | +#endif |
| 145 | + |
| 146 | +#endif /* DRAWER_PRIVATE_H */ |
0 commit comments