Hello,
Why not work on a per-application basis instead of a per-window basis ? I mean, apply new themes only to application supporting on-the-fly theme update (and,of course, applications opened after theme update). This would allow wind_calc() to work as expected, since you know which application is asking for it.
this is my opinion to :)
Yes, it may come to that. I will attempt on a window basis first, if it turns out that wind_calc() is used like in WinDom by more applications, having application based changes will be necessary.
I don't understand why you want to implement this feature on a window basis.
I see 2 kinds of applications :- applications that can deal with on-the-fly theme change : for these applications, AES shall redraw all the windows borders of already opened windows with the new theme.
- applications that cannot deal with on-the-fly theme change : here, if you want a maximum of backward compatibility, you have to use the old theme for new windows of this application, or send an AP_TERM message to the application.
By implementing on window basis, you will deprecate wind_calc() because this function will no more return reliable informations.
Please keep in mind that at the moment, wind_calc() is used for window already opened... This is the only way to take control over the WORK area of a window. For example, my image viewer (riri2) uses wind_calc() each time the user click on the FULL widget to that the WORK area of the window contains the whole image (the window is not set the full screen size, but set to the image size).
New AES functions won't solve anything, because the problem is only for "old" applications.
Once again, the only way to not break compatibility is to have a theme per application basis (if you want to support on the fly changes).
Ok, at the moment we are talking about wind_calc(), but for me, "theme" are much more than just widgets for windows. What i'd like to have in AES, it's some functions to draw widgets (for example a slider). For example, some applications can have framed windows, and i'd like such applications to use the same sliders for the frames than sliders used by AES for windows.
This is why told about "add complexity" when i wrote about on-the-fly change feature : if the theme changes and if the application supports the changing of theme, then application may recompute each WORK area of frames window to deal with slider size of the new theme... same for all the formulars that contain sliders.
best regards, Arnaud.