Commit Graph

1872 Commits

Author SHA1 Message Date
Marco Mastropaolo d83794c3ab Adds run_in_mode wrapper over CFRunLoopRunInMode 2021-08-16 10:28:04 +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
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
Jeff Muizelaar 0f3eaa7416 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 10:58:40 -05:00
bors-servo 964fec5882 Auto merge of #426 - jrmuizel:wait-200, r=kvark
Increase the threshold of acceptible values.

This test sometimes fails on github actions.
2020-11-03 09:26:54 -05:00
Jeff Muizelaar e7c5320639 Increase the threshold of acceptible values.
This test sometimes fails on github actions.
2020-11-03 09:20:04 -05:00
bors-servo e9e0c6e86c Auto merge of #425 - servo:jrmuizel-patch-2, r=emilio
Add github actions CI for macos-11.0
2020-10-29 20:57:32 -04:00
bors-servo 29588625c7 Auto merge of #423 - jrmuizel:dict-debug, r=emilio
Implement Debug on the generic CFDictionary
2020-10-29 20:48:32 -04:00
bors-servo afb65b0ca6 Auto merge of #424 - jrmuizel:sync-desc, r=emilio
Make CTFontDescriptor Send and Sync and expose attributes()
2020-10-29 20:34:42 -04:00
Jeff Muizelaar 3ea06fb10a Add github actions CI for macos-11.0 2020-10-28 19:22:41 -04:00
Jeff Muizelaar 597a12983a Make CTFontDescriptor Send and Sync and expose attributes() 2020-10-28 12:13:03 -04:00
Jeff Muizelaar 2ee8facbd6 Implement Debug on the generic CFDictionary 2020-10-27 17:22:26 -04:00
bors-servo 1bcbef7027 Auto merge of #422 - jrmuizel:cfprop-describe, r=jdm
Implement Debug on CFPropertyList
2020-10-27 08:31:55 -04:00
Jeff Muizelaar faf0d7c0ff Implement Debug on CFPropertyList 2020-10-26 23:11:12 -04:00
bors-servo 20dcdc0970 Auto merge of #420 - jrmuizel:round-trip, r=jdm
Make sure we can round trip data fonts through descriptors.
2020-10-26 15:12:22 -04:00
Jeff Muizelaar 5a9ab37c01 Make sure we can round trip data fonts through descriptors. 2020-10-26 14:46:13 -04:00
bors-servo e000e130c9 Auto merge of #419 - jrmuizel:tv, r=jdm
Expand and correct osx versions.

xcode7.2 doesn't seem to exist anymore and there doesn't
seem to be other 10.10 images available.
2020-10-26 14:34:19 -04:00