Auto merge of #67 - servo:10.11, r=jrmuizel

Hide newer APIs behind features

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/core-graphics-rs/67)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo
2017-01-13 16:00:36 -08:00
committed by GitHub
3 changed files with 11 additions and 1 deletions
+4
View File
@@ -5,5 +5,9 @@ rust:
- beta
- stable
script:
- cargo test
- cargo test --features="elcapitan"
notifications:
webhooks: http://build.servo.org:54856/travis
+5 -1
View File
@@ -3,10 +3,14 @@ name = "core-graphics"
description = "Bindings to Core Graphics for OS X"
homepage = "https://github.com/servo/core-graphics-rs"
repository = "https://github.com/servo/core-graphics-rs"
version = "0.4.3"
version = "0.5.0"
authors = ["The Servo Project Developers"]
license = "MIT / Apache-2.0"
[features]
default = []
elcapitan = []
[dependencies]
libc = "0.2"
core-foundation = "0.2"
+2
View File
@@ -204,6 +204,7 @@ impl CGEvent {
}
}
#[cfg(feature = "elcapitan")]
pub fn post_to_pid(&self, pid: libc::pid_t) {
unsafe {
CGEventPostToPid(pid, self.as_concrete_TypeRef());
@@ -268,6 +269,7 @@ extern {
/// taps.
fn CGEventPost(tapLocation: CGEventTapLocation, event: CGEventRef);
#[cfg(feature = "elcapitan")]
/// Post an event to a specified process ID
fn CGEventPostToPid(pid: libc::pid_t, event: CGEventRef);