]> git.proxmox.com Git - rustc.git/blob - vendor/core-foundation-sys/src/bundle.rs
New upstream version 1.63.0+dfsg1
[rustc.git] / vendor / core-foundation-sys / src / bundle.rs
1 // Copyright 2013-2015 The Servo Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution.
3 //
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.
9
10 use std::os::raw::c_void;
11
12 use base::{CFTypeID, CFAllocatorRef};
13 use url::CFURLRef;
14 use dictionary::CFDictionaryRef;
15 use string::CFStringRef;
16
17 #[repr(C)]
18 pub struct __CFBundle(c_void);
19
20 pub type CFBundleRef = *mut __CFBundle;
21
22 extern {
23 /*
24 * CFBundle.h
25 */
26 pub fn CFBundleCreate(allocator: CFAllocatorRef, bundleURL: CFURLRef) -> CFBundleRef;
27
28 pub fn CFBundleGetBundleWithIdentifier(bundleID: CFStringRef) -> CFBundleRef;
29 pub fn CFBundleGetFunctionPointerForName(bundle: CFBundleRef, function_name: CFStringRef) -> *const c_void;
30 pub fn CFBundleGetMainBundle() -> CFBundleRef;
31 pub fn CFBundleGetInfoDictionary(bundle: CFBundleRef) -> CFDictionaryRef;
32
33 pub fn CFBundleGetTypeID() -> CFTypeID;
34 pub fn CFBundleCopyExecutableURL(bundle: CFBundleRef) -> CFURLRef;
35 pub fn CFBundleCopyPrivateFrameworksURL(bundle: CFBundleRef) -> CFURLRef;
36 pub fn CFBundleCopySharedSupportURL(bundle: CFBundleRef) -> CFURLRef;
37 pub fn CFBundleCopyBundleURL(bundle: CFBundleRef) -> CFURLRef;
38 }