~mc-return/compiz/compiz0.9.9.merge-plugin-startup

« back to all changes in this revision

Viewing changes to tests/xorg-gtest/communicator/compiz_xorg_gtest_communicator.h

Merged latest lp:compiz

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
* Copyright © 2013 Sam Spilsbury
 
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: Sam Spilsbury <smspillaz@gmail.com>
 
24
*/
 
25
#ifndef _COMPIZ_XORG_GTEST_COMMUNICATOR_H
 
26
#define _COMPIZ_XORG_GTEST_COMMUNICATOR_H
 
27
 
 
28
#include <memory>
 
29
#include <vector>
 
30
 
 
31
namespace compiz
 
32
{
 
33
namespace testing
 
34
{
 
35
namespace messages
 
36
{
 
37
extern const char *TEST_HELPER_READY_MSG;
 
38
extern const char *TEST_HELPER_REGISTER_CLIENT;
 
39
extern const char *TEST_HELPER_LOCK_CONFIGURE_REQUESTS;
 
40
extern const char *TEST_HELPER_CHANGE_FRAME_EXTENTS;
 
41
extern const char *TEST_HELPER_FRAME_EXTENTS_CHANGED;
 
42
extern const char *TEST_HELPER_CONFIGURE_WINDOW;
 
43
extern const char *TEST_HELPER_WINDOW_CONFIGURE_PROCESSED;
 
44
extern const char *TEST_HELPER_WINDOW_READY;
 
45
}
 
46
 
 
47
 
 
48
class MessageAtoms
 
49
{
 
50
    public:
 
51
 
 
52
        MessageAtoms (Display *);
 
53
 
 
54
        Atom FetchForString (const char *string);
 
55
 
 
56
    private:
 
57
 
 
58
        class Private;
 
59
        std::auto_ptr <Private> priv;
 
60
};
 
61
 
 
62
bool ReceiveMessage (Display *, Atom, XEvent &, int timeout = -1);
 
63
void SendClientMessage (Display *, Atom, Window, Window, const std::vector <long> &data);
 
64
}
 
65
}
 
66
 
 
67
#endif