Blender V2.61 - r43446
|
#include <string.h>
#include "MEM_guardedalloc.h"
#include "DNA_windowmanager_types.h"
#include "DNA_screen_types.h"
#include "BLI_blenlib.h"
#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "BKE_context.h"
#include "BKE_global.h"
#include "BIF_gl.h"
#include "GPU_extensions.h"
#include "WM_api.h"
#include "wm_subwindow.h"
#include "wm_window.h"
Go to the source code of this file.
Classes | |
struct | wmSubWindow |
Typedefs | |
typedef struct wmSubWindow | wmSubWindow |
Functions | |
static void | wm_subwindow_free (wmSubWindow *UNUSED(swin)) |
void | wm_subwindows_free (wmWindow *win) |
int | wm_subwindow_get (wmWindow *win) |
static wmSubWindow * | swin_from_swinid (wmWindow *win, int swinid) |
void | wm_subwindow_getsize (wmWindow *win, int swinid, int *x, int *y) |
void | wm_subwindow_getorigin (wmWindow *win, int swinid, int *x, int *y) |
void | wm_subwindow_getmatrix (wmWindow *win, int swinid, float mat[][4]) |
int | wm_subwindow_open (wmWindow *win, rcti *winrct) |
void | wm_subwindow_close (wmWindow *win, int swinid) |
void | wm_subwindow_position (wmWindow *win, int swinid, rcti *winrct) |
void | wmSubWindowScissorSet (wmWindow *win, int swinid, rcti *srct) |
void | wmSubWindowSet (wmWindow *win, int swinid) |
void | wmFrustum (float x1, float x2, float y1, float y2, float n, float f) |
void | wmOrtho (float x1, float x2, float y1, float y2, float n, float f) |
void | wmOrtho2 (float x1, float x2, float y1, float y2) |
unsigned int | index_to_framebuffer (int index) |
void | WM_set_framebuffer_index_color (int index) |
int | WM_framebuffer_to_index (unsigned int col) |
Variables | |
static wmWindow * | _curwindow = NULL |
static wmSubWindow * | _curswin = NULL |
Definition in file wm_subwindow.c.
typedef struct wmSubWindow wmSubWindow |
unsigned int index_to_framebuffer | ( | int | index | ) |
Definition at line 345 of file wm_subwindow.c.
References GPU_color_depth(), and i.
Referenced by WM_set_framebuffer_index_color().
static wmSubWindow* swin_from_swinid | ( | wmWindow * | win, |
int | swinid | ||
) | [static] |
Definition at line 104 of file wm_subwindow.c.
References ListBase::first, wmSubWindow::next, wmWindow::subwindows, and wmSubWindow::swinid.
Referenced by wm_subwindow_close(), wm_subwindow_getmatrix(), wm_subwindow_getorigin(), wm_subwindow_getsize(), wm_subwindow_position(), and wmSubWindowScissorSet().
int WM_framebuffer_to_index | ( | unsigned int | col | ) |
Definition at line 383 of file wm_subwindow.c.
References GPU_color_depth().
Referenced by do_paintface_box_select(), do_paintvert_box_select(), sample_backbuf_area(), view3d_read_backbuf(), and view3d_sample_backbuf().
void WM_set_framebuffer_index_color | ( | int | index | ) |
Definition at line 377 of file wm_subwindow.c.
References cpack, and index_to_framebuffer().
Referenced by bbs_mesh_solid__drawCenter(), bbs_mesh_solid__setDrawOpts(), bbs_mesh_solid__setSolidDrawOptions(), bbs_mesh_solid_hide__setDrawOpts(), bbs_mesh_verts__mapFunc(), bbs_mesh_wire__setDrawOptions(), and bbs_obmode_mesh_verts__mapFunc().
void wm_subwindow_close | ( | wmWindow * | win, |
int | swinid | ||
) |
Definition at line 182 of file wm_subwindow.c.
References BLI_remlink(), wmWindow::curswin, MEM_freeN(), NULL, wmWindow::subwindows, swin_from_swinid(), and wm_subwindow_free().
Referenced by ED_region_exit(), ED_screen_exit(), and region_subwindow().
static void wm_subwindow_free | ( | wmSubWindow * | UNUSEDswin | ) | [static] |
Definition at line 81 of file wm_subwindow.c.
Referenced by wm_subwindow_close(), and wm_subwindows_free().
int wm_subwindow_get | ( | wmWindow * | win | ) |
Definition at line 97 of file wm_subwindow.c.
References wmWindow::curswin, and wmSubWindow::swinid.
void wm_subwindow_getmatrix | ( | wmWindow * | win, |
int | swinid, | ||
float | mat[][4] | ||
) |
Definition at line 134 of file wm_subwindow.c.
References bScreen::mainwin, orthographic_m4(), wmWindow::screen, swin_from_swinid(), wmSubWindow::swinid, and wm_subwindow_getsize().
Referenced by ui_popup_block_create(), and uiBeginBlock().
void wm_subwindow_getorigin | ( | wmWindow * | win, |
int | swinid, | ||
int * | x, | ||
int * | y | ||
) |
Definition at line 124 of file wm_subwindow.c.
References swin_from_swinid(), wmSubWindow::winrct, rcti::xmin, and rcti::ymin.
Referenced by tweak_gesture_modal(), WM_border_select_modal(), WM_gesture_circle_modal(), WM_gesture_lasso_modal(), WM_gesture_new(), and WM_gesture_straightline_modal().
void wm_subwindow_getsize | ( | wmWindow * | win, |
int | swinid, | ||
int * | x, | ||
int * | y | ||
) |
Definition at line 114 of file wm_subwindow.c.
References swin_from_swinid(), wmSubWindow::winrct, rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by uiBeginBlock(), wm_subwindow_getmatrix(), wm_subwindow_open(), and wm_subwindow_position().
Definition at line 153 of file wm_subwindow.c.
References BLI_addtail(), wmWindow::curswin, ListBase::first, G, G_DEBUG, MEM_callocN(), wmSubWindow::next, wmWindow::subwindows, wmSubWindow::swinid, wmSubWindow::winrct, wm_subwindow_getsize(), wmOrtho2(), and wmSubWindowSet().
Referenced by ED_screen_refresh(), and region_subwindow().
Definition at line 200 of file wm_subwindow.c.
References wmWindow::sizex, wmWindow::sizey, swin_from_swinid(), wmSubWindow::winrct, wm_subwindow_getsize(), wmOrtho2(), wmSubWindowSet(), rcti::xmax, and rcti::ymax.
Referenced by ED_screen_refresh(), and region_subwindow().
void wm_subwindows_free | ( | wmWindow * | win | ) |
Definition at line 86 of file wm_subwindow.c.
References BLI_freelistN(), ListBase::first, wmSubWindow::next, wmWindow::subwindows, and wm_subwindow_free().
Referenced by wm_window_free().
void wmFrustum | ( | float | x1, |
float | x2, | ||
float | y1, | ||
float | y2, | ||
float | n, | ||
float | f | ||
) |
Definition at line 282 of file wm_subwindow.c.
Referenced by setwinmatrixview3d().
void wmOrtho | ( | float | x1, |
float | x2, | ||
float | y1, | ||
float | y2, | ||
float | n, | ||
float | f | ||
) |
Definition at line 290 of file wm_subwindow.c.
Referenced by setwinmatrixview3d(), and wmOrtho2().
void wmOrtho2 | ( | float | x1, |
float | x2, | ||
float | y1, | ||
float | y2 | ||
) |
Definition at line 300 of file wm_subwindow.c.
References wmOrtho().
Referenced by draw_gpencil_2dimage(), draw_nodespace_back_pix(), ED_region_init(), ED_region_pixelspace(), ui_searchbox_region_draw_cb(), UI_view2d_view_ortho(), UI_view2d_view_orthoSpecial(), UI_view2d_view_restore(), uiDrawBlock(), wm_subwindow_open(), wm_subwindow_position(), and wmSubWindowScissorSet().
Definition at line 244 of file wm_subwindow.c.
References _curswin, wmWindow::curswin, NULL, swin_from_swinid(), wmSubWindow::winrct, wmOrtho2(), rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by ED_region_do_draw(), ED_region_set(), and wmSubWindowSet().
void wmSubWindowSet | ( | wmWindow * | win, |
int | swinid | ||
) |
Definition at line 277 of file wm_subwindow.c.
References NULL, and wmSubWindowScissorSet().
Referenced by ED_area_overdraw(), ED_screen_draw(), select_report_pick_invoke(), ui_popup_block_create(), view3d_region_operator_needs_opengl(), wm_gesture_draw(), wm_method_draw_triple(), wm_subwindow_open(), and wm_subwindow_position().
wmSubWindow* _curswin = NULL [static] |
Definition at line 242 of file wm_subwindow.c.
Referenced by wmSubWindowScissorSet().
wmWindow* _curwindow = NULL [static] |
Definition at line 241 of file wm_subwindow.c.