1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

AccessKit integration for macOS, Linux, and Windows.

This commit is contained in:
Pāvels Nadtočajevs
2025-03-21 09:54:55 +02:00
parent b106dfd4f9
commit 4310cb82b8
45 changed files with 23274 additions and 28 deletions

View File

@@ -101,6 +101,11 @@ bool FreeDesktopPortalDesktop::try_parse_variant(DBusMessage *p_reply_message, R
return false;
}
dbus_message_iter_get_basic(&iter[2], r_value);
} else if (p_type == VAR_TYPE_BOOL) {
if (dbus_message_iter_get_arg_type(&iter[2]) != DBUS_TYPE_BOOLEAN) {
return false;
}
dbus_message_iter_get_basic(&iter[2], r_value);
}
return true;
}
@@ -177,6 +182,18 @@ Color FreeDesktopPortalDesktop::get_appearance_accent_color() {
}
}
uint32_t FreeDesktopPortalDesktop::get_high_contrast() {
if (unsupported) {
return -1;
}
dbus_bool_t value = false;
if (read_setting("org.gnome.desktop.a11y.interface", "high-contrast", VAR_TYPE_BOOL, &value)) {
return value;
}
return -1;
}
static const char *cs_empty = "";
void FreeDesktopPortalDesktop::append_dbus_string(DBusMessageIter *p_iter, const String &p_string) {