summaryrefslogtreecommitdiff
path: root/fpcsrc/packages/cocoaint/src/quartzcore/CIContext.inc
blob: 310ca8182074552090cbf9dba90034595b883b43 (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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
{ Parsed from Quartzcore.framework CIContext.h }

{$ifdef TYPES}
{$ifndef CICONTEXT_PAS_T}
{$define CICONTEXT_PAS_T}

{$endif}
{$endif}

{$ifdef RECORDS}
{$ifndef CICONTEXT_PAS_R}
{$define CICONTEXT_PAS_R}

{$endif}
{$endif}

{$ifdef FUNCTIONS}
{$ifndef CICONTEXT_PAS_F}
{$define CICONTEXT_PAS_F}

{$endif}
{$endif}

{$ifdef EXTERNAL_SYMBOLS}
{$ifndef CICONTEXT_PAS_S}
{$define CICONTEXT_PAS_S}

{ External string constants }
var
  kCIContextOutputColorSpace: NSString; cvar; external;
  kCIContextWorkingColorSpace: NSString; cvar; external;
  kCIContextUseSoftwareRenderer: NSString; cvar; external;

{$endif}
{$endif}

{$ifdef FORWARD}
  CIContext = objcclass;
  CIContextPointer = ^CIContext;
  CIContextPtr = CIContextPointer;

{$endif}

{$ifdef CLASSES}
{$ifndef CICONTEXT_PAS_C}
{$define CICONTEXT_PAS_C}

{ CIContext }
  CIContext = objcclass external (NSObject)
  private
    _priv: id;
    
  public
    class function contextWithCGLContext_pixelFormat_colorSpace_options(ctx: CGLContextObj; pf: CGLPixelFormatObj; cs: CGColorSpaceRef; dict: NSDictionary): CIContext; message 'contextWithCGLContext:pixelFormat:colorSpace:options:';
    class function contextWithCGLContext_pixelFormat_options(ctx: CGLContextObj; pf: CGLPixelFormatObj; dict: NSDictionary): CIContext; message 'contextWithCGLContext:pixelFormat:options:'; deprecated 'in Mac OS X 10.6 and later';
    class function contextWithCGContext_options(ctx: CGContextRef; dict: NSDictionary): CIContext; message 'contextWithCGContext:options:';
    procedure drawImage_atPoint_fromRect(im: CIImage; p: CGPoint; src: CGRect); message 'drawImage:atPoint:fromRect:';
    procedure drawImage_inRect_fromRect(im: CIImage; dest: CGRect; src: CGRect); message 'drawImage:inRect:fromRect:';
    function createCGImage_fromRect(im: CIImage; r: CGRect): CGImageRef; message 'createCGImage:fromRect:';
    function createCGImage_fromRect_format_colorSpace(im: CIImage; r: CGRect; f: CIFormat; cs: CGColorSpaceRef): CGImageRef; message 'createCGImage:fromRect:format:colorSpace:';
    function createCGLayerWithSize_info(size: CGSize; d: CFDictionaryRef): CGLayerRef; message 'createCGLayerWithSize:info:';
    procedure render_toBitmap_rowBytes_bounds_format_colorSpace(im: CIImage; data: Pointer; rb: ptrdiff_t; r: CGRect; f: CIFormat; cs: CGColorSpaceRef); message 'render:toBitmap:rowBytes:bounds:format:colorSpace:';
    procedure render_toIOSurface_bounds_colorSpace(im: CIImage; surface: IOSurfaceRef; r: CGRect; cs: CGColorSpaceRef); message 'render:toIOSurface:bounds:colorSpace:';
    procedure reclaimResources; message 'reclaimResources';
    procedure clearCaches; message 'clearCaches';
  end;

{$endif}
{$endif}