~compiz-team/compiz/0.9.12

« back to all changes in this revision

Viewing changes to plugins/resize/src/gl-window-impl.h

Merge GLES support

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright © 2012 Canonical Ltd.
 
3
 *
 
4
 * Permission to use, copy, modify, distribute, and sell this software
 
5
 * and its documentation for any purpose is hereby granted without
 
6
 * fee, provided that the above copyright notice appear in all copies
 
7
 * and that both that copyright notice and this permission notice
 
8
 * appear in supporting documentation, and that the name of
 
9
 * Novell, Inc. not be used in advertising or publicity pertaining to
 
10
 * distribution of the software without specific, written prior permission.
 
11
 * Novell, Inc. makes no representations about the suitability of this
 
12
 * software for any purpose. It is provided "as is" without express or
 
13
 * implied warranty.
 
14
 *
 
15
 * NOVELL, INC. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
 
16
 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
 
17
 * NO EVENT SHALL NOVELL, INC. BE LIABLE FOR ANY SPECIAL, INDIRECT OR
 
18
 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
 
19
 * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
 
20
 * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
 
21
 * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
22
 *
 
23
 * Author: Daniel d'Andrada <daniel.dandrada@canonical.com>
 
24
 */
 
25
 
 
26
#ifndef RESIZE_GL_WINDOW_IMPL_H
 
27
#define RESIZE_GL_WINDOW_IMPL_H
 
28
 
 
29
#include "gl-window-interface.h"
 
30
 
 
31
namespace resize
 
32
{
 
33
 
 
34
class GLWindowImpl : public GLWindowInterface
 
35
{
 
36
    public:
 
37
        GLWindowImpl (GLWindow *impl)
 
38
            : mImpl (impl)
 
39
        {
 
40
        }
 
41
 
 
42
        static GLWindowImpl *wrap (GLWindow *impl)
 
43
        {
 
44
            if (impl)
 
45
                return new GLWindowImpl (impl);
 
46
            else
 
47
                return NULL;
 
48
        }
 
49
 
 
50
        virtual void glPaintSetEnabled (bool enable)
 
51
        {
 
52
            mImpl->glPaintSetEnabled (resizeWindow, enable);
 
53
        }
 
54
 
 
55
        ResizeWindow *resizeWindow;
 
56
    private:
 
57
        GLWindow *mImpl;
 
58
};
 
59
 
 
60
} /* namespace resize */
 
61
 
 
62
#endif /* RESIZE_GL_WINDOW_IMPL_H */