Public Member Functions | |
EventHandler (EventQueue *_eq) | |
~EventHandler () | |
void | handle_paginate_start (unsigned int page_count) |
void | handle_paginate_end (unsigned int page_count) |
void | handle_render_done (const PluginBitmapAttributes &ba, const Position &start_pos) |
void | handle_search_done (const std::vector< Range > &result_ranges, const SearchContext &search_context) |
Definition at line 117 of file multi_thread_test.cpp.
EventHandler::EventHandler | ( | EventQueue * | _eq | ) | [inline] |
Definition at line 120 of file multi_thread_test.cpp.
EventHandler::~EventHandler | ( | ) | [inline] |
Definition at line 124 of file multi_thread_test.cpp.
void EventHandler::handle_paginate_end | ( | unsigned int | page_count | ) | [inline] |
Definition at line 134 of file multi_thread_test.cpp.
References EventQueue::append_event(), and e.
Referenced by main().
00135 { 00136 Event e(PAGINATE_ENDED, (void *)page_count); 00137 eq->append_event(e); 00138 }
void EventHandler::handle_paginate_start | ( | unsigned int | page_count | ) | [inline] |
Definition at line 128 of file multi_thread_test.cpp.
References EventQueue::append_event(), and e.
Referenced by main().
00129 { 00130 Event e(PAGINATE_STARTED, (void *)1); 00131 eq->append_event(e); 00132 }
void EventHandler::handle_render_done | ( | const PluginBitmapAttributes & | ba, | |
const Position & | start_pos | |||
) | [inline] |
Definition at line 140 of file multi_thread_test.cpp.
References EventQueue::append_event(), e, and RENDER_DONE.
Referenced by main().
00141 { 00142 RenderData *rd = new RenderData(ba, start_pos); 00143 Event e(RENDER_DONE, (void *)rd); 00144 eq->append_event(e); 00145 }
void EventHandler::handle_search_done | ( | const std::vector< Range > & | result_ranges, | |
const SearchContext & | search_context | |||
) | [inline] |
Definition at line 147 of file multi_thread_test.cpp.
References EventQueue::append_event(), e, SearchResult::matches, and SearchResult::ranges.
Referenced by main().
00148 { 00149 SearchResult *p = new SearchResult; 00150 p->matches = result_ranges.size(); 00151 p->ranges = new Range[p->matches]; 00152 00153 for (unsigned int i=0; i<result_ranges.size(); i++) 00154 { 00155 p->ranges[i] = result_ranges[i]; 00156 } 00157 00158 Event e(SEARCH_DONE, (void *)p); 00159 eq->append_event(e); 00160 }