Steven Sheldon
0a1b0d6f1b
Fixes so the compiler can infer msg_send! return types
...
Currently, due to a quirk in Rust's type inference interacting with the
structure of the msg_send! macro, a () return type will be inferred when
the compiler cannot otherwise determine the return type. This behavior
is expected to change, and in the future could resolve to a ! return
type, which results in undefined behavior.
Linting has previously been added for this in rust-lang/rust#39216 , but
it did not catch these cases due to SSheldon/rust-objc#62 . An upcoming
version of objc will be fixed to stop hiding these errors, at which
point they will become compile errors.
This change fixes these errors and allows cocoa to compile with the
fixed version of objc.
2019-10-16 06:50:58 -07:00
svoss
4372c047e6
Adds setTarget to buttons and menu items, these are required in many cases
2019-09-25 06:41:07 -07:00
Aleksi Juvani
552021c096
Fix i686-apple-darwin compile target
2019-08-22 21:56:34 +03:00
Sean Voss
4885ac1384
Adds Image View Support
2019-07-22 15:28:55 -07:00
Felix Rabe
8bc0ed06cb
Fix NSColor argument order: r b<->g
2019-07-14 23:20:33 +02:00
Birunthan Mohanathas
1ad4d50d16
Fix use of deprecated libc::(u)int{16,32}_t
...
This fixes warnings like:
>use of deprecated item 'libc::int32_t': Use i32 instead.
2019-07-14 11:57:05 +03:00
Colin Rofls
0d56822550
Add isARepeat
2019-06-07 11:45:24 +02:00
Zeyi Fan
e174d01b8a
Add some bindings for Appkit and Cocoa Foundation
...
This commit adds several missing AppKit & Cocoa Foundation bindings. Specifically:
AppKit:
* NSWindowTabbingMode ([Apple Doc](https://developer.apple.com/documentation/appkit/nswindowtabbingmode?language=objc ))
* Managing Window Tabs section for NSWindow ([Apple Doc](https://developer.apple.com/documentation/appkit/nswindow?language=objc#3020937 ))
* NSNib ([Apple Doc](https://developer.apple.com/documentation/appkit/nsnib?language=objc ))
Cocoa Foundation
* `init`, `count` and `objectAtIndex` for `NSArray` ([Apple Doc](https://developer.apple.com/documentation/foundation/nsarray?language=objc ))
* `NSBundle` ([Apple Doc](https://developer.apple.com/documentation/foundation/nsbundle?language=objc ))
2019-05-04 19:14:51 -07:00
Adrien Navratil
f65f59b83a
Fixed delegate! example code
2019-05-02 20:05:36 +02:00
Adrien Navratil
054a56d3ed
Added delegate! macro
2019-05-02 19:28:52 +02:00
Andy Russell
a939bec429
add barebones NSSpellChecker bindings
2019-04-29 18:15:53 -04:00
ecpost
0270070c9d
Change NSPasteboard sendData to setData to match Apple's API.
2019-04-07 16:36:43 -07:00
bors-servo
488aa87f21
Auto merge of #275 - acheronfail:chore/add-nsurl, r=jdm
...
add NSURL
This PR adds in the trait for `NSURL` (requested in #183 ).
<!-- 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/275 )
<!-- Reviewable:end -->
2019-03-11 09:01:30 -04:00
acheronfail
b08aa69460
chore: use bitflags to create NSURL constants
2019-03-11 07:54:32 +11:00
Andy Russell
6884430a82
add NSNotFound constant
2018-11-10 16:16:37 -05:00
acheronfail
4d92078a1b
add NSURL
2018-11-09 18:02:03 +11:00
acheronfail
6148a59381
chore: add NSColorSpace and more methods to NSColor
...
fixes #184
fixes #251
2018-11-09 09:48:20 +11:00
acheronfail
8a72e96c97
chore: add simple NSControl class
2018-11-09 07:20:57 +11:00
Patrick Walton
692ba80aec
Add bindings to -[CATransaction completionBlock] and
...
`-[CATransaction setCompletionBlock:]`
We have support for blocks, so there's no reason to not include these.
2018-11-01 19:51:32 -07:00
Patrick Walton
b56fda0a13
Add bindings to CARenderer
2018-11-01 19:50:02 -07:00
Patrick Walton
ee0269808d
Add a few bindings to Core Video to go along with the CARenderer bindings
2018-11-01 19:47:36 -07:00
Patrick Walton
1cdd18a0e2
Add a binding to CACurrentMediaTime()
2018-11-01 19:46:25 -07:00
Patrick Walton
95f3257573
Add constants for new AppKit versions through El Capitan.
...
I need this to fix `winit`, because Mojave has some new behavior around
layer-backed views and version sniffing is the easiest way to detect when I
need to handle it.
This also bumps the version to 0.18.3.
2018-10-25 11:51:04 -07:00
Patrick Walton
5b4f4ebf42
Add bindings to -[CALayer addSublayer:] and -[CALayer setContentsOpaque:].
2018-10-16 15:34:40 -07: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
Adrien Navratil
1a156546b1
Added basic NSToolbar
2018-08-30 20:11:53 +02:00
Joshua Groves
82978bf6fe
Use class macro
2018-07-16 19:52:42 -06:00
Jeff Muizelaar
645779912b
Consistently use std::os::raw::c_void instead of libc::c_void
...
The major versions of cocoa and core-graphics are bumped as I believe
they are the only crates that meaningfully expose c_void.
Fixes #212
2018-05-06 19:00:37 -04:00
Edwin Cheng
80b970b476
Add NSFullScreenModeApplicationPresentationOptions key and its options
2018-05-03 00:37:58 +08:00
Vadim Borodin
b6f8e0b117
Adding NSApplicationPresentationOptions bindings
2018-04-15 18:22:51 -07:00
Jeff Muizelaar
b321255fc2
Add convertRectToBacking to NSView
2018-02-07 13:53:08 -05:00
Bruce Mitchener
e3b661f7c9
cocoa: Fix clippy let-and-return warning.
2018-02-04 21:43:54 +07:00
Josh Matthews
c99c05c03f
Import cocoa.
2018-02-01 15:55:23 -05:00