Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update for rust-core-foundation changes. #4

Merged
merged 1 commit into from May 3, 2013
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Update for rust-core-foundation changes.

  • Loading branch information
metajack committed May 3, 2013
commit ba4118c3d054d1e4e3a4d8a31b9887830b24dc8e
@@ -78,7 +78,7 @@ pub fn init_cgl() -> CGLContextObj {
pub fn init_surface(size: Size2D<int>) -> IOSurface {
use platform::core_foundation::boolean::CFBoolean;
use number = platform::core_foundation::number::CFNumber::new;
use string = platform::core_foundation::string::CFString::wrap_extern;
use string = platform::core_foundation::string::CFString::wrap_shared;

// TODO: dictionary constructor should be less ridiculous.
// Or, we could add bindings for mutable dictionaries.
@@ -98,11 +98,11 @@ pub fn init_surface(size: Size2D<int>) -> IOSurface {
let v_is_global = CFBoolean::true_value();

io_surface::new(&core_foundation::dictionary::CFDictionary::new([
(*k_width.borrow_ref(), *v_width.borrow_type_ref()),
(*k_height.borrow_ref(), *v_height.borrow_type_ref()),
(*k_bytes_per_row.borrow_ref(), *v_bytes_per_row.borrow_type_ref()),
(*k_bytes_per_elem.borrow_ref(), *v_bytes_per_elem.borrow_type_ref()),
(*k_is_global.borrow_ref(), *v_is_global.borrow_type_ref()),
(*k_width.contents.borrow_ref(), *v_width.contents.borrow_type_ref()),
(*k_height.contents.borrow_ref(), *v_height.contents.borrow_type_ref()),
(*k_bytes_per_row.contents.borrow_ref(), *v_bytes_per_row.contents.borrow_type_ref()),
(*k_bytes_per_elem.contents.borrow_ref(), *v_bytes_per_elem.contents.borrow_type_ref()),
(*k_is_global.contents.borrow_ref(), *v_is_global.contents.borrow_type_ref()),
]))
}

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.