summaryrefslogtreecommitdiff
path: root/packages/extra/ptc/x11/x11imaged.inc
blob: 3a5ee7268dcab409c19b69e47aba9bd063abc274 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
Type
  TX11Image = Class(TObject)
  Protected
    FWidth, FHeight : Integer;
    FDisplay : PDisplay;
    FImage : PXImage;
  Public
    Constructor Create(ADisplay : PDisplay; AScreen, AWidth, AHeight : Integer; AFormat : TPTCFormat); Virtual;
    Procedure Put(AWindow : TWindow; AGC : TGC; AX, AY : Integer); Virtual; Abstract;
    Procedure Put(AWindow : TWindow; AGC : TGC; ASX, ASY, ADX, ADY,
                  AWidth, AHeight : Integer); Virtual; Abstract;
    Function Lock : Pointer; Virtual; Abstract;
    Function Pitch : Integer; Virtual; Abstract;
    Function Name : String; Virtual; Abstract;
  End;

  TX11NormalImage = Class(TX11Image)
  Private
    FPixels : PUint8;
  Public
    Constructor Create(ADisplay : PDisplay; AScreen, AWidth, AHeight : Integer; AFormat : TPTCFormat); Override;
    Destructor Destroy; Override;
    Procedure Put(AWindow : TWindow; AGC : TGC; AX, AY : Integer); Override;
    Procedure Put(AWindow : TWindow; AGC : TGC; ASX, ASY, ADX, ADY,
                  AWidth, AHeight : Integer); Override;
    Function Lock : Pointer; Override;
    Function Pitch : Integer; Override;
    Function Name : String; Override;
  End;

{$IFDEF ENABLE_X11_EXTENSION_XSHM}
  TX11ShmImage = Class(TX11Image)
  Private
    FShmInfo : TXShmSegmentInfo;
    FShmAttached : Boolean;
  Public
    Constructor Create(ADisplay : PDisplay; AScreen, AWidth, AHeight : Integer; AFormat : TPTCFormat); Override;
    Destructor Destroy; Override;
    Procedure Put(AWindow : TWindow; AGC : TGC; AX, AY : Integer); Override;
    Procedure Put(AWindow : TWindow; AGC : TGC; ASX, ASY, ADX, ADY,
                  AWidth, AHeight : Integer); Override;
    Function Lock : Pointer; Override;
    Function Pitch : Integer; Override;
    Function Name : String; Override;
  End;
{$ENDIF ENABLE_X11_EXTENSION_XSHM}