Blender  V3.3
Classes | Macros | Typedefs | Functions | Variables
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.h"
#include "Basic.h"
#include "EventToBuf.h"
#include "ScrollBar.h"
#include "Util.h"
#include "WindowData.h"
#include "GPU_context.h"
#include "GPU_immediate.h"
#include "GPU_init_exit.h"

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 371 of file MultiTest.c.

◆ SCROLLBAR_WIDTH

#define SCROLLBAR_WIDTH   14

Definition at line 372 of file MultiTest.c.

◆ TEXTAREA_PAD

#define TEXTAREA_PAD   2

Definition at line 373 of file MultiTest.c.

Typedef Documentation

◆ LoggerWindow

typedef struct _LoggerWindow LoggerWindow

Definition at line 47 of file MultiTest.c.

◆ MultiTestApp

typedef struct _MultiTestApp MultiTestApp

Definition at line 47 of file MultiTest.c.

Function Documentation

◆ extrawindow_do_draw()

static void extrawindow_do_draw ( ExtraWindow ew)
static

◆ extrawindow_do_key()

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

Definition at line 678 of file MultiTest.c.

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

Referenced by extrawindow_handle().

◆ extrawindow_do_reshape()

static void extrawindow_do_reshape ( ExtraWindow ew)
static

◆ extrawindow_free()

void extrawindow_free ( ExtraWindow ew)

◆ extrawindow_handle()

static void extrawindow_handle ( void priv,
GHOST_EventHandle  evt 
)
static

◆ extrawindow_new()

ExtraWindow* extrawindow_new ( MultiTestApp app)

◆ extrawindow_spin_cursor()

static void extrawindow_spin_cursor ( ExtraWindow ew,
uint64_t  time 
)
static

Definition at line 688 of file MultiTest.c.

References angle(), KDL::cos(), double(), GHOST_SetCustomCursorShape(), mask(), KDL::sin(), time, v, ExtraWindow::win, x, and y.

Referenced by extrawindow_handle().

◆ loggerwindow_do_button()

static void loggerwindow_do_button ( LoggerWindow lw,
int  which,
int  press 
)
static

◆ loggerwindow_do_draw()

static void loggerwindow_do_draw ( LoggerWindow lw)
static

◆ loggerwindow_do_key()

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

Definition at line 506 of file MultiTest.c.

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

Referenced by loggerwindow_handle().

◆ loggerwindow_do_move()

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

◆ loggerwindow_do_reshape()

static void loggerwindow_do_reshape ( LoggerWindow lw)
static

◆ loggerwindow_free()

void loggerwindow_free ( LoggerWindow lw)

◆ loggerwindow_handle()

static void loggerwindow_handle ( void priv,
GHOST_EventHandle  evt 
)
static

◆ loggerwindow_log()

void loggerwindow_log ( LoggerWindow lw,
char *  line 
)

◆ loggerwindow_new()

LoggerWindow* loggerwindow_new ( MultiTestApp app)

◆ loggerwindow_recalc_regions()

static void loggerwindow_recalc_regions ( LoggerWindow lw)
static

◆ loggerwindow_setup_window_gl()

static void loggerwindow_setup_window_gl ( LoggerWindow lw)
static

Definition at line 394 of file MultiTest.c.

References glLoadIdentity, glMatrixMode, glOrtho, glTranslatef, and _LoggerWindow::size.

Referenced by loggerwindow_do_reshape().

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 931 of file MultiTest.c.

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

◆ mainwindow_do_button()

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

◆ mainwindow_do_draw()

static void mainwindow_do_draw ( MainWindow mw)
static

◆ mainwindow_do_key()

static void mainwindow_do_key ( MainWindow mw,
GHOST_TKey  key,
int  press 
)
static

◆ mainwindow_do_move()

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

◆ mainwindow_do_reshape()

static void mainwindow_do_reshape ( MainWindow mw)
static

◆ mainwindow_free()

void mainwindow_free ( MainWindow mw)

◆ mainwindow_handle()

static void mainwindow_handle ( void priv,
GHOST_EventHandle  evt 
)
static

◆ mainwindow_log()

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

◆ mainwindow_new()

MainWindow* mainwindow_new ( MultiTestApp app)

◆ mainwindow_timer_proc()

static void mainwindow_timer_proc ( GHOST_TimerTaskHandle  task,
uint64_t  time 
)
static

Definition at line 289 of file MultiTest.c.

References GHOST_GetTimerTaskUserData(), mainwindow_log(), blender::compositor::task, and time.

Referenced by mainwindow_new().

◆ multitest_event_handler()

static bool multitest_event_handler ( GHOST_EventHandle  evt,
GHOST_TUserDataPtr  data 
)
static

◆ multitestapp_exit()

void multitestapp_exit ( MultiTestApp app)

Definition at line 905 of file MultiTest.c.

References _MultiTestApp::exit.

Referenced by loggerwindow_do_key(), and mainwindow_do_key().

◆ multitestapp_free()

void multitestapp_free ( MultiTestApp app)

◆ multitestapp_free_extrawindow()

void multitestapp_free_extrawindow ( MultiTestApp app)

Definition at line 889 of file MultiTest.c.

References _MultiTestApp::extra, extrawindow_free(), and NULL.

Referenced by extrawindow_handle(), and multitestapp_toggle_extra_window().

◆ multitestapp_get_logger()

LoggerWindow * multitestapp_get_logger ( MultiTestApp app)

Definition at line 879 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* multitestapp_new ( void  )

◆ multitestapp_run()

void multitestapp_run ( MultiTestApp app)

Definition at line 910 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 62 of file MultiTest.c.

References col, glBegin, glColor3f, glColor3fv, glEnd, glRecti, glVertex2i, pow(), width, x, and y.

Referenced by rect_bevel_smooth().

◆ rect_bevel_smooth()

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

Definition at line 95 of file MultiTest.c.

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

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