diff options
author | Havoc Pennington <hp@pobox.com> | 2002-01-19 23:59:11 +0000 |
---|---|---|
committer | Havoc Pennington <hp@src.gnome.org> | 2002-01-19 23:59:11 +0000 |
commit | 5fdb8463def40bdfa208ecfdd4655209c35e0b2b (patch) | |
tree | d3511fd6c884150d0576b37f83f4ebdacfcdd630 /src/theme.h | |
parent | 19d2e8c7e1df6fcf12e5e5dcfe36430627eb8cc2 (diff) | |
download | metacity-5fdb8463def40bdfa208ecfdd4655209c35e0b2b.tar.gz metacity-5fdb8463def40bdfa208ecfdd4655209c35e0b2b.tar.bz2 |
cheesy client with static bit gravity, used to test the below change.
2002-01-19 Havoc Pennington <hp@pobox.com>
* src/wm-tester/test-resizing.c: cheesy client with static
bit gravity, used to test the below change.
* src/window.c (meta_window_move_resize_internal): implement
Owen's proposal for window resizing.
http://mail.gnome.org/archives/wm-spec-list/1999-November/msg00088.html
Currently you have to do METACITY_USE_STATIC_GRAVITY=1 in order to
use it, because some GDK bug is screwing up exposes on my frames
when it's enabled.
* src/display.c (meta_display_create_x_cursor): fix glyph for
NE/NW cursors
* src/frames.c (get_control): add ability to resize from top
* src/frame.c (meta_frame_get_flags): can't resize shaded windows
(meta_frame_sync_to_window): add gravity arg
* src/common.h (MetaWindowType): move here from window.h so
it can be used in themes stuff.
(MetaFrameFlags): remove META_FRAME_TRANSIENT since it
overlaps with window type and was unused.
Diffstat (limited to 'src/theme.h')
-rw-r--r-- | src/theme.h | 64 |
1 files changed, 59 insertions, 5 deletions
diff --git a/src/theme.h b/src/theme.h index 1cb73f0..099b28a 100644 --- a/src/theme.h +++ b/src/theme.h @@ -133,6 +133,14 @@ typedef enum META_TEXTURE_IMAGE } MetaTextureType; +typedef enum +{ + META_TEXTURE_DRAW_UNSCALED, + META_TEXTURE_DRAW_SCALED_VERTICALLY, + META_TEXTURE_DRAW_SCALED_HORIZONTALLY, + META_TEXTURE_DRAW_SCALED_BOTH +} MetaTextureDrawMode; + struct _MetaTextureSpec { MetaTextureType type; @@ -243,22 +251,60 @@ typedef enum struct _MetaFrameStyle { + int refcount; MetaTextureSpec *button_icons[META_BUTTON_TYPE_LAST][META_BUTTON_STATE_LAST]; MetaTextureSpec *button_backgrounds[META_BUTTON_TYPE_LAST][META_BUTTON_STATE_LAST]; MetaTextureSpec *pieces[META_FRAME_PIECE_LAST]; MetaFrameLayout *layout; }; + typedef enum { - META_TEXTURE_DRAW_UNSCALED, - META_TEXTURE_DRAW_SCALED_VERTICALLY, - META_TEXTURE_DRAW_SCALED_HORIZONTALLY, - META_TEXTURE_DRAW_SCALED_BOTH -} MetaTextureDrawMode; + /* 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_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; + +struct _MetaFrameStyleSet +{ + MetaFrameStyle *styles[META_WINDOW_TYPE_LAST][META_WINDOW_STATE_LAST]; +}; MetaFrameLayout* meta_frame_layout_new (void); void meta_frame_layout_free (MetaFrameLayout *layout); +void meta_frame_layout_get_borders (const MetaFrameLayout *layout, + GtkWidget *widget, + int text_height, + MetaFrameFlags flags, + int *top_height, + int *bottom_height, + int *left_width, + int *right_width); void meta_frame_layout_calc_geometry (const MetaFrameLayout *layout, GtkWidget *widget, int text_height, @@ -267,6 +313,7 @@ void meta_frame_layout_calc_geometry (const MetaFrameLayout *layout, int client_height, MetaFrameGeometry *fgeom); + MetaColorSpec* meta_color_spec_new (MetaColorSpecType type); void meta_color_spec_free (MetaColorSpec *spec); void meta_color_spec_render (MetaColorSpec *spec, @@ -296,4 +343,11 @@ void meta_texture_spec_draw (const MetaTextureSpec *desc, int width, int height); +MetaFrameStyle* meta_frame_style_new (void); +void meta_frame_style_ref (MetaFrameStyle *style); +void meta_frame_style_unref (MetaFrameStyle *style); + +MetaFrameStyleSet* meta_frame_style_set_new (void); +void meta_frame_style_set_free (MetaFrameStyleSet *style_set); + #endif |