summaryrefslogtreecommitdiff
path: root/libmetacity/meta-frame-layout.h
diff options
context:
space:
mode:
authorAlberts Muktupāvels <alberts.muktupavels@gmail.com>2016-02-07 15:43:07 +0200
committerAlberts Muktupāvels <alberts.muktupavels@gmail.com>2016-02-07 18:29:48 +0200
commita75484ee331504a9902ee565e619c09472721af3 (patch)
tree6ec9b3f443b39e3575596036ba496a66ebc8c256 /libmetacity/meta-frame-layout.h
parentcb43d2c915c6b4176ac02d4e77ce2485245cc2b6 (diff)
downloadmetacity-a75484ee331504a9902ee565e619c09472721af3.tar.gz
libmetacity: add substructures to MetaFrameLayout
Add gtk and metacity substructures to MetaFrameLayout. Move GTK+ or Metacity only variables to these substructures. This commit also adapts changes from this mutter commit: https://git.gnome.org/browse/mutter/commit/?id=6b92b45021773b93c008aafb4fcd24167784b0d6
Diffstat (limited to 'libmetacity/meta-frame-layout.h')
-rw-r--r--libmetacity/meta-frame-layout.h111
1 files changed, 59 insertions, 52 deletions
diff --git a/libmetacity/meta-frame-layout.h b/libmetacity/meta-frame-layout.h
index 015eed7c..934c65b2 100644
--- a/libmetacity/meta-frame-layout.h
+++ b/libmetacity/meta-frame-layout.h
@@ -51,65 +51,72 @@ typedef enum
**/
struct _MetaFrameLayout
{
- /** Reference count. */
- int refcount;
-
- /** Size of left side */
- int left_width;
- /** Size of right side */
- int right_width;
- /** Size of top side */
- int top_height;
- /** Size of bottom side */
- int bottom_height;
+ gint refcount;
+
+ struct {
+ /** Border/padding of the entire frame */
+ GtkBorder frame_border;
+ /** Border/padding of the titlebar region */
+ GtkBorder titlebar_border;
+ /** Border/padding of titlebar buttons */
+
+ /** Size of images in buttons */
+ guint icon_size;
+
+ /** Space between titlebar elements */
+ guint titlebar_spacing;
+ } gtk;
+
+ struct {
+ /** Size of left side */
+ gint left_width;
+ /** Size of right side */
+ gint right_width;
+ /** Size of bottom side */
+ gint bottom_height;
+
+ /** Border of blue title region
+ * \bug (blue?!)
+ **/
+ GtkBorder title_border;
+
+ /** Extra height for inside of title region, above the font height */
+ int title_vertical_pad;
+
+ /** Right indent of buttons from edges of frame */
+ int right_titlebar_edge;
+ /** Left indent of buttons from edges of frame */
+ int left_titlebar_edge;
+
+ /**
+ * Sizing rule of buttons, either META_BUTTON_SIZING_ASPECT
+ * (in which case button_aspect will be honoured, and
+ * button_width and button_height set from it), or
+ * META_BUTTON_SIZING_FIXED (in which case we read the width
+ * and height directly).
+ */
+ MetaButtonSizing button_sizing;
+
+ /**
+ * Ratio of height/width. Honoured only if
+ * button_sizing==META_BUTTON_SIZING_ASPECT.
+ * Otherwise we figure out the height from the button_border.
+ */
+ double button_aspect;
+
+ /** Width of a button; set even when we are using aspect sizing */
+ gint button_width;
+
+ /** Height of a button; set even when we are using aspect sizing */
+ gint button_height;
+ } metacity;
/** Invisible border */
GtkBorder invisible_border;
- /** Border of blue title region
- * \bug (blue?!)
- **/
- GtkBorder title_border;
-
- /** Extra height for inside of title region, above the font height */
- int title_vertical_pad;
-
- /** Right indent of buttons from edges of frame */
- int right_titlebar_edge;
- /** Left indent of buttons from edges of frame */
- int left_titlebar_edge;
-
- /**
- * Sizing rule of buttons, either META_BUTTON_SIZING_ASPECT
- * (in which case button_aspect will be honoured, and
- * button_width and button_height set from it), or
- * META_BUTTON_SIZING_FIXED (in which case we read the width
- * and height directly).
- */
- MetaButtonSizing button_sizing;
-
- /**
- * Ratio of height/width. Honoured only if
- * button_sizing==META_BUTTON_SIZING_ASPECT.
- * Otherwise we figure out the height from the button_border.
- */
- double button_aspect;
-
- /** Width of a button; set even when we are using aspect sizing */
- int button_width;
-
- /** Height of a button; set even when we are using aspect sizing */
- int button_height;
-
/** Space around buttons */
GtkBorder button_border;
- /** Size of images in buttons */
- guint icon_size;
-
- /** Space between titlebar elements */
- guint titlebar_spacing;
-
/** scale factor for title text */
double title_scale;