Agalin / pidgin_macos_integration

Pidgin plugin adding macOS shell integration
BSD 2-Clause "Simplified" License
8 stars 1 forks source link

Swiftify #13

Closed Agalin closed 4 years ago

Agalin commented 4 years ago

Move code from Objective-C to Swift where possible.

Moved callback registration, menu setup, removed GTK helper functions no longer in use.

GLib implements optional runtime type checks and Swift version just force casts but it shouldn't really matter as those are objects returned from Pidgin/Purple which should always be valid - or types defined in this plugin which will simply crash the app in case of type mismatch (notably callbacks missing @convention(c)). It should be possible to implement similar type checks but probably not worth the effort - it's unsafe, c-style cast after all.