Commit graph

9 commits

Author SHA1 Message Date
Mads Marquart 094ed59a04
Initial conversion to objc2 (#30)
* Use objc2

* Replace `objc_id`

* Remove sel_impl import

* Fix `add_method` calls

* Fix accessing raw FFI functions

* Fix Encode impl

* Fix message sends arguments that do not implement `Encode`

* Use immutable reference in a few places where now necessary

See https://github.com/madsmtm/objc2/pull/150 for a bit of background

* Add a few Send + Sync bounds where examples require it

This is something we'll need to look into properly

* Use `&'static Class` instead of `*const Class`

Safer and more ergonomic. Also required for `msg_send_id!` macro

* Use msg_send_id! and rc::Id

* Update objc2 to v0.3.0-beta.2

* Replace `BOOL` with `Bool` when declaring delegates

This makes cacao compile on Aarch64 again

* Remove a few impossible to use correctly `into_inner` functions

These consumed `self`, and hence also dropped `Id` variable that was responsible for keeping the returned pointer alive

* Remove a few impossible to use correctly `From` implementations

* Quickly fix UB with using BACKGROUND_COLOR ivar

* Fix double-freeing of windows

* Fix double freeing of strings

* Fix a few remaining double-frees
2023-09-11 09:59:21 -07:00
Ryan McGrath 68da052a8f
Merge pull request #67 from ryanmcgrath/feat/change-objc-classdec
Feat/change objc classdec
2022-11-04 16:03:59 -07:00
Ryan McGrath 4d1e0ddb9d
Support NAME on WebViewDelegate trait impls 2022-10-12 15:42:16 -04:00
Esteban Borai 70726a2f55 fix: run cargo fmt on nightly 2022-08-26 10:40:31 -04:00
Esteban Borai 399600d443 fix: 'static lifetime elision for examples
Takes advantage of lifetime elision on some examples where the
rule applies.

Refer: https://doc.rust-lang.org/reference/lifetime-elision.html#static-lifetime-elision
2022-08-25 22:17:52 -04:00
Mads Marquart db4f2c0720 Run cargo fmt 2022-07-15 16:14:02 +02:00
Mads Marquart 02f5d6aa87 Remove trailing whitespace 2022-07-15 16:13:27 +02:00
Ryan McGrath c713194262
v0.3.
- Changes internal target_os flags to be feature flags; macOS is now
  appkit, and iOS/tvOS are now uikit. This enables platforms that are
  not Apple-specific platforms that use frameworks to be compiled for.

- Updates the examples to handle closing/quitting better.
2021-08-07 22:31:48 -07:00
Ryan McGrath 8a9c45af61
Building out browser example.
- Includes test case to reproduce textfield dealloc bug.
2021-04-14 19:00:34 -07:00