summaryrefslogtreecommitdiff
path: root/src/tests/ecore_cxx
diff options
context:
space:
mode:
authorYeongjong Lee <yj34.lee@samsung.com>2019-12-09 13:45:56 -0300
committerLauro Moura <lauromoura@expertisesolutions.com.br>2019-12-09 13:56:19 -0300
commit06c2bbf798ca318efe23baec8e6454f8c5b177f4 (patch)
treef1bf886d17cd7e13d3f76908e06ec41d80b04f93 /src/tests/ecore_cxx
parent5448c43bab7d054dde57dcc50e9d7239ff891729 (diff)
eolian_mono: reduce duplicated code in OnXXXEventHEADmaster
Summary: `CallNativeEventCallback` is used to reduce duplicated code. E.g. Before ``` protected virtual void OnFullscreenChangedEvent(Efl.Ui.WinFullscreenChangedEventArgs e) { var key = "_EFL_UI_WIN_EVENT_FULLSCREEN_CHANGED"; IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Elementary, key); if (desc == IntPtr.Zero) { Eina.Log.Error($"Failed to get native event {key}"); return; } IntPtr info = Eina.PrimitiveConversion.ManagedToPointerAlloc(e.arg ? (byte) 1 : (byte) 0); try { Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, info); } finally { Marshal.FreeHGlobal(info); } } ``` After ``` protected virtual void OnFullscreenChangedEvent(Efl.Ui.WinFullscreenChangedEventArgs e) { IntPtr info = Eina.PrimitiveConversion.ManagedToPointerAlloc(e.arg ? (byte) 1 : (byte) 0); CallNativeEventCallback("elementary", "_EFL_UI_WIN_EVENT_FULLSCREEN_CHANGED", info, (p) => Marshal.FreeHGlobal(p)); } ``` Test Plan: meson setup -Dbindings=mono,cxx -Dmono-beta=true Reviewers: lauromoura Reviewed By: lauromoura Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10661
Diffstat (limited to 'src/tests/ecore_cxx')
0 files changed, 0 insertions, 0 deletions