Changeset View
Changeset View
Standalone View
Standalone View
source/blender/windowmanager/intern/wm_window.c
| Show First 20 Lines • Show All 1,684 Lines • ▼ Show 20 Lines | if (C != NULL) { | ||||
| GHOST_AddEventConsumer(g_system, consumer); | GHOST_AddEventConsumer(g_system, consumer); | ||||
| } | } | ||||
| if (wm_init_state.native_pixels) { | if (wm_init_state.native_pixels) { | ||||
| GHOST_UseNativePixels(); | GHOST_UseNativePixels(); | ||||
| } | } | ||||
| GHOST_UseWindowFocus(wm_init_state.window_focus); | GHOST_UseWindowFocus(wm_init_state.window_focus); | ||||
| WM_init_tablet_api(); | |||||
| } | } | ||||
| } | } | ||||
| void wm_ghost_exit(void) | void wm_ghost_exit(void) | ||||
| { | { | ||||
| if (g_system) | if (g_system) | ||||
| GHOST_DisposeSystem(g_system); | GHOST_DisposeSystem(g_system); | ||||
| ▲ Show 20 Lines • Show All 273 Lines • ▼ Show 20 Lines | void WM_init_window_focus_set(bool do_it) | ||||
| wm_init_state.window_focus = do_it; | wm_init_state.window_focus = do_it; | ||||
| } | } | ||||
| void WM_init_native_pixels(bool do_it) | void WM_init_native_pixels(bool do_it) | ||||
| { | { | ||||
| wm_init_state.native_pixels = do_it; | wm_init_state.native_pixels = do_it; | ||||
| } | } | ||||
| void WM_init_tablet_api(void) | |||||
| { | |||||
| if (g_system) { | |||||
| switch(U.tablet_api) { | |||||
| case USER_TABLET_NATIVE: | |||||
| GHOST_SetTabletAPI(g_system, GHOST_kTabletNative); | |||||
| break; | |||||
| case USER_TABLET_WINTAB: | |||||
| GHOST_SetTabletAPI(g_system, GHOST_kTabletWintab); | |||||
| break; | |||||
| case USER_TABLET_AUTOMATIC: | |||||
| default: | |||||
| GHOST_SetTabletAPI(g_system, GHOST_kTabletAutomatic); | |||||
| break; | |||||
| } | |||||
| } | |||||
| } | |||||
| /* This function requires access to the GHOST_SystemHandle (g_system) */ | /* This function requires access to the GHOST_SystemHandle (g_system) */ | ||||
| void WM_cursor_warp(wmWindow *win, int x, int y) | void WM_cursor_warp(wmWindow *win, int x, int y) | ||||
| { | { | ||||
| if (win && win->ghostwin) { | if (win && win->ghostwin) { | ||||
| int oldx = x, oldy = y; | int oldx = x, oldy = y; | ||||
| wm_cursor_position_to_ghost(win, &x, &y); | wm_cursor_position_to_ghost(win, &x, &y); | ||||
| GHOST_SetCursorPosition(g_system, x, y); | GHOST_SetCursorPosition(g_system, x, y); | ||||
| ▲ Show 20 Lines • Show All 334 Lines • Show Last 20 Lines | |||||