Removed GetRenderHasRendered() test from the toolkit autotest
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit / dali-toolkit-test-utils / toolkit-style-monitor.h
1 #ifndef __DALI_TOOLKIT_TOOLKIT_STYLE_MONITOR_H__
2 #define __DALI_TOOLKIT_TOOLKIT_STYLE_MONITOR_H__
3
4 /*
5  * Copyright (c) 2014 Samsung Electronics Co., Ltd.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  */
20
21 // EXTERNAL INCLUDES
22 #include <string>
23
24 // INTERNAL INCLUDES
25 #define __DALI_STYLE_MONITOR_H__
26 #include <dali/public-api/object/base-handle.h>
27 #include <dali/public-api/signals/dali-signal.h>
28 #include <dali/public-api/adaptor-framework/style-change.h>
29
30 namespace Dali
31 {
32
33 namespace Internal
34 {
35 namespace Adaptor
36 {
37 class StyleMonitor;
38 }
39 }
40
41 class StyleMonitor : public BaseHandle
42 {
43 public: // Typedefs
44   typedef Signal< void (StyleMonitor, StyleChange::Type) > StyleChangeSignalType;
45   static const std::string DEFAULT_FONT_FAMILY;
46   static const std::string DEFAULT_FONT_STYLE;
47   static const float       DEFAULT_FONT_SIZE;
48
49 public: // Creation & Destruction
50   StyleMonitor();
51   StyleMonitor(const StyleMonitor& monitor);
52   static StyleMonitor Get();
53   ~StyleMonitor();
54   static StyleMonitor DownCast( BaseHandle handle );
55
56 public: // Style Information
57   std::string GetDefaultFontFamily() const;
58   std::string GetDefaultFontStyle() const;
59   float GetDefaultFontSize() const;
60   const std::string& GetTheme() const;
61   void SetTheme(std::string themeFilePath);
62   bool LoadThemeFile( const std::string& filename, std::string& output );
63
64 public: // Signals
65   StyleChangeSignalType& StyleChangeSignal();
66   void EmitStyleChangeSignal(StyleChange::Type handle);
67
68 public: // Operators
69   StyleMonitor& operator=(const StyleMonitor& monitor);
70
71 public:
72   StyleMonitor(Internal::Adaptor::StyleMonitor* styleMonitor);
73 };
74
75
76 } // namespace Dali
77
78 namespace Test
79 {
80 namespace StyleMonitor
81 {
82 void SetThemeFileOutput( const std::string& name, const std::string& output );
83 void SetDefaultFontFamily(const std::string& family);
84 void SetDefaultFontStyle(const std::string& style);
85 void SetDefaultFontSize( float size );
86
87 }
88 }
89
90 #endif // __DALI_TOOLKIT_TOOLKIT_STYLE_MONITOR_H__