1
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
3
/* Metacity window frame manager widget */
6
* Copyright (C) 2001 Havoc Pennington
8
* This program is free software; you can redistribute it and/or
9
* modify it under the terms of the GNU General Public License as
10
* published by the Free Software Foundation; either version 2 of the
11
* License, or (at your option) any later version.
13
* This program is distributed in the hope that it will be useful, but
14
* WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16
* General Public License for more details.
18
* You should have received a copy of the GNU General Public License
19
* along with this program; if not, write to the Free Software
20
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
34
META_FRAME_CONTROL_NONE,
35
META_FRAME_CONTROL_TITLE,
36
META_FRAME_CONTROL_DELETE,
37
META_FRAME_CONTROL_MENU,
38
META_FRAME_CONTROL_MINIMIZE,
39
META_FRAME_CONTROL_MAXIMIZE,
40
META_FRAME_CONTROL_UNMAXIMIZE,
41
META_FRAME_CONTROL_SHADE,
42
META_FRAME_CONTROL_UNSHADE,
43
META_FRAME_CONTROL_ABOVE,
44
META_FRAME_CONTROL_UNABOVE,
45
META_FRAME_CONTROL_STICK,
46
META_FRAME_CONTROL_UNSTICK,
47
META_FRAME_CONTROL_RESIZE_SE,
48
META_FRAME_CONTROL_RESIZE_S,
49
META_FRAME_CONTROL_RESIZE_SW,
50
META_FRAME_CONTROL_RESIZE_N,
51
META_FRAME_CONTROL_RESIZE_NE,
52
META_FRAME_CONTROL_RESIZE_NW,
53
META_FRAME_CONTROL_RESIZE_W,
54
META_FRAME_CONTROL_RESIZE_E,
55
META_FRAME_CONTROL_CLIENT_AREA
58
/* This is one widget that manages all the window frames
62
#define META_TYPE_FRAMES (meta_frames_get_type ())
63
#define META_FRAMES(obj) (GTK_CHECK_CAST ((obj), META_TYPE_FRAMES, MetaFrames))
64
#define META_FRAMES_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), META_TYPE_FRAMES, MetaFramesClass))
65
#define META_IS_FRAMES(obj) (GTK_CHECK_TYPE ((obj), META_TYPE_FRAMES))
66
#define META_IS_FRAMES_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), META_TYPE_FRAMES))
67
#define META_FRAMES_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), META_TYPE_FRAMES, MetaFramesClass))
69
typedef struct _MetaFrames MetaFrames;
70
typedef struct _MetaFramesClass MetaFramesClass;
72
typedef struct _MetaUIFrame MetaUIFrame;
79
MetaFrameStyle *cache_style;
82
char *title; /* NULL once we have a layout */
83
guint expose_delayed : 1;
84
guint shape_applied : 1;
86
/* FIXME get rid of this, it can just be in the MetaFrames struct */
87
MetaFrameControl prelit_control;
92
GtkWindow parent_instance;
94
GHashTable *text_heights;
98
guint tooltip_timeout;
99
MetaUIFrame *last_motion_frame;
101
int expose_delay_count;
103
int invalidate_cache_timeout_id;
104
GList *invalidate_frames;
108
struct _MetaFramesClass
110
GtkWindowClass parent_class;
114
GType meta_frames_get_type (void) G_GNUC_CONST;
116
MetaFrames *meta_frames_new (int screen_number);
118
void meta_frames_manage_window (MetaFrames *frames,
121
void meta_frames_unmanage_window (MetaFrames *frames,
123
void meta_frames_set_title (MetaFrames *frames,
127
void meta_frames_repaint_frame (MetaFrames *frames,
130
void meta_frames_get_geometry (MetaFrames *frames,
132
int *top_height, int *bottom_height,
133
int *left_width, int *right_width);
135
void meta_frames_reset_bg (MetaFrames *frames,
137
void meta_frames_unflicker_bg (MetaFrames *frames,
142
void meta_frames_apply_shapes (MetaFrames *frames,
144
int new_window_width,
145
int new_window_height,
146
gboolean window_has_shape);
147
void meta_frames_move_resize_frame (MetaFrames *frames,
153
void meta_frames_queue_draw (MetaFrames *frames,
156
void meta_frames_notify_menu_hide (MetaFrames *frames);
158
Window meta_frames_get_moving_frame (MetaFrames *frames);
160
void meta_frames_push_delay_exposes (MetaFrames *frames);
161
void meta_frames_pop_delay_exposes (MetaFrames *frames);