~ubuntu-branches/ubuntu/trusty/python-enable/trusty

« back to all changes in this revision

Viewing changes to enthought/kiva/mac/CoreFoundation.pxi

  • Committer: Bazaar Package Importer
  • Author(s): Varun Hiremath
  • Date: 2011-04-05 21:54:28 UTC
  • mfrom: (1.1.5 upstream)
  • mto: (8.2.1 sid)
  • mto: This revision was merged to the branch mainline in revision 10.
  • Revision ID: james.westby@ubuntu.com-20110405215428-1x2wtubz3ok2kxaq
Tags: upstream-3.4.1
ImportĀ upstreamĀ versionĀ 3.4.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# :Author:    Robert Kern
2
 
# :Copyright: 2004, Enthought, Inc.
3
 
# :License:   BSD Style
4
 
 
5
 
 
6
 
cdef extern from "CoreFoundation/CoreFoundation.h":
7
 
    ctypedef int OSStatus
8
 
 
9
 
    cdef enum:
10
 
        noErr
11
 
 
12
 
    ctypedef enum CFStringEncoding:
13
 
        kCFStringEncodingMacRoman = 0
14
 
        kCFStringEncodingWindowsLatin1 = 0x0500
15
 
        kCFStringEncodingISOLatin1 = 0x0201
16
 
        kCFStringEncodingNextStepLatin = 0x0B01
17
 
        kCFStringEncodingASCII = 0x0600
18
 
        kCFStringEncodingUnicode = 0x0100
19
 
        kCFStringEncodingUTF8 = 0x08000100
20
 
        kCFStringEncodingNonLossyASCII = 0x0BFF
21
 
 
22
 
    ctypedef unsigned char UInt8
23
 
    ctypedef unsigned short UniChar
24
 
    ctypedef int bool
25
 
    ctypedef bool Boolean
26
 
 
27
 
    ctypedef void* CFTypeRef
28
 
    ctypedef unsigned int CFTypeID
29
 
 
30
 
    ctypedef CFTypeRef CFStringRef
31
 
 
32
 
    ctypedef unsigned int CFIndex
33
 
    ctypedef struct CFRange:
34
 
        CFIndex location
35
 
        CFIndex length
36
 
 
37
 
    CFRange CFRangeMake(CFIndex location, CFIndex length)
38
 
 
39
 
    CFStringRef CFStringCreateWithCString(void* alloc, char* cStr,
40
 
        CFStringEncoding encoding)
41
 
    char* CFStringGetCStringPtr(CFStringRef string, CFStringEncoding encoding)
42
 
    Boolean CFStringGetCString(CFStringRef theString, char* buffer,
43
 
        CFIndex bufferSize, CFStringEncoding encoding)
44
 
    void CFRelease(CFTypeRef cf)
45
 
    CFIndex CFStringGetLength(CFStringRef theString)
46
 
    void CFStringGetCharacters(CFStringRef theString, CFRange range, UniChar *buffer)
47
 
 
48
 
    ctypedef enum CFURLPathStyle:
49
 
        kCFURLPOSIXPathStyle = 0
50
 
        kCFURLHFSPathStyle = 1
51
 
        kCFURLWindowsPathStyle = 2
52
 
 
53
 
    ctypedef CFTypeRef CFURLRef
54
 
 
55
 
    CFURLRef CFURLCreateWithFileSystemPath(void* allocator, 
56
 
        CFStringRef filePath, CFURLPathStyle pathStyle, bool isDirectory)
57
 
    void CFShow(CFTypeRef cf)
58
 
    CFTypeID CFGetTypeID(CFTypeRef cf)
59
 
 
60
 
    ctypedef CFTypeRef CFDictionaryRef
61
 
    
62