]> Dogcows Code - chaz/openbox/blob - openbox/frame.h
use a context enum instead of quarks
[chaz/openbox] / openbox / frame.h
1 #ifndef __frame_h
2 #define __frame_h
3
4 #include "geom.h"
5 #include "client.h"
6
7 typedef enum {
8 Context_None,
9 Context_Root,
10 Context_Client,
11 Context_Titlebar,
12 Context_Handle,
13 Context_Frame,
14 Context_BLCorner,
15 Context_BRCorner,
16 Context_TLCorner,
17 Context_TRCorner,
18 Context_Maximize,
19 Context_AllDesktops,
20 Context_Shade,
21 Context_Iconify,
22 Context_Icon,
23 Context_Close,
24 NUM_CONTEXTS
25 } Context;
26
27 Context frame_context_from_string(char *name);
28
29 typedef struct Frame {
30 Client *client;
31
32 Window window;
33 Window plate;
34
35 Strut size;
36 Rect area;
37 gboolean visible;
38 } Frame;
39
40 /*! Applies gravity to the client's position to find where the frame should
41 be positioned.
42 @return The proper coordinates for the frame, based on the client.
43 */
44 void frame_client_gravity(Frame *self, int *x, int *y);
45
46 /*! Reversly applies gravity to the frame's position to find where the client
47 should be positioned.
48 @return The proper coordinates for the client, based on the frame.
49 */
50 void frame_frame_gravity(Frame *self, int *x, int *y);
51
52
53 #endif
This page took 0.045546 seconds and 5 git commands to generate.