forked from enlightenment/efl
efl-mono: Use Efl.Ui.Win API instead of Elm.Policy
Summary:
This removes another bit of legacy API from the C# bindings.
This also reverts "elm: Put back Policy and Policy_Quit in EO files"
(a9132a9a66
) so that these two Elm enums are
definitely out of the EO files.
Test Plan:
Everything, including mono bindings, continue to build.
At runtime, C# apps still exit when all windows are closed.
Reviewers: lauromoura, vitor.sousa, q66
Reviewed By: q66
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D8890
This commit is contained in:
parent
54175998d5
commit
7f907ecd9d
|
@ -23,7 +23,6 @@ static class UnsafeNativeMethods
|
|||
private static Efl.Eo.FunctionWrapper<init_func_delegate> _evas_init;
|
||||
[DllImport(efl.Libs.Evas)] public static extern void evas_shutdown();
|
||||
[DllImport(efl.Libs.Elementary)] public static extern int elm_init(int argc, IntPtr argv);
|
||||
[DllImport(efl.Libs.Elementary)] public static extern void elm_policy_set(int policy, int policy_detail);
|
||||
[DllImport(efl.Libs.Elementary)] public static extern void elm_shutdown();
|
||||
[DllImport(efl.Libs.Elementary)] public static extern void elm_run();
|
||||
[DllImport(efl.Libs.Elementary)] public static extern void elm_exit();
|
||||
|
@ -117,7 +116,7 @@ public static class Config
|
|||
#endif
|
||||
elm_init(0, IntPtr.Zero);
|
||||
|
||||
elm_policy_set((int)Elm.Policy.Quit, (int)Elm.PolicyQuit.LastWindowHidden);
|
||||
Efl.Ui.Win.ExitOnAllWindowsClosed = new Eina.Value(0);
|
||||
}
|
||||
|
||||
public static void Shutdown()
|
||||
|
|
|
@ -61,7 +61,7 @@ public abstract class Application
|
|||
#endif
|
||||
elm_init(0, IntPtr.Zero);
|
||||
|
||||
elm_policy_set((int)Elm.Policy.Quit, (int)Elm.PolicyQuit.LastWindowHidden);
|
||||
Efl.Ui.Win.ExitOnAllWindowsClosed = new Eina.Value(0);
|
||||
}
|
||||
|
||||
initComponent = component;
|
||||
|
|
|
@ -2,33 +2,6 @@
|
|||
* NOTE: Some of those types still need to be moved to Efl.Ui
|
||||
*/
|
||||
|
||||
enum Elm.Policy
|
||||
{
|
||||
[[Policy identifiers.]]
|
||||
quit, [[under which circumstances the application should quit automatically.
|
||||
See also @Elm.Policy.quit.]]
|
||||
exit, [[defines elm_exit() behaviour. See also @Elm.Policy.exit.
|
||||
|
||||
@since 1.8
|
||||
]]
|
||||
throttle, [[defines how throttling should work. See also @Elm.Policy.throttle
|
||||
|
||||
@since 1.8
|
||||
]]
|
||||
last [[Sentinel value to indicate last enum field during iteration]]
|
||||
}
|
||||
|
||||
/* FIXME: elm_policy API is not bound to EO */
|
||||
enum Elm.Policy_Quit
|
||||
{
|
||||
[[Possible values for the @Elm.Policy.quit policy]]
|
||||
none = 0, [[never quit the application automatically]]
|
||||
last_window_closed, [[quit when the application's last window is closed]]
|
||||
last_window_hidden [[quit when the application's last window is hidden
|
||||
|
||||
@since 1.14]]
|
||||
}
|
||||
|
||||
/* Legacy-only function pointer types, for the legacy EO classes (genlist, etc...) */
|
||||
type Evas_Smart_Cb: __undefined_type; [[Evas smart callback type]]
|
||||
|
||||
|
|
|
@ -32,6 +32,41 @@ typedef struct _Elm_Event_Policy_Changed
|
|||
int old_value; /**< new value the policy got */
|
||||
} Elm_Event_Policy_Changed;
|
||||
|
||||
/** Policy identifiers.
|
||||
*
|
||||
* @ingroup Elm
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
ELM_POLICY_QUIT = 0, /**< under which circumstances the application should
|
||||
* quit automatically. See also @ref ELM_POLICY_QUIT. */
|
||||
ELM_POLICY_EXIT, /**< defines elm_exit() behaviour. See also
|
||||
* @ref ELM_POLICY_EXIT.
|
||||
*
|
||||
* @since 1.8 */
|
||||
ELM_POLICY_THROTTLE, /**< defines how throttling should work. See also
|
||||
* @ref ELM_POLICY_THROTTLE
|
||||
*
|
||||
* @since 1.8 */
|
||||
ELM_POLICY_LAST /**< Sentinel value to indicate last enum field during
|
||||
* iteration */
|
||||
} Elm_Policy;
|
||||
|
||||
/** Possible values for the @ref ELM_POLICY_QUIT policy
|
||||
*
|
||||
* @ingroup Elm
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
ELM_POLICY_QUIT_NONE = 0, /**< never quit the application automatically */
|
||||
ELM_POLICY_QUIT_LAST_WINDOW_CLOSED, /**< quit when the application's last
|
||||
* window is closed */
|
||||
ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN /**< quit when the application's last
|
||||
* window is hidden
|
||||
*
|
||||
* @since 1.14 */
|
||||
} Elm_Policy_Quit;
|
||||
|
||||
/** Possible values for the @ref ELM_POLICY_EXIT policy.
|
||||
*
|
||||
* @since 1.8
|
||||
|
|
Loading…
Reference in New Issue