More fixes discovered based on Deedra's work.
This commit is contained in:
1 parent
de31e5b513
commit
17052c5147
22 files changed
+561
-76
No files matched your search
@@ -16,6 +16,7 @@
|
||||
#include "bootstrapper_controls.h"
|
||||
#include "bootstrapper_hook.h"
|
||||
#include "version.h"
|
||||
#include "text_limits.h"
|
||||
|
||||
#include <commctrl.h>
|
||||
#include <gio/gio.h>
|
||||
@@ -411,11 +412,13 @@ ControlDescription describe_standard_control(HWND window) {
|
||||
if (!control.states.empty()) control.states += ", ";
|
||||
control.states += row.checked ? "checked" : "not checked";
|
||||
}
|
||||
lastListControl = window;
|
||||
lastListIndex = row.index;
|
||||
lastListCount = row.count;
|
||||
lastListSelected = row.selected;
|
||||
lastListChecked = row.checked;
|
||||
if (row.available) {
|
||||
lastListControl = window;
|
||||
lastListIndex = row.index;
|
||||
lastListCount = row.count;
|
||||
lastListSelected = row.selected;
|
||||
lastListChecked = row.checked;
|
||||
} else lastListControl = nullptr; // Retry after a late native reply.
|
||||
return control;
|
||||
}
|
||||
|
||||
@@ -426,8 +429,10 @@ ControlDescription describe_standard_control(HWND window) {
|
||||
control.states = item.states;
|
||||
control.position = item.position;
|
||||
control.count = item.count;
|
||||
lastNativeControl = window;
|
||||
lastNativeItem = item.key;
|
||||
if (item.available) {
|
||||
lastNativeControl = window;
|
||||
lastNativeItem = item.key;
|
||||
} else lastNativeControl = nullptr;
|
||||
return control;
|
||||
}
|
||||
|
||||
@@ -1067,6 +1072,7 @@ extern "C" error_status_t __stdcall testIfRunning(void) {
|
||||
return reader_is_available() ? ERROR_SUCCESS : ERROR_SERVICE_NOT_ACTIVE;
|
||||
}
|
||||
extern "C" error_status_t __stdcall speakText(const wchar_t *text) {
|
||||
if (!controller_text_fits(text)) return ERROR_INVALID_PARAMETER;
|
||||
const std::string utf8 = to_utf8(text);
|
||||
// Tolk calls cancelSpeech separately when its interrupt argument is true.
|
||||
return call_boolean("SpeakText", g_variant_new("(sb)", utf8.c_str(), FALSE));
|
||||
@@ -1075,6 +1081,7 @@ extern "C" error_status_t __stdcall cancelSpeech(void) {
|
||||
return call_boolean("CancelSpeech", nullptr);
|
||||
}
|
||||
extern "C" error_status_t __stdcall brailleMessage(const wchar_t *text) {
|
||||
if (!controller_text_fits(text)) return ERROR_INVALID_PARAMETER;
|
||||
const std::string utf8 = to_utf8(text);
|
||||
return call_boolean("BrailleMessage", g_variant_new("(s)", utf8.c_str()));
|
||||
}
|
||||
@@ -1086,6 +1093,7 @@ extern "C" error_status_t __stdcall getProcessId(ULONG *pid) {
|
||||
}
|
||||
extern "C" error_status_t __stdcall speakSsml(const wchar_t *ssml, SYMBOL_LEVEL,
|
||||
SPEECH_PRIORITY, boolean) {
|
||||
if (!controller_text_fits(ssml)) return ERROR_INVALID_PARAMETER;
|
||||
const std::string utf8 = to_utf8(ssml);
|
||||
GError *error = nullptr;
|
||||
GVariant *reply = g_dbus_connection_call_sync(
|
||||
|
||||
Reference in new issue
Block a user