Commit Graph

139 Commits

Author SHA1 Message Date
bors-servo 449990e7e9 Auto merge of #57 - nox:fix-all-the-things, r=Manishearth
Fix all the things

<!-- 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/57)
<!-- Reviewable:end -->
2016-09-01 05:05:56 -05:00
Anthony Ramine e805130b6b Fix all private_in_public errors 2016-09-01 11:58:05 +02:00
Anthony Ramine e47505dfa8 Don't reexport libc 2016-09-01 11:57:12 +02:00
Anthony Ramine 66df225fd8 Silence an unused_variables warning 2016-09-01 11:51:28 +02:00
Anthony Ramine e2e56e909b Remove some unused imports 2016-09-01 11:50:19 +02:00
Anthony Ramine 17c0b1ed9e Remove some useless comment and commented-out code 2016-09-01 11:49:45 +02:00
Anthony Ramine 39173f66d7 Silence all non_upper_case_globals warnings 2016-09-01 11:49:25 +02:00
bors-servo ea5de395f2 Auto merge of #54 - servo:travis, r=nox
Test on stable.

<!-- 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/54)
<!-- Reviewable:end -->
2016-08-03 04:15:26 -05:00
Ms2ger 51841f4bee Test on stable. 2016-08-03 11:09:44 +02:00
bors-servo f40f6b6b2d Auto merge of #53 - nox:serde, r=metajack
Update serde to 0.8

<!-- 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/53)
<!-- Reviewable:end -->
2016-08-01 10:31:43 -05:00
Anthony Ramine 8675f41d7e Update serde to 0.8 2016-07-30 03:25:49 +02:00
Patrick Walton eaea55d746 0.3.2 2016-06-03 17:21:46 -07:00
bors-servo c87f22c4ee Auto merge of #51 - pcwalton:surface-shape, r=metajack
Add bindings to the private `CGSNewRegionWithRectList` and `CGSSetSurfaceShape` APIs, and improve ergonomics of the geometry types.

These changes allow us to set rounded corners on OpenGL views the same way Cocoa does, dramatically improving performance.

r? @metajack
cc @paulrouget

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/core-graphics-rs/51)
<!-- Reviewable:end -->
2016-06-03 19:15:41 -05:00
Patrick Walton 443e95792a private: Add a binding to CGSSetSurfaceShape.
This is useful to make OpenGL areas have rounded corners. It matches
what the Cocoa framework does internally for this.
2016-06-03 16:08:10 -07:00
Patrick Walton 621a033730 private: Add a binding to CGSNewRegionWithRectList. 2016-06-03 16:07:24 -07:00
Patrick Walton 828a7fde4b private: Rename CGSRegion types to match reverse engineered headers
available elsewhere.

See: https://github.com/NUIKit/CGSInternal/blob/master/CGSRegion.h
2016-06-03 16:05:44 -07:00
Patrick Walton 35d5156182 geometry: Add a binding to CGRectInset. 2016-06-03 16:04:59 -07:00
Patrick Walton 508a240632 geometry: Add some convenience constructors for geometry types. 2016-06-03 16:04:40 -07:00
Patrick Walton 9b16b0e214 geometry: Add CG_ZERO_POINT to match CGZeroPoint. 2016-06-03 16:04:03 -07:00
Patrick Walton b31cffb648 geometry: Make CGPoint, CGRect, and CGSize copyable and clonable. 2016-06-03 16:03:35 -07:00
Patrick Walton 1229483c10 0.3.1 2016-06-01 20:12:42 -07:00
bors-servo 8be09b1ad4 Auto merge of #50 - pcwalton:regions, r=metajack
Add some bindings to the private `CGSRegion` APIs.

These enable us to tell the window server about the opaque regions of
the window so that it can perform occlusion culling.

See https://github.com/NUIKit/CGSInternal/blob/master/CGSRegion.h

r? @metajack

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/core-graphics-rs/50)
<!-- Reviewable:end -->
2016-05-31 18:47:43 -05:00
Patrick Walton 3c3727442e Add some bindings to the private CGSRegion APIs.
These enable us to tell the window server about the opaque regions of
the window so that it can perform occlusion culling.

See https://github.com/NUIKit/CGSInternal/blob/master/CGSRegion.h
2016-05-31 16:50:05 -07:00
bors-servo 0d466523ec Auto merge of #49 - OpenAnsible:master, r=pcwalton
Add API `CGWindowListCopyWindowInfo `

add `CGWindowListCopyWindowInfo ` API to `display.rs`.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/core-graphics-rs/49)
<!-- Reviewable:end -->
2016-05-11 20:30:09 -07:00
Luo d1cb1a7764 add some display api. 2016-05-12 06:34:32 +08:00
Luo b952ddd051 update src/display.rs 2016-05-10 13:54:11 +08:00
bors-servo 02f56b1c58 Auto merge of #48 - servo:bump-serde, r=larsbergstrom
Bump serde to 0.7

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/core-graphics-rs/48)
<!-- Reviewable:end -->
2016-03-09 07:35:23 +05:30
Anthony Ramine b7c2f5c294 Bump serde to 0.7 2016-03-01 01:54:41 +01:00
bors-servo 6f9c47c5f0 Auto merge of #47 - servo:bump, r=glennw
Bump version to 0.2.1

In order to pick up this change:

https://github.com/servo/core-graphics-rs/pull/46

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/core-graphics-rs/47)
<!-- Reviewable:end -->
2015-12-15 07:42:23 +05:30
Corey Farwell f5e5e9c331 Bump version to 0.2.1
In order to pick up this change:

https://github.com/servo/core-graphics-rs/pull/46
2015-12-14 21:10:40 -05:00
bors-servo 553c51f65c Auto merge of #46 - pcwalton:postscript-names, r=glennw
Support serialization of `CGFont` objects.

Due to API limitations, this will only serialize native fonts, not Web
fonts. Specifically, there is no way I know of to fetch the
`CGDataProvider` associated with a `CGFont`. This isn't a problem for
Servo, however, because Servo knows which fonts are Web fonts and stores
their byte data separately.

r? @glennw or @larsbergstrom

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/core-graphics-rs/46)
<!-- Reviewable:end -->
2015-12-01 06:13:48 +05:30
Patrick Walton 7f00bbf441 Support serialization of CGFont objects.
Due to API limitations, this will only serialize native fonts, not Web
fonts. Specifically, there is no way I know of to fetch the
`CGDataProvider` associated with a `CGFont`. This isn't a problem for
Servo, however, because Servo knows which fonts are Web fonts and stores
their byte data separately.
2015-11-30 16:41:46 -08:00
bors-servo 361bc8a849 Auto merge of #45 - mbrubeck:libc0.2, r=metajack
Upgrade to libc 0.2

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/core-graphics-rs/45)
<!-- Reviewable:end -->
2015-11-06 01:34:08 +05:30
Matt Brubeck 76ece0ace5 Upgrade to libc 0.2 2015-11-03 15:37:23 -08:00
Patrick Walton da0c05993d Update version number 2015-10-28 17:25:03 -07:00
bors-servo d21421d6ed Auto merge of #42 - SSheldon:float_typedef, r=metajack
Fix CGFloat type definition for 32-bit

`CGFloat` was always defined as a double, and there was a `TODO` to fix this. I ran into the issue, so here's a PR to fix it :)

The definition for `CGFloat` in CoreGraphics/CGBase.h looks like:
``` c
#if defined(__LP64__) && __LP64__
# define CGFLOAT_TYPE double
#else
# define CGFLOAT_TYPE float
#endif

typedef CGFLOAT_TYPE CGFloat;
```

I also noticed that the definition for `boolean_t` was wrong for arm. The definition in mach/arm/boolean.h is:
``` c
typedef int		boolean_t;
```

And the definition in mach/i386/boolean.h is:
``` c
#if defined(__x86_64__) && !defined(KERNEL)
typedef unsigned int	boolean_t;
#else
typedef int		boolean_t;
#endif
```

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/core-graphics-rs/42)
<!-- Reviewable:end -->
2015-10-26 11:14:32 -05:00
bors-servo d683ba8d98 Auto merge of #44 - pcwalton:fill-color-and-font-aa, r=metajack
Add support for fill colors and font AA.

Also, mark Core Graphics contexts as `Send` and `Sync` since (I believe) they
are thread-safe.

r? @metajack

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/core-graphics-rs/44)
<!-- Reviewable:end -->
2015-10-16 21:06:29 -06:00
Patrick Walton d072ab30af Add support for fill colors and font AA.
Also, mark Core Graphics contexts as `Send` and `Sync` since (I believe) they
are thread-safe.
2015-10-16 17:29:42 -07:00
bors-servo 244d141fe6 Auto merge of #43 - pcwalton:context, r=metajack
Add some basic support for bitmap graphics contexts and color spaces

r? @metajack

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/core-graphics-rs/43)
<!-- Reviewable:end -->
2015-10-13 21:33:34 -06:00
Patrick Walton 87cc3ba551 Add some basic support for bitmap graphics contexts and color spaces 2015-10-13 18:28:55 -07:00
Steven Sheldon a534d23e81 Fix CGFloat type definition for 32-bit. 2015-10-10 12:04:25 -07:00
bors-servo efc18b488c Auto merge of #41 - SSheldon:version_0.1.1, r=jdm
Bump version to 0.1.1

Bump version to 0.1.1 so that I can use this crate with #39 from crates.io.

If this is merge could someone also publish to crates.io?
2015-09-23 06:26:41 -06:00
Steven Sheldon 2f8a8e254a Bump version to 0.1.1. 2015-09-22 23:10:13 -07:00
bors-servo 19e04323f3 Auto merge of #39 - SSheldon:deps_ios, r=jdm
Made core-foundation a dependency for any platform

The Cargo.toml file currently only declares `core-foundation` as a dependency on 64bit OSX, but it's used unconditionally in this crate so it should be an unconditional dependency.

I'm playing around with this crate on iOS and it won't build without this change.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/core-graphics-rs/39)
<!-- Reviewable:end -->
2015-09-17 11:57:52 -06:00
Patrick Walton 0b3c887f14 Merge pull request #40 from servo/homu
Enable homu.
2015-09-17 19:37:20 +02:00
Ms2ger ac0c7df3e2 Enable homu. 2015-09-17 19:32:43 +02:00
Steven Sheldon 8a662b25de core-foundation is always a dependency, not just on OSX. 2015-09-13 11:25:09 -05:00
Corey Farwell 375ad42e44 Merge pull request #38 from frewsxcv/travis
Build and test on Travis CI
2015-06-09 14:46:59 -07:00
Corey Farwell e7b7fdb8d5 Init README 2015-06-09 14:43:43 -07:00
Corey Farwell 79c34f6676 Build and test on Travis CI (OSX) 2015-06-09 14:43:38 -07:00