Skip to content

Added some CFRunLoop support. Timers work. Also added CFURLCreateWithFileSystemPath. #56

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

Merged
merged 3 commits into from
Feb 4, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use libc::{c_long, c_ulong};
use libc::{c_long, c_ulong, c_uint};
use std::num::Int;

pub type Boolean = u8;

pub type CFIndex = c_long;

pub type mach_port_t = c_uint;

pub trait CFIndexConvertible {
/// Always use this method to construct a `CFIndex` value. It performs bounds checking to
/// ensure the value is in range.
Expand Down
16 changes: 16 additions & 0 deletions src/date.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Copyright 2013 The Servo Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

pub type CFTimeInterval = f64;
pub type CFAbsoluteTime = CFTimeInterval;

#[link(name = "CoreFoundation", kind = "framework")]
extern {
pub fn CFAbsoluteTimeGetCurrent() -> CFAbsoluteTime;
}
4 changes: 4 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ pub mod string;
pub mod url;
#[cfg(target_os="macos")]
pub mod bundle;
#[cfg(target_os="macos")]
pub mod date;
#[cfg(target_os="macos")]
pub mod runloop;

#[cfg(all(target_os="macos", test))]
pub mod test {
Expand Down
Loading