~ubuntu-branches/ubuntu/wily/mutter/wily

« back to all changes in this revision

Viewing changes to src/include/compositor.h

  • Committer: Bazaar Package Importer
  • Author(s): Rico Tzschichholz
  • Date: 2011-04-10 22:27:59 UTC
  • mfrom: (0.7.1 upstream) (0.3.20 experimental)
  • Revision ID: james.westby@ubuntu.com-20110410222759-o6n1i5p0unsti44n
Tags: 3.0.0-0ubuntu1
* New upstream release

* Merge with debian experimental (LP: #742458), remaining changes:
  + debian/patches/03_link_gles2.patch: Link to clutter-glx-1.0
    explicitily at the end of link flags, to bring in libGLESv2 on armel.
* debian/control.in:
  + rename gir package to gir1.2-mutter-3.0
* debian/libmutter0.symbols:
  + updated
* debian/patches:
  + fix 03_link_gles2.patch 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
2
 
 
3
 
/*
4
 
 * Copyright (C) 2008 Iain Holmes
5
 
 *
6
 
 * This program is free software; you can redistribute it and/or
7
 
 * modify it under the terms of the GNU General Public License as
8
 
 * published by the Free Software Foundation; either version 2 of the
9
 
 * License, or (at your option) any later version.
10
 
 *
11
 
 * This program is distributed in the hope that it will be useful, but
12
 
 * WITHOUT ANY WARRANTY; without even the implied warranty of
13
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14
 
 * General Public License for more details.
15
 
 *
16
 
 * You should have received a copy of the GNU General Public License
17
 
 * along with this program; if not, write to the Free Software
18
 
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
19
 
 * 02111-1307, USA.
20
 
 */
21
 
 
22
 
#ifndef META_COMPOSITOR_H
23
 
#define META_COMPOSITOR_H
24
 
 
25
 
#include <glib.h>
26
 
#include <X11/Xlib.h>
27
 
 
28
 
#include "types.h"
29
 
#include "boxes.h"
30
 
#include "window.h"
31
 
#include "workspace.h"
32
 
 
33
 
/**
34
 
 * MetaCompEffect:
35
 
 * @META_COMP_EFFECT_CREATE: The window is newly created
36
 
 *   (also used for a window that was previously on a different
37
 
 *   workspace and is changed to become visible on the active
38
 
 *   workspace.)
39
 
 * @META_COMP_EFFECT_UNMINIMIZE: The window should be shown
40
 
 *   as unminimizing from its icon geometry.
41
 
 * @META_COMP_EFFECT_DESTROY: The window is being destroyed
42
 
 * @META_COMP_EFFECT_MINIMIZE: The window should be shown
43
 
 *   as minimizing to its icon geometry.
44
 
 * @META_COMP_EFFECT_NONE: No effect, the window should be
45
 
 *   shown or hidden immediately.
46
 
 *
47
 
 * Indicates the appropriate effect to show the user for
48
 
 * meta_compositor_show_window() and meta_compositor_hide_window()
49
 
 */
50
 
typedef enum
51
 
{
52
 
  META_COMP_EFFECT_CREATE,
53
 
  META_COMP_EFFECT_UNMINIMIZE,
54
 
  META_COMP_EFFECT_DESTROY,
55
 
  META_COMP_EFFECT_MINIMIZE,
56
 
  META_COMP_EFFECT_NONE
57
 
} MetaCompEffect;
58
 
 
59
 
MetaCompositor *meta_compositor_new     (MetaDisplay    *display);
60
 
void            meta_compositor_destroy (MetaCompositor *compositor);
61
 
 
62
 
void meta_compositor_manage_screen   (MetaCompositor *compositor,
63
 
                                      MetaScreen     *screen);
64
 
void meta_compositor_unmanage_screen (MetaCompositor *compositor,
65
 
                                      MetaScreen     *screen);
66
 
 
67
 
gboolean meta_compositor_process_event (MetaCompositor *compositor,
68
 
                                        XEvent         *event,
69
 
                                        MetaWindow     *window);
70
 
 
71
 
/* At a high-level, a window is not-visible or visible. When a
72
 
 * window is added (with add_window()) it is not visible.
73
 
 * show_window() indicates a transition from not-visible to
74
 
 * visible. Some of the reasons for this:
75
 
 *
76
 
 *  - Window newly created
77
 
 *  - Window is unminimized
78
 
 *  - Window is moved to the current desktop
79
 
 *  - Window was made sticky
80
 
 *
81
 
 * hide_window() indicates that the window has transitioned from
82
 
 * visible to not-visible. Some reasons include:
83
 
 *
84
 
 *  - Window was destroyed
85
 
 *  - Window is minimized
86
 
 *  - Window is moved to a different desktop
87
 
 *  - Window no longer sticky.
88
 
 *
89
 
 * Note that combinations are possible - a window might have first
90
 
 * been minimized and then moved to a different desktop. The
91
 
 * 'effect' parameter to show_window() and hide_window() is a hint
92
 
 * as to the appropriate effect to show the user and should not
93
 
 * be considered to be indicative of a state change.
94
 
 *
95
 
 * When the active workspace is changed, switch_workspace() is called
96
 
 * first, then show_window() and hide_window() are called individually
97
 
 * for each window affected, with an effect of META_COMP_EFFECT_NONE.
98
 
 * If hiding windows will affect the switch workspace animation, the
99
 
 * compositor needs to delay hiding the windows until the switch
100
 
 * workspace animation completes.
101
 
 *
102
 
 * maximize_window() and unmaximize_window() are transitions within
103
 
 * the visible state. The window is resized *before* the call, so
104
 
 * it may be necessary to readjust the display based on the old_rect
105
 
 * to start the animation.
106
 
 *
107
 
 * window_mapped() and window_unmapped() are notifications when the
108
 
 * toplevel window (frame or client window) is mapped or unmapped.
109
 
 * That is, when the result of meta_window_toplevel_is_mapped()
110
 
 * changes. The main use of this is to drop resources when a window
111
 
 * is unmapped. A window will always be mapped before show_window()
112
 
 * is called and will not be unmapped until after hide_window() is
113
 
 * called. If the live_hidden_windows preference is set, windows will
114
 
 * never be unmapped.
115
 
 */
116
 
 
117
 
void meta_compositor_add_window    (MetaCompositor *compositor,
118
 
                                    MetaWindow     *window);
119
 
void meta_compositor_remove_window (MetaCompositor *compositor,
120
 
                                    MetaWindow     *window);
121
 
 
122
 
void meta_compositor_show_window       (MetaCompositor      *compositor,
123
 
                                        MetaWindow          *window,
124
 
                                        MetaCompEffect       effect);
125
 
void meta_compositor_hide_window       (MetaCompositor      *compositor,
126
 
                                        MetaWindow          *window,
127
 
                                        MetaCompEffect       effect);
128
 
void meta_compositor_switch_workspace  (MetaCompositor      *compositor,
129
 
                                        MetaScreen          *screen,
130
 
                                        MetaWorkspace       *from,
131
 
                                        MetaWorkspace       *to,
132
 
                                        MetaMotionDirection  direction);
133
 
 
134
 
void meta_compositor_maximize_window   (MetaCompositor      *compositor,
135
 
                                        MetaWindow          *window,
136
 
                                        MetaRectangle       *old_rect,
137
 
                                        MetaRectangle       *new_rect);
138
 
void meta_compositor_unmaximize_window (MetaCompositor      *compositor,
139
 
                                        MetaWindow          *window,
140
 
                                        MetaRectangle       *old_rect,
141
 
                                        MetaRectangle       *new_rect);
142
 
 
143
 
void meta_compositor_window_mapped        (MetaCompositor *compositor,
144
 
                                           MetaWindow     *window);
145
 
void meta_compositor_window_unmapped      (MetaCompositor *compositor,
146
 
                                           MetaWindow     *window);
147
 
void meta_compositor_sync_window_geometry (MetaCompositor *compositor,
148
 
                                           MetaWindow     *window);
149
 
void meta_compositor_set_updates          (MetaCompositor *compositor,
150
 
                                           MetaWindow     *window,
151
 
                                           gboolean        updates);
152
 
 
153
 
void meta_compositor_update_workspace_geometry (MetaCompositor *compositor,
154
 
                                                MetaWorkspace  *workspace);
155
 
void meta_compositor_sync_stack                (MetaCompositor *compositor,
156
 
                                                MetaScreen     *screen,
157
 
                                                GList          *stack);
158
 
void meta_compositor_sync_screen_size          (MetaCompositor *compositor,
159
 
                                                MetaScreen     *screen,
160
 
                                                guint           width,
161
 
                                                guint           height);
162
 
 
163
 
#endif /* META_COMPOSITOR_H */