~compiz-team/compiz-core/compiz-core.gen_gsettings_schemas

« back to all changes in this revision

Viewing changes to tests/timer/test-timer.h

  • Committer: Sam Spilsbury
  • Date: 2011-07-14 15:42:41 UTC
  • mfrom: (2753.9.20 compiz-core)
  • Revision ID: sam.spilsbury@canonical.com-20110714154241-1ix2x6z6r88pucfd
Merge lp:compiz-core and allow keys to be relocatable in gsettings

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * Copyright © 2011 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
 
 * Canonical Ltd. not be used in advertising or publicity pertaining to
10
 
 * distribution of the software without specific, written prior permission.
11
 
 * Canonical Ltd. 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
 
 * CANONICAL, LTD. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
16
 
 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
17
 
 * NO EVENT SHALL CANONICAL, LTD. 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
 
 * Authored by: Sam Spilsbury <sam.spilsbury@canonical.com>
24
 
 */
25
 
 
26
 
#ifndef _COMPIZ_TEST_TIMER_H
27
 
#define _COMPIZ_TEST_TIMER_H
28
 
 
29
 
#include <glibmm/main.h>
30
 
#include <core/timer.h>
31
 
#include <privatetimeouthandler.h>
32
 
#include <privatetimeoutsource.h>
33
 
#include <iostream>
34
 
#include <boost/bind.hpp>
35
 
 
36
 
class CompTimerTest
37
 
{
38
 
public:
39
 
 
40
 
    CompTimerTest ();
41
 
    virtual ~CompTimerTest ();
42
 
 
43
 
    Glib::RefPtr <Glib::MainContext> mc;
44
 
    Glib::RefPtr <Glib::MainLoop> ml;
45
 
    Glib::RefPtr <CompTimeoutSource> ts;
46
 
    std::list <CompTimer *> timers;
47
 
 
48
 
    virtual void precallback () = 0;
49
 
 
50
 
    int lastTimerTriggered;
51
 
};
52
 
 
53
 
class CompTimerTestCallbacks :
54
 
    public CompTimerTest
55
 
{
56
 
public:
57
 
 
58
 
    void precallback ();
59
 
    bool cb (int timernum);
60
 
};
61
 
 
62
 
class CompTimerTestDiffs :
63
 
    public CompTimerTest
64
 
{
65
 
public:
66
 
 
67
 
    void precallback ();
68
 
    bool cb (int timernum, CompTimer *t1, CompTimer *t2, CompTimer *t3);
69
 
};
70
 
 
71
 
class CompTimerTestSetValues :
72
 
    public CompTimerTest
73
 
{
74
 
public:
75
 
 
76
 
    void precallback ();
77
 
    bool cb (int timernum);
78
 
};
79
 
 
80
 
class CompTimerTestSetCalling :
81
 
    public CompTimerTest
82
 
{
83
 
public:
84
 
 
85
 
    void precallback ();
86
 
    bool cb (int timernum, CompTimer *t1, CompTimer *t2, CompTimer *t3);
87
 
};
88
 
 
89
 
#endif