Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/screen/screen_edit.c
| Show First 20 Lines • Show All 1,340 Lines • ▼ Show 20 Lines | ScrArea *ED_screen_state_toggle(bContext *C, wmWindow *win, ScrArea *sa, const short state) | ||||
| } | } | ||||
| /* XXX bad code: setscreen() ends with first area active. fullscreen render assumes this too */ | /* XXX bad code: setscreen() ends with first area active. fullscreen render assumes this too */ | ||||
| CTX_wm_area_set(C, sc->areabase.first); | CTX_wm_area_set(C, sc->areabase.first); | ||||
| return sc->areabase.first; | return sc->areabase.first; | ||||
| } | } | ||||
| /** | |||||
| * Wrapper to open a temporary space either as fullscreen space, or as separate window, as defined | |||||
| * by \a display type. | |||||
Severin: Typo: `display type` -> `display_type` | |||||
| * | |||||
| * \param title: Title to set for the window, if a window is spawned. | |||||
| * \param x, y: Position of the window, if a window is spawned. | |||||
| * \param sizex, sizey: Dimensions of the window, if a window is spawned. | |||||
| */ | |||||
| ScrArea *ED_screen_temp_space_open(bContext *C, | |||||
| const char *title, | |||||
| int x, | |||||
| int y, | |||||
| int sizex, | |||||
| int sizey, | |||||
| eSpace_Type space_type, | |||||
| int display_type) | |||||
| { | |||||
| ScrArea *sa = NULL; | |||||
| switch (display_type) { | |||||
| case USER_TEMP_SPACE_DISPLAY_WINDOW: | |||||
| if (WM_window_open_temp(C, title, x, y, sizex, sizey, (int)space_type)) { | |||||
| sa = CTX_wm_area(C); | |||||
| } | |||||
| break; | |||||
| case USER_TEMP_SPACE_DISPLAY_FULLSCREEN: | |||||
| sa = ED_screen_full_newspace(C, CTX_wm_area(C), (int)space_type); | |||||
| break; | |||||
| } | |||||
| return sa; | |||||
| } | |||||
| /* update frame rate info for viewport drawing */ | /* update frame rate info for viewport drawing */ | ||||
| void ED_refresh_viewport_fps(bContext *C) | void ED_refresh_viewport_fps(bContext *C) | ||||
| { | { | ||||
| wmTimer *animtimer = CTX_wm_screen(C)->animtimer; | wmTimer *animtimer = CTX_wm_screen(C)->animtimer; | ||||
| Scene *scene = CTX_data_scene(C); | Scene *scene = CTX_data_scene(C); | ||||
| /* is anim playback running? */ | /* is anim playback running? */ | ||||
| if (animtimer && (U.uiflag & USER_SHOW_FPS)) { | if (animtimer && (U.uiflag & USER_SHOW_FPS)) { | ||||
| ▲ Show 20 Lines • Show All 287 Lines • Show Last 20 Lines | |||||
Typo: display type -> display_type