objc2_core_services/generated/AE/
AEObjects.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4#[cfg(feature = "objc2")]
5use objc2::__framework_prelude::*;
6
7use crate::*;
8
9/// ** LOGICAL OPERATOR CONSTANTS  ***
10///
11/// See also [Apple's documentation](https://developer.apple.com/documentation/coreservices/kaeand?language=objc)
12pub const kAEAND: c_uint = 0x414e4420;
13/// ** LOGICAL OPERATOR CONSTANTS  ***
14///
15/// See also [Apple's documentation](https://developer.apple.com/documentation/coreservices/kaeor?language=objc)
16pub const kAEOR: c_uint = 0x4f522020;
17/// ** LOGICAL OPERATOR CONSTANTS  ***
18///
19/// See also [Apple's documentation](https://developer.apple.com/documentation/coreservices/kaenot?language=objc)
20pub const kAENOT: c_uint = 0x4e4f5420;
21/// ** ABSOLUTE ORDINAL CONSTANTS  ***
22///
23/// See also [Apple's documentation](https://developer.apple.com/documentation/coreservices/kaefirst?language=objc)
24pub const kAEFirst: c_uint = 0x66697273;
25/// ** ABSOLUTE ORDINAL CONSTANTS  ***
26///
27/// See also [Apple's documentation](https://developer.apple.com/documentation/coreservices/kaelast?language=objc)
28pub const kAELast: c_uint = 0x6c617374;
29/// ** ABSOLUTE ORDINAL CONSTANTS  ***
30///
31/// See also [Apple's documentation](https://developer.apple.com/documentation/coreservices/kaemiddle?language=objc)
32pub const kAEMiddle: c_uint = 0x6d696464;
33/// ** ABSOLUTE ORDINAL CONSTANTS  ***
34///
35/// See also [Apple's documentation](https://developer.apple.com/documentation/coreservices/kaeany?language=objc)
36pub const kAEAny: c_uint = 0x616e7920;
37/// ** ABSOLUTE ORDINAL CONSTANTS  ***
38///
39/// See also [Apple's documentation](https://developer.apple.com/documentation/coreservices/kaeall?language=objc)
40pub const kAEAll: c_uint = 0x616c6c20;
41/// ** RELATIVE ORDINAL CONSTANTS  ***
42///
43/// See also [Apple's documentation](https://developer.apple.com/documentation/coreservices/kaenext?language=objc)
44pub const kAENext: c_uint = 0x6e657874;
45/// ** RELATIVE ORDINAL CONSTANTS  ***
46///
47/// See also [Apple's documentation](https://developer.apple.com/documentation/coreservices/kaeprevious?language=objc)
48pub const kAEPrevious: c_uint = 0x70726576;
49/// ** KEYWORD CONSTANT    ***
50///
51/// See also [Apple's documentation](https://developer.apple.com/documentation/coreservices/keyaecompoperator?language=objc)
52pub const keyAECompOperator: c_uint = 0x72656c6f;
53/// ** KEYWORD CONSTANT    ***
54///
55/// See also [Apple's documentation](https://developer.apple.com/documentation/coreservices/keyaelogicalterms?language=objc)
56pub const keyAELogicalTerms: c_uint = 0x7465726d;
57/// ** KEYWORD CONSTANT    ***
58///
59/// See also [Apple's documentation](https://developer.apple.com/documentation/coreservices/keyaelogicaloperator?language=objc)
60pub const keyAELogicalOperator: c_uint = 0x6c6f6763;
61/// ** KEYWORD CONSTANT    ***
62///
63/// See also [Apple's documentation](https://developer.apple.com/documentation/coreservices/keyaeobject1?language=objc)
64pub const keyAEObject1: c_uint = 0x6f626a31;
65/// ** KEYWORD CONSTANT    ***
66///
67/// See also [Apple's documentation](https://developer.apple.com/documentation/coreservices/keyaeobject2?language=objc)
68pub const keyAEObject2: c_uint = 0x6f626a32;
69/// ** KEYWORD CONSTANT    ***
70///
71/// See also [Apple's documentation](https://developer.apple.com/documentation/coreservices/keyaedesiredclass?language=objc)
72pub const keyAEDesiredClass: c_uint = 0x77616e74;
73/// ** KEYWORD CONSTANT    ***
74///
75/// See also [Apple's documentation](https://developer.apple.com/documentation/coreservices/keyaecontainer?language=objc)
76pub const keyAEContainer: c_uint = 0x66726f6d;
77/// ** KEYWORD CONSTANT    ***
78///
79/// See also [Apple's documentation](https://developer.apple.com/documentation/coreservices/keyaekeyform?language=objc)
80pub const keyAEKeyForm: c_uint = 0x666f726d;
81/// ** KEYWORD CONSTANT    ***
82///
83/// See also [Apple's documentation](https://developer.apple.com/documentation/coreservices/keyaekeydata?language=objc)
84pub const keyAEKeyData: c_uint = 0x73656c64;
85
86/// [Apple's documentation](https://developer.apple.com/documentation/coreservices/keyaerangestart?language=objc)
87#[cfg(feature = "AEDataModel")]
88pub const keyAERangeStart: AEKeyword = 0x73746172;
89/// [Apple's documentation](https://developer.apple.com/documentation/coreservices/keyaerangestop?language=objc)
90#[cfg(feature = "AEDataModel")]
91pub const keyAERangeStop: AEKeyword = 0x73746f70;
92/// [Apple's documentation](https://developer.apple.com/documentation/coreservices/keydisposetokenproc?language=objc)
93#[cfg(feature = "AEDataModel")]
94pub const keyDisposeTokenProc: AEKeyword = 0x78746f6b;
95/// [Apple's documentation](https://developer.apple.com/documentation/coreservices/keyaecompareproc?language=objc)
96#[cfg(feature = "AEDataModel")]
97pub const keyAECompareProc: AEKeyword = 0x636d7072;
98/// [Apple's documentation](https://developer.apple.com/documentation/coreservices/keyaecountproc?language=objc)
99#[cfg(feature = "AEDataModel")]
100pub const keyAECountProc: AEKeyword = 0x636f6e74;
101/// [Apple's documentation](https://developer.apple.com/documentation/coreservices/keyaemarktokenproc?language=objc)
102#[cfg(feature = "AEDataModel")]
103pub const keyAEMarkTokenProc: AEKeyword = 0x6d6b6964;
104/// [Apple's documentation](https://developer.apple.com/documentation/coreservices/keyaemarkproc?language=objc)
105#[cfg(feature = "AEDataModel")]
106pub const keyAEMarkProc: AEKeyword = 0x6d61726b;
107/// [Apple's documentation](https://developer.apple.com/documentation/coreservices/keyaeadjustmarksproc?language=objc)
108#[cfg(feature = "AEDataModel")]
109pub const keyAEAdjustMarksProc: AEKeyword = 0x61646a6d;
110/// [Apple's documentation](https://developer.apple.com/documentation/coreservices/keyaegeterrdescproc?language=objc)
111#[cfg(feature = "AEDataModel")]
112pub const keyAEGetErrDescProc: AEKeyword = 0x696e6463;
113
114/// [Apple's documentation](https://developer.apple.com/documentation/coreservices/formabsoluteposition?language=objc)
115pub const formAbsolutePosition: c_uint = 0x696e6478;
116/// [Apple's documentation](https://developer.apple.com/documentation/coreservices/formrelativeposition?language=objc)
117pub const formRelativePosition: c_uint = 0x72656c65;
118/// [Apple's documentation](https://developer.apple.com/documentation/coreservices/formtest?language=objc)
119pub const formTest: c_uint = 0x74657374;
120/// [Apple's documentation](https://developer.apple.com/documentation/coreservices/formrange?language=objc)
121pub const formRange: c_uint = 0x72616e67;
122/// [Apple's documentation](https://developer.apple.com/documentation/coreservices/formpropertyid?language=objc)
123pub const formPropertyID: c_uint = 0x70726f70;
124/// [Apple's documentation](https://developer.apple.com/documentation/coreservices/formname?language=objc)
125pub const formName: c_uint = 0x6e616d65;
126/// [Apple's documentation](https://developer.apple.com/documentation/coreservices/formuniqueid?language=objc)
127pub const formUniqueID: c_uint = 0x49442020;
128
129/// [Apple's documentation](https://developer.apple.com/documentation/coreservices/typeobjectspecifier?language=objc)
130#[cfg(feature = "AEDataModel")]
131pub const typeObjectSpecifier: DescType = 0x6f626a20;
132/// [Apple's documentation](https://developer.apple.com/documentation/coreservices/typeobjectbeingexamined?language=objc)
133#[cfg(feature = "AEDataModel")]
134pub const typeObjectBeingExamined: DescType = 0x65786d6e;
135/// [Apple's documentation](https://developer.apple.com/documentation/coreservices/typecurrentcontainer?language=objc)
136#[cfg(feature = "AEDataModel")]
137pub const typeCurrentContainer: DescType = 0x63636e74;
138/// [Apple's documentation](https://developer.apple.com/documentation/coreservices/typetoken?language=objc)
139#[cfg(feature = "AEDataModel")]
140pub const typeToken: DescType = 0x746f6b65;
141/// [Apple's documentation](https://developer.apple.com/documentation/coreservices/typerelativedescriptor?language=objc)
142#[cfg(feature = "AEDataModel")]
143pub const typeRelativeDescriptor: DescType = 0x72656c20;
144/// [Apple's documentation](https://developer.apple.com/documentation/coreservices/typeabsoluteordinal?language=objc)
145#[cfg(feature = "AEDataModel")]
146pub const typeAbsoluteOrdinal: DescType = 0x6162736f;
147/// [Apple's documentation](https://developer.apple.com/documentation/coreservices/typeindexdescriptor?language=objc)
148#[cfg(feature = "AEDataModel")]
149pub const typeIndexDescriptor: DescType = 0x696e6465;
150/// [Apple's documentation](https://developer.apple.com/documentation/coreservices/typerangedescriptor?language=objc)
151#[cfg(feature = "AEDataModel")]
152pub const typeRangeDescriptor: DescType = 0x72616e67;
153/// [Apple's documentation](https://developer.apple.com/documentation/coreservices/typelogicaldescriptor?language=objc)
154#[cfg(feature = "AEDataModel")]
155pub const typeLogicalDescriptor: DescType = 0x6c6f6769;
156/// [Apple's documentation](https://developer.apple.com/documentation/coreservices/typecompdescriptor?language=objc)
157#[cfg(feature = "AEDataModel")]
158pub const typeCompDescriptor: DescType = 0x636d7064;
159/// [Apple's documentation](https://developer.apple.com/documentation/coreservices/typeosltokenlist?language=objc)
160#[cfg(feature = "AEDataModel")]
161pub const typeOSLTokenList: DescType = 0x6f73746c;
162
163/// [Apple's documentation](https://developer.apple.com/documentation/coreservices/kaeidominimum?language=objc)
164pub const kAEIDoMinimum: c_uint = 0x0000;
165/// [Apple's documentation](https://developer.apple.com/documentation/coreservices/kaeidowhose?language=objc)
166pub const kAEIDoWhose: c_uint = 0x0001;
167/// [Apple's documentation](https://developer.apple.com/documentation/coreservices/kaeidomarking?language=objc)
168pub const kAEIDoMarking: c_uint = 0x0004;
169/// [Apple's documentation](https://developer.apple.com/documentation/coreservices/kaepasssubdescs?language=objc)
170pub const kAEPassSubDescs: c_uint = 0x0008;
171/// [Apple's documentation](https://developer.apple.com/documentation/coreservices/kaeresolvenestedlists?language=objc)
172pub const kAEResolveNestedLists: c_uint = 0x0010;
173/// [Apple's documentation](https://developer.apple.com/documentation/coreservices/kaehandlesimpleranges?language=objc)
174pub const kAEHandleSimpleRanges: c_uint = 0x0020;
175/// [Apple's documentation](https://developer.apple.com/documentation/coreservices/kaeuserelativeiterators?language=objc)
176pub const kAEUseRelativeIterators: c_uint = 0x0040;
177
178/// [Apple's documentation](https://developer.apple.com/documentation/coreservices/typewhosedescriptor?language=objc)
179pub const typeWhoseDescriptor: c_uint = 0x77686f73;
180/// [Apple's documentation](https://developer.apple.com/documentation/coreservices/formwhose?language=objc)
181pub const formWhose: c_uint = 0x77686f73;
182/// [Apple's documentation](https://developer.apple.com/documentation/coreservices/typewhoserange?language=objc)
183pub const typeWhoseRange: c_uint = 0x77726e67;
184/// [Apple's documentation](https://developer.apple.com/documentation/coreservices/keyaewhoserangestart?language=objc)
185pub const keyAEWhoseRangeStart: c_uint = 0x77737472;
186/// [Apple's documentation](https://developer.apple.com/documentation/coreservices/keyaewhoserangestop?language=objc)
187pub const keyAEWhoseRangeStop: c_uint = 0x77737470;
188/// [Apple's documentation](https://developer.apple.com/documentation/coreservices/keyaeindex?language=objc)
189pub const keyAEIndex: c_uint = 0x6b696478;
190/// [Apple's documentation](https://developer.apple.com/documentation/coreservices/keyaetest?language=objc)
191pub const keyAETest: c_uint = 0x6b747374;
192
193/// [Apple's documentation](https://developer.apple.com/documentation/coreservices/ccnttokenrecord?language=objc)
194#[cfg(feature = "AEDataModel")]
195#[repr(C, packed(2))]
196#[derive(Clone, Copy, Debug, PartialEq)]
197pub struct ccntTokenRecord {
198    pub tokenClass: DescType,
199    pub token: AEDesc,
200}
201
202#[cfg(all(feature = "AEDataModel", feature = "objc2"))]
203unsafe impl Encode for ccntTokenRecord {
204    const ENCODING: Encoding = Encoding::Struct(
205        "ccntTokenRecord",
206        &[<DescType>::ENCODING, <AEDesc>::ENCODING],
207    );
208}
209
210#[cfg(all(feature = "AEDataModel", feature = "objc2"))]
211unsafe impl RefEncode for ccntTokenRecord {
212    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
213}
214
215/// [Apple's documentation](https://developer.apple.com/documentation/coreservices/ccnttokenrecptr?language=objc)
216#[cfg(feature = "AEDataModel")]
217pub type ccntTokenRecPtr = *mut ccntTokenRecord;
218
219/// [Apple's documentation](https://developer.apple.com/documentation/coreservices/ccnttokenrechandle?language=objc)
220#[cfg(feature = "AEDataModel")]
221pub type ccntTokenRecHandle = *mut ccntTokenRecPtr;
222
223/// [Apple's documentation](https://developer.apple.com/documentation/coreservices/oslaccessorprocptr?language=objc)
224#[cfg(feature = "AEDataModel")]
225pub type OSLAccessorProcPtr = Option<
226    unsafe extern "C-unwind" fn(
227        DescType,
228        *const AEDesc,
229        DescType,
230        DescType,
231        *const AEDesc,
232        *mut AEDesc,
233        SRefCon,
234    ) -> OSErr,
235>;
236
237/// [Apple's documentation](https://developer.apple.com/documentation/coreservices/oslcompareprocptr?language=objc)
238#[cfg(feature = "AEDataModel")]
239pub type OSLCompareProcPtr = Option<
240    unsafe extern "C-unwind" fn(DescType, *const AEDesc, *const AEDesc, *mut Boolean) -> OSErr,
241>;
242
243/// [Apple's documentation](https://developer.apple.com/documentation/coreservices/oslcountprocptr?language=objc)
244#[cfg(feature = "AEDataModel")]
245pub type OSLCountProcPtr =
246    Option<unsafe extern "C-unwind" fn(DescType, DescType, *const AEDesc, *mut c_long) -> OSErr>;
247
248/// [Apple's documentation](https://developer.apple.com/documentation/coreservices/osldisposetokenprocptr?language=objc)
249#[cfg(feature = "AEDataModel")]
250pub type OSLDisposeTokenProcPtr = Option<unsafe extern "C-unwind" fn(*mut AEDesc) -> OSErr>;
251
252/// [Apple's documentation](https://developer.apple.com/documentation/coreservices/oslgetmarktokenprocptr?language=objc)
253#[cfg(feature = "AEDataModel")]
254pub type OSLGetMarkTokenProcPtr =
255    Option<unsafe extern "C-unwind" fn(*const AEDesc, DescType, *mut AEDesc) -> OSErr>;
256
257/// [Apple's documentation](https://developer.apple.com/documentation/coreservices/oslgeterrdescprocptr?language=objc)
258#[cfg(feature = "AEDataModel")]
259pub type OSLGetErrDescProcPtr = Option<unsafe extern "C-unwind" fn(*mut *mut AEDesc) -> OSErr>;
260
261/// [Apple's documentation](https://developer.apple.com/documentation/coreservices/oslmarkprocptr?language=objc)
262#[cfg(feature = "AEDataModel")]
263pub type OSLMarkProcPtr =
264    Option<unsafe extern "C-unwind" fn(*const AEDesc, *const AEDesc, c_long) -> OSErr>;
265
266/// [Apple's documentation](https://developer.apple.com/documentation/coreservices/osladjustmarksprocptr?language=objc)
267#[cfg(feature = "AEDataModel")]
268pub type OSLAdjustMarksProcPtr =
269    Option<unsafe extern "C-unwind" fn(c_long, c_long, *const AEDesc) -> OSErr>;
270
271/// [Apple's documentation](https://developer.apple.com/documentation/coreservices/oslaccessorupp?language=objc)
272#[cfg(feature = "AEDataModel")]
273pub type OSLAccessorUPP = OSLAccessorProcPtr;
274
275/// [Apple's documentation](https://developer.apple.com/documentation/coreservices/oslcompareupp?language=objc)
276#[cfg(feature = "AEDataModel")]
277pub type OSLCompareUPP = OSLCompareProcPtr;
278
279/// [Apple's documentation](https://developer.apple.com/documentation/coreservices/oslcountupp?language=objc)
280#[cfg(feature = "AEDataModel")]
281pub type OSLCountUPP = OSLCountProcPtr;
282
283/// [Apple's documentation](https://developer.apple.com/documentation/coreservices/osldisposetokenupp?language=objc)
284#[cfg(feature = "AEDataModel")]
285pub type OSLDisposeTokenUPP = OSLDisposeTokenProcPtr;
286
287/// [Apple's documentation](https://developer.apple.com/documentation/coreservices/oslgetmarktokenupp?language=objc)
288#[cfg(feature = "AEDataModel")]
289pub type OSLGetMarkTokenUPP = OSLGetMarkTokenProcPtr;
290
291/// [Apple's documentation](https://developer.apple.com/documentation/coreservices/oslgeterrdescupp?language=objc)
292#[cfg(feature = "AEDataModel")]
293pub type OSLGetErrDescUPP = OSLGetErrDescProcPtr;
294
295/// [Apple's documentation](https://developer.apple.com/documentation/coreservices/oslmarkupp?language=objc)
296#[cfg(feature = "AEDataModel")]
297pub type OSLMarkUPP = OSLMarkProcPtr;
298
299/// [Apple's documentation](https://developer.apple.com/documentation/coreservices/osladjustmarksupp?language=objc)
300#[cfg(feature = "AEDataModel")]
301pub type OSLAdjustMarksUPP = OSLAdjustMarksProcPtr;
302
303extern "C-unwind" {
304    /// # Safety
305    ///
306    /// `user_routine` must be implemented correctly.
307    #[cfg(feature = "AEDataModel")]
308    pub fn NewOSLAccessorUPP(user_routine: OSLAccessorProcPtr) -> OSLAccessorUPP;
309}
310
311extern "C-unwind" {
312    /// # Safety
313    ///
314    /// `user_routine` must be implemented correctly.
315    #[cfg(feature = "AEDataModel")]
316    pub fn NewOSLCompareUPP(user_routine: OSLCompareProcPtr) -> OSLCompareUPP;
317}
318
319extern "C-unwind" {
320    /// # Safety
321    ///
322    /// `user_routine` must be implemented correctly.
323    #[cfg(feature = "AEDataModel")]
324    pub fn NewOSLCountUPP(user_routine: OSLCountProcPtr) -> OSLCountUPP;
325}
326
327extern "C-unwind" {
328    /// # Safety
329    ///
330    /// `user_routine` must be implemented correctly.
331    #[cfg(feature = "AEDataModel")]
332    pub fn NewOSLDisposeTokenUPP(user_routine: OSLDisposeTokenProcPtr) -> OSLDisposeTokenUPP;
333}
334
335extern "C-unwind" {
336    /// # Safety
337    ///
338    /// `user_routine` must be implemented correctly.
339    #[cfg(feature = "AEDataModel")]
340    pub fn NewOSLGetMarkTokenUPP(user_routine: OSLGetMarkTokenProcPtr) -> OSLGetMarkTokenUPP;
341}
342
343extern "C-unwind" {
344    /// # Safety
345    ///
346    /// `user_routine` must be implemented correctly.
347    #[cfg(feature = "AEDataModel")]
348    pub fn NewOSLGetErrDescUPP(user_routine: OSLGetErrDescProcPtr) -> OSLGetErrDescUPP;
349}
350
351extern "C-unwind" {
352    /// # Safety
353    ///
354    /// `user_routine` must be implemented correctly.
355    #[cfg(feature = "AEDataModel")]
356    pub fn NewOSLMarkUPP(user_routine: OSLMarkProcPtr) -> OSLMarkUPP;
357}
358
359extern "C-unwind" {
360    /// # Safety
361    ///
362    /// `user_routine` must be implemented correctly.
363    #[cfg(feature = "AEDataModel")]
364    pub fn NewOSLAdjustMarksUPP(user_routine: OSLAdjustMarksProcPtr) -> OSLAdjustMarksUPP;
365}
366
367extern "C-unwind" {
368    /// # Safety
369    ///
370    /// `user_upp` must be implemented correctly.
371    #[cfg(feature = "AEDataModel")]
372    pub fn DisposeOSLAccessorUPP(user_upp: OSLAccessorUPP);
373}
374
375extern "C-unwind" {
376    /// # Safety
377    ///
378    /// `user_upp` must be implemented correctly.
379    #[cfg(feature = "AEDataModel")]
380    pub fn DisposeOSLCompareUPP(user_upp: OSLCompareUPP);
381}
382
383extern "C-unwind" {
384    /// # Safety
385    ///
386    /// `user_upp` must be implemented correctly.
387    #[cfg(feature = "AEDataModel")]
388    pub fn DisposeOSLCountUPP(user_upp: OSLCountUPP);
389}
390
391extern "C-unwind" {
392    /// # Safety
393    ///
394    /// `user_upp` must be implemented correctly.
395    #[cfg(feature = "AEDataModel")]
396    pub fn DisposeOSLDisposeTokenUPP(user_upp: OSLDisposeTokenUPP);
397}
398
399extern "C-unwind" {
400    /// # Safety
401    ///
402    /// `user_upp` must be implemented correctly.
403    #[cfg(feature = "AEDataModel")]
404    pub fn DisposeOSLGetMarkTokenUPP(user_upp: OSLGetMarkTokenUPP);
405}
406
407extern "C-unwind" {
408    /// # Safety
409    ///
410    /// `user_upp` must be implemented correctly.
411    #[cfg(feature = "AEDataModel")]
412    pub fn DisposeOSLGetErrDescUPP(user_upp: OSLGetErrDescUPP);
413}
414
415extern "C-unwind" {
416    /// # Safety
417    ///
418    /// `user_upp` must be implemented correctly.
419    #[cfg(feature = "AEDataModel")]
420    pub fn DisposeOSLMarkUPP(user_upp: OSLMarkUPP);
421}
422
423extern "C-unwind" {
424    /// # Safety
425    ///
426    /// `user_upp` must be implemented correctly.
427    #[cfg(feature = "AEDataModel")]
428    pub fn DisposeOSLAdjustMarksUPP(user_upp: OSLAdjustMarksUPP);
429}
430
431extern "C-unwind" {
432    /// # Safety
433    ///
434    /// - `container` must be a valid pointer.
435    /// - `selection_data` must be a valid pointer.
436    /// - `value` must be a valid pointer.
437    /// - `accessor_refcon` must be a valid pointer.
438    /// - `user_upp` must be implemented correctly.
439    #[cfg(feature = "AEDataModel")]
440    pub fn InvokeOSLAccessorUPP(
441        desired_class: DescType,
442        container: *const AEDesc,
443        container_class: DescType,
444        form: DescType,
445        selection_data: *const AEDesc,
446        value: *mut AEDesc,
447        accessor_refcon: SRefCon,
448        user_upp: OSLAccessorUPP,
449    ) -> OSErr;
450}
451
452extern "C-unwind" {
453    /// # Safety
454    ///
455    /// - `obj1` must be a valid pointer.
456    /// - `obj2` must be a valid pointer.
457    /// - `result` must be a valid pointer.
458    /// - `user_upp` must be implemented correctly.
459    #[cfg(feature = "AEDataModel")]
460    pub fn InvokeOSLCompareUPP(
461        oper: DescType,
462        obj1: *const AEDesc,
463        obj2: *const AEDesc,
464        result: *mut Boolean,
465        user_upp: OSLCompareUPP,
466    ) -> OSErr;
467}
468
469extern "C-unwind" {
470    /// # Safety
471    ///
472    /// - `container` must be a valid pointer.
473    /// - `result` must be a valid pointer.
474    /// - `user_upp` must be implemented correctly.
475    #[cfg(feature = "AEDataModel")]
476    pub fn InvokeOSLCountUPP(
477        desired_type: DescType,
478        container_class: DescType,
479        container: *const AEDesc,
480        result: *mut c_long,
481        user_upp: OSLCountUPP,
482    ) -> OSErr;
483}
484
485extern "C-unwind" {
486    /// # Safety
487    ///
488    /// - `unneeded_token` must be a valid pointer.
489    /// - `user_upp` must be implemented correctly.
490    #[cfg(feature = "AEDataModel")]
491    pub fn InvokeOSLDisposeTokenUPP(
492        unneeded_token: *mut AEDesc,
493        user_upp: OSLDisposeTokenUPP,
494    ) -> OSErr;
495}
496
497extern "C-unwind" {
498    /// # Safety
499    ///
500    /// - `d_container_token` must be a valid pointer.
501    /// - `result` must be a valid pointer.
502    /// - `user_upp` must be implemented correctly.
503    #[cfg(feature = "AEDataModel")]
504    pub fn InvokeOSLGetMarkTokenUPP(
505        d_container_token: *const AEDesc,
506        container_class: DescType,
507        result: *mut AEDesc,
508        user_upp: OSLGetMarkTokenUPP,
509    ) -> OSErr;
510}
511
512extern "C-unwind" {
513    /// # Safety
514    ///
515    /// - `app_desc_ptr` must be a valid pointer.
516    /// - `user_upp` must be implemented correctly.
517    #[cfg(feature = "AEDataModel")]
518    pub fn InvokeOSLGetErrDescUPP(
519        app_desc_ptr: *mut *mut AEDesc,
520        user_upp: OSLGetErrDescUPP,
521    ) -> OSErr;
522}
523
524extern "C-unwind" {
525    /// # Safety
526    ///
527    /// - `d_token` must be a valid pointer.
528    /// - `mark_token` must be a valid pointer.
529    /// - `user_upp` must be implemented correctly.
530    #[cfg(feature = "AEDataModel")]
531    pub fn InvokeOSLMarkUPP(
532        d_token: *const AEDesc,
533        mark_token: *const AEDesc,
534        index: c_long,
535        user_upp: OSLMarkUPP,
536    ) -> OSErr;
537}
538
539extern "C-unwind" {
540    /// # Safety
541    ///
542    /// - `mark_token` must be a valid pointer.
543    /// - `user_upp` must be implemented correctly.
544    #[cfg(feature = "AEDataModel")]
545    pub fn InvokeOSLAdjustMarksUPP(
546        new_start: c_long,
547        new_stop: c_long,
548        mark_token: *const AEDesc,
549        user_upp: OSLAdjustMarksUPP,
550    ) -> OSErr;
551}
552
553extern "C-unwind" {
554    pub fn AEObjectInit() -> OSErr;
555}
556
557extern "C-unwind" {
558    /// # Safety
559    ///
560    /// - `my_compare_proc` must be implemented correctly.
561    /// - `my_count_proc` must be implemented correctly.
562    /// - `my_dispose_token_proc` must be implemented correctly.
563    /// - `my_get_mark_token_proc` must be implemented correctly.
564    /// - `my_mark_proc` must be implemented correctly.
565    /// - `my_adjust_marks_proc` must be implemented correctly.
566    /// - `my_get_err_desc_proc_ptr` must be implemented correctly.
567    #[cfg(feature = "AEDataModel")]
568    pub fn AESetObjectCallbacks(
569        my_compare_proc: OSLCompareUPP,
570        my_count_proc: OSLCountUPP,
571        my_dispose_token_proc: OSLDisposeTokenUPP,
572        my_get_mark_token_proc: OSLGetMarkTokenUPP,
573        my_mark_proc: OSLMarkUPP,
574        my_adjust_marks_proc: OSLAdjustMarksUPP,
575        my_get_err_desc_proc_ptr: OSLGetErrDescUPP,
576    ) -> OSErr;
577}
578
579extern "C-unwind" {
580    /// # Safety
581    ///
582    /// - `object_specifier` must be a valid pointer.
583    /// - `the_token` must be a valid pointer.
584    #[cfg(feature = "AEDataModel")]
585    pub fn AEResolve(
586        object_specifier: *const AEDesc,
587        callback_flags: c_short,
588        the_token: *mut AEDesc,
589    ) -> OSErr;
590}
591
592/// # Safety
593///
594/// - `the_accessor` must be implemented correctly.
595/// - `accessor_refcon` must be a valid pointer.
596#[cfg(feature = "AEDataModel")]
597#[inline]
598pub unsafe extern "C-unwind" fn AEInstallObjectAccessor(
599    desired_class: DescType,
600    container_type: DescType,
601    the_accessor: OSLAccessorUPP,
602    accessor_refcon: SRefCon,
603    is_sys_handler: bool,
604) -> OSErr {
605    extern "C-unwind" {
606        fn AEInstallObjectAccessor(
607            desired_class: DescType,
608            container_type: DescType,
609            the_accessor: OSLAccessorUPP,
610            accessor_refcon: SRefCon,
611            is_sys_handler: Boolean,
612        ) -> OSErr;
613    }
614    unsafe {
615        AEInstallObjectAccessor(
616            desired_class,
617            container_type,
618            the_accessor,
619            accessor_refcon,
620            is_sys_handler as _,
621        )
622    }
623}
624
625/// # Safety
626///
627/// `the_accessor` must be implemented correctly.
628#[cfg(feature = "AEDataModel")]
629#[inline]
630pub unsafe extern "C-unwind" fn AERemoveObjectAccessor(
631    desired_class: DescType,
632    container_type: DescType,
633    the_accessor: OSLAccessorUPP,
634    is_sys_handler: bool,
635) -> OSErr {
636    extern "C-unwind" {
637        fn AERemoveObjectAccessor(
638            desired_class: DescType,
639            container_type: DescType,
640            the_accessor: OSLAccessorUPP,
641            is_sys_handler: Boolean,
642        ) -> OSErr;
643    }
644    unsafe {
645        AERemoveObjectAccessor(
646            desired_class,
647            container_type,
648            the_accessor,
649            is_sys_handler as _,
650        )
651    }
652}
653
654/// # Safety
655///
656/// - `accessor` must be a valid pointer.
657/// - `accessor_refcon` must be a valid pointer.
658#[cfg(feature = "AEDataModel")]
659#[inline]
660pub unsafe extern "C-unwind" fn AEGetObjectAccessor(
661    desired_class: DescType,
662    container_type: DescType,
663    accessor: *mut OSLAccessorUPP,
664    accessor_refcon: *mut SRefCon,
665    is_sys_handler: bool,
666) -> OSErr {
667    extern "C-unwind" {
668        fn AEGetObjectAccessor(
669            desired_class: DescType,
670            container_type: DescType,
671            accessor: *mut OSLAccessorUPP,
672            accessor_refcon: *mut SRefCon,
673            is_sys_handler: Boolean,
674        ) -> OSErr;
675    }
676    unsafe {
677        AEGetObjectAccessor(
678            desired_class,
679            container_type,
680            accessor,
681            accessor_refcon,
682            is_sys_handler as _,
683        )
684    }
685}
686
687extern "C-unwind" {
688    /// # Safety
689    ///
690    /// `the_token` must be a valid pointer.
691    #[cfg(feature = "AEDataModel")]
692    pub fn AEDisposeToken(the_token: *mut AEDesc) -> OSErr;
693}
694
695extern "C-unwind" {
696    /// # Safety
697    ///
698    /// - `container_token` must be a valid pointer.
699    /// - `key_data` must be a valid pointer.
700    /// - `token` must be a valid pointer.
701    #[cfg(feature = "AEDataModel")]
702    pub fn AECallObjectAccessor(
703        desired_class: DescType,
704        container_token: *const AEDesc,
705        container_class: DescType,
706        key_form: DescType,
707        key_data: *const AEDesc,
708        token: *mut AEDesc,
709    ) -> OSErr;
710}