2019-10-24 06:01:50 -07:00
|
|
|
/*
|
|
|
|
* Copyright 2019 by its authors. See AUTHORS.
|
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
2017-12-06 16:03:55 -08:00
|
|
|
#pragma warning disable 1591
|
|
|
|
|
2017-11-23 16:49:22 -08:00
|
|
|
using System;
|
|
|
|
using System.Runtime.InteropServices;
|
|
|
|
using System.Threading;
|
|
|
|
|
csharp: Change to new class API.
Summary:
As discussed in T7204:
- Eo Interfaces/mixins -> C# Interfaces with concrete class
implementations
- Eo Regular/Abstracts -> Proper C# classes
- Added some new generators and helper methods.
- Refactored the class generator, splitting into helper methods
Eo handles now are stored only in the "root" class in any given
inheritance tree (generally, Efl.Object), and accessible to each child.
Methods also are defined in a single place instead of repeatedly
generated in everyfile, reducing the size of the generated .dll from
30MB to around 4.5MB.
Mixins are generated as C# interfaces but any regular class it inherits
from is lost, as we can't have interfaces inheriting from regular
classes. This will be dealt with in a later commit.
Summary of API Changes:
- Merged Inherit/Concrete classes. (These suffixes disappear from
regular classes).
- Interface still have implementations with 'Concrete' suffix for when
they are returned from methods.
- Removed 'I' from interface names.
- Removed interfaces for regular/abstract Eo classes.
- Concrete classes for interfaces/mixins hold the event argument struct.
- Removed '_' from classes, enums, structs, etc, as indicated in C#
naming conventions.
- Namespaces are now Camel.Cased.
- Renamed IWrapper's raw_handle/raw_klass to NativeHandle/NativeClass
Also renamed the test classes as after the namespace change, the
test namespace Test can conflict with the helper Test namespace.
(And use more meaningful names than Test.Testing...)
Also Fixes T7336 by removing a deprecated example and adding
efl_loop_timer_example to build system.
Fixes T7451 by hiding the class_get DllImports and renaming the IWrapper
fields. The native handlers are used in the manual binding.
Still need to work:
- As there are still some events names clashing (e.g. Efl.Ui.Bg with "resize"
from Efl.Gfx.Entity and Efl.Gfx.Image), Events are currently declared on
the interface and implemented "namespaced" in the classes,
requiring the cast to the interface to access the event.
- The Mixin Conundrum. Mixin inheritance will be dealt in a future
commit.
Depends on D7260
Reviewers: segfaultxavi, vitor.sousa, felipealmeida, Jaehyun_Cho
Reviewed By: vitor.sousa
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Maniphest Tasks: T7451, T7336
Differential Revision: https://phab.enlightenment.org/D7262
2018-11-29 15:04:37 -08:00
|
|
|
using static Efl.UnsafeNativeMethods;
|
2017-11-23 16:49:22 -08:00
|
|
|
|
mono: fix space and brace warnings of StyleCop
Summary:
The following warning rules of StyleCop are checked.
Space rules : SA1000, SA1003, SA1008, SA1009, SA1010, SA1011
Brace rules : SA1500, SA1501, SA1502, SA1503, SA1513
Indentation is also applied.
Reviewers: lauromoura, felipealmeida, vitor.sousa, woohyun
Reviewed By: vitor.sousa
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D8485
2019-04-02 07:51:05 -07:00
|
|
|
namespace Efl
|
|
|
|
{
|
2019-01-15 23:29:56 -08:00
|
|
|
|
mono: fix space and brace warnings of StyleCop
Summary:
The following warning rules of StyleCop are checked.
Space rules : SA1000, SA1003, SA1008, SA1009, SA1010, SA1011
Brace rules : SA1500, SA1501, SA1502, SA1503, SA1513
Indentation is also applied.
Reviewers: lauromoura, felipealmeida, vitor.sousa, woohyun
Reviewed By: vitor.sousa
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D8485
2019-04-02 07:51:05 -07:00
|
|
|
static class UnsafeNativeMethods
|
|
|
|
{
|
2019-01-15 23:29:56 -08:00
|
|
|
private delegate void init_func_delegate();
|
2019-10-17 16:23:11 -07:00
|
|
|
[DllImport(efl.Libs.Ecore)] internal static extern void ecore_init();
|
|
|
|
[DllImport(efl.Libs.Ecore)] internal static extern void ecore_init_ex(int argc, IntPtr argv);
|
|
|
|
[DllImport(efl.Libs.Ecore)] internal static extern void ecore_shutdown();
|
2019-01-15 23:29:56 -08:00
|
|
|
// dotnet loads libraries from DllImport with RTLD_LOCAL. Due to the
|
|
|
|
// way evas modules are built with meson, currently they do not link directly
|
|
|
|
// with libevas, leading to symbol not found errors when trying to open them.
|
|
|
|
// The call to FunctionWrapper makes sure evas is loaded with RTLD_GLOBAL,
|
|
|
|
// allowing the symbols to remain visible for the modules until the build
|
|
|
|
// is sorted out.
|
|
|
|
private static Efl.Eo.FunctionWrapper<init_func_delegate> _evas_init;
|
2019-10-17 16:23:11 -07:00
|
|
|
[DllImport(efl.Libs.Evas)] internal static extern void evas_shutdown();
|
|
|
|
[DllImport(efl.Libs.Elementary)] internal static extern int elm_init(int argc, IntPtr argv);
|
|
|
|
[DllImport(efl.Libs.Elementary)] internal static extern void elm_shutdown();
|
|
|
|
[DllImport(efl.Libs.Elementary)] internal static extern void elm_run();
|
|
|
|
[DllImport(efl.Libs.Elementary)] internal static extern void elm_exit();
|
2019-01-15 23:29:56 -08:00
|
|
|
|
mono: fix space and brace warnings of StyleCop
Summary:
The following warning rules of StyleCop are checked.
Space rules : SA1000, SA1003, SA1008, SA1009, SA1010, SA1011
Brace rules : SA1500, SA1501, SA1502, SA1503, SA1513
Indentation is also applied.
Reviewers: lauromoura, felipealmeida, vitor.sousa, woohyun
Reviewed By: vitor.sousa
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D8485
2019-04-02 07:51:05 -07:00
|
|
|
static UnsafeNativeMethods()
|
|
|
|
{
|
2019-05-03 00:42:42 -07:00
|
|
|
_evas_init = new Efl.Eo.FunctionWrapper<init_func_delegate>(efl.Libs.Evas, "evas_init");
|
2019-01-15 23:29:56 -08:00
|
|
|
}
|
mono: fix space and brace warnings of StyleCop
Summary:
The following warning rules of StyleCop are checked.
Space rules : SA1000, SA1003, SA1008, SA1009, SA1010, SA1011
Brace rules : SA1500, SA1501, SA1502, SA1503, SA1513
Indentation is also applied.
Reviewers: lauromoura, felipealmeida, vitor.sousa, woohyun
Reviewed By: vitor.sousa
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D8485
2019-04-02 07:51:05 -07:00
|
|
|
|
2019-10-10 07:15:03 -07:00
|
|
|
internal static void evas_init()
|
2019-01-15 23:29:56 -08:00
|
|
|
{
|
|
|
|
_evas_init.Value.Delegate();
|
|
|
|
}
|
2017-11-23 16:49:22 -08:00
|
|
|
}
|
|
|
|
|
2019-10-03 23:46:29 -07:00
|
|
|
/// <summary>Wrapper around the initialization functions of all modules.
|
2019-10-13 21:01:10 -07:00
|
|
|
/// <para>Since EFL 1.23.</para>
|
2019-10-03 23:46:29 -07:00
|
|
|
/// </summary>
|
mono: fix space and brace warnings of StyleCop
Summary:
The following warning rules of StyleCop are checked.
Space rules : SA1000, SA1003, SA1008, SA1009, SA1010, SA1011
Brace rules : SA1500, SA1501, SA1502, SA1503, SA1513
Indentation is also applied.
Reviewers: lauromoura, felipealmeida, vitor.sousa, woohyun
Reviewed By: vitor.sousa
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D8485
2019-04-02 07:51:05 -07:00
|
|
|
public static class All
|
|
|
|
{
|
2019-11-20 14:07:21 -08:00
|
|
|
private static Efl.Csharp.Components initComponents = Efl.Csharp.Components.Basic;
|
2017-11-23 16:49:22 -08:00
|
|
|
|
2019-10-13 21:01:10 -07:00
|
|
|
/// <summary>
|
|
|
|
/// If the main loop was initialized.
|
|
|
|
/// <para>Since EFL 1.23.</para>
|
|
|
|
/// </summary>
|
2019-04-15 10:09:49 -07:00
|
|
|
public static bool MainLoopInitialized {
|
|
|
|
get;
|
|
|
|
private set;
|
|
|
|
}
|
|
|
|
|
2019-10-10 07:15:03 -07:00
|
|
|
internal static readonly object InitLock = new object();
|
2019-04-15 10:09:49 -07:00
|
|
|
|
2019-10-13 21:01:10 -07:00
|
|
|
/// <summary>
|
|
|
|
/// Initialize the Efl.
|
|
|
|
/// <para>Since EFL 1.23.</para>
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="components">The <see cref="Efl.Csharp.Components" /> that initialize the Efl.</param>
|
mono: fix space and brace warnings of StyleCop
Summary:
The following warning rules of StyleCop are checked.
Space rules : SA1000, SA1003, SA1008, SA1009, SA1010, SA1011
Brace rules : SA1500, SA1501, SA1502, SA1503, SA1513
Indentation is also applied.
Reviewers: lauromoura, felipealmeida, vitor.sousa, woohyun
Reviewed By: vitor.sousa
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D8485
2019-04-02 07:51:05 -07:00
|
|
|
public static void Init(Efl.Csharp.Components components = Efl.Csharp.Components.Basic)
|
|
|
|
{
|
2019-11-20 14:07:21 -08:00
|
|
|
if (components == Efl.Csharp.Components.None)
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
initComponents = components;
|
|
|
|
|
|
|
|
if ((initComponents & Efl.Csharp.Components.Basic)
|
|
|
|
== Efl.Csharp.Components.Basic)
|
|
|
|
{
|
|
|
|
Eina.Config.Init();
|
|
|
|
Efl.Eo.Config.Init();
|
|
|
|
ecore_init();
|
|
|
|
ecore_init_ex(0, IntPtr.Zero);
|
|
|
|
evas_init();
|
|
|
|
eldbus.Config.Init();
|
|
|
|
}
|
|
|
|
|
|
|
|
if ((initComponents & Efl.Csharp.Components.Ui)
|
|
|
|
== Efl.Csharp.Components.Ui)
|
mono: fix space and brace warnings of StyleCop
Summary:
The following warning rules of StyleCop are checked.
Space rules : SA1000, SA1003, SA1008, SA1009, SA1010, SA1011
Brace rules : SA1500, SA1501, SA1502, SA1503, SA1513
Indentation is also applied.
Reviewers: lauromoura, felipealmeida, vitor.sousa, woohyun
Reviewed By: vitor.sousa
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D8485
2019-04-02 07:51:05 -07:00
|
|
|
{
|
csharp: Change to new class API.
Summary:
As discussed in T7204:
- Eo Interfaces/mixins -> C# Interfaces with concrete class
implementations
- Eo Regular/Abstracts -> Proper C# classes
- Added some new generators and helper methods.
- Refactored the class generator, splitting into helper methods
Eo handles now are stored only in the "root" class in any given
inheritance tree (generally, Efl.Object), and accessible to each child.
Methods also are defined in a single place instead of repeatedly
generated in everyfile, reducing the size of the generated .dll from
30MB to around 4.5MB.
Mixins are generated as C# interfaces but any regular class it inherits
from is lost, as we can't have interfaces inheriting from regular
classes. This will be dealt with in a later commit.
Summary of API Changes:
- Merged Inherit/Concrete classes. (These suffixes disappear from
regular classes).
- Interface still have implementations with 'Concrete' suffix for when
they are returned from methods.
- Removed 'I' from interface names.
- Removed interfaces for regular/abstract Eo classes.
- Concrete classes for interfaces/mixins hold the event argument struct.
- Removed '_' from classes, enums, structs, etc, as indicated in C#
naming conventions.
- Namespaces are now Camel.Cased.
- Renamed IWrapper's raw_handle/raw_klass to NativeHandle/NativeClass
Also renamed the test classes as after the namespace change, the
test namespace Test can conflict with the helper Test namespace.
(And use more meaningful names than Test.Testing...)
Also Fixes T7336 by removing a deprecated example and adding
efl_loop_timer_example to build system.
Fixes T7451 by hiding the class_get DllImports and renaming the IWrapper
fields. The native handlers are used in the manual binding.
Still need to work:
- As there are still some events names clashing (e.g. Efl.Ui.Bg with "resize"
from Efl.Gfx.Entity and Efl.Gfx.Image), Events are currently declared on
the interface and implemented "namespaced" in the classes,
requiring the cast to the interface to access the event.
- The Mixin Conundrum. Mixin inheritance will be dealt in a future
commit.
Depends on D7260
Reviewers: segfaultxavi, vitor.sousa, felipealmeida, Jaehyun_Cho
Reviewed By: vitor.sousa
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Maniphest Tasks: T7451, T7336
Differential Revision: https://phab.enlightenment.org/D7262
2018-11-29 15:04:37 -08:00
|
|
|
Efl.Ui.Config.Init();
|
2017-11-23 16:49:22 -08:00
|
|
|
}
|
2019-04-15 10:09:49 -07:00
|
|
|
Monitor.Enter(InitLock);
|
|
|
|
MainLoopInitialized = true;
|
|
|
|
Monitor.Exit(InitLock);
|
2017-11-23 16:49:22 -08:00
|
|
|
}
|
|
|
|
|
2019-10-13 21:01:10 -07:00
|
|
|
/// <summary>Shutdowns all EFL subsystems.
|
|
|
|
/// <para>Since EFL 1.23.</para>
|
|
|
|
/// </summary>
|
mono: fix space and brace warnings of StyleCop
Summary:
The following warning rules of StyleCop are checked.
Space rules : SA1000, SA1003, SA1008, SA1009, SA1010, SA1011
Brace rules : SA1500, SA1501, SA1502, SA1503, SA1513
Indentation is also applied.
Reviewers: lauromoura, felipealmeida, vitor.sousa, woohyun
Reviewed By: vitor.sousa
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D8485
2019-04-02 07:51:05 -07:00
|
|
|
public static void Shutdown()
|
|
|
|
{
|
2017-11-23 16:49:22 -08:00
|
|
|
// Try to cleanup everything before actually shutting down.
|
2019-04-15 10:09:49 -07:00
|
|
|
Eina.Log.Debug("Calling GC before shutdown");
|
2019-05-20 16:23:53 -07:00
|
|
|
for (int i = 0; i < 3; i++)
|
|
|
|
{
|
|
|
|
System.GC.Collect();
|
|
|
|
System.GC.WaitForPendingFinalizers();
|
|
|
|
Efl.App.AppMain.Iterate();
|
|
|
|
}
|
2017-11-23 16:49:22 -08:00
|
|
|
|
2019-04-15 10:09:49 -07:00
|
|
|
Monitor.Enter(InitLock);
|
|
|
|
MainLoopInitialized = false;
|
|
|
|
Monitor.Exit(InitLock);
|
|
|
|
|
2019-11-20 14:07:21 -08:00
|
|
|
if (initComponents == Efl.Csharp.Components.None)
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
if ((initComponents & Efl.Csharp.Components.Ui)
|
|
|
|
== Efl.Csharp.Components.Ui)
|
mono: fix space and brace warnings of StyleCop
Summary:
The following warning rules of StyleCop are checked.
Space rules : SA1000, SA1003, SA1008, SA1009, SA1010, SA1011
Brace rules : SA1500, SA1501, SA1502, SA1503, SA1513
Indentation is also applied.
Reviewers: lauromoura, felipealmeida, vitor.sousa, woohyun
Reviewed By: vitor.sousa
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D8485
2019-04-02 07:51:05 -07:00
|
|
|
{
|
2019-04-15 10:09:49 -07:00
|
|
|
Eina.Log.Debug("Shutting down Elementary");
|
csharp: Change to new class API.
Summary:
As discussed in T7204:
- Eo Interfaces/mixins -> C# Interfaces with concrete class
implementations
- Eo Regular/Abstracts -> Proper C# classes
- Added some new generators and helper methods.
- Refactored the class generator, splitting into helper methods
Eo handles now are stored only in the "root" class in any given
inheritance tree (generally, Efl.Object), and accessible to each child.
Methods also are defined in a single place instead of repeatedly
generated in everyfile, reducing the size of the generated .dll from
30MB to around 4.5MB.
Mixins are generated as C# interfaces but any regular class it inherits
from is lost, as we can't have interfaces inheriting from regular
classes. This will be dealt with in a later commit.
Summary of API Changes:
- Merged Inherit/Concrete classes. (These suffixes disappear from
regular classes).
- Interface still have implementations with 'Concrete' suffix for when
they are returned from methods.
- Removed 'I' from interface names.
- Removed interfaces for regular/abstract Eo classes.
- Concrete classes for interfaces/mixins hold the event argument struct.
- Removed '_' from classes, enums, structs, etc, as indicated in C#
naming conventions.
- Namespaces are now Camel.Cased.
- Renamed IWrapper's raw_handle/raw_klass to NativeHandle/NativeClass
Also renamed the test classes as after the namespace change, the
test namespace Test can conflict with the helper Test namespace.
(And use more meaningful names than Test.Testing...)
Also Fixes T7336 by removing a deprecated example and adding
efl_loop_timer_example to build system.
Fixes T7451 by hiding the class_get DllImports and renaming the IWrapper
fields. The native handlers are used in the manual binding.
Still need to work:
- As there are still some events names clashing (e.g. Efl.Ui.Bg with "resize"
from Efl.Gfx.Entity and Efl.Gfx.Image), Events are currently declared on
the interface and implemented "namespaced" in the classes,
requiring the cast to the interface to access the event.
- The Mixin Conundrum. Mixin inheritance will be dealt in a future
commit.
Depends on D7260
Reviewers: segfaultxavi, vitor.sousa, felipealmeida, Jaehyun_Cho
Reviewed By: vitor.sousa
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Maniphest Tasks: T7451, T7336
Differential Revision: https://phab.enlightenment.org/D7262
2018-11-29 15:04:37 -08:00
|
|
|
Efl.Ui.Config.Shutdown();
|
mono: fix space and brace warnings of StyleCop
Summary:
The following warning rules of StyleCop are checked.
Space rules : SA1000, SA1003, SA1008, SA1009, SA1010, SA1011
Brace rules : SA1500, SA1501, SA1502, SA1503, SA1513
Indentation is also applied.
Reviewers: lauromoura, felipealmeida, vitor.sousa, woohyun
Reviewed By: vitor.sousa
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D8485
2019-04-02 07:51:05 -07:00
|
|
|
}
|
|
|
|
|
2019-11-20 14:07:21 -08:00
|
|
|
if ((initComponents & Efl.Csharp.Components.Basic)
|
|
|
|
== Efl.Csharp.Components.Basic)
|
|
|
|
{
|
|
|
|
Eina.Log.Debug("Shutting down Eldbus");
|
|
|
|
eldbus.Config.Shutdown();
|
|
|
|
Eina.Log.Debug("Shutting down Evas");
|
|
|
|
evas_shutdown();
|
|
|
|
Eina.Log.Debug("Shutting down Ecore");
|
|
|
|
ecore_shutdown();
|
|
|
|
Eina.Log.Debug("Shutting down Eo");
|
|
|
|
Efl.Eo.Config.Shutdown();
|
|
|
|
Eina.Log.Debug("Shutting down Eina");
|
|
|
|
Eina.Config.Shutdown();
|
|
|
|
}
|
2017-11-23 16:49:22 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Placeholder. Will move to elm_config.cs later
|
mono: fix space and brace warnings of StyleCop
Summary:
The following warning rules of StyleCop are checked.
Space rules : SA1000, SA1003, SA1008, SA1009, SA1010, SA1011
Brace rules : SA1500, SA1501, SA1502, SA1503, SA1513
Indentation is also applied.
Reviewers: lauromoura, felipealmeida, vitor.sousa, woohyun
Reviewed By: vitor.sousa
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D8485
2019-04-02 07:51:05 -07:00
|
|
|
namespace Ui
|
|
|
|
{
|
2017-11-23 16:49:22 -08:00
|
|
|
|
2019-10-03 23:46:29 -07:00
|
|
|
/// <summary>Initialization and shutdown of the UI libraries.
|
2019-10-13 21:01:10 -07:00
|
|
|
/// <para>Since EFL 1.23.</para>
|
2019-10-03 23:46:29 -07:00
|
|
|
/// </summary>
|
mono: fix space and brace warnings of StyleCop
Summary:
The following warning rules of StyleCop are checked.
Space rules : SA1000, SA1003, SA1008, SA1009, SA1010, SA1011
Brace rules : SA1500, SA1501, SA1502, SA1503, SA1513
Indentation is also applied.
Reviewers: lauromoura, felipealmeida, vitor.sousa, woohyun
Reviewed By: vitor.sousa
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D8485
2019-04-02 07:51:05 -07:00
|
|
|
public static class Config
|
|
|
|
{
|
2019-10-13 21:01:10 -07:00
|
|
|
/// <summary>
|
|
|
|
/// Initialize the configuration of Elm.
|
|
|
|
/// <para>Since EFL 1.23.</para>
|
|
|
|
/// </summary>
|
mono: fix space and brace warnings of StyleCop
Summary:
The following warning rules of StyleCop are checked.
Space rules : SA1000, SA1003, SA1008, SA1009, SA1010, SA1011
Brace rules : SA1500, SA1501, SA1502, SA1503, SA1513
Indentation is also applied.
Reviewers: lauromoura, felipealmeida, vitor.sousa, woohyun
Reviewed By: vitor.sousa
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D8485
2019-04-02 07:51:05 -07:00
|
|
|
public static void Init()
|
|
|
|
{
|
2017-11-23 16:49:22 -08:00
|
|
|
// TODO Support elm command line arguments
|
|
|
|
#if WIN32 // Not a native define, we define it in our build system
|
|
|
|
// Ecore_Win32 uses OleInitialize, which requires single thread apartments
|
2018-06-19 10:28:57 -07:00
|
|
|
if (System.Threading.Thread.CurrentThread.GetApartmentState() != ApartmentState.STA)
|
mono: fix space and brace warnings of StyleCop
Summary:
The following warning rules of StyleCop are checked.
Space rules : SA1000, SA1003, SA1008, SA1009, SA1010, SA1011
Brace rules : SA1500, SA1501, SA1502, SA1503, SA1513
Indentation is also applied.
Reviewers: lauromoura, felipealmeida, vitor.sousa, woohyun
Reviewed By: vitor.sousa
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D8485
2019-04-02 07:51:05 -07:00
|
|
|
{
|
2017-11-23 16:49:22 -08:00
|
|
|
throw new InvalidOperationException("UI Applications require STAThreadAttribute in Main()");
|
mono: fix space and brace warnings of StyleCop
Summary:
The following warning rules of StyleCop are checked.
Space rules : SA1000, SA1003, SA1008, SA1009, SA1010, SA1011
Brace rules : SA1500, SA1501, SA1502, SA1503, SA1513
Indentation is also applied.
Reviewers: lauromoura, felipealmeida, vitor.sousa, woohyun
Reviewed By: vitor.sousa
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D8485
2019-04-02 07:51:05 -07:00
|
|
|
}
|
2017-11-23 16:49:22 -08:00
|
|
|
#endif
|
|
|
|
elm_init(0, IntPtr.Zero);
|
|
|
|
|
2019-05-13 23:51:05 -07:00
|
|
|
Efl.Ui.Win.ExitOnAllWindowsClosed = new Eina.Value(0);
|
2017-11-23 16:49:22 -08:00
|
|
|
}
|
mono: fix space and brace warnings of StyleCop
Summary:
The following warning rules of StyleCop are checked.
Space rules : SA1000, SA1003, SA1008, SA1009, SA1010, SA1011
Brace rules : SA1500, SA1501, SA1502, SA1503, SA1513
Indentation is also applied.
Reviewers: lauromoura, felipealmeida, vitor.sousa, woohyun
Reviewed By: vitor.sousa
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D8485
2019-04-02 07:51:05 -07:00
|
|
|
|
2019-10-13 21:01:10 -07:00
|
|
|
/// <summary>
|
|
|
|
/// Shutdown Elm systems.
|
|
|
|
/// <para>Since EFL 1.24.</para>
|
|
|
|
/// </summary>
|
mono: fix space and brace warnings of StyleCop
Summary:
The following warning rules of StyleCop are checked.
Space rules : SA1000, SA1003, SA1008, SA1009, SA1010, SA1011
Brace rules : SA1500, SA1501, SA1502, SA1503, SA1513
Indentation is also applied.
Reviewers: lauromoura, felipealmeida, vitor.sousa, woohyun
Reviewed By: vitor.sousa
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D8485
2019-04-02 07:51:05 -07:00
|
|
|
public static void Shutdown()
|
|
|
|
{
|
2017-11-23 16:49:22 -08:00
|
|
|
elm_shutdown();
|
|
|
|
}
|
|
|
|
|
2019-10-13 21:01:10 -07:00
|
|
|
/// <summary>
|
|
|
|
/// Run Elm system.
|
|
|
|
/// <para>Since EFL 1.23.</para>
|
|
|
|
/// </summary>
|
mono: fix space and brace warnings of StyleCop
Summary:
The following warning rules of StyleCop are checked.
Space rules : SA1000, SA1003, SA1008, SA1009, SA1010, SA1011
Brace rules : SA1500, SA1501, SA1502, SA1503, SA1513
Indentation is also applied.
Reviewers: lauromoura, felipealmeida, vitor.sousa, woohyun
Reviewed By: vitor.sousa
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D8485
2019-04-02 07:51:05 -07:00
|
|
|
public static void Run()
|
|
|
|
{
|
2017-11-23 16:49:22 -08:00
|
|
|
elm_run();
|
|
|
|
}
|
|
|
|
|
2019-10-13 21:01:10 -07:00
|
|
|
/// <summary>
|
|
|
|
/// Exit Elm.
|
|
|
|
/// <para>Since EFL 1.23.</para>
|
|
|
|
/// </summary>
|
mono: fix space and brace warnings of StyleCop
Summary:
The following warning rules of StyleCop are checked.
Space rules : SA1000, SA1003, SA1008, SA1009, SA1010, SA1011
Brace rules : SA1500, SA1501, SA1502, SA1503, SA1513
Indentation is also applied.
Reviewers: lauromoura, felipealmeida, vitor.sousa, woohyun
Reviewed By: vitor.sousa
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D8485
2019-04-02 07:51:05 -07:00
|
|
|
public static void Exit()
|
|
|
|
{
|
2017-11-23 16:49:22 -08:00
|
|
|
elm_exit();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|