1 #pragma warning disable CS1591
3 using System.Runtime.InteropServices;
4 using System.Collections.Generic;
6 using System.ComponentModel;
7 namespace Efl { namespace Ui { namespace Focus {
8 /// <summary>This defines the inheriting widget as Composition widget.
9 /// A composition widget is a widget that's the logical parent of another set of widgets which can be used for interaction.</summary>
10 [CompositionNativeInherit]
11 public interface Composition :
12 Efl.Eo.IWrapper, IDisposable
14 /// <summary>Set the order of elements that will be used for composition
15 /// Elements of the list can be either an Efl.Ui.Widget, an Efl.Ui.Focus.Object or an Efl.Gfx.
17 /// If the element is an Efl.Gfx.Entity, then the geometry is used as focus geometry, the focus property is redirected to the evas focus property. The mixin will take care of registration.
19 /// If the element is an Efl.Ui.Focus.Object, then the mixin will take care of registering the element.
21 /// If the element is a Efl.Ui.Widget nothing is done and the widget is simply part of the order.</summary>
22 /// <returns>The order to use</returns>
23 Eina.List<Efl.Gfx.Entity> GetCompositionElements();
24 /// <summary>Set the order of elements that will be used for composition
25 /// Elements of the list can be either an Efl.Ui.Widget, an Efl.Ui.Focus.Object or an Efl.Gfx.
27 /// If the element is an Efl.Gfx.Entity, then the geometry is used as focus geometry, the focus property is redirected to the evas focus property. The mixin will take care of registration.
29 /// If the element is an Efl.Ui.Focus.Object, then the mixin will take care of registering the element.
31 /// If the element is a Efl.Ui.Widget nothing is done and the widget is simply part of the order.</summary>
32 /// <param name="logical_order">The order to use</param>
33 /// <returns></returns>
34 void SetCompositionElements( Eina.List<Efl.Gfx.Entity> logical_order);
35 /// <summary>Set to true if all children should be registered as logicals</summary>
36 /// <returns><c>true</c> or <c>false</c></returns>
37 bool GetLogicalMode();
38 /// <summary>Set to true if all children should be registered as logicals</summary>
39 /// <param name="logical_mode"><c>true</c> or <c>false</c></param>
40 /// <returns></returns>
41 void SetLogicalMode( bool logical_mode);
42 /// <summary>Mark this widget as dirty, the children can be considered to be changed after that call</summary>
43 /// <returns></returns>
45 /// <summary>A call to prepare the children of this element, called if marked as dirty
46 /// You can use this function to call composition_elements.</summary>
47 /// <returns></returns>
49 /// <summary>Set the order of elements that will be used for composition
50 /// Elements of the list can be either an Efl.Ui.Widget, an Efl.Ui.Focus.Object or an Efl.Gfx.
52 /// If the element is an Efl.Gfx.Entity, then the geometry is used as focus geometry, the focus property is redirected to the evas focus property. The mixin will take care of registration.
54 /// If the element is an Efl.Ui.Focus.Object, then the mixin will take care of registering the element.
56 /// If the element is a Efl.Ui.Widget nothing is done and the widget is simply part of the order.</summary>
57 /// <value>The order to use</value>
58 Eina.List<Efl.Gfx.Entity> CompositionElements {
62 /// <summary>Set to true if all children should be registered as logicals</summary>
63 /// <value><c>true</c> or <c>false</c></value>
69 /// <summary>This defines the inheriting widget as Composition widget.
70 /// A composition widget is a widget that's the logical parent of another set of widgets which can be used for interaction.</summary>
71 sealed public class CompositionConcrete :
76 ///<summary>Pointer to the native class description.</summary>
77 public System.IntPtr NativeClass {
79 if (((object)this).GetType() == typeof (CompositionConcrete))
80 return Efl.Ui.Focus.CompositionNativeInherit.GetEflClassStatic();
82 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
85 private System.IntPtr handle;
86 ///<summary>Pointer to the native instance.</summary>
87 public System.IntPtr NativeHandle {
88 get { return handle; }
90 [System.Runtime.InteropServices.DllImport(efl.Libs.Elementary)] internal static extern System.IntPtr
91 efl_ui_focus_composition_mixin_get();
92 ///<summary>Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.</summary>
93 public CompositionConcrete(System.IntPtr raw)
96 register_event_proxies();
98 ///<summary>Destructor.</summary>
99 ~CompositionConcrete()
103 ///<summary>Releases the underlying native instance.</summary>
104 void Dispose(bool disposing)
106 if (handle != System.IntPtr.Zero) {
107 Efl.Eo.Globals.efl_unref(handle);
108 handle = System.IntPtr.Zero;
111 ///<summary>Releases the underlying native instance.</summary>
112 public void Dispose()
115 GC.SuppressFinalize(this);
117 ///<summary>Casts obj into an instance of this type.</summary>
118 public static CompositionConcrete static_cast(Efl.Object obj)
121 throw new System.ArgumentNullException("obj");
122 return new CompositionConcrete(obj.NativeHandle);
124 ///<summary>Verifies if the given object is equal to this one.</summary>
125 public override bool Equals(object obj)
127 var other = obj as Efl.Object;
130 return this.NativeHandle == other.NativeHandle;
132 ///<summary>Gets the hash code for this object based on the native pointer it points to.</summary>
133 public override int GetHashCode()
135 return this.NativeHandle.ToInt32();
137 ///<summary>Turns the native pointer into a string representation.</summary>
138 public override String ToString()
140 return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
142 void register_event_proxies()
145 /// <summary>Set the order of elements that will be used for composition
146 /// Elements of the list can be either an Efl.Ui.Widget, an Efl.Ui.Focus.Object or an Efl.Gfx.
148 /// If the element is an Efl.Gfx.Entity, then the geometry is used as focus geometry, the focus property is redirected to the evas focus property. The mixin will take care of registration.
150 /// If the element is an Efl.Ui.Focus.Object, then the mixin will take care of registering the element.
152 /// If the element is a Efl.Ui.Widget nothing is done and the widget is simply part of the order.</summary>
153 /// <returns>The order to use</returns>
154 public Eina.List<Efl.Gfx.Entity> GetCompositionElements() {
155 var _ret_var = Efl.Ui.Focus.CompositionNativeInherit.efl_ui_focus_composition_elements_get_ptr.Value.Delegate(this.NativeHandle);
156 Eina.Error.RaiseIfUnhandledException();
157 return new Eina.List<Efl.Gfx.Entity>(_ret_var, true, false);
159 /// <summary>Set the order of elements that will be used for composition
160 /// Elements of the list can be either an Efl.Ui.Widget, an Efl.Ui.Focus.Object or an Efl.Gfx.
162 /// If the element is an Efl.Gfx.Entity, then the geometry is used as focus geometry, the focus property is redirected to the evas focus property. The mixin will take care of registration.
164 /// If the element is an Efl.Ui.Focus.Object, then the mixin will take care of registering the element.
166 /// If the element is a Efl.Ui.Widget nothing is done and the widget is simply part of the order.</summary>
167 /// <param name="logical_order">The order to use</param>
168 /// <returns></returns>
169 public void SetCompositionElements( Eina.List<Efl.Gfx.Entity> logical_order) {
170 var _in_logical_order = logical_order.Handle;
171 logical_order.Own = false;
172 Efl.Ui.Focus.CompositionNativeInherit.efl_ui_focus_composition_elements_set_ptr.Value.Delegate(this.NativeHandle, _in_logical_order);
173 Eina.Error.RaiseIfUnhandledException();
175 /// <summary>Set to true if all children should be registered as logicals</summary>
176 /// <returns><c>true</c> or <c>false</c></returns>
177 public bool GetLogicalMode() {
178 var _ret_var = Efl.Ui.Focus.CompositionNativeInherit.efl_ui_focus_composition_logical_mode_get_ptr.Value.Delegate(this.NativeHandle);
179 Eina.Error.RaiseIfUnhandledException();
182 /// <summary>Set to true if all children should be registered as logicals</summary>
183 /// <param name="logical_mode"><c>true</c> or <c>false</c></param>
184 /// <returns></returns>
185 public void SetLogicalMode( bool logical_mode) {
186 Efl.Ui.Focus.CompositionNativeInherit.efl_ui_focus_composition_logical_mode_set_ptr.Value.Delegate(this.NativeHandle, logical_mode);
187 Eina.Error.RaiseIfUnhandledException();
189 /// <summary>Mark this widget as dirty, the children can be considered to be changed after that call</summary>
190 /// <returns></returns>
191 public void Dirty() {
192 Efl.Ui.Focus.CompositionNativeInherit.efl_ui_focus_composition_dirty_ptr.Value.Delegate(this.NativeHandle);
193 Eina.Error.RaiseIfUnhandledException();
195 /// <summary>A call to prepare the children of this element, called if marked as dirty
196 /// You can use this function to call composition_elements.</summary>
197 /// <returns></returns>
198 public void Prepare() {
199 Efl.Ui.Focus.CompositionNativeInherit.efl_ui_focus_composition_prepare_ptr.Value.Delegate(this.NativeHandle);
200 Eina.Error.RaiseIfUnhandledException();
202 /// <summary>Set the order of elements that will be used for composition
203 /// Elements of the list can be either an Efl.Ui.Widget, an Efl.Ui.Focus.Object or an Efl.Gfx.
205 /// If the element is an Efl.Gfx.Entity, then the geometry is used as focus geometry, the focus property is redirected to the evas focus property. The mixin will take care of registration.
207 /// If the element is an Efl.Ui.Focus.Object, then the mixin will take care of registering the element.
209 /// If the element is a Efl.Ui.Widget nothing is done and the widget is simply part of the order.</summary>
210 /// <value>The order to use</value>
211 public Eina.List<Efl.Gfx.Entity> CompositionElements {
212 get { return GetCompositionElements(); }
213 set { SetCompositionElements( value); }
215 /// <summary>Set to true if all children should be registered as logicals</summary>
216 /// <value><c>true</c> or <c>false</c></value>
217 public bool LogicalMode {
218 get { return GetLogicalMode(); }
219 set { SetLogicalMode( value); }
222 public class CompositionNativeInherit : Efl.Eo.NativeClass{
223 public static Efl.Eo.NativeModule _Module = new Efl.Eo.NativeModule(efl.Libs.Elementary);
224 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
226 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
227 if (efl_ui_focus_composition_elements_get_static_delegate == null)
228 efl_ui_focus_composition_elements_get_static_delegate = new efl_ui_focus_composition_elements_get_delegate(composition_elements_get);
229 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_ui_focus_composition_elements_get"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_focus_composition_elements_get_static_delegate)});
230 if (efl_ui_focus_composition_elements_set_static_delegate == null)
231 efl_ui_focus_composition_elements_set_static_delegate = new efl_ui_focus_composition_elements_set_delegate(composition_elements_set);
232 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_ui_focus_composition_elements_set"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_focus_composition_elements_set_static_delegate)});
233 if (efl_ui_focus_composition_logical_mode_get_static_delegate == null)
234 efl_ui_focus_composition_logical_mode_get_static_delegate = new efl_ui_focus_composition_logical_mode_get_delegate(logical_mode_get);
235 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_ui_focus_composition_logical_mode_get"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_focus_composition_logical_mode_get_static_delegate)});
236 if (efl_ui_focus_composition_logical_mode_set_static_delegate == null)
237 efl_ui_focus_composition_logical_mode_set_static_delegate = new efl_ui_focus_composition_logical_mode_set_delegate(logical_mode_set);
238 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_ui_focus_composition_logical_mode_set"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_focus_composition_logical_mode_set_static_delegate)});
239 if (efl_ui_focus_composition_dirty_static_delegate == null)
240 efl_ui_focus_composition_dirty_static_delegate = new efl_ui_focus_composition_dirty_delegate(dirty);
241 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_ui_focus_composition_dirty"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_focus_composition_dirty_static_delegate)});
242 if (efl_ui_focus_composition_prepare_static_delegate == null)
243 efl_ui_focus_composition_prepare_static_delegate = new efl_ui_focus_composition_prepare_delegate(prepare);
244 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_ui_focus_composition_prepare"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_focus_composition_prepare_static_delegate)});
247 public override IntPtr GetEflClass()
249 return Efl.Ui.Focus.CompositionConcrete.efl_ui_focus_composition_mixin_get();
251 public static IntPtr GetEflClassStatic()
253 return Efl.Ui.Focus.CompositionConcrete.efl_ui_focus_composition_mixin_get();
257 private delegate System.IntPtr efl_ui_focus_composition_elements_get_delegate(System.IntPtr obj, System.IntPtr pd);
260 public delegate System.IntPtr efl_ui_focus_composition_elements_get_api_delegate(System.IntPtr obj);
261 public static Efl.Eo.FunctionWrapper<efl_ui_focus_composition_elements_get_api_delegate> efl_ui_focus_composition_elements_get_ptr = new Efl.Eo.FunctionWrapper<efl_ui_focus_composition_elements_get_api_delegate>(_Module, "efl_ui_focus_composition_elements_get");
262 private static System.IntPtr composition_elements_get(System.IntPtr obj, System.IntPtr pd)
264 Eina.Log.Debug("function efl_ui_focus_composition_elements_get was called");
265 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
266 if(wrapper != null) {
267 Eina.List<Efl.Gfx.Entity> _ret_var = default(Eina.List<Efl.Gfx.Entity>);
269 _ret_var = ((CompositionConcrete)wrapper).GetCompositionElements();
270 } catch (Exception e) {
271 Eina.Log.Warning($"Callback error: {e.ToString()}");
272 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
274 _ret_var.Own = false; return _ret_var.Handle;
276 return efl_ui_focus_composition_elements_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
279 private static efl_ui_focus_composition_elements_get_delegate efl_ui_focus_composition_elements_get_static_delegate;
282 private delegate void efl_ui_focus_composition_elements_set_delegate(System.IntPtr obj, System.IntPtr pd, System.IntPtr logical_order);
285 public delegate void efl_ui_focus_composition_elements_set_api_delegate(System.IntPtr obj, System.IntPtr logical_order);
286 public static Efl.Eo.FunctionWrapper<efl_ui_focus_composition_elements_set_api_delegate> efl_ui_focus_composition_elements_set_ptr = new Efl.Eo.FunctionWrapper<efl_ui_focus_composition_elements_set_api_delegate>(_Module, "efl_ui_focus_composition_elements_set");
287 private static void composition_elements_set(System.IntPtr obj, System.IntPtr pd, System.IntPtr logical_order)
289 Eina.Log.Debug("function efl_ui_focus_composition_elements_set was called");
290 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
291 if(wrapper != null) {
292 var _in_logical_order = new Eina.List<Efl.Gfx.Entity>(logical_order, true, false);
295 ((CompositionConcrete)wrapper).SetCompositionElements( _in_logical_order);
296 } catch (Exception e) {
297 Eina.Log.Warning($"Callback error: {e.ToString()}");
298 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
301 efl_ui_focus_composition_elements_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), logical_order);
304 private static efl_ui_focus_composition_elements_set_delegate efl_ui_focus_composition_elements_set_static_delegate;
307 [return: MarshalAs(UnmanagedType.U1)] private delegate bool efl_ui_focus_composition_logical_mode_get_delegate(System.IntPtr obj, System.IntPtr pd);
310 [return: MarshalAs(UnmanagedType.U1)] public delegate bool efl_ui_focus_composition_logical_mode_get_api_delegate(System.IntPtr obj);
311 public static Efl.Eo.FunctionWrapper<efl_ui_focus_composition_logical_mode_get_api_delegate> efl_ui_focus_composition_logical_mode_get_ptr = new Efl.Eo.FunctionWrapper<efl_ui_focus_composition_logical_mode_get_api_delegate>(_Module, "efl_ui_focus_composition_logical_mode_get");
312 private static bool logical_mode_get(System.IntPtr obj, System.IntPtr pd)
314 Eina.Log.Debug("function efl_ui_focus_composition_logical_mode_get was called");
315 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
316 if(wrapper != null) {
317 bool _ret_var = default(bool);
319 _ret_var = ((CompositionConcrete)wrapper).GetLogicalMode();
320 } catch (Exception e) {
321 Eina.Log.Warning($"Callback error: {e.ToString()}");
322 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
326 return efl_ui_focus_composition_logical_mode_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
329 private static efl_ui_focus_composition_logical_mode_get_delegate efl_ui_focus_composition_logical_mode_get_static_delegate;
332 private delegate void efl_ui_focus_composition_logical_mode_set_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.U1)] bool logical_mode);
335 public delegate void efl_ui_focus_composition_logical_mode_set_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.U1)] bool logical_mode);
336 public static Efl.Eo.FunctionWrapper<efl_ui_focus_composition_logical_mode_set_api_delegate> efl_ui_focus_composition_logical_mode_set_ptr = new Efl.Eo.FunctionWrapper<efl_ui_focus_composition_logical_mode_set_api_delegate>(_Module, "efl_ui_focus_composition_logical_mode_set");
337 private static void logical_mode_set(System.IntPtr obj, System.IntPtr pd, bool logical_mode)
339 Eina.Log.Debug("function efl_ui_focus_composition_logical_mode_set was called");
340 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
341 if(wrapper != null) {
344 ((CompositionConcrete)wrapper).SetLogicalMode( logical_mode);
345 } catch (Exception e) {
346 Eina.Log.Warning($"Callback error: {e.ToString()}");
347 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
350 efl_ui_focus_composition_logical_mode_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), logical_mode);
353 private static efl_ui_focus_composition_logical_mode_set_delegate efl_ui_focus_composition_logical_mode_set_static_delegate;
356 private delegate void efl_ui_focus_composition_dirty_delegate(System.IntPtr obj, System.IntPtr pd);
359 public delegate void efl_ui_focus_composition_dirty_api_delegate(System.IntPtr obj);
360 public static Efl.Eo.FunctionWrapper<efl_ui_focus_composition_dirty_api_delegate> efl_ui_focus_composition_dirty_ptr = new Efl.Eo.FunctionWrapper<efl_ui_focus_composition_dirty_api_delegate>(_Module, "efl_ui_focus_composition_dirty");
361 private static void dirty(System.IntPtr obj, System.IntPtr pd)
363 Eina.Log.Debug("function efl_ui_focus_composition_dirty was called");
364 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
365 if(wrapper != null) {
368 ((CompositionConcrete)wrapper).Dirty();
369 } catch (Exception e) {
370 Eina.Log.Warning($"Callback error: {e.ToString()}");
371 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
374 efl_ui_focus_composition_dirty_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
377 private static efl_ui_focus_composition_dirty_delegate efl_ui_focus_composition_dirty_static_delegate;
380 private delegate void efl_ui_focus_composition_prepare_delegate(System.IntPtr obj, System.IntPtr pd);
383 public delegate void efl_ui_focus_composition_prepare_api_delegate(System.IntPtr obj);
384 public static Efl.Eo.FunctionWrapper<efl_ui_focus_composition_prepare_api_delegate> efl_ui_focus_composition_prepare_ptr = new Efl.Eo.FunctionWrapper<efl_ui_focus_composition_prepare_api_delegate>(_Module, "efl_ui_focus_composition_prepare");
385 private static void prepare(System.IntPtr obj, System.IntPtr pd)
387 Eina.Log.Debug("function efl_ui_focus_composition_prepare was called");
388 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
389 if(wrapper != null) {
392 ((CompositionConcrete)wrapper).Prepare();
393 } catch (Exception e) {
394 Eina.Log.Warning($"Callback error: {e.ToString()}");
395 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
398 efl_ui_focus_composition_prepare_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
401 private static efl_ui_focus_composition_prepare_delegate efl_ui_focus_composition_prepare_static_delegate;