unit windowing; // TODO do this externally? {$MODE OBJFPC} {$M+} interface uses graphics_2D, rectangles, framebuffers, type_fixes; type IClient = interface // doesn't work: property Bounds : TRectangle; property X1 : TCoordinate; property Y1 : TCoordinate; property X2 : TCoordinate; property Y2 : TCoordinate; // TODO gravity, iconification, titles, clipping rectangles, ... end; TFramebufferListItemP = ^TFramebufferListItem; TFramebufferListItem = object(TFramebufferInfo) Previous : TFramebufferListItemP; Next : TFramebufferListItemP; end; { - master framebuffer MasterFramebuffer : TFramebufferInfo; - some list of clipping rectangles per client ClippingRectangles[client] => list of TFramebufferInfo; (redraw state, alpha blending, composite, ...)? - who's at foreground (client ordering). - fullscreen "flag" per client (implicit). } TClipper = class published constructor Create(const aMasterFramebuffer : TFramebufferInfo); procedure AddClient(const aClient : IClient); procedure RemoveClient(const aClient : IClient); public // why doesn't "published" work? property Client[aIndex : TCardinal] : IClient; property ClientCount : TCardinal; end; implementation // FIXME implement. constructor TClipper.Create(const aMasterFramebuffer : TFramebufferInfo); begin end; procedure TClipper.AddClient(const aClient : IClient); begin end; procedure TClipper.RemoveClient(const aClient : IClient); begin end; end.