dotgnu-pnet
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pnet-developers] Xsharp


From: Rich Baumann
Subject: [Pnet-developers] Xsharp
Date: Sun, 27 Feb 2005 20:19:51 -0500

Hey all,

        The lead developer for the Komodo project (http://www.komodolinux.org),
William Lahti, has been corresponding with me about the drawing system
improvements in pnetlib, and specifically about Xsharp. Xsharp is the
only managed Xlib binding he could find, however it isn't really
sufficient for what he needs. Here are the relevant excerpts from our
recent correspondence, explaining the problems he has with Xsharp and
the solutions he's employed to deal with them.

On Sat, 2005-02-26 at 12:27 -0500, William Lahti wrote:
> I have a few juts with Xsharp. For instance most of the code is
> entirely closed with internal protection. This means trying to do
> things like custom visuals even though Xsharp doesn't support it makes
> it just about impossible. This applies to the Xlib object too. That
> interface should be public, to provide the core functions to people
> who know their X stuff.
> 
> Another annoyance actually is the fact that it *makes* you distinguise
> InputOutputWidgets from TopLevelWindows. I really think we should find
> a way that is less difficult to build on. You see my system has
> traditional X widgets that are windows when they have no parents. An
> easy solution for that one is just creating a way to get a Widget
> representing the root window (like PlaceHolder, but for real). Also,
> for some reason, event handling can bog down when you use your own
> loop and Application.ProcessPendingEvents().
> 
> Getting the display pointer is unnecessarily painful. It took me three
> days to figure out where I got it from, and that wasn't even the
> drawable ID (luckily it was in the same place). Being the only X11
> .NET solution for the moment, it'd be nice to make it a bit easier for
> people to use a Cairo .NET binding (I suspect others aren't buying
> Mono's pathetic cripple-cairo, which is Cairographics.org officially
> recommended binding for .NET).
> 
> Input events should be just that: events, or at least available via
> them. I had to subclass InputOutputWidget *and* TopLevelWidget and
> implement the On* functions to fire my widget events.
> 
> My modified Xsharp currently mostly surrounds freeing Xlib and other
> various life savers, useful when you need to do something Xsharp can't
> yet express. I'm a firm believer in letting users choose how deep they
> want to go. Which means in my bindings I usually have an object which
> has the PInvoke methods for the library and another set of objects
> that represent data/communication with the library. I believe my Cairo
> one has something like that but I never use it, because I'd rather
> Platform.Graphics (my graphics project) isn't in a tower trying to
> talk to someone on the ground below.
> 
> I don't really build on System.Drawing, because I wanted to build a
> cairo/Postscript-like API. That certainly doesnt mean a backend
> couldn't be created to provide most (if not all) of the System.Drawing
> functionality. We don't use Xsharp.Graphics objects, as... we don't
> use much of Xsharp at all except basically what you said, the drawable
> IDs, input support, and widget/pixmap metrics

On Sun, 2005-02-27 at 15:31 -0500, William Lahti wrote: 
> I think I'm gonna spend some time turning Xsharp into a seperable
> piece from PNet, because it needs it's own identity. Also, I use mono,
> and I really just need a general purpose X binding.
> 
> > All your changes sound reasonable, but I'd prefer it if Rhys had the
> > opportunity to make any suggestions/objections he may have. Perhaps you
> > could email the pnet-developers list with a summary of your changes and
> > proposals? If you prefer, I could simply forward the relevant parts of
> > your email to the list instead.
> 
> If you could forward them I'd be appreciative: I always have problems
> posting to lists I'm not subscribed to and also I think I'm more
> interested in creating a project around Xsharp instead of working on
> it within Pnetlib.


Rich



reply via email to

[Prev in Thread] Current Thread [Next in Thread]