Disambiguate GPUI2 macOS class names (#3789)
This PR disambiguates the macOS class names used in GPUI2 from the ones used in GPUI1. Right now if you happen to end up with a copy of both `gpui` and `gpui2` in the dependency tree you get an unhelpful `unwrap` error when we try to build the class names. By giving them different names we are able to get to our more helpful error that informs you that both GPUI1 and GPUI2 are in the module tree. We can change these names back once we do the big "un-2-ing". Release Notes: - N/A
This commit is contained in:
parent
30340535e9
commit
7ef2ddd7a5
2 changed files with 5 additions and 5 deletions
|
@ -85,10 +85,10 @@ const NSDragOperationCopy: NSDragOperation = 1;
|
|||
unsafe fn build_classes() {
|
||||
::util::gpui2_loaded();
|
||||
|
||||
WINDOW_CLASS = build_window_class("GPUIWindow", class!(NSWindow));
|
||||
PANEL_CLASS = build_window_class("GPUIPanel", class!(NSPanel));
|
||||
WINDOW_CLASS = build_window_class("GPUI2Window", class!(NSWindow));
|
||||
PANEL_CLASS = build_window_class("GPUI2Panel", class!(NSPanel));
|
||||
VIEW_CLASS = {
|
||||
let mut decl = ClassDecl::new("GPUIView", class!(NSView)).unwrap();
|
||||
let mut decl = ClassDecl::new("GPUI2View", class!(NSView)).unwrap();
|
||||
decl.add_ivar::<*mut c_void>(WINDOW_STATE_IVAR);
|
||||
|
||||
decl.add_method(sel!(dealloc), dealloc_view as extern "C" fn(&Object, Sel));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue