Files
electron/spec/fixtures/native-addon/is-valid-window/src/impl_darwin.mm
John Kleinschmidt 3e6dd7f771 build: update to yarn v4 (#48995)
* build: update to yarn v4

(cherry picked from commit 6adec744f3)

* chore: fixup types after yarn v4 migration

* chore: update nan yarn.lock file

* build: automatically install git for dugite
2025-11-20 10:13:44 -05:00

15 lines
284 B
Plaintext

#include "impl.h"
#include <Cocoa/Cocoa.h>
namespace impl {
bool IsValidWindow(char* handle, size_t size) {
if (size != sizeof(NSView*))
return false;
NSView* view = *reinterpret_cast<NSView**>(handle);
return [view isKindOfClass:[NSView class]];
}
} // namespace impl