diff options
author | Havoc Pennington <hp@pobox.com> | 2002-01-27 08:21:53 +0000 |
---|---|---|
committer | Havoc Pennington <hp@src.gnome.org> | 2002-01-27 08:21:53 +0000 |
commit | b52ee424e4eb16632496c22a160dfa024ace47e2 (patch) | |
tree | 74446960efaacf21bb02481bf481860be09b1307 /src/theme.h | |
parent | 5b4e9c01cc612395e56b608ad5923c5c84523f5a (diff) | |
download | metacity-b52ee424e4eb16632496c22a160dfa024ace47e2.tar.gz metacity-b52ee424e4eb16632496c22a160dfa024ace47e2.tar.bz2 |
Only consider the bottom of the titlebar a resize control; I keep
2002-01-27 Havoc Pennington <hp@pobox.com>
* src/frames.c (get_control): Only consider the bottom of the
titlebar a resize control; I keep accidentally resizing windows
instead of activating them. Also, give south resizing priority
over north, if the window is so small the active regions overlap
* src/theme.c: add MetaTheme, get MetaFrameStyleSet into
a usable state
* src/common.h: move window type back to window.h, decided
not to use it on frame side
(MetaFrameType): add this instead
Diffstat (limited to 'src/theme.h')
-rw-r--r-- | src/theme.h | 70 |
1 files changed, 46 insertions, 24 deletions
diff --git a/src/theme.h b/src/theme.h index 176c75a..f289a01 100644 --- a/src/theme.h +++ b/src/theme.h @@ -33,6 +33,7 @@ typedef struct _MetaGradientSpec MetaGradientSpec; typedef struct _MetaColorSpec MetaColorSpec; typedef struct _MetaFrameLayout MetaFrameLayout; typedef struct _MetaFrameGeometry MetaFrameGeometry; +typedef struct _MetaTheme MetaTheme; /* Parameters used to calculate the geometry of the frame */ struct _MetaFrameLayout @@ -265,40 +266,61 @@ struct _MetaFrameStyle }; +/* FIXME dammit, these are not mutually exclusive; how to handle + * the mess... + * + * normal -> noresize / vert only / horz only / both + * focused / unfocused + * max -> focused / unfocused + * shaded -> focused / unfocused + * max/shaded -> focused / unfocused + * + * so 4 states with 8 sub-states in one, 2 sub-states in the other 3, + * meaning 14 total + * + * 14 window states times 7 or 8 window types. Except some + * window types never get a frame so that narrows it down a bit. + * + */ typedef enum { - /* FIXME dammit, these are not mutually exclusive; how to handle - * the mess... - * - * normal -> noresize / vert only / horz only / both - focused / unfocused - * max -> focused / unfocused - * shaded -> focused / unfocused - * max/shaded -> focused / unfocused - * - * so 4 states with 8 sub-states in one, 2 sub-states in the other 3, - * meaning 14 total - * - * 14 window states times 7 or 8 window types. - * - * - * MetaFrameStyleSet needs rearranging to think of it this way. - * - */ + META_WINDOW_STATE_NORMAL, META_WINDOW_STATE_MAXIMIZED, META_WINDOW_STATE_SHADED, META_WINDOW_STATE_MAXIMIZED_AND_SHADED, - META_WINDOW_STATE_RESIZE_VERTICAL, - META_WINDOW_STATE_RESIZE_HORIZONTAL, - META_WINDOW_STATE_RESIZE_BOTH, - META_WINDOW_STATE_UNFOCUSED, - META_WINDOW_STATE_FOCUSED, META_WINDOW_STATE_LAST } MetaWindowState; +typedef enum +{ + META_WINDOW_RESIZE_NONE, + META_WINDOW_RESIZE_VERTICAL, + META_WINDOW_RESIZE_HORIZONTAL, + META_WINDOW_RESIZE_BOTH, + META_WINDOW_RESIZE_LAST +} MetaWindowResize; + +typedef enum +{ + META_WINDOW_FOCUS_NO, + META_WINDOW_FOCUS_YES, + META_WINDOW_FOCUS_LAST +} MetaWindowFocus; + +/* One StyleSet per window type (for window types that get a frame) */ struct _MetaFrameStyleSet { - MetaFrameStyle *styles[META_WINDOW_TYPE_LAST][META_WINDOW_STATE_LAST]; + MetaFrameStyle *normal_styles[META_WINDOW_RESIZE_LAST][META_WINDOW_FOCUS_LAST]; + MetaFrameStyle *maximized_styles[META_WINDOW_FOCUS_LAST]; + MetaFrameStyle *shaded_styles[META_WINDOW_FOCUS_LAST]; + MetaFrameStyle *maximized_and_shaded_styles[META_WINDOW_FOCUS_LAST]; +}; + +struct _MetaTheme +{ + char *name; + char *filename; + MetaFrameStyleSet *style_sets[META_FRAME_TYPE_LAST]; }; MetaFrameLayout* meta_frame_layout_new (void); |