+ gint icon_on; /* if the window icon button is on */
+ gint label_on; /* if the window title is on */
+ gint iconify_on; /* if the window iconify button is on */
+ gint desk_on; /* if the window all-desktops button is on */
+ gint shade_on; /* if the window shade button is on */
+ gint max_on; /* if the window maximize button is on */
+ gint close_on; /* if the window close button is on */
+
+ gint width; /* width of the titlebar and handle */
+ gint label_width; /* width of the label in the titlebar */
+ gint icon_x; /* x-position of the window icon button */
+ gint label_x; /* x-position of the window title */
+ gint iconify_x; /* x-position of the window iconify button */
+ gint desk_x; /* x-position of the window all-desktops button */
+ gint shade_x; /* x-position of the window shade button */
+ gint max_x; /* x-position of the window maximize button */
+ gint close_x; /* x-position of the window close button */
+ gint bwidth; /* border width */
+ gint cbwidth_l; /* client border width */
+ gint cbwidth_t; /* client border width */
+ gint cbwidth_r; /* client border width */
+ gint cbwidth_b; /* client border width */
+ gboolean max_horz; /* when maxed some decorations are hidden */
+ gboolean max_vert; /* when maxed some decorations are hidden */
+ gboolean shaded; /* decorations adjust when shaded */
+
+ /* the leftmost and rightmost elements in the titlebar */
+ ObFrameContext leftmost;
+ ObFrameContext rightmost;
+
+ gboolean max_press;
+ gboolean close_press;
+ gboolean desk_press;
+ gboolean shade_press;
+ gboolean iconify_press;
+ gboolean max_hover;
+ gboolean close_hover;
+ gboolean desk_hover;
+ gboolean shade_hover;
+ gboolean iconify_hover;
+
+ gboolean focused;
+ gboolean need_render;
+
+ gboolean flashing;
+ gboolean flash_on;
+ GTimeVal flash_end;
+ guint flash_timer;
+
+ /*! Is the frame currently in an animation for iconify or restore.
+ 0 means that it is not animating. > 0 means it is animating an iconify.
+ < 0 means it is animating a restore.
+ */
+ gint iconify_animation_going;
+ guint iconify_animation_timer;
+ GTimeVal iconify_animation_end;
+};
+
+ObFrame *frame_new(struct _ObClient *c);
+void frame_free(ObFrame *self);
+
+void frame_show(ObFrame *self);
+void frame_hide(ObFrame *self);
+void frame_adjust_theme(ObFrame *self);
+#ifdef SHAPE
+void frame_adjust_shape_kind(ObFrame *self, int kind);
+#endif
+void frame_adjust_shape(ObFrame *self);
+void frame_adjust_area(ObFrame *self, gboolean moved,
+ gboolean resized, gboolean fake);
+void frame_adjust_client_area(ObFrame *self);
+void frame_adjust_state(ObFrame *self);
+void frame_adjust_focus(ObFrame *self, gboolean hilite);
+void frame_adjust_title(ObFrame *self);
+void frame_adjust_icon(ObFrame *self);
+void frame_grab_client(ObFrame *self);
+void frame_release_client(ObFrame *self);
+
+ObFrameContext frame_context_from_string(const gchar *name);
+
+/*! Parses a ObFrameContext from a string of space-separated context names.
+ @names The list of context names, the first of which is removed from the
+ string.
+ @cx The ObFrameContext is returned here. If an invalid name is found, this
+ is set to OB_FRAME_CONTEXT_NONE.
+ @return TRUE if there was something to read in @names, FALSE if it was an
+ empty input.
+*/
+gboolean frame_next_context_from_string(gchar *names, ObFrameContext *cx);
+
+ObFrameContext frame_context(struct _ObClient *self, Window win,
+ gint x, gint y);