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 22:43 schrieb Cedric Bail:
> 
> On Monday, June 28th, 2021 at 1:55 PM, Andreas Volz <[email protected]> wrote:
>> Am 28.06.21 um 17:58 schrieb Cedric Bail:
>>> 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
> 
> 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 .

After searching around in the headers and docs I found this:

http://www.enlightenment.org/develop/api/efl/ui/win/event/delete_request

So with the C example there I could maybe catch the window delete 
request and react to it.

But, I'm to tired of "guessing" how the C++ way to call something could 
look like. Yes, I look in the .eo class file, than into the headers. 
Then I guess something from compiler output....

But here again I don't find the correct C++ way of setting up the 
efl::Win event handler callback without documentation or an example. :-(

regards
Andreas
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.