2186 Commits

Author SHA1 Message Date
bors-servo c5590b2f2c Auto merge of #470 - Qyriad:publish-graphics-0.22.2, r=jrmuizel
Publish core-graphics

Like #465, but for core-graphics. #436 in particular was merged five months ago, which was awesome, but there hasn't been a release to crates.io yet since then. Hopefully this PR should suffice for doing so?
2021-11-02 12:32:25 -04:00
bors-servo 3f308c2997 Auto merge of #473 - jrmuizel:less-travis, r=mstange
Don't run travis on master or 10.15

10.15 is now covered by Github actions and master is unneeded
because of auto
2021-11-02 12:25:06 -04:00
Jeff Muizelaar b443f5be30 Don't run travis on master or 10.15
10.15 is now covered by Github actions and master is unneeded
because of auto
2021-11-02 12:19:01 -04:00
bors-servo d361e1a467 Auto merge of #472 - jrmuizel:gah, r=jdm
Prepare github actions CI for use by homu.

None
2021-11-01 09:17:04 -04:00
Jeff Muizelaar c599e4922c Prepare github actions CI for use by homu. 2021-10-31 15:10:45 -04:00
bors-servo b54d42247e Auto merge of #471 - jrmuizel:fd-close, r=mstange
Remove filedescriptor test_consumed

This test was failing intermittently on github actions.

There's no safe way to check that a file descriptor has been closed,
because a new file could have been reopened with the same number. We'd
then end up closing that new file instead of having close() fail.
2021-10-28 10:43:19 -04:00
Jeff Muizelaar 91ff2cb513 Remove filedescriptor test_consumed
This test was failing intermittently on github actions.

There's no safe way to check that a file descriptor has been closed,
because a new file could have been reopened with the same number. We'd
then end up closing that new file instead of having close() fail.
2021-10-28 10:22:43 -04:00
Mikaela Szekely 65b1efcd5d Publish core-graphics 2021-10-27 20:31:00 -06:00
bors-servo e231cb7bdb Auto merge of #459 - xanathar:wip/mmp/iosurface_ext, r=jrmuizel
Added missing macOS 10.6+ IOSurface functions

This adds a few `sys` entry points for IOSurface functions.

I also made those public, so that code outside the IOSurface module can call and use them. I didn't add "rusty" wrappers as most of these functions are likely to be used in unsafe contexts anyway.

I limited this to all functions supported in macOS 10.6.
2021-10-27 12:57:02 -04:00
bors-servo 4960762637 Auto merge of #460 - xanathar:wip/mmp/runloop_ext, r=jrmuizel
Adds run_in_mode wrapper over CFRunLoopRunInMode

Adds a `run_in_mode` wrapper function which just makes `CFRunLoopRunInMode` a little more "rusty".

Also adds a `CFRunLoopRunResult` enum to type the return value.
2021-10-27 12:51:22 -04:00
Josh Matthews 3841d2bb3a Merge pull request #465 from n-eq/publish_core-foundation
Publish core-foundation-sys, core-foundation
2021-10-12 19:52:10 -04:00
Nabil Elqatib f57966fd36 Publish core-foundation-sys, core-foundation 2021-10-12 13:43:34 +02:00
Marco Mastropaolo d83794c3ab Adds run_in_mode wrapper over CFRunLoopRunInMode 2021-08-16 10:28:04 +02:00
Marco Mastropaolo c127f49ffa Added missing macOS 10.6+ IOSurface functions 2021-08-11 14:03:56 +02:00
bors-servo f7e0b97e0b Auto merge of #436 - AsafFisher:master, r=jrmuizel
Add CGEventTap

https://github.com/servo/core-graphics-rs/issues/111
2021-05-26 13:18:34 -04:00
bors-servo ea68a1891a Auto merge of #458 - nacho:bundle-properties, r=jdm
foundation: add bundleIdentifier and resourcePath properties

Adds the bundleIdentifier and resourcePath properties to the NSBundle
bindings
2021-05-22 11:02:01 -04:00
Ignacio Casal Quinteiro 942e85ce41 foundation: add bundleIdentifier and resourcePath properties
Adds the bundleIdentifier and resourcePath properties to the NSBundle
bindings
2021-05-10 16:37:31 +02:00
bors-servo 025dcb3c0d Auto merge of #457 - zed-industries:ns-save-panel, r=jrmuizel
Add NSSavePanel binding

This PR adds bindings to some basic `NSSavePanel` APIs. In Cocoa, `NSSavePanel` is a superclass of `NSOpenPanel`, which I added bindings for in #454.

Example:

```rust
let panel = NSSavePanel::savePanel(nil);
panel.setDirectoryURL(the_url);
let response = panel.runModal();
if response == NSModalResponse::NSModalResponseOk {
    let url_ptr = panel.URL().absoluteString().UTF8String();
    let url = CStr::from_ptr(url_ptr).to_string_lossy();
    eprintln!("You picked URL {}", url);
}

```
2021-05-05 09:52:43 -04:00
Max Brunsfeld 39e1e0eeef Add NSSavePanel binding 2021-05-04 13:44:19 -07:00
bors-servo 355740417e Auto merge of #456 - xiaopengli89:runningApplicationWidthProcessIdentifier, r=jdm
feat: NSRunningApplication::runningApplicationWithProcessIdentifier

We can get other running application by pid.
2021-04-13 09:44:37 -04:00
李小鹏 afb2f80ef3 feat: NSRunningApplication::runningApplicationWithProcessIdentifier 2021-04-13 18:51:29 +08:00
李小鹏 147a432fa9 fix: windowNumberAtPoint_belowWindowWithWindowNumber_ is class method 2021-04-13 18:25:42 +08:00
bors-servo e9a65bb15d Auto merge of #454 - zed-industries:nsopenpanel, r=jdm
Add bindings for NSOpenPanel

This PR adds bindings for the main `NSOpenPanel` APIs, which let you present a modal for selecting files or directories. Usage:

```rust
let panel = NSOpenPanel::openPanel(nil);
panel.setCanChooseDirectories_(YES);
panel.setCanChooseFiles_(NO);
panel.setAllowsMultipleSelection_(YES);

let response = panel.runModal();
if response == NSModalResponse::NSModalResponseOk {
    let urls = panel.URLs();
    for i in 0..urls.count() {
        let url_ptr = urls.objectAtIndex(i).absoluteString().UTF8String();
        let url = CStr::from_ptr(url_ptr).to_string_lossy();
        eprintln!("You picked URL {}", url);
    }
}
```
2021-04-09 09:38:42 -04:00
Max Brunsfeld 52b7bc0a70 Add NSOpenPanel binding 2021-04-08 21:59:54 -07:00
bors-servo 927fa8d172 Auto merge of #435 - adamnemecek:master, r=jdm
added nscursor
2021-03-29 00:27:48 -04:00
bors-servo b24346c4e4 Auto merge of #452 - pmj:master, r=jrmuizel
Adds function for fetching ID of a core_graphics::display::CGDisplayMode

This adds a `mode_id()` function on `CGDisplayMode` which returns the unique (to that display) integer ID the system uses to identify the display mode. It internally calls down to `CGDisplayModeGetIODisplayModeID()` in the CoreGraphics framework. The FFI for this function was previously missing and has also been added.
2021-03-26 11:28:58 -04:00
Phil Dennis-Jordan c519abad47 Adds function for fetching ID of a core_graphics::display::CGDisplayMode
This adds a mode_id() function on CGDisplayMode which returns the unique (to that display) integer ID the system uses to identify the display mode. It internally calls down to CGDisplayModeGetIODisplayModeID() in the CoreGraphics framework. The FFI for this function was previously missing and has also been added.
2021-03-26 15:49:20 +01:00
bors-servo 4c52fbdaa5 Auto merge of #446 - jrmuizel:cfdata-arc, r=jdm
Add CFData::from_arc

This allows creating CFData around data without creating a copy.
2021-02-15 16:05:35 -05:00
bors-servo f419d4bc5f Auto merge of #447 - jrmuizel:ct-bump, r=kvark
Bump core-text version.
2021-02-14 12:07:14 -05:00
Jeff Muizelaar 7ed2cce432 Bump core-text version. 2021-02-14 12:05:14 -05:00
Jeff Muizelaar ce17c9aa59 Add CFData::from_arc
This allows creating a zero-copy CFData wrapping existing data.
2021-02-14 11:52:04 -05:00
bors-servo 987123d00c Auto merge of #443 - jrmuizel:cg-variation, r=kvark
Expose CGFontCopyVariations and CGFontCopyVariationAxes
2021-02-09 20:03:16 -05:00
Jeff Muizelaar d9403529d0 Expose CGFontCopyVariations and CGFontCopyVariationAxes 2021-02-09 20:02:46 -05:00
bors-servo 78634a72fa Auto merge of #442 - jrmuizel:array-debug, r=kvark
Implement CFTypeDescription on CFArray generically.

This mirrors #423
2021-02-09 16:08:48 -05:00
Jeff Muizelaar d3503a8e2e Implement CFTypeDescription on CFArray generically.
This mirrors #423
2021-02-09 16:01:06 -05:00
bors-servo 3f007d17e5 Auto merge of #437 - makotokato:CFStringCreateWithCharactersNoCopy, r=jrmuizel
Add CFStringCreateWithCharactersNoCopy
2021-01-27 16:20:37 -05:00
Makoto Kato 2fe22f8c98 Add CFStringCreateWithCharactersNoCopy 2021-01-26 13:59:23 +09:00
Asaf Fisher 532a3214be core-graphics: event: Add tests to CGEventTap 2021-01-25 19:58:22 +02:00
Asaf Fisher 19671d30c2 core-graphics: Add CGEventTap object to create an event tap 2021-01-25 19:58:22 +02:00
Asaf Fisher edb187a17c core-foundation: Add basic CFMachPort 2021-01-23 03:24:30 +02:00
adamnemecek 970b27b9b7 added nscursor 2021-01-15 19:14:39 -08:00
bors-servo 48dd601e3c Auto merge of #433 - jrmuizel:autorelease, r=jdm
Add some documentation about using an autorelease pool
2020-12-22 22:28:05 -05:00
Jeff Muizelaar 39956a4d8e Add some documentation about using an autorelease pool 2020-12-22 21:13:41 -05:00
bors-servo b6353f3a1c Auto merge of #432 - jrmuizel:array, r=jdm
Implement Debug on the generic CFArray

This is the same kind of thing as #423
2020-12-22 00:17:14 -05:00
Jeff Muizelaar d30dd87bbd Implement Debug on the generic CFArray
This is the same kind of thing as #423
2020-12-21 16:45:49 -05:00
bors-servo 4bd0ff7979 Auto merge of #429 - jrmuizel:cg-ver, r=kvark
Bump core-graphics version
2020-12-08 13:18:39 -05:00
Jeff Muizelaar 7ce88888a0 Bump core-graphics version 2020-12-08 11:50:48 -05:00
bors-servo 7a2ec12906 Auto merge of #421 - jrmuizel:copy-system, r=jdm
Test that copying system fonts doesn't change the url
2020-11-19 10:42:26 -05:00
Jeff Muizelaar 11247e3e8d Test that copying system fonts doesn't change the url 2020-11-04 09:11:49 -05:00
bors-servo d107afb705 Auto merge of #427 - jrmuizel:with_data, r=kvark
Add create_font_descriptor_with_data

This allows create a font from a CFData instead of slice.
More importantly this allows using a CFData that was created
with a custom allocator.
2020-11-03 11:14:40 -05:00