1 // Copyright 2019 The Servo Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution.
4 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
5 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
6 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
7 // option. This file may not be copied, modified, or distributed
8 // except according to those terms.
10 use std
::os
::raw
::c_void
;
11 use base
::{Boolean, CFAllocatorRef, CFIndex, CFRange, CFTypeID}
;
13 use string
::{CFStringRef, UniChar}
;
15 pub type CFCharacterSetPredefinedSet
= CFIndex
;
17 // Members of CFCharacterSetPredefinedSet enum
18 pub static kCFCharacterSetControl
: CFCharacterSetPredefinedSet
= 1;
19 pub static kCFCharacterSetWhitespace
: CFCharacterSetPredefinedSet
= 2;
20 pub static kCFCharacterSetWhitespaceAndNewline
: CFCharacterSetPredefinedSet
= 3;
21 pub static kCFCharacterSetDecimalDigit
: CFCharacterSetPredefinedSet
= 4;
22 pub static kCFCharacterSetLetter
: CFCharacterSetPredefinedSet
= 5;
23 pub static kCFCharacterSetLowercaseLetter
: CFCharacterSetPredefinedSet
= 6;
24 pub static kCFCharacterSetUppercaseLetter
: CFCharacterSetPredefinedSet
= 7;
25 pub static kCFCharacterSetNonBase
: CFCharacterSetPredefinedSet
= 8;
26 pub static kCFCharacterSetDecomposable
: CFCharacterSetPredefinedSet
= 9;
27 pub static kCFCharacterSetAlphaNumeric
: CFCharacterSetPredefinedSet
= 10;
28 pub static kCFCharacterSetPunctuation
: CFCharacterSetPredefinedSet
= 11;
29 pub static kCFCharacterSetIllegal
: CFCharacterSetPredefinedSet
= 12;
30 pub static kCFCharacterSetCapitalizedLetter
: CFCharacterSetPredefinedSet
= 13;
31 pub static kCFCharacterSetSymbol
: CFCharacterSetPredefinedSet
= 14;
32 pub static kCFCharacterSetNewline
: CFCharacterSetPredefinedSet
= 15;
35 pub struct __CFCharacterSet(c_void
);
37 pub type CFCharacterSetRef
= *const __CFCharacterSet
;
38 pub type CFMutableCharacterSetRef
= *const __CFCharacterSet
;
41 pub fn CFCharacterSetGetTypeID() -> CFTypeID
;
42 pub fn CFCharacterSetGetPredefined(theSetIdentifier
: CFCharacterSetPredefinedSet
) -> CFCharacterSetRef
;
43 pub fn CFCharacterSetCreateWithCharactersInRange(alloc
: CFAllocatorRef
, theRange
: CFRange
) -> CFCharacterSetRef
;
44 pub fn CFCharacterSetCreateWithCharactersInString(alloc
: CFAllocatorRef
, theString
: CFStringRef
) -> CFCharacterSetRef
;
45 pub fn CFCharacterSetCreateWithBitmapRepresentation(alloc
: CFAllocatorRef
, theData
: CFDataRef
) -> CFCharacterSetRef
;
46 pub fn CFCharacterSetCreateMutable(alloc
: CFAllocatorRef
) -> CFMutableCharacterSetRef
;
47 pub fn CFCharacterSetCreateCopy(alloc
: CFAllocatorRef
, theSet
: CFCharacterSetRef
) -> CFCharacterSetRef
;
48 pub fn CFCharacterSetCreateMutableCopy(alloc
: CFAllocatorRef
, theSet
: CFCharacterSetRef
) -> CFMutableCharacterSetRef
;
49 pub fn CFCharacterSetIsCharacterMember(theSet
: CFCharacterSetRef
, theChar
: UniChar
) -> Boolean
;
50 pub fn CFCharacterSetCreateBitmapRepresentation(alloc
: CFAllocatorRef
, theSet
: CFCharacterSetRef
) -> CFDataRef
;
51 pub fn CFCharacterSetAddCharactersInRange(theSet
: CFMutableCharacterSetRef
, theRange
: CFRange
);
52 pub fn CFCharacterSetRemoveCharactersInRange(theSet
: CFMutableCharacterSetRef
, theRange
: CFRange
);
53 pub fn CFCharacterSetAddCharactersInString(theSet
: CFMutableCharacterSetRef
, theString
: CFStringRef
);
54 pub fn CFCharacterSetRemoveCharactersInString(theSet
: CFMutableCharacterSetRef
, theString
: CFStringRef
);
55 pub fn CFCharacterSetUnion(theSet
: CFMutableCharacterSetRef
, theOtherSet
: CFCharacterSetRef
);
56 pub fn CFCharacterSetIntersect(theSet
: CFMutableCharacterSetRef
, theOtherSet
: CFCharacterSetRef
);
57 pub fn CFCharacterSetInvert(theSet
: CFMutableCharacterSetRef
);