diff options
author | Alberts Muktupāvels <alberts.muktupavels@gmail.com> | 2016-02-03 21:23:26 +0200 |
---|---|---|
committer | Alberts Muktupāvels <alberts.muktupavels@gmail.com> | 2016-02-03 21:23:26 +0200 |
commit | 2d03fef33dc111db16224f9460013116d0ff4eb1 (patch) | |
tree | 9e16cc1a6d35393139cb3f7229a180775def8291 /src | |
parent | a5db708f85a01d4d5fd50385a42775910aaf89cb (diff) | |
download | metacity-2d03fef33dc111db16224f9460013116d0ff4eb1.tar.gz |
theme: move MetaFrameGeometry to libmetacity
Diffstat (limited to 'src')
-rw-r--r-- | src/ui/theme.h | 80 |
1 files changed, 0 insertions, 80 deletions
diff --git a/src/ui/theme.h b/src/ui/theme.h index 2b30d63e..0e844d5c 100644 --- a/src/ui/theme.h +++ b/src/ui/theme.h @@ -23,87 +23,7 @@ #define THEME_H #include <gtk/gtk.h> -#include <libmetacity/meta-button-enums.h> -#include <libmetacity/meta-button-layout.h> -#include <libmetacity/meta-frame-borders.h> -#include <libmetacity/meta-frame-enums.h> #include <libmetacity/meta-theme.h> -#include <libmetacity/meta-style-info.h> - -typedef struct _MetaButtonSpace MetaButtonSpace; -typedef struct _MetaFrameGeometry MetaFrameGeometry; - -/** - * The computed size of a button (really just a way of tying its - * visible and clickable areas together). - * The reason for two different rectangles here is Fitts' law & maximized - * windows; see bug #97703 for more details. - */ -struct _MetaButtonSpace -{ - /** The screen area where the button's image is drawn */ - GdkRectangle visible; - /** The screen area where the button can be activated by clicking */ - GdkRectangle clickable; -}; - -/** - * Calculated actual geometry of the frame - */ -struct _MetaFrameGeometry -{ - MetaFrameBorders borders; - int top_height; - - int width; - int height; - - GdkRectangle title_rect; - - int left_titlebar_edge; - int right_titlebar_edge; - int top_titlebar_edge; - int bottom_titlebar_edge; - - /* used for a memset hack */ -#define ADDRESS_OF_BUTTON_RECTS(fgeom) (((char*)(fgeom)) + G_STRUCT_OFFSET (MetaFrameGeometry, close_rect)) -#define LENGTH_OF_BUTTON_RECTS (G_STRUCT_OFFSET (MetaFrameGeometry, right_single_background) + sizeof (GdkRectangle) - G_STRUCT_OFFSET (MetaFrameGeometry, close_rect)) - - /* The button rects (if changed adjust memset hack) */ - MetaButtonSpace close_rect; - MetaButtonSpace max_rect; - MetaButtonSpace min_rect; - MetaButtonSpace menu_rect; - MetaButtonSpace appmenu_rect; - MetaButtonSpace shade_rect; - MetaButtonSpace above_rect; - MetaButtonSpace stick_rect; - MetaButtonSpace unshade_rect; - MetaButtonSpace unabove_rect; - MetaButtonSpace unstick_rect; - -#define MAX_MIDDLE_BACKGROUNDS (META_BUTTON_FUNCTION_LAST - 2) - GdkRectangle left_left_background; - GdkRectangle left_middle_backgrounds[MAX_MIDDLE_BACKGROUNDS]; - GdkRectangle left_right_background; - GdkRectangle left_single_background; - GdkRectangle right_left_background; - GdkRectangle right_middle_backgrounds[MAX_MIDDLE_BACKGROUNDS]; - GdkRectangle right_right_background; - GdkRectangle right_single_background; - /* End of button rects (if changed adjust memset hack) */ - - /* Saved button layout */ - MetaButtonLayout button_layout; - int n_left_buttons; - int n_right_buttons; - - /* Round corners */ - guint top_left_corner_rounded_radius; - guint top_right_corner_rounded_radius; - guint bottom_left_corner_rounded_radius; - guint bottom_right_corner_rounded_radius; -}; MetaTheme* meta_theme_get_current (void); void meta_theme_set_current (const char *name, |