mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-11-30 23:49:05 +08:00
Remove unused function ScrollView::AwaitEventAnyWindow
Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
parent
37b33749da
commit
e5011c545a
@ -461,26 +461,6 @@ SVEvent *ScrollView::AwaitEvent(SVEventType type) {
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Block until any event on any window is received.
|
|
||||||
// No event is returned here!
|
|
||||||
SVEvent *ScrollView::AwaitEventAnyWindow() {
|
|
||||||
// Initialize the waiting semaphore.
|
|
||||||
auto *sem = new SVSemaphore();
|
|
||||||
std::pair<ScrollView *, SVEventType> ea((ScrollView *)nullptr, SVET_ANY);
|
|
||||||
waiting_for_events_mu->lock();
|
|
||||||
waiting_for_events[ea] = std::pair<SVSemaphore *, SVEvent *>(sem, (SVEvent *)nullptr);
|
|
||||||
waiting_for_events_mu->unlock();
|
|
||||||
// Wait on it.
|
|
||||||
stream_->Flush();
|
|
||||||
sem->Wait();
|
|
||||||
// Process the event we got woken up for (its in waiting_for_events pair).
|
|
||||||
waiting_for_events_mu->lock();
|
|
||||||
SVEvent *ret = waiting_for_events[ea].second;
|
|
||||||
waiting_for_events.erase(ea);
|
|
||||||
waiting_for_events_mu->unlock();
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Send the current buffered polygon (if any) and clear it.
|
// Send the current buffered polygon (if any) and clear it.
|
||||||
void ScrollView::SendPolygon() {
|
void ScrollView::SendPolygon() {
|
||||||
if (!points_->empty) {
|
if (!points_->empty) {
|
||||||
|
@ -188,9 +188,6 @@ public:
|
|||||||
// Block until an event of the given type is received.
|
// Block until an event of the given type is received.
|
||||||
SVEvent *AwaitEvent(SVEventType type);
|
SVEvent *AwaitEvent(SVEventType type);
|
||||||
|
|
||||||
// Block until any event on any window is received.
|
|
||||||
SVEvent *AwaitEventAnyWindow();
|
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Getters and Setters
|
* Getters and Setters
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
Loading…
Reference in New Issue
Block a user