Commit Graph

1543 Commits

Author SHA1 Message Date
bors-servo 105fd39dd3 Auto merge of #264 - pcwalton:version-bump-0.18.2, r=jdm
Bump some versions

r? @jdm

<!-- 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-foundation-rs/264)
<!-- Reviewable:end -->
2018-10-16 18:48:28 -04:00
Patrick Walton 33ed5ec8e6 Bump some versions 2018-10-16 15:46:01 -07:00
bors-servo 88d5222139 Auto merge of #263 - pcwalton:add-sublayer, r=jdm
Add a few more bindings to `CALayer` and `CFBundle`

r? @jdm

<!-- 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-foundation-rs/263)
<!-- Reviewable:end -->
2018-10-16 18:37:47 -04:00
Patrick Walton 6eb7c9d1cb Add bindings to CFBundleGetBundleWithIdentifier and
`CFBundleGetFunctionPointerForName`.
2018-10-16 15:34:43 -07:00
Patrick Walton 5b4f4ebf42 Add bindings to -[CALayer addSublayer:] and -[CALayer setContentsOpaque:]. 2018-10-16 15:34:40 -07:00
bors-servo e7d90872c4 Auto merge of #262 - servo:jdm-patch-1, r=jrmuizel
Update version of core-foundation for core-text.

<!-- 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-foundation-rs/262)
<!-- Reviewable:end -->
2018-10-10 08:30:48 -04:00
bors-servo b92a14275e Auto merge of #261 - jrmuizel:rustkit, r=jdm
Mention RustKit for people that might be interested.

<!-- 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-foundation-rs/261)
<!-- Reviewable:end -->
2018-10-10 01:10:34 -04:00
Josh Matthews 7ec88453f5 Update version of core-foundation for core-text. 2018-10-09 14:01:17 -04:00
Jeff Muizelaar 276bcac1c4 Mention RustKit for people that might be interested. 2018-09-28 13:39:27 -04:00
bors-servo 370a26ac58 Auto merge of #260 - jrmuizel:versions, r=jdm
Bump the versions of a bunch crates.

<!-- 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-foundation-rs/260)
<!-- Reviewable:end -->
2018-09-28 13:37:39 -04:00
Jeff Muizelaar 0b377a959b Bump the versions of a bunch crates. 2018-09-28 13:19:37 -04:00
bors-servo 2d97cbc244 Auto merge of #259 - pcwalton:core-animation, r=jrmuizel
Add initial bindings to Core Animation.

Bound types include `CALayer`, `CATransaction`, and `CATransform3D`.

r? @jdm

<!-- 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-foundation-rs/259)
<!-- Reviewable:end -->
2018-09-27 14:50:59 -04:00
Patrick Walton e0951ae07b Add initial bindings to Core Animation.
Bound types include `CALayer`, `CATransaction`, and `CATransform3D`.
2018-09-27 11:50:14 -07:00
bors-servo febdc72357 Auto merge of #254 - sibsibsib:master, r=jdm
to_i32 shortcut for CFNumber

kCFNumberIntType is needed in some iokit APIs.

Please let me know if you think anything is missing.

<!-- 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-foundation-rs/254)
<!-- Reviewable:end -->
2018-09-23 20:20:21 -04:00
sib 6b3205e3e4 to_i32 shortcut for CFNumber 2018-09-23 16:41:24 -04:00
Patrick Walton 77f53a210e core-graphics 0.17.1 2018-09-19 11:18:45 -07:00
bors-servo 7bf031cf04 Auto merge of #255 - pcwalton:blend-mode, r=jdm
Add a binding to `CGContextSetBlendMode`

r? @jrmuizel

<!-- 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-foundation-rs/255)
<!-- Reviewable:end -->
2018-09-18 22:03:41 -04:00
Patrick Walton 7fae6fae0c Add a binding to CGContextSetBlendMode 2018-09-18 15:14:47 -07:00
bors-servo 27d8f9e190 Auto merge of #253 - bn3t:cgdisplaymode-extensions, r=jdm
Cgdisplaymode extensions

I am writing a tool to change resolution on MacOS. For this I needed, more support for CGDisplayMode methods. I also need support for CGConfigureDisplayWithDisplayMode().

<!-- 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-foundation-rs/253)
<!-- Reviewable:end -->
2018-09-18 08:48:14 -04:00
Bernard Niset f58e2b6dd9 Changes according to PR remarks. 2018-09-11 23:49:55 +02:00
Bernard Niset 2df2f7297f Extended CDDisplayMode Doc 2018-09-08 15:07:28 +02:00
bors-servo 832e337b1a Auto merge of #252 - Litarvan:master, r=jrmuizel
Added basic NSToolbar

-> Basic NSToolbar implementation (init, separator, adding to NSWindow)
I needed this for a project, and i wanted to share it.

Empty toolbar example :
![Example](https://user-images.githubusercontent.com/8712146/44870891-954eb980-ac91-11e8-97f5-384ad71baf7a.png)

Even empty, combined with a fullsized content view and a transparent title bar, this can be very useful (used for example by Firefox, and Atom).

<!-- 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-foundation-rs/252)
<!-- Reviewable:end -->
2018-08-30 15:09:55 -04:00
bors-servo 6c36d5167e Auto merge of #249 - mehcode:feature/add-ctframe, r=jrmuizel
Add CTFrame and CTFramesetter

<!-- 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-foundation-rs/249)
<!-- Reviewable:end -->
2018-08-30 15:05:52 -04:00
bors-servo c9616cc15c Auto merge of #250 - mehcode:feature/cgcontext, r=jrmuizel
Allow most CGContext methods to be usable from a immutable reference and expose several more methods

If this is too much to submit at once, please tell me. This is what I've got left to send in and I'm unsure where to break it up more.

<!-- 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-foundation-rs/250)
<!-- Reviewable:end -->
2018-08-30 15:00:37 -04:00
Adrien Navratil 1a156546b1 Added basic NSToolbar 2018-08-30 20:11:53 +02:00
Bernard Niset 7cb87e5ba2 Added support for configuring the display mode for a display. 2018-08-26 19:58:35 +02:00
Ryan Leckey 8052ba29e1 Add save, restore, translate, scale, set_fill_color, add_path, close_path, and fill_path to CGContext 2018-08-20 16:36:02 -07:00
Ryan Leckey 071d2c6025 Move methods on CGContext taking &self from to CGContextRef 2018-08-20 16:35:54 -07:00
Ryan Leckey 7ec49da393 Add CTFrame and CTFramesetter 2018-08-20 16:29:13 -07:00
Bernard Niset 2685bbd05b Added options to all_display_modes 2018-08-20 21:03:56 +02:00
Bernard Niset 6fc7286b87 Extended CDDisplayMode
* Added all_display_modes
* Added io_flags
* Added bit_depth
2018-08-20 00:16:12 +02:00
bors-servo f323ee0e8f Auto merge of #248 - snapview:cg-extensions, r=jdm
Add support for image cropping

<!-- 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-foundation-rs/248)
<!-- Reviewable:end -->
2018-08-15 09:20:58 -04:00
Daniel Abramov e6cd2a0aae Add support for image cropping 2018-08-15 13:20:16 +02:00
bors-servo b0cf3f69f6 Auto merge of #247 - jrmuizel:unused, r=jrmuizel
Comment out unused function

<!-- 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-foundation-rs/247)
<!-- Reviewable:end -->
2018-08-07 17:31:20 -04:00
Jeff Muizelaar eb8c53f8cd Comment out unused function 2018-08-07 17:28:17 -04:00
bors-servo 540490a909 Auto merge of #246 - pcwalton:glyph-count, r=jrmuizel
Add a binding to `CTFontGetGlyphCount()`

r? @jrmuizel

<!-- 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-foundation-rs/246)
<!-- Reviewable:end -->
2018-08-02 17:39:17 -04:00
Patrick Walton d7b3893a2b Add a binding to CTFontGetGlyphCount() 2018-08-02 14:36:53 -07:00
bors-servo 05d67f26e0 Auto merge of #245 - mehcode:feature/add-cgcolor, r=jrmuizel
Add CGColor

Add the definition for `CGColor` and a single constructor `CGColor::rgb`

<!-- 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-foundation-rs/245)
<!-- Reviewable:end -->
2018-08-01 12:52:01 -04:00
bors-servo 7a6c809569 Auto merge of #244 - mehcode:feature/add-item-mut-ref, r=jrmuizel
Add ItemMutRef and FromMutVoid

Used (in my project) to grab a `&mut CFMutableAttributedString` from an objc-c ivar to use methods introduced in #223.

```rust
CFMutableAttributedString::from_mut_void(ptr)
```

<!-- 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-foundation-rs/244)
<!-- Reviewable:end -->
2018-08-01 12:43:16 -04:00
Ryan Leckey 9cb1e08f3f Add CGColor 2018-08-01 09:33:56 -07:00
Ryan Leckey 085aa65b02 Add ItemMutRef and FromMutVoid 2018-08-01 09:29:50 -07:00
bors-servo 7499e1bac0 Auto merge of #243 - felixrabe:patch-1, r=jdm
Typo + slight re-wording

<!-- 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-foundation-rs/243)
<!-- Reviewable:end -->
2018-08-01 08:32:57 -04:00
Felix Rabe 22450eca9e Typo + slight re-wording 2018-08-01 11:28:36 +02:00
bors-servo b3503c33b7 Auto merge of #242 - pcwalton:cg-data-provider-custom-data, r=mbrubeck
Add the ability to supply custom data to `CGDataProvider`.

This is useful for opening memory-mapped files.

r? @mbrubeck

<!-- 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-foundation-rs/242)
<!-- Reviewable:end -->
2018-07-31 18:58:38 -04:00
Patrick Walton 12236ceee7 Add the ability to supply custom data to CGDataProvider.
This is useful for opening memory-mapped files.
2018-07-31 15:50:30 -07:00
bors-servo 8b090bb812 Auto merge of #240 - pcwalton:get-descriptors-null, r=mbrubeck
Make `CTFontCollection::get_descriptors()` return an Option.

It returns null if there are no matching fonts.

r? @mbrubeck

<!-- 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-foundation-rs/240)
<!-- Reviewable:end -->
2018-07-27 18:12:58 -04:00
Patrick Walton f89d2345de Make CTFontCollection::get_descriptors() return an Option.
It returns null if there are no matching fonts.
2018-07-27 15:09:47 -07:00
bors-servo 912a7f00d7 Auto merge of #239 - pcwalton:unsafe-vertical-translations, r=nox
Make `get_advances_for_glyphs` and `get_vertical_translations_for_glyphs` unsafe.

Closes #238.

r? @nox

<!-- 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-foundation-rs/239)
<!-- Reviewable:end -->
2018-07-25 17:10:58 -04:00
Patrick Walton 46f432ef1b Make get_advances_for_glyphs and get_vertical_translations_for_glyphs unsafe.
Closes #238.
2018-07-25 14:10:03 -07:00
bors-servo 1519944bee Auto merge of #237 - pcwalton:core-graphics-additions, r=jdm
Add several new functions to Core Graphics and Core Text for `font-kit`'s use.

This bumps the major version of `core-text` since the previous version of
`get_glyphs_for_characters` was unsoundly marked safe before and is now marked unsafe.

r? @jrmuizel (or whoever)

<!-- 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-foundation-rs/237)
<!-- Reviewable:end -->
2018-07-25 11:53:51 -04:00