]> gitweb.factorcode.org Git - factor.git/blob - basis/core-foundation/core-foundation.factor
core, basis, extra: Remove DOS line endings from files.
[factor.git] / basis / core-foundation / core-foundation.factor
1 ! Copyright (C) 2006, 2008 Slava Pestov
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: alien.c-types alien.destructors alien.syntax
4 classes.struct ;
5 IN: core-foundation
6
7 TYPEDEF: void* CFTypeRef
8
9 TYPEDEF: void* CFAllocatorRef
10 CONSTANT: kCFAllocatorDefault f
11
12 TYPEDEF: bool Boolean
13 TYPEDEF: long CFIndex
14 TYPEDEF: uchar UInt8
15 TYPEDEF: ushort UInt16
16 TYPEDEF: uint UInt32
17 TYPEDEF: ulonglong UInt64
18 TYPEDEF: char SInt8
19 TYPEDEF: short SInt16
20 TYPEDEF: int SInt32
21 TYPEDEF: longlong SInt64
22 TYPEDEF: ulong CFTypeID
23 TYPEDEF: UInt32 CFOptionFlags
24 TYPEDEF: void* CFUUIDRef
25 TYPEDEF: SInt32 OSStatus
26 TYPEDEF: uchar[4] FourCharCode
27 TYPEDEF: FourCharCode OSType
28
29 STRUCT: FSRef
30     { opaque uchar[80] } ;
31
32 STRUCT: CFRange
33     { location CFIndex }
34     { length CFIndex } ;
35
36 : <CFRange> ( location length -- range )
37     CFRange <struct-boa> ;
38
39 FUNCTION: CFTypeRef CFRetain ( CFTypeRef cf ) ;
40
41 FUNCTION: void CFRelease ( CFTypeRef cf ) ;
42
43 DESTRUCTOR: CFRelease