Update for language changes
This commit is contained in:
+6
-1
@@ -19,7 +19,12 @@ pub type CGDataProviderRef = *__CGDataProvider;
|
||||
|
||||
pub impl CGDataProviderRef : AbstractCFTypeRef {
|
||||
pure fn as_type_ref(&self) -> CFTypeRef { *self as CFTypeRef }
|
||||
static pure fn type_id() -> CFTypeID { unsafe { CGDataProviderGetTypeID() } }
|
||||
|
||||
static pure fn type_id() -> CFTypeID {
|
||||
unsafe {
|
||||
CGDataProviderGetTypeID()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub type CGDataProvider = CFWrapper<CGDataProviderRef, (), ()>;
|
||||
|
||||
@@ -11,14 +11,19 @@ pub type CGFontRef = *__CGFont;
|
||||
|
||||
pub impl CGFontRef : AbstractCFTypeRef {
|
||||
pure fn as_type_ref(&self) -> CFTypeRef { *self as CFTypeRef }
|
||||
static pure fn type_id() -> CFTypeID { unsafe { CGFontGetTypeID() } }
|
||||
|
||||
static pure fn type_id() -> CFTypeID {
|
||||
unsafe {
|
||||
CGFontGetTypeID()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub type CGFont = CFWrapper<CGFontRef, (), ()>;
|
||||
|
||||
pub fn create_with_data_provider(provider: &CGDataProvider) -> CGFont {
|
||||
// TODO: error handling
|
||||
unsafe {
|
||||
// TODO: error handling
|
||||
let value = CGFontCreateWithDataProvider(*provider.borrow_ref());
|
||||
CFWrapper::wrap_owned(value)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user