Blender V5.0
MultiTest.c File Reference
#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

Functions

void loggerwindow_log (LoggerWindow *lw, char *line)
void multitestapp_toggle_extra_window (MultiTestApp *app)
void multitestapp_free_extrawindow (MultiTestApp *app)
LoggerWindowmultitestapp_get_logger (MultiTestApp *app)
GHOST_SystemHandle multitestapp_get_system (MultiTestApp *app)
void multitestapp_exit (MultiTestApp *app)
void rect_bevel_side (int rect[2][2], int side, float *lt, float *dk, const float col[3], int width)
void rect_bevel_smooth (int rect[2][2], int width)
static void mainwindow_log (MainWindow *mw, char *str)
static void mainwindow_do_draw (MainWindow *mw)
static void mainwindow_do_reshape (MainWindow *mw)
static void mainwindow_do_key (MainWindow *mw, GHOST_TKey key, int press)
static void mainwindow_do_move (MainWindow *mw, int x, int y)
static void mainwindow_do_button (MainWindow *mw, int which, int press)
static void mainwindow_handle (void *priv, GHOST_EventHandle evt)
static void mainwindow_timer_proc (GHOST_TimerTaskHandle task, uint64_t time)
MainWindowmainwindow_new (MultiTestApp *app)
void mainwindow_free (MainWindow *mw)
static void loggerwindow_recalc_regions (LoggerWindow *lw)
static void loggerwindow_setup_window_gl (LoggerWindow *lw)
static void loggerwindow_do_reshape (LoggerWindow *lw)
static void loggerwindow_do_draw (LoggerWindow *lw)
static void loggerwindow_do_move (LoggerWindow *lw, int x, int y)
static void loggerwindow_do_button (LoggerWindow *lw, int which, int press)
static void loggerwindow_do_key (LoggerWindow *lw, GHOST_TKey key, int press)
static void loggerwindow_handle (void *priv, GHOST_EventHandle evt)
LoggerWindowloggerwindow_new (MultiTestApp *app)
void loggerwindow_free (LoggerWindow *lw)
static void extrawindow_do_draw (ExtraWindow *ew)
static void extrawindow_do_reshape (ExtraWindow *ew)
static void extrawindow_do_key (ExtraWindow *ew, GHOST_TKey key, int press)
static void extrawindow_spin_cursor (ExtraWindow *ew, uint64_t time)
static void extrawindow_handle (void *priv, GHOST_EventHandle evt)
ExtraWindowextrawindow_new (MultiTestApp *app)
void extrawindow_free (ExtraWindow *ew)
static bool multitest_event_handler (GHOST_EventHandle evt, GHOST_TUserDataPtr data)
MultiTestAppmultitestapp_new (void)
void multitestapp_run (MultiTestApp *app)
void multitestapp_free (MultiTestApp *app)
int main (int argc, char **argv)

Variables

int datatoc_bfont_ttf_size
char const datatoc_bfont_ttf []

Macro Definition Documentation

◆ SCROLLBAR_PAD

#define SCROLLBAR_PAD   2

Definition at line 380 of file MultiTest.c.

Referenced by loggerwindow_recalc_regions().

◆ SCROLLBAR_WIDTH

#define SCROLLBAR_WIDTH   14

Definition at line 381 of file MultiTest.c.

Referenced by loggerwindow_recalc_regions().

◆ TEXTAREA_PAD

#define TEXTAREA_PAD   2

Definition at line 382 of file MultiTest.c.

Referenced by loggerwindow_recalc_regions().

Typedef Documentation

◆ LoggerWindow

Definition at line 50 of file MultiTest.c.

◆ MultiTestApp

Definition at line 51 of file MultiTest.c.

Function Documentation

◆ extrawindow_do_draw()

◆ extrawindow_do_key()

void extrawindow_do_key ( ExtraWindow * ew,
GHOST_TKey key,
int press )
static

Definition at line 695 of file MultiTest.c.

References ExtraWindow::app, GHOST_kKeyE, and multitestapp_toggle_extra_window().

Referenced by extrawindow_handle().

◆ extrawindow_do_reshape()

◆ extrawindow_free()

◆ extrawindow_handle()

◆ extrawindow_new()

◆ extrawindow_spin_cursor()

void extrawindow_spin_cursor ( ExtraWindow * ew,
uint64_t time )
static

Definition at line 706 of file MultiTest.c.

References angle(), cos, fmod(), GHOST_SetCustomCursorShape(), i, mask(), sin, size(), v, ExtraWindow::win, x, and y.

Referenced by extrawindow_handle().

◆ loggerwindow_do_button()

◆ loggerwindow_do_draw()

◆ loggerwindow_do_key()

void loggerwindow_do_key ( LoggerWindow * lw,
GHOST_TKey key,
int press )
static

Definition at line 516 of file MultiTest.c.

References _LoggerWindow::app, GHOST_kKeyQ, and multitestapp_exit().

Referenced by loggerwindow_handle().

◆ loggerwindow_do_move()

void loggerwindow_do_move ( LoggerWindow * lw,
int x,
int y )
static

◆ loggerwindow_do_reshape()

◆ loggerwindow_free()

◆ loggerwindow_handle()

◆ loggerwindow_log()

◆ loggerwindow_new()

◆ loggerwindow_recalc_regions()

◆ loggerwindow_setup_window_gl()

void loggerwindow_setup_window_gl ( LoggerWindow * lw)
static

Definition at line 403 of file MultiTest.c.

References _LoggerWindow::size.

Referenced by loggerwindow_do_reshape().

◆ main()

int main ( int argc,
char ** argv )

Definition at line 957 of file MultiTest.c.

References BLF_init(), multitestapp_free(), multitestapp_new(), and multitestapp_run().

◆ mainwindow_do_button()

void mainwindow_do_button ( MainWindow * mw,
int which,
int press )
static

◆ mainwindow_do_draw()

◆ mainwindow_do_key()

◆ mainwindow_do_move()

void mainwindow_do_move ( MainWindow * mw,
int x,
int y )
static

◆ mainwindow_do_reshape()

◆ mainwindow_free()

◆ mainwindow_handle()

◆ mainwindow_log()

void mainwindow_log ( MainWindow * mw,
char * str )
static

◆ mainwindow_new()

◆ mainwindow_timer_proc()

void mainwindow_timer_proc ( GHOST_TimerTaskHandle task,
uint64_t time )
static

Definition at line 300 of file MultiTest.c.

References GHOST_GetTimerTaskUserData(), and mainwindow_log().

Referenced by mainwindow_new().

◆ multitest_event_handler()

◆ multitestapp_exit()

void multitestapp_exit ( MultiTestApp * app)

Definition at line 931 of file MultiTest.c.

References _MultiTestApp::exit.

Referenced by loggerwindow_do_key(), and mainwindow_do_key().

◆ multitestapp_free()

◆ multitestapp_free_extrawindow()

void multitestapp_free_extrawindow ( MultiTestApp * app)

Definition at line 915 of file MultiTest.c.

References _MultiTestApp::extra, and extrawindow_free().

Referenced by extrawindow_handle(), and multitestapp_toggle_extra_window().

◆ multitestapp_get_logger()

LoggerWindow * multitestapp_get_logger ( MultiTestApp * app)

Definition at line 905 of file MultiTest.c.

References _MultiTestApp::logger.

Referenced by extrawindow_handle(), and mainwindow_log().

◆ multitestapp_get_system()

GHOST_SystemHandle multitestapp_get_system ( MultiTestApp * app)

◆ multitestapp_new()

◆ multitestapp_run()

void multitestapp_run ( MultiTestApp * app)

Definition at line 936 of file MultiTest.c.

References _MultiTestApp::exit, GHOST_DispatchEvents(), GHOST_ProcessEvents(), and _MultiTestApp::sys.

Referenced by main().

◆ multitestapp_toggle_extra_window()

void multitestapp_toggle_extra_window ( MultiTestApp * app)

◆ rect_bevel_side()

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.

References col, i, pow, x, and y.

Referenced by rect_bevel_smooth().

◆ rect_bevel_smooth()

void rect_bevel_smooth ( int rect[2][2],
int width )

Definition at line 98 of file MultiTest.c.

References col, float, free(), i, rect_bevel_side(), and v.

Referenced by loggerwindow_do_draw().

Variable Documentation

◆ datatoc_bfont_ttf

char const datatoc_bfont_ttf[]
extern

◆ datatoc_bfont_ttf_size

int datatoc_bfont_ttf_size
extern