Vadim Borodin
b6f8e0b117
Adding NSApplicationPresentationOptions bindings
2018-04-15 18:22:51 -07:00
Linus Färnstrand
6c63acc55a
Add test showing how downcasting to CFArray with generic is prohibited
2018-03-20 22:36:47 +01:00
bors-servo
680013abf1
Auto merge of #199 - jrmuizel:info-dict, r=jdm
...
Make info_dictionary() return a more specific CFDictionary
<!-- 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/199 )
<!-- Reviewable:end -->
2018-02-08 10:08:11 -05:00
bors-servo
a2b24c9fc8
Auto merge of #198 - jrmuizel:set, r=jdm
...
Give CFSet a type parameter
<!-- 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/198 )
<!-- Reviewable:end -->
2018-02-08 10:04:51 -05:00
Jeff Muizelaar
5a438ccece
Make info_dictionary() return a more specific CFDictionary
2018-02-08 07:55:30 -05:00
Jeff Muizelaar
ff7d421c32
Give CFSet a type parameter
2018-02-08 07:48:36 -05:00
bors-servo
022d74218c
Auto merge of #196 - jrmuizel:text-stronger-types, r=jdm
...
Use stronger types in the core-text CFDictionaries
<!-- 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/196 )
<!-- Reviewable:end -->
2018-02-07 14:19:17 -05:00
Jeff Muizelaar
b7f60a3c9d
Use stronger types in the CFDictionaries
2018-02-07 14:11:21 -05:00
bors-servo
4e499ab4d2
Auto merge of #195 - jrmuizel:backing, r=jdm
...
Add convertRectToBacking to NSView
<!-- 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/195 )
<!-- Reviewable:end -->
2018-02-07 14:05:26 -05:00
Jeff Muizelaar
b321255fc2
Add convertRectToBacking to NSView
2018-02-07 13:53:08 -05:00
bors-servo
070a866125
Auto merge of #189 - jrmuizel:more-dict, r=jdm
...
Redo the interface of CFDictionary and CFMutableDictionary
This is a pretty big change to take advantge of the type parameters.
It simplifies things and makes them more safe.
<!-- 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/189 )
<!-- Reviewable:end -->
2018-02-07 13:51:18 -05:00
Jeff Muizelaar
97ec75c14d
Redo the interface of CFDictionary and CFMutableDictionary
...
This is a pretty big change to take advantge of the type parameters.
It simplifies things and makes them more safe.
2018-02-07 10:58:33 -05:00
Jeff Muizelaar
8e943b19b5
Move FromVoid and ItemRef to base
...
This will let us reuse them in dictionary.rs
2018-02-07 10:58:30 -05:00
bors-servo
e792e51c87
Auto merge of #194 - poiru:font-descriptor-postscript, r=jdm
...
Allow creating font descriptor with PostScript name
<!-- 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/194 )
<!-- Reviewable:end -->
2018-02-06 23:09:05 -05:00
Birunthan Mohanathas
c4344498ae
Allow creating font descriptor with PostScript name
2018-02-06 17:49:05 -08:00
bors-servo
51a7b0c237
Auto merge of #193 - lsalzman:cgfont-variations, r=jdm
...
allow creating a CTFont from a CGFont with variations
This is functionality necessary to solve https://bugzilla.mozilla.org/show_bug.cgi?id=1435062
We need to be able to pass the variations dictionary to the CTFont, otherwise core-text does not properly handle with the variations on the font.
<!-- 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/193 )
<!-- Reviewable:end -->
2018-02-06 11:30:20 -05:00
Lee Salzman
4dd878b3d3
bump core-text version
2018-02-06 07:45:40 -08:00
Lee Salzman
25ce729f76
allow creating a CTFont from a CGFont with variations
2018-02-06 07:42:06 -08:00
bors-servo
f86a5fb681
Auto merge of #192 - waywardmonkeys:cocoa-fix-let-and-return-clippy-warning, r=jdm
...
cocoa: Fix clippy let-and-return warning.
<!-- 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/192 )
<!-- Reviewable:end -->
2018-02-04 09:56:37 -05:00
bors-servo
0cfc7f6b0a
Auto merge of #191 - waywardmonkeys:fix-some-core-text-clippy-warnings, r=jdm
...
Fix some core text clippy warnings
<!-- 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/191 )
<!-- Reviewable:end -->
2018-02-04 09:53:55 -05:00
bors-servo
38ce125c5d
Auto merge of #190 - waywardmonkeys:remove-unused-imports, r=jdm
...
core-text: Remove unused imports.
This warning was introduced due to the changes made in
21f20e2f93 .
<!-- 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/190 )
<!-- Reviewable:end -->
2018-02-04 09:50:54 -05:00
Bruce Mitchener
e3b661f7c9
cocoa: Fix clippy let-and-return warning.
2018-02-04 21:43:54 +07:00
Bruce Mitchener
2aae249d43
core-text: Fix some clippy warnings.
2018-02-04 21:38:13 +07:00
Bruce Mitchener
ee2a3633df
core-text: Remove unused imports.
...
This warning was introduced due to the changes made in
21f20e2f93 .
2018-02-04 21:30:25 +07:00
bors-servo
16ddf909ac
Auto merge of #188 - jrmuizel:font-path, r=jdm
...
Return a PathBuf instead of a String
This is just better.
<!-- 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/188 )
<!-- Reviewable:end -->
2018-02-03 00:51:40 -05:00
Jeff Muizelaar
21f20e2f93
Return a PathBuf instead of a String
...
This is just better.
2018-02-02 21:23:11 -05:00
bors-servo
697bd41d73
Auto merge of #187 - jrmuizel:dict, r=jdm
...
Give CFDictionary type parameters for keys and values
There's more to be done to clean up the interface now that we have
type parameters but this is a good place to start.
<!-- 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/187 )
<!-- Reviewable:end -->
2018-02-02 16:57:30 -05:00
Jeff Muizelaar
5616935b56
Give CFDictionary type parameters for keys and values
...
There's more to be done to clean up the interface now that we have
type parameters but this is a good place to start.
2018-02-02 16:56:37 -05:00
bors-servo
824665509e
Auto merge of #186 - jrmuizel:unify-macro, r=jdm
...
Unify the impl macros
Using some more macro magic we can avoid having to duplicate
our impl macro implementation for generic types. This will help
when we want a version for CFDictionary with two type parameters.
<!-- 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/186 )
<!-- Reviewable:end -->
2018-02-02 16:31:54 -05:00
Jeff Muizelaar
6b526436c2
Unify the impl macros
...
Using some more macro magic we can avoid having to duplicate
our impl macro implementation for generic types. This will help
when we want a version for CFDictionary with two type parameters.
2018-02-02 16:18:23 -05:00
bors-servo
fb8a43f29d
Auto merge of #156 - waywardmonkeys:reduce-libc-usage, r=jdm
...
Reduce usage of libc crate.
Switch from using `libc` types to `::std::os::raw`. This is a breaking
change due to the differences in how `c_void` is defined.
`core-foundation-sys` no longer needs the `libc` dependency.
<!-- 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/156 )
<!-- Reviewable:end -->
2018-02-02 16:11:19 -05:00
bors-servo
2e172400a2
Auto merge of #159 - jrmuizel:generic, r=jdm
...
Add a ConcreteCFType trait
We'll use this to distinguish between generic and concrete CFTypes.
This lets us prevent downcast()ing to arbitrary generic types.
<!-- 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/159 )
<!-- Reviewable:end -->
2018-02-02 16:06:10 -05:00
bors-servo
97c95bfa18
Auto merge of #160 - servo:merge-it-all, r=pcwalton,jrmuizel
...
Import core-graphics-rs, core-text-rs, cocoa-rs, and io-surface-rs
Per the discussion in https://groups.google.com/d/msg/mozilla.dev.servo/AQaYEslR_BE/4IES-3uzBQAJ , this pull request imports the full histories of https://github.com/servo/core-graphics-rs , https://github.com/servo/core-text-rs/ , https://github.com/servo/cocoa-rs , and https://github.com/servo/io-surface-rs/ . This was accomplished by following the steps laid out in https://stackoverflow.com/a/1426163/3830 .
<!-- 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/160 )
<!-- Reviewable:end -->
2018-02-01 15:45:39 -06:00
Josh Matthews
0a120dff5c
Build and test everything on travis.
2018-02-01 16:18:45 -05:00
Josh Matthews
f54a90e64b
Use local paths for local dependencies.
2018-02-01 16:18:35 -05:00
Josh Matthews
76e0cdc990
Add io-surface to workspace.
2018-02-01 15:57:28 -05:00
Josh Matthews
72245b3112
Import io-surface.
2018-02-01 15:56:50 -05:00
Josh Matthews
7fdc51e935
Add cocoa to workspace.
2018-02-01 15:55:46 -05:00
Josh Matthews
c99c05c03f
Import cocoa.
2018-02-01 15:55:23 -05:00
Josh Matthews
a278f3dfbe
Add core-text to workspace.
2018-02-01 15:53:48 -05:00
Josh Matthews
52bc040a9a
Import core-text.
2018-02-01 15:52:56 -05:00
Josh Matthews
03960659bb
Add core-graphics to workspace.
2018-02-01 15:49:27 -05:00
Josh Matthews
af0010c21a
Import core-graphics.
2018-02-01 15:46:34 -05:00
Jeff Muizelaar
ec118b30e1
Add a ConcreteCFType trait
...
We'll use this to distinguish between generic and concrete CFTypes.
This lets us prevent downcast()ing to arbitrary generic types.
2018-02-01 13:04:28 -05:00
Bruce Mitchener
7e7d65bb4d
Reduce usage of libc crate.
...
Switch from using `libc` types to `::std::os::raw`. This is a breaking
change due to the differences in how `c_void` is defined.
`core-foundation-sys` no longer needs the `libc` dependency.
2018-02-01 20:39:10 +07:00
bors-servo
db9c247243
Auto merge of #157 - waywardmonkeys:add-missing-license-headers, r=jdm
...
Add missing license headers to src files.
<!-- 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/157 )
<!-- Reviewable:end -->
2018-02-01 07:23:38 -06:00
Bruce Mitchener
bf3a9c89bd
Add missing license headers to src files.
2018-02-01 09:32:29 +07:00
bors-servo
b66566211a
Auto merge of #85 - poiru:fix-font-path, r=jdm
...
Make CTFontDescriptor::font_path() return filesystem path, not URL
Prior to this commit, the return string was in the format
`file:///foo/bar.otf`. We now omit the leading `file://` portion. This
also properly retains characters that are not URL safe.
<!-- 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-text-rs/85 )
<!-- Reviewable:end -->
2018-01-31 09:59:40 -06:00
Birunthan Mohanathas
8bc5c45090
Make CTFontDescriptor::font_path() return filesystem path, not URL
...
Prior to this commit, the return string was in the format
`file:///foo/bar.otf`. We now omit the leading `file://` portion. This
also properly retains characters that are not URL safe.
2018-01-30 20:56:47 +05:30
bors-servo
80a8e93ba3
Auto merge of #84 - poiru:typed-wrap-under-rule, r=jdm
...
Use typed wrap_under_{create,get}_rule() functions
Just some minor cleanup; no functional changes.
<!-- 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-text-rs/84 )
<!-- Reviewable:end -->
2018-01-30 09:20:48 -06:00