Thanks for getting back to me again, Niels. I think I'm getting there! However, I'm a little concerned when you say "ISaWMan/ISaWManager are intended for 'top' level users of DirectFB as a whole" and "client wants to switch focus to window X and does a ISaWManManager_SwitchFocus" because those statements suggest that I may have missed something. It could just because I'm not clear what exactly you mean by "client" and "top-level users" but I would like to be sure on the following point...
I imagine that, while multiple applications may use ISaWMan, only _one_ (the window/application manager process) would use ISawManManager. I come to this conclusion for two reasons: firstly, this comment in sawman.h regarding ISaWManManager, "Manager interface to be created only once for the application manager executable"; and secondly, the fact that in order to use the functions of ISaWManManager, you must call ISawMan->CreateManager() which takes a pointer to a struct of callbacks and I would have thought that only the window/application manager process would register callbacks. Is that correct or are you suggesting that multiple apps would be using ISaWManManager? Thank you for helping me to get my head around this! Tom. 2008/10/7 Niels Roest <[EMAIL PROTECTED]>: > Hi Thomas. > I'm afraid I misformulated my answer, now I read it back, I can understand > the confusion. > > ISaWMan/ISaWManager are intended for 'top' level users of DirectFB as a > whole. > It is designed to allow more flexible, client-defined, window management. > > The functions of sawman_manager.h are currently primarily useful for a > SaWMan 'plugin', > using the interface from sawman_manager.h (type SaWManCallbacks). > This is designed to 'listen' to window configuration changes (window > removal, resize, move), > and to (dis)allow certain changes. This is designed to run in the DirectFB > master process. > > Example: client wants to switch focus to window X and does a > ISaWManManager_SwitchFocus. > This lands in sawman_switch_focus(), and before realizing this change, a > call is made in manager_call_handler to > sawman->manager.callbacks.SwitchFocus. If this returns an error code, the > switch will not happen. > > hope this was more clear. > Niels > > Thomas Gutteridge wrote: >> >> Thanks for your reply Niels. >> >> I'm afraid I'm still confused over the intended purpose of the SaWMan >> interfaces (ISaWMan/ISaWManager) as compared to that of the functions >> in sawman_manager.h. Certainly, allowing an application to register >> callback functions is one important purpose for the interfaces. >> However, if they are not intended to form *the* public API for SaWMan >> aware applications, I don't understand why they include many functions >> (e.g. InsertWindow, Lock) that appear to be simply wrappers for >> functions in sawman_manager.h (e.g. sawman_insert_window, >> sawman_lock). For example, why would I use ISaWManManager's >> RemoveWindow instead of calling sawman_remove_window directly? >> >> Cheers, >> Tom. >> >> 2008/9/25 Niels Roest <[EMAIL PROTECTED]>: >> >>> >>> Hi Thomas.. >>> >>> Hiding windows is as simple as window->SetOpacity( window, 0 ); >>> The SaWMan call is likely to allow a windowmanager to act upon changing a >>> window's visibility, not sure cause it's not implemented as you point >>> out. >>> SetOpacity results in update_region() which will do a >>> SAWMAN_VISIBLE_WINDOW( >>> window ) check. >>> >>> ISaWMan and ISaWManager constitute of callbacks issued by SaWMan. >>> Of course, inside these callbacks, you may need to query/change some >>> SaWMan >>> status; >>> for that you'll use the calls in sawman_manager.h. >>> For instance, you might want to prevent a certain window getting focus. >>> In the required callback (which is generally issued before SaWMan >>> performs >>> the change) you can override the behaviour, or if it's not this certain >>> window, follow the default behaviour by calling the 'official' change >>> focus >>> func. >>> >>> hth, >>> Niels >>> >>> Thomas Gutteridge wrote: >>> >>>> >>>> Hello >>>> >>>> I have a couple of questions about SaWMan: >>>> >>>> Firstly, I notice that the function SetVisible() in the ISaWManManager >>>> interface is not implemented. I'd like to use it to hide windows! Has >>>> it simply just not been written yet or is there a reason why I >>>> shouldn't need to use it? If the former, could someone suggest how I >>>> should hide (and re-show) a window? Looking around I got the >>>> impression that calling sawman_withdraw_window() might be the answer. >>>> >>>> Secondly, I'm a bit confused by the design of the API that SaWMan >>>> provides to window manager developers. I originally assumed that the >>>> intention was that the ISaWMan and ISaWManManager interfaces alone >>>> would constitute the API. But then I discovered the wider range of >>>> functionality available through sawman_manager.h. I have tended toward >>>> the conclusion that the manager interface is not yet complete and, as >>>> a stop-gap, the richer functionality has been made available by >>>> exposing this extra header? Is this correct or have I misunderstood. >>>> >>>> Many Thanks >>>> Tom. >>>> _______________________________________________ >>>> directfb-dev mailing list >>>> directfb-dev@directfb.org >>>> http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev >>>> >>>> >>>> >>> >>> -- >>> >>> .------------------------------------------. >>> | DirectFB - Hardware accelerated graphics | >>> | http://www.directfb.org/ | >>> "------------------------------------------" >>> >>> >> >> > > > -- > > .------------------------------------------. > | DirectFB - Hardware accelerated graphics | > | http://www.directfb.org/ | > "------------------------------------------" > _______________________________________________ directfb-dev mailing list directfb-dev@directfb.org http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev