#include <GL/glew.h>#include <GL/freeglut.h>#include <sys/time.h>#include <map>#include <vector>#include "../common.h"#include "view.h"#include "view_support.h"Classes | |
| struct | ThreadInfo |
| struct | ViewParams |
| struct | RemoveParams |
| struct | TitleParams |
Defines | |
| #define | STUB_GET_VIEW() View* wnd = (View*)glutGetWindowData() |
| #define | STUB_CALL(__call) STUB_GET_VIEW(); if (wnd != NULL) __call; |
Typedefs | |
| typedef int(* | CTC_FUNC )(void *) |
Functions | |
| void | on_display_stub (void) |
| void | on_reshape_stub (int width, int height) |
| void | on_mouse_move_stub (int x, int y) |
| void | on_key_down_stub (unsigned char key, int x, int y) |
| void | on_special_key_stub (int key, int x, int y) |
| void | on_entry_stub (int state) |
| void | on_mouse_click_stub (int button, int state, int x, int y) |
| void | on_close_stub () |
| int | add_view_in_thread (void *view_pars_ptr) |
| Adds a new view. Function has to be called just from the inside of view thread with a locked sync_view. | |
| int | remove_view_in_thread (void *remove_params_ptr) |
| Removes a new view. Function has to be called just from the inside of view thread with a locked sync_view. | |
| void | set_view_title (int view_id, const char *title) |
| Sets title of a view. | |
| int | add_view (View *view, int x, int y, int width, int height, const char *title) |
| Adds a view. | |
| void | refresh_view (int view_id) |
| Forces redisplay of a view. | |
| void | remove_view (int view_id) |
| Removes a view. | |
| void | force_view_thread_shutdown () |
| void | wait_for_all_views_close (const char *text) |
| Waits for all views to close. | |
| void | wait_for_any_key (const char *text) |
| Waits for a keypress which is not processed. | |
Variables | |
| ViewMonitor | view_sync |
| Synchronization. | |
| #define STUB_CALL | ( | __call | ) | STUB_GET_VIEW(); if (wnd != NULL) __call; |
| typedef int(* CTC_FUNC)(void *) |
| int add_view | ( | View * | view, | |
| int | x, | |||
| int | y, | |||
| int | width, | |||
| int | height, | |||
| const char * | title | |||
| ) |
Adds a view.
| int add_view_in_thread | ( | void * | view_pars_ptr | ) |
Adds a new view. Function has to be called just from the inside of view thread with a locked sync_view.
| void force_view_thread_shutdown | ( | ) |
| void on_close_stub | ( | ) |
| void on_display_stub | ( | void | ) |
| void on_entry_stub | ( | int | state | ) |
| void on_key_down_stub | ( | unsigned char | key, | |
| int | x, | |||
| int | y | |||
| ) |
| void on_mouse_click_stub | ( | int | button, | |
| int | state, | |||
| int | x, | |||
| int | y | |||
| ) |
| void on_mouse_move_stub | ( | int | x, | |
| int | y | |||
| ) |
| void on_reshape_stub | ( | int | width, | |
| int | height | |||
| ) |
| void on_special_key_stub | ( | int | key, | |
| int | x, | |||
| int | y | |||
| ) |
| void refresh_view | ( | int | view_id | ) |
Forces redisplay of a view.
| void remove_view | ( | int | view_id | ) |
Removes a view.
| int remove_view_in_thread | ( | void * | remove_params_ptr | ) |
Removes a new view. Function has to be called just from the inside of view thread with a locked sync_view.
| void set_view_title | ( | int | view_id, | |
| const char * | title | |||
| ) |
Sets title of a view.
| void wait_for_all_views_close | ( | const char * | text | ) |
Waits for all views to close.
| void wait_for_any_key | ( | const char * | text | ) |
Waits for a keypress which is not processed.
Synchronization.
synchronization between all views. Used to access OpenGL and signal a window close event and a keypress event.
1.6.3