Skip to content

Commit 2706a90

Browse files
committed
Overhauled the formatting and designs to improve readability and hone the module into a professional looking public framework.
1 parent 91c7e5e commit 2706a90

49 files changed

Lines changed: 39197 additions & 2878 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitattributes

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
* text eol=crlf
2+
*.sh text eol=lf
3+
4+
*.7z binary
5+
*.aif binary
6+
*.aiff binary
7+
*.asf binary
8+
*.eot binary
9+
*.fla binary
10+
*.flac binary
11+
*.flv binary
12+
*.gif binary
13+
*.gz binary
14+
*.ico binary
15+
*.jpeg binary
16+
*.jpg binary
17+
*.mid binary
18+
*.mov binary
19+
*.mp2 binary
20+
*.mp3 binary
21+
*.mp4 binary
22+
*.ogg binary
23+
*.otc binary
24+
*.otf binary
25+
*.pdf binary
26+
*.png binary
27+
*.pyc binary
28+
*.swf binary
29+
*.tga binary
30+
*.ttc binary
31+
*.ttf binary
32+
*.wav binary
33+
*.wma binary
34+
*.wm binary
35+
*.wmv binary
36+
*.woff binary
37+
*.zip binary

.gitignore

Lines changed: 86 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,86 @@
1-
._*
2-
*.mode1v3
3-
*.pbxuser
4-
*.perspectivev3
5-
*.user
6-
*.ncb
7-
*.suo
8-
*.ilk
9-
*.pch
10-
*.pdb
11-
*.dep
12-
*.idb
13-
*.manifest
14-
*.manifest.res
15-
*.o
16-
*.d
17-
*.sdf
18-
*.opensdf
19-
*.VC.db
20-
*.VC.opendb
21-
xcuserdata
22-
xcshareddata
23-
*.xccheckout
24-
*.xcscmblueprint
25-
contents.xcworkspacedata
26-
.DS_Store
27-
.svn
28-
.deps
29-
.dirstamp
30-
profile
31-
node_modules
32-
examples/**/build
33-
**/MacOSX/build
34-
**/iOS/build
35-
**/IDEWorkspaceChecks.plist
36-
**/Linux/build
37-
**/LinuxMakefile/build
38-
**/VisualStudio2005/Debug
39-
**/VisualStudio2005/Release
40-
**/VisualStudio2008/Debug
41-
**/VisualStudio2008/Release
42-
**/VisualStudio2010/Debug
43-
**/VisualStudio2010/Release
44-
**/VisualStudio2012/Debug
45-
**/VisualStudio2012/Release
46-
**/VisualStudio2013/Win32
47-
**/VisualStudio2013/x64
48-
**/VisualStudio2015/Win32
49-
**/VisualStudio2015/x64
50-
**/VisualStudio2017/Win32
51-
**/VisualStudio2017/x64
52-
**/Builds/x64
53-
**/.vs
54-
**/CodeBlocks/bin
55-
**/CodeBlocks/obj
56-
**/CodeBlocks/*.depend
57-
**/CodeBlocks/*.layout
58-
**/Builds/Android/.gradle
59-
**/Builds/Android/.idea
60-
**/Builds/Android/build
61-
**/Builds/Android/**/*.iml
62-
**/Builds/Android/local.properties
63-
**/Builds/Android/app/build
64-
**/Builds/Android/app/.externalNativeBuild
65-
**/Builds/Android/lib/build
66-
**/Builds/Android/lib/.externalNativeBuild
67-
**/Builds/CLion/cmake-build-*
68-
**/Builds/CLion/.idea
69-
**/doxygen/doc
70-
**/doxygen/build
71-
extras/Projucer/JUCECompileEngine.dylib
72-
**/AAX_SDK_2p3p1/Libs/*.build
73-
**/AAX_SDK_2p3p1/Libs/AAXLibrary/WinBuild/**/int
74-
**/AAX_SDK_2p3p1/Libs/Debug
75-
**/AAX_SDK_2p3p1/Libs/Release
76-
**/AAX_SDK_2p3p1/Documentation
1+
# Compiled object files
2+
*.slo
3+
*.lo
4+
*.o
5+
*.obj
6+
*.tlog
7+
*.log
8+
9+
.vscode
10+
11+
._*
12+
*.mode1v3
13+
*.pbxuser
14+
*.perspectivev3
15+
*.user
16+
*.ncb
17+
*.suo
18+
*.ilk
19+
*.pch
20+
*.pdb
21+
*.dep
22+
*.idb
23+
*.manifest
24+
*.manifest.res
25+
*.o
26+
*.d
27+
*.sdf
28+
*.opensdf
29+
*.VC.db
30+
*.VC.opendb
31+
xcuserdata
32+
xcshareddata
33+
*.xccheckout
34+
*.xcscmblueprint
35+
contents.xcworkspacedata
36+
.DS_Store
37+
.svn
38+
.deps
39+
.dirstamp
40+
profile
41+
node_modules
42+
examples/**/build
43+
**/MacOSX/build
44+
**/iOS/build
45+
**/IDEWorkspaceChecks.plist
46+
**/Linux/build
47+
**/LinuxMakefile/build
48+
**/VisualStudio2005/Debug
49+
**/VisualStudio2005/Release
50+
**/VisualStudio2008/Debug
51+
**/VisualStudio2008/Release
52+
**/VisualStudio2010/Debug
53+
**/VisualStudio2010/Release
54+
**/VisualStudio2012/Debug
55+
**/VisualStudio2012/Release
56+
**/VisualStudio2013/Win32
57+
**/VisualStudio2013/x64
58+
**/VisualStudio2015/Win32
59+
**/VisualStudio2015/x64
60+
**/VisualStudio2017/Win32
61+
**/VisualStudio2017/x64
62+
**/Builds/x64
63+
**/.vs
64+
**/CodeBlocks/bin
65+
**/CodeBlocks/obj
66+
**/CodeBlocks/*.depend
67+
**/CodeBlocks/*.layout
68+
**/Builds/Android/.gradle
69+
**/Builds/Android/.idea
70+
**/Builds/Android/build
71+
**/Builds/Android/**/*.iml
72+
**/Builds/Android/local.properties
73+
**/Builds/Android/app/build
74+
**/Builds/Android/app/.externalNativeBuild
75+
**/Builds/Android/lib/build
76+
**/Builds/Android/lib/.externalNativeBuild
77+
**/Builds/CLion/cmake-build-*
78+
**/Builds/CLion/.idea
79+
**/doxygen/doc
80+
**/doxygen/build
81+
extras/Projucer/JUCECompileEngine.dylib
82+
**/AAX_SDK_2p3p1/Libs/*.build
83+
**/AAX_SDK_2p3p1/Libs/AAXLibrary/WinBuild/**/int
84+
**/AAX_SDK_2p3p1/Libs/Debug
85+
**/AAX_SDK_2p3p1/Libs/Release
86+
**/AAX_SDK_2p3p1/Documentation

blueprint/blueprint.cpp

Lines changed: 31 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -1,97 +1,36 @@
1-
/*
2-
==============================================================================
3-
4-
blueprint.cpp
5-
Created: 26 Nov 2018 3:19:03pm
6-
7-
==============================================================================
8-
*/
9-
101
#ifdef BLUEPRINT_H_INCLUDED
11-
/* When you add this cpp file to your project, you mustn't include it in a file where you've
12-
already included any other headers - just put it inside a file on its own, possibly with your config
13-
flags preceding it, but don't include anything else. That also includes avoiding any automatic prefix
14-
header files that the compiler may be using.
15-
*/
16-
#error "Incorrect use of the Blueprint cpp file"
2+
/** When you add this cpp file to your project, you mustn't include it in a file where you've
3+
already included any other headers - just put it inside a file on its own, possibly with your config
4+
flags preceding it, but don't include anything else. That also includes avoiding any automatic prefix
5+
header files that the compiler may be using.
6+
*/
7+
#error "Incorrect use of the Blueprint cpp file!"
178
#endif
189

19-
/* We're careful to include the duktape source files before the module header
20-
* file because `duktape.c` sets certain preprocessor definitions that enable
21-
* necessary features in the duktape header. We need those defines to preempt
22-
* the loading of the duktape header. This also, therefore, is the place for
23-
* custom preprocessor definitions.
24-
*
25-
* We force Duktape to use a time provider on Windows that is compatible with
26-
* Windows 7 SP1. It looks like W7SP1 is quite happy with plugins built with
27-
* the 8.1 SDK, but the GetSystemTimePreciseAsFileTime() call used in here is
28-
* just not supported without the 8.1 dll available.
29-
*/
30-
#if defined (_WIN32) || defined (_WIN64)
31-
#define DUK_USE_DATE_NOW_WINDOWS 1
32-
#endif
10+
//==============================================================================
11+
#define JUCE_CORE_INCLUDE_NATIVE_HEADERS 1
3312

34-
/*
35-
* For whatever reason it is necessary to define this to resolve errors caused by both
36-
* duktape and juce including parts of the winsock2 API. There may be a better way to
37-
* resolve this.
38-
*/
39-
#if defined (_WIN32) || defined (_WIN64)
40-
#define _WINSOCKAPI_
41-
#endif
42-
43-
// Disable compiler warnings for external source files (duktape & yoga)
44-
#if _MSC_VER
45-
#pragma warning(push)
46-
#pragma warning(disable : 4018) // signed/unsigned mismatch
47-
#pragma warning(disable : 4127) // conditional expression is constant
48-
#pragma warning(disable : 4244) // possible loss of data
49-
#pragma warning(disable : 4505) // unreferenced local function
50-
#pragma warning(disable : 4611) // object destruction is non-portable
51-
#pragma warning(disable : 4702) // unreachable code
52-
#elif __clang__
53-
#pragma clang diagnostic push
54-
#pragma clang diagnostic ignored "-Wextra-semi"
55-
#pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant"
56-
#pragma clang diagnostic ignored "-Wswitch-enum"
57-
#pragma clang diagnostic ignored "-Wshorten-64-to-32"
58-
#pragma clang diagnostic ignored "-Wshadow-field-in-constructor"
59-
#pragma clang diagnostic ignored "-Wsign-conversion"
60-
#pragma clang diagnostic ignored "-Wused-but-marked-unused"
61-
#pragma clang diagnostic ignored "-Wformat-nonliteral"
62-
#if __clang_major__ > 10
63-
#pragma clang diagnostic ignored "-Wc++98-compat-extra-semi"
64-
#pragma clang diagnostic ignored "-Wimplicit-int-conversion"
65-
#pragma clang diagnostic ignored "-Wimplicit-float-conversion"
66-
#else
67-
#pragma clang diagnostic ignored "-Wconversion"
68-
#endif
69-
#elif __GNUC__
70-
#pragma GCC diagnostic push
71-
#pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant"
72-
#pragma GCC diagnostic ignored "-Wsign-conversion"
73-
#pragma GCC diagnostic ignored "-Wswitch-enum"
74-
#pragma GCC diagnostic ignored "-Wunused-variable"
75-
#pragma GCC diagnostic ignored "-Wredundant-decls"
76-
#endif
13+
#undef DUK_COMPILING_DUKTAPE
14+
#define DUK_COMPILING_DUKTAPE 1
7715

16+
//==============================================================================
17+
#include "blueprint.h"
7818

79-
// We rely on the JUCE_DEBUG macro in duk_config.h at the moment to determine
80-
// when we enable duktape debug features. This is a bit of a hack to make this
81-
// work. We should be able to do better and may do so once we enable custom duktape
82-
// configs.
83-
#include <juce_core/system/juce_TargetPlatform.h>
19+
//==============================================================================
20+
#include "internal/BeginIgnoringThirdPartyWarnings.h"
8421

85-
#include "duktape/src-noline/duktape.c"
86-
#include "duktape/extras/console/duk_console.c"
22+
extern "C"
23+
{
24+
#undef DUK_COMPILING_DUKTAPE
25+
#include "duktape/src-noline/duktape.c"
26+
#include "duktape/extras/console/duk_console.c"
8727

88-
#if defined (_WIN32) || defined (_WIN64)
28+
#if JUCE_WINDOWS
8929
#include "duktape/examples/debug-trans-socket/duk_trans_socket_windows.c"
90-
#else
30+
#else
9131
#include "duktape/examples/debug-trans-socket/duk_trans_socket_unix.c"
92-
#endif
93-
94-
#include "blueprint.h"
32+
#endif
33+
}
9534

9635
#include "yoga/yoga/log.cpp"
9736
#include "yoga/yoga/event/event.cpp"
@@ -105,29 +44,22 @@
10544
#include "yoga/yoga/YGValue.cpp"
10645
#include "yoga/yoga/Yoga.cpp"
10746

108-
// Enable compiler warnings
109-
#if _MSC_VER
110-
#pragma warning (pop)
111-
#elif __clang__
112-
#pragma clang diagnostic pop
113-
#elif __GNUC__
114-
#pragma GCC diagnostic pop
115-
#endif
47+
#include "internal/EndIgnoringThirdPartyWarnings.h"
11648

49+
//==============================================================================
11750
#include "core/blueprint_AppHarness.cpp"
11851
#include "core/blueprint_EcmascriptEngine.cpp"
119-
120-
#if JUCE_MODULE_AVAILABLE_juce_audio_processors
121-
#include "core/blueprint_GenericEditor.cpp"
122-
#endif
123-
12452
#include "core/blueprint_ReactApplicationRoot.cpp"
12553
#include "core/blueprint_ShadowView.cpp"
12654
#include "core/blueprint_TextShadowView.cpp"
12755
#include "core/blueprint_View.cpp"
12856
#include "core/blueprint_ViewManager.cpp"
12957
#include "core/blueprint_ScrollView.cpp"
13058

131-
#ifdef BLUEPRINT_INCLUDE_TESTS
132-
#include "tests/blueprint_EcmascriptEngineTests.cpp"
59+
#if JUCE_MODULE_AVAILABLE_juce_audio_processors
60+
#include "core/blueprint_GenericEditor.cpp"
61+
#endif
62+
63+
#if BLUEPRINT_INCLUDE_UNIT_TESTS
64+
#include "tests/blueprint_EcmascriptEngineTests.cpp"
13365
#endif

0 commit comments

Comments
 (0)