1 using NUnit.Framework;
3 namespace Tizen.NUI.Devel.Tests
5 using tlog = Tizen.Log;
8 [Description("public/Window/GLWindowEvent")]
9 internal class PublicGLWindowEventTest
11 private const string tag = "NUITEST";
16 tlog.Info(tag, "Init() is called!");
22 tlog.Info(tag, "Destroy() is called!");
27 [Description("GLWindow FocusChanged")]
28 [Property("SPEC", "Tizen.NUI.GLWindow.FocusChanged A")]
29 [Property("SPEC_URL", "-")]
30 [Property("CRITERIA", "PRW")]
31 public void GLWindowFocusChanged()
33 tlog.Debug(tag, $"GLWindowFocusChanged START");
34 string name = "myGLWindow";
35 Rectangle rectangle = new Rectangle(20, 20, 100, 100);
36 GLWindow a1 = new GLWindow(name, rectangle, true);
38 a1.FocusChanged += A1_FocusChanged;
39 a1.FocusChanged -= A1_FocusChanged;
41 GLWindow.FocusChangedEventArgs e1 = new GLWindow.FocusChangedEventArgs();
42 A1_FocusChanged(null, e1);
45 tlog.Debug(tag, $"GLWindowFocusChanged END (OK)");
46 Assert.Pass("GLWindowFocusChanged");
49 private void A1_FocusChanged(object sender, GLWindow.FocusChangedEventArgs e)
51 bool c1 = e.FocusGained;
59 [Description("GLWindow TouchEvent")]
60 [Property("SPEC", "Tizen.NUI.GLWindow.TouchEvent A")]
61 [Property("SPEC_URL", "-")]
62 [Property("CRITERIA", "PRW")]
63 public void GLWindowTouchEvent()
65 tlog.Debug(tag, $"GLWindowTouchEvent START");
66 string name = "myGLWindow";
67 Rectangle rectangle = new Rectangle(20, 20, 100, 100);
68 GLWindow a1 = new GLWindow(name, rectangle, true);
70 a1.TouchEvent += A1_TouchEvent;
71 a1.TouchEvent -= A1_TouchEvent;
73 GLWindow.TouchEventArgs e1 = new GLWindow.TouchEventArgs();
74 A1_TouchEvent(null, e1);
76 tlog.Debug(tag, $"GLWindowTouchEvent END (OK)");
77 Assert.Pass("GLWindowTouchEvent");
80 private void A1_TouchEvent(object sender, GLWindow.TouchEventArgs e)
90 [Description("GLWindow KeyEvent")]
91 [Property("SPEC", "Tizen.NUI.GLWindow.KeyEvent A")]
92 [Property("SPEC_URL", "-")]
93 [Property("CRITERIA", "PRW")]
94 public void GLWindowKeyEvent()
96 tlog.Debug(tag, $"GLWindowKeyEvent START");
97 string name = "myGLWindow";
98 Rectangle rectangle = new Rectangle(20, 20, 100, 100);
99 GLWindow a1 = new GLWindow(name, rectangle, true);
101 a1.KeyEvent += A1_KeyEvent;
102 a1.KeyEvent -= A1_KeyEvent;
104 GLWindow.KeyEventArgs e1 = new GLWindow.KeyEventArgs();
105 A1_KeyEvent(null, e1);
108 tlog.Debug(tag, $"GLWindowKeyEvent END (OK)");
109 Assert.Pass("GLWindowKeyEvent");
112 private void A1_KeyEvent(object sender, GLWindow.KeyEventArgs e)
121 [Description("GLWindow Resized")]
122 [Property("SPEC", "Tizen.NUI.GLWindow.Resized A")]
123 [Property("SPEC_URL", "-")]
124 [Property("CRITERIA", "PRW")]
125 public void GLWindowResized()
127 tlog.Debug(tag, $"GLWindowResized START");
128 string name = "myGLWindow";
129 Rectangle rectangle = new Rectangle(20, 20, 100, 100);
130 GLWindow a1 = new GLWindow(name, rectangle, true);
132 a1.Resized += A1_Resized;
133 a1.Resized -= A1_Resized;
135 GLWindow.ResizedEventArgs e1 = new GLWindow.ResizedEventArgs();
136 A1_Resized(null, e1);
138 tlog.Debug(tag, $"GLWindowResized END (OK)");
139 Assert.Pass("GLWindowResized");
142 private void A1_Resized(object sender, GLWindow.ResizedEventArgs e)
144 Size2D s1 = e.WindowSize;
151 [Description("GLWindow FocusChangedSignal")]
152 [Property("SPEC", "Tizen.NUI.GLWindow.FocusChangedSignal M")]
153 [Property("SPEC_URL", "-")]
154 [Property("CRITERIA", "MR")]
155 public void GLWindowFocusChangedSignal()
157 tlog.Debug(tag, $"GLWindowFocusChangedSignal START");
158 string name = "myGLWindow";
159 Rectangle rectangle = new Rectangle(20, 20, 100, 100);
160 GLWindow a1 = new GLWindow(name, rectangle, true);
162 a1.FocusChangedSignal();
165 tlog.Debug(tag, $"GLWindowFocusChangedSignal END (OK)");
166 Assert.Pass("GLWindowFocusChangedSignal");
171 [Description("GLWindow KeyEventSignal")]
172 [Property("SPEC", "Tizen.NUI.GLWindow.KeyEventSignal M")]
173 [Property("SPEC_URL", "-")]
174 [Property("CRITERIA", "MR")]
175 public void GLWindowKeyEventSignal()
177 tlog.Debug(tag, $"GLWindowKeyEventSignal START");
178 string name = "myGLWindow";
179 Rectangle rectangle = new Rectangle(20, 20, 100, 100);
180 GLWindow a1 = new GLWindow(name, rectangle, true);
185 tlog.Debug(tag, $"GLWindowKeyEventSignal END (OK)");
186 Assert.Pass("GLWindowKeyEventSignal");
191 [Description("GLWindow TouchSignal")]
192 [Property("SPEC", "Tizen.NUI.GLWindow.TouchSignal M")]
193 [Property("SPEC_URL", "-")]
194 [Property("CRITERIA", "MR")]
195 public void GLWindowTouchSignal()
197 tlog.Debug(tag, $"GLWindowTouchSignal START");
198 string name = "myGLWindow";
199 Rectangle rectangle = new Rectangle(20, 20, 100, 100);
200 GLWindow a1 = new GLWindow(name, rectangle, true);
205 tlog.Debug(tag, $"GLWindowTouchSignal END (OK)");
206 Assert.Pass("GLWindowTouchSignal");
211 [Description("GLWindow GLWindowResizedSignal")]
212 [Property("SPEC", "Tizen.NUI.GLWindow.GLWindowResizedSignal M")]
213 [Property("SPEC_URL", "-")]
214 [Property("CRITERIA", "MR")]
215 public void GLWindowGLWindowResizedSignal()
217 tlog.Debug(tag, $"GLWindowGLWindowResizedSignal START");
218 string name = "myGLWindow";
219 Rectangle rectangle = new Rectangle(20, 20, 100, 100);
220 GLWindow a1 = new GLWindow(name, rectangle, true);
222 a1.GLWindowResizedSignal();
225 tlog.Debug(tag, $"GLWindowGLWindowResizedSignal END (OK)");
226 Assert.Pass("GLWindowGLWindowResizedSignal");
231 [Description("GLWindow GLWindowDisconnectNativeSignals")]
232 [Property("SPEC", "Tizen.NUI.GLWindow.DisconnectNativeSignals M")]
233 [Property("SPEC_URL", "-")]
234 [Property("CRITERIA", "MR")]
235 public void GLWindowDisconnectNativeSignals()
237 tlog.Debug(tag, $"GLWindowDisconnectNativeSignals START");
238 string name = "myGLWindow";
239 Rectangle rectangle = new Rectangle(20, 20, 100, 100);
240 GLWindow a1 = new GLWindow(name, rectangle, true);
242 a1.DisconnectNativeSignals();
245 tlog.Debug(tag, $"GLWindowDisconnectNativeSignals END (OK)");
246 Assert.Pass("GLWindowDisconnectNativeSignals");
251 //[Description("GLWindow GLWindowVisibilityChanged")]
252 //[Property("SPEC", "Tizen.NUI.GLWindow.VisibilityChanged A")]
253 //[Property("SPEC_URL", "-")]
254 //[Property("CRITERIA", "PRW")]
255 //public void GLWindowVisibilityChanged()
257 // tlog.Debug(tag, $"GLWindowVisibilityChanged START");
258 // string name = "myGLWindow";
259 // Rectangle rectangle = new Rectangle(20, 20, 100, 100);
260 // GLWindow a1 = new GLWindow(name, rectangle, true);
262 // a1.VisibilityChanged += A1_VisibilityChanged;
263 // a1.VisibilityChanged -= A1_VisibilityChanged;
266 // tlog.Debug(tag, $"GLWindowVisibilityChanged END (OK)");
269 private void A1_VisibilityChanged(object sender, GLWindow.VisibilityChangedEventArgs e) { }
273 [Description("GLWindow GLWindowVisibiltyChangedSignalEmit")]
274 [Property("SPEC", "Tizen.NUI.GLWindow.VisibiltyChangedSignalEmit M")]
275 [Property("SPEC_URL", "-")]
276 [Property("CRITERIA", "MR")]
277 public void GLWindowVisibiltyChangedSignalEmit()
279 tlog.Debug(tag, $"GLWindowVisibiltyChangedSignalEmit START");
280 string name = "myGLWindow";
281 Rectangle rectangle = new Rectangle(20, 20, 100, 100);
282 GLWindow a1 = new GLWindow(name, rectangle, true);
284 a1.VisibiltyChangedSignalEmit(true);
287 tlog.Debug(tag, $"GLWindowVisibiltyChangedSignalEmit END (OK)");
288 Assert.Pass("GLWindowVisibiltyChangedSignalEmit");