|
Blender
V2.59
|
#include <stdlib.h>#include <string.h>#include <stdio.h>#include <math.h>#include "GL.h"#include "MEM_guardedalloc.h"#include "GHOST_C-api.h"#include "BLF_api.h"#include "Util.h"#include "Basic.h"#include "ScrollBar.h"#include "EventToBuf.h"#include "WindowData.h"Go to the source code of this file.
| #define FALSE 0 |
***** BEGIN GPL LICENSE BLOCK *****
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. All rights reserved.
The Original Code is: all of this file.
Contributor(s): none yet.
***** END GPL LICENSE BLOCK *****
Definition at line 28 of file MultiTest.c.
Referenced by extrawindow_new(), loggerwindow_new(), and mainwindow_new().
| #define SCROLLBAR_PAD 2 |
Definition at line 360 of file MultiTest.c.
Referenced by loggerwindow_recalc_regions().
| #define SCROLLBAR_WIDTH 14 |
Definition at line 361 of file MultiTest.c.
Referenced by loggerwindow_recalc_regions().
| #define TEXTAREA_PAD 2 |
Definition at line 362 of file MultiTest.c.
Referenced by loggerwindow_recalc_regions().
| typedef struct _LoggerWindow LoggerWindow |
Definition at line 68 of file MultiTest.c.
| typedef struct _MultiTestApp MultiTestApp |
Definition at line 67 of file MultiTest.c.
| static void extrawindow_do_draw | ( | ExtraWindow * | ew | ) | [static] |
Definition at line 630 of file MultiTest.c.
References GHOST_ActivateWindowDrawingContext(), GHOST_SwapWindowBuffers(), ExtraWindow::size, and ExtraWindow::win.
Referenced by extrawindow_handle().
| static void extrawindow_do_key | ( | ExtraWindow * | ew, |
| GHOST_TKey | key, | ||
| int | press | ||
| ) | [static] |
Definition at line 661 of file MultiTest.c.
References ExtraWindow::app, GHOST_kKeyE, and multitestapp_toggle_extra_window().
Referenced by extrawindow_handle().
| static void extrawindow_do_reshape | ( | ExtraWindow * | ew | ) | [static] |
Definition at line 642 of file MultiTest.c.
References bounds(), GHOST_ActivateWindowDrawingContext(), GHOST_GetClientBounds(), GHOST_GetHeightRectangle(), GHOST_GetWidthRectangle(), ExtraWindow::size, and ExtraWindow::win.
Referenced by extrawindow_handle().
| void extrawindow_free | ( | ExtraWindow * | ew | ) |
Definition at line 758 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 void extrawindow_handle | ( | void * | priv, |
| GHOST_EventHandle | evt | ||
| ) | [static] |
Definition at line 702 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 737 of file MultiTest.c.
References MakeCursor::app, ExtraWindow::app, extrawindow_handle(), FALSE, GHOST_CreateWindow(), GHOST_kDrawingContextTypeOpenGL, GHOST_kWindowStateNormal, GHOST_SetWindowUserData(), MEM_callocN(), multitestapp_get_system(), NULL, ExtraWindow::win, and windowdata_new().
Referenced by multitestapp_toggle_extra_window().
| static void extrawindow_spin_cursor | ( | ExtraWindow * | ew, |
| GHOST_TUns64 | time | ||
| ) | [static] |
Definition at line 670 of file MultiTest.c.
References angle(), cos(), GHOST_SetCustomCursorShape(), i, sin(), and ExtraWindow::win.
Referenced by extrawindow_handle().
| static void loggerwindow_do_button | ( | LoggerWindow * | lw, |
| int | which, | ||
| int | press | ||
| ) | [static] |
Definition at line 480 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 void loggerwindow_do_draw | ( | LoggerWindow * | lw | ) | [static] |
Definition at line 406 of file MultiTest.c.
References BLF_draw(), BLF_position(), _LoggerWindow::font, _LoggerWindow::fontheight, _LoggerWindow::fonttexid, GHOST_ActivateWindowDrawingContext(), GHOST_SwapWindowBuffers(), i, _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 void loggerwindow_do_key | ( | LoggerWindow * | lw, |
| GHOST_TKey | key, | ||
| int | press | ||
| ) | [static] |
Definition at line 504 of file MultiTest.c.
References _LoggerWindow::app, GHOST_kKeyQ, and multitestapp_exit().
Referenced by loggerwindow_handle().
| static void loggerwindow_do_move | ( | LoggerWindow * | lw, |
| int | x, | ||
| int | y | ||
| ) | [static] |
Definition at line 471 of file MultiTest.c.
References GHOST_InvalidateWindow(), _LoggerWindow::lmouse, _LoggerWindow::scroll, scrollbar_is_scrolling(), scrollbar_keep_scrolling(), and _LoggerWindow::win.
Referenced by loggerwindow_handle().
| static void loggerwindow_do_reshape | ( | LoggerWindow * | lw | ) | [static] |
Definition at line 394 of file MultiTest.c.
References bounds(), GHOST_ActivateWindowDrawingContext(), GHOST_GetClientBounds(), GHOST_GetHeightRectangle(), GHOST_GetWidthRectangle(), 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 603 of file MultiTest.c.
References _LoggerWindow::app, GHOST_DisposeWindow(), GHOST_GetWindowUserData(), i, _LoggerWindow::loglines, MEM_freeN(), multitestapp_get_system(), _LoggerWindow::nloglines, _LoggerWindow::win, and windowdata_free().
Referenced by multitestapp_free().
| static void loggerwindow_handle | ( | void * | priv, |
| GHOST_EventHandle | evt | ||
| ) | [static] |
Definition at line 513 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, and GHOST_TEventCursorData::y.
Referenced by loggerwindow_new().
| void loggerwindow_log | ( | LoggerWindow * | lw, |
| char * | line | ||
| ) |
Definition at line 592 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 549 of file MultiTest.c.
References MakeCursor::app, _LoggerWindow::app, BLF_height(), BLF_load_mem(), BLF_size(), datatoc_bfont_ttf, datatoc_bfont_ttf_size, FALSE, _LoggerWindow::font, _LoggerWindow::fontheight, _LoggerWindow::fonttexid, GHOST_CreateWindow(), GHOST_GetMainDisplayDimensions(), GHOST_kDrawingContextTypeOpenGL, GHOST_kWindowStateNormal, GHOST_SetWindowUserData(), loggerwindow_do_reshape(), loggerwindow_handle(), _LoggerWindow::loglines, _LoggerWindow::logsize, MEM_callocN(), MEM_mallocN(), multitestapp_get_system(), _LoggerWindow::nloglines, NULL, rect_height(), _LoggerWindow::scroll, scrollbar_new(), _LoggerWindow::win, and windowdata_new().
Referenced by multitestapp_new().
| static void loggerwindow_recalc_regions | ( | LoggerWindow * | lw | ) | [static] |
Definition at line 363 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 void loggerwindow_setup_window_gl | ( | LoggerWindow * | lw | ) | [static] |
Definition at line 382 of file MultiTest.c.
References _LoggerWindow::size.
Referenced by loggerwindow_do_reshape().
| int main | ( | int | argc, |
| char ** | argv | ||
| ) |
Definition at line 881 of file MultiTest.c.
References MakeCursor::app, BLF_init(), multitestapp_free(), multitestapp_new(), and multitestapp_run().
| static void mainwindow_do_button | ( | MainWindow * | mw, |
| int | which, | ||
| int | press | ||
| ) | [static] |
Definition at line 239 of file MultiTest.c.
References GHOST_InvalidateWindow(), GHOST_kButtonMaskLeft, MainWindow::lmbut, MainWindow::lmouse, MainWindow::tmouse, and MainWindow::win.
Referenced by mainwindow_handle().
| static void mainwindow_do_draw | ( | MainWindow * | mw | ) | [static] |
Definition at line 152 of file MultiTest.c.
References GHOST_ActivateWindowDrawingContext(), GHOST_SwapWindowBuffers(), MainWindow::lmbut, MainWindow::tmouse, and MainWindow::win.
Referenced by mainwindow_handle().
| static void mainwindow_do_key | ( | MainWindow * | mw, |
| GHOST_TKey | key, | ||
| int | press | ||
| ) | [static] |
Definition at line 187 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(), i, mainwindow_log(), multitestapp_exit(), multitestapp_toggle_extra_window(), and MainWindow::win.
Referenced by mainwindow_handle().
| static void mainwindow_do_move | ( | MainWindow * | mw, |
| int | x, | ||
| int | y | ||
| ) | [static] |
Definition at line 230 of file MultiTest.c.
References GHOST_InvalidateWindow(), MainWindow::lmbut, MainWindow::lmouse, MainWindow::tmouse, and MainWindow::win.
Referenced by mainwindow_handle().
| static void mainwindow_do_reshape | ( | MainWindow * | mw | ) | [static] |
Definition at line 168 of file MultiTest.c.
References bounds(), GHOST_ActivateWindowDrawingContext(), GHOST_GetClientBounds(), GHOST_GetHeightRectangle(), GHOST_GetWidthRectangle(), MainWindow::size, and MainWindow::win.
Referenced by mainwindow_handle().
| void mainwindow_free | ( | MainWindow * | mw | ) |
Definition at line 322 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 void mainwindow_handle | ( | void * | priv, |
| GHOST_EventHandle | evt | ||
| ) | [static] |
Definition at line 251 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, and GHOST_TEventCursorData::y.
Referenced by mainwindow_new().
| static void mainwindow_log | ( | MainWindow * | mw, |
| char * | str | ||
| ) | [static] |
Definition at line 148 of file MultiTest.c.
References MainWindow::app, loggerwindow_log(), and multitestapp_get_logger().
Referenced by mainwindow_do_key(), mainwindow_handle(), and mainwindow_timer_proc().
| MainWindow* mainwindow_new | ( | MultiTestApp * | app | ) |
Definition at line 299 of file MultiTest.c.
References MainWindow::app, MakeCursor::app, FALSE, GHOST_CreateWindow(), GHOST_InstallTimer(), GHOST_kDrawingContextTypeOpenGL, GHOST_kWindowStateNormal, GHOST_SetWindowUserData(), mainwindow_handle(), mainwindow_timer_proc(), MEM_callocN(), multitestapp_get_system(), NULL, MainWindow::win, and windowdata_new().
Referenced by multitestapp_new().
| static void mainwindow_timer_proc | ( | GHOST_TimerTaskHandle | task, |
| GHOST_TUns64 | time | ||
| ) | [static] |
Definition at line 291 of file MultiTest.c.
References GHOST_GetTimerTaskUserData(), and mainwindow_log().
Referenced by mainwindow_new().
| static int multitest_event_handler | ( | GHOST_EventHandle | evt, |
| GHOST_TUserDataPtr | data | ||
| ) | [static] |
Definition at line 779 of file MultiTest.c.
References MakeCursor::app, eventtype_to_string(), _MultiTestApp::exit, fatal(), GHOST_GetEventType(), GHOST_GetEventWindow(), GHOST_GetWindowUserData(), GHOST_kEventQuit, GHOST_ValidWindow(), _MultiTestApp::logger, loggerwindow_log(), _MultiTestApp::sys, and windowdata_handle().
Referenced by multitestapp_new().
| void multitestapp_exit | ( | MultiTestApp * | app | ) |
Definition at line 861 of file MultiTest.c.
References _MultiTestApp::exit.
Referenced by loggerwindow_do_key(), and mainwindow_do_key().
| void multitestapp_free | ( | MultiTestApp * | app | ) |
Definition at line 872 of file MultiTest.c.
References GHOST_DisposeSystem(), _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 848 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 840 of file MultiTest.c.
References _MultiTestApp::logger.
Referenced by extrawindow_handle(), and mainwindow_log().
| GHOST_SystemHandle multitestapp_get_system | ( | MultiTestApp * | app | ) |
Definition at line 844 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 815 of file MultiTest.c.
References MakeCursor::app, _MultiTestApp::exit, _MultiTestApp::extra, fatal(), GHOST_AddEventConsumer(), GHOST_CreateEventConsumer(), GHOST_CreateSystem(), _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 865 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 853 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, | ||
| float * | col, | ||
| int | width | ||
| ) |
Definition at line 80 of file MultiTest.c.
Referenced by rect_bevel_smooth().
| void rect_bevel_smooth | ( | int | rect[2][2], |
| int | width | ||
| ) |
Definition at line 112 of file MultiTest.c.
References i, and rect_bevel_side().
Referenced by loggerwindow_do_draw().
| char bprogname[160] = "" |
Definition at line 54 of file MultiTest.c.
Referenced by BPY_python_start(), get_path_local(), get_path_system(), main(), and make_app_info().
| char datatoc_bfont_ttf[] |
Definition at line 7 of file bfont.ttf.c.
Referenced by loggerwindow_new(), main(), and uiStyleInit().
Definition at line 6 of file bfont.ttf.c.
Referenced by loggerwindow_new(), main(), and uiStyleInit().
| char U[1024] = {0} |
Definition at line 55 of file MultiTest.c.