On Monday, June 28th, 2021 at 1:55 PM, Andreas Volz <li...@brachttal.net> wrote: > Am 28.06.21 um 17:58 schrieb Cedric Bail: > > On Sunday, June 27th, 2021 at 8:45 AM, Andreas Volz li...@brachttal.net > > 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 Oh, I see. In that case, you would have to reimplement the content of EFL_MAIN_EX to match your need. It is only a few lines of code and it should be possible to tailor it to your need. You can check the content of the macros in src/lib/ecore/efl_general.h . Cedric
publickey - cedric@ddlm.me - 0x1869A77F.asc
Description: application/pgp-keys
signature.asc
Description: OpenPGP digital signature
_______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel