win: Add autohide and ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN
authorVitor Sousa <vitorsousasilva@gmail.com>
Wed, 1 Jul 2015 14:40:57 +0000 (15:40 +0100)
committerTom Hacohen <tom@stosb.com>
Wed, 1 Jul 2015 14:40:57 +0000 (15:40 +0100)
commitad19eee93b2a08a6c05986adbade5e25f8352ea7
tree5e55eced5976d64f6d6479ae2abd5e606097d703
parente071e2d8f6c7eac412d4d76c0d14de8ebc664f70
win: Add autohide and ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN

Summary:
Add the "autohide" property to elm_win. This property, when set to
EINA_TRUE, automatically hides the window upon a "delete,request" signal.

Create ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN, a new quit policy that
automatically exit from the elm_run loop when all windows are hidden.
It is an alternative to autodel to conciliates the memory management
framework of Eo with any other memory management model the program may
be using (e.g. RAII principles of C++).

Create the auxiliary function "_elm_win_policy_quit_triggered" to check
triggering of quit policies.
The check in "smart_hide" is now necessary, since
ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN can be triggered when a window
is hidden.

Create the auxiliary function "_elm_win_flush_cache_and_exit" to avoid
code repetition for exiting the elm_run loop.

Make a small update on documentation in elm_win.h to mention the new
autohide property.

@feature

Reviewers: raster, felipealmeida, cedric, tasn

Reviewed By: felipealmeida

Differential Revision: https://phab.enlightenment.org/D2751
src/lib/elm_general.eot
src/lib/elm_win.c
src/lib/elm_win.eo
src/lib/elm_win.h
src/tests/elm_test_win.c