1 using NUnit.Framework;
2 using System.Collections.Generic;
4 namespace Tizen.NUI.Devel.Tests
6 using tlog = Tizen.Log;
9 [Description("public/Window/GLWindow.cs")]
10 internal class PublicGLWindowTest
12 private const string tag = "NUITEST";
17 tlog.Info(tag, "Init() is called!");
23 tlog.Info(tag, "Destroy() is called!");
28 [Description("Create a GLWindow object.")]
29 [Property("SPEC", "Tizen.NUI.GLWindow.GLWindow C")]
30 [Property("SPEC_URL", "-")]
31 [Property("CRITERIA", "CONSTR")]
32 [Property("COVPARAM", "")]
33 public void GLWindowConstructor()
35 tlog.Debug(tag, $"GLWindowConstructor START");
36 string name = "myGLWindow";
37 Rectangle rectangle = new Rectangle(20, 20, 100, 100);
38 GLWindow a1 = new GLWindow(name, rectangle, true);
40 GLWindow a2 = new GLWindow();
41 GLWindow a3 = new GLWindow(GLWindow.getCPtr(a1).Handle, true);
46 tlog.Debug(tag, $"GLWindowConstructor END (OK)");
47 Assert.Pass("GLWindowConstructor");
52 [Description("GLWindow WindowSize")]
53 [Property("SPEC", "Tizen.NUI.GLWindow.WindowSize A")]
54 [Property("SPEC_URL", "-")]
55 [Property("CRITERIA", "PRW")]
56 public void GLWindowWindowSize()
58 tlog.Debug(tag, $"GLWindowWindowSize START");
59 string name = "myGLWindow";
60 Rectangle rectangle = new Rectangle(20, 20, 100, 100);
61 GLWindow a1 = new GLWindow(name, rectangle, true);
63 Size2D b1 = a1.WindowSize;
68 tlog.Debug(tag, $"GLWindowWindowSize END (OK)");
69 Assert.Pass("GLWindowWindowSize");
74 [Description("GLWindow SetEglConfig")]
75 [Property("SPEC", "Tizen.NUI.GLWindow.SetEglConfig M")]
76 [Property("SPEC_URL", "-")]
77 [Property("CRITERIA", "MR")]
78 public void GLWindowSetEglConfig()
80 tlog.Debug(tag, $"GLWindowSetEglConfig START");
81 string name = "myGLWindow";
82 Rectangle rectangle = new Rectangle(20, 20, 100, 100);
83 GLWindow a1 = new GLWindow(name, rectangle, true);
85 GLWindow.GLESVersion b1 = new GLWindow.GLESVersion();
86 a1.SetEglConfig(true, true, 10, b1);
89 tlog.Debug(tag, $"GLWindowSetEglConfig END (OK)");
90 Assert.Pass("GLWindowSetEglConfig");
95 [Description("GLWindow Show")]
96 [Property("SPEC", "Tizen.NUI.GLWindow.Show M")]
97 [Property("SPEC_URL", "-")]
98 [Property("CRITERIA", "MR")]
99 public void GLWindowShow()
101 tlog.Debug(tag, $"GLWindowShow START");
102 string name = "myGLWindow";
103 Rectangle rectangle = new Rectangle(20, 20, 100, 100);
104 GLWindow a1 = new GLWindow(name, rectangle, true);
108 tlog.Debug(tag, $"GLWindowShow END (OK)");
109 Assert.Pass("GLWindowShow");
114 [Description("GLWindow Hide")]
115 [Property("SPEC", "Tizen.NUI.GLWindow.Hide M")]
116 [Property("SPEC_URL", "-")]
117 [Property("CRITERIA", "MR")]
118 public void GLWindowHide()
120 tlog.Debug(tag, $"GLWindowHide START");
121 string name = "myGLWindow";
122 Rectangle rectangle = new Rectangle(20, 20, 100, 100);
123 GLWindow a1 = new GLWindow(name, rectangle, true);
127 tlog.Debug(tag, $"GLWindowHide END (OK)");
128 Assert.Pass("GLWindowHide");
134 [Description("GLWindow Raise")]
135 [Property("SPEC", "Tizen.NUI.GLWindow.Raise M")]
136 [Property("SPEC_URL", "-")]
137 [Property("CRITERIA", "MR")]
138 public void GLWindowRaise()
140 tlog.Debug(tag, $"GLWindowRaise START");
141 string name = "myGLWindow";
142 Rectangle rectangle = new Rectangle(20, 20, 100, 100);
143 GLWindow a1 = new GLWindow(name, rectangle, true);
147 tlog.Debug(tag, $"GLWindowRaise END (OK)");
148 Assert.Pass("GLWindowRaise");
153 [Description("GLWindow Lower")]
154 [Property("SPEC", "Tizen.NUI.GLWindow.Lower M")]
155 [Property("SPEC_URL", "-")]
156 [Property("CRITERIA", "MR")]
157 public void GLWindowLower()
159 tlog.Debug(tag, $"GLWindowLower START");
160 string name = "myGLWindow";
161 Rectangle rectangle = new Rectangle(20, 20, 100, 100);
162 GLWindow a1 = new GLWindow(name, rectangle, true);
166 tlog.Debug(tag, $"GLWindowLower END (OK)");
167 Assert.Pass("GLWindowLower");
172 [Description("GLWindow Activate")]
173 [Property("SPEC", "Tizen.NUI.GLWindow.Activate M")]
174 [Property("SPEC_URL", "-")]
175 [Property("CRITERIA", "MR")]
176 public void GLWindowActivate()
178 tlog.Debug(tag, $"GLWindowActivate START");
179 string name = "myGLWindow";
180 Rectangle rectangle = new Rectangle(20, 20, 100, 100);
181 GLWindow a1 = new GLWindow(name, rectangle, true);
185 tlog.Debug(tag, $"GLWindowActivate END (OK)");
186 Assert.Pass("GLWindowActivate");
191 [Description("GLWindow WindowPositionSize")]
192 [Property("SPEC", "Tizen.NUI.GLWindow.WindowPositionSize A")]
193 [Property("SPEC_URL", "-")]
194 [Property("CRITERIA", "PRW")]
195 public void GLWindowWindowPositionSize()
197 tlog.Debug(tag, $"GLWindowWindowPositionSize START");
198 string name = "myGLWindow";
199 Rectangle rectangle = new Rectangle(20, 20, 100, 100);
200 GLWindow a1 = new GLWindow(name, rectangle, true);
202 Rectangle b1 = a1.WindowPositionSize;
203 a1.WindowPositionSize = b1;
205 tlog.Debug(tag, $"GLWindowWindowPositionSize END (OK)");
206 Assert.Pass("GLWindowWindowPositionSize");
211 [Description("GLWindow GetSupportedAuxiliaryHintCount")]
212 [Property("SPEC", "Tizen.NUI.GLWindow.GetSupportedAuxiliaryHintCount M")]
213 [Property("SPEC_URL", "-")]
214 [Property("CRITERIA", "MR")]
215 public void GLWindowGetSupportedAuxiliaryHintCount()
217 tlog.Debug(tag, $"GLWindowGetSupportedAuxiliaryHintCount START");
218 string name = "myGLWindow";
219 Rectangle rectangle = new Rectangle(20, 20, 100, 100);
220 GLWindow a1 = new GLWindow(name, rectangle, true);
222 a1.GetSupportedAuxiliaryHintCount();
224 tlog.Debug(tag, $"GLWindowGetSupportedAuxiliaryHintCount END (OK)");
225 Assert.Pass("GLWindowGetSupportedAuxiliaryHintCount");
230 [Description("GLWindow GetSupportedAuxiliaryHint")]
231 [Property("SPEC", "Tizen.NUI.GLWindow.GetSupportedAuxiliaryHint M")]
232 [Property("SPEC_URL", "-")]
233 [Property("CRITERIA", "MR")]
234 public void GLWindowGetSupportedAuxiliaryHint()
236 tlog.Debug(tag, $"GLWindowGetSupportedAuxiliaryHint START");
237 string name = "myGLWindow";
238 Rectangle rectangle = new Rectangle(20, 20, 100, 100);
239 GLWindow a1 = new GLWindow(name, rectangle, true);
241 a1.GetSupportedAuxiliaryHint(1);
243 tlog.Debug(tag, $"GLWindowGetSupportedAuxiliaryHint END (OK)");
244 Assert.Pass("GLWindowGetSupportedAuxiliaryHint");
249 [Description("GLWindow AddAuxiliaryHint")]
250 [Property("SPEC", "Tizen.NUI.GLWindow.AddAuxiliaryHint M")]
251 [Property("SPEC_URL", "-")]
252 [Property("CRITERIA", "MR")]
253 public void GLWindowAddAuxiliaryHint()
255 tlog.Debug(tag, $"GLWindowAddAuxiliaryHint START");
256 string name = "myGLWindow";
257 Rectangle rectangle = new Rectangle(20, 20, 100, 100);
258 GLWindow a1 = new GLWindow(name, rectangle, true);
260 a1.AddAuxiliaryHint("myHint", "myValue");
262 tlog.Debug(tag, $"GLWindowAddAuxiliaryHint END (OK)");
263 Assert.Pass("GLWindowAddAuxiliaryHint");
268 [Description("GLWindow RemoveAuxiliaryHint")]
269 [Property("SPEC", "Tizen.NUI.GLWindow.RemoveAuxiliaryHint M")]
270 [Property("SPEC_URL", "-")]
271 [Property("CRITERIA", "MR")]
272 public void GLWindowRemoveAuxiliaryHint()
274 tlog.Debug(tag, $"GLWindowRemoveAuxiliaryHint START");
275 string name = "myGLWindow";
276 Rectangle rectangle = new Rectangle(20, 20, 100, 100);
277 GLWindow a1 = new GLWindow(name, rectangle, true);
279 uint pos = a1.AddAuxiliaryHint("myHint", "myValue");
280 a1.RemoveAuxiliaryHint(pos);
282 tlog.Debug(tag, $"GLWindowRemoveAuxiliaryHint END (OK)");
283 Assert.Pass("GLWindowRemoveAuxiliaryHint");
288 [Description("GLWindow SetAuxiliaryHintValue")]
289 [Property("SPEC", "Tizen.NUI.GLWindow.SetAuxiliaryHintValue M")]
290 [Property("SPEC_URL", "-")]
291 [Property("CRITERIA", "MR")]
292 public void GLWindowSetAuxiliaryHintValue()
294 tlog.Debug(tag, $"GLWindowSetAuxiliaryHintValue START");
295 string name = "myGLWindow";
296 Rectangle rectangle = new Rectangle(20, 20, 100, 100);
297 GLWindow a1 = new GLWindow(name, rectangle, true);
299 uint pos = a1.AddAuxiliaryHint("myHint", "myValue");
300 a1.SetAuxiliaryHintValue(pos, "myValue");
303 tlog.Debug(tag, $"GLWindowSetAuxiliaryHintValue END (OK)");
304 Assert.Pass("GLWindowSetAuxiliaryHintValue");
309 [Description("GLWindow GetAuxiliaryHintValue")]
310 [Property("SPEC", "Tizen.NUI.GLWindow.GetAuxiliaryHintValue M")]
311 [Property("SPEC_URL", "-")]
312 [Property("CRITERIA", "MR")]
313 public void GLWindowGetAuxiliaryHintValue()
315 tlog.Debug(tag, $"GLWindowGetAuxiliaryHintValue START");
316 string name = "myGLWindow";
317 Rectangle rectangle = new Rectangle(20, 20, 100, 100);
318 GLWindow a1 = new GLWindow(name, rectangle, true);
320 uint pos = a1.AddAuxiliaryHint("myHint", "myValue");
321 a1.GetAuxiliaryHintValue(pos);
324 tlog.Debug(tag, $"GLWindowGetAuxiliaryHintValue END (OK)");
325 Assert.Pass("GLWindowGetAuxiliaryHintValue");
330 [Description("GLWindow GetAuxiliaryHintId")]
331 [Property("SPEC", "Tizen.NUI.GLWindow.GetAuxiliaryHintId M")]
332 [Property("SPEC_URL", "-")]
333 [Property("CRITERIA", "MR")]
334 public void GLWindowGetAuxiliaryHintId()
336 tlog.Debug(tag, $"GLWindowGetAuxiliaryHintId START");
337 string name = "myGLWindow";
338 Rectangle rectangle = new Rectangle(20, 20, 100, 100);
339 GLWindow a1 = new GLWindow(name, rectangle, true);
341 uint pos = a1.AddAuxiliaryHint("myHint", "myValue");
342 a1.GetAuxiliaryHintId("myHint");
344 tlog.Debug(tag, $"GLWindowGetAuxiliaryHintId END (OK)");
345 Assert.Pass("GLWindowGetAuxiliaryHintId");
350 [Description("GLWindow SetInputRegion")]
351 [Property("SPEC", "Tizen.NUI.GLWindow.SetInputRegion M")]
352 [Property("SPEC_URL", "-")]
353 [Property("CRITERIA", "MR")]
354 public void GLWindowSetInputRegion()
356 tlog.Debug(tag, $"GLWindowSetInputRegion START");
357 string name = "myGLWindow";
358 Rectangle rectangle = new Rectangle(20, 20, 100, 100);
359 GLWindow a1 = new GLWindow(name, rectangle, true);
361 a1.SetInputRegion(rectangle);
362 tlog.Debug(tag, $"GLWindowGetAuxiliaryHintId END (OK)");
363 Assert.Pass("GLWindowGetAuxiliaryHintId");
368 [Description("GLWindow SetOpaqueState")]
369 [Property("SPEC", "Tizen.NUI.GLWindow.SetOpaqueState M")]
370 [Property("SPEC_URL", "-")]
371 [Property("CRITERIA", "MR")]
372 public void GLWindowSetOpaqueState()
374 tlog.Debug(tag, $"GLWindowSetOpaqueState START");
375 string name = "myGLWindow";
376 Rectangle rectangle = new Rectangle(20, 20, 100, 100);
377 GLWindow a1 = new GLWindow(name, rectangle, true);
379 a1.SetOpaqueState(true);
380 tlog.Debug(tag, $"GLWindowSetOpaqueState END (OK)");
381 Assert.Pass("GLWindowSetOpaqueState");
386 [Description("GLWindow IsOpaqueState")]
387 [Property("SPEC", "Tizen.NUI.GLWindow.IsOpaqueState M")]
388 [Property("SPEC_URL", "-")]
389 [Property("CRITERIA", "MR")]
390 public void GLWindowIsOpaqueState()
392 tlog.Debug(tag, $"GLWindowIsOpaqueState START");
393 string name = "myGLWindow";
394 Rectangle rectangle = new Rectangle(20, 20, 100, 100);
395 GLWindow a1 = new GLWindow(name, rectangle, true);
398 tlog.Debug(tag, $"GLWindowIsOpaqueState END (OK)");
399 Assert.Pass("GLWindowIsOpaqueState");
404 [Description("GLWindow SetPreferredOrientation")]
405 [Property("SPEC", "Tizen.NUI.GLWindow.SetPreferredOrientation M")]
406 [Property("SPEC_URL", "-")]
407 [Property("CRITERIA", "MR")]
408 public void GLWindowSetPreferredOrientation()
410 tlog.Debug(tag, $"GLWindowSetPreferredOrientation START");
411 string name = "myGLWindow";
412 Rectangle rectangle = new Rectangle(20, 20, 100, 100);
413 GLWindow a1 = new GLWindow(name, rectangle, true);
415 GLWindow.GLWindowOrientation o1 = new GLWindow.GLWindowOrientation();
416 a1.SetPreferredOrientation(o1);
417 tlog.Debug(tag, $"GLWindowSetPreferredOrientation END (OK)");
418 Assert.Pass("GLWindowSetPreferredOrientation");
423 [Description("GLWindow GetCurrentOrientation")]
424 [Property("SPEC", "Tizen.NUI.GLWindow.GetCurrentOrientation M")]
425 [Property("SPEC_URL", "-")]
426 [Property("CRITERIA", "MR")]
427 public void GLWindowGetCurrentOrientation()
429 tlog.Debug(tag, $"GLWindowGetCurrentOrientation START");
430 string name = "myGLWindow";
431 Rectangle rectangle = new Rectangle(20, 20, 100, 100);
432 GLWindow a1 = new GLWindow(name, rectangle, true);
435 a1.GetCurrentOrientation();
436 tlog.Debug(tag, $"GLWindowGetCurrentOrientation END (OK)");
437 Assert.Pass("GLWindowGetCurrentOrientation");
442 [Description("GLWindow SetAvailableOrientations")]
443 [Property("SPEC", "Tizen.NUI.GLWindow.SetAvailableOrientations M")]
444 [Property("SPEC_URL", "-")]
445 [Property("CRITERIA", "MR")]
446 public void GLWindowSetAvailableOrientations()
448 tlog.Debug(tag, $"GLWindowSetAvailableOrientations START");
449 string name = "myGLWindow";
450 Rectangle rectangle = new Rectangle(20, 20, 100, 100);
451 GLWindow a1 = new GLWindow(name, rectangle, true);
453 GLWindow.GLWindowOrientation o1 = new GLWindow.GLWindowOrientation();
454 List<GLWindow.GLWindowOrientation> l1 = new List<GLWindow.GLWindowOrientation>
459 a1.SetAvailableOrientations(l1);
461 tlog.Debug(tag, $"GLWindowSetAvailableOrientations END (OK)");
462 Assert.Pass("GLWindowSetAvailableOrientations");
467 [Description("GLWindow RenderOnce")]
468 [Property("SPEC", "Tizen.NUI.GLWindow.RenderOnce M")]
469 [Property("SPEC_URL", "-")]
470 [Property("CRITERIA", "MR")]
471 public void GLWindowRenderOnce()
473 tlog.Debug(tag, $"GLWindowRenderOnce START");
474 string name = "myGLWindow";
475 Rectangle rectangle = new Rectangle(20, 20, 100, 100);
476 GLWindow a1 = new GLWindow(name, rectangle, true);
479 tlog.Debug(tag, $"GLWindowRenderOnce END (OK)");
480 Assert.Pass("GLWindowRenderOnce");
485 [Description("GLWindow RegisterGlCallback")]
486 [Property("SPEC", "Tizen.NUI.GLWindow.RegisterGlCallback M")]
487 [Property("SPEC_URL", "-")]
488 [Property("CRITERIA", "MR")]
489 public void GLWindowRegisterGlCallback()
491 tlog.Debug(tag, $"GLWindowRegisterGlCallback START");
492 string name = "myGLWindow";
493 Rectangle rectangle = new Rectangle(20, 20, 100, 100);
494 GLWindow a1 = new GLWindow(name, rectangle, true);
497 a1.RegisterGlCallback(b1, c1, d1);
498 tlog.Debug(tag, $"GLWindowRegisterGlCallback END (OK)");
499 Assert.Pass("GLWindowRegisterGlCallback");
503 public int c1() { return 0; }
508 [Description("GLWindow Destroy")]
509 [Property("SPEC", "Tizen.NUI.GLWindow.Destroy M")]
510 [Property("SPEC_URL", "-")]
511 [Property("CRITERIA", "MR")]
512 public void GLWindowDestroy()
514 tlog.Debug(tag, $"GLWindowDestroy START");
515 string name = "myGLWindow";
516 Rectangle rectangle = new Rectangle(20, 20, 100, 100);
517 GLWindow a1 = new GLWindow(name, rectangle, true);
520 tlog.Debug(tag, $"GLWindowDestroy END (OK)");
521 Assert.Pass("GLWindowDestroy");