Re: [E-devel] Catch "delete,request" signal & shaped window
Andreas Volz <[email protected]>
| Newsgroups | gmane.comp.window-managers.enlightenment.devel |
|---|---|
| Message-ID | <[email protected]> |
Am 28.06.21 um 17:58 schrieb Cedric Bail: > Hi, > > On Sunday, June 27th, 2021 at 8:45 AM, Andreas Volz <[email protected]> wrote: >> two questions together after switching to the C++ version of the unified >> API. >> > >> How could I receive the "delete,request" signal to catch of a user >> clicks the X from the window and do something before quitting. With the >> old API I did this somehow with evas_object_smart_callback_call() if I >> remember correct. > > With the new API, we have an explicit lifecycle definition. I don't remember > how it is defined in C++, but in C, we do have a macro EFL_MAIN_EX() which > will call the following function: > - efl_main: at startup just before the main loop start > - efl_terminate: when the application is closed > - efl_pause: when the application can reduce is paused (on desktop this is > related to being minimized) > - efl_resume: the inverse of pause to get things back to speed Yes, I just ask this as I run a very special mainloop in my application. I've my own mainloop logic and just start EFL with elm_init() in one of my threads. For various reasons I couldn't give main control in my application startup logic to EFL. With the old API I just catched the window delete request and ended the mainloop with elm_shutdown() and elm_exit(). This worked great. regards Andreas