|
@@ -48,7 +48,7 @@
|
|
|
- (void)searchForItemsWithSearchString:(NSString *)searchString resultLimit:(NSInteger)resultLimit matchedItemHandler:(void (^)(NSArray *items))handleMatchedItems {
|
|
|
NSMutableArray *found_items = [[NSMutableArray alloc] init];
|
|
|
|
|
|
- DisplayServerMacOS *ds = (DisplayServerMacOS *)DisplayServer::get_singleton();
|
|
|
+ DisplayServerMacOS *ds = Object::cast_to<DisplayServerMacOS>(DisplayServer::get_singleton());
|
|
|
if (ds && ds->_help_get_search_callback().is_valid()) {
|
|
|
Callable cb = ds->_help_get_search_callback();
|
|
|
|
|
@@ -77,7 +77,7 @@
|
|
|
}
|
|
|
|
|
|
- (void)performActionForItem:(id)item {
|
|
|
- DisplayServerMacOS *ds = (DisplayServerMacOS *)DisplayServer::get_singleton();
|
|
|
+ DisplayServerMacOS *ds = Object::cast_to<DisplayServerMacOS>(DisplayServer::get_singleton());
|
|
|
if (ds && ds->_help_get_action_callback().is_valid()) {
|
|
|
Callable cb = ds->_help_get_action_callback();
|
|
|
|
|
@@ -118,7 +118,7 @@
|
|
|
}
|
|
|
|
|
|
- (void)system_theme_changed:(NSNotification *)notification {
|
|
|
- DisplayServerMacOS *ds = (DisplayServerMacOS *)DisplayServer::get_singleton();
|
|
|
+ DisplayServerMacOS *ds = Object::cast_to<DisplayServerMacOS>(DisplayServer::get_singleton());
|
|
|
if (ds) {
|
|
|
ds->emit_system_theme_changed();
|
|
|
}
|
|
@@ -199,7 +199,7 @@
|
|
|
}
|
|
|
|
|
|
- (void)applicationDidResignActive:(NSNotification *)notification {
|
|
|
- DisplayServerMacOS *ds = (DisplayServerMacOS *)DisplayServer::get_singleton();
|
|
|
+ DisplayServerMacOS *ds = Object::cast_to<DisplayServerMacOS>(DisplayServer::get_singleton());
|
|
|
if (ds) {
|
|
|
ds->mouse_process_popups(true);
|
|
|
}
|
|
@@ -215,7 +215,7 @@
|
|
|
}
|
|
|
|
|
|
- (void)globalMenuCallback:(id)sender {
|
|
|
- DisplayServerMacOS *ds = (DisplayServerMacOS *)DisplayServer::get_singleton();
|
|
|
+ DisplayServerMacOS *ds = Object::cast_to<DisplayServerMacOS>(DisplayServer::get_singleton());
|
|
|
if (ds) {
|
|
|
return ds->menu_callback(sender);
|
|
|
}
|
|
@@ -239,7 +239,7 @@
|
|
|
}
|
|
|
|
|
|
- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender {
|
|
|
- DisplayServerMacOS *ds = (DisplayServerMacOS *)DisplayServer::get_singleton();
|
|
|
+ DisplayServerMacOS *ds = Object::cast_to<DisplayServerMacOS>(DisplayServer::get_singleton());
|
|
|
if (ds && ds->has_window(DisplayServerMacOS::MAIN_WINDOW_ID)) {
|
|
|
ds->send_window_event(ds->get_window(DisplayServerMacOS::MAIN_WINDOW_ID), DisplayServerMacOS::WINDOW_EVENT_CLOSE_REQUEST);
|
|
|
}
|