6 #include "render/render.h"
28 #define FRAME_HANDLE_Y(f) (f->innersize.top + f->client->area.height + \
31 typedef struct Frame {
54 RrAppearance *a_unfocused_title;
55 RrAppearance *a_focused_title;
56 RrAppearance *a_unfocused_label;
57 RrAppearance *a_focused_label;
59 RrAppearance *a_unfocused_handle;
60 RrAppearance *a_focused_handle;
66 gint width; /* title and handle */
68 gint icon_x; /* x-position of the window icon button */
69 gint label_x; /* x-position of the window title */
70 gint iconify_x; /* x-position of the window iconify button */
71 gint desk_x; /* x-position of the window all-desktops button */
72 gint shade_x; /* x-position of the window shade button */
73 gint max_x; /* x-position of the window maximize button */
74 gint close_x; /* x-position of the window close button */
75 gint bwidth; /* border width */
76 gint cbwidth; /* client border width */
82 gboolean iconify_press;
88 void frame_shutdown();
91 void frame_show(Frame *self);
92 void frame_hide(Frame *self);
93 void frame_adjust_shape(Frame *self);
94 void frame_adjust_area(Frame *self, gboolean moved, gboolean resized);
95 void frame_adjust_state(Frame *self);
96 void frame_adjust_focus(Frame *self, gboolean hilite);
97 void frame_adjust_title(Frame *self);
98 void frame_adjust_icon(Frame *self);
99 void frame_grab_client(Frame *self, ObClient *client);
100 void frame_release_client(Frame *self, ObClient *client);
102 Context frame_context_from_string(char *name);
104 Context frame_context(ObClient *self, Window win);
106 /*! Applies gravity to the client's position to find where the frame should
108 @return The proper coordinates for the frame, based on the client.
110 void frame_client_gravity(Frame *self, int *x, int *y);
112 /*! Reversly applies gravity to the frame's position to find where the client
113 should be positioned.
114 @return The proper coordinates for the client, based on the frame.
116 void frame_frame_gravity(Frame *self, int *x, int *y);