~3v1n0/unity/overlay-border-scale

« back to all changes in this revision

Viewing changes to standalone-clients/nux_test_framework.h

  • Committer: Daniel van Vugt
  • Date: 2012-03-14 06:24:18 UTC
  • mfrom: (2108 unity)
  • mto: This revision was merged to the branch mainline in revision 2146.
  • Revision ID: daniel.van.vugt@canonical.com-20120314062418-nprucpbr0m7qky5e
MergedĀ latestĀ lp:unity

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright 2010 Inalogic Inc.
 
3
 *
 
4
 * This program is free software: you can redistribute it and/or modify it
 
5
 * under the terms of the GNU General Public License version 3, as published
 
6
 * by the  Free Software Foundation.
 
7
 *
 
8
 * This program is distributed in the hope that it will be useful, but
 
9
 * WITHOUT ANY WARRANTY; without even the implied warranties of
 
10
 * MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR
 
11
 * PURPOSE.  See the GNU General Public License for more details.
 
12
 *
 
13
 * You should have received a copy of the GNU General Public License
 
14
 * version 3 along with this program.  If not, see
 
15
 * <http://www.gnu.org/licenses/>
 
16
 *
 
17
 * Authored by: Jay Taoko <jaytaoko@inalogic.com>
 
18
 *
 
19
 */
 
20
 
 
21
#include "Nux/Nux.h"
 
22
#include "Nux/VLayout.h"
 
23
#include "Nux/HLayout.h"
 
24
#include "Nux/WindowThread.h"
 
25
#include "Nux/TextEntry.h"
 
26
 
 
27
#ifndef NUXTESTFRAMEWORK_H
 
28
#define NUXTESTFRAMEWORK_H
 
29
 
 
30
class NuxTestFramework
 
31
{
 
32
public:
 
33
  NuxTestFramework(const char* program_name, int window_width, int window_height, int program_life_span);
 
34
  virtual ~NuxTestFramework();
 
35
 
 
36
  virtual void Startup();
 
37
  virtual void UserInterfaceSetup();
 
38
  virtual void Run();
 
39
 
 
40
  bool ReadyToGo();
 
41
 
 
42
  nux::WindowThread* GetWindowThread();
 
43
 
 
44
public:
 
45
  std::string program_name_;
 
46
  int program_life_span_;                  //!< The program will auto-terminate after a delay in milliseconds.
 
47
  nux::TimeOutSignal *timeout_signal_;
 
48
 
 
49
  nux::WindowThread *window_thread_;
 
50
 
 
51
  int window_width_;
 
52
  int window_height_;
 
53
 
 
54
private:
 
55
  void ProgramExitCall(void *data);
 
56
  void WaitForConfigureEvent(int x, int y, int width, int height);
 
57
  bool ready_to_go_;
 
58
};
 
59
 
 
60
#endif // NUXTESTFRAMEWORK_H
 
61