unit X11_Visuals; {$MODE OBJFPC} {$M+} interface uses X11_Objects, X11, xlib; type TVisual = class(TInterfacedObject, IVisual, IInterface) private fDisplay : PDisplay; fVisual : PVisual; fBOwnsVisual : Boolean; protected function GetHandle() : PVisual; public property Handle : PVisual read GetHandle; published constructor Reuse(aDisplay : PDisplay; aVisual : PVisual; aBOwnsVisual : Boolean); // TODO property "Display". end; implementation function TVisual.GetHandle() : PVisual; begin Result := fVisual; end; constructor TVisual.Reuse(aDisplay : PDisplay; aVisual : PVisual; aBOwnsVisual : Boolean); begin fDisplay := aDisplay; fVisual := aVisual; fBOwnsVisual := aBOwnsVisual; end; end.