├── .cproject ├── .gitignore ├── .project ├── Assets ├── Makefile.am ├── check.png ├── check.png.h ├── coda.ttf ├── coda.ttf.h ├── debug.css ├── debug.css.h ├── debug.json ├── debug.json.h ├── resize.png ├── resize.png.h ├── stylesheet.css └── stylesheet.css.h ├── COPYING ├── Documentation ├── .gitignore ├── INSTALL.md ├── demo.gif ├── hello-thumbnail.jpg ├── index.md ├── layout.xml ├── quetoo1.jpg ├── quetoo2.jpg ├── quetoo3.jpg └── style.css ├── Doxyfile ├── Examples ├── .gitignore ├── Hello.c ├── HelloViewController.c ├── HelloViewController.h ├── HelloViewController.json ├── Makefile.am ├── clack.wav ├── clack.wav.h ├── click.wav └── click.wav.h ├── INSTALL.md ├── Makefile.am ├── ObjectivelyMVC.vs15 ├── .gitignore ├── Example.vcxproj ├── Example.vcxproj.filters ├── ObjectivelyMVC.sln ├── ObjectivelyMVC.vcxproj ├── ObjectivelyMVC.vcxproj.filters ├── ObjectivelyMVC_all.sln ├── Sources │ ├── ObjectivelyMVC │ │ └── Config.h │ └── WindowlyMVC.h ├── build_settings.props └── libs │ ├── fontconfig │ ├── COPYING │ ├── fontconfig │ │ └── fontconfig.h │ └── lib │ │ ├── Win32 │ │ └── fontconfig.lib │ │ └── x64 │ │ └── fontconfig.lib │ ├── freetype │ └── lib │ │ ├── Win32 │ │ └── freetype.lib │ │ └── x64 │ │ └── freetype.lib │ ├── sdl │ ├── COPYING.txt │ ├── SDL2 │ │ ├── SDL.h │ │ ├── SDL_assert.h │ │ ├── SDL_atomic.h │ │ ├── SDL_audio.h │ │ ├── SDL_bits.h │ │ ├── SDL_blendmode.h │ │ ├── SDL_clipboard.h │ │ ├── SDL_config.h │ │ ├── SDL_config_android.h │ │ ├── SDL_config_iphoneos.h │ │ ├── SDL_config_macosx.h │ │ ├── SDL_config_minimal.h │ │ ├── SDL_config_os2.h │ │ ├── SDL_config_pandora.h │ │ ├── SDL_config_psp.h │ │ ├── SDL_config_windows.h │ │ ├── SDL_config_winrt.h │ │ ├── SDL_config_wiz.h │ │ ├── SDL_copying.h │ │ ├── SDL_cpuinfo.h │ │ ├── SDL_egl.h │ │ ├── SDL_endian.h │ │ ├── SDL_error.h │ │ ├── SDL_events.h │ │ ├── SDL_filesystem.h │ │ ├── SDL_gamecontroller.h │ │ ├── SDL_gesture.h │ │ ├── SDL_haptic.h │ │ ├── SDL_hints.h │ │ ├── SDL_joystick.h │ │ ├── SDL_keyboard.h │ │ ├── SDL_keycode.h │ │ ├── SDL_loadso.h │ │ ├── SDL_locale.h │ │ ├── SDL_log.h │ │ ├── SDL_main.h │ │ ├── SDL_messagebox.h │ │ ├── SDL_metal.h │ │ ├── SDL_misc.h │ │ ├── SDL_mouse.h │ │ ├── SDL_mutex.h │ │ ├── SDL_name.h │ │ ├── SDL_opengl.h │ │ ├── SDL_opengl_glext.h │ │ ├── SDL_opengles.h │ │ ├── SDL_opengles2.h │ │ ├── SDL_opengles2_gl2.h │ │ ├── SDL_opengles2_gl2ext.h │ │ ├── SDL_opengles2_gl2platform.h │ │ ├── SDL_opengles2_khrplatform.h │ │ ├── SDL_pixels.h │ │ ├── SDL_platform.h │ │ ├── SDL_power.h │ │ ├── SDL_quit.h │ │ ├── SDL_rect.h │ │ ├── SDL_render.h │ │ ├── SDL_revision.h │ │ ├── SDL_rwops.h │ │ ├── SDL_scancode.h │ │ ├── SDL_sensor.h │ │ ├── SDL_shape.h │ │ ├── SDL_stdinc.h │ │ ├── SDL_surface.h │ │ ├── SDL_system.h │ │ ├── SDL_syswm.h │ │ ├── SDL_test.h │ │ ├── SDL_test_assert.h │ │ ├── SDL_test_common.h │ │ ├── SDL_test_compare.h │ │ ├── SDL_test_crc32.h │ │ ├── SDL_test_font.h │ │ ├── SDL_test_fuzzer.h │ │ ├── SDL_test_harness.h │ │ ├── SDL_test_images.h │ │ ├── SDL_test_log.h │ │ ├── SDL_test_md5.h │ │ ├── SDL_test_memory.h │ │ ├── SDL_test_random.h │ │ ├── SDL_thread.h │ │ ├── SDL_timer.h │ │ ├── SDL_touch.h │ │ ├── SDL_types.h │ │ ├── SDL_version.h │ │ ├── SDL_video.h │ │ ├── SDL_vulkan.h │ │ ├── begin_code.h │ │ └── close_code.h │ └── lib │ │ ├── Win32 │ │ ├── SDL2.dll │ │ ├── SDL2.lib │ │ └── SDL2.pdb │ │ └── x64 │ │ ├── SDL2.dll │ │ ├── SDL2.lib │ │ └── SDL2.pdb │ ├── sdl_image │ ├── SDL2 │ │ └── SDL_image.h │ └── lib │ │ ├── Win32 │ │ ├── LICENSE.jpeg.txt │ │ ├── LICENSE.png.txt │ │ ├── LICENSE.zlib.txt │ │ ├── SDL2_image.dll │ │ ├── SDL2_image.lib │ │ ├── SDL2_image.pdb │ │ ├── jpeg62.dll │ │ ├── jpeg62.pdb │ │ ├── libpng16.dll │ │ ├── libpng16.pdb │ │ ├── zlib.pdb │ │ └── zlib1.dll │ │ └── x64 │ │ ├── LICENSE.jpeg.txt │ │ ├── LICENSE.png.txt │ │ ├── LICENSE.zlib.txt │ │ ├── SDL2_image.dll │ │ ├── SDL2_image.lib │ │ ├── SDL2_image.pdb │ │ ├── jpeg62.dll │ │ ├── jpeg62.pdb │ │ ├── libpng16.dll │ │ ├── libpng16.pdb │ │ ├── zlib.pdb │ │ └── zlib1.dll │ └── sdl_ttf │ ├── SDL2 │ └── SDL_ttf.h │ └── lib │ ├── Win32 │ ├── LICENSE.freetype.txt │ ├── LICENSE.zlib.txt │ ├── SDL2_ttf.dll │ ├── SDL2_ttf.lib │ └── SDL2_ttf.pdb │ └── x64 │ ├── LICENSE.freetype.txt │ ├── LICENSE.zlib.txt │ ├── SDL2_ttf.dll │ ├── SDL2_ttf.lib │ └── SDL2_ttf.pdb ├── ObjectivelyMVC.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcuserdata │ │ └── jdolan.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── xcshareddata │ └── xcschemes │ ├── ObjectivelyMVC-Examples.xcscheme │ ├── ObjectivelyMVC-Hello.xcscheme │ ├── ObjectivelyMVC-Selector.xcscheme │ ├── ObjectivelyMVC-Style.xcscheme │ ├── ObjectivelyMVC-Stylesheet.xcscheme │ ├── ObjectivelyMVC-Tests.xcscheme │ └── ObjectivelyMVC.xcscheme ├── ObjectivelyMVC.xcworkspace ├── contents.xcworkspacedata └── xcshareddata │ ├── ObjectivelyMVC.xcscmblueprint │ └── SDL_mvc.xcscmblueprint ├── README.md ├── Sources ├── Makefile.am ├── ObjectivelyMVC.h ├── ObjectivelyMVC.pc.in └── ObjectivelyMVC │ ├── Action.c │ ├── Action.h │ ├── Box.c │ ├── Box.h │ ├── Button.c │ ├── Button.h │ ├── Checkbox.c │ ├── Checkbox.h │ ├── CollectionItemView.c │ ├── CollectionItemView.h │ ├── CollectionView.c │ ├── CollectionView.h │ ├── Colors.c │ ├── Colors.h │ ├── Control.c │ ├── Control.h │ ├── DebugViewController.c │ ├── DebugViewController.h │ ├── Font.c │ ├── Font.h │ ├── HSVColorPicker.c │ ├── HSVColorPicker.h │ ├── HueColorPicker.c │ ├── HueColorPicker.h │ ├── Image.c │ ├── Image.h │ ├── ImageView.c │ ├── ImageView.h │ ├── Input.c │ ├── Input.h │ ├── Label.c │ ├── Label.h │ ├── Log.h │ ├── Makefile.am │ ├── NavigationViewController.c │ ├── NavigationViewController.h │ ├── Option.c │ ├── Option.h │ ├── PageView.c │ ├── PageView.h │ ├── Panel.c │ ├── Panel.h │ ├── ProgressBar.c │ ├── ProgressBar.h │ ├── RGBColorPicker.c │ ├── RGBColorPicker.h │ ├── Renderer.c │ ├── Renderer.h │ ├── ScrollView.c │ ├── ScrollView.h │ ├── Select.c │ ├── Select.h │ ├── Selector.c │ ├── Selector.h │ ├── SelectorSequence.c │ ├── SelectorSequence.h │ ├── SimpleSelector.c │ ├── SimpleSelector.h │ ├── Slider.c │ ├── Slider.h │ ├── StackView.c │ ├── StackView.h │ ├── Style.c │ ├── Style.h │ ├── Stylesheet.c │ ├── Stylesheet.h │ ├── TabView.c │ ├── TabView.h │ ├── TabViewController.c │ ├── TabViewController.h │ ├── TabViewItem.c │ ├── TabViewItem.h │ ├── TableCellView.c │ ├── TableCellView.h │ ├── TableColumn.c │ ├── TableColumn.h │ ├── TableHeaderCellView.c │ ├── TableHeaderCellView.h │ ├── TableHeaderView.c │ ├── TableHeaderView.h │ ├── TableRowView.c │ ├── TableRowView.h │ ├── TableView.c │ ├── TableView.h │ ├── Text.c │ ├── Text.h │ ├── TextView.c │ ├── TextView.h │ ├── Theme.c │ ├── Theme.h │ ├── Types.h │ ├── View+JSON.c │ ├── View+JSON.h │ ├── View.c │ ├── View.h │ ├── ViewController.c │ ├── ViewController.h │ ├── Warning.c │ ├── Warning.h │ ├── Window.c │ ├── Window.h │ ├── WindowController.c │ └── WindowController.h ├── Tests ├── Makefile.am └── ObjectivelyMVC │ ├── .gitignore │ ├── Makefile.am │ ├── Selector.c │ ├── Style.c │ └── Stylesheet.c ├── appveyor.yml ├── configure.ac └── m4 └── .gitignore /.gitignore: -------------------------------------------------------------------------------- 1 | # Defines which files Git should ignore 2 | # http://git-scm.com 3 | *~ 4 | *.dll 5 | *.exe 6 | *.la 7 | *.lo 8 | *.o 9 | *.pc 10 | *.swp 11 | .deps/ 12 | .dirstamp 13 | .DS_Store 14 | .libs/ 15 | .settings/ 16 | aclocal.m4 17 | autom4te.cache/ 18 | compile 19 | config.guess 20 | Config.h 21 | Config.h.in 22 | config.log 23 | config.status 24 | config.sub 25 | configure 26 | depcomp 27 | gmon.out 28 | install-sh 29 | libtool 30 | ltmain.sh 31 | m4/* 32 | Makefile 33 | Makefile.in 34 | missing 35 | nbproject 36 | stamp-h1 37 | test-driver 38 | xcuserdata/ 39 | -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | ObjectivelyMVC 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.cdt.managedbuilder.core.genmakebuilder 10 | clean,full,incremental, 11 | 12 | 13 | 14 | 15 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder 16 | full,incremental, 17 | 18 | 19 | 20 | 21 | 22 | org.eclipse.cdt.core.cnature 23 | org.eclipse.cdt.managedbuilder.core.managedBuildNature 24 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature 25 | 26 | 27 | -------------------------------------------------------------------------------- /Assets/Makefile.am: -------------------------------------------------------------------------------- 1 | %.h: % 2 | xxd -i $^ $@ 3 | 4 | BUILT_SOURCES = \ 5 | check.png.h \ 6 | coda.ttf.h \ 7 | debug.css.h \ 8 | debug.json.h \ 9 | resize.png.h \ 10 | stylesheet.css.h 11 | -------------------------------------------------------------------------------- /Assets/check.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdolan/ObjectivelyMVC/528fce79225040311729799c5121060c680b4f2f/Assets/check.png -------------------------------------------------------------------------------- /Assets/coda.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdolan/ObjectivelyMVC/528fce79225040311729799c5121060c680b4f2f/Assets/coda.ttf -------------------------------------------------------------------------------- /Assets/debug.css: -------------------------------------------------------------------------------- 1 | #debug { 2 | alignment: middle-right; 3 | autoresizing-mask: fit; 4 | background-color: #6688aacc; 5 | border-color: #6080a0; 6 | border-width 1; 7 | padding: 4 4 4 4; 8 | } 9 | 10 | #debug * { 11 | font-size: 12; 12 | } 13 | 14 | #debug > #statistics { 15 | color: darkblue; 16 | } 17 | 18 | #debug > #path { 19 | color: darkslateblue; 20 | } 21 | 22 | #debug > #description { 23 | color: purple; 24 | } 25 | 26 | #debug > TableView { 27 | autoresizing-mask: contain | width; 28 | } 29 | 30 | #debug > #selectors * { 31 | color: darkviolet; 32 | } 33 | 34 | #debug > #selectors #Selector { 35 | min-width: 400; 36 | } 37 | 38 | #debug > #computedStyle * { 39 | color: mediumvioletred; 40 | } 41 | 42 | #debug > #computedStyle #Attribute { 43 | min-width: 160; 44 | } 45 | 46 | #debug > #computedStyle #Value { 47 | min-width: 240; 48 | } 49 | 50 | #debug > #warnings * { 51 | color: yellow; 52 | } 53 | -------------------------------------------------------------------------------- /Assets/debug.json: -------------------------------------------------------------------------------- 1 | { 2 | "style": { 3 | "autoresizing-mask": "fill" 4 | }, 5 | "subviews": [ 6 | { 7 | "class": "StackView", 8 | "identifier": "debug", 9 | "classNames": [ 10 | "container" 11 | ], 12 | "style": { 13 | "autoresizing-mask": "fit" 14 | }, 15 | "subviews": [ 16 | { 17 | "class": "Text", 18 | "identifier": "statistics" 19 | }, 20 | { 21 | "class": "Text", 22 | "identifier": "path", 23 | "lineWrap": true 24 | }, 25 | { 26 | "class": "Text", 27 | "identifier": "description" 28 | }, 29 | { 30 | "class": "TableView", 31 | "identifier": "selectors", 32 | "columns": [ 33 | { 34 | "identifier": "Selectors" 35 | } 36 | ] 37 | }, 38 | { 39 | "class": "TableView", 40 | "identifier": "computedStyle", 41 | "columns": [ 42 | { 43 | "identifier": "Attribute" 44 | }, 45 | { 46 | "identifier": "Value" 47 | } 48 | ] 49 | }, 50 | { 51 | "class": "TableView", 52 | "identifier": "warnings", 53 | "columns": [ 54 | { 55 | "identifier": "Warnings" 56 | } 57 | ] 58 | } 59 | ] 60 | } 61 | ] 62 | } 63 | -------------------------------------------------------------------------------- /Assets/resize.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdolan/ObjectivelyMVC/528fce79225040311729799c5121060c680b4f2f/Assets/resize.png -------------------------------------------------------------------------------- /Assets/resize.png.h: -------------------------------------------------------------------------------- 1 | unsigned char resize_png[] = { 2 | 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 3 | 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 4 | 0x08, 0x06, 0x00, 0x00, 0x00, 0x73, 0x7a, 0x7a, 0xf4, 0x00, 0x00, 0x00, 5 | 0x06, 0x62, 0x4b, 0x47, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 6 | 0x43, 0xbb, 0x7f, 0x00, 0x00, 0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 7 | 0x00, 0x0b, 0x13, 0x00, 0x00, 0x0b, 0x13, 0x01, 0x00, 0x9a, 0x9c, 0x18, 8 | 0x00, 0x00, 0x00, 0x07, 0x74, 0x49, 0x4d, 0x45, 0x07, 0xe0, 0x07, 0x16, 9 | 0x13, 0x18, 0x19, 0xe5, 0xd2, 0x48, 0xc1, 0x00, 0x00, 0x00, 0x1d, 0x69, 10 | 0x54, 0x58, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x00, 0x00, 11 | 0x00, 0x00, 0x00, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x77, 12 | 0x69, 0x74, 0x68, 0x20, 0x47, 0x49, 0x4d, 0x50, 0x64, 0x2e, 0x65, 0x07, 13 | 0x00, 0x00, 0x00, 0x94, 0x49, 0x44, 0x41, 0x54, 0x58, 0xc3, 0xc5, 0xce, 14 | 0xdb, 0x11, 0xc0, 0x20, 0x0c, 0x03, 0x41, 0xd1, 0x59, 0xfa, 0x6f, 0x8a, 15 | 0xfc, 0x65, 0xf2, 0x00, 0x62, 0x1b, 0xc9, 0xbe, 0x06, 0xf6, 0x80, 0xc2, 16 | 0x7a, 0xef, 0x47, 0xab, 0xc4, 0x01, 0xa0, 0x55, 0xe2, 0x25, 0x03, 0x77, 17 | 0x3c, 0x7d, 0xe0, 0x8d, 0xa7, 0x0e, 0x8c, 0xf0, 0xb4, 0x81, 0x19, 0x9e, 18 | 0x32, 0xb0, 0xc2, 0xe5, 0x03, 0x7f, 0xb8, 0x74, 0xc0, 0x82, 0xcb, 0x06, 19 | 0xac, 0xb8, 0x64, 0xc0, 0x83, 0xd3, 0x07, 0xbc, 0x38, 0x75, 0x20, 0x82, 20 | 0xd3, 0x06, 0xa2, 0x38, 0x65, 0x60, 0x07, 0xdf, 0x1e, 0xd8, 0xc5, 0xb7, 21 | 0x06, 0x18, 0x78, 0x78, 0x80, 0x85, 0x87, 0x06, 0x98, 0xb8, 0x7b, 0x80, 22 | 0x8d, 0xbb, 0x06, 0x14, 0xb8, 0x79, 0x40, 0x85, 0x9b, 0x06, 0x94, 0xf8, 23 | 0xef, 0x80, 0x1a, 0x5f, 0x0e, 0x64, 0xe0, 0xd3, 0x81, 0x2c, 0x7c, 0x38, 24 | 0x90, 0x89, 0x7f, 0x06, 0xb2, 0xf1, 0xc7, 0x40, 0x05, 0x7e, 0x0d, 0x54, 25 | 0xe1, 0x00, 0xd0, 0x2a, 0x71, 0x00, 0x38, 0x01, 0xd8, 0xdc, 0x67, 0xc0, 26 | 0xdc, 0x15, 0xb1, 0xea, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 27 | 0xae, 0x42, 0x60, 0x82 28 | }; 29 | unsigned int resize_png_len = 304; 30 | -------------------------------------------------------------------------------- /COPYING: -------------------------------------------------------------------------------- 1 | ObjectivelyMVC is Copyright Jay Dolan 2014. It is published under the zlib license. 2 | 3 | This software is provided 'as-is', without any express or implied 4 | warranty. In no event will the authors be held liable for any damages 5 | arising from the use of this software. 6 | 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it 9 | freely, subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not 12 | claim that you wrote the original software. If you use this software 13 | in a product, an acknowledgment in the product documentation would be 14 | appreciated but is not required. 15 | 2. Altered source versions must be plainly marked as such, and must not be 16 | misrepresented as being the original software. 17 | 3. This notice may not be removed or altered from any source distribution. 18 | -------------------------------------------------------------------------------- /Documentation/.gitignore: -------------------------------------------------------------------------------- 1 | html/ 2 | -------------------------------------------------------------------------------- /Documentation/INSTALL.md: -------------------------------------------------------------------------------- 1 | Installing and Compiling with ObjectivelyMVC 2 | --- 3 | 4 | ### Dependencies 5 | 6 | * [Objectively](https://github.com/jdolan/Objectively) 7 | * [SDL2](https://www.libsdl.org/) 8 | * [SDL2_image](https://www.libsdl.org/projects/SDL_image/) 9 | * [SDL2_ttf](https://www.libsdl.org/projects/SDL_ttf/) 10 | 11 | ### GNU Autotools 12 | 13 | 1) Do the Autotools dance. 14 | 15 | ```shell 16 | autoreconf -i ./configure; make; sudo make install 17 | ``` 18 | 19 | 2) Include the main header file in your source. 20 | 21 | ```c 22 | #include 23 | ``` 24 | 25 | 3) Compile and link with ObjectivelyMVC. 26 | 27 | ```shell 28 | gcc `pkg-config --cflags --libs ObjectivelyMVC` -o myprogram *.c 29 | ``` 30 | 31 | ### Xcode 8 32 | 33 | 1. Open the versioned Xcode 8 workspace. 34 | 1. Locate the shared libraries required by the build targets. 35 | 1. Profit 36 | 37 | ### Visual Studio 38 | 39 | 1. Open the Visual Studio project file. 40 | 2. Profit. 41 | -------------------------------------------------------------------------------- /Documentation/demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdolan/ObjectivelyMVC/528fce79225040311729799c5121060c680b4f2f/Documentation/demo.gif -------------------------------------------------------------------------------- /Documentation/hello-thumbnail.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdolan/ObjectivelyMVC/528fce79225040311729799c5121060c680b4f2f/Documentation/hello-thumbnail.jpg -------------------------------------------------------------------------------- /Documentation/layout.xml: -------------------------------------------------------------------------------- 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 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /Documentation/quetoo1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdolan/ObjectivelyMVC/528fce79225040311729799c5121060c680b4f2f/Documentation/quetoo1.jpg -------------------------------------------------------------------------------- /Documentation/quetoo2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdolan/ObjectivelyMVC/528fce79225040311729799c5121060c680b4f2f/Documentation/quetoo2.jpg -------------------------------------------------------------------------------- /Documentation/quetoo3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdolan/ObjectivelyMVC/528fce79225040311729799c5121060c680b4f2f/Documentation/quetoo3.jpg -------------------------------------------------------------------------------- /Documentation/style.css: -------------------------------------------------------------------------------- 1 | body, table, div, p, dl { 2 | font-size: 16px; 3 | color: #333; 4 | } 5 | 6 | body { 7 | width: 980px; 8 | max-width: 100%; 9 | margin: 2em auto; 10 | border: 1px solid #d8d8d8; 11 | border-radius: 2px; 12 | padding: 1em; 13 | } 14 | 15 | h1, h2, h3 { 16 | border-bottom: 1px solid #eee; 17 | padding-bottom: 0.3em; 18 | } 19 | 20 | img { 21 | max-width: 80%; 22 | } 23 | 24 | div.line { 25 | margin: 4px; 26 | } 27 | 28 | div.line, div.line * { 29 | font-family: monospace, fixed !important; 30 | } 31 | 32 | html * { 33 | font-family: Helvetica, Arial, sans-serif !important; 34 | } 35 | 36 | #titlearea { 37 | margin-bottom: 0.3em; 38 | } 39 | 40 | -------------------------------------------------------------------------------- /Examples/.gitignore: -------------------------------------------------------------------------------- 1 | Hello 2 | -------------------------------------------------------------------------------- /Examples/HelloViewController.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ObjectivelyMVC: Object oriented MVC framework for OpenGL, SDL2 and GNU C. 3 | * Copyright (C) 2014 Jay Dolan 4 | * 5 | * This software is provided 'as-is', without any express or implied 6 | * warranty. In no event will the authors be held liable for any damages 7 | * arising from the use of this software. 8 | * 9 | * Permission is granted to anyone to use this software for any purpose, 10 | * including commercial applications, and to alter it and redistribute it 11 | * freely, subject to the following restrictions: 12 | * 13 | * 1. The origin of this software must not be misrepresented; you must not 14 | * claim that you wrote the original software. If you use this software 15 | * in a product, an acknowledgment in the product documentation would be 16 | * appreciated but is not required. 17 | * 18 | * 2. Altered source versions must be plainly marked as such, and must not be 19 | * misrepresented as being the original software. 20 | * 21 | * 3. This notice may not be removed or altered from any source distribution. 22 | */ 23 | 24 | #pragma once 25 | 26 | #include 27 | 28 | /** 29 | * @file 30 | * 31 | * @brief The HelloViewController. 32 | */ 33 | 34 | typedef struct HelloViewController HelloViewController; 35 | typedef struct HelloViewControllerInterface HelloViewControllerInterface; 36 | 37 | /** 38 | * @brief The HelloViewController. 39 | */ 40 | struct HelloViewController { 41 | 42 | /** 43 | * @brief The superclass. 44 | * 45 | * @private 46 | */ 47 | ViewController viewController; 48 | 49 | /** 50 | * @brief The interface. 51 | * 52 | * @private 53 | */ 54 | HelloViewControllerInterface *interface; 55 | 56 | /** 57 | * @brief A Panel. 58 | */ 59 | Panel *panel; 60 | 61 | /** 62 | * @brief The cancel Button. 63 | */ 64 | Button *cancel; 65 | 66 | /** 67 | * @brief The apply Button. 68 | */ 69 | Button *apply; 70 | 71 | /** 72 | * @brief A Button 73 | */ 74 | Button *button; 75 | 76 | /** 77 | * @brief A TextView. 78 | */ 79 | TextView *textView; 80 | 81 | /** 82 | * @brief A Checkbox. 83 | */ 84 | Checkbox *checkbox; 85 | 86 | /** 87 | * @brief A Select. 88 | */ 89 | Select *select; 90 | 91 | /** 92 | * @brief A Slider. 93 | */ 94 | Slider *slider; 95 | 96 | /** 97 | * @brief A TableView. 98 | */ 99 | TableView *tableView; 100 | 101 | /** 102 | * @brief A CollectionView. 103 | */ 104 | CollectionView *collectionView; 105 | 106 | /** 107 | * @brief An RGBColorPicker. 108 | */ 109 | RGBColorPicker *rgbColorPicker; 110 | 111 | /** 112 | * @brief An HSVColorPicker. 113 | */ 114 | HSVColorPicker *hsvColorPicker; 115 | 116 | /** 117 | * @brief A HueColorPicker. 118 | */ 119 | HueColorPicker *hueColorPicker; 120 | }; 121 | 122 | /** 123 | * @brief The HelloViewController interface. 124 | */ 125 | struct HelloViewControllerInterface { 126 | 127 | /** 128 | * @brief The superclass interface. 129 | */ 130 | ViewControllerInterface viewControllerInterface; 131 | 132 | /** 133 | * @fn HelloViewController *HelloViewController::init(HelloViewController *self) 134 | * @brief Initializes this HelloViewController. 135 | * @param self The HelloViewController. 136 | * @return The initialized HelloViewController, or `NULL` on error. 137 | * @memberof HelloViewController 138 | */ 139 | HelloViewController *(*init)(HelloViewController *self); 140 | }; 141 | 142 | /** 143 | * @fn Class *HelloViewController::_HelloViewController(void) 144 | * @brief The HelloViewController archetype. 145 | * @return The HelloViewController Class. 146 | * @memberof HelloViewController 147 | */ 148 | Class *_HelloViewController(void); 149 | -------------------------------------------------------------------------------- /Examples/Makefile.am: -------------------------------------------------------------------------------- 1 | %.wav.h: % 2 | xxd -i -s 44 $^ $@ 3 | 4 | BUILT_SOURCES = \ 5 | click.wav.h \ 6 | clack.wav.h 7 | 8 | noinst_HEADERS = \ 9 | HelloViewController.h 10 | 11 | noinst_PROGRAMS = \ 12 | Hello 13 | 14 | CFLAGS += \ 15 | -I$(top_srcdir)/Assets \ 16 | -I$(top_srcdir)/Sources \ 17 | -DEXAMPLES=\"$(abs_srcdir)\" \ 18 | @HOST_CFLAGS@ \ 19 | @OBJECTIVELY_CFLAGS@ \ 20 | @SDL2_CFLAGS@ 21 | 22 | LDADD = \ 23 | $(top_builddir)/Sources/ObjectivelyMVC/libObjectivelyMVC.la \ 24 | @HOST_LIBS@ \ 25 | @OBJECTIVELY_LIBS@ \ 26 | @SDL2_LIBS@ \ 27 | -lm 28 | 29 | Hello_SOURCES = \ 30 | HelloViewController.c \ 31 | Hello.c 32 | -------------------------------------------------------------------------------- /Examples/clack.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdolan/ObjectivelyMVC/528fce79225040311729799c5121060c680b4f2f/Examples/clack.wav -------------------------------------------------------------------------------- /Examples/clack.wav.h: -------------------------------------------------------------------------------- 1 | unsigned char clack_wav[] = { 2 | 0xe6, 0xff, 0x69, 0xff, 0x49, 0xff, 0xfb, 0xff, 0xfa, 0x00, 0xc5, 0x00, 3 | 0xf2, 0xff, 0x45, 0xff, 0x9c, 0xff, 0xce, 0xff, 0x00, 0x00, 0xb3, 0x00, 4 | 0x0b, 0x01, 0x62, 0x00, 0x90, 0xff, 0x01, 0xff, 0x72, 0xff, 0xf8, 0xff, 5 | 0x4a, 0x00, 0x47, 0x00, 0x10, 0x00, 0x6f, 0x00, 0xab, 0x00, 0x57, 0x00, 6 | 0x72, 0xff, 0xf9, 0xff, 0x91, 0x00, 0xa2, 0x01, 0xa4, 0x03, 0xd9, 0x06, 7 | 0x68, 0x00, 0x40, 0xf4, 0x88, 0xee, 0xb3, 0xfb, 0x72, 0x06, 0x23, 0x09, 8 | 0x53, 0x0d, 0x49, 0x01, 0x64, 0xfa, 0x7c, 0xf9, 0xc4, 0xfd, 0xc4, 0xfe, 9 | 0x9d, 0xfb, 0xb7, 0xfd, 0xf8, 0xff, 0x70, 0x03, 0xae, 0x02, 0x3d, 0xff, 10 | 0x5e, 0xfd, 0xcf, 0xfd, 0xd8, 0x00, 0x5b, 0x02, 0xcd, 0x03, 0x0b, 0x07, 11 | 0xa1, 0x04, 0x06, 0x02, 0xf5, 0xff, 0x66, 0xff, 0xdc, 0xfe, 0x89, 0xff, 12 | 0xdf, 0x00, 0xf3, 0x00, 0x71, 0x02, 0x68, 0x03, 0x6a, 0x02, 0x22, 0x00, 13 | 0xac, 0xfd, 0x3a, 0xfc, 0xb9, 0xfc, 0x44, 0xfd, 0x02, 0x00, 0x94, 0x01, 14 | 0x55, 0x02, 0x43, 0x01, 0xd8, 0xfe, 0x53, 0xfe, 0xa3, 0xfd, 0x41, 0xfd, 15 | 0x38, 0xfe, 0x9b, 0xff, 0x0e, 0x00, 0xd3, 0xff, 0x91, 0xff, 0x1d, 0x00, 16 | 0x7c, 0x00, 0x26, 0x00, 0xb6, 0xfe, 0xe1, 0xfc, 0x25, 0xfd, 0x4b, 0xfe, 17 | 0x33, 0xff, 0xa5, 0x00, 0x13, 0x02, 0x24, 0x02, 0xfc, 0x00, 0xf8, 0xff, 18 | 0x1e, 0xff, 0x86, 0xff, 0xab, 0xff, 0xff, 0xff, 0xf2, 0x00, 0x70, 0x01, 19 | 0xd7, 0x00, 0x5d, 0x00, 0xea, 0xff, 0x4d, 0xff, 0x90, 0xff, 0x70, 0xff, 20 | 0xad, 0xff, 0x55, 0x00, 0xdf, 0x00, 0xf2, 0x00, 0xfe, 0x00, 0xd9, 0x00, 21 | 0xb6, 0x00, 0x2c, 0x00, 0x68, 0xff, 0x1e, 0xff, 0x6e, 0xff, 0x02, 0x00, 22 | 0x5c, 0x00, 0x8a, 0x00, 0x9a, 0x00, 0x54, 0x00, 0x91, 0xff, 0xad, 0xfe, 23 | 0x55, 0xfe, 0xda, 0xfe, 0x29, 0xff, 0x69, 0xff, 0x13, 0x00, 0x7e, 0x00, 24 | 0x24, 0x00, 0xd9, 0xff, 0x7e, 0xff, 0x3f, 0xff, 0x44, 0xff, 0xe2, 0xfe, 25 | 0xd1, 0xfe, 0x70, 0xff, 0x2a, 0x00, 0x90, 0x00, 0xd3, 0x00, 0x92, 0x00, 26 | 0x72, 0x00, 0x89, 0x00, 0x8a, 0x00, 0x94, 0x00, 0x70, 0x00, 0x5e, 0x00, 27 | 0xd0, 0x00, 0x1f, 0x01, 0xfd, 0x00, 0xde, 0x00, 0xe8, 0x00, 0x98, 0x00, 28 | 0x06, 0x00, 0xdc, 0xff, 0xc0, 0xff, 0xe7, 0xff, 0x54, 0x00, 0x63, 0x00, 29 | 0x83, 0x00, 0x88, 0x00, 0x56, 0x00, 0x07, 0x00, 0xc1, 0xff 30 | }; 31 | unsigned int clack_wav_len = 334; 32 | -------------------------------------------------------------------------------- /Examples/click.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdolan/ObjectivelyMVC/528fce79225040311729799c5121060c680b4f2f/Examples/click.wav -------------------------------------------------------------------------------- /Examples/click.wav.h: -------------------------------------------------------------------------------- 1 | unsigned char click_wav[] = { 2 | 0xa6, 0xff, 0x2f, 0x00, 0x46, 0x00, 0x3f, 0x00, 0x18, 0x00, 0xd6, 0xff, 3 | 0xa5, 0xff, 0x05, 0x00, 0x60, 0xff, 0xe3, 0xff, 0xe4, 0xff, 0x8f, 0x00, 4 | 0x3d, 0x00, 0x22, 0x00, 0x46, 0x00, 0x09, 0x00, 0x83, 0xff, 0x8c, 0xff, 5 | 0x38, 0xff, 0x33, 0x00, 0xcf, 0x00, 0x4f, 0xff, 0x74, 0x00, 0x48, 0x00, 6 | 0x94, 0x00, 0x52, 0xff, 0xb1, 0xff, 0xb2, 0xff, 0x6c, 0x00, 0xed, 0xfe, 7 | 0x4e, 0x00, 0x4a, 0xfe, 0x14, 0x00, 0xc0, 0xfc, 0x8c, 0x01, 0x60, 0x05, 8 | 0x09, 0x05, 0xb5, 0x01, 0xc2, 0xf6, 0x0f, 0xfe, 0xca, 0xf7, 0xad, 0x03, 9 | 0x8e, 0x07, 0x09, 0x00, 0xd8, 0x00, 0x18, 0x01, 0x29, 0x02, 0x3d, 0x00, 10 | 0x86, 0x00, 0xbd, 0xfd, 0x12, 0xfe, 0x08, 0xff, 0x18, 0x02, 0x8f, 0xfe, 11 | 0x1d, 0x00, 0x11, 0x03, 0xba, 0x01, 0xef, 0xfc, 0x98, 0xfb, 0x57, 0xff, 12 | 0xab, 0xff, 0x14, 0xfc, 0x94, 0xfc, 0xe9, 0xff, 0xda, 0xff, 0x46, 0xfe, 13 | 0x98, 0xff, 0x45, 0x01, 0x83, 0x00, 0x3e, 0x00, 0x14, 0x01, 0x03, 0x01, 14 | 0x4b, 0x01, 0xbb, 0x01, 0xc8, 0x00, 0x4b, 0x00, 0x57, 0x00, 0xe3, 0xff, 15 | 0x06, 0xff, 0x3c, 0xfe, 0x69, 0xfe, 0xb5, 0xfe, 0x86, 0xfe, 0xe4, 0xfe, 16 | 0x5a, 0xff, 0xb4, 0xff, 0x3f, 0x01, 0xab, 0x01, 0xf1, 0xff, 0xe4, 0xff, 17 | 0xc1, 0x01, 0xe6, 0x01, 0xef, 0x00, 0x3f, 0x01, 0xdc, 0x01, 0xb7, 0x01, 18 | 0x30, 0x01, 0x6f, 0x00, 0xcf, 0xff, 0xc1, 0xff, 0x71, 0xff, 0x28, 0xff, 19 | 0x6a, 0xff, 0xe9, 0xff, 0x50, 0x00, 0x61, 0x00, 0x06, 0x00, 0xf7, 0xff, 20 | 0x5e, 0x00, 0xd3, 0x00, 0x61, 0x01, 0xcb, 0x01, 0x93, 0x01, 0x29, 0x01, 21 | 0x25, 0x01, 0x41, 0x01, 0x96, 0x00, 0xd4, 0xff, 0x1c, 0xff, 0xb9, 0xfe, 22 | 0x0d, 0xff, 0x28, 0xff, 0xf8, 0xfe, 0xb0, 0xff, 0x17, 0x00, 0xbf, 0xff, 23 | 0x6c, 0x00, 0xa3, 0x01, 0x8a, 0x01, 0xbe, 0x00, 0xdd, 0x00, 0x82, 0x01, 24 | 0x5d, 0x01, 0xbf, 0x00, 0x9a, 0x00, 0x64, 0x00, 0x00, 0x00, 0xfd, 0xff, 25 | 0x07, 0x00, 0x88, 0xff, 0xe6, 0xfe, 0xb2, 0xfe, 0xf8, 0xfe, 0xfb, 0xfe, 26 | 0xff, 0xfe, 0xa5, 0xff, 0xd3, 0xff, 0x88, 0xff, 0xe4, 0xff, 0x5e, 0x00, 27 | 0xe4, 0xff, 0x79, 0xff, 0x2d, 0x00, 0xac, 0x00, 0x82, 0x00 28 | }; 29 | unsigned int click_wav_len = 310; 30 | -------------------------------------------------------------------------------- /INSTALL.md: -------------------------------------------------------------------------------- 1 | Installing and Compiling with ObjectivelyMVC 2 | --- 3 | 4 | ### Dependencies 5 | 6 | * [Objectively](https://github.com/jdolan/Objectively) 7 | * [SDL2](https://www.libsdl.org/) 8 | * [SDL2_image](https://www.libsdl.org/projects/SDL_image/) 9 | * [SDL2_ttf](https://www.libsdl.org/projects/SDL_ttf/) 10 | 11 | ### GNU Autotools 12 | 13 | 1) Do the Autotools dance. 14 | 15 | ```shell 16 | autoreconf -i; ./configure; make; sudo make install 17 | ``` 18 | 19 | 2) Include the main header file in your source. 20 | 21 | ```c 22 | #include 23 | ``` 24 | 25 | 3) Compile and link with ObjectivelyMVC. 26 | 27 | ```shell 28 | gcc `pkg-config --cflags --libs ObjectivelyMVC` -o myprogram *.c 29 | ``` 30 | 31 | ### Xcode 8 32 | 33 | 1. Open the versioned Xcode 8 workspace. 34 | 1. Locate the shared libraries required by the build targets. 35 | 1. Profit 36 | 37 | ### Visual Studio 38 | 39 | 1. Open the Visual Studio project file. 40 | 2. Profit. 41 | -------------------------------------------------------------------------------- /Makefile.am: -------------------------------------------------------------------------------- 1 | ACLOCAL_AMFLAGS = -I m4 2 | 3 | SUBDIRS = \ 4 | Assets \ 5 | Sources \ 6 | Tests \ 7 | Examples 8 | 9 | html: 10 | doxygen 11 | install -m 644 Documentation/*.{gif,jpg} Documentation/html 12 | 13 | html-clean: 14 | rm -rf Documentation/html 15 | 16 | html-release: 17 | rsync -rz --delete Documentation/html/ jaydolan.com:/var/www/projects/ObjectivelyMVC 18 | -------------------------------------------------------------------------------- /ObjectivelyMVC.vs15/.gitignore: -------------------------------------------------------------------------------- 1 | /tmp 2 | /bin 3 | /*.opendb 4 | /*.db 5 | /*.user 6 | *.suo 7 | /ipch 8 | -------------------------------------------------------------------------------- /ObjectivelyMVC.vs15/Example.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /ObjectivelyMVC.vs15/ObjectivelyMVC.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.25807.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ObjectivelyMVC", "ObjectivelyMVC.vcxproj", "{AD4CEB0F-306E-4D57-B579-503239939766}" 7 | EndProject 8 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{33CD84B4-05B8-4917-8103-0C44E2C66E0B}" 9 | ProjectSection(SolutionItems) = preProject 10 | build_settings.props = build_settings.props 11 | EndProjectSection 12 | EndProject 13 | Global 14 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 15 | Debug|Win32 = Debug|Win32 16 | Debug|x64 = Debug|x64 17 | Release|Win32 = Release|Win32 18 | Release|x64 = Release|x64 19 | EndGlobalSection 20 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 21 | {AD4CEB0F-306E-4D57-B579-503239939766}.Debug|Win32.ActiveCfg = Debug|Win32 22 | {AD4CEB0F-306E-4D57-B579-503239939766}.Debug|Win32.Build.0 = Debug|Win32 23 | {AD4CEB0F-306E-4D57-B579-503239939766}.Debug|x64.ActiveCfg = Debug|x64 24 | {AD4CEB0F-306E-4D57-B579-503239939766}.Debug|x64.Build.0 = Debug|x64 25 | {AD4CEB0F-306E-4D57-B579-503239939766}.Release|Win32.ActiveCfg = Release|Win32 26 | {AD4CEB0F-306E-4D57-B579-503239939766}.Release|Win32.Build.0 = Release|Win32 27 | {AD4CEB0F-306E-4D57-B579-503239939766}.Release|x64.ActiveCfg = Release|x64 28 | {AD4CEB0F-306E-4D57-B579-503239939766}.Release|x64.Build.0 = Release|x64 29 | EndGlobalSection 30 | GlobalSection(SolutionProperties) = preSolution 31 | HideSolutionNode = FALSE 32 | EndGlobalSection 33 | GlobalSection(ExtensibilityGlobals) = postSolution 34 | SolutionGuid = {AD885967-FABA-435B-B233-E579B86F0B28} 35 | EndGlobalSection 36 | EndGlobal 37 | -------------------------------------------------------------------------------- /ObjectivelyMVC.vs15/ObjectivelyMVC_all.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.25807.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ObjectivelyMVC", "ObjectivelyMVC.vcxproj", "{AD4CEB0F-306E-4D57-B579-503239939766}" 7 | EndProject 8 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Example", "Example.vcxproj", "{9CA015D3-0D2C-477C-A338-E95395C25A77}" 9 | ProjectSection(ProjectDependencies) = postProject 10 | {AD4CEB0F-306E-4D57-B579-503239939766} = {AD4CEB0F-306E-4D57-B579-503239939766} 11 | EndProjectSection 12 | EndProject 13 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{33CD84B4-05B8-4917-8103-0C44E2C66E0B}" 14 | ProjectSection(SolutionItems) = preProject 15 | build_settings.props = build_settings.props 16 | EndProjectSection 17 | EndProject 18 | Global 19 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 20 | Debug|Win32 = Debug|Win32 21 | Debug|x64 = Debug|x64 22 | Release|Win32 = Release|Win32 23 | Release|x64 = Release|x64 24 | EndGlobalSection 25 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 26 | {AD4CEB0F-306E-4D57-B579-503239939766}.Debug|Win32.ActiveCfg = Debug|Win32 27 | {AD4CEB0F-306E-4D57-B579-503239939766}.Debug|Win32.Build.0 = Debug|Win32 28 | {AD4CEB0F-306E-4D57-B579-503239939766}.Debug|x64.ActiveCfg = Debug|x64 29 | {AD4CEB0F-306E-4D57-B579-503239939766}.Debug|x64.Build.0 = Debug|x64 30 | {AD4CEB0F-306E-4D57-B579-503239939766}.Release|Win32.ActiveCfg = Release|Win32 31 | {AD4CEB0F-306E-4D57-B579-503239939766}.Release|Win32.Build.0 = Release|Win32 32 | {AD4CEB0F-306E-4D57-B579-503239939766}.Release|x64.ActiveCfg = Release|x64 33 | {AD4CEB0F-306E-4D57-B579-503239939766}.Release|x64.Build.0 = Release|x64 34 | {9CA015D3-0D2C-477C-A338-E95395C25A77}.Debug|Win32.ActiveCfg = Debug|Win32 35 | {9CA015D3-0D2C-477C-A338-E95395C25A77}.Debug|Win32.Build.0 = Debug|Win32 36 | {9CA015D3-0D2C-477C-A338-E95395C25A77}.Debug|x64.ActiveCfg = Debug|x64 37 | {9CA015D3-0D2C-477C-A338-E95395C25A77}.Debug|x64.Build.0 = Debug|x64 38 | {9CA015D3-0D2C-477C-A338-E95395C25A77}.Release|Win32.ActiveCfg = Release|Win32 39 | {9CA015D3-0D2C-477C-A338-E95395C25A77}.Release|Win32.Build.0 = Release|Win32 40 | {9CA015D3-0D2C-477C-A338-E95395C25A77}.Release|x64.ActiveCfg = Release|x64 41 | {9CA015D3-0D2C-477C-A338-E95395C25A77}.Release|x64.Build.0 = Release|x64 42 | EndGlobalSection 43 | GlobalSection(SolutionProperties) = preSolution 44 | HideSolutionNode = FALSE 45 | EndGlobalSection 46 | EndGlobal 47 | -------------------------------------------------------------------------------- /ObjectivelyMVC.vs15/Sources/ObjectivelyMVC/Config.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ObjectivelyMVC: MVC framework for OpenGL and SDL2 in c. 3 | * Copyright (C) 2014 Jay Dolan 4 | * 5 | * This software is provided 'as-is', without any express or implied 6 | * warranty. In no event will the authors be held liable for any damages 7 | * arising from the use of this software. 8 | * 9 | * Permission is granted to anyone to use this software for any purpose, 10 | * including commercial applications, and to alter it and redistribute it 11 | * freely, subject to the following restrictions: 12 | * 13 | * 1. The origin of this software must not be misrepresented; you must not 14 | * claim that you wrote the original software. If you use this software 15 | * in a product, an acknowledgment in the product documentation would be 16 | * appreciated but is not required. 17 | * 18 | * 2. Altered source versions must be plainly marked as such, and must not be 19 | * misrepresented as being the original software. 20 | * 21 | * 3. This notice may not be removed or altered from any source distribution. 22 | */ 23 | 24 | #undef HAVE_UNISTD_H -------------------------------------------------------------------------------- /ObjectivelyMVC.vs15/Sources/WindowlyMVC.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ObjectivelyMVC: MVC framework for OpenGL and SDL2 in c. 3 | * Copyright (C) 2014 Jay Dolan 4 | * 5 | * This software is provided 'as-is', without any express or implied 6 | * warranty. In no event will the authors be held liable for any damages 7 | * arising from the use of this software. 8 | * 9 | * Permission is granted to anyone to use this software for any purpose, 10 | * including commercial applications, and to alter it and redistribute it 11 | * freely, subject to the following restrictions: 12 | * 13 | * 1. The origin of this software must not be misrepresented; you must not 14 | * claim that you wrote the original software. If you use this software 15 | * in a product, an acknowledgment in the product documentation would be 16 | * appreciated but is not required. 17 | * 18 | * 2. Altered source versions must be plainly marked as such, and must not be 19 | * misrepresented as being the original software. 20 | * 21 | * 3. This notice may not be removed or altered from any source distribution. 22 | */ 23 | 24 | #pragma once 25 | 26 | #ifdef BUILDING_OBJECTIVELYMVC 27 | #define OBJECTIVELYMVC_EXPORT extern __declspec(dllexport) 28 | #else 29 | #define OBJECTIVELYMVC_EXPORT __declspec(dllimport) 30 | #endif -------------------------------------------------------------------------------- /ObjectivelyMVC.vs15/build_settings.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 10.0 4 | 5 | 6 | ClangCL 7 | $(DefaultPlatformToolset) 8 | 9 | 10 | 11 | -Wno-documentation-unknown-command -Wno-dollar-in-identifier-extension -Wno-gnu-statement-expression -Wno-language-extension-token -Wno-reserved-id-macro -Wno-undef -Wno-unused-parameter -Wno-gnu-zero-variadic-macro-arguments -Wno-float-conversion -Wno-cast-qual -Wno-sign-conversion -Wno-extra-semi-stmt -Wno-shorten-64-to-32 -Wno-gnu-conditional-omitted-operand -Wno-cast-align -Wno-implicit-int-conversion -Wno-comma -Wno-redundant-parens -Wno-sign-compare -Wno-switch-enum -Wno-implicit-int-conversion -Wno-format-nonliteral -Wno-pointer-arith -Wno-unused-macros -Wno-newline-eof -Wno-unused-function -Wno-vla -Wno-float-equal -Wno-assign-enum -Wno-implicit-float-conversion -Wno-reserved-identifier -Wno-declaration-after-statement -Wno-unsafe-buffer-usage %(AdditionalOptions) 12 | 13 | 14 | 15 | false 16 | false 17 | 18 | 19 | -------------------------------------------------------------------------------- /ObjectivelyMVC.vs15/libs/fontconfig/COPYING: -------------------------------------------------------------------------------- 1 | fontconfig/COPYING 2 | 3 | Copyright © 2000,2001,2002,2003,2004,2006,2007 Keith Packard 4 | Copyright © 2005 Patrick Lam 5 | Copyright © 2009 Roozbeh Pournader 6 | Copyright © 2008,2009 Red Hat, Inc. 7 | Copyright © 2008 Danilo Šegan 8 | Copyright © 2012 Google, Inc. 9 | 10 | 11 | Permission to use, copy, modify, distribute, and sell this software and its 12 | documentation for any purpose is hereby granted without fee, provided that 13 | the above copyright notice appear in all copies and that both that 14 | copyright notice and this permission notice appear in supporting 15 | documentation, and that the name of the author(s) not be used in 16 | advertising or publicity pertaining to distribution of the software without 17 | specific, written prior permission. The authors make no 18 | representations about the suitability of this software for any purpose. It 19 | is provided "as is" without express or implied warranty. 20 | 21 | THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 22 | INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO 23 | EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR 24 | CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, 25 | DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 26 | TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 27 | PERFORMANCE OF THIS SOFTWARE. 28 | 29 | -------------------------------------------------------------------------------- /ObjectivelyMVC.vs15/libs/fontconfig/lib/Win32/fontconfig.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdolan/ObjectivelyMVC/528fce79225040311729799c5121060c680b4f2f/ObjectivelyMVC.vs15/libs/fontconfig/lib/Win32/fontconfig.lib -------------------------------------------------------------------------------- /ObjectivelyMVC.vs15/libs/fontconfig/lib/x64/fontconfig.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdolan/ObjectivelyMVC/528fce79225040311729799c5121060c680b4f2f/ObjectivelyMVC.vs15/libs/fontconfig/lib/x64/fontconfig.lib -------------------------------------------------------------------------------- /ObjectivelyMVC.vs15/libs/freetype/lib/Win32/freetype.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdolan/ObjectivelyMVC/528fce79225040311729799c5121060c680b4f2f/ObjectivelyMVC.vs15/libs/freetype/lib/Win32/freetype.lib -------------------------------------------------------------------------------- /ObjectivelyMVC.vs15/libs/freetype/lib/x64/freetype.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdolan/ObjectivelyMVC/528fce79225040311729799c5121060c680b4f2f/ObjectivelyMVC.vs15/libs/freetype/lib/x64/freetype.lib -------------------------------------------------------------------------------- /ObjectivelyMVC.vs15/libs/sdl/COPYING.txt: -------------------------------------------------------------------------------- 1 | 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2016 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | 21 | -------------------------------------------------------------------------------- /ObjectivelyMVC.vs15/libs/sdl/SDL2/SDL_bits.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_bits.h 24 | * 25 | * Functions for fiddling with bits and bitmasks. 26 | */ 27 | 28 | #ifndef SDL_bits_h_ 29 | #define SDL_bits_h_ 30 | 31 | #include "SDL_stdinc.h" 32 | 33 | #include "begin_code.h" 34 | /* Set up for C function definitions, even when using C++ */ 35 | #ifdef __cplusplus 36 | extern "C" { 37 | #endif 38 | 39 | /** 40 | * \file SDL_bits.h 41 | */ 42 | 43 | /** 44 | * Get the index of the most significant bit. Result is undefined when called 45 | * with 0. This operation can also be stated as "count leading zeroes" and 46 | * "log base 2". 47 | * 48 | * \return the index of the most significant bit, or -1 if the value is 0. 49 | */ 50 | #if defined(__WATCOMC__) && defined(__386__) 51 | extern _inline int _SDL_bsr_watcom (Uint32); 52 | #pragma aux _SDL_bsr_watcom = \ 53 | "bsr eax, eax" \ 54 | parm [eax] nomemory \ 55 | value [eax] \ 56 | modify exact [eax] nomemory; 57 | #endif 58 | 59 | SDL_FORCE_INLINE int 60 | SDL_MostSignificantBitIndex32(Uint32 x) 61 | { 62 | #if defined(__GNUC__) && (__GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) 63 | /* Count Leading Zeroes builtin in GCC. 64 | * http://gcc.gnu.org/onlinedocs/gcc-4.3.4/gcc/Other-Builtins.html 65 | */ 66 | if (x == 0) { 67 | return -1; 68 | } 69 | return 31 - __builtin_clz(x); 70 | #elif defined(__WATCOMC__) && defined(__386__) 71 | if (x == 0) { 72 | return -1; 73 | } 74 | return _SDL_bsr_watcom(x); 75 | #elif defined(_MSC_VER) 76 | unsigned long index; 77 | if (_BitScanReverse(&index, x)) { 78 | return index; 79 | } 80 | return -1; 81 | #else 82 | /* Based off of Bit Twiddling Hacks by Sean Eron Anderson 83 | * , released in the public domain. 84 | * http://graphics.stanford.edu/~seander/bithacks.html#IntegerLog 85 | */ 86 | const Uint32 b[] = {0x2, 0xC, 0xF0, 0xFF00, 0xFFFF0000}; 87 | const int S[] = {1, 2, 4, 8, 16}; 88 | 89 | int msbIndex = 0; 90 | int i; 91 | 92 | if (x == 0) { 93 | return -1; 94 | } 95 | 96 | for (i = 4; i >= 0; i--) 97 | { 98 | if (x & b[i]) 99 | { 100 | x >>= S[i]; 101 | msbIndex |= S[i]; 102 | } 103 | } 104 | 105 | return msbIndex; 106 | #endif 107 | } 108 | 109 | SDL_FORCE_INLINE SDL_bool 110 | SDL_HasExactlyOneBitSet32(Uint32 x) 111 | { 112 | if (x && !(x & (x - 1))) { 113 | return SDL_TRUE; 114 | } 115 | return SDL_FALSE; 116 | } 117 | 118 | /* Ends C function definitions when using C++ */ 119 | #ifdef __cplusplus 120 | } 121 | #endif 122 | #include "close_code.h" 123 | 124 | #endif /* SDL_bits_h_ */ 125 | 126 | /* vi: set ts=4 sw=4 expandtab: */ 127 | -------------------------------------------------------------------------------- /ObjectivelyMVC.vs15/libs/sdl/SDL2/SDL_clipboard.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_clipboard.h 24 | * 25 | * Include file for SDL clipboard handling 26 | */ 27 | 28 | #ifndef SDL_clipboard_h_ 29 | #define SDL_clipboard_h_ 30 | 31 | #include "SDL_stdinc.h" 32 | 33 | #include "begin_code.h" 34 | /* Set up for C function definitions, even when using C++ */ 35 | #ifdef __cplusplus 36 | extern "C" { 37 | #endif 38 | 39 | /* Function prototypes */ 40 | 41 | /** 42 | * Put UTF-8 text into the clipboard. 43 | * 44 | * \param text the text to store in the clipboard 45 | * \returns 0 on success or a negative error code on failure; call 46 | * SDL_GetError() for more information. 47 | * 48 | * \sa SDL_GetClipboardText 49 | * \sa SDL_HasClipboardText 50 | */ 51 | extern DECLSPEC int SDLCALL SDL_SetClipboardText(const char *text); 52 | 53 | /** 54 | * Get UTF-8 text from the clipboard, which must be freed with SDL_free(). 55 | * 56 | * This functions returns NULL if there was not enough memory left for a copy 57 | * of the clipboard's content. 58 | * 59 | * \returns the clipboard text on success or NULL on failure; call 60 | * SDL_GetError() for more information. Caller must call SDL_free() 61 | * on the returned pointer when done with it. 62 | * 63 | * \sa SDL_HasClipboardText 64 | * \sa SDL_SetClipboardText 65 | */ 66 | extern DECLSPEC char * SDLCALL SDL_GetClipboardText(void); 67 | 68 | /** 69 | * Query whether the clipboard exists and contains a non-empty text string. 70 | * 71 | * \returns SDL_TRUE if the clipboard has text, or SDL_FALSE if it does not. 72 | * 73 | * \since This function is available since SDL 2.0.0. 74 | * 75 | * \sa SDL_GetClipboardText 76 | * \sa SDL_SetClipboardText 77 | */ 78 | extern DECLSPEC SDL_bool SDLCALL SDL_HasClipboardText(void); 79 | 80 | 81 | /* Ends C function definitions when using C++ */ 82 | #ifdef __cplusplus 83 | } 84 | #endif 85 | #include "close_code.h" 86 | 87 | #endif /* SDL_clipboard_h_ */ 88 | 89 | /* vi: set ts=4 sw=4 expandtab: */ 90 | -------------------------------------------------------------------------------- /ObjectivelyMVC.vs15/libs/sdl/SDL2/SDL_config_minimal.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | #ifndef SDL_config_minimal_h_ 23 | #define SDL_config_minimal_h_ 24 | #define SDL_config_h_ 25 | 26 | #include "SDL_platform.h" 27 | 28 | /** 29 | * \file SDL_config_minimal.h 30 | * 31 | * This is the minimal configuration that can be used to build SDL. 32 | */ 33 | 34 | #define HAVE_STDARG_H 1 35 | #define HAVE_STDDEF_H 1 36 | 37 | /* Most everything except Visual Studio 2008 and earlier has stdint.h now */ 38 | #if defined(_MSC_VER) && (_MSC_VER < 1600) 39 | /* Here are some reasonable defaults */ 40 | typedef unsigned int size_t; 41 | typedef signed char int8_t; 42 | typedef unsigned char uint8_t; 43 | typedef signed short int16_t; 44 | typedef unsigned short uint16_t; 45 | typedef signed int int32_t; 46 | typedef unsigned int uint32_t; 47 | typedef signed long long int64_t; 48 | typedef unsigned long long uint64_t; 49 | typedef unsigned long uintptr_t; 50 | #else 51 | #define HAVE_STDINT_H 1 52 | #endif /* Visual Studio 2008 */ 53 | 54 | #ifdef __GNUC__ 55 | #define HAVE_GCC_SYNC_LOCK_TEST_AND_SET 1 56 | #endif 57 | 58 | /* Enable the dummy audio driver (src/audio/dummy/\*.c) */ 59 | #define SDL_AUDIO_DRIVER_DUMMY 1 60 | 61 | /* Enable the stub joystick driver (src/joystick/dummy/\*.c) */ 62 | #define SDL_JOYSTICK_DISABLED 1 63 | 64 | /* Enable the stub haptic driver (src/haptic/dummy/\*.c) */ 65 | #define SDL_HAPTIC_DISABLED 1 66 | 67 | /* Enable the stub sensor driver (src/sensor/dummy/\*.c) */ 68 | #define SDL_SENSOR_DISABLED 1 69 | 70 | /* Enable the stub shared object loader (src/loadso/dummy/\*.c) */ 71 | #define SDL_LOADSO_DISABLED 1 72 | 73 | /* Enable the stub thread support (src/thread/generic/\*.c) */ 74 | #define SDL_THREADS_DISABLED 1 75 | 76 | /* Enable the stub timer support (src/timer/dummy/\*.c) */ 77 | #define SDL_TIMERS_DISABLED 1 78 | 79 | /* Enable the dummy video driver (src/video/dummy/\*.c) */ 80 | #define SDL_VIDEO_DRIVER_DUMMY 1 81 | 82 | /* Enable the dummy filesystem driver (src/filesystem/dummy/\*.c) */ 83 | #define SDL_FILESYSTEM_DUMMY 1 84 | 85 | #endif /* SDL_config_minimal_h_ */ 86 | -------------------------------------------------------------------------------- /ObjectivelyMVC.vs15/libs/sdl/SDL2/SDL_copying.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | -------------------------------------------------------------------------------- /ObjectivelyMVC.vs15/libs/sdl/SDL2/SDL_metal.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_metal.h 24 | * 25 | * Header file for functions to creating Metal layers and views on SDL windows. 26 | */ 27 | 28 | #ifndef SDL_metal_h_ 29 | #define SDL_metal_h_ 30 | 31 | #include "SDL_video.h" 32 | 33 | #include "begin_code.h" 34 | /* Set up for C function definitions, even when using C++ */ 35 | #ifdef __cplusplus 36 | extern "C" { 37 | #endif 38 | 39 | /** 40 | * \brief A handle to a CAMetalLayer-backed NSView (macOS) or UIView (iOS/tvOS). 41 | * 42 | * \note This can be cast directly to an NSView or UIView. 43 | */ 44 | typedef void *SDL_MetalView; 45 | 46 | /** 47 | * \name Metal support functions 48 | */ 49 | /* @{ */ 50 | 51 | /** 52 | * Create a CAMetalLayer-backed NSView/UIView and attach it to the specified 53 | * window. 54 | * 55 | * On macOS, this does *not* associate a MTLDevice with the CAMetalLayer on 56 | * its own. It is up to user code to do that. 57 | * 58 | * The returned handle can be casted directly to a NSView or UIView. To access 59 | * the backing CAMetalLayer, call SDL_Metal_GetLayer(). 60 | * 61 | * \sa SDL_Metal_DestroyView 62 | * \sa SDL_Metal_GetLayer 63 | */ 64 | extern DECLSPEC SDL_MetalView SDLCALL SDL_Metal_CreateView(SDL_Window * window); 65 | 66 | /** 67 | * Destroy an existing SDL_MetalView object. 68 | * 69 | * This should be called before SDL_DestroyWindow, if SDL_Metal_CreateView was 70 | * called after SDL_CreateWindow. 71 | * 72 | * \sa SDL_Metal_CreateView 73 | */ 74 | extern DECLSPEC void SDLCALL SDL_Metal_DestroyView(SDL_MetalView view); 75 | 76 | /** 77 | * Get a pointer to the backing CAMetalLayer for the given view. 78 | * 79 | * \sa SDL_MetalCreateView 80 | */ 81 | extern DECLSPEC void *SDLCALL SDL_Metal_GetLayer(SDL_MetalView view); 82 | 83 | /** 84 | * Get the size of a window's underlying drawable in pixels (for use with 85 | * setting viewport, scissor & etc). 86 | * 87 | * \param window SDL_Window from which the drawable size should be queried 88 | * \param w Pointer to variable for storing the width in pixels, may be NULL 89 | * 90 | * \sa SDL_GetWindowSize 91 | * \sa SDL_CreateWindow 92 | */ 93 | extern DECLSPEC void SDLCALL SDL_Metal_GetDrawableSize(SDL_Window* window, int *w, 94 | int *h); 95 | 96 | /* @} *//* Metal support functions */ 97 | 98 | /* Ends C function definitions when using C++ */ 99 | #ifdef __cplusplus 100 | } 101 | #endif 102 | #include "close_code.h" 103 | 104 | #endif /* SDL_metal_h_ */ 105 | -------------------------------------------------------------------------------- /ObjectivelyMVC.vs15/libs/sdl/SDL2/SDL_misc.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_misc.h 24 | * 25 | * \brief Include file for SDL API functions that don't fit elsewhere. 26 | */ 27 | 28 | #ifndef SDL_misc_h_ 29 | #define SDL_misc_h_ 30 | 31 | #include "SDL_stdinc.h" 32 | 33 | #include "begin_code.h" 34 | 35 | /* Set up for C function definitions, even when using C++ */ 36 | #ifdef __cplusplus 37 | extern "C" { 38 | #endif 39 | 40 | /** 41 | * Open a URL/URI in the browser or other appropriate external application. 42 | * 43 | * Open a URL in a separate, system-provided application. How this works will 44 | * vary wildly depending on the platform. This will likely launch what makes 45 | * sense to handle a specific URL's protocol (a web browser for `http://`, 46 | * etc), but it might also be able to launch file managers for directories and 47 | * other things. 48 | * 49 | * What happens when you open a URL varies wildly as well: your game window 50 | * may lose focus (and may or may not lose focus if your game was fullscreen 51 | * or grabbing input at the time). On mobile devices, your app will likely 52 | * move to the background or your process might be paused. Any given platform 53 | * may or may not handle a given URL. 54 | * 55 | * If this is unimplemented (or simply unavailable) for a platform, this will 56 | * fail with an error. A successful result does not mean the URL loaded, just 57 | * that we launched _something_ to handle it (or at least believe we did). 58 | * 59 | * All this to say: this function can be useful, but you should definitely 60 | * test it on every platform you target. 61 | * 62 | * \param url A valid URL/URI to open. Use `file:///full/path/to/file` for 63 | * local files, if supported. 64 | * \returns 0 on success, or -1 on error; call SDL_GetError() for more 65 | * information. 66 | * 67 | * \since This function is available in SDL 2.0.14 and newer 68 | */ 69 | extern DECLSPEC int SDLCALL SDL_OpenURL(const char *url); 70 | 71 | /* Ends C function definitions when using C++ */ 72 | #ifdef __cplusplus 73 | } 74 | #endif 75 | #include "close_code.h" 76 | 77 | #endif /* SDL_misc_h_ */ 78 | 79 | /* vi: set ts=4 sw=4 expandtab: */ 80 | -------------------------------------------------------------------------------- /ObjectivelyMVC.vs15/libs/sdl/SDL2/SDL_name.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | #ifndef SDLname_h_ 23 | #define SDLname_h_ 24 | 25 | #if defined(__STDC__) || defined(__cplusplus) 26 | #define NeedFunctionPrototypes 1 27 | #endif 28 | 29 | #define SDL_NAME(X) SDL_##X 30 | 31 | #endif /* SDLname_h_ */ 32 | 33 | /* vi: set ts=4 sw=4 expandtab: */ 34 | -------------------------------------------------------------------------------- /ObjectivelyMVC.vs15/libs/sdl/SDL2/SDL_opengles.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_opengles.h 24 | * 25 | * This is a simple file to encapsulate the OpenGL ES 1.X API headers. 26 | */ 27 | #include "SDL_config.h" 28 | 29 | #ifdef __IPHONEOS__ 30 | #include 31 | #include 32 | #else 33 | #include 34 | #include 35 | #endif 36 | 37 | #ifndef APIENTRY 38 | #define APIENTRY 39 | #endif 40 | -------------------------------------------------------------------------------- /ObjectivelyMVC.vs15/libs/sdl/SDL2/SDL_opengles2.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_opengles2.h 24 | * 25 | * This is a simple file to encapsulate the OpenGL ES 2.0 API headers. 26 | */ 27 | #include "SDL_config.h" 28 | 29 | #ifndef _MSC_VER 30 | 31 | #ifdef __IPHONEOS__ 32 | #include 33 | #include 34 | #else 35 | #include 36 | #include 37 | #include 38 | #endif 39 | 40 | #else /* _MSC_VER */ 41 | 42 | /* OpenGL ES2 headers for Visual Studio */ 43 | #include "SDL_opengles2_khrplatform.h" 44 | #include "SDL_opengles2_gl2platform.h" 45 | #include "SDL_opengles2_gl2.h" 46 | #include "SDL_opengles2_gl2ext.h" 47 | 48 | #endif /* _MSC_VER */ 49 | 50 | #ifndef APIENTRY 51 | #define APIENTRY GL_APIENTRY 52 | #endif 53 | -------------------------------------------------------------------------------- /ObjectivelyMVC.vs15/libs/sdl/SDL2/SDL_opengles2_gl2platform.h: -------------------------------------------------------------------------------- 1 | #ifndef __gl2platform_h_ 2 | #define __gl2platform_h_ 3 | 4 | /* $Revision: 10602 $ on $Date:: 2010-03-04 22:35:34 -0800 #$ */ 5 | 6 | /* 7 | * This document is licensed under the SGI Free Software B License Version 8 | * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ . 9 | */ 10 | 11 | /* Platform-specific types and definitions for OpenGL ES 2.X gl2.h 12 | * 13 | * Adopters may modify khrplatform.h and this file to suit their platform. 14 | * You are encouraged to submit all modifications to the Khronos group so that 15 | * they can be included in future versions of this file. Please submit changes 16 | * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla) 17 | * by filing a bug against product "OpenGL-ES" component "Registry". 18 | */ 19 | 20 | /*#include */ 21 | 22 | #ifndef GL_APICALL 23 | #define GL_APICALL KHRONOS_APICALL 24 | #endif 25 | 26 | #ifndef GL_APIENTRY 27 | #define GL_APIENTRY KHRONOS_APIENTRY 28 | #endif 29 | 30 | #endif /* __gl2platform_h_ */ 31 | -------------------------------------------------------------------------------- /ObjectivelyMVC.vs15/libs/sdl/SDL2/SDL_power.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | #ifndef SDL_power_h_ 23 | #define SDL_power_h_ 24 | 25 | /** 26 | * \file SDL_power.h 27 | * 28 | * Header for the SDL power management routines. 29 | */ 30 | 31 | #include "SDL_stdinc.h" 32 | 33 | #include "begin_code.h" 34 | /* Set up for C function definitions, even when using C++ */ 35 | #ifdef __cplusplus 36 | extern "C" { 37 | #endif 38 | 39 | /** 40 | * The basic state for the system's power supply. 41 | */ 42 | typedef enum 43 | { 44 | SDL_POWERSTATE_UNKNOWN, /**< cannot determine power status */ 45 | SDL_POWERSTATE_ON_BATTERY, /**< Not plugged in, running on the battery */ 46 | SDL_POWERSTATE_NO_BATTERY, /**< Plugged in, no battery available */ 47 | SDL_POWERSTATE_CHARGING, /**< Plugged in, charging battery */ 48 | SDL_POWERSTATE_CHARGED /**< Plugged in, battery charged */ 49 | } SDL_PowerState; 50 | 51 | 52 | /** 53 | * Get the current power supply details. 54 | * 55 | * You should never take a battery status as absolute truth. Batteries 56 | * (especially failing batteries) are delicate hardware, and the values 57 | * reported here are best estimates based on what that hardware reports. It's 58 | * not uncommon for older batteries to lose stored power much faster than it 59 | * reports, or completely drain when reporting it has 20 percent left, etc. 60 | * 61 | * Battery status can change at any time; if you are concerned with power 62 | * state, you should call this function frequently, and perhaps ignore changes 63 | * until they seem to be stable for a few seconds. 64 | * 65 | * It's possible a platform can only report battery percentage or time left 66 | * but not both. 67 | * 68 | * \param secs seconds of battery life left, you can pass a NULL here if you 69 | * don't care, will return -1 if we can't determine a value, or 70 | * we're not running on a battery 71 | * \param pct percentage of battery life left, between 0 and 100, you can pass 72 | * a NULL here if you don't care, will return -1 if we can't 73 | * determine a value, or we're not running on a battery 74 | * \returns an SDL_PowerState enum representing the current battery state. 75 | */ 76 | extern DECLSPEC SDL_PowerState SDLCALL SDL_GetPowerInfo(int *secs, int *pct); 77 | 78 | /* Ends C function definitions when using C++ */ 79 | #ifdef __cplusplus 80 | } 81 | #endif 82 | #include "close_code.h" 83 | 84 | #endif /* SDL_power_h_ */ 85 | 86 | /* vi: set ts=4 sw=4 expandtab: */ 87 | -------------------------------------------------------------------------------- /ObjectivelyMVC.vs15/libs/sdl/SDL2/SDL_quit.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_quit.h 24 | * 25 | * Include file for SDL quit event handling. 26 | */ 27 | 28 | #ifndef SDL_quit_h_ 29 | #define SDL_quit_h_ 30 | 31 | #include "SDL_stdinc.h" 32 | #include "SDL_error.h" 33 | 34 | /** 35 | * \file SDL_quit.h 36 | * 37 | * An ::SDL_QUIT event is generated when the user tries to close the application 38 | * window. If it is ignored or filtered out, the window will remain open. 39 | * If it is not ignored or filtered, it is queued normally and the window 40 | * is allowed to close. When the window is closed, screen updates will 41 | * complete, but have no effect. 42 | * 43 | * SDL_Init() installs signal handlers for SIGINT (keyboard interrupt) 44 | * and SIGTERM (system termination request), if handlers do not already 45 | * exist, that generate ::SDL_QUIT events as well. There is no way 46 | * to determine the cause of an ::SDL_QUIT event, but setting a signal 47 | * handler in your application will override the default generation of 48 | * quit events for that signal. 49 | * 50 | * \sa SDL_Quit() 51 | */ 52 | 53 | /* There are no functions directly affecting the quit event */ 54 | 55 | #define SDL_QuitRequested() \ 56 | (SDL_PumpEvents(), (SDL_PeepEvents(NULL,0,SDL_PEEKEVENT,SDL_QUIT,SDL_QUIT) > 0)) 57 | 58 | #endif /* SDL_quit_h_ */ 59 | -------------------------------------------------------------------------------- /ObjectivelyMVC.vs15/libs/sdl/SDL2/SDL_revision.h: -------------------------------------------------------------------------------- 1 | #define SDL_REVISION "" 2 | #define SDL_REVISION_NUMBER 0 3 | -------------------------------------------------------------------------------- /ObjectivelyMVC.vs15/libs/sdl/SDL2/SDL_test.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_test.h 24 | * 25 | * Include file for SDL test framework. 26 | * 27 | * This code is a part of the SDL2_test library, not the main SDL library. 28 | */ 29 | 30 | #ifndef SDL_test_h_ 31 | #define SDL_test_h_ 32 | 33 | #include "SDL.h" 34 | #include "SDL_test_assert.h" 35 | #include "SDL_test_common.h" 36 | #include "SDL_test_compare.h" 37 | #include "SDL_test_crc32.h" 38 | #include "SDL_test_font.h" 39 | #include "SDL_test_fuzzer.h" 40 | #include "SDL_test_harness.h" 41 | #include "SDL_test_images.h" 42 | #include "SDL_test_log.h" 43 | #include "SDL_test_md5.h" 44 | #include "SDL_test_memory.h" 45 | #include "SDL_test_random.h" 46 | 47 | #include "begin_code.h" 48 | /* Set up for C function definitions, even when using C++ */ 49 | #ifdef __cplusplus 50 | extern "C" { 51 | #endif 52 | 53 | /* Global definitions */ 54 | 55 | /* 56 | * Note: Maximum size of SDLTest log message is less than SDL's limit 57 | * to ensure we can fit additional information such as the timestamp. 58 | */ 59 | #define SDLTEST_MAX_LOGMESSAGE_LENGTH 3584 60 | 61 | /* Ends C function definitions when using C++ */ 62 | #ifdef __cplusplus 63 | } 64 | #endif 65 | #include "close_code.h" 66 | 67 | #endif /* SDL_test_h_ */ 68 | 69 | /* vi: set ts=4 sw=4 expandtab: */ 70 | -------------------------------------------------------------------------------- /ObjectivelyMVC.vs15/libs/sdl/SDL2/SDL_test_assert.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_test_assert.h 24 | * 25 | * Include file for SDL test framework. 26 | * 27 | * This code is a part of the SDL2_test library, not the main SDL library. 28 | */ 29 | 30 | /* 31 | * 32 | * Assert API for test code and test cases 33 | * 34 | */ 35 | 36 | #ifndef SDL_test_assert_h_ 37 | #define SDL_test_assert_h_ 38 | 39 | #include "begin_code.h" 40 | /* Set up for C function definitions, even when using C++ */ 41 | #ifdef __cplusplus 42 | extern "C" { 43 | #endif 44 | 45 | /** 46 | * \brief Fails the assert. 47 | */ 48 | #define ASSERT_FAIL 0 49 | 50 | /** 51 | * \brief Passes the assert. 52 | */ 53 | #define ASSERT_PASS 1 54 | 55 | /** 56 | * \brief Assert that logs and break execution flow on failures. 57 | * 58 | * \param assertCondition Evaluated condition or variable to assert; fail (==0) or pass (!=0). 59 | * \param assertDescription Message to log with the assert describing it. 60 | */ 61 | void SDLTest_Assert(int assertCondition, SDL_PRINTF_FORMAT_STRING const char *assertDescription, ...) SDL_PRINTF_VARARG_FUNC(2); 62 | 63 | /** 64 | * \brief Assert for test cases that logs but does not break execution flow on failures. Updates assertion counters. 65 | * 66 | * \param assertCondition Evaluated condition or variable to assert; fail (==0) or pass (!=0). 67 | * \param assertDescription Message to log with the assert describing it. 68 | * 69 | * \returns the assertCondition so it can be used to externally to break execution flow if desired. 70 | */ 71 | int SDLTest_AssertCheck(int assertCondition, SDL_PRINTF_FORMAT_STRING const char *assertDescription, ...) SDL_PRINTF_VARARG_FUNC(2); 72 | 73 | /** 74 | * \brief Explicitly pass without checking an assertion condition. Updates assertion counter. 75 | * 76 | * \param assertDescription Message to log with the assert describing it. 77 | */ 78 | void SDLTest_AssertPass(SDL_PRINTF_FORMAT_STRING const char *assertDescription, ...) SDL_PRINTF_VARARG_FUNC(1); 79 | 80 | /** 81 | * \brief Resets the assert summary counters to zero. 82 | */ 83 | void SDLTest_ResetAssertSummary(void); 84 | 85 | /** 86 | * \brief Logs summary of all assertions (total, pass, fail) since last reset as INFO or ERROR. 87 | */ 88 | void SDLTest_LogAssertSummary(void); 89 | 90 | 91 | /** 92 | * \brief Converts the current assert summary state to a test result. 93 | * 94 | * \returns TEST_RESULT_PASSED, TEST_RESULT_FAILED, or TEST_RESULT_NO_ASSERT 95 | */ 96 | int SDLTest_AssertSummaryToTestResult(void); 97 | 98 | #ifdef __cplusplus 99 | } 100 | #endif 101 | #include "close_code.h" 102 | 103 | #endif /* SDL_test_assert_h_ */ 104 | 105 | /* vi: set ts=4 sw=4 expandtab: */ 106 | -------------------------------------------------------------------------------- /ObjectivelyMVC.vs15/libs/sdl/SDL2/SDL_test_compare.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_test_compare.h 24 | * 25 | * Include file for SDL test framework. 26 | * 27 | * This code is a part of the SDL2_test library, not the main SDL library. 28 | */ 29 | 30 | /* 31 | 32 | Defines comparison functions (i.e. for surfaces). 33 | 34 | */ 35 | 36 | #ifndef SDL_test_compare_h_ 37 | #define SDL_test_compare_h_ 38 | 39 | #include "SDL.h" 40 | 41 | #include "SDL_test_images.h" 42 | 43 | #include "begin_code.h" 44 | /* Set up for C function definitions, even when using C++ */ 45 | #ifdef __cplusplus 46 | extern "C" { 47 | #endif 48 | 49 | /** 50 | * \brief Compares a surface and with reference image data for equality 51 | * 52 | * \param surface Surface used in comparison 53 | * \param referenceSurface Test Surface used in comparison 54 | * \param allowable_error Allowable difference (=sum of squared difference for each RGB component) in blending accuracy. 55 | * 56 | * \returns 0 if comparison succeeded, >0 (=number of pixels for which the comparison failed) if comparison failed, -1 if any of the surfaces were NULL, -2 if the surface sizes differ. 57 | */ 58 | int SDLTest_CompareSurfaces(SDL_Surface *surface, SDL_Surface *referenceSurface, int allowable_error); 59 | 60 | 61 | /* Ends C function definitions when using C++ */ 62 | #ifdef __cplusplus 63 | } 64 | #endif 65 | #include "close_code.h" 66 | 67 | #endif /* SDL_test_compare_h_ */ 68 | 69 | /* vi: set ts=4 sw=4 expandtab: */ 70 | -------------------------------------------------------------------------------- /ObjectivelyMVC.vs15/libs/sdl/SDL2/SDL_test_font.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_test_font.h 24 | * 25 | * Include file for SDL test framework. 26 | * 27 | * This code is a part of the SDL2_test library, not the main SDL library. 28 | */ 29 | 30 | #ifndef SDL_test_font_h_ 31 | #define SDL_test_font_h_ 32 | 33 | #include "begin_code.h" 34 | /* Set up for C function definitions, even when using C++ */ 35 | #ifdef __cplusplus 36 | extern "C" { 37 | #endif 38 | 39 | /* Function prototypes */ 40 | 41 | #define FONT_CHARACTER_SIZE 8 42 | 43 | /** 44 | * \brief Draw a string in the currently set font. 45 | * 46 | * \param renderer The renderer to draw on. 47 | * \param x The X coordinate of the upper left corner of the character. 48 | * \param y The Y coordinate of the upper left corner of the character. 49 | * \param c The character to draw. 50 | * 51 | * \returns 0 on success, -1 on failure. 52 | */ 53 | int SDLTest_DrawCharacter(SDL_Renderer *renderer, int x, int y, char c); 54 | 55 | /** 56 | * \brief Draw a string in the currently set font. 57 | * 58 | * \param renderer The renderer to draw on. 59 | * \param x The X coordinate of the upper left corner of the string. 60 | * \param y The Y coordinate of the upper left corner of the string. 61 | * \param s The string to draw. 62 | * 63 | * \returns 0 on success, -1 on failure. 64 | */ 65 | int SDLTest_DrawString(SDL_Renderer *renderer, int x, int y, const char *s); 66 | 67 | 68 | /** 69 | * \brief Cleanup textures used by font drawing functions. 70 | */ 71 | void SDLTest_CleanupTextDrawing(void); 72 | 73 | /* Ends C function definitions when using C++ */ 74 | #ifdef __cplusplus 75 | } 76 | #endif 77 | #include "close_code.h" 78 | 79 | #endif /* SDL_test_font_h_ */ 80 | 81 | /* vi: set ts=4 sw=4 expandtab: */ 82 | -------------------------------------------------------------------------------- /ObjectivelyMVC.vs15/libs/sdl/SDL2/SDL_test_images.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_test_images.h 24 | * 25 | * Include file for SDL test framework. 26 | * 27 | * This code is a part of the SDL2_test library, not the main SDL library. 28 | */ 29 | 30 | /* 31 | 32 | Defines some images for tests. 33 | 34 | */ 35 | 36 | #ifndef SDL_test_images_h_ 37 | #define SDL_test_images_h_ 38 | 39 | #include "SDL.h" 40 | 41 | #include "begin_code.h" 42 | /* Set up for C function definitions, even when using C++ */ 43 | #ifdef __cplusplus 44 | extern "C" { 45 | #endif 46 | 47 | /** 48 | *Type for test images. 49 | */ 50 | typedef struct SDLTest_SurfaceImage_s { 51 | int width; 52 | int height; 53 | unsigned int bytes_per_pixel; /* 3:RGB, 4:RGBA */ 54 | const char *pixel_data; 55 | } SDLTest_SurfaceImage_t; 56 | 57 | /* Test images */ 58 | SDL_Surface *SDLTest_ImageBlit(void); 59 | SDL_Surface *SDLTest_ImageBlitColor(void); 60 | SDL_Surface *SDLTest_ImageBlitAlpha(void); 61 | SDL_Surface *SDLTest_ImageBlitBlendAdd(void); 62 | SDL_Surface *SDLTest_ImageBlitBlend(void); 63 | SDL_Surface *SDLTest_ImageBlitBlendMod(void); 64 | SDL_Surface *SDLTest_ImageBlitBlendNone(void); 65 | SDL_Surface *SDLTest_ImageBlitBlendAll(void); 66 | SDL_Surface *SDLTest_ImageFace(void); 67 | SDL_Surface *SDLTest_ImagePrimitives(void); 68 | SDL_Surface *SDLTest_ImagePrimitivesBlend(void); 69 | 70 | /* Ends C function definitions when using C++ */ 71 | #ifdef __cplusplus 72 | } 73 | #endif 74 | #include "close_code.h" 75 | 76 | #endif /* SDL_test_images_h_ */ 77 | 78 | /* vi: set ts=4 sw=4 expandtab: */ 79 | -------------------------------------------------------------------------------- /ObjectivelyMVC.vs15/libs/sdl/SDL2/SDL_test_log.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_test_log.h 24 | * 25 | * Include file for SDL test framework. 26 | * 27 | * This code is a part of the SDL2_test library, not the main SDL library. 28 | */ 29 | 30 | /* 31 | * 32 | * Wrapper to log in the TEST category 33 | * 34 | */ 35 | 36 | #ifndef SDL_test_log_h_ 37 | #define SDL_test_log_h_ 38 | 39 | #include "begin_code.h" 40 | /* Set up for C function definitions, even when using C++ */ 41 | #ifdef __cplusplus 42 | extern "C" { 43 | #endif 44 | 45 | /** 46 | * \brief Prints given message with a timestamp in the TEST category and INFO priority. 47 | * 48 | * \param fmt Message to be logged 49 | */ 50 | void SDLTest_Log(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(1); 51 | 52 | /** 53 | * \brief Prints given message with a timestamp in the TEST category and the ERROR priority. 54 | * 55 | * \param fmt Message to be logged 56 | */ 57 | void SDLTest_LogError(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(1); 58 | 59 | /* Ends C function definitions when using C++ */ 60 | #ifdef __cplusplus 61 | } 62 | #endif 63 | #include "close_code.h" 64 | 65 | #endif /* SDL_test_log_h_ */ 66 | 67 | /* vi: set ts=4 sw=4 expandtab: */ 68 | -------------------------------------------------------------------------------- /ObjectivelyMVC.vs15/libs/sdl/SDL2/SDL_test_memory.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_test_memory.h 24 | * 25 | * Include file for SDL test framework. 26 | * 27 | * This code is a part of the SDL2_test library, not the main SDL library. 28 | */ 29 | 30 | #ifndef SDL_test_memory_h_ 31 | #define SDL_test_memory_h_ 32 | 33 | #include "begin_code.h" 34 | /* Set up for C function definitions, even when using C++ */ 35 | #ifdef __cplusplus 36 | extern "C" { 37 | #endif 38 | 39 | 40 | /** 41 | * \brief Start tracking SDL memory allocations 42 | * 43 | * \note This should be called before any other SDL functions for complete tracking coverage 44 | */ 45 | int SDLTest_TrackAllocations(void); 46 | 47 | /** 48 | * \brief Print a log of any outstanding allocations 49 | * 50 | * \note This can be called after SDL_Quit() 51 | */ 52 | void SDLTest_LogAllocations(void); 53 | 54 | 55 | /* Ends C function definitions when using C++ */ 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | #include "close_code.h" 60 | 61 | #endif /* SDL_test_memory_h_ */ 62 | 63 | /* vi: set ts=4 sw=4 expandtab: */ 64 | -------------------------------------------------------------------------------- /ObjectivelyMVC.vs15/libs/sdl/SDL2/SDL_test_random.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_test_random.h 24 | * 25 | * Include file for SDL test framework. 26 | * 27 | * This code is a part of the SDL2_test library, not the main SDL library. 28 | */ 29 | 30 | /* 31 | 32 | A "32-bit Multiply with carry random number generator. Very fast. 33 | Includes a list of recommended multipliers. 34 | 35 | multiply-with-carry generator: x(n) = a*x(n-1) + carry mod 2^32. 36 | period: (a*2^31)-1 37 | 38 | */ 39 | 40 | #ifndef SDL_test_random_h_ 41 | #define SDL_test_random_h_ 42 | 43 | #include "begin_code.h" 44 | /* Set up for C function definitions, even when using C++ */ 45 | #ifdef __cplusplus 46 | extern "C" { 47 | #endif 48 | 49 | /* --- Definitions */ 50 | 51 | /* 52 | * Macros that return a random number in a specific format. 53 | */ 54 | #define SDLTest_RandomInt(c) ((int)SDLTest_Random(c)) 55 | 56 | /* 57 | * Context structure for the random number generator state. 58 | */ 59 | typedef struct { 60 | unsigned int a; 61 | unsigned int x; 62 | unsigned int c; 63 | unsigned int ah; 64 | unsigned int al; 65 | } SDLTest_RandomContext; 66 | 67 | 68 | /* --- Function prototypes */ 69 | 70 | /** 71 | * \brief Initialize random number generator with two integers. 72 | * 73 | * Note: The random sequence of numbers returned by ...Random() is the 74 | * same for the same two integers and has a period of 2^31. 75 | * 76 | * \param rndContext pointer to context structure 77 | * \param xi integer that defines the random sequence 78 | * \param ci integer that defines the random sequence 79 | * 80 | */ 81 | void SDLTest_RandomInit(SDLTest_RandomContext * rndContext, unsigned int xi, 82 | unsigned int ci); 83 | 84 | /** 85 | * \brief Initialize random number generator based on current system time. 86 | * 87 | * \param rndContext pointer to context structure 88 | * 89 | */ 90 | void SDLTest_RandomInitTime(SDLTest_RandomContext *rndContext); 91 | 92 | 93 | /** 94 | * \brief Initialize random number generator based on current system time. 95 | * 96 | * Note: ...RandomInit() or ...RandomInitTime() must have been called 97 | * before using this function. 98 | * 99 | * \param rndContext pointer to context structure 100 | * 101 | * \returns a random number (32bit unsigned integer) 102 | * 103 | */ 104 | unsigned int SDLTest_Random(SDLTest_RandomContext *rndContext); 105 | 106 | 107 | /* Ends C function definitions when using C++ */ 108 | #ifdef __cplusplus 109 | } 110 | #endif 111 | #include "close_code.h" 112 | 113 | #endif /* SDL_test_random_h_ */ 114 | 115 | /* vi: set ts=4 sw=4 expandtab: */ 116 | -------------------------------------------------------------------------------- /ObjectivelyMVC.vs15/libs/sdl/SDL2/SDL_types.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_types.h 24 | * 25 | * \deprecated 26 | */ 27 | 28 | /* DEPRECATED */ 29 | #include "SDL_stdinc.h" 30 | -------------------------------------------------------------------------------- /ObjectivelyMVC.vs15/libs/sdl/SDL2/close_code.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file close_code.h 24 | * 25 | * This file reverses the effects of begin_code.h and should be included 26 | * after you finish any function and structure declarations in your headers 27 | */ 28 | 29 | #ifndef _begin_code_h 30 | #error close_code.h included without matching begin_code.h 31 | #endif 32 | #undef _begin_code_h 33 | 34 | /* Reset structure packing at previous byte alignment */ 35 | #if defined(_MSC_VER) || defined(__MWERKS__) || defined(__BORLANDC__) 36 | #ifdef __BORLANDC__ 37 | #pragma nopackwarning 38 | #endif 39 | #pragma pack(pop) 40 | #endif /* Compiler needs structure packing set */ 41 | -------------------------------------------------------------------------------- /ObjectivelyMVC.vs15/libs/sdl/lib/Win32/SDL2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdolan/ObjectivelyMVC/528fce79225040311729799c5121060c680b4f2f/ObjectivelyMVC.vs15/libs/sdl/lib/Win32/SDL2.dll -------------------------------------------------------------------------------- /ObjectivelyMVC.vs15/libs/sdl/lib/Win32/SDL2.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdolan/ObjectivelyMVC/528fce79225040311729799c5121060c680b4f2f/ObjectivelyMVC.vs15/libs/sdl/lib/Win32/SDL2.lib -------------------------------------------------------------------------------- /ObjectivelyMVC.vs15/libs/sdl/lib/Win32/SDL2.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdolan/ObjectivelyMVC/528fce79225040311729799c5121060c680b4f2f/ObjectivelyMVC.vs15/libs/sdl/lib/Win32/SDL2.pdb -------------------------------------------------------------------------------- /ObjectivelyMVC.vs15/libs/sdl/lib/x64/SDL2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdolan/ObjectivelyMVC/528fce79225040311729799c5121060c680b4f2f/ObjectivelyMVC.vs15/libs/sdl/lib/x64/SDL2.dll -------------------------------------------------------------------------------- /ObjectivelyMVC.vs15/libs/sdl/lib/x64/SDL2.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdolan/ObjectivelyMVC/528fce79225040311729799c5121060c680b4f2f/ObjectivelyMVC.vs15/libs/sdl/lib/x64/SDL2.lib -------------------------------------------------------------------------------- /ObjectivelyMVC.vs15/libs/sdl/lib/x64/SDL2.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdolan/ObjectivelyMVC/528fce79225040311729799c5121060c680b4f2f/ObjectivelyMVC.vs15/libs/sdl/lib/x64/SDL2.pdb -------------------------------------------------------------------------------- /ObjectivelyMVC.vs15/libs/sdl_image/lib/Win32/LICENSE.jpeg.txt: -------------------------------------------------------------------------------- 1 | The source code to this library used with SDL_image can be found here: 2 | http://www.libsdl.org/projects/SDL_image/libs/ 3 | --- 4 | 5 | LEGAL ISSUES 6 | ============ 7 | 8 | In plain English: 9 | 10 | 1. We don't promise that this software works. (But if you find any bugs, 11 | please let us know!) 12 | 2. You can use this software for whatever you want. You don't have to pay us. 13 | 3. You may not pretend that you wrote this software. If you use it in a 14 | program, you must acknowledge somewhere in your documentation that 15 | you've used the IJG code. 16 | 17 | In legalese: 18 | 19 | The authors make NO WARRANTY or representation, either express or implied, 20 | with respect to this software, its quality, accuracy, merchantability, or 21 | fitness for a particular purpose. This software is provided "AS IS", and you, 22 | its user, assume the entire risk as to its quality and accuracy. 23 | 24 | This software is copyright (C) 1991-2012, Thomas G. Lane, Guido Vollbeding. 25 | All Rights Reserved except as specified below. 26 | 27 | Permission is hereby granted to use, copy, modify, and distribute this 28 | software (or portions thereof) for any purpose, without fee, subject to these 29 | conditions: 30 | (1) If any part of the source code for this software is distributed, then this 31 | README file must be included, with this copyright and no-warranty notice 32 | unaltered; and any additions, deletions, or changes to the original files 33 | must be clearly indicated in accompanying documentation. 34 | (2) If only executable code is distributed, then the accompanying 35 | documentation must state that "this software is based in part on the work of 36 | the Independent JPEG Group". 37 | (3) Permission for use of this software is granted only if the user accepts 38 | full responsibility for any undesirable consequences; the authors accept 39 | NO LIABILITY for damages of any kind. 40 | 41 | These conditions apply to any software derived from or based on the IJG code, 42 | not just to the unmodified library. If you use our work, you ought to 43 | acknowledge us. 44 | 45 | Permission is NOT granted for the use of any IJG author's name or company name 46 | in advertising or publicity relating to this software or products derived from 47 | it. This software may be referred to only as "the Independent JPEG Group's 48 | software". 49 | 50 | We specifically permit and encourage the use of this software as the basis of 51 | commercial products, provided that all warranty or liability claims are 52 | assumed by the product vendor. 53 | 54 | 55 | The IJG distribution formerly included code to read and write GIF files. 56 | To avoid entanglement with the Unisys LZW patent, GIF reading support has 57 | been removed altogether, and the GIF writer has been simplified to produce 58 | "uncompressed GIFs". This technique does not use the LZW algorithm; the 59 | resulting GIF files are larger than usual, but are readable by all standard 60 | GIF decoders. 61 | 62 | We are required to state that 63 | "The Graphics Interchange Format(c) is the Copyright property of 64 | CompuServe Incorporated. GIF(sm) is a Service Mark property of 65 | CompuServe Incorporated." 66 | -------------------------------------------------------------------------------- /ObjectivelyMVC.vs15/libs/sdl_image/lib/Win32/LICENSE.zlib.txt: -------------------------------------------------------------------------------- 1 | The source code to this library used with SDL_image can be found here: 2 | http://www.libsdl.org/projects/SDL_image/libs/ 3 | --- 4 | 5 | Copyright notice: 6 | 7 | (C) 1995-2010 Jean-loup Gailly and Mark Adler 8 | 9 | This software is provided 'as-is', without any express or implied 10 | warranty. In no event will the authors be held liable for any damages 11 | arising from the use of this software. 12 | 13 | Permission is granted to anyone to use this software for any purpose, 14 | including commercial applications, and to alter it and redistribute it 15 | freely, subject to the following restrictions: 16 | 17 | 1. The origin of this software must not be misrepresented; you must not 18 | claim that you wrote the original software. If you use this software 19 | in a product, an acknowledgment in the product documentation would be 20 | appreciated but is not required. 21 | 2. Altered source versions must be plainly marked as such, and must not be 22 | misrepresented as being the original software. 23 | 3. This notice may not be removed or altered from any source distribution. 24 | 25 | Jean-loup Gailly Mark Adler 26 | jloup@gzip.org madler@alumni.caltech.edu 27 | 28 | If you use the zlib library in a product, we would appreciate *not* receiving 29 | lengthy legal documents to sign. The sources are provided for free but without 30 | warranty of any kind. The library has been entirely written by Jean-loup 31 | Gailly and Mark Adler; it does not include third-party code. 32 | -------------------------------------------------------------------------------- /ObjectivelyMVC.vs15/libs/sdl_image/lib/Win32/SDL2_image.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdolan/ObjectivelyMVC/528fce79225040311729799c5121060c680b4f2f/ObjectivelyMVC.vs15/libs/sdl_image/lib/Win32/SDL2_image.dll -------------------------------------------------------------------------------- /ObjectivelyMVC.vs15/libs/sdl_image/lib/Win32/SDL2_image.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdolan/ObjectivelyMVC/528fce79225040311729799c5121060c680b4f2f/ObjectivelyMVC.vs15/libs/sdl_image/lib/Win32/SDL2_image.lib -------------------------------------------------------------------------------- /ObjectivelyMVC.vs15/libs/sdl_image/lib/Win32/SDL2_image.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdolan/ObjectivelyMVC/528fce79225040311729799c5121060c680b4f2f/ObjectivelyMVC.vs15/libs/sdl_image/lib/Win32/SDL2_image.pdb -------------------------------------------------------------------------------- /ObjectivelyMVC.vs15/libs/sdl_image/lib/Win32/jpeg62.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdolan/ObjectivelyMVC/528fce79225040311729799c5121060c680b4f2f/ObjectivelyMVC.vs15/libs/sdl_image/lib/Win32/jpeg62.dll -------------------------------------------------------------------------------- /ObjectivelyMVC.vs15/libs/sdl_image/lib/Win32/jpeg62.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdolan/ObjectivelyMVC/528fce79225040311729799c5121060c680b4f2f/ObjectivelyMVC.vs15/libs/sdl_image/lib/Win32/jpeg62.pdb -------------------------------------------------------------------------------- /ObjectivelyMVC.vs15/libs/sdl_image/lib/Win32/libpng16.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdolan/ObjectivelyMVC/528fce79225040311729799c5121060c680b4f2f/ObjectivelyMVC.vs15/libs/sdl_image/lib/Win32/libpng16.dll -------------------------------------------------------------------------------- /ObjectivelyMVC.vs15/libs/sdl_image/lib/Win32/libpng16.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdolan/ObjectivelyMVC/528fce79225040311729799c5121060c680b4f2f/ObjectivelyMVC.vs15/libs/sdl_image/lib/Win32/libpng16.pdb -------------------------------------------------------------------------------- /ObjectivelyMVC.vs15/libs/sdl_image/lib/Win32/zlib.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdolan/ObjectivelyMVC/528fce79225040311729799c5121060c680b4f2f/ObjectivelyMVC.vs15/libs/sdl_image/lib/Win32/zlib.pdb -------------------------------------------------------------------------------- /ObjectivelyMVC.vs15/libs/sdl_image/lib/Win32/zlib1.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdolan/ObjectivelyMVC/528fce79225040311729799c5121060c680b4f2f/ObjectivelyMVC.vs15/libs/sdl_image/lib/Win32/zlib1.dll -------------------------------------------------------------------------------- /ObjectivelyMVC.vs15/libs/sdl_image/lib/x64/LICENSE.jpeg.txt: -------------------------------------------------------------------------------- 1 | The source code to this library used with SDL_image can be found here: 2 | http://www.libsdl.org/projects/SDL_image/libs/ 3 | --- 4 | 5 | LEGAL ISSUES 6 | ============ 7 | 8 | In plain English: 9 | 10 | 1. We don't promise that this software works. (But if you find any bugs, 11 | please let us know!) 12 | 2. You can use this software for whatever you want. You don't have to pay us. 13 | 3. You may not pretend that you wrote this software. If you use it in a 14 | program, you must acknowledge somewhere in your documentation that 15 | you've used the IJG code. 16 | 17 | In legalese: 18 | 19 | The authors make NO WARRANTY or representation, either express or implied, 20 | with respect to this software, its quality, accuracy, merchantability, or 21 | fitness for a particular purpose. This software is provided "AS IS", and you, 22 | its user, assume the entire risk as to its quality and accuracy. 23 | 24 | This software is copyright (C) 1991-2012, Thomas G. Lane, Guido Vollbeding. 25 | All Rights Reserved except as specified below. 26 | 27 | Permission is hereby granted to use, copy, modify, and distribute this 28 | software (or portions thereof) for any purpose, without fee, subject to these 29 | conditions: 30 | (1) If any part of the source code for this software is distributed, then this 31 | README file must be included, with this copyright and no-warranty notice 32 | unaltered; and any additions, deletions, or changes to the original files 33 | must be clearly indicated in accompanying documentation. 34 | (2) If only executable code is distributed, then the accompanying 35 | documentation must state that "this software is based in part on the work of 36 | the Independent JPEG Group". 37 | (3) Permission for use of this software is granted only if the user accepts 38 | full responsibility for any undesirable consequences; the authors accept 39 | NO LIABILITY for damages of any kind. 40 | 41 | These conditions apply to any software derived from or based on the IJG code, 42 | not just to the unmodified library. If you use our work, you ought to 43 | acknowledge us. 44 | 45 | Permission is NOT granted for the use of any IJG author's name or company name 46 | in advertising or publicity relating to this software or products derived from 47 | it. This software may be referred to only as "the Independent JPEG Group's 48 | software". 49 | 50 | We specifically permit and encourage the use of this software as the basis of 51 | commercial products, provided that all warranty or liability claims are 52 | assumed by the product vendor. 53 | 54 | 55 | The IJG distribution formerly included code to read and write GIF files. 56 | To avoid entanglement with the Unisys LZW patent, GIF reading support has 57 | been removed altogether, and the GIF writer has been simplified to produce 58 | "uncompressed GIFs". This technique does not use the LZW algorithm; the 59 | resulting GIF files are larger than usual, but are readable by all standard 60 | GIF decoders. 61 | 62 | We are required to state that 63 | "The Graphics Interchange Format(c) is the Copyright property of 64 | CompuServe Incorporated. GIF(sm) is a Service Mark property of 65 | CompuServe Incorporated." 66 | -------------------------------------------------------------------------------- /ObjectivelyMVC.vs15/libs/sdl_image/lib/x64/LICENSE.zlib.txt: -------------------------------------------------------------------------------- 1 | The source code to this library used with SDL_image can be found here: 2 | http://www.libsdl.org/projects/SDL_image/libs/ 3 | --- 4 | 5 | Copyright notice: 6 | 7 | (C) 1995-2010 Jean-loup Gailly and Mark Adler 8 | 9 | This software is provided 'as-is', without any express or implied 10 | warranty. In no event will the authors be held liable for any damages 11 | arising from the use of this software. 12 | 13 | Permission is granted to anyone to use this software for any purpose, 14 | including commercial applications, and to alter it and redistribute it 15 | freely, subject to the following restrictions: 16 | 17 | 1. The origin of this software must not be misrepresented; you must not 18 | claim that you wrote the original software. If you use this software 19 | in a product, an acknowledgment in the product documentation would be 20 | appreciated but is not required. 21 | 2. Altered source versions must be plainly marked as such, and must not be 22 | misrepresented as being the original software. 23 | 3. This notice may not be removed or altered from any source distribution. 24 | 25 | Jean-loup Gailly Mark Adler 26 | jloup@gzip.org madler@alumni.caltech.edu 27 | 28 | If you use the zlib library in a product, we would appreciate *not* receiving 29 | lengthy legal documents to sign. The sources are provided for free but without 30 | warranty of any kind. The library has been entirely written by Jean-loup 31 | Gailly and Mark Adler; it does not include third-party code. 32 | -------------------------------------------------------------------------------- /ObjectivelyMVC.vs15/libs/sdl_image/lib/x64/SDL2_image.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdolan/ObjectivelyMVC/528fce79225040311729799c5121060c680b4f2f/ObjectivelyMVC.vs15/libs/sdl_image/lib/x64/SDL2_image.dll -------------------------------------------------------------------------------- /ObjectivelyMVC.vs15/libs/sdl_image/lib/x64/SDL2_image.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdolan/ObjectivelyMVC/528fce79225040311729799c5121060c680b4f2f/ObjectivelyMVC.vs15/libs/sdl_image/lib/x64/SDL2_image.lib -------------------------------------------------------------------------------- /ObjectivelyMVC.vs15/libs/sdl_image/lib/x64/SDL2_image.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdolan/ObjectivelyMVC/528fce79225040311729799c5121060c680b4f2f/ObjectivelyMVC.vs15/libs/sdl_image/lib/x64/SDL2_image.pdb -------------------------------------------------------------------------------- /ObjectivelyMVC.vs15/libs/sdl_image/lib/x64/jpeg62.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdolan/ObjectivelyMVC/528fce79225040311729799c5121060c680b4f2f/ObjectivelyMVC.vs15/libs/sdl_image/lib/x64/jpeg62.dll -------------------------------------------------------------------------------- /ObjectivelyMVC.vs15/libs/sdl_image/lib/x64/jpeg62.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdolan/ObjectivelyMVC/528fce79225040311729799c5121060c680b4f2f/ObjectivelyMVC.vs15/libs/sdl_image/lib/x64/jpeg62.pdb -------------------------------------------------------------------------------- /ObjectivelyMVC.vs15/libs/sdl_image/lib/x64/libpng16.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdolan/ObjectivelyMVC/528fce79225040311729799c5121060c680b4f2f/ObjectivelyMVC.vs15/libs/sdl_image/lib/x64/libpng16.dll -------------------------------------------------------------------------------- /ObjectivelyMVC.vs15/libs/sdl_image/lib/x64/libpng16.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdolan/ObjectivelyMVC/528fce79225040311729799c5121060c680b4f2f/ObjectivelyMVC.vs15/libs/sdl_image/lib/x64/libpng16.pdb -------------------------------------------------------------------------------- /ObjectivelyMVC.vs15/libs/sdl_image/lib/x64/zlib.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdolan/ObjectivelyMVC/528fce79225040311729799c5121060c680b4f2f/ObjectivelyMVC.vs15/libs/sdl_image/lib/x64/zlib.pdb -------------------------------------------------------------------------------- /ObjectivelyMVC.vs15/libs/sdl_image/lib/x64/zlib1.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdolan/ObjectivelyMVC/528fce79225040311729799c5121060c680b4f2f/ObjectivelyMVC.vs15/libs/sdl_image/lib/x64/zlib1.dll -------------------------------------------------------------------------------- /ObjectivelyMVC.vs15/libs/sdl_ttf/lib/Win32/LICENSE.freetype.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdolan/ObjectivelyMVC/528fce79225040311729799c5121060c680b4f2f/ObjectivelyMVC.vs15/libs/sdl_ttf/lib/Win32/LICENSE.freetype.txt -------------------------------------------------------------------------------- /ObjectivelyMVC.vs15/libs/sdl_ttf/lib/Win32/LICENSE.zlib.txt: -------------------------------------------------------------------------------- 1 | The source code to this library used with SDL_ttf can be found here: 2 | http://www.libsdl.org/projects/SDL_ttf/libs/ 3 | --- 4 | 5 | Copyright notice: 6 | 7 | (C) 1995-2010 Jean-loup Gailly and Mark Adler 8 | 9 | This software is provided 'as-is', without any express or implied 10 | warranty. In no event will the authors be held liable for any damages 11 | arising from the use of this software. 12 | 13 | Permission is granted to anyone to use this software for any purpose, 14 | including commercial applications, and to alter it and redistribute it 15 | freely, subject to the following restrictions: 16 | 17 | 1. The origin of this software must not be misrepresented; you must not 18 | claim that you wrote the original software. If you use this software 19 | in a product, an acknowledgment in the product documentation would be 20 | appreciated but is not required. 21 | 2. Altered source versions must be plainly marked as such, and must not be 22 | misrepresented as being the original software. 23 | 3. This notice may not be removed or altered from any source distribution. 24 | 25 | Jean-loup Gailly Mark Adler 26 | jloup@gzip.org madler@alumni.caltech.edu 27 | 28 | If you use the zlib library in a product, we would appreciate *not* receiving 29 | lengthy legal documents to sign. The sources are provided for free but without 30 | warranty of any kind. The library has been entirely written by Jean-loup 31 | Gailly and Mark Adler; it does not include third-party code. 32 | -------------------------------------------------------------------------------- /ObjectivelyMVC.vs15/libs/sdl_ttf/lib/Win32/SDL2_ttf.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdolan/ObjectivelyMVC/528fce79225040311729799c5121060c680b4f2f/ObjectivelyMVC.vs15/libs/sdl_ttf/lib/Win32/SDL2_ttf.dll -------------------------------------------------------------------------------- /ObjectivelyMVC.vs15/libs/sdl_ttf/lib/Win32/SDL2_ttf.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdolan/ObjectivelyMVC/528fce79225040311729799c5121060c680b4f2f/ObjectivelyMVC.vs15/libs/sdl_ttf/lib/Win32/SDL2_ttf.lib -------------------------------------------------------------------------------- /ObjectivelyMVC.vs15/libs/sdl_ttf/lib/Win32/SDL2_ttf.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdolan/ObjectivelyMVC/528fce79225040311729799c5121060c680b4f2f/ObjectivelyMVC.vs15/libs/sdl_ttf/lib/Win32/SDL2_ttf.pdb -------------------------------------------------------------------------------- /ObjectivelyMVC.vs15/libs/sdl_ttf/lib/x64/LICENSE.freetype.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdolan/ObjectivelyMVC/528fce79225040311729799c5121060c680b4f2f/ObjectivelyMVC.vs15/libs/sdl_ttf/lib/x64/LICENSE.freetype.txt -------------------------------------------------------------------------------- /ObjectivelyMVC.vs15/libs/sdl_ttf/lib/x64/LICENSE.zlib.txt: -------------------------------------------------------------------------------- 1 | The source code to this library used with SDL_ttf can be found here: 2 | http://www.libsdl.org/projects/SDL_ttf/libs/ 3 | --- 4 | 5 | Copyright notice: 6 | 7 | (C) 1995-2010 Jean-loup Gailly and Mark Adler 8 | 9 | This software is provided 'as-is', without any express or implied 10 | warranty. In no event will the authors be held liable for any damages 11 | arising from the use of this software. 12 | 13 | Permission is granted to anyone to use this software for any purpose, 14 | including commercial applications, and to alter it and redistribute it 15 | freely, subject to the following restrictions: 16 | 17 | 1. The origin of this software must not be misrepresented; you must not 18 | claim that you wrote the original software. If you use this software 19 | in a product, an acknowledgment in the product documentation would be 20 | appreciated but is not required. 21 | 2. Altered source versions must be plainly marked as such, and must not be 22 | misrepresented as being the original software. 23 | 3. This notice may not be removed or altered from any source distribution. 24 | 25 | Jean-loup Gailly Mark Adler 26 | jloup@gzip.org madler@alumni.caltech.edu 27 | 28 | If you use the zlib library in a product, we would appreciate *not* receiving 29 | lengthy legal documents to sign. The sources are provided for free but without 30 | warranty of any kind. The library has been entirely written by Jean-loup 31 | Gailly and Mark Adler; it does not include third-party code. 32 | -------------------------------------------------------------------------------- /ObjectivelyMVC.vs15/libs/sdl_ttf/lib/x64/SDL2_ttf.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdolan/ObjectivelyMVC/528fce79225040311729799c5121060c680b4f2f/ObjectivelyMVC.vs15/libs/sdl_ttf/lib/x64/SDL2_ttf.dll -------------------------------------------------------------------------------- /ObjectivelyMVC.vs15/libs/sdl_ttf/lib/x64/SDL2_ttf.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdolan/ObjectivelyMVC/528fce79225040311729799c5121060c680b4f2f/ObjectivelyMVC.vs15/libs/sdl_ttf/lib/x64/SDL2_ttf.lib -------------------------------------------------------------------------------- /ObjectivelyMVC.vs15/libs/sdl_ttf/lib/x64/SDL2_ttf.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdolan/ObjectivelyMVC/528fce79225040311729799c5121060c680b4f2f/ObjectivelyMVC.vs15/libs/sdl_ttf/lib/x64/SDL2_ttf.pdb -------------------------------------------------------------------------------- /ObjectivelyMVC.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ObjectivelyMVC.xcodeproj/project.xcworkspace/xcuserdata/jdolan.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdolan/ObjectivelyMVC/528fce79225040311729799c5121060c680b4f2f/ObjectivelyMVC.xcodeproj/project.xcworkspace/xcuserdata/jdolan.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /ObjectivelyMVC.xcodeproj/xcshareddata/xcschemes/ObjectivelyMVC-Examples.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 50 | 51 | 52 | 53 | 59 | 60 | 66 | 67 | 68 | 69 | 71 | 72 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /ObjectivelyMVC.xcodeproj/xcshareddata/xcschemes/ObjectivelyMVC-Hello.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 41 | 42 | 54 | 56 | 62 | 63 | 64 | 65 | 71 | 73 | 79 | 80 | 81 | 82 | 84 | 85 | 88 | 89 | 90 | -------------------------------------------------------------------------------- /ObjectivelyMVC.xcodeproj/xcshareddata/xcschemes/ObjectivelyMVC-Tests.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 50 | 51 | 52 | 53 | 59 | 60 | 66 | 67 | 68 | 69 | 71 | 72 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /ObjectivelyMVC.xcodeproj/xcshareddata/xcschemes/ObjectivelyMVC.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 50 | 51 | 52 | 53 | 59 | 60 | 66 | 67 | 68 | 69 | 71 | 72 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /ObjectivelyMVC.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /ObjectivelyMVC.xcworkspace/xcshareddata/ObjectivelyMVC.xcscmblueprint: -------------------------------------------------------------------------------- 1 | { 2 | "DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "91A6C33B74D20865B0FECADDFE4FBF591F531705", 3 | "DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey" : { 4 | 5 | }, 6 | "DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey" : { 7 | "91A6C33B74D20865B0FECADDFE4FBF591F531705" : 0, 8 | "3B83F38737DDA99E7447F823DF3644831B3C6250" : 0 9 | }, 10 | "DVTSourceControlWorkspaceBlueprintIdentifierKey" : "AC6F85E1-CBF5-4874-9E64-89DF56FBE339", 11 | "DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : { 12 | "91A6C33B74D20865B0FECADDFE4FBF591F531705" : "SDL_mvc\/", 13 | "3B83F38737DDA99E7447F823DF3644831B3C6250" : "Objectively\/" 14 | }, 15 | "DVTSourceControlWorkspaceBlueprintNameKey" : "ObjectivelyMVC", 16 | "DVTSourceControlWorkspaceBlueprintVersion" : 204, 17 | "DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey" : "ObjectivelyMVC.xcworkspace", 18 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey" : [ 19 | { 20 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "github.com:jdolan\/Objectively.git", 21 | "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", 22 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "3B83F38737DDA99E7447F823DF3644831B3C6250" 23 | }, 24 | { 25 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "github.com:jdolan\/SDL_mvc.git", 26 | "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", 27 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "91A6C33B74D20865B0FECADDFE4FBF591F531705" 28 | } 29 | ] 30 | } -------------------------------------------------------------------------------- /ObjectivelyMVC.xcworkspace/xcshareddata/SDL_mvc.xcscmblueprint: -------------------------------------------------------------------------------- 1 | { 2 | "DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "91A6C33B74D20865B0FECADDFE4FBF591F531705", 3 | "DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey" : { 4 | 5 | }, 6 | "DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey" : { 7 | "91A6C33B74D20865B0FECADDFE4FBF591F531705" : 0, 8 | "3B83F38737DDA99E7447F823DF3644831B3C6250" : 0 9 | }, 10 | "DVTSourceControlWorkspaceBlueprintIdentifierKey" : "4D088737-210C-424F-9BC9-7B79B64FF38B", 11 | "DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : { 12 | "91A6C33B74D20865B0FECADDFE4FBF591F531705" : "SDL_mvc\/", 13 | "3B83F38737DDA99E7447F823DF3644831B3C6250" : "Objectively\/" 14 | }, 15 | "DVTSourceControlWorkspaceBlueprintNameKey" : "SDL_mvc", 16 | "DVTSourceControlWorkspaceBlueprintVersion" : 204, 17 | "DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey" : "SDL_mvc.xcworkspace", 18 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey" : [ 19 | { 20 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "github.com:jdolan\/Objectively.git", 21 | "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", 22 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "3B83F38737DDA99E7447F823DF3644831B3C6250" 23 | }, 24 | { 25 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "github.com:jdolan\/SDL_mvc.git", 26 | "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", 27 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "91A6C33B74D20865B0FECADDFE4FBF591F531705" 28 | } 29 | ] 30 | } -------------------------------------------------------------------------------- /Sources/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = \ 2 | ObjectivelyMVC 3 | 4 | include_HEADERS = \ 5 | ObjectivelyMVC.h 6 | 7 | pkgconfigdir = $(libdir)/pkgconfig 8 | pkgconfig_DATA = ObjectivelyMVC.pc 9 | -------------------------------------------------------------------------------- /Sources/ObjectivelyMVC.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ObjectivelyMVC: Object oriented MVC framework for OpenGL, SDL2 and GNU C. 3 | * Copyright (C) 2014 Jay Dolan 4 | * 5 | * This software is provided 'as-is', without any express or implied 6 | * warranty. In no event will the authors be held liable for any damages 7 | * arising from the use of this software. 8 | * 9 | * Permission is granted to anyone to use this software for any purpose, 10 | * including commercial applications, and to alter it and redistribute it 11 | * freely, subject to the following restrictions: 12 | * 13 | * 1. The origin of this software must not be misrepresented; you must not 14 | * claim that you wrote the original software. If you use this software 15 | * in a product, an acknowledgment in the product documentation would be 16 | * appreciated but is not required. 17 | * 18 | * 2. Altered source versions must be plainly marked as such, and must not be 19 | * misrepresented as being the original software. 20 | * 21 | * 3. This notice may not be removed or altered from any source distribution. 22 | */ 23 | 24 | #pragma once 25 | 26 | /** 27 | * @file 28 | * @brief ObjectivelyMVC: Object oriented MVC framework for OpenGL, SDL2 and GNU C. 29 | */ 30 | 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include 38 | #include 39 | #include 40 | #include 41 | #include 42 | #include 43 | #include 44 | #include 45 | #include 46 | #include 47 | #include 48 | #include 49 | #include 50 | #include 51 | #include 52 | #include 53 | #include 54 | #include 55 | #include 56 | #include 57 | #include 58 | #include 59 | #include 60 | #include 61 | #include 62 | #include 63 | #include 64 | #include 65 | #include 66 | #include 67 | #include 68 | #include 69 | #include 70 | #include 71 | #include 72 | #include 73 | #include 74 | #include 75 | #include 76 | #include 77 | #include 78 | #include 79 | #include 80 | #include 81 | #include 82 | -------------------------------------------------------------------------------- /Sources/ObjectivelyMVC.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | includedir=@includedir@ 4 | libdir=@libdir@ 5 | 6 | Name: ObjectivelyMVC 7 | Description: Object oriented MVC framework for OpenGL, SDL2 and GNU C. 8 | URL: https://github.com/jdolan/ObjectivelyMVC 9 | Version: @PACKAGE_VERSION@ 10 | Cflags: -I${includedir} 11 | Libs: -L${libdir} -lObjectivelyMVC -lObjectively 12 | Libs.private: -------------------------------------------------------------------------------- /Sources/ObjectivelyMVC/Action.c: -------------------------------------------------------------------------------- 1 | /* 2 | * ObjectivelyMVC: Object oriented MVC framework for OpenGL, SDL2 and GNU C. 3 | * Copyright (C) 2014 Jay Dolan 4 | * 5 | * This software is provided 'as-is', without any express or implied 6 | * warranty. In no event will the authors be held liable for any damages 7 | * arising from the use of this software. 8 | * 9 | * Permission is granted to anyone to use this software for any purpose, 10 | * including commercial applications, and to alter it and redistribute it 11 | * freely, subject to the following restrictions: 12 | * 13 | * 1. The origin of this software must not be misrepresented; you must not 14 | * claim that you wrote the original software. If you use this software 15 | * in a product, an acknowledgment in the product documentation would be 16 | * appreciated but is not required. 17 | * 18 | * 2. Altered source versions must be plainly marked as such, and must not be 19 | * misrepresented as being the original software. 20 | * 21 | * 3. This notice may not be removed or altered from any source distribution. 22 | */ 23 | 24 | #include 25 | 26 | #include "Action.h" 27 | 28 | #define _Class _Action 29 | 30 | #pragma mark - Action 31 | 32 | /** 33 | * @fn Action *Action::initWithEventType(Action *self, SDL_EventType eventType, ActionFunction function, ident sender, ident data) 34 | * @memberof Action 35 | */ 36 | static Action *initWithEventType(Action *self, SDL_EventType eventType, ActionFunction function, ident sender, ident data) { 37 | 38 | self = (Action *) super(Object, self, init); 39 | if (self) { 40 | self->eventType = eventType; 41 | assert(self->eventType); 42 | 43 | self->function = function; 44 | assert(self->function); 45 | 46 | self->sender = sender; 47 | self->data = data; 48 | } 49 | 50 | return self; 51 | } 52 | 53 | #pragma mark - Class lifecycle 54 | 55 | /** 56 | * @see Class::initialize(Class *) 57 | */ 58 | static void initialize(Class *clazz) { 59 | 60 | ((ActionInterface *) clazz->interface)->initWithEventType = initWithEventType; 61 | } 62 | 63 | /** 64 | * @fn Class *Action::_Action(void) 65 | * @memberof Action 66 | */ 67 | Class *_Action(void) { 68 | static Class *clazz; 69 | static Once once; 70 | 71 | do_once(&once, { 72 | clazz = _initialize(&(const ClassDef) { 73 | .name = "Action", 74 | .superclass = _Object(), 75 | .instanceSize = sizeof(Action), 76 | .interfaceOffset = offsetof(Action, interface), 77 | .interfaceSize = sizeof(ActionInterface), 78 | .initialize = initialize, 79 | }); 80 | }); 81 | 82 | return clazz; 83 | } 84 | 85 | #undef _Class 86 | -------------------------------------------------------------------------------- /Sources/ObjectivelyMVC/Action.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ObjectivelyMVC: Object oriented MVC framework for OpenGL, SDL2 and GNU C. 3 | * Copyright (C) 2014 Jay Dolan 4 | * 5 | * This software is provided 'as-is', without any express or implied 6 | * warranty. In no event will the authors be held liable for any damages 7 | * arising from the use of this software. 8 | * 9 | * Permission is granted to anyone to use this software for any purpose, 10 | * including commercial applications, and to alter it and redistribute it 11 | * freely, subject to the following restrictions: 12 | * 13 | * 1. The origin of this software must not be misrepresented; you must not 14 | * claim that you wrote the original software. If you use this software 15 | * in a product, an acknowledgment in the product documentation would be 16 | * appreciated but is not required. 17 | * 18 | * 2. Altered source versions must be plainly marked as such, and must not be 19 | * misrepresented as being the original software. 20 | * 21 | * 3. This notice may not be removed or altered from any source distribution. 22 | */ 23 | 24 | #pragma once 25 | 26 | #include 27 | 28 | #include 29 | 30 | /** 31 | * @file 32 | * @brief Actions bind event-driven behavior to Controls. 33 | */ 34 | 35 | typedef struct Action Action; 36 | typedef struct ActionInterface ActionInterface; 37 | 38 | typedef struct Control Control; 39 | 40 | /** 41 | * @brief The ActionFunction callback. 42 | */ 43 | typedef void (*ActionFunction)(Control *control, const SDL_Event *event, ident sender, ident data); 44 | 45 | /** 46 | * @brief Actions bind event-driven behavior to Controls. 47 | * @extends Object 48 | * @ingroup Controls 49 | */ 50 | struct Action { 51 | 52 | /** 53 | * @brief The superclass. 54 | */ 55 | Object object; 56 | 57 | /** 58 | * @brief The interface. 59 | * @protected 60 | */ 61 | ActionInterface *interface; 62 | 63 | /** 64 | * @brief The user data. 65 | */ 66 | ident data; 67 | 68 | /** 69 | * @brief The event type. 70 | */ 71 | SDL_EventType eventType; 72 | 73 | /** 74 | * @brief The function. 75 | */ 76 | ActionFunction function; 77 | 78 | /** 79 | * @brief The sender. 80 | */ 81 | ident sender; 82 | }; 83 | 84 | /** 85 | * @brief The Action interface. 86 | */ 87 | struct ActionInterface { 88 | 89 | /** 90 | * @brief The superclass interface. 91 | */ 92 | ObjectInterface objectInterface; 93 | 94 | /** 95 | * @fn Action *Action::initWithEventType(Action *self, SDL_EventType eventType, ActionFunction function, ident sender, ident data) 96 | * @brief Initializes this Action with the given function and data. 97 | * @param self The Action. 98 | * @param eventType The event type. 99 | * @param function The ActionFunction. 100 | * @param sender The sender. 101 | * @param data User data. 102 | * @return The initialized Action, or `NULL` on error. 103 | * @memberof Action 104 | */ 105 | Action *(*initWithEventType)(Action *self, SDL_EventType eventType, ActionFunction function, ident sender, ident data); 106 | }; 107 | 108 | /** 109 | * @fn Class *Action::_Action(void) 110 | * @brief The Action archetype. 111 | * @return The Action Class. 112 | * @memberof Action 113 | */ 114 | OBJECTIVELYMVC_EXPORT Class *_Action(void); 115 | -------------------------------------------------------------------------------- /Sources/ObjectivelyMVC/Box.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ObjectivelyMVC: Object oriented MVC framework for OpenGL, SDL2 and GNU C. 3 | * Copyright (C) 2014 Jay Dolan 4 | * 5 | * This software is provided 'as-is', without any express or implied 6 | * warranty. In no event will the authors be held liable for any damages 7 | * arising from the use of this software. 8 | * 9 | * Permission is granted to anyone to use this software for any purpose, 10 | * including commercial applications, and to alter it and redistribute it 11 | * freely, subject to the following restrictions: 12 | * 13 | * 1. The origin of this software must not be misrepresented; you must not 14 | * claim that you wrote the original software. If you use this software 15 | * in a product, an acknowledgment in the product documentation would be 16 | * appreciated but is not required. 17 | * 18 | * 2. Altered source versions must be plainly marked as such, and must not be 19 | * misrepresented as being the original software. 20 | * 21 | * 3. This notice may not be removed or altered from any source distribution. 22 | */ 23 | 24 | #pragma once 25 | 26 | #include 27 | #include 28 | 29 | /** 30 | * @file 31 | * @brief A container View with a positioned Label. 32 | */ 33 | 34 | typedef struct Box Box; 35 | typedef struct BoxInterface BoxInterface; 36 | 37 | /** 38 | * @brief A container View with a positioned Label. 39 | * @extends View 40 | * @ingroup Containers 41 | * @remarks Boxes are container Views with a positioned label. Boxes are useful when grouping 42 | * Controls, Inputs or custom Views within a larger View (e.g. Panel). 43 | */ 44 | struct Box { 45 | 46 | /** 47 | * @brief The superclass. 48 | */ 49 | View view; 50 | 51 | /** 52 | * @brief The interface. 53 | * @protected 54 | */ 55 | BoxInterface *interface; 56 | 57 | /** 58 | * @brief The internal container. 59 | */ 60 | StackView *contentView; 61 | 62 | /** 63 | * @brief The Label. 64 | */ 65 | Label *label; 66 | }; 67 | 68 | /** 69 | * @brief The Box interface. 70 | */ 71 | struct BoxInterface { 72 | 73 | /** 74 | * @brief The superclass interface. 75 | */ 76 | ViewInterface viewInterface; 77 | 78 | /** 79 | * @fn Box *Box::initWithFrame(Box *self, const SDL_Rect *frame) 80 | * @brief Initializes this Box with the given frame. 81 | * @param self The Box. 82 | * @param frame The frame. 83 | * @return The initialized Box, or `NULL` on error. 84 | * @memberof Box 85 | */ 86 | Box *(*initWithFrame)(Box *self, const SDL_Rect *frame); 87 | }; 88 | 89 | /** 90 | * @fn Class *Box::_Box(void) 91 | * @brief The Box archetype. 92 | * @return The Box Class. 93 | * @memberof Box 94 | */ 95 | OBJECTIVELYMVC_EXPORT Class *_Box(void); 96 | 97 | -------------------------------------------------------------------------------- /Sources/ObjectivelyMVC/Button.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ObjectivelyMVC: Object oriented MVC framework for OpenGL, SDL2 and GNU C. 3 | * Copyright (C) 2014 Jay Dolan 4 | * 5 | * This software is provided 'as-is', without any express or implied 6 | * warranty. In no event will the authors be held liable for any damages 7 | * arising from the use of this software. 8 | * 9 | * Permission is granted to anyone to use this software for any purpose, 10 | * including commercial applications, and to alter it and redistribute it 11 | * freely, subject to the following restrictions: 12 | * 13 | * 1. The origin of this software must not be misrepresented; you must not 14 | * claim that you wrote the original software. If you use this software 15 | * in a product, an acknowledgment in the product documentation would be 16 | * appreciated but is not required. 17 | * 18 | * 2. Altered source versions must be plainly marked as such, and must not be 19 | * misrepresented as being the original software. 20 | * 21 | * 3. This notice may not be removed or altered from any source distribution. 22 | */ 23 | 24 | #pragma once 25 | 26 | #include 27 | #include 28 | 29 | /** 30 | * @file 31 | * @brief Buttons are Controls that respond to click events. 32 | */ 33 | 34 | typedef struct Button Button; 35 | typedef struct ButtonInterface ButtonInterface; 36 | 37 | /** 38 | * @brief Buttons are Controls that respond to click events. 39 | * @extends Control 40 | * @ingroup Controls 41 | */ 42 | struct Button { 43 | 44 | /** 45 | * @brief The superclass. 46 | */ 47 | Control control; 48 | 49 | /** 50 | * @brief The interface. 51 | * @protected 52 | */ 53 | ButtonInterface *interface; 54 | 55 | /** 56 | * @brief The image. 57 | */ 58 | ImageView *image; 59 | 60 | /** 61 | * @brief The title. 62 | */ 63 | Text *title; 64 | }; 65 | 66 | /** 67 | * @brief The Button interface. 68 | */ 69 | struct ButtonInterface { 70 | 71 | /** 72 | * @brief The superclass interface. 73 | */ 74 | ControlInterface controlInterface; 75 | 76 | /** 77 | * @fn Button *Button::initWithFrame(Button *self, const SDL_Rect *frame) 78 | * @brief Initializes this Button with the specified frame and style. 79 | * @param self The Button. 80 | * @param frame The frame. 81 | * @return The initialized Button, or `NULL` on error. 82 | * @memberof Button 83 | */ 84 | Button *(*initWithFrame)(Button *self, const SDL_Rect *frame); 85 | 86 | /** 87 | * @fn Button *Button::initWithImage(Button *self, Image *image) 88 | * @brief Initializes this Button with the sopecified Image. 89 | * @param self The Button. 90 | * @param image The Image. 91 | * @return The initialized Button, or `NULL` on error. 92 | * @memberof Button 93 | */ 94 | Button *(*initWithImage)(Button *self, Image *image); 95 | 96 | /** 97 | * @fn Button *Button::initWithTitle(Button *self, const char *title) 98 | * @brief Initializes this Button with the specified title. 99 | * @param self The Button. 100 | * @param title The title text. 101 | * @return The initialized Button, or `NULL` on error. 102 | * @memberof Button 103 | */ 104 | Button *(*initWithTitle)(Button *self, const char *title); 105 | }; 106 | 107 | /** 108 | * @fn Class *Button::_Button(void) 109 | * @brief The Button archetype. 110 | * @return The Button Class. 111 | * @memberof Button 112 | */ 113 | OBJECTIVELYMVC_EXPORT Class *_Button(void); 114 | -------------------------------------------------------------------------------- /Sources/ObjectivelyMVC/Checkbox.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ObjectivelyMVC: Object oriented MVC framework for OpenGL, SDL2 and GNU C. 3 | * Copyright (C) 2014 Jay Dolan 4 | * 5 | * This software is provided 'as-is', without any express or implied 6 | * warranty. In no event will the authors be held liable for any damages 7 | * arising from the use of this software. 8 | * 9 | * Permission is granted to anyone to use this software for any purpose, 10 | * including commercial applications, and to alter it and redistribute it 11 | * freely, subject to the following restrictions: 12 | * 13 | * 1. The origin of this software must not be misrepresented; you must not 14 | * claim that you wrote the original software. If you use this software 15 | * in a product, an acknowledgment in the product documentation would be 16 | * appreciated but is not required. 17 | * 18 | * 2. Altered source versions must be plainly marked as such, and must not be 19 | * misrepresented as being the original software. 20 | * 21 | * 3. This notice may not be removed or altered from any source distribution. 22 | */ 23 | 24 | #pragma once 25 | 26 | #include 27 | #include 28 | #include 29 | 30 | /** 31 | * @file 32 | * @brief Checkboxes are toggle Controls that respond to click events. 33 | */ 34 | 35 | typedef struct Checkbox Checkbox; 36 | typedef struct CheckboxInterface CheckboxInterface; 37 | 38 | /** 39 | * @brief Checkboxes are toggle Controls that respond to click events. 40 | * @extends Control 41 | * @ingroup Controls 42 | */ 43 | struct Checkbox { 44 | 45 | /** 46 | * @brief The superclass. 47 | */ 48 | Control control; 49 | 50 | /** 51 | * @brief The interface. 52 | * @protected 53 | */ 54 | CheckboxInterface *interface; 55 | 56 | /** 57 | * @brief The box. 58 | */ 59 | Control *box; 60 | 61 | /** 62 | * @brief The check. 63 | */ 64 | ImageView *check; 65 | }; 66 | 67 | /** 68 | * @brief The Checkbox interface. 69 | */ 70 | struct CheckboxInterface { 71 | 72 | /** 73 | * @brief The superclass interface. 74 | */ 75 | ControlInterface controltInterface; 76 | 77 | /** 78 | * @fn Checkbox *Checkbox::initWithFrame(Checkbox *self, const SDL_Frame *frame) 79 | * @brief Initializes this Checkbox with the specified frame and style. 80 | * @param self The Checkbox. 81 | * @param frame The frame. 82 | * @return The initialized Checkbox, or `NULL` on error. 83 | * @memberof Checkbox 84 | */ 85 | Checkbox *(*initWithFrame)(Checkbox *self, const SDL_Rect *frame); 86 | }; 87 | 88 | /** 89 | * @fn Class *Checkbox::_Checkbox(void) 90 | * @brief The Checkbox archetype. 91 | * @return The Checkbox Class. 92 | * @memberof Checkbox 93 | */ 94 | OBJECTIVELYMVC_EXPORT Class *_Checkbox(void); 95 | -------------------------------------------------------------------------------- /Sources/ObjectivelyMVC/CollectionItemView.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ObjectivelyMVC: Object oriented MVC framework for OpenGL, SDL2 and GNU C. 3 | * Copyright (C) 2014 Jay Dolan 4 | * 5 | * This software is provided 'as-is', without any express or implied 6 | * warranty. In no event will the authors be held liable for any damages 7 | * arising from the use of this software. 8 | * 9 | * Permission is granted to anyone to use this software for any purpose, 10 | * including commercial applications, and to alter it and redistribute it 11 | * freely, subject to the following restrictions: 12 | * 13 | * 1. The origin of this software must not be misrepresented; you must not 14 | * claim that you wrote the original software. If you use this software 15 | * in a product, an acknowledgment in the product documentation would be 16 | * appreciated but is not required. 17 | * 18 | * 2. Altered source versions must be plainly marked as such, and must not be 19 | * misrepresented as being the original software. 20 | * 21 | * 3. This notice may not be removed or altered from any source distribution. 22 | */ 23 | 24 | #pragma once 25 | 26 | #include 27 | #include 28 | #include 29 | 30 | /** 31 | * @file 32 | * @brief The CollectionItemView type. 33 | */ 34 | 35 | typedef struct CollectionItemView CollectionItemView; 36 | typedef struct CollectionItemViewInterface CollectionItemViewInterface; 37 | 38 | /** 39 | * @brief CollectionViewItems are a visual representation of an item within a CollectionView. 40 | * @extends View 41 | * @ingroup CollectionView 42 | */ 43 | struct CollectionItemView { 44 | 45 | /** 46 | * @brief The superclass. 47 | */ 48 | View view; 49 | 50 | /** 51 | * @brief The interface. 52 | * @protected 53 | */ 54 | CollectionItemViewInterface *interface; 55 | 56 | /** 57 | * @brief The ImageView. 58 | */ 59 | ImageView *imageView; 60 | 61 | /** 62 | * @brief True when this item is selected, false otherwise. 63 | */ 64 | bool isSelected; 65 | 66 | /** 67 | * @brief The View drawn over this item when it is selected. 68 | */ 69 | View *selectionOverlay; 70 | 71 | /** 72 | * @brief The text. 73 | */ 74 | Text *text; 75 | }; 76 | 77 | /** 78 | * @brief The CollectionItemView interface. 79 | */ 80 | struct CollectionItemViewInterface { 81 | 82 | /** 83 | * @brief The superclass interface. 84 | */ 85 | ViewInterface viewInterface; 86 | 87 | /** 88 | * @fn CollectionItemView *CollectionItemView::initWithFrame(CollectionItemView *self, const SDL_Rect *frame) 89 | * @brief Initializes this CollectionItemView with the specified frame. 90 | * @param self The CollectionItemView. 91 | * @param frame The frame. 92 | * @return The initialized CollectionItemView, or `NULL` on error. 93 | * @memberof CollectionItemView 94 | */ 95 | CollectionItemView *(*initWithFrame)(CollectionItemView *self, const SDL_Rect *frame); 96 | 97 | /** 98 | * @fn void CollectionItemView::setSelected(CollectionItemView *self, bool isSelected) 99 | * @brief Sets the selected state of this item. 100 | * @param self The CollectionItemView. 101 | * @param isSelected The selected state. 102 | * @remarks Subclasses may override this method to change the visual cue for selection. 103 | * @memberof CollectionItemView 104 | */ 105 | void (*setSelected)(CollectionItemView *self, bool isSelected); 106 | }; 107 | 108 | /** 109 | * @fn Class *CollectionItemView::_CollectionItemView(void) 110 | * @brief The CollectionItemView archetype. 111 | * @return The CollectionItemView Class. 112 | * @memberof CollectionItemView 113 | */ 114 | OBJECTIVELYMVC_EXPORT Class *_CollectionItemView(void); 115 | 116 | -------------------------------------------------------------------------------- /Sources/ObjectivelyMVC/Label.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ObjectivelyMVC: Object oriented MVC framework for OpenGL, SDL2 and GNU C. 3 | * Copyright (C) 2014 Jay Dolan 4 | * 5 | * This software is provided 'as-is', without any express or implied 6 | * warranty. In no event will the authors be held liable for any damages 7 | * arising from the use of this software. 8 | * 9 | * Permission is granted to anyone to use this software for any purpose, 10 | * including commercial applications, and to alter it and redistribute it 11 | * freely, subject to the following restrictions: 12 | * 13 | * 1. The origin of this software must not be misrepresented; you must not 14 | * claim that you wrote the original software. If you use this software 15 | * in a product, an acknowledgment in the product documentation would be 16 | * appreciated but is not required. 17 | * 18 | * 2. Altered source versions must be plainly marked as such, and must not be 19 | * misrepresented as being the original software. 20 | * 21 | * 3. This notice may not be removed or altered from any source distribution. 22 | */ 23 | 24 | #pragma once 25 | 26 | #include 27 | 28 | /** 29 | * @file 30 | * @brief The Label type. 31 | */ 32 | 33 | typedef struct Label Label; 34 | typedef struct LabelInterface LabelInterface; 35 | 36 | /** 37 | * @brief Labels provide a configurable container for Text. 38 | * @extends View 39 | */ 40 | struct Label { 41 | 42 | /** 43 | * @brief The superclass. 44 | */ 45 | View view; 46 | 47 | /** 48 | * @brief The interface. 49 | * @protected 50 | */ 51 | LabelInterface *interface; 52 | 53 | /** 54 | * @brief The Label Text. 55 | */ 56 | Text *text; 57 | }; 58 | 59 | /** 60 | * @brief The Label interface. 61 | */ 62 | struct LabelInterface { 63 | 64 | /** 65 | * @brief The superclass interface. 66 | */ 67 | ViewInterface viewInterface; 68 | 69 | /** 70 | * @fn Label *Label::initWithText(Label *self, const char *text, Font *font) 71 | * @brief Initializes this Label with the given text and Font. 72 | * @param self The Label. 73 | * @param text The text. 74 | * @param font The Font. 75 | * @return The initialized Label, or `NULL` on error. 76 | * @memberof Label 77 | */ 78 | Label *(*initWithText)(Label *self, const char *text, Font *font); 79 | }; 80 | 81 | /** 82 | * @fn Class *Label::_Label(void) 83 | * @brief The Label archetype. 84 | * @return The Label Class. 85 | * @memberof Label 86 | */ 87 | OBJECTIVELYMVC_EXPORT Class *_Label(void); 88 | -------------------------------------------------------------------------------- /Sources/ObjectivelyMVC/Log.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ObjectivelyMVC: Object oriented MVC framework for OpenGL, SDL2 and GNU C. 3 | * Copyright (C) 2014 Jay Dolan 4 | * 5 | * This software is provided 'as-is', without any express or implied 6 | * warranty. In no event will the authors be held liable for any damages 7 | * arising from the use of this software. 8 | * 9 | * Permission is granted to anyone to use this software for any purpose, 10 | * including commercial applications, and to alter it and redistribute it 11 | * freely, subject to the following restrictions: 12 | * 13 | * 1. The origin of this software must not be misrepresented; you must not 14 | * claim that you wrote the original software. If you use this software 15 | * in a product, an acknowledgment in the product documentation would be 16 | * appreciated but is not required. 17 | * 18 | * 2. Altered source versions must be plainly marked as such, and must not be 19 | * misrepresented as being the original software. 20 | * 21 | * 3. This notice may not be removed or altered from any source distribution. 22 | */ 23 | 24 | #pragma once 25 | 26 | #include 27 | 28 | /** 29 | * @file 30 | * @brief View logging facilities via SDL_Log. 31 | */ 32 | 33 | #define LOG_CATEGORY_MVC (SDL_LOG_CATEGORY_CUSTOM + 69) 34 | 35 | #define MVC_LogSetPriority(priority) SDL_LogSetPriority(LOG_CATEGORY_MVC, priority) 36 | 37 | #define MVC_LogEnabled(priority) \ 38 | (SDL_LogGetPriority(LOG_CATEGORY_MVC) <= priority) 39 | 40 | #define MVC_LogMessage(priority, fmt, ...) \ 41 | SDL_LogMessage(LOG_CATEGORY_MVC, priority, "%s::%s "fmt, _Class()->def.name, __func__, ## __VA_ARGS__) 42 | 43 | #define MVC_LogVerbose(fmt, ...) \ 44 | SDL_LogVerbose(LOG_CATEGORY_MVC, "%s::%s: "fmt, _Class()->def.name, __func__, ## __VA_ARGS__) 45 | 46 | #define MVC_LogDebug(fmt, ...) \ 47 | SDL_LogDebug(LOG_CATEGORY_MVC, "%s::%s: "fmt, _Class()->def.name, __func__, ## __VA_ARGS__) 48 | 49 | #define MVC_LogInfo(fmt, ...) \ 50 | SDL_LogInfo(LOG_CATEGORY_MVC, "%s::%s: "fmt, _Class()->def.name, __func__, ## __VA_ARGS__) 51 | 52 | #define MVC_LogWarn(fmt, ...) \ 53 | SDL_LogWarn(LOG_CATEGORY_MVC, "%s::%s: "fmt, _Class()->def.name, __func__, ## __VA_ARGS__) 54 | 55 | #define MVC_LogError(fmt, ...) \ 56 | SDL_LogError(LOG_CATEGORY_MVC, "%s::%s: "fmt, _Class()->def.name, __func__, ## __VA_ARGS__) 57 | 58 | #define MVC_LogCritical(fmt, ...) \ 59 | SDL_LogCritical(LOG_CATEGORY_MVC, "%s::%s: "fmt, _Class()->def.name, __func__, ## __VA_ARGS__) 60 | -------------------------------------------------------------------------------- /Sources/ObjectivelyMVC/Makefile.am: -------------------------------------------------------------------------------- 1 | AUTOMAKE_OPTIONS = nostdinc 2 | AM_CPPFLAGS = -I$(top_srcdir)/Sources 3 | 4 | noinst_HEADERS = \ 5 | Config.h 6 | 7 | pkgincludedir = $(includedir)/$(PACKAGE_NAME) 8 | 9 | pkginclude_HEADERS = \ 10 | Action.h \ 11 | Box.h \ 12 | Button.h \ 13 | Checkbox.h \ 14 | CollectionItemView.h \ 15 | CollectionView.h \ 16 | Colors.h \ 17 | Control.h \ 18 | DebugViewController.h \ 19 | Font.h \ 20 | HSVColorPicker.h \ 21 | HueColorPicker.h \ 22 | Image.h \ 23 | ImageView.h \ 24 | Input.h \ 25 | Text.h \ 26 | Label.h \ 27 | Log.h \ 28 | NavigationViewController.h \ 29 | Option.h \ 30 | PageView.h \ 31 | Panel.h \ 32 | ProgressBar.h \ 33 | Renderer.h \ 34 | RGBColorPicker.h \ 35 | ScrollView.h \ 36 | Select.h \ 37 | Selector.h \ 38 | SelectorSequence.h \ 39 | SimpleSelector.h \ 40 | Slider.h \ 41 | StackView.h \ 42 | Style.h \ 43 | Stylesheet.h \ 44 | TableCellView.h \ 45 | TableColumn.h \ 46 | TableHeaderCellView.h \ 47 | TableHeaderView.h \ 48 | TableRowView.h \ 49 | TableView.h \ 50 | TabView.h \ 51 | TabViewController.h \ 52 | TabViewItem.h \ 53 | TextView.h \ 54 | Theme.h \ 55 | Types.h \ 56 | View.h \ 57 | View+JSON.h \ 58 | ViewController.h \ 59 | Warning.h \ 60 | Window.h \ 61 | WindowController.h 62 | 63 | lib_LTLIBRARIES = \ 64 | libObjectivelyMVC.la 65 | 66 | libObjectivelyMVC_la_SOURCES = \ 67 | Action.c \ 68 | Box.c \ 69 | Button.c \ 70 | Checkbox.c \ 71 | CollectionItemView.c \ 72 | CollectionView.c \ 73 | Colors.c \ 74 | Control.c \ 75 | DebugViewController.c \ 76 | Font.c \ 77 | HSVColorPicker.c \ 78 | HueColorPicker.c \ 79 | Image.c \ 80 | ImageView.c \ 81 | Input.c \ 82 | Label.c \ 83 | NavigationViewController.c \ 84 | Option.c \ 85 | PageView.c \ 86 | Panel.c \ 87 | ProgressBar.c \ 88 | Renderer.c \ 89 | RGBColorPicker.c \ 90 | ScrollView.c \ 91 | Select.c \ 92 | Selector.c \ 93 | SelectorSequence.c \ 94 | SimpleSelector.c \ 95 | Slider.c \ 96 | StackView.c \ 97 | Style.c \ 98 | Stylesheet.c \ 99 | TableCellView.c \ 100 | TableColumn.c \ 101 | TableHeaderCellView.c \ 102 | TableHeaderView.c \ 103 | TableRowView.c \ 104 | TableView.c \ 105 | TabView.c \ 106 | TabViewController.c \ 107 | TabViewItem.c \ 108 | Text.c \ 109 | TextView.c \ 110 | Theme.c \ 111 | View.c \ 112 | View+JSON.c \ 113 | ViewController.c \ 114 | Warning.c \ 115 | Window.c \ 116 | WindowController.c 117 | 118 | libObjectivelyMVC_la_CFLAGS = \ 119 | -I$(top_srcdir) \ 120 | -I$(top_srcdir)/Assets \ 121 | -I$(top_srcdir)/Sources \ 122 | @HOST_CFLAGS@ \ 123 | @OBJECTIVELY_CFLAGS@ \ 124 | @SDL2_CFLAGS@ 125 | 126 | libObjectivelyMVC_la_LDFLAGS = \ 127 | @HOST_LDFLAGS@ \ 128 | -shared 129 | 130 | libObjectivelyMVC_la_LIBADD = \ 131 | @HOST_LIBS@ \ 132 | @OBJECTIVELY_LIBS@ \ 133 | @SDL2_DLL_LIBS@ 134 | 135 | -------------------------------------------------------------------------------- /Sources/ObjectivelyMVC/Option.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ObjectivelyMVC: Object oriented MVC framework for OpenGL, SDL2 and GNU C. 3 | * Copyright (C) 2014 Jay Dolan 4 | * 5 | * This software is provided 'as-is', without any express or implied 6 | * warranty. In no event will the authors be held liable for any damages 7 | * arising from the use of this software. 8 | * 9 | * Permission is granted to anyone to use this software for any purpose, 10 | * including commercial applications, and to alter it and redistribute it 11 | * freely, subject to the following restrictions: 12 | * 13 | * 1. The origin of this software must not be misrepresented; you must not 14 | * claim that you wrote the original software. If you use this software 15 | * in a product, an acknowledgment in the product documentation would be 16 | * appreciated but is not required. 17 | * 18 | * 2. Altered source versions must be plainly marked as such, and must not be 19 | * misrepresented as being the original software. 20 | * 21 | * 3. This notice may not be removed or altered from any source distribution. 22 | */ 23 | 24 | #pragma once 25 | 26 | #include 27 | 28 | /** 29 | * @file 30 | * @brief Select Options. 31 | */ 32 | 33 | typedef struct Option Option; 34 | typedef struct OptionInterface OptionInterface; 35 | 36 | /** 37 | * @brief Select Options. 38 | * @extends View 39 | * @ingroup Controls 40 | */ 41 | struct Option { 42 | 43 | /** 44 | * @brief The superclass. 45 | */ 46 | View view; 47 | 48 | /** 49 | * @brief The interface. 50 | * @protected 51 | */ 52 | OptionInterface *interface; 53 | 54 | /** 55 | * @brief True if this Option is selected, false otherwise. 56 | */ 57 | bool isSelected; 58 | 59 | /** 60 | * @brief The title. 61 | */ 62 | Text *title; 63 | 64 | /** 65 | * @brief The value. 66 | */ 67 | ident value; 68 | }; 69 | 70 | /** 71 | * @brief The Option interface. 72 | */ 73 | struct OptionInterface { 74 | 75 | /** 76 | * @brief The superclass interface. 77 | */ 78 | ViewInterface viewInterface; 79 | 80 | /** 81 | * @fn Option *Option::initWithTitle(Option *self, const char *title, ident value) 82 | * @brief Initializes this Option with the given title and value. 83 | * @param self The Option. 84 | * @param title The title. 85 | * @param value The value. 86 | * @return The initialized Option, or `NULL` on error. 87 | * @memberof Option 88 | */ 89 | Option *(*initWithTitle)(Option *self, const char *title, ident value); 90 | 91 | /** 92 | * @fn void Option::setSelected(Option *self, bool isSelected) 93 | * @brief Sets this Option's selected state. 94 | * @param self The Option. 95 | * @param isSelected True if this Option is selected, false otherwise. 96 | * @memberof Option 97 | */ 98 | void (*setSelected)(Option *self, bool isSelected); 99 | }; 100 | 101 | /** 102 | * @fn Class *Option::_Option(void) 103 | * @brief The Option archetype. 104 | * @return The Option Class. 105 | * @memberof Option 106 | */ 107 | OBJECTIVELYMVC_EXPORT Class *_Option(void); 108 | -------------------------------------------------------------------------------- /Sources/ObjectivelyMVC/PageView.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ObjectivelyMVC: Object oriented MVC framework for OpenGL, SDL2 and GNU C. 3 | * Copyright (C) 2014 Jay Dolan 4 | * 5 | * This software is provided 'as-is', without any express or implied 6 | * warranty. In no event will the authors be held liable for any damages 7 | * arising from the use of this software. 8 | * 9 | * Permission is granted to anyone to use this software for any purpose, 10 | * including commercial applications, and to alter it and redistribute it 11 | * freely, subject to the following restrictions: 12 | * 13 | * 1. The origin of this software must not be misrepresented; you must not 14 | * claim that you wrote the original software. If you use this software 15 | * in a product, an acknowledgment in the product documentation would be 16 | * appreciated but is not required. 17 | * 18 | * 2. Altered source versions must be plainly marked as such, and must not be 19 | * misrepresented as being the original software. 20 | * 21 | * 3. This notice may not be removed or altered from any source distribution. 22 | */ 23 | 24 | #pragma once 25 | 26 | #include 27 | 28 | /** 29 | * @file 30 | * @brief PageViews manage their subviews as pages in a book. 31 | */ 32 | 33 | typedef struct PageViewDelegate PageViewDelegate; 34 | 35 | typedef struct PageView PageView; 36 | typedef struct PageViewInterface PageViewInterface; 37 | 38 | /** 39 | * @brief The PageView delegate protocol. 40 | */ 41 | struct PageViewDelegate { 42 | 43 | /** 44 | * @brief The delegate self-reference. 45 | */ 46 | ident self; 47 | 48 | /** 49 | * @brief Called when the current page is set. 50 | * @param pageView The PageView. 51 | */ 52 | void (*didSetCurrentPage)(PageView *pageView); 53 | }; 54 | 55 | /** 56 | * @brief PageViews manage their subviews as pages in a book. 57 | * @extends View 58 | * @ingroup Containers 59 | */ 60 | struct PageView { 61 | 62 | /** 63 | * @brief The superclass. 64 | */ 65 | View view; 66 | 67 | /** 68 | * @brief The interface. 69 | * @protected 70 | */ 71 | PageViewInterface *interface; 72 | 73 | /** 74 | * @brief The index of the current page. 75 | */ 76 | View *currentPage; 77 | 78 | /** 79 | * @brief The delegate. 80 | */ 81 | PageViewDelegate delegate; 82 | }; 83 | 84 | /** 85 | * @brief The PageView interface. 86 | */ 87 | struct PageViewInterface { 88 | 89 | /** 90 | * @brief The superclass interface. 91 | */ 92 | ViewInterface viewInterface; 93 | 94 | /** 95 | * @fn PageView *PageView::initWithFrame(PageView *self, const SDL_Rect *frame) 96 | * @brief Initializes this PageView with the specified frame. 97 | * @param self The PageView. 98 | * @param frame The frame. 99 | * @return The initialized PageView, or `NULL` on error. 100 | * @memberof PageView 101 | */ 102 | PageView *(*initWithFrame)(PageView *self, const SDL_Rect *frame); 103 | 104 | /** 105 | * @fn void PageView::setCurrentPage(PageView *self, View *currentPage) 106 | * @brief Presents the specified subview as the current page of this PageView. 107 | * @param self The PageView. 108 | * @param currentPage The subview to present. 109 | * @memberof PageView 110 | */ 111 | void (*setCurrentPage)(PageView *self, View *currentPage); 112 | }; 113 | 114 | /** 115 | * @fn Class *PageView::_PageView(void) 116 | * @brief The PageView archetype. 117 | * @return The PageView Class. 118 | * @memberof PageView 119 | */ 120 | OBJECTIVELYMVC_EXPORT Class *_PageView(void); 121 | -------------------------------------------------------------------------------- /Sources/ObjectivelyMVC/SimpleSelector.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ObjectivelyMVC: Object oriented MVC framework for OpenGL, SDL2 and GNU C. 3 | * Copyright (C) 2014 Jay Dolan 4 | * 5 | * This software is provided 'as-is', without any express or implied 6 | * warranty. In no event will the authors be held liable for any damages 7 | * arising from the use of this software. 8 | * 9 | * Permission is granted to anyone to use this software for any purpose, 10 | * including commercial applications, and to alter it and redistribute it 11 | * freely, subject to the following restrictions: 12 | * 13 | * 1. The origin of this software must not be misrepresented; you must not 14 | * claim that you wrote the original software. If you use this software 15 | * in a product, an acknowledgment in the product documentation would be 16 | * appreciated but is not required. 17 | * 18 | * 2. Altered source versions must be plainly marked as such, and must not be 19 | * misrepresented as being the original software. 20 | * 21 | * 3. This notice may not be removed or altered from any source distribution. 22 | */ 23 | 24 | #pragma once 25 | 26 | #include 27 | 28 | #include 29 | 30 | /** 31 | * @file 32 | * @brief The SimpleSelector type. 33 | */ 34 | 35 | /** 36 | * @brief The types of SimpleSelectors. 37 | */ 38 | typedef enum { 39 | SimpleSelectorTypeNone, 40 | SimpleSelectorTypeUniversal, 41 | SimpleSelectorTypeType, 42 | SimpleSelectorTypeClass, 43 | SimpleSelectorTypeId, 44 | SimpleSelectorTypePseudo 45 | } SimpleSelectorType; 46 | 47 | typedef struct SimpleSelector SimpleSelector; 48 | typedef struct SimpleSelectorInterface SimpleSelectorInterface; 49 | 50 | /** 51 | * @brief The SimpleSelector type. 52 | * @extends Object 53 | * @ingroup Theme 54 | */ 55 | struct SimpleSelector { 56 | 57 | /** 58 | * @brief The superclass. 59 | */ 60 | Object object; 61 | 62 | /** 63 | * @brief The interface. 64 | * @protected 65 | */ 66 | SimpleSelectorInterface *interface; 67 | 68 | /** 69 | * @brief The pattern, as provided by the user. 70 | */ 71 | char *pattern; 72 | 73 | /** 74 | * @brief The SimpleSelectorType. 75 | */ 76 | SimpleSelectorType type; 77 | }; 78 | 79 | /** 80 | * @brief The SimpleSelector interface. 81 | */ 82 | struct SimpleSelectorInterface { 83 | 84 | /** 85 | * @brief The superclass interface. 86 | */ 87 | ObjectInterface objectInterface; 88 | 89 | /** 90 | * @fn SimpleSelector *SimpleSelector::initWithPattern(SimpleSelector *self, const char *pattern) 91 | * @brief Initializes this SimpleSelector. 92 | * @param self The SimpleSelector. 93 | * @param pattern The pattern. 94 | * @return The initialized SimpleSelector, or `NULL` on error. 95 | * @memberof SimpleSelector 96 | */ 97 | SimpleSelector *(*initWithPattern)(SimpleSelector *self, const char *pattern); 98 | 99 | /** 100 | * @static 101 | * @fn Array *SimpleSelector::parse(const char *sequence) 102 | * @param sequence A C-string specifying a sequence of SimpleSelectors. 103 | * @return The parsed SimpleSelectors. 104 | * @memberof SimpleSelector 105 | */ 106 | Array *(*parse)(const char *sequence); 107 | }; 108 | 109 | /** 110 | * @fn Class *SimpleSelector::_SimpleSelector(void) 111 | * @brief The SimpleSelector archetype. 112 | * @return The SimpleSelector Class. 113 | * @memberof SimpleSelector 114 | */ 115 | OBJECTIVELYMVC_EXPORT Class *_SimpleSelector(void); 116 | -------------------------------------------------------------------------------- /Sources/ObjectivelyMVC/StackView.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ObjectivelyMVC: Object oriented MVC framework for OpenGL, SDL2 and GNU C. 3 | * Copyright (C) 2014 Jay Dolan 4 | * 5 | * This software is provided 'as-is', without any express or implied 6 | * warranty. In no event will the authors be held liable for any damages 7 | * arising from the use of this software. 8 | * 9 | * Permission is granted to anyone to use this software for any purpose, 10 | * including commercial applications, and to alter it and redistribute it 11 | * freely, subject to the following restrictions: 12 | * 13 | * 1. The origin of this software must not be misrepresented; you must not 14 | * claim that you wrote the original software. If you use this software 15 | * in a product, an acknowledgment in the product documentation would be 16 | * appreciated but is not required. 17 | * 18 | * 2. Altered source versions must be plainly marked as such, and must not be 19 | * misrepresented as being the original software. 20 | * 21 | * 3. This notice may not be removed or altered from any source distribution. 22 | */ 23 | 24 | #pragma once 25 | 26 | #include 27 | 28 | /** 29 | * @file 30 | * @brief StackViews are containers that manage the arrangement of their subviews. 31 | */ 32 | 33 | /** 34 | * @defgroup Containers Containers 35 | * @brief Containers allow for grouping and positioning of related Views. 36 | * @remarks All containers have a default `autoResizingMask` of ViewAutoResizingContain. 37 | */ 38 | 39 | /** 40 | * @brief Axis constants for specifying a StackView's primary layout direction. 41 | */ 42 | typedef enum { 43 | StackViewAxisVertical, 44 | StackViewAxisHorizontal 45 | } StackViewAxis; 46 | 47 | OBJECTIVELYMVC_EXPORT const EnumName StackViewAxisNames[]; 48 | 49 | /** 50 | * @brief Distribution models for filling a StackView's frame. 51 | */ 52 | typedef enum { 53 | StackViewDistributionDefault, 54 | StackViewDistributionFill, 55 | StackViewDistributionFillEqually, 56 | } StackViewDistribution; 57 | 58 | OBJECTIVELYMVC_EXPORT const EnumName StackViewDistributionNames[]; 59 | 60 | typedef struct StackView StackView; 61 | typedef struct StackViewInterface StackViewInterface; 62 | 63 | /** 64 | * @brief StackViews are containers that manage the arrangement of their subviews. 65 | * @extends View 66 | * @ingroup Containers 67 | */ 68 | struct StackView { 69 | 70 | /** 71 | * @brief The superclass. 72 | */ 73 | View view; 74 | 75 | /** 76 | * @brief The interface. 77 | * @protected 78 | */ 79 | StackViewInterface *interface; 80 | 81 | /** 82 | * @brief The axis. 83 | */ 84 | StackViewAxis axis; 85 | 86 | /** 87 | * @brief The distribution. 88 | */ 89 | StackViewDistribution distribution; 90 | 91 | /** 92 | * @brief The subview spacing. 93 | */ 94 | int spacing; 95 | }; 96 | 97 | /** 98 | * @brief The StackView interface. 99 | */ 100 | struct StackViewInterface { 101 | 102 | /** 103 | * @brief The superclass interface. 104 | */ 105 | ViewInterface viewInterface; 106 | 107 | /** 108 | * @fn StackView *StackView::initWithFrame(StackView *self, const SDL_Rect *frame) 109 | * @brief Initializes this StackView with the specified frame. 110 | * @param self The StackView. 111 | * @param frame The frame. 112 | * @return The initialized StackView, or `NULL` on error. 113 | * @memberof StackView 114 | */ 115 | StackView *(*initWithFrame)(StackView *self, const SDL_Rect *frame); 116 | }; 117 | 118 | /** 119 | * @fn Class *StackView::_StackView(void) 120 | * @brief The StackView archetype. 121 | * @return The StackView Class. 122 | * @memberof StackView 123 | */ 124 | OBJECTIVELYMVC_EXPORT Class *_StackView(void); 125 | -------------------------------------------------------------------------------- /Sources/ObjectivelyMVC/TabViewController.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ObjectivelyMVC: Object oriented MVC framework for OpenGL, SDL2 and GNU C. 3 | * Copyright (C) 2014 Jay Dolan 4 | * 5 | * This software is provided 'as-is', without any express or implied 6 | * warranty. In no event will the authors be held liable for any damages 7 | * arising from the use of this software. 8 | * 9 | * Permission is granted to anyone to use this software for any purpose, 10 | * including commercial applications, and to alter it and redistribute it 11 | * freely, subject to the following restrictions: 12 | * 13 | * 1. The origin of this software must not be misrepresented; you must not 14 | * claim that you wrote the original software. If you use this software 15 | * in a product, an acknowledgment in the product documentation would be 16 | * appreciated but is not required. 17 | * 18 | * 2. Altered source versions must be plainly marked as such, and must not be 19 | * misrepresented as being the original software. 20 | * 21 | * 3. This notice may not be removed or altered from any source distribution. 22 | */ 23 | 24 | #pragma once 25 | 26 | #include 27 | #include 28 | #include 29 | 30 | /** 31 | * @file 32 | * @brief TabViewControllers arrange and manage their child ViewControllers in a tab view interface. 33 | */ 34 | 35 | typedef struct TabViewController TabViewController; 36 | typedef struct TabViewControllerInterface TabViewControllerInterface; 37 | 38 | /** 39 | * @brief TabViewControllers arrange and manage their child ViewControllers in a tab view interface. 40 | * @details Tabs are added to the tab view interface by adding child ViewControllers to a 41 | * TabViewController. 42 | * @extends ViewController 43 | * @ingroup ViewControllers 44 | */ 45 | struct TabViewController { 46 | 47 | /** 48 | * @brief The superclass. 49 | */ 50 | ViewController viewController; 51 | 52 | /** 53 | * @brief The interface. 54 | * @protected 55 | */ 56 | TabViewControllerInterface *interface; 57 | 58 | /** 59 | * @brief The TabView. 60 | */ 61 | TabView *tabView; 62 | }; 63 | 64 | /** 65 | * @brief The TabViewController interface. 66 | */ 67 | struct TabViewControllerInterface { 68 | 69 | /** 70 | * @brief The superclass interface. 71 | */ 72 | ViewControllerInterface viewControllerInterface; 73 | 74 | /** 75 | * @fn TabViewController *TabViewController::init(TabViewController *self) 76 | * @brief Initializes this TabViewController. 77 | * @param self The TabViewController. 78 | * @return The initialized TabViewController, or `NULL` on error. 79 | * @memberof TabViewController 80 | */ 81 | TabViewController *(*init)(TabViewController *self); 82 | 83 | /** 84 | * @fn TabViewItem *TabViewController::tabForViewController(const TabViewController *self, const ViewController *viewController) 85 | * @brief Returns the TabViewItem for the specified child ViewController, or `NULL`. 86 | * @param self The TabViewController. 87 | * @param viewController The child ViewController. 88 | * @return The TabViewItem associated with the specified child ViewController. 89 | * @memberof TabViewController 90 | */ 91 | TabViewItem *(*tabForViewController)(const TabViewController *self, const ViewController *viewController); 92 | }; 93 | 94 | /** 95 | * @fn Class *TabViewController::_TabViewController(void) 96 | * @brief The TabViewController archetype. 97 | * @return The TabViewController Class. 98 | * @memberof TabViewController 99 | */ 100 | OBJECTIVELYMVC_EXPORT Class *_TabViewController(void); 101 | -------------------------------------------------------------------------------- /Sources/ObjectivelyMVC/TableCellView.c: -------------------------------------------------------------------------------- 1 | /* 2 | * ObjectivelyMVC: Object oriented MVC framework for OpenGL, SDL2 and GNU C. 3 | * Copyright (C) 2014 Jay Dolan 4 | * 5 | * This software is provided 'as-is', without any express or implied 6 | * warranty. In no event will the authors be held liable for any damages 7 | * arising from the use of this software. 8 | * 9 | * Permission is granted to anyone to use this software for any purpose, 10 | * including commercial applications, and to alter it and redistribute it 11 | * freely, subject to the following restrictions: 12 | * 13 | * 1. The origin of this software must not be misrepresented; you must not 14 | * claim that you wrote the original software. If you use this software 15 | * in a product, an acknowledgment in the product documentation would be 16 | * appreciated but is not required. 17 | * 18 | * 2. Altered source versions must be plainly marked as such, and must not be 19 | * misrepresented as being the original software. 20 | * 21 | * 3. This notice may not be removed or altered from any source distribution. 22 | */ 23 | 24 | #include 25 | 26 | #include "TableCellView.h" 27 | 28 | #define _Class _TableCellView 29 | 30 | #pragma mark - Object 31 | 32 | /** 33 | * @see Object::dealloc(Object *) 34 | */ 35 | static void dealloc(Object *self) { 36 | 37 | TableCellView *this = (TableCellView *) self; 38 | 39 | release(this->text); 40 | 41 | super(Object, self, dealloc); 42 | } 43 | 44 | #pragma mark - TableCellView 45 | 46 | /** 47 | * @fn TableCellView *TableCellView::initWithFrame(TableCellView *self, const SDL_Rect *frame) 48 | * @memberof TableCellView 49 | */ 50 | static TableCellView *initWithFrame(TableCellView *self, const SDL_Rect *frame) { 51 | 52 | self = (TableCellView *) super(View, self, initWithFrame, frame); 53 | if (self) { 54 | self->text = $(alloc(Text), initWithText, NULL, NULL); 55 | assert(self->text); 56 | 57 | $((View *) self, addSubview, (View *) self->text); 58 | } 59 | 60 | return self; 61 | } 62 | 63 | #pragma mark - Class lifecycle 64 | 65 | /** 66 | * @see Class::initialize(Class *) 67 | */ 68 | static void initialize(Class *clazz) { 69 | 70 | ((ObjectInterface *) clazz->interface)->dealloc = dealloc; 71 | 72 | ((TableCellViewInterface *) clazz->interface)->initWithFrame = initWithFrame; 73 | } 74 | 75 | /** 76 | * @fn Class *TableCellView::_TableCellView(void) 77 | * @memberof TableCellView 78 | */ 79 | Class *_TableCellView(void) { 80 | static Class *clazz; 81 | static Once once; 82 | 83 | do_once(&once, { 84 | clazz = _initialize(&(const ClassDef) { 85 | .name = "TableCellView", 86 | .superclass = _View(), 87 | .instanceSize = sizeof(TableCellView), 88 | .interfaceOffset = offsetof(TableCellView, interface), 89 | .interfaceSize = sizeof(TableCellViewInterface), 90 | .initialize = initialize, 91 | }); 92 | }); 93 | 94 | return clazz; 95 | } 96 | 97 | #undef _Class 98 | 99 | -------------------------------------------------------------------------------- /Sources/ObjectivelyMVC/TableCellView.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ObjectivelyMVC: Object oriented MVC framework for OpenGL, SDL2 and GNU C. 3 | * Copyright (C) 2014 Jay Dolan 4 | * 5 | * This software is provided 'as-is', without any express or implied 6 | * warranty. In no event will the authors be held liable for any damages 7 | * arising from the use of this software. 8 | * 9 | * Permission is granted to anyone to use this software for any purpose, 10 | * including commercial applications, and to alter it and redistribute it 11 | * freely, subject to the following restrictions: 12 | * 13 | * 1. The origin of this software must not be misrepresented; you must not 14 | * claim that you wrote the original software. If you use this software 15 | * in a product, an acknowledgment in the product documentation would be 16 | * appreciated but is not required. 17 | * 18 | * 2. Altered source versions must be plainly marked as such, and must not be 19 | * misrepresented as being the original software. 20 | * 21 | * 3. This notice may not be removed or altered from any source distribution. 22 | */ 23 | 24 | #pragma once 25 | 26 | #include 27 | 28 | /** 29 | * @file 30 | * @brief Each row in a TableView is comprised of TableCellViews. 31 | */ 32 | 33 | typedef struct TableCellView TableCellView; 34 | typedef struct TableCellViewInterface TableCellViewInterface; 35 | 36 | /** 37 | * @brief Each row in a TableView is comprised of TableCellViews. 38 | * @extends View 39 | * @ingroup Tables 40 | */ 41 | struct TableCellView { 42 | 43 | /** 44 | * @brief The superclass. 45 | */ 46 | View view; 47 | 48 | /** 49 | * @brief The interface. 50 | * @protected 51 | */ 52 | TableCellViewInterface *interface; 53 | 54 | /** 55 | * @brief The text. 56 | */ 57 | Text *text; 58 | }; 59 | 60 | /** 61 | * @brief The TableCellView interface. 62 | */ 63 | struct TableCellViewInterface { 64 | 65 | /** 66 | * @brief The superclass interface. 67 | */ 68 | ViewInterface viewInterface; 69 | 70 | /** 71 | * @fn TableCellView *TableCellView::initWithFrame(TableCellView *self, const SDL_Rect *frame) 72 | * @brief Initializes this TableCellView with the specified frame. 73 | * @param self The TableCellView. 74 | * @param frame The frame. 75 | * @return The initialized TableCellView, or `NULL` on error. 76 | * @memberof TableCellView 77 | */ 78 | TableCellView *(*initWithFrame)(TableCellView *self, const SDL_Rect *frame); 79 | }; 80 | 81 | /** 82 | * @fn Class *TableCellView::_TableCellView(void) 83 | * @brief The TableCellView archetype. 84 | * @return The TableCellView Class. 85 | * @memberof TableCellView 86 | */ 87 | OBJECTIVELYMVC_EXPORT Class *_TableCellView(void); 88 | -------------------------------------------------------------------------------- /Sources/ObjectivelyMVC/TableColumn.c: -------------------------------------------------------------------------------- 1 | /* 2 | * ObjectivelyMVC: Object oriented MVC framework for OpenGL, SDL2 and GNU C. 3 | * Copyright (C) 2014 Jay Dolan 4 | * 5 | * This software is provided 'as-is', without any express or implied 6 | * warranty. In no event will the authors be held liable for any damages 7 | * arising from the use of this software. 8 | * 9 | * Permission is granted to anyone to use this software for any purpose, 10 | * including commercial applications, and to alter it and redistribute it 11 | * freely, subject to the following restrictions: 12 | * 13 | * 1. The origin of this software must not be misrepresented; you must not 14 | * claim that you wrote the original software. If you use this software 15 | * in a product, an acknowledgment in the product documentation would be 16 | * appreciated but is not required. 17 | * 18 | * 2. Altered source versions must be plainly marked as such, and must not be 19 | * misrepresented as being the original software. 20 | * 21 | * 3. This notice may not be removed or altered from any source distribution. 22 | */ 23 | 24 | #include 25 | #include 26 | #include 27 | 28 | #include 29 | 30 | #include "TableColumn.h" 31 | 32 | #define _Class _TableColumn 33 | 34 | #pragma mark - Object 35 | 36 | /** 37 | * @see Object::dealloc(Object *) 38 | */ 39 | static void dealloc(Object *self) { 40 | 41 | TableColumn *this = (TableColumn *) self; 42 | 43 | release(this->headerCell); 44 | 45 | free(this->identifier); 46 | 47 | super(Object, self, dealloc); 48 | } 49 | 50 | #pragma mark - TableColumn 51 | 52 | /** 53 | * @fn TableColumn *TableColumn::init(TableColumn *self) 54 | * @memberof TableColumn 55 | */ 56 | static TableColumn *initWithIdentifier(TableColumn *self, const char *identifier) { 57 | 58 | self = (TableColumn *) super(Object, self, init); 59 | if (self) { 60 | 61 | self->headerCell = $(alloc(TableHeaderCellView), initWithFrame, NULL); 62 | assert(self->headerCell); 63 | 64 | self->identifier = strdup(identifier); 65 | assert(self->identifier); 66 | 67 | self->headerCell->tableCellView.view.identifier = strdup(self->identifier); 68 | 69 | $(((TableCellView *) self->headerCell)->text, setText, self->identifier); 70 | } 71 | 72 | return self; 73 | } 74 | 75 | #pragma mark - Class lifecycle 76 | 77 | /** 78 | * @see Class::initialize(Class *) 79 | */ 80 | static void initialize(Class *clazz) { 81 | 82 | ((ObjectInterface *) clazz->interface)->dealloc = dealloc; 83 | 84 | ((TableColumnInterface *) clazz->interface)->initWithIdentifier = initWithIdentifier; 85 | } 86 | 87 | /** 88 | * @fn Class *TableColumn::_TableColumn(void) 89 | * @memberof TableColumn 90 | */ 91 | Class *_TableColumn(void) { 92 | static Class *clazz; 93 | static Once once; 94 | 95 | do_once(&once, { 96 | clazz = _initialize(&(const ClassDef) { 97 | .name = "TableColumn", 98 | .superclass = _Object(), 99 | .instanceSize = sizeof(TableColumn), 100 | .interfaceOffset = offsetof(TableColumn, interface), 101 | .interfaceSize = sizeof(TableColumnInterface), 102 | .initialize = initialize, 103 | }); 104 | }); 105 | 106 | return clazz; 107 | } 108 | 109 | #undef _Class 110 | 111 | -------------------------------------------------------------------------------- /Sources/ObjectivelyMVC/TableColumn.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ObjectivelyMVC: Object oriented MVC framework for OpenGL, SDL2 and GNU C. 3 | * Copyright (C) 2014 Jay Dolan 4 | * 5 | * This software is provided 'as-is', without any express or implied 6 | * warranty. In no event will the authors be held liable for any damages 7 | * arising from the use of this software. 8 | * 9 | * Permission is granted to anyone to use this software for any purpose, 10 | * including commercial applications, and to alter it and redistribute it 11 | * freely, subject to the following restrictions: 12 | * 13 | * 1. The origin of this software must not be misrepresented; you must not 14 | * claim that you wrote the original software. If you use this software 15 | * in a product, an acknowledgment in the product documentation would be 16 | * appreciated but is not required. 17 | * 18 | * 2. Altered source versions must be plainly marked as such, and must not be 19 | * misrepresented as being the original software. 20 | * 21 | * 3. This notice may not be removed or altered from any source distribution. 22 | */ 23 | 24 | #pragma once 25 | 26 | #include 27 | 28 | #include 29 | 30 | /** 31 | * @file 32 | * @brief Columns for TableViews. 33 | */ 34 | 35 | #define DEFAULT_TABLE_COLUMN_WIDTH 100 36 | 37 | typedef struct TableColumn TableColumn; 38 | typedef struct TableColumnInterface TableColumnInterface; 39 | 40 | /** 41 | * @brief Columns provide alignment, spacing and sorting hints for TableView instances. 42 | * @extends Object 43 | * @ingroup Tables 44 | */ 45 | struct TableColumn { 46 | 47 | /** 48 | * @brief The superclass. 49 | */ 50 | Object object; 51 | 52 | /** 53 | * @brief The interface. 54 | * @protected 55 | */ 56 | TableColumnInterface *interface; 57 | 58 | /** 59 | * @brief The header cell. 60 | */ 61 | TableHeaderCellView *headerCell; 62 | 63 | /** 64 | * @brief The identifier. 65 | */ 66 | char *identifier; 67 | 68 | /** 69 | * @brief The sort order. 70 | */ 71 | Order order; 72 | }; 73 | 74 | /** 75 | * @brief The TableColumn interface. 76 | */ 77 | struct TableColumnInterface { 78 | 79 | /** 80 | * @brief The superclass interface. 81 | */ 82 | ObjectInterface objectInterface; 83 | 84 | /** 85 | * @fn TableColumn *TableColumn::initWithIdentifier(TableColumn *self, const char *identifier) 86 | * @brief Initializes this TableColumn with the given identifier. 87 | * @param self The TableColumn. 88 | * @param identifier The column identifier. 89 | * @return The initialized TableColumn, or `NULL` on error. 90 | * @memberof TableColumn 91 | */ 92 | TableColumn *(*initWithIdentifier)(TableColumn *self, const char *identifier); 93 | }; 94 | 95 | /** 96 | * @fn Class *TableColumn::_TableColumn(void) 97 | * @brief The TableColumn archetype. 98 | * @return The TableColumn Class. 99 | * @memberof TableColumn 100 | */ 101 | OBJECTIVELYMVC_EXPORT Class *_TableColumn(void); 102 | -------------------------------------------------------------------------------- /Sources/ObjectivelyMVC/TableHeaderCellView.c: -------------------------------------------------------------------------------- 1 | /* 2 | * ObjectivelyMVC: Object oriented MVC framework for OpenGL, SDL2 and GNU C. 3 | * Copyright (C) 2014 Jay Dolan 4 | * 5 | * This software is provided 'as-is', without any express or implied 6 | * warranty. In no event will the authors be held liable for any damages 7 | * arising from the use of this software. 8 | * 9 | * Permission is granted to anyone to use this software for any purpose, 10 | * including commercial applications, and to alter it and redistribute it 11 | * freely, subject to the following restrictions: 12 | * 13 | * 1. The origin of this software must not be misrepresented; you must not 14 | * claim that you wrote the original software. If you use this software 15 | * in a product, an acknowledgment in the product documentation would be 16 | * appreciated but is not required. 17 | * 18 | * 2. Altered source versions must be plainly marked as such, and must not be 19 | * misrepresented as being the original software. 20 | * 21 | * 3. This notice may not be removed or altered from any source distribution. 22 | */ 23 | 24 | #include 25 | 26 | #include "TableHeaderCellView.h" 27 | 28 | #define _Class _TableHeaderCellView 29 | 30 | #pragma mark - TableHeaderCellView 31 | 32 | /** 33 | * @fn TableHeaderCellView *TableHeaderCellView::initWithFrame(TableHeaderCellView *self, const SDL_Rect *frame) 34 | * @memberof TableHeaderCellView 35 | */ 36 | static TableHeaderCellView *initWithFrame(TableHeaderCellView *self, const SDL_Rect *frame) { 37 | return (TableHeaderCellView *) super(TableCellView, self, initWithFrame, frame); 38 | } 39 | 40 | #pragma mark - Class lifecycle 41 | 42 | /** 43 | * @see Class::initialize(Class *) 44 | */ 45 | static void initialize(Class *clazz) { 46 | ((TableHeaderCellViewInterface *) clazz->interface)->initWithFrame = initWithFrame; 47 | } 48 | 49 | /** 50 | * @fn Class *TableHeaderCellView::_TableHeaderCellView(void) 51 | * @memberof TableHeaderCellView 52 | */ 53 | Class *_TableHeaderCellView(void) { 54 | static Class *clazz; 55 | static Once once; 56 | 57 | do_once(&once, { 58 | clazz = _initialize(&(const ClassDef) { 59 | .name = "TableHeaderCellView", 60 | .superclass = _TableCellView(), 61 | .instanceSize = sizeof(TableHeaderCellView), 62 | .interfaceOffset = offsetof(TableHeaderCellView, interface), 63 | .interfaceSize = sizeof(TableHeaderCellViewInterface), 64 | .initialize = initialize, 65 | }); 66 | }); 67 | 68 | return clazz; 69 | } 70 | 71 | #undef _Class 72 | 73 | -------------------------------------------------------------------------------- /Sources/ObjectivelyMVC/TableHeaderCellView.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ObjectivelyMVC: Object oriented MVC framework for OpenGL, SDL2 and GNU C. 3 | * Copyright (C) 2014 Jay Dolan 4 | * 5 | * This software is provided 'as-is', without any express or implied 6 | * warranty. In no event will the authors be held liable for any damages 7 | * arising from the use of this software. 8 | * 9 | * Permission is granted to anyone to use this software for any purpose, 10 | * including commercial applications, and to alter it and redistribute it 11 | * freely, subject to the following restrictions: 12 | * 13 | * 1. The origin of this software must not be misrepresented; you must not 14 | * claim that you wrote the original software. If you use this software 15 | * in a product, an acknowledgment in the product documentation would be 16 | * appreciated but is not required. 17 | * 18 | * 2. Altered source versions must be plainly marked as such, and must not be 19 | * misrepresented as being the original software. 20 | * 21 | * 3. This notice may not be removed or altered from any source distribution. 22 | */ 23 | 24 | #pragma once 25 | 26 | #include 27 | 28 | /** 29 | * @file 30 | * @brief Header cells for TableViews. 31 | */ 32 | 33 | typedef struct TableHeaderCellView TableHeaderCellView; 34 | typedef struct TableHeaderCellViewInterface TableHeaderCellViewInterface; 35 | 36 | /** 37 | * @brief Header cells provide clickable sort handles for TableView instances. 38 | * @extends TableCellView 39 | * @ingroup Tables 40 | */ 41 | struct TableHeaderCellView { 42 | 43 | /** 44 | * @brief The superclass. 45 | */ 46 | TableCellView tableCellView; 47 | 48 | /** 49 | * @brief The interface. 50 | * @protected 51 | */ 52 | TableHeaderCellViewInterface *interface; 53 | }; 54 | 55 | /** 56 | * @brief The TableHeaderCellView interface. 57 | */ 58 | struct TableHeaderCellViewInterface { 59 | 60 | /** 61 | * @brief The superclass interface. 62 | */ 63 | TableCellViewInterface tableCellViewInterface; 64 | 65 | /** 66 | * @fn TableHeaderCellView *TableHeaderCellView::initWithFrame(TableHeaderCellView *self, const SDL_Rect *frame) 67 | * @brief Initializes this TableHeaderCellView with the specified frame. 68 | * @param self The TableHeaderCellView. 69 | * @param frame The frame. 70 | * @return The initialized TableHeaderCellView, or `NULL` on error. 71 | * @memberof TableHeaderCellView 72 | */ 73 | TableHeaderCellView *(*initWithFrame)(TableHeaderCellView *self, const SDL_Rect *frame); 74 | }; 75 | 76 | /** 77 | * @fn Class *TableHeaderCellView::_TableHeaderCellView(void) 78 | * @brief The TableHeaderCellView archetype. 79 | * @return The TableHeaderCellView Class. 80 | * @memberof TableHeaderCellView 81 | */ 82 | OBJECTIVELYMVC_EXPORT Class *_TableHeaderCellView(void); 83 | 84 | -------------------------------------------------------------------------------- /Sources/ObjectivelyMVC/TableHeaderView.c: -------------------------------------------------------------------------------- 1 | /* 2 | * ObjectivelyMVC: Object oriented MVC framework for OpenGL, SDL2 and GNU C. 3 | * Copyright (C) 2014 Jay Dolan 4 | * 5 | * This software is provided 'as-is', without any express or implied 6 | * warranty. In no event will the authors be held liable for any damages 7 | * arising from the use of this software. 8 | * 9 | * Permission is granted to anyone to use this software for any purpose, 10 | * including commercial applications, and to alter it and redistribute it 11 | * freely, subject to the following restrictions: 12 | * 13 | * 1. The origin of this software must not be misrepresented; you must not 14 | * claim that you wrote the original software. If you use this software 15 | * in a product, an acknowledgment in the product documentation would be 16 | * appreciated but is not required. 17 | * 18 | * 2. Altered source versions must be plainly marked as such, and must not be 19 | * misrepresented as being the original software. 20 | * 21 | * 3. This notice may not be removed or altered from any source distribution. 22 | */ 23 | 24 | #include 25 | 26 | #include "TableHeaderView.h" 27 | 28 | #define _Class _TableHeaderView 29 | 30 | #pragma mark - View 31 | 32 | /** 33 | * @see View::render(View *, Renderer *) 34 | */ 35 | static void render(View *self, Renderer *renderer) { 36 | 37 | super(View, self, render, renderer); 38 | 39 | const SDL_Rect frame = $(self, renderFrame); 40 | 41 | $(renderer, setDrawColor, &self->borderColor); 42 | 43 | SDL_Point points[2]; 44 | 45 | points[0].x = frame.x; 46 | points[0].y = frame.y + frame.h; 47 | 48 | points[1].x = frame.x + frame.w; 49 | points[1].y = frame.y + frame.h; 50 | 51 | $(renderer, drawLine, points); 52 | 53 | $(renderer, setDrawColor, &Colors.White); 54 | } 55 | 56 | #pragma mark - TableHeaderView 57 | 58 | /** 59 | * @fn TableHeaderView *TableHeaderView::initWithTableView(TableHeaderView *self, TableView *tableView) 60 | * @memberof TableHeaderView 61 | */ 62 | static TableHeaderView *initWithTableView(TableHeaderView *self, TableView *tableView) { 63 | return (TableHeaderView *) super(TableRowView, self, initWithTableView, tableView); 64 | } 65 | 66 | #pragma mark - Class lifecycle 67 | 68 | /** 69 | * @see Class::initialize(Class *) 70 | */ 71 | static void initialize(Class *clazz) { 72 | 73 | ((ViewInterface *) clazz->interface)->render = render; 74 | 75 | ((TableHeaderViewInterface *) clazz->interface)->initWithTableView = initWithTableView; 76 | } 77 | 78 | /** 79 | * @fn Class *TableHeaderView::_TableHeaderView(void) 80 | * @memberof TableHeaderView 81 | */ 82 | Class *_TableHeaderView(void) { 83 | static Class *clazz; 84 | static Once once; 85 | 86 | do_once(&once, { 87 | clazz = _initialize(&(const ClassDef) { 88 | .name = "TableHeaderView", 89 | .superclass = _TableRowView(), 90 | .instanceSize = sizeof(TableHeaderView), 91 | .interfaceOffset = offsetof(TableHeaderView, interface), 92 | .interfaceSize = sizeof(TableHeaderViewInterface), 93 | .initialize = initialize, 94 | }); 95 | }); 96 | 97 | return clazz; 98 | } 99 | 100 | #undef _Class 101 | 102 | -------------------------------------------------------------------------------- /Sources/ObjectivelyMVC/TableHeaderView.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ObjectivelyMVC: Object oriented MVC framework for OpenGL, SDL2 and GNU C. 3 | * Copyright (C) 2014 Jay Dolan 4 | * 5 | * This software is provided 'as-is', without any express or implied 6 | * warranty. In no event will the authors be held liable for any damages 7 | * arising from the use of this software. 8 | * 9 | * Permission is granted to anyone to use this software for any purpose, 10 | * including commercial applications, and to alter it and redistribute it 11 | * freely, subject to the following restrictions: 12 | * 13 | * 1. The origin of this software must not be misrepresented; you must not 14 | * claim that you wrote the original software. If you use this software 15 | * in a product, an acknowledgment in the product documentation would be 16 | * appreciated but is not required. 17 | * 18 | * 2. Altered source versions must be plainly marked as such, and must not be 19 | * misrepresented as being the original software. 20 | * 21 | * 3. This notice may not be removed or altered from any source distribution. 22 | */ 23 | 24 | #pragma once 25 | 26 | #include 27 | 28 | /** 29 | * @file 30 | * @brief Header rows for TableViews. 31 | */ 32 | 33 | typedef struct TableHeaderView TableHeaderView; 34 | typedef struct TableHeaderViewInterface TableHeaderViewInterface; 35 | 36 | /** 37 | * @brief The header row is a specialized TableRow depicting the TableColumn handles. 38 | * @extends TableRowView 39 | * @ingroup Tables 40 | */ 41 | struct TableHeaderView { 42 | 43 | /** 44 | * @brief The superclass. 45 | */ 46 | TableRowView tableRowView; 47 | 48 | /** 49 | * @brief The interface. 50 | * @protected 51 | */ 52 | TableHeaderViewInterface *interface; 53 | }; 54 | 55 | /** 56 | * @brief The TableHeaderView interface. 57 | */ 58 | struct TableHeaderViewInterface { 59 | 60 | /** 61 | * @brief The superclass interface. 62 | */ 63 | TableRowViewInterface tableRowViewInterface; 64 | 65 | /** 66 | * @fn TableHeaderView *TableHeaderView::initWithTableView(TableHeaderView *self, TableView *tableView) 67 | * @brief Initializes this TableHeaderView with the give table. 68 | * @param self The TableHeaderView. 69 | * @param tableView The table. 70 | * @return The initialized TableHeaderView, or `NULL` on error. 71 | * @memberof TableHeaderView 72 | */ 73 | TableHeaderView *(*initWithTableView)(TableHeaderView *self, TableView *tableView); 74 | }; 75 | 76 | /** 77 | * @fn Class *TableHeaderView::_TableHeaderView(void) 78 | * @brief The TableHeaderView archetype. 79 | * @return The TableHeaderView Class. 80 | * @memberof TableHeaderView 81 | */ 82 | OBJECTIVELYMVC_EXPORT Class *_TableHeaderView(void); 83 | -------------------------------------------------------------------------------- /Sources/ObjectivelyMVC/Types.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ObjectivelyMVC: Object oriented MVC framework for OpenGL, SDL2 and GNU C. 3 | * Copyright (C) 2014 Jay Dolan 4 | * 5 | * This software is provided 'as-is', without any express or implied 6 | * warranty. In no event will the authors be held liable for any damages 7 | * arising from the use of this software. 8 | * 9 | * Permission is granted to anyone to use this software for any purpose, 10 | * including commercial applications, and to alter it and redistribute it 11 | * freely, subject to the following restrictions: 12 | * 13 | * 1. The origin of this software must not be misrepresented; you must not 14 | * claim that you wrote the original software. If you use this software 15 | * in a product, an acknowledgment in the product documentation would be 16 | * appreciated but is not required. 17 | * 18 | * 2. Altered source versions must be plainly marked as such, and must not be 19 | * misrepresented as being the original software. 20 | * 21 | * 3. This notice may not be removed or altered from any source distribution. 22 | */ 23 | 24 | #pragma once 25 | 26 | #include 27 | #include 28 | #include 29 | 30 | #include 31 | 32 | #undef interface 33 | 34 | #if defined(_MSC_VER) 35 | #include "WindowlyMVC.h" 36 | #endif 37 | 38 | #ifndef OBJECTIVELYMVC_EXPORT 39 | #define OBJECTIVELYMVC_EXPORT extern 40 | #endif 41 | 42 | /** 43 | * @file 44 | * @brief ObjectivelyMVC base types. 45 | */ 46 | 47 | typedef struct View View; 48 | typedef struct ViewController ViewController; 49 | 50 | /** 51 | * @brief A function type for View enumeration 52 | * @param view The View. 53 | * @param data User data. 54 | */ 55 | typedef void (*ViewEnumerator)(View *view, ident data); 56 | 57 | /** 58 | * @brief View event relay codes. 59 | */ 60 | typedef enum { 61 | ViewEventNone, 62 | ViewEventKeyDown, 63 | ViewEventKeyUp, 64 | ViewEventMouseButtonDown, 65 | ViewEventMouseButtonUp, 66 | ViewEventMouseEnter, 67 | ViewEventMouseLeave, 68 | ViewEventMouseMotion, 69 | 70 | /** 71 | * @brief A Control has lost focus. 72 | */ 73 | ViewEventBlur, 74 | 75 | /** 76 | * @brief A Control's input value has changed. 77 | */ 78 | ViewEventChange, 79 | 80 | /** 81 | * @brief A Control received one or more click events. 82 | */ 83 | ViewEventClick, 84 | 85 | /** 86 | * @brief A Control's state has focus. 87 | */ 88 | ViewEventFocus, 89 | 90 | /** 91 | * @brief User-defined ViewEvents. 92 | */ 93 | ViewEventUserDefined, 94 | } ViewEvent; 95 | 96 | /** 97 | * @brief The custom `SDL_event` type for View event relaying. 98 | * @details When a View responds to an input event, it may emit an output event. The application 99 | * may handle these events to e.g. play sound effects. 100 | */ 101 | OBJECTIVELYMVC_EXPORT Uint32 MVC_VIEW_EVENT; 102 | 103 | /** 104 | * @brief The custom `SDL_event` type for notifications. 105 | */ 106 | OBJECTIVELYMVC_EXPORT Uint32 MVC_NOTIFICATION_EVENT; 107 | 108 | typedef struct SDL_Size SDL_Size; 109 | 110 | /** 111 | * @brief The SDL_Size type. 112 | */ 113 | struct SDL_Size { 114 | int w, h; 115 | }; 116 | 117 | /** 118 | * @brief Creates an SDL_Point with the given coordinates. 119 | */ 120 | #define MakePoint(x, y) (SDL_Point) { (x), (y) } 121 | 122 | /** 123 | * @brief Creates an SDL_Rect with the given origin and size. 124 | */ 125 | #define MakeRect(x, y, w, h) (SDL_Rect) { (x), (y), (w), (h) } 126 | 127 | /** 128 | * @brief Creates an SDL_Size with the given dimensions. 129 | */ 130 | #define MakeSize(w, h) (SDL_Size) { (w), (h) } 131 | -------------------------------------------------------------------------------- /Sources/ObjectivelyMVC/Warning.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Objectively: Ultra-lightweight object oriented framework for GNU C. 3 | * Copyright (C) 2014 Jay Dolan 4 | * 5 | * This software is provided 'as-is', without any express or implied 6 | * warranty. In no event will the authors be held liable for any damages 7 | * arising from the use of this software. 8 | * 9 | * Permission is granted to anyone to use this software for any purpose, 10 | * including commercial applications, and to alter it and redistribute it 11 | * freely, subject to the following restrictions: 12 | * 13 | * 1. The origin of this software must not be misrepresented; you must not 14 | * claim that you wrote the original software. If you use this software 15 | * in a product, an acknowledgment in the product documentation would be 16 | * appreciated but is not required. 17 | * 18 | * 2. Altered source versions must be plainly marked as such, and must not be 19 | * misrepresented as being the original software. 20 | * 21 | * 3. This notice may not be removed or altered from any source distribution. 22 | */ 23 | 24 | #include 25 | 26 | #include "Warning.h" 27 | 28 | #define _Class _Warning 29 | 30 | #pragma mark - Object 31 | 32 | /** 33 | * @see Object::dealloc(Object *) 34 | */ 35 | static void dealloc(Object *self) { 36 | 37 | Warning *this = (Warning *) self; 38 | 39 | release(this->message); 40 | 41 | super(Object, self, dealloc); 42 | } 43 | 44 | #pragma mark - Warning 45 | 46 | /** 47 | * @fn Warning *Warning::initWithFormat(Warning *self, WarningType type, const char *fmt, ...) 48 | * @memberof Warning 49 | */ 50 | static Warning *initWithFormat(Warning *self, WarningType type, const char *fmt, ...) { 51 | 52 | va_list args; 53 | va_start(args, fmt); 54 | 55 | self = $(self, initWithVaList, type, fmt, args); 56 | 57 | va_end(args); 58 | 59 | return self; 60 | } 61 | 62 | /** 63 | * @fn Warning *Warning::initWithVaList(Warning *self, WarningType type, const char *fmt, va_list args) 64 | * @memberof Warning 65 | */ 66 | static Warning *initWithVaList(Warning *self, WarningType type, const char *fmt, va_list args) { 67 | 68 | self = (Warning *) super(Object, self, init); 69 | if (self) { 70 | self->type = type; 71 | assert(self->type); 72 | 73 | self->message = $(alloc(String), initWithVaList, fmt, args); 74 | assert(self->message); 75 | } 76 | 77 | return self; 78 | } 79 | 80 | #pragma mark - Class lifecycle 81 | 82 | /** 83 | * @see Class::initialize(Class *) 84 | */ 85 | static void initialize(Class *clazz) { 86 | 87 | ((ObjectInterface *) clazz->interface)->dealloc = dealloc; 88 | 89 | ((WarningInterface *) clazz->interface)->initWithFormat = initWithFormat; 90 | ((WarningInterface *) clazz->interface)->initWithVaList = initWithVaList; 91 | } 92 | 93 | /** 94 | * @fn Class *Warning::_Warning(void) 95 | * @memberof Warning 96 | */ 97 | Class *_Warning(void) { 98 | static Class *clazz; 99 | static Once once; 100 | 101 | do_once(&once, { 102 | clazz = _initialize(&(const ClassDef) { 103 | .name = "Warning", 104 | .superclass = _Object(), 105 | .instanceSize = sizeof(Warning), 106 | .interfaceOffset = offsetof(Warning, interface), 107 | .interfaceSize = sizeof(WarningInterface), 108 | .initialize = initialize, 109 | }); 110 | }); 111 | 112 | return clazz; 113 | } 114 | 115 | #undef _Class 116 | -------------------------------------------------------------------------------- /Sources/ObjectivelyMVC/Warning.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Objectively: Ultra-lightweight object oriented framework for GNU C. 3 | * Copyright (C) 2014 Jay Dolan 4 | * 5 | * This software is provided 'as-is', without any express or implied 6 | * warranty. In no event will the authors be held liable for any damages 7 | * arising from the use of this software. 8 | * 9 | * Permission is granted to anyone to use this software for any purpose, 10 | * including commercial applications, and to alter it and redistribute it 11 | * freely, subject to the following restrictions: 12 | * 13 | * 1. The origin of this software must not be misrepresented; you must not 14 | * claim that you wrote the original software. If you use this software 15 | * in a product, an acknowledgment in the product documentation would be 16 | * appreciated but is not required. 17 | * 18 | * 2. Altered source versions must be plainly marked as such, and must not be 19 | * misrepresented as being the original software. 20 | * 21 | * 3. This notice may not be removed or altered from any source distribution. 22 | */ 23 | 24 | #pragma once 25 | 26 | #include 27 | 28 | #include 29 | 30 | /** 31 | * @brief Warning types. 32 | */ 33 | typedef enum { 34 | WarningTypeStyle = 1, 35 | WarningTypeLayout, 36 | } WarningType; 37 | 38 | /** 39 | * @file 40 | * @brief Warnings are accumulated on Views so that they may be reported by the DebugViewController. 41 | */ 42 | 43 | typedef struct Warning Warning; 44 | typedef struct WarningInterface WarningInterface; 45 | 46 | /** 47 | * @brief The Warning type. 48 | * @extends Object 49 | */ 50 | struct Warning { 51 | 52 | /** 53 | * @brief The superclass. 54 | */ 55 | Object object; 56 | 57 | /** 58 | * @brief The interface. 59 | * @protected 60 | */ 61 | WarningInterface *interface; 62 | 63 | /** 64 | * @brief The WarningType. 65 | */ 66 | WarningType type; 67 | 68 | /** 69 | * @brief The message. 70 | */ 71 | String *message; 72 | }; 73 | 74 | /** 75 | * @brief The Warning interface. 76 | */ 77 | struct WarningInterface { 78 | 79 | /** 80 | * @brief The superclass interface. 81 | */ 82 | ObjectInterface objectInterface; 83 | 84 | /** 85 | * @fn Warning *Warning::initWithFormat(Warning *self, WarningType type, const char *fmt, ...) 86 | * @brief Initializes this Warning with the given type and format string. 87 | * @param self The Warning. 88 | * @param type The WarningType. 89 | * @param fmt The format string. 90 | * @return The initialized Warning, or `NULL` on error. 91 | * @memberof Warning 92 | */ 93 | Warning *(*initWithFormat)(Warning *self, WarningType type, const char *fmt, ...); 94 | 95 | /** 96 | * @fn Warning *Warning::initWithVaList(Warning *self, WarningType type, const char *fmt, va_list args) 97 | * @brief Initializes this Warning with the given type and format string. 98 | * @param self The Warning. 99 | * @param type The WarningType. 100 | * @param fmt The format string. 101 | * @param args The format arguments . 102 | * @return The initialized Warning, or `NULL` on error. 103 | * @memberof Warning 104 | */ 105 | Warning *(*initWithVaList)(Warning *self, WarningType type, const char *fmt, va_list args); 106 | }; 107 | 108 | /** 109 | * @fn Class *Warning::_Warning(void) 110 | * @brief The Warning archetype. 111 | * @return The Warning Class. 112 | * @memberof Warning 113 | */ 114 | OBJECTIVELYMVC_EXPORT Class *_Warning(void); 115 | -------------------------------------------------------------------------------- /Sources/ObjectivelyMVC/Window.c: -------------------------------------------------------------------------------- 1 | /* 2 | * ObjectivelyMVC: Object oriented MVC framework for OpenGL, SDL2 and GNU C. 3 | * Copyright (C) 2014 Jay Dolan 4 | * 5 | * This software is provided 'as-is', without any express or implied 6 | * warranty. In no event will the authors be held liable for any damages 7 | * arising from the use of this software. 8 | * 9 | * Permission is granted to anyone to use this software for any purpose, 10 | * including commercial applications, and to alter it and redistribute it 11 | * freely, subject to the following restrictions: 12 | * 13 | * 1. The origin of this software must not be misrepresented; you must not 14 | * claim that you wrote the original software. If you use this software 15 | * in a product, an acknowledgment in the product documentation would be 16 | * appreciated but is not required. 17 | * 18 | * 2. Altered source versions must be plainly marked as such, and must not be 19 | * misrepresented as being the original software. 20 | * 21 | * 3. This notice may not be removed or altered from any source distribution. 22 | */ 23 | 24 | #include 25 | 26 | #include "Window.h" 27 | 28 | SDL_Rect MVC_TransformToWindow(SDL_Window *window, const SDL_Rect *rect) { 29 | 30 | assert(rect); 31 | 32 | SDL_Rect transformed = *rect; 33 | 34 | int dh = 0; 35 | const double scale = MVC_WindowScale(window, NULL, &dh); 36 | 37 | transformed.x *= scale; 38 | transformed.y *= scale; 39 | transformed.w *= scale; 40 | transformed.h *= scale; 41 | 42 | transformed.y = dh - transformed.h - transformed.y; 43 | 44 | return transformed; 45 | } 46 | 47 | double MVC_WindowScale(SDL_Window *window, int *height, int *drawableHeight) { 48 | 49 | window = window ?: SDL_GL_GetCurrentWindow(); 50 | assert(window); 51 | 52 | int h; 53 | SDL_GetWindowSize(window, NULL, &h); 54 | 55 | if (height) { 56 | *height = h; 57 | } 58 | 59 | if (h) { 60 | 61 | int dh; 62 | SDL_GL_GetDrawableSize(window, NULL, &dh); 63 | 64 | if (drawableHeight) { 65 | *drawableHeight = dh; 66 | } 67 | 68 | if (dh) { 69 | return dh / (double) h; 70 | } 71 | } 72 | 73 | return 1.0; 74 | } 75 | -------------------------------------------------------------------------------- /Sources/ObjectivelyMVC/Window.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ObjectivelyMVC: Object oriented MVC framework for OpenGL, SDL2 and GNU C. 3 | * Copyright (C) 2014 Jay Dolan 4 | * 5 | * This software is provided 'as-is', without any express or implied 6 | * warranty. In no event will the authors be held liable for any damages 7 | * arising from the use of this software. 8 | * 9 | * Permission is granted to anyone to use this software for any purpose, 10 | * including commercial applications, and to alter it and redistribute it 11 | * freely, subject to the following restrictions: 12 | * 13 | * 1. The origin of this software must not be misrepresented; you must not 14 | * claim that you wrote the original software. If you use this software 15 | * in a product, an acknowledgment in the product documentation would be 16 | * appreciated but is not required. 17 | * 18 | * 2. Altered source versions must be plainly marked as such, and must not be 19 | * misrepresented as being the original software. 20 | * 21 | * 3. This notice may not be removed or altered from any source distribution. 22 | */ 23 | 24 | #pragma once 25 | 26 | #include 27 | 28 | /** 29 | * @brief Transforms the specified rectangle to normalized device coordinates in `window`. 30 | * @param window The window. 31 | * @param rect A rectangle defined in object space. 32 | * @return The transformed rectangle. 33 | */ 34 | OBJECTIVELYMVC_EXPORT SDL_Rect MVC_TransformToWindow(SDL_Window *window, const SDL_Rect *rect); 35 | 36 | /** 37 | * @brief Resolves the scale factor of the specified window for High-DPI support. 38 | * @param window The window, or `NULL` for the current OpenGL window. 39 | * @param height An optional output parameter to retrieve the window height. 40 | * @param drawableHeight An optional output parameter to retrieve the window drawable height. 41 | * @return The scale factor of the specified window. 42 | * @remarks Views and other classes should invoke this method to alter their rendering behavior for 43 | * High-DPI displays. This is particularly relevant for Views that render textures. 44 | */ 45 | OBJECTIVELYMVC_EXPORT double MVC_WindowScale(SDL_Window *window, int *height, int *drawableHeight); 46 | -------------------------------------------------------------------------------- /Tests/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = \ 2 | ObjectivelyMVC 3 | -------------------------------------------------------------------------------- /Tests/ObjectivelyMVC/.gitignore: -------------------------------------------------------------------------------- 1 | *.log 2 | *.trs 3 | Constraint 4 | Selector 5 | Style 6 | Stylesheet 7 | -------------------------------------------------------------------------------- /Tests/ObjectivelyMVC/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | AM_TESTS_ENVIRONMENT = \ 3 | AM_TESTS=1; export AM_TESTS; 4 | 5 | DEFAULT_INCLUDES = \ 6 | $(top_srcdir)/Sources 7 | 8 | TESTS = \ 9 | Selector \ 10 | Style \ 11 | Stylesheet 12 | 13 | CFLAGS += \ 14 | -I$(top_srcdir)/Sources \ 15 | @HOST_CFLAGS@ \ 16 | @CHECK_CFLAGS@ \ 17 | @OBJECTIVELY_CFLAGS@ \ 18 | @SDL2_CFLAGS@ 19 | 20 | LDADD = \ 21 | $(top_srcdir)/Sources/ObjectivelyMVC/libObjectivelyMVC.la \ 22 | @HOST_LIBS@ \ 23 | @CHECK_LIBS@ \ 24 | @OBJECTIVELY_LIBS@ \ 25 | @SDL2_LIBS@ 26 | 27 | check_PROGRAMS = \ 28 | $(TESTS) 29 | -------------------------------------------------------------------------------- /appveyor.yml: -------------------------------------------------------------------------------- 1 | version: 1.1.{build} 2 | image: 3 | - Visual Studio 2019 4 | branches: 5 | only: 6 | - master 7 | configuration: Release 8 | platform: 9 | - Win32 10 | - x64 11 | matrix: 12 | fast_finish: true 13 | init: 14 | - ps: 15 | install: 16 | - ps: >- 17 | md -Path "..\Objectively" 18 | 19 | Push-Location "..\Objectively\" 20 | 21 | [Environment]::CurrentDirectory = $PWD 22 | 23 | (New-Object System.Net.WebClient).DownloadFile("https://ci.appveyor.com/api/projects/Paril/objectively/artifacts/__dep.zip?job=Platform%3A+" + $env:PLATFORM, "tmp.zip") 24 | 25 | 7z x tmp.zip -aos "*" 26 | 27 | Remove-Item "tmp.*" 28 | 29 | Pop-Location 30 | 31 | [Environment]::CurrentDirectory = $PWD 32 | build: 33 | parallel: true 34 | verbosity: minimal 35 | project: ObjectivelyMVC.vs15\ObjectivelyMVC.sln 36 | after_build: 37 | - ps: >- 38 | 7z a __dep.zip -r *.h 39 | 40 | 7z a __dep.zip -r *.lib 41 | 42 | 7z a __dep.zip -r *.dll 43 | 44 | 7z a __dep.zip -r *.pdb 45 | test: off 46 | deploy: off 47 | artifacts: 48 | - path: __dep.zip 49 | on_success: 50 | - ps: >- 51 | $token = $env:API_TOKEN 52 | 53 | $headers = @{ "Authorization" = "Bearer $token"} 54 | 55 | $body = @{accountName = $env:API_NAME; projectSlug = "quetoo"} 56 | 57 | $bodyAsJson = $body | ConvertTo-json 58 | 59 | if ($env:Platform -Match "x64") { 60 | 61 | Invoke-Restmethod -uri 'https://ci.appveyor.com/api/builds' -Headers $headers -Method Post -Body $bodyAsjson -ContentType "application/json" 62 | 63 | } -------------------------------------------------------------------------------- /configure.ac: -------------------------------------------------------------------------------- 1 | AC_PREREQ(2.69) 2 | 3 | AC_INIT([ObjectivelyMVC], [0.1.0], [jay@jaydolan.com]) 4 | 5 | AC_CONFIG_HEADERS([Sources/ObjectivelyMVC/Config.h]) 6 | AC_CONFIG_MACRO_DIR([m4]) 7 | AC_CONFIG_SRCDIR([Sources/ObjectivelyMVC.h]) 8 | 9 | AC_CANONICAL_HOST 10 | 11 | AC_USE_SYSTEM_EXTENSIONS 12 | 13 | AC_PROG_CC 14 | LT_INIT 15 | 16 | AM_INIT_AUTOMAKE([foreign]) 17 | AM_SILENT_RULES([yes]) 18 | 19 | AH_TOP([#pragma once]) 20 | 21 | HOST_NAME="" 22 | HOST_CFLAGS="" 23 | HOST_LDFLAGS="" 24 | HOST_LIBS="" 25 | 26 | AC_MSG_CHECKING([host type]) 27 | case "$host" in 28 | *-apple-*) 29 | HOST_NAME="APPLE" 30 | HOST_LDFLAGS="-headerpad_max_install_names" 31 | HOST_LIBS="-framework OpenGL" 32 | AC_MSG_RESULT(apple) 33 | ;; 34 | *-mingw*) 35 | HOST_NAME="MINGW" 36 | HOST_LDFLAGS="-no-undefined" 37 | HOST_LIBS="-lopengl32" 38 | AC_MSG_RESULT(mingw) 39 | ;; 40 | *) 41 | HOST_NAME="LINUX" 42 | HOST_LIBS="-lGL" 43 | AC_MSG_RESULT(linux) 44 | ;; 45 | esac 46 | 47 | AC_SUBST(HOST_NAME) 48 | AC_SUBST(HOST_CFLAGS) 49 | AC_SUBST(HOST_LDFLAGS) 50 | AC_SUBST(HOST_LIBS) 51 | 52 | AM_CONDITIONAL([APPLE], [test "x$HOST_NAME" = "xAPPLE"]) 53 | AM_CONDITIONAL([MINGW], [test "x$HOST_NAME" = "xMINGW"]) 54 | AM_CONDITIONAL([LINUX], [test "x$HOST_NAME" = "xLINUX"]) 55 | 56 | AC_CHECK_HEADERS([GL/gl.h OpenGL/gl.h]) 57 | 58 | PKG_CHECK_MODULES([CHECK], [check >= 0.9.4]) 59 | PKG_CHECK_MODULES([OBJECTIVELY], [Objectively >= 1.0.0]) 60 | PKG_CHECK_MODULES([SDL2], [sdl2 >= 2.0.5 SDL2_image SDL2_ttf]) 61 | 62 | AC_SUBST(SDL2_DLL_LIBS, $(echo $SDL2_LIBS | sed 's/-lmingw32//; s/-lSDL2main//')) 63 | 64 | AC_CONFIG_FILES([ 65 | Makefile 66 | Assets/Makefile 67 | Sources/Makefile 68 | Sources/ObjectivelyMVC.pc 69 | Sources/ObjectivelyMVC/Makefile 70 | Tests/Makefile 71 | Tests/ObjectivelyMVC/Makefile 72 | Examples/Makefile 73 | ]) 74 | 75 | AC_OUTPUT 76 | -------------------------------------------------------------------------------- /m4/.gitignore: -------------------------------------------------------------------------------- 1 | !.gitignore 2 | 3 | --------------------------------------------------------------------------------