On 14 Feb 2007, at 16:56, Xavier Glattard wrote:
That's OK ... but there is no practical pressure to be able to use
the backend indepedently of the gui, so I don't think you *have* to
take that view.
I'm perfectly happy with avoiding calls from back to gui methods ...
but that does involve changing the interface to pass more information
in both directions,
Which one ?
The GSDisplayServer API is used for calls from the gui to the
backend ... so it would be primarily this one, needing supply more
parameters for some calls and perhaps return more information back in
some calls.
In addition, the backend provides information in the form of events
in the event queue, and perhps some special events not defined in
Openstep/Cocoa might need to be added to the event queue. I suppose
the backend could provide notifications (NSNotification) if there is
anything which needs to be sent out-of-band (ie not as an event in
the event queue)
I think that would not involve so much changes. Calls from back to gui
are not so numerous, some are simply bad (most in the win32
backend, like the
use of Notification from the AppKit; i saw a [window sendEvent:
ev] ; some
AppKit classes are 'categorized' to change methods!!), many others
can be easily
change to an other form (the use of an alert panel), and some other
should be in
the AppKit (window level management in the x11 backend (ignore
under win32),
getNextEventMatching because AppKit and user events should not be
handle by the
backend)...
The more i see the win32 backend, the more i think it needs a deep
cleaning!
and since nobody (afaik) wants to use back standalone,
I do :-)
Well.. i would like.
there seems little to be gained by adding to the
interface rather than using existing gui api.
Some month ago I thought of a SDL backend. But such a backend would be
a subset of the official backend (only ONE window) : the full AppKit
would not run with a SDL backend. For instance i would have to write
my own SDLApplication class. But the official backend does need
NSApplication, and Panel, and Menu... So my SDLApplication would
not run with an offical backend!
At end, the work would never be compatible with GNUstep in any way.
Well, I doubt that anyone would complain if you wanted to clean-up
the gui<->back interaction as long as you approached it incrementally
(cleaning up a bit at a time), so that if anyone spotted a problem we
could revert easily. Generally people are very willing to accept
patches/improvements to GNUstep as long as they are not presented
with big changes effecting lots of code in one patch (since such
patches are very difficult to evaluate quickly).
Even if nobody else wants to use the backend the way you do, a
cleanup/simplification would benefit everyone in future.
_______________________________________________
Gnustep-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnustep-dev