Stefano Ceccherini wrote: >> Yes, we know, but don't worry. After app_server >reaches an almost beta >> stage we will >>clean the code so that things would be clearer from C++'s >point of view. >> However, some classes are friends and those will stay >like that >> because they need frequent >>need of private members, and every time calling a public >method which >>returns a pointer to the object >>in question imposes penalty on performance (method/function >call overhead). > > > Inlines ? :) To a certain extent. There are some inlines in the server, there will be more, but they cannot spread across files (.o) AFAIK. For example, RooLayer really has to modify region members of Layer class, if it were to count how much of times RooLayer would access Layer's public methods just for getting a pointer to the object I'm sure your counter would go out of scale. :-) There is no need to copy objects internal to Layer, we just don't need that because we want to keep our data on a per Layer basis. And if we return a pointer/reference to a private member, what is the point in that public GET method? There are other classes which are closely tied together, like: ServerWindow/WinBorder/Layer. As much as I want I cannot pull out certain 'friend's. > Obviously my opinion doesn't count much as I didn't write any single line in > the app server, > but still I wanted to express it. Hm... there is a line in app_server you suggested: STRACE(("adfas)); See, you opinion counts! :-) ;-) > And now for the true reason I'm posting here: > I'd like to add (in the more or less foreseeable future) support for > BDirectWindow in the server. > I think I'll need to add some methods to ServerWindow. I have some questions, though: > > Can I get a pointer to the frame buffer from ServerWindow ? how? see DW's mail. :-) > > Can I get the current clipping region of the window from ServerWindow ? How ? :-D You can't, in a clean way! BRegion *reg; this->GetWinBorder()->GetRootLayer()->Lock(); You can do this ATM: reg = &this->GetWinBorder()->fTopLayer->fFullVisible; Should've been like this: reg = this->GetWinBorder()->ClippingRegion(); // use reg. this->GetWinBorder()->GetRootLayer()->Unlock(); I didn't take care of that because I didn't need the clipping region on client side. :-) Now, I'm still playing with those regions, so I'd like to ask to let BDirectWindow beside for a time. :-) Thanks, Adi.