Mercurial > projects > dstep
comparison dstep/corefoundation/CFXMLNode.d @ 11:07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Sat, 01 Aug 2009 15:03:28 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
10:27e00625790b | 11:07194b026fa4 |
---|---|
1 /** | |
2 * Copyright: Copyright (c) 2009 Jacob Carlborg. | |
3 * Authors: Jacob Carlborg | |
4 * Version: Initial created: Jul 12, 2009 | |
5 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0) | |
6 */ | |
7 module dstep.corefoundation.CFXMLNode; | |
8 | |
9 import dstep.corefoundation.CFArray; | |
10 import dstep.corefoundation.CFBase; | |
11 import dstep.corefoundation.CFDictionary; | |
12 import dstep.corefoundation.CFString; | |
13 import dstep.corefoundation.CFTree; | |
14 import dstep.corefoundation.CFURL; | |
15 import dstep.objc.bridge.Bridge; | |
16 import dstep.objc.objc : id; | |
17 | |
18 struct __CFXMLNode; | |
19 alias __CFXMLNode* CFXMLNodeRef; | |
20 alias CFTreeRef CFXMLTreeRef; | |
21 alias int CFXMLNodeTypeCode; | |
22 alias int CFXMLEntityTypeCode; | |
23 | |
24 enum | |
25 { | |
26 kCFXMLNodeCurrentVersion = 1 | |
27 } | |
28 | |
29 enum | |
30 { | |
31 kCFXMLNodeTypeDocument = 1, | |
32 kCFXMLNodeTypeElement = 2, | |
33 kCFXMLNodeTypeAttribute = 3, | |
34 kCFXMLNodeTypeProcessingInstruction = 4, | |
35 kCFXMLNodeTypeComment = 5, | |
36 kCFXMLNodeTypeText = 6, | |
37 kCFXMLNodeTypeCDATASection = 7, | |
38 kCFXMLNodeTypeDocumentFragment = 8, | |
39 kCFXMLNodeTypeEntity = 9, | |
40 kCFXMLNodeTypeEntityReference = 10, | |
41 kCFXMLNodeTypeDocumentType = 11, | |
42 kCFXMLNodeTypeWhitespace = 12, | |
43 kCFXMLNodeTypeNotation = 13, | |
44 kCFXMLNodeTypeElementTypeDeclaration = 14, | |
45 kCFXMLNodeTypeAttributeListDeclaration = 15 | |
46 } | |
47 | |
48 enum | |
49 { | |
50 kCFXMLEntityTypeParameter, | |
51 kCFXMLEntityTypeParsedInternal, | |
52 kCFXMLEntityTypeParsedExternal, | |
53 kCFXMLEntityTypeUnparsed, | |
54 kCFXMLEntityTypeCharacter | |
55 } | |
56 | |
57 struct CFXMLElementInfo | |
58 { | |
59 CFDictionaryRef attributes; | |
60 CFArrayRef attributeOrder; | |
61 ubyte isEmpty; | |
62 char* _reserved; | |
63 } | |
64 | |
65 | |
66 struct CFXMLProcessingInstructionInfo | |
67 { | |
68 CFStringRef dataString; | |
69 } | |
70 | |
71 | |
72 struct CFXMLDocumentInfo | |
73 { | |
74 CFURLRef sourceURL; | |
75 uint encoding; | |
76 } | |
77 | |
78 | |
79 struct CFXMLExternalID | |
80 { | |
81 CFURLRef systemID; | |
82 CFStringRef publicID; | |
83 } | |
84 | |
85 | |
86 struct CFXMLDocumentTypeInfo | |
87 { | |
88 CFXMLExternalID externalID; | |
89 } | |
90 | |
91 | |
92 struct CFXMLNotationInfo | |
93 { | |
94 CFXMLExternalID externalID; | |
95 } | |
96 | |
97 | |
98 struct CFXMLElementTypeDeclarationInfo | |
99 { | |
100 CFStringRef contentDescription; | |
101 } | |
102 | |
103 | |
104 struct CFXMLAttributeDeclarationInfo | |
105 { | |
106 CFStringRef attributeName; | |
107 CFStringRef typeString; | |
108 CFStringRef defaultString; | |
109 } | |
110 | |
111 | |
112 struct CFXMLAttributeListDeclarationInfo | |
113 { | |
114 int numberOfAttributes; | |
115 CFXMLAttributeDeclarationInfo* attributes; | |
116 } | |
117 | |
118 | |
119 struct CFXMLEntityInfo | |
120 { | |
121 int entityType; | |
122 CFStringRef replacementText; | |
123 CFXMLExternalID entityID; | |
124 CFStringRef notationName; | |
125 } | |
126 | |
127 | |
128 struct CFXMLEntityReferenceInfo | |
129 { | |
130 int entityType; | |
131 } | |
132 | |
133 extern (C) | |
134 { | |
135 uint CFXMLNodeGetTypeID (); | |
136 CFXMLNodeRef CFXMLNodeCreate (CFAllocatorRef alloc, int xmlType, CFStringRef dataString, void* additionalInfoPtr, int version_); | |
137 CFXMLNodeRef CFXMLNodeCreateCopy (CFAllocatorRef alloc, CFXMLNodeRef origNode); | |
138 int CFXMLNodeGetTypeCode (CFXMLNodeRef node); | |
139 CFStringRef CFXMLNodeGetString (CFXMLNodeRef node); | |
140 void* CFXMLNodeGetInfoPtr (CFXMLNodeRef node); | |
141 int CFXMLNodeGetVersion (CFXMLNodeRef node); | |
142 CFXMLTreeRef CFXMLTreeCreateWithNode (CFAllocatorRef allocator, CFXMLNodeRef node); | |
143 CFXMLNodeRef CFXMLTreeGetNode (CFXMLTreeRef xmlTree); | |
144 } |