|
Blender V4.3
|
#include <math.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include "GL.h"#include <GL/glew.h>#include "MEM_guardedalloc.h"#include "GHOST_C-api.h"#include "BLF_api.hh"#include "Basic.h"#include "EventToBuf.h"#include "ScrollBar.h"#include "Util.h"#include "WindowData.h"#include "GPU_context.hh"#include "GPU_immediate.hh"#include "GPU_init_exit.hh"Go to the source code of this file.
Classes | |
| struct | MainWindow |
| struct | _LoggerWindow |
| struct | ExtraWindow |
| struct | _MultiTestApp |
Macros | |
| #define | SCROLLBAR_PAD 2 |
| #define | SCROLLBAR_WIDTH 14 |
| #define | TEXTAREA_PAD 2 |
Typedefs | |
| typedef struct _LoggerWindow | LoggerWindow |
| typedef struct _MultiTestApp | MultiTestApp |
Variables | |
| int | datatoc_bfont_ttf_size |
| char const | datatoc_bfont_ttf [] |
| #define SCROLLBAR_PAD 2 |
Definition at line 379 of file MultiTest.c.
Referenced by loggerwindow_recalc_regions().
| #define SCROLLBAR_WIDTH 14 |
Definition at line 380 of file MultiTest.c.
Referenced by loggerwindow_recalc_regions().
| #define TEXTAREA_PAD 2 |
Definition at line 381 of file MultiTest.c.
Referenced by loggerwindow_recalc_regions().
| typedef struct _LoggerWindow LoggerWindow |
Definition at line 50 of file MultiTest.c.
| typedef struct _MultiTestApp MultiTestApp |
Definition at line 51 of file MultiTest.c.
|
static |
Definition at line 657 of file MultiTest.c.
References GHOST_ActivateWindowDrawingContext(), GHOST_SwapWindowBuffers(), ExtraWindow::gpu_context, GPU_context_active_set(), ExtraWindow::size, and ExtraWindow::win.
Referenced by extrawindow_handle().
|
static |
Definition at line 692 of file MultiTest.c.
References ExtraWindow::app, GHOST_kKeyE, and multitestapp_toggle_extra_window().
Referenced by extrawindow_handle().
|
static |
Definition at line 671 of file MultiTest.c.
References bounds(), GHOST_ActivateWindowDrawingContext(), GHOST_GetClientBounds(), GHOST_GetHeightRectangle(), GHOST_GetWidthRectangle(), ExtraWindow::gpu_context, GPU_context_active_set(), ExtraWindow::size, and ExtraWindow::win.
Referenced by extrawindow_handle().
| void extrawindow_free | ( | ExtraWindow * | ew | ) |
Definition at line 808 of file MultiTest.c.
References ExtraWindow::app, GHOST_DisposeWindow(), GHOST_GetWindowUserData(), MEM_freeN(), multitestapp_get_system(), ExtraWindow::win, and windowdata_free().
Referenced by multitestapp_free_extrawindow().
|
static |
Definition at line 736 of file MultiTest.c.
References ExtraWindow::app, event_to_buf(), extrawindow_do_draw(), extrawindow_do_key(), extrawindow_do_reshape(), extrawindow_spin_cursor(), GHOST_GetEventData(), GHOST_GetEventTime(), GHOST_GetEventType(), GHOST_kEventCursorMove, GHOST_kEventKeyDown, GHOST_kEventKeyUp, GHOST_kEventWindowClose, GHOST_kEventWindowSize, GHOST_kEventWindowUpdate, GHOST_TEventKeyData::key, loggerwindow_log(), multitestapp_free_extrawindow(), and multitestapp_get_logger().
Referenced by extrawindow_new().
| ExtraWindow * extrawindow_new | ( | MultiTestApp * | app | ) |
Definition at line 772 of file MultiTest.c.
References ExtraWindow::app, extrawindow_handle(), GHOST_CreateWindow(), GHOST_kWindowStateNormal, GHOST_SetWindowUserData(), ExtraWindow::gpu_context, GPU_context_create(), GPU_init(), MEM_callocN, multitestapp_get_system(), NULL, ExtraWindow::win, and windowdata_new().
Referenced by multitestapp_toggle_extra_window().
|
static |
Definition at line 703 of file MultiTest.c.
References cos(), double(), fmod(), GHOST_SetCustomCursorShape(), time, v, ExtraWindow::win, and y.
Referenced by extrawindow_handle().
|
static |
Definition at line 486 of file MultiTest.c.
References GHOST_InvalidateWindow(), GHOST_kButtonMaskLeft, GHOST_kButtonMaskMiddle, GHOST_kButtonMaskRight, GHOST_kStandardCursorDefault, GHOST_kStandardCursorUpDown, GHOST_SetCursorShape(), _LoggerWindow::lmbut, _LoggerWindow::lmouse, _LoggerWindow::scroll, scrollbar_contains_pt(), scrollbar_is_scrolling(), scrollbar_start_scrolling(), scrollbar_stop_scrolling(), and _LoggerWindow::win.
Referenced by loggerwindow_handle().
|
static |
Definition at line 429 of file MultiTest.c.
References BLF_draw(), BLF_position(), _LoggerWindow::font, _LoggerWindow::fontheight, GHOST_ActivateWindowDrawingContext(), GHOST_SwapWindowBuffers(), _LoggerWindow::gpu_context, GPU_context_active_set(), immDeactivate(), _LoggerWindow::loglines, min_i(), _LoggerWindow::ndisplines, _LoggerWindow::nloglines, rect_bevel_smooth(), _LoggerWindow::scroll, scrollbar_get_rect(), scrollbar_get_thumb(), scrollbar_get_thumbpos(), scrollbar_is_scrolling(), _LoggerWindow::textarea, and _LoggerWindow::win.
Referenced by loggerwindow_handle().
|
static |
Definition at line 514 of file MultiTest.c.
References _LoggerWindow::app, GHOST_kKeyQ, and multitestapp_exit().
Referenced by loggerwindow_handle().
|
static |
Definition at line 476 of file MultiTest.c.
References GHOST_InvalidateWindow(), _LoggerWindow::lmouse, _LoggerWindow::scroll, scrollbar_is_scrolling(), scrollbar_keep_scrolling(), _LoggerWindow::win, x, and y.
Referenced by loggerwindow_handle().
|
static |
Definition at line 415 of file MultiTest.c.
References bounds(), GHOST_ActivateWindowDrawingContext(), GHOST_GetClientBounds(), GHOST_GetHeightRectangle(), GHOST_GetWidthRectangle(), _LoggerWindow::gpu_context, GPU_context_active_set(), loggerwindow_recalc_regions(), loggerwindow_setup_window_gl(), _LoggerWindow::size, and _LoggerWindow::win.
Referenced by loggerwindow_handle(), and loggerwindow_new().
| void loggerwindow_free | ( | LoggerWindow * | lw | ) |
Definition at line 629 of file MultiTest.c.
References _LoggerWindow::app, GHOST_DisposeWindow(), GHOST_GetWindowUserData(), _LoggerWindow::loglines, MEM_freeN(), multitestapp_get_system(), _LoggerWindow::nloglines, _LoggerWindow::win, and windowdata_free().
Referenced by multitestapp_free().
|
static |
Definition at line 525 of file MultiTest.c.
References GHOST_TEventButtonData::button, GHOST_GetEventData(), GHOST_GetEventType(), GHOST_kEventButtonDown, GHOST_kEventButtonUp, GHOST_kEventCursorMove, GHOST_kEventKeyDown, GHOST_kEventKeyUp, GHOST_kEventWindowSize, GHOST_kEventWindowUpdate, GHOST_ScreenToClient(), GHOST_TEventKeyData::key, loggerwindow_do_button(), loggerwindow_do_draw(), loggerwindow_do_key(), loggerwindow_do_move(), loggerwindow_do_reshape(), _LoggerWindow::size, _LoggerWindow::win, GHOST_TEventCursorData::x, x, GHOST_TEventCursorData::y, and y.
Referenced by loggerwindow_new().
| void loggerwindow_log | ( | LoggerWindow * | lw, |
| char * | line ) |
Definition at line 617 of file MultiTest.c.
References GHOST_InvalidateWindow(), _LoggerWindow::loglines, _LoggerWindow::logsize, memdbl(), _LoggerWindow::ndisplines, _LoggerWindow::nloglines, _LoggerWindow::scroll, scrollbar_set_thumbpct(), string_dup(), and _LoggerWindow::win.
Referenced by extrawindow_handle(), mainwindow_log(), and multitest_event_handler().
| LoggerWindow * loggerwindow_new | ( | MultiTestApp * | app | ) |
Definition at line 562 of file MultiTest.c.
References _LoggerWindow::app, BLF_height(), BLF_load_default(), BLF_size(), _LoggerWindow::font, _LoggerWindow::fontheight, GHOST_CreateWindow(), GHOST_GetMainDisplayDimensions(), GHOST_kSuccess, GHOST_kWindowStateNormal, GHOST_SetWindowUserData(), _LoggerWindow::gpu_context, GPU_context_create(), GPU_init(), loggerwindow_do_reshape(), loggerwindow_handle(), _LoggerWindow::loglines, _LoggerWindow::logsize, MEM_callocN, MEM_mallocN, multitestapp_get_system(), _LoggerWindow::nloglines, NULL, _LoggerWindow::scroll, scrollbar_new(), _LoggerWindow::win, and windowdata_new().
Referenced by multitestapp_new().
|
static |
Definition at line 382 of file MultiTest.c.
References _LoggerWindow::fontheight, _LoggerWindow::ndisplines, _LoggerWindow::nloglines, _LoggerWindow::scroll, SCROLLBAR_PAD, scrollbar_set_rect(), scrollbar_set_thumbpct(), SCROLLBAR_WIDTH, _LoggerWindow::size, _LoggerWindow::textarea, and TEXTAREA_PAD.
Referenced by loggerwindow_do_reshape().
|
static |
Definition at line 402 of file MultiTest.c.
References _LoggerWindow::size.
Referenced by loggerwindow_do_reshape().
Definition at line 951 of file MultiTest.c.
References BLF_init(), multitestapp_free(), multitestapp_new(), and multitestapp_run().
|
static |
Definition at line 243 of file MultiTest.c.
References GHOST_InvalidateWindow(), GHOST_kButtonMaskLeft, MainWindow::lmbut, MainWindow::lmouse, MainWindow::tmouse, and MainWindow::win.
Referenced by mainwindow_handle().
|
static |
Definition at line 141 of file MultiTest.c.
References GHOST_ActivateWindowDrawingContext(), GHOST_SwapWindowBuffers(), MainWindow::gpu_context, GPU_context_active_set(), MainWindow::lmbut, MainWindow::tmouse, and MainWindow::win.
Referenced by mainwindow_handle().
|
static |
Definition at line 181 of file MultiTest.c.
References MainWindow::app, GHOST_InvalidateWindow(), GHOST_kKeyC, GHOST_kKeyE, GHOST_kKeyF11, GHOST_kKeyLeftBracket, GHOST_kKeyQ, GHOST_kKeyR, GHOST_kKeyRightBracket, GHOST_kKeyT, GHOST_kStandardCursorNumCursors, GHOST_kWindowOrderBottom, GHOST_SetCursorShape(), GHOST_SetCursorVisibility(), GHOST_SetWindowOrder(), mainwindow_log(), multitestapp_exit(), multitestapp_toggle_extra_window(), and MainWindow::win.
Referenced by mainwindow_handle().
|
static |
Definition at line 233 of file MultiTest.c.
References GHOST_InvalidateWindow(), MainWindow::lmbut, MainWindow::lmouse, MainWindow::tmouse, MainWindow::win, x, and y.
Referenced by mainwindow_handle().
|
static |
Definition at line 160 of file MultiTest.c.
References bounds(), GHOST_ActivateWindowDrawingContext(), GHOST_GetClientBounds(), GHOST_GetHeightRectangle(), GHOST_GetWidthRectangle(), MainWindow::gpu_context, GPU_context_active_set(), MainWindow::size, and MainWindow::win.
Referenced by mainwindow_handle().
| void mainwindow_free | ( | MainWindow * | mw | ) |
Definition at line 344 of file MultiTest.c.
References MainWindow::app, GHOST_DisposeWindow(), GHOST_GetWindowUserData(), MEM_freeN(), multitestapp_get_system(), MainWindow::win, and windowdata_free().
Referenced by multitestapp_free().
|
static |
Definition at line 258 of file MultiTest.c.
References GHOST_TEventButtonData::button, event_to_buf(), GHOST_GetEventData(), GHOST_GetEventType(), GHOST_kEventButtonDown, GHOST_kEventButtonUp, GHOST_kEventCursorMove, GHOST_kEventKeyDown, GHOST_kEventKeyUp, GHOST_kEventWindowSize, GHOST_kEventWindowUpdate, GHOST_ScreenToClient(), GHOST_TEventKeyData::key, mainwindow_do_button(), mainwindow_do_draw(), mainwindow_do_key(), mainwindow_do_move(), mainwindow_do_reshape(), mainwindow_log(), MainWindow::size, MainWindow::win, GHOST_TEventCursorData::x, x, GHOST_TEventCursorData::y, and y.
Referenced by mainwindow_new().
|
static |
Definition at line 136 of file MultiTest.c.
References MainWindow::app, loggerwindow_log(), multitestapp_get_logger(), and str.
Referenced by mainwindow_do_key(), mainwindow_handle(), and mainwindow_timer_proc().
| MainWindow * mainwindow_new | ( | MultiTestApp * | app | ) |
Definition at line 308 of file MultiTest.c.
References MainWindow::app, GHOST_CreateWindow(), GHOST_InstallTimer(), GHOST_kWindowStateNormal, GHOST_SetWindowUserData(), MainWindow::gpu_context, GPU_context_create(), GPU_init(), mainwindow_handle(), mainwindow_timer_proc(), MEM_callocN, multitestapp_get_system(), NULL, MainWindow::win, and windowdata_new().
Referenced by multitestapp_new().
|
static |
Definition at line 299 of file MultiTest.c.
References GHOST_GetTimerTaskUserData(), and mainwindow_log().
Referenced by mainwindow_new().
|
static |
Definition at line 830 of file MultiTest.c.
References data, eventtype_to_string(), _MultiTestApp::exit, fatal(), GHOST_GetEventType(), GHOST_GetEventWindow(), GHOST_GetWindowUserData(), GHOST_kEventQuitRequest, GHOST_ValidWindow(), _MultiTestApp::logger, loggerwindow_log(), _MultiTestApp::sys, and windowdata_handle().
Referenced by multitestapp_new().
| void multitestapp_exit | ( | MultiTestApp * | app | ) |
Definition at line 925 of file MultiTest.c.
References _MultiTestApp::exit.
Referenced by loggerwindow_do_key(), and mainwindow_do_key().
| void multitestapp_free | ( | MultiTestApp * | app | ) |
Definition at line 938 of file MultiTest.c.
References BLF_exit(), GHOST_DisposeSystem(), GPU_exit(), _MultiTestApp::logger, loggerwindow_free(), _MultiTestApp::main, mainwindow_free(), MEM_freeN(), and _MultiTestApp::sys.
Referenced by main().
| void multitestapp_free_extrawindow | ( | MultiTestApp * | app | ) |
Definition at line 909 of file MultiTest.c.
References _MultiTestApp::extra, extrawindow_free(), and NULL.
Referenced by extrawindow_handle(), and multitestapp_toggle_extra_window().
| LoggerWindow * multitestapp_get_logger | ( | MultiTestApp * | app | ) |
Definition at line 899 of file MultiTest.c.
References _MultiTestApp::logger.
Referenced by extrawindow_handle(), and mainwindow_log().
| GHOST_SystemHandle multitestapp_get_system | ( | MultiTestApp * | app | ) |
Definition at line 904 of file MultiTest.c.
References _MultiTestApp::sys.
Referenced by extrawindow_free(), extrawindow_new(), loggerwindow_free(), loggerwindow_new(), mainwindow_free(), and mainwindow_new().
| MultiTestApp * multitestapp_new | ( | void | ) |
Definition at line 868 of file MultiTest.c.
References _MultiTestApp::exit, _MultiTestApp::extra, fatal(), GHOST_AddEventConsumer(), GHOST_CreateEventConsumer(), GHOST_CreateSystem(), GPU_backend_ghost_system_set(), _MultiTestApp::logger, loggerwindow_new(), _MultiTestApp::main, mainwindow_new(), MEM_mallocN, multitest_event_handler(), NULL, and _MultiTestApp::sys.
Referenced by main().
| void multitestapp_run | ( | MultiTestApp * | app | ) |
Definition at line 930 of file MultiTest.c.
References _MultiTestApp::exit, GHOST_DispatchEvents(), GHOST_ProcessEvents(), and _MultiTestApp::sys.
Referenced by main().
| void multitestapp_toggle_extra_window | ( | MultiTestApp * | app | ) |
Definition at line 915 of file MultiTest.c.
References _MultiTestApp::extra, extrawindow_new(), and multitestapp_free_extrawindow().
Referenced by extrawindow_do_key(), and mainwindow_do_key().
| void rect_bevel_side | ( | int | rect[2][2], |
| int | side, | ||
| float * | lt, | ||
| float * | dk, | ||
| const float | col[3], | ||
| int | width ) |
Definition at line 63 of file MultiTest.c.
Referenced by rect_bevel_smooth().
Definition at line 98 of file MultiTest.c.
References col, float, free(), rect_bevel_side(), and v.
Referenced by loggerwindow_do_draw().
|
extern |
|
extern |