
25 Jun
2007
25 Jun
'07
7:43 a.m.
mailing_list:
On Mon, Jun 25, 2007 at 08:43:56PM +1000, Donald Bruce Stewart wrote:
should we have something like:
withFont $ \f -> do some action
to track this resource? Or perhaps tie it to ForeignPtr, to have the GC free it automatically?
Since we have Decoration.withGC and setFont requires the G(aphic)C(context) I think we could modify that function. Something like:
withGC :: Drawable -> (Display -> Drawable -> GC -> FontStruct -> X ()) -> X ()
If this is ok, I'll send the patch (and you can forget this one).
Andrea
I guess its a bit complex, but if that's what needs to be done to handle the resource automatically, then it probably should be done. -- Don