]> icculus.org git repositories - dana/openbox.git/blob - openbox/dock.h
give the dock a strut and use it
[dana/openbox.git] / openbox / dock.h
1 #ifndef __dock_h
2 #define __dock_h
3
4 #include "timer.h"
5 #include "window.h"
6 #include "stacking.h"
7 #include "geom.h"
8 #include "render/render.h"
9
10 #include <glib.h>
11 #include <X11/Xlib.h>
12 #include <X11/Xutil.h>
13
14 typedef enum {
15     DockPos_Floating,
16     DockPos_TopLeft,
17     DockPos_Top,
18     DockPos_TopRight,
19     DockPos_Right,
20     DockPos_BottomRight,
21     DockPos_Bottom,
22     DockPos_BottomLeft,
23     DockPos_Left
24 } DockPosition;
25
26 typedef struct Dock {
27     ObWindow obwin;
28
29     Window frame;
30     Appearance *a_frame;
31
32     /* actual position (when not auto-hidden) */
33     int x, y;
34     int w, h;
35
36     gboolean hidden;
37     Timer *hide_timer;
38
39     GList *dock_apps;
40 } Dock;
41
42 typedef struct DockApp {
43     ObWindow obwin;
44
45     int ignore_unmaps;
46
47     Window icon_win;
48     Window win;
49     int x;
50     int y;
51     int w;
52     int h;
53 } DockApp;
54
55 extern Strut dock_strut;
56
57 void dock_startup();
58 void dock_shutdown();
59
60 void dock_configure();
61 void dock_hide(gboolean hide);
62
63 void dock_add(Window win, XWMHints *wmhints);
64
65 void dock_remove_all();
66 void dock_remove(DockApp *app, gboolean reparent);
67
68 void dock_app_drag(DockApp *app, XMotionEvent *e);
69 void dock_app_configure(DockApp *app, int w, int h);
70
71 #endif