#pragma warning disable CS1591
using System;
using System.Runtime.InteropServices;
using System.Collections.Generic;
using System.Linq;
using System.ComponentModel;
namespace Efl { namespace Ui {
///
[ScrollbarNativeInherit]
public interface Scrollbar :
Efl.Eo.IWrapper, IDisposable
{
/// Scrollbar visibility policy
/// Horizontal scrollbar
/// Vertical scrollbar
///
void GetBarMode( out Efl.Ui.ScrollbarMode hbar, out Efl.Ui.ScrollbarMode vbar);
/// Scrollbar visibility policy
/// Horizontal scrollbar
/// Vertical scrollbar
///
void SetBarMode( Efl.Ui.ScrollbarMode hbar, Efl.Ui.ScrollbarMode vbar);
/// Scrollbar size. It is calculated based on viewport size-content sizes.
/// Value between 0.0 and 1.0
/// Value between 0.0 and 1.0
///
void GetBarSize( out double width, out double height);
/// Scrollbar position. It is calculated based on current position-maximum positions.
/// Value between 0.0 and 1.0
/// Value between 0.0 and 1.0
///
void GetBarPosition( out double posx, out double posy);
/// Scrollbar position. It is calculated based on current position-maximum positions.
/// Value between 0.0 and 1.0
/// Value between 0.0 and 1.0
///
void SetBarPosition( double posx, double posy);
/// Update bar visibility.
/// The object will call this function whenever the bar need to be shown or hidden.
///
void UpdateBarVisibility();
/// Called when bar is pressed
event EventHandler BarPressEvt;
/// Called when bar is unpressed
event EventHandler BarUnpressEvt;
/// Called when bar is dragged
event EventHandler BarDragEvt;
/// Called when bar size is changed
event EventHandler BarSizeChangedEvt;
/// Called when bar position is changed
event EventHandler BarPosChangedEvt;
/// Callend when bar is shown
event EventHandler BarShowEvt;
/// Called when bar is hidden
event EventHandler BarHideEvt;
}
///Event argument wrapper for event .
public class ScrollbarBarPressEvt_Args : EventArgs {
///Actual event payload.
public Efl.Ui.ScrollbarDirection arg { get; set; }
}
///Event argument wrapper for event .
public class ScrollbarBarUnpressEvt_Args : EventArgs {
///Actual event payload.
public Efl.Ui.ScrollbarDirection arg { get; set; }
}
///Event argument wrapper for event .
public class ScrollbarBarDragEvt_Args : EventArgs {
///Actual event payload.
public Efl.Ui.ScrollbarDirection arg { get; set; }
}
///Event argument wrapper for event .
public class ScrollbarBarShowEvt_Args : EventArgs {
///Actual event payload.
public Efl.Ui.ScrollbarDirection arg { get; set; }
}
///Event argument wrapper for event .
public class ScrollbarBarHideEvt_Args : EventArgs {
///Actual event payload.
public Efl.Ui.ScrollbarDirection arg { get; set; }
}
///
sealed public class ScrollbarConcrete :
Scrollbar
{
///Pointer to the native class description.
public System.IntPtr NativeClass {
get {
if (((object)this).GetType() == typeof (ScrollbarConcrete))
return Efl.Ui.ScrollbarNativeInherit.GetEflClassStatic();
else
return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
}
}
private EventHandlerList eventHandlers = new EventHandlerList();
private System.IntPtr handle;
///Pointer to the native instance.
public System.IntPtr NativeHandle {
get { return handle; }
}
[System.Runtime.InteropServices.DllImport(efl.Libs.Efl)] internal static extern System.IntPtr
efl_ui_scrollbar_interface_get();
///Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.
public ScrollbarConcrete(System.IntPtr raw)
{
handle = raw;
register_event_proxies();
}
///Destructor.
~ScrollbarConcrete()
{
Dispose(false);
}
///Releases the underlying native instance.
void Dispose(bool disposing)
{
if (handle != System.IntPtr.Zero) {
Efl.Eo.Globals.efl_unref(handle);
handle = System.IntPtr.Zero;
}
}
///Releases the underlying native instance.
public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}
///Casts obj into an instance of this type.
public static ScrollbarConcrete static_cast(Efl.Object obj)
{
if (obj == null)
throw new System.ArgumentNullException("obj");
return new ScrollbarConcrete(obj.NativeHandle);
}
///Verifies if the given object is equal to this one.
public override bool Equals(object obj)
{
var other = obj as Efl.Object;
if (other == null)
return false;
return this.NativeHandle == other.NativeHandle;
}
///Gets the hash code for this object based on the native pointer it points to.
public override int GetHashCode()
{
return this.NativeHandle.ToInt32();
}
///Turns the native pointer into a string representation.
public override String ToString()
{
return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
}
private readonly object eventLock = new object();
private Dictionary event_cb_count = new Dictionary();
private bool add_cpp_event_handler(string lib, string key, Efl.EventCb evt_delegate) {
int event_count = 0;
if (!event_cb_count.TryGetValue(key, out event_count))
event_cb_count[key] = event_count;
if (event_count == 0) {
IntPtr desc = Efl.EventDescription.GetNative(lib, key);
if (desc == IntPtr.Zero) {
Eina.Log.Error($"Failed to get native event {key}");
return false;
}
bool result = Efl.Eo.Globals.efl_event_callback_priority_add(handle, desc, 0, evt_delegate, System.IntPtr.Zero);
if (!result) {
Eina.Log.Error($"Failed to add event proxy for event {key}");
return false;
}
Eina.Error.RaiseIfUnhandledException();
}
event_cb_count[key]++;
return true;
}
private bool remove_cpp_event_handler(string key, Efl.EventCb evt_delegate) {
int event_count = 0;
if (!event_cb_count.TryGetValue(key, out event_count))
event_cb_count[key] = event_count;
if (event_count == 1) {
IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Efl, key);
if (desc == IntPtr.Zero) {
Eina.Log.Error($"Failed to get native event {key}");
return false;
}
bool result = Efl.Eo.Globals.efl_event_callback_del(handle, desc, evt_delegate, System.IntPtr.Zero);
if (!result) {
Eina.Log.Error($"Failed to remove event proxy for event {key}");
return false;
}
Eina.Error.RaiseIfUnhandledException();
} else if (event_count == 0) {
Eina.Log.Error($"Trying to remove proxy for event {key} when there is nothing registered.");
return false;
}
event_cb_count[key]--;
return true;
}
private static object BarPressEvtKey = new object();
/// Called when bar is pressed
public event EventHandler BarPressEvt
{
add {
lock (eventLock) {
string key = "_EFL_UI_SCROLLBAR_EVENT_BAR_PRESS";
if (add_cpp_event_handler(efl.Libs.Efl, key, this.evt_BarPressEvt_delegate)) {
eventHandlers.AddHandler(BarPressEvtKey , value);
} else
Eina.Log.Error($"Error adding proxy for event {key}");
}
}
remove {
lock (eventLock) {
string key = "_EFL_UI_SCROLLBAR_EVENT_BAR_PRESS";
if (remove_cpp_event_handler(key, this.evt_BarPressEvt_delegate)) {
eventHandlers.RemoveHandler(BarPressEvtKey , value);
} else
Eina.Log.Error($"Error removing proxy for event {key}");
}
}
}
///Method to raise event BarPressEvt.
public void On_BarPressEvt(Efl.Ui.ScrollbarBarPressEvt_Args e)
{
EventHandler evt;
lock (eventLock) {
evt = (EventHandler)eventHandlers[BarPressEvtKey];
}
evt?.Invoke(this, e);
}
Efl.EventCb evt_BarPressEvt_delegate;
private void on_BarPressEvt_NativeCallback(System.IntPtr data, ref Efl.Event_StructInternal evt)
{
Efl.Ui.ScrollbarBarPressEvt_Args args = new Efl.Ui.ScrollbarBarPressEvt_Args();
args.arg = default(Efl.Ui.ScrollbarDirection);
try {
On_BarPressEvt(args);
} catch (Exception e) {
Eina.Log.Error(e.ToString());
Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
}
}
private static object BarUnpressEvtKey = new object();
/// Called when bar is unpressed
public event EventHandler BarUnpressEvt
{
add {
lock (eventLock) {
string key = "_EFL_UI_SCROLLBAR_EVENT_BAR_UNPRESS";
if (add_cpp_event_handler(efl.Libs.Efl, key, this.evt_BarUnpressEvt_delegate)) {
eventHandlers.AddHandler(BarUnpressEvtKey , value);
} else
Eina.Log.Error($"Error adding proxy for event {key}");
}
}
remove {
lock (eventLock) {
string key = "_EFL_UI_SCROLLBAR_EVENT_BAR_UNPRESS";
if (remove_cpp_event_handler(key, this.evt_BarUnpressEvt_delegate)) {
eventHandlers.RemoveHandler(BarUnpressEvtKey , value);
} else
Eina.Log.Error($"Error removing proxy for event {key}");
}
}
}
///Method to raise event BarUnpressEvt.
public void On_BarUnpressEvt(Efl.Ui.ScrollbarBarUnpressEvt_Args e)
{
EventHandler evt;
lock (eventLock) {
evt = (EventHandler)eventHandlers[BarUnpressEvtKey];
}
evt?.Invoke(this, e);
}
Efl.EventCb evt_BarUnpressEvt_delegate;
private void on_BarUnpressEvt_NativeCallback(System.IntPtr data, ref Efl.Event_StructInternal evt)
{
Efl.Ui.ScrollbarBarUnpressEvt_Args args = new Efl.Ui.ScrollbarBarUnpressEvt_Args();
args.arg = default(Efl.Ui.ScrollbarDirection);
try {
On_BarUnpressEvt(args);
} catch (Exception e) {
Eina.Log.Error(e.ToString());
Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
}
}
private static object BarDragEvtKey = new object();
/// Called when bar is dragged
public event EventHandler BarDragEvt
{
add {
lock (eventLock) {
string key = "_EFL_UI_SCROLLBAR_EVENT_BAR_DRAG";
if (add_cpp_event_handler(efl.Libs.Efl, key, this.evt_BarDragEvt_delegate)) {
eventHandlers.AddHandler(BarDragEvtKey , value);
} else
Eina.Log.Error($"Error adding proxy for event {key}");
}
}
remove {
lock (eventLock) {
string key = "_EFL_UI_SCROLLBAR_EVENT_BAR_DRAG";
if (remove_cpp_event_handler(key, this.evt_BarDragEvt_delegate)) {
eventHandlers.RemoveHandler(BarDragEvtKey , value);
} else
Eina.Log.Error($"Error removing proxy for event {key}");
}
}
}
///Method to raise event BarDragEvt.
public void On_BarDragEvt(Efl.Ui.ScrollbarBarDragEvt_Args e)
{
EventHandler evt;
lock (eventLock) {
evt = (EventHandler)eventHandlers[BarDragEvtKey];
}
evt?.Invoke(this, e);
}
Efl.EventCb evt_BarDragEvt_delegate;
private void on_BarDragEvt_NativeCallback(System.IntPtr data, ref Efl.Event_StructInternal evt)
{
Efl.Ui.ScrollbarBarDragEvt_Args args = new Efl.Ui.ScrollbarBarDragEvt_Args();
args.arg = default(Efl.Ui.ScrollbarDirection);
try {
On_BarDragEvt(args);
} catch (Exception e) {
Eina.Log.Error(e.ToString());
Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
}
}
private static object BarSizeChangedEvtKey = new object();
/// Called when bar size is changed
public event EventHandler BarSizeChangedEvt
{
add {
lock (eventLock) {
string key = "_EFL_UI_SCROLLBAR_EVENT_BAR_SIZE_CHANGED";
if (add_cpp_event_handler(efl.Libs.Efl, key, this.evt_BarSizeChangedEvt_delegate)) {
eventHandlers.AddHandler(BarSizeChangedEvtKey , value);
} else
Eina.Log.Error($"Error adding proxy for event {key}");
}
}
remove {
lock (eventLock) {
string key = "_EFL_UI_SCROLLBAR_EVENT_BAR_SIZE_CHANGED";
if (remove_cpp_event_handler(key, this.evt_BarSizeChangedEvt_delegate)) {
eventHandlers.RemoveHandler(BarSizeChangedEvtKey , value);
} else
Eina.Log.Error($"Error removing proxy for event {key}");
}
}
}
///Method to raise event BarSizeChangedEvt.
public void On_BarSizeChangedEvt(EventArgs e)
{
EventHandler evt;
lock (eventLock) {
evt = (EventHandler)eventHandlers[BarSizeChangedEvtKey];
}
evt?.Invoke(this, e);
}
Efl.EventCb evt_BarSizeChangedEvt_delegate;
private void on_BarSizeChangedEvt_NativeCallback(System.IntPtr data, ref Efl.Event_StructInternal evt)
{
EventArgs args = EventArgs.Empty;
try {
On_BarSizeChangedEvt(args);
} catch (Exception e) {
Eina.Log.Error(e.ToString());
Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
}
}
private static object BarPosChangedEvtKey = new object();
/// Called when bar position is changed
public event EventHandler BarPosChangedEvt
{
add {
lock (eventLock) {
string key = "_EFL_UI_SCROLLBAR_EVENT_BAR_POS_CHANGED";
if (add_cpp_event_handler(efl.Libs.Efl, key, this.evt_BarPosChangedEvt_delegate)) {
eventHandlers.AddHandler(BarPosChangedEvtKey , value);
} else
Eina.Log.Error($"Error adding proxy for event {key}");
}
}
remove {
lock (eventLock) {
string key = "_EFL_UI_SCROLLBAR_EVENT_BAR_POS_CHANGED";
if (remove_cpp_event_handler(key, this.evt_BarPosChangedEvt_delegate)) {
eventHandlers.RemoveHandler(BarPosChangedEvtKey , value);
} else
Eina.Log.Error($"Error removing proxy for event {key}");
}
}
}
///Method to raise event BarPosChangedEvt.
public void On_BarPosChangedEvt(EventArgs e)
{
EventHandler evt;
lock (eventLock) {
evt = (EventHandler)eventHandlers[BarPosChangedEvtKey];
}
evt?.Invoke(this, e);
}
Efl.EventCb evt_BarPosChangedEvt_delegate;
private void on_BarPosChangedEvt_NativeCallback(System.IntPtr data, ref Efl.Event_StructInternal evt)
{
EventArgs args = EventArgs.Empty;
try {
On_BarPosChangedEvt(args);
} catch (Exception e) {
Eina.Log.Error(e.ToString());
Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
}
}
private static object BarShowEvtKey = new object();
/// Callend when bar is shown
public event EventHandler BarShowEvt
{
add {
lock (eventLock) {
string key = "_EFL_UI_SCROLLBAR_EVENT_BAR_SHOW";
if (add_cpp_event_handler(efl.Libs.Efl, key, this.evt_BarShowEvt_delegate)) {
eventHandlers.AddHandler(BarShowEvtKey , value);
} else
Eina.Log.Error($"Error adding proxy for event {key}");
}
}
remove {
lock (eventLock) {
string key = "_EFL_UI_SCROLLBAR_EVENT_BAR_SHOW";
if (remove_cpp_event_handler(key, this.evt_BarShowEvt_delegate)) {
eventHandlers.RemoveHandler(BarShowEvtKey , value);
} else
Eina.Log.Error($"Error removing proxy for event {key}");
}
}
}
///Method to raise event BarShowEvt.
public void On_BarShowEvt(Efl.Ui.ScrollbarBarShowEvt_Args e)
{
EventHandler evt;
lock (eventLock) {
evt = (EventHandler)eventHandlers[BarShowEvtKey];
}
evt?.Invoke(this, e);
}
Efl.EventCb evt_BarShowEvt_delegate;
private void on_BarShowEvt_NativeCallback(System.IntPtr data, ref Efl.Event_StructInternal evt)
{
Efl.Ui.ScrollbarBarShowEvt_Args args = new Efl.Ui.ScrollbarBarShowEvt_Args();
args.arg = default(Efl.Ui.ScrollbarDirection);
try {
On_BarShowEvt(args);
} catch (Exception e) {
Eina.Log.Error(e.ToString());
Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
}
}
private static object BarHideEvtKey = new object();
/// Called when bar is hidden
public event EventHandler BarHideEvt
{
add {
lock (eventLock) {
string key = "_EFL_UI_SCROLLBAR_EVENT_BAR_HIDE";
if (add_cpp_event_handler(efl.Libs.Efl, key, this.evt_BarHideEvt_delegate)) {
eventHandlers.AddHandler(BarHideEvtKey , value);
} else
Eina.Log.Error($"Error adding proxy for event {key}");
}
}
remove {
lock (eventLock) {
string key = "_EFL_UI_SCROLLBAR_EVENT_BAR_HIDE";
if (remove_cpp_event_handler(key, this.evt_BarHideEvt_delegate)) {
eventHandlers.RemoveHandler(BarHideEvtKey , value);
} else
Eina.Log.Error($"Error removing proxy for event {key}");
}
}
}
///Method to raise event BarHideEvt.
public void On_BarHideEvt(Efl.Ui.ScrollbarBarHideEvt_Args e)
{
EventHandler evt;
lock (eventLock) {
evt = (EventHandler)eventHandlers[BarHideEvtKey];
}
evt?.Invoke(this, e);
}
Efl.EventCb evt_BarHideEvt_delegate;
private void on_BarHideEvt_NativeCallback(System.IntPtr data, ref Efl.Event_StructInternal evt)
{
Efl.Ui.ScrollbarBarHideEvt_Args args = new Efl.Ui.ScrollbarBarHideEvt_Args();
args.arg = default(Efl.Ui.ScrollbarDirection);
try {
On_BarHideEvt(args);
} catch (Exception e) {
Eina.Log.Error(e.ToString());
Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
}
}
void register_event_proxies()
{
evt_BarPressEvt_delegate = new Efl.EventCb(on_BarPressEvt_NativeCallback);
evt_BarUnpressEvt_delegate = new Efl.EventCb(on_BarUnpressEvt_NativeCallback);
evt_BarDragEvt_delegate = new Efl.EventCb(on_BarDragEvt_NativeCallback);
evt_BarSizeChangedEvt_delegate = new Efl.EventCb(on_BarSizeChangedEvt_NativeCallback);
evt_BarPosChangedEvt_delegate = new Efl.EventCb(on_BarPosChangedEvt_NativeCallback);
evt_BarShowEvt_delegate = new Efl.EventCb(on_BarShowEvt_NativeCallback);
evt_BarHideEvt_delegate = new Efl.EventCb(on_BarHideEvt_NativeCallback);
}
/// Scrollbar visibility policy
/// Horizontal scrollbar
/// Vertical scrollbar
///
public void GetBarMode( out Efl.Ui.ScrollbarMode hbar, out Efl.Ui.ScrollbarMode vbar) {
Efl.Ui.ScrollbarNativeInherit.efl_ui_scrollbar_bar_mode_get_ptr.Value.Delegate(this.NativeHandle, out hbar, out vbar);
Eina.Error.RaiseIfUnhandledException();
}
/// Scrollbar visibility policy
/// Horizontal scrollbar
/// Vertical scrollbar
///
public void SetBarMode( Efl.Ui.ScrollbarMode hbar, Efl.Ui.ScrollbarMode vbar) {
Efl.Ui.ScrollbarNativeInherit.efl_ui_scrollbar_bar_mode_set_ptr.Value.Delegate(this.NativeHandle, hbar, vbar);
Eina.Error.RaiseIfUnhandledException();
}
/// Scrollbar size. It is calculated based on viewport size-content sizes.
/// Value between 0.0 and 1.0
/// Value between 0.0 and 1.0
///
public void GetBarSize( out double width, out double height) {
Efl.Ui.ScrollbarNativeInherit.efl_ui_scrollbar_bar_size_get_ptr.Value.Delegate(this.NativeHandle, out width, out height);
Eina.Error.RaiseIfUnhandledException();
}
/// Scrollbar position. It is calculated based on current position-maximum positions.
/// Value between 0.0 and 1.0
/// Value between 0.0 and 1.0
///
public void GetBarPosition( out double posx, out double posy) {
Efl.Ui.ScrollbarNativeInherit.efl_ui_scrollbar_bar_position_get_ptr.Value.Delegate(this.NativeHandle, out posx, out posy);
Eina.Error.RaiseIfUnhandledException();
}
/// Scrollbar position. It is calculated based on current position-maximum positions.
/// Value between 0.0 and 1.0
/// Value between 0.0 and 1.0
///
public void SetBarPosition( double posx, double posy) {
Efl.Ui.ScrollbarNativeInherit.efl_ui_scrollbar_bar_position_set_ptr.Value.Delegate(this.NativeHandle, posx, posy);
Eina.Error.RaiseIfUnhandledException();
}
/// Update bar visibility.
/// The object will call this function whenever the bar need to be shown or hidden.
///
public void UpdateBarVisibility() {
Efl.Ui.ScrollbarNativeInherit.efl_ui_scrollbar_bar_visibility_update_ptr.Value.Delegate(this.NativeHandle);
Eina.Error.RaiseIfUnhandledException();
}
}
public class ScrollbarNativeInherit : Efl.Eo.NativeClass{
public static Efl.Eo.NativeModule _Module = new Efl.Eo.NativeModule(efl.Libs.Efl);
public override System.Collections.Generic.List GetEoOps(System.Type type)
{
var descs = new System.Collections.Generic.List();
if (efl_ui_scrollbar_bar_mode_get_static_delegate == null)
efl_ui_scrollbar_bar_mode_get_static_delegate = new efl_ui_scrollbar_bar_mode_get_delegate(bar_mode_get);
descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_ui_scrollbar_bar_mode_get"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_scrollbar_bar_mode_get_static_delegate)});
if (efl_ui_scrollbar_bar_mode_set_static_delegate == null)
efl_ui_scrollbar_bar_mode_set_static_delegate = new efl_ui_scrollbar_bar_mode_set_delegate(bar_mode_set);
descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_ui_scrollbar_bar_mode_set"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_scrollbar_bar_mode_set_static_delegate)});
if (efl_ui_scrollbar_bar_size_get_static_delegate == null)
efl_ui_scrollbar_bar_size_get_static_delegate = new efl_ui_scrollbar_bar_size_get_delegate(bar_size_get);
descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_ui_scrollbar_bar_size_get"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_scrollbar_bar_size_get_static_delegate)});
if (efl_ui_scrollbar_bar_position_get_static_delegate == null)
efl_ui_scrollbar_bar_position_get_static_delegate = new efl_ui_scrollbar_bar_position_get_delegate(bar_position_get);
descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_ui_scrollbar_bar_position_get"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_scrollbar_bar_position_get_static_delegate)});
if (efl_ui_scrollbar_bar_position_set_static_delegate == null)
efl_ui_scrollbar_bar_position_set_static_delegate = new efl_ui_scrollbar_bar_position_set_delegate(bar_position_set);
descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_ui_scrollbar_bar_position_set"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_scrollbar_bar_position_set_static_delegate)});
if (efl_ui_scrollbar_bar_visibility_update_static_delegate == null)
efl_ui_scrollbar_bar_visibility_update_static_delegate = new efl_ui_scrollbar_bar_visibility_update_delegate(bar_visibility_update);
descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_ui_scrollbar_bar_visibility_update"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_scrollbar_bar_visibility_update_static_delegate)});
return descs;
}
public override IntPtr GetEflClass()
{
return Efl.Ui.ScrollbarConcrete.efl_ui_scrollbar_interface_get();
}
public static IntPtr GetEflClassStatic()
{
return Efl.Ui.ScrollbarConcrete.efl_ui_scrollbar_interface_get();
}
private delegate void efl_ui_scrollbar_bar_mode_get_delegate(System.IntPtr obj, System.IntPtr pd, out Efl.Ui.ScrollbarMode hbar, out Efl.Ui.ScrollbarMode vbar);
public delegate void efl_ui_scrollbar_bar_mode_get_api_delegate(System.IntPtr obj, out Efl.Ui.ScrollbarMode hbar, out Efl.Ui.ScrollbarMode vbar);
public static Efl.Eo.FunctionWrapper efl_ui_scrollbar_bar_mode_get_ptr = new Efl.Eo.FunctionWrapper(_Module, "efl_ui_scrollbar_bar_mode_get");
private static void bar_mode_get(System.IntPtr obj, System.IntPtr pd, out Efl.Ui.ScrollbarMode hbar, out Efl.Ui.ScrollbarMode vbar)
{
Eina.Log.Debug("function efl_ui_scrollbar_bar_mode_get was called");
Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
if(wrapper != null) {
hbar = default(Efl.Ui.ScrollbarMode); vbar = default(Efl.Ui.ScrollbarMode);
try {
((Scrollbar)wrapper).GetBarMode( out hbar, out vbar);
} catch (Exception e) {
Eina.Log.Warning($"Callback error: {e.ToString()}");
Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
}
} else {
efl_ui_scrollbar_bar_mode_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), out hbar, out vbar);
}
}
private static efl_ui_scrollbar_bar_mode_get_delegate efl_ui_scrollbar_bar_mode_get_static_delegate;
private delegate void efl_ui_scrollbar_bar_mode_set_delegate(System.IntPtr obj, System.IntPtr pd, Efl.Ui.ScrollbarMode hbar, Efl.Ui.ScrollbarMode vbar);
public delegate void efl_ui_scrollbar_bar_mode_set_api_delegate(System.IntPtr obj, Efl.Ui.ScrollbarMode hbar, Efl.Ui.ScrollbarMode vbar);
public static Efl.Eo.FunctionWrapper efl_ui_scrollbar_bar_mode_set_ptr = new Efl.Eo.FunctionWrapper(_Module, "efl_ui_scrollbar_bar_mode_set");
private static void bar_mode_set(System.IntPtr obj, System.IntPtr pd, Efl.Ui.ScrollbarMode hbar, Efl.Ui.ScrollbarMode vbar)
{
Eina.Log.Debug("function efl_ui_scrollbar_bar_mode_set was called");
Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
if(wrapper != null) {
try {
((Scrollbar)wrapper).SetBarMode( hbar, vbar);
} catch (Exception e) {
Eina.Log.Warning($"Callback error: {e.ToString()}");
Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
}
} else {
efl_ui_scrollbar_bar_mode_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), hbar, vbar);
}
}
private static efl_ui_scrollbar_bar_mode_set_delegate efl_ui_scrollbar_bar_mode_set_static_delegate;
private delegate void efl_ui_scrollbar_bar_size_get_delegate(System.IntPtr obj, System.IntPtr pd, out double width, out double height);
public delegate void efl_ui_scrollbar_bar_size_get_api_delegate(System.IntPtr obj, out double width, out double height);
public static Efl.Eo.FunctionWrapper efl_ui_scrollbar_bar_size_get_ptr = new Efl.Eo.FunctionWrapper(_Module, "efl_ui_scrollbar_bar_size_get");
private static void bar_size_get(System.IntPtr obj, System.IntPtr pd, out double width, out double height)
{
Eina.Log.Debug("function efl_ui_scrollbar_bar_size_get was called");
Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
if(wrapper != null) {
width = default(double); height = default(double);
try {
((Scrollbar)wrapper).GetBarSize( out width, out height);
} catch (Exception e) {
Eina.Log.Warning($"Callback error: {e.ToString()}");
Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
}
} else {
efl_ui_scrollbar_bar_size_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), out width, out height);
}
}
private static efl_ui_scrollbar_bar_size_get_delegate efl_ui_scrollbar_bar_size_get_static_delegate;
private delegate void efl_ui_scrollbar_bar_position_get_delegate(System.IntPtr obj, System.IntPtr pd, out double posx, out double posy);
public delegate void efl_ui_scrollbar_bar_position_get_api_delegate(System.IntPtr obj, out double posx, out double posy);
public static Efl.Eo.FunctionWrapper efl_ui_scrollbar_bar_position_get_ptr = new Efl.Eo.FunctionWrapper(_Module, "efl_ui_scrollbar_bar_position_get");
private static void bar_position_get(System.IntPtr obj, System.IntPtr pd, out double posx, out double posy)
{
Eina.Log.Debug("function efl_ui_scrollbar_bar_position_get was called");
Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
if(wrapper != null) {
posx = default(double); posy = default(double);
try {
((Scrollbar)wrapper).GetBarPosition( out posx, out posy);
} catch (Exception e) {
Eina.Log.Warning($"Callback error: {e.ToString()}");
Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
}
} else {
efl_ui_scrollbar_bar_position_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), out posx, out posy);
}
}
private static efl_ui_scrollbar_bar_position_get_delegate efl_ui_scrollbar_bar_position_get_static_delegate;
private delegate void efl_ui_scrollbar_bar_position_set_delegate(System.IntPtr obj, System.IntPtr pd, double posx, double posy);
public delegate void efl_ui_scrollbar_bar_position_set_api_delegate(System.IntPtr obj, double posx, double posy);
public static Efl.Eo.FunctionWrapper efl_ui_scrollbar_bar_position_set_ptr = new Efl.Eo.FunctionWrapper(_Module, "efl_ui_scrollbar_bar_position_set");
private static void bar_position_set(System.IntPtr obj, System.IntPtr pd, double posx, double posy)
{
Eina.Log.Debug("function efl_ui_scrollbar_bar_position_set was called");
Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
if(wrapper != null) {
try {
((Scrollbar)wrapper).SetBarPosition( posx, posy);
} catch (Exception e) {
Eina.Log.Warning($"Callback error: {e.ToString()}");
Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
}
} else {
efl_ui_scrollbar_bar_position_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), posx, posy);
}
}
private static efl_ui_scrollbar_bar_position_set_delegate efl_ui_scrollbar_bar_position_set_static_delegate;
private delegate void efl_ui_scrollbar_bar_visibility_update_delegate(System.IntPtr obj, System.IntPtr pd);
public delegate void efl_ui_scrollbar_bar_visibility_update_api_delegate(System.IntPtr obj);
public static Efl.Eo.FunctionWrapper efl_ui_scrollbar_bar_visibility_update_ptr = new Efl.Eo.FunctionWrapper(_Module, "efl_ui_scrollbar_bar_visibility_update");
private static void bar_visibility_update(System.IntPtr obj, System.IntPtr pd)
{
Eina.Log.Debug("function efl_ui_scrollbar_bar_visibility_update was called");
Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
if(wrapper != null) {
try {
((Scrollbar)wrapper).UpdateBarVisibility();
} catch (Exception e) {
Eina.Log.Warning($"Callback error: {e.ToString()}");
Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
}
} else {
efl_ui_scrollbar_bar_visibility_update_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
}
}
private static efl_ui_scrollbar_bar_visibility_update_delegate efl_ui_scrollbar_bar_visibility_update_static_delegate;
}
} }
namespace Efl { namespace Ui {
///
public enum ScrollbarMode
{
/// Visible if necessary
Auto = 0,
/// Always visible
On = 1,
/// Always invisible
Off = 2,
/// For internal use only
Last = 3,
}
} }
namespace Efl { namespace Ui {
///
public enum ScrollbarDirection
{
///
Horizontal = 0,
///
Vertical = 1,
///
Last = 2,
}
} }