2 using System.Collections.Generic;
5 namespace ElmSharp.Wearable
8 /// The CircleSurface presents a surface for drawing circular feature of circle widgets
10 public class CircleSurface
15 /// Creates and initializes a new instance of the CircleSurface class with surface on the Conformant widget.
17 /// <param name="conformant">Conformant widget to create a surface.</param>
18 public CircleSurface(Conformant conformant)
20 _handle = Interop.Eext.eext_circle_surface_conformant_add(conformant);
24 /// Creates and initializes a new instance of the CircleSurface class with surface on the Layout widget.
26 /// <param name="layout">Layout widget to create a surface.</param>
27 public CircleSurface(Layout layout)
29 _handle = Interop.Eext.eext_circle_surface_layout_add(layout);
33 /// Creates and initializes a new instance of the CircleSurface class with surface on the Naviframe widget.
35 /// <param name="naviframe">Naviframe widget to create a surface.</param>
36 public CircleSurface(Naviframe naviframe)
38 _handle = Interop.Eext.eext_circle_surface_naviframe_add(naviframe);
42 /// Creates and initializes a new instance of the CircleSurface class with no surface
44 public CircleSurface()
46 _handle = IntPtr.Zero;
50 /// Gets the handle for CircleSurface
52 public IntPtr Handle => _handle;
55 /// Delete the given CirclrSurface
59 if (Handle != IntPtr.Zero)
61 Interop.Eext.eext_circle_surface_del(Handle);
62 _handle = IntPtr.Zero;
66 internal static CircleSurface CreateCircleSurface(EvasObject obj)
68 if (obj is Conformant) return new CircleSurface(obj as Conformant);
69 else if (obj is Naviframe) return new CircleSurface(obj as Naviframe);
70 else if (obj is Layout) return new CircleSurface(obj as Layout);
71 else return new CircleSurface();