5 #include "render/render.h"
7 typedef struct _ObFrame ObFrame
;
12 OB_FRAME_CONTEXT_NONE
,
13 OB_FRAME_CONTEXT_ROOT
,
14 OB_FRAME_CONTEXT_CLIENT
,
15 OB_FRAME_CONTEXT_TITLEBAR
,
16 OB_FRAME_CONTEXT_HANDLE
,
17 OB_FRAME_CONTEXT_FRAME
,
18 OB_FRAME_CONTEXT_BLCORNER
,
19 OB_FRAME_CONTEXT_BRCORNER
,
20 OB_FRAME_CONTEXT_MAXIMIZE
,
21 OB_FRAME_CONTEXT_ALLDESKTOPS
,
22 OB_FRAME_CONTEXT_SHADE
,
23 OB_FRAME_CONTEXT_ICONIFY
,
24 OB_FRAME_CONTEXT_ICON
,
25 OB_FRAME_CONTEXT_CLOSE
,
31 struct _ObClient
*client
;
53 RrAppearance
*a_unfocused_title
;
54 RrAppearance
*a_focused_title
;
55 RrAppearance
*a_unfocused_label
;
56 RrAppearance
*a_focused_label
;
58 RrAppearance
*a_unfocused_handle
;
59 RrAppearance
*a_focused_handle
;
65 gint width
; /* title and handle */
67 gint icon_x
; /* x-position of the window icon button */
68 gint label_x
; /* x-position of the window title */
69 gint iconify_x
; /* x-position of the window iconify button */
70 gint desk_x
; /* x-position of the window all-desktops button */
71 gint shade_x
; /* x-position of the window shade button */
72 gint max_x
; /* x-position of the window maximize button */
73 gint close_x
; /* x-position of the window close button */
74 gint bwidth
; /* border width */
75 gint cbwidth
; /* client border width */
81 gboolean iconify_press
;
87 void frame_shutdown();
90 void frame_show(ObFrame
*self
);
91 void frame_hide(ObFrame
*self
);
92 void frame_adjust_shape(ObFrame
*self
);
93 void frame_adjust_area(ObFrame
*self
, gboolean moved
, gboolean resized
);
94 void frame_adjust_state(ObFrame
*self
);
95 void frame_adjust_focus(ObFrame
*self
, gboolean hilite
);
96 void frame_adjust_title(ObFrame
*self
);
97 void frame_adjust_icon(ObFrame
*self
);
98 void frame_grab_client(ObFrame
*self
, struct _ObClient
*client
);
99 void frame_release_client(ObFrame
*self
, struct _ObClient
*client
);
101 ObFrameContext
frame_context_from_string(char *name
);
103 ObFrameContext
frame_context(struct _ObClient
*self
, Window win
);
105 /*! Applies gravity to the client's position to find where the frame should
107 @return The proper coordinates for the frame, based on the client.
109 void frame_client_gravity(ObFrame
*self
, int *x
, int *y
);
111 /*! Reversly applies gravity to the frame's position to find where the client
112 should be positioned.
113 @return The proper coordinates for the client, based on the frame.
115 void frame_frame_gravity(ObFrame
*self
, int *x
, int *y
);