-
Notifications
You must be signed in to change notification settings - Fork 1
/
MAUI.cpp
56 lines (41 loc) · 1.43 KB
/
MAUI.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
//-----------------------------------------------------------------------------
// Entaro ChucK Developer!
// This is a Chugin boilerplate, generated by chugerate!
//-----------------------------------------------------------------------------
// this should align with the correct versions of these ChucK files
#include "chuck_dl.h"
#include "chuck_def.h"
// general includes
#include <stdio.h>
#include <limits.h>
#include "chuck_ui.h"
#include "chuck_compile.h"
#include "miniAudicle_import.h"
#include "chuck_globals.h"
t_CKBOOL maui_main_loop_hook( void * bindle )
{
Chuck_UI_Manager * ui_manager = ( Chuck_UI_Manager * ) bindle;
ui_manager->run();
return TRUE;
}
t_CKBOOL maui_main_loop_quit( void * bindle )
{
Chuck_UI_Manager * ui_manager = ( Chuck_UI_Manager * ) bindle;
ui_manager->shutdown();
return TRUE;
}
// query function: chuck calls this when loading the Chugin
// NOTE: developer will need to modify this function to
// add additional functions to this Chugin
CK_DLL_QUERY( MAUI )
{
// hmm, don't change this...
QUERY->setname(QUERY, "MAUI");
Chuck_UI_Manager * ui_manager = Chuck_UI_Manager::instance();
ui_manager->init();
Chuck_DL_MainThreadHook * hook = QUERY->create_main_thread_hook( QUERY, maui_main_loop_hook, maui_main_loop_quit, ui_manager );
ui_manager->set_hook( hook );
init_maui( QUERY );
// wasn't that a breeze?
return TRUE;
}