2 using System.Collections.Generic;
5 namespace ElmSharp.Wearable
8 /// The CircleSurface presents a surface for drawing circular feature of circle widgets
10 /// <since_tizen> preview </since_tizen>
11 public class CircleSurface
16 /// Creates and initializes a new instance of the CircleSurface class with surface on the Conformant widget.
18 /// <param name="conformant">Conformant widget to create a surface.</param>
19 /// <since_tizen> preview </since_tizen>
20 public CircleSurface(Conformant conformant)
22 _handle = Interop.Eext.eext_circle_surface_conformant_add(conformant);
26 /// Creates and initializes a new instance of the CircleSurface class with surface on the Layout widget.
28 /// <param name="layout">Layout widget to create a surface.</param>
29 /// <since_tizen> preview </since_tizen>
30 public CircleSurface(Layout layout)
32 _handle = Interop.Eext.eext_circle_surface_layout_add(layout);
36 /// Creates and initializes a new instance of the CircleSurface class with surface on the Naviframe widget.
38 /// <param name="naviframe">Naviframe widget to create a surface.</param>
39 /// <since_tizen> preview </since_tizen>
40 public CircleSurface(Naviframe naviframe)
42 _handle = Interop.Eext.eext_circle_surface_naviframe_add(naviframe);
46 /// Creates and initializes a new instance of the CircleSurface class with no surface
48 /// <since_tizen> preview </since_tizen>
49 public CircleSurface()
51 _handle = IntPtr.Zero;
55 /// Gets the handle for CircleSurface
57 /// <since_tizen> preview </since_tizen>
58 public IntPtr Handle => _handle;
61 /// Delete the given CirclrSurface
63 /// <since_tizen> preview </since_tizen>
66 if (Handle != IntPtr.Zero)
68 Interop.Eext.eext_circle_surface_del(Handle);
69 _handle = IntPtr.Zero;
73 internal static CircleSurface CreateCircleSurface(EvasObject obj)
75 if (obj is Conformant) return new CircleSurface(obj as Conformant);
76 else if (obj is Naviframe) return new CircleSurface(obj as Naviframe);
77 else if (obj is Layout) return new CircleSurface(obj as Layout);
78 else return new CircleSurface();