forked from part-cw/lambdanative
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a779303
commit 1a57188
Showing
136 changed files
with
48,663 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,139 @@ | ||
/* | ||
LambdaNative - a cross-platform Scheme framework | ||
Copyright (c) 2009-2013, University of British Columbia | ||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or | ||
without modification, are permitted provided that the | ||
following conditions are met: | ||
|
||
* Redistributions of source code must retain the above | ||
copyright notice, this list of conditions and the following | ||
disclaimer. | ||
|
||
* Redistributions in binary form must reproduce the above | ||
copyright notice, this list of conditions and the following | ||
disclaimer in the documentation and/or other materials | ||
provided with the distribution. | ||
|
||
* Neither the name of the University of British Columbia nor | ||
the names of its contributors may be used to endorse or | ||
promote products derived from this software without specific | ||
prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND | ||
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, | ||
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | ||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR | ||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | ||
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
*/ | ||
|
||
#ifndef __platform_h__ | ||
#define __platform_h__ | ||
|
||
// events | ||
#define EVENT_MOTION 1 | ||
#define EVENT_KEYPRESS 2 | ||
#define EVENT_KEYRELEASE 3 | ||
#define EVENT_BUTTON1UP 4 | ||
#define EVENT_BUTTON1DOWN 5 | ||
#define EVENT_BUTTON2UP 6 | ||
#define EVENT_BUTTON2DOWN 7 | ||
#define EVENT_BUTTON3UP 8 | ||
#define EVENT_BUTTON3DOWN 9 | ||
#define EVENT_CLOSE 14 | ||
#define EVENT_REDRAW 15 | ||
|
||
#define EVENT_SUSPEND 16 | ||
#define EVENT_RESUME 17 | ||
|
||
#define EVENT_MULTITOUCH 18 | ||
|
||
#define EVENT_BATTERY 32 | ||
#define EVENT_ORIENTATION 33 | ||
|
||
#define EVENT_INIT 127 | ||
#define EVENT_TERMINATE 128 | ||
|
||
// special keys | ||
#define EVENT_KEYENTER 1 | ||
#define EVENT_KEYTAB 2 | ||
#define EVENT_KEYBACKSPACE 3 | ||
#define EVENT_KEYRIGHT 4 | ||
#define EVENT_KEYLEFT 5 | ||
#define EVENT_KEYUP 6 | ||
#define EVENT_KEYDOWN 7 | ||
#define EVENT_KEYESCAPE 8 | ||
|
||
#define GUI_PORTRAIT 1 | ||
#define GUI_LANDSCAPE 2 | ||
#define GUI_SEASCAPE 3 | ||
#define GUI_UPSIDEDOWN 4 | ||
|
||
// scheme prototypes | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
#ifndef STANDALONE | ||
|
||
int scm_runflag(); | ||
void scm_event(int,int,int); | ||
int scm_width(); | ||
int scm_height(); | ||
int scm_screenwidth(); | ||
int scm_screenheight(); | ||
|
||
// hook prototype (performs scheme init) | ||
void ffi_event(int,int,int); | ||
|
||
// C prototypes | ||
// these are used by the desktop platforms | ||
void microgl_hook(int,int,int); | ||
void microgl_swapbuffers(); | ||
void microgl_close(); | ||
void microgl_init(); | ||
int microgl_window(int,int); | ||
int microgl_fullscreen(int,int); | ||
void microgl_pollevents(); | ||
void microgl_refresh(); | ||
int microgl_screenwidth(); | ||
int microgl_screenheight(); | ||
|
||
#endif // STANDALONE | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
// output of configure script | ||
#define SYS_APPNAME "@SYS_APPNAME@" | ||
#define SYS_APPVERSION "@SYS_APPVERSION@" | ||
#define SYS_PLATFORM "@SYS_PLATFORM@" | ||
#define SYS_HOSTPLATFORM "@SYS_HOSTPLATFORM@" | ||
#define SYS_PREFIX "@SYS_PREFIX@" | ||
#define SYS_PREFIXROOT "@SYS_PREFIXROOT@" | ||
#define SYS_HOSTPREFIX "@SYS_HOSTPREFIX@" | ||
#define SYS_CC "@SYS_CC@" | ||
#define SYS_AR "@SYS_AR@" | ||
#define SYS_WINDRES "@SYS_WINDRES@" | ||
#define SYS_RANLIB "@SYS_RANLIB@" | ||
#define SYS_STRIP "@SYS_STRIP@" | ||
#define SYS_GSC "@SYS_GSC@" | ||
#define SYS_EXEFIX "@SYS_EXEFIX@" | ||
#define SYS_APPFIX "@SYS_APPFIX@" | ||
#define SYS_CFLAGS "@SYS_CFLAGS@" | ||
#define SYS_CPPFLAGS "@SYS_CPPFLAGS@" | ||
#define SYS_LDFLAGS "@SYS_LDFLAGS@" | ||
#define SYS_LIBS "@SYS_LIBS@" | ||
|
||
#endif // __platform_h__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
all: | ||
@ ./make.sh all | ||
|
||
clean: | ||
@ ./make.sh clean | ||
|
||
scrub: | ||
@ ./make.sh scrub | ||
|
||
install: | ||
@ ./make.sh install | ||
|
||
package: | ||
@ ./make.sh package | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# descriptive profile name (will appear in build log) | ||
SYS_PROFILE="your profile name here" | ||
# organization identifiers, e.g. yourdomainhere.com: | ||
SYS_ORGTLD="com" | ||
SYS_ORGSLD="yourdomainhere" | ||
# iOS release (SYS_IOSRELCERT) and development (SYS_IOSDEVCERT) names: | ||
SYS_IOSRELCERT="iPhone Distribution: Your iOS identifier here" | ||
SYS_IOSDEVCERT="iPhone Developer: Your iOS identifier here (XXXXXXXXX)" | ||
# android keystore password | ||
SYS_ANDROIDPW="yoursecrethere" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
## compiler setup | ||
## Christian Leth Petersen 2013 | ||
## you may need to tweak this to match your system setup | ||
# ------------------------------------ | ||
## location of android SDK and NDK (linux or mac) | ||
ANDROIDSDK=`find /usr/local/android-sdk-* -print -maxdepth 0 2> /dev/null | tail -n 1` | ||
ANDROIDNDK=`find /usr/local/android-ndk-* -print -maxdepth 0 2> /dev/null| tail -n 1` | ||
# minimum version to support (a matching target must be installed) | ||
ANDROIDAPI=10 | ||
# ------------------------------------ | ||
## Linux cross compiler (mac) | ||
LINUXSDK=`find /usr/local/i?86-linux-* -print -maxdepth 0 2> /dev/null | tail -n 1` | ||
# ------------------------------------ | ||
## Windows cross compiler (linux or mac) | ||
WIN32SDK=`find /usr/local/i?86-mingw32-* -print -maxdepth 0 2> /dev/null | tail -n 1` | ||
# ------------------------------------ | ||
## iOS SDK (mac) | ||
IOSSDK=`find /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/* -print -maxdepth 0 2> /dev/null | tail -n 1` | ||
# minimum version to support | ||
IOSVERSION=3.2 | ||
# ------------------------------------ | ||
# eof |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
libgambc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
config ln_core |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#| | ||
LambdaNative - a cross-platform Scheme framework | ||
Copyright (c) 2009-2013, University of British Columbia | ||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or | ||
without modification, are permitted provided that the | ||
following conditions are met: | ||
|
||
* Redistributions of source code must retain the above | ||
copyright notice, this list of conditions and the following | ||
disclaimer. | ||
|
||
* Redistributions in binary form must reproduce the above | ||
copyright notice, this list of conditions and the following | ||
disclaimer in the documentation and/or other materials | ||
provided with the distribution. | ||
|
||
* Neither the name of the University of British Columbia nor | ||
the names of its contributors may be used to endorse or | ||
promote products derived from this software without specific | ||
prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND | ||
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, | ||
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | ||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR | ||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | ||
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
|# | ||
|
||
(display "DemoConsole\n") | ||
|
||
(let loop () | ||
(with-exception-catcher (lambda (e) | ||
(for-each display (list (exception->string e) "\n")) #f) | ||
(lambda () (##repl-debug))) | ||
(loop)) | ||
|
||
;; eof |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# android manifest | ||
# ---------- | ||
# | ||
# enable real-time audio (OpenSL based) | ||
# #define RTAUDIO 1 | ||
# | ||
# | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="@SYS_ORGTLD@.@SYS_ORGSLD@.@SYS_LOCASEAPPNAME@" | ||
android:versionCode="@SYS_APPVERSIONCODE@" | ||
android:versionName="@SYS_APPVERSION@"> | ||
<uses-sdk android:minSdkVersion="9"/> | ||
<application android:label="@string/app_name" | ||
android:icon="@drawable/icon"> | ||
<activity android:name="@SYS_APPNAME@" | ||
android:label="@string/app_name" | ||
android:launchMode="standard" | ||
# prevent screen rotations | ||
# android:screenOrientation="landscape"> | ||
android:screenOrientation="portrait"> | ||
# android:configChanges="orientation|screenSize"> | ||
# android:configChanges="keyboardHidden|orientation|screenSize"> | ||
# android:configChanges="keyboardHidden|orientation"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
</application> | ||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> | ||
# <uses-permission android:name="android.permission.INTERNET"/> | ||
# <uses-permission android:name="android.permission.BATTERY_STATS" /> | ||
# <uses-permission android:name="android.permission.WAVE_LOCK" /> | ||
# <uses-permission android:name="android.permission.RECORD_AUDIO" /> | ||
</manifest> | ||
# eof |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
# iphone options for plist and bootstrap) | ||
# To activate, uncomment (plist) or add + after hash (bootstrap) | ||
######################## | ||
# | ||
# bootstrap options | ||
# | ||
# don't allow the screen to lock | ||
#+ #define USE_NOLOCK | ||
# | ||
# load last image on startup | ||
# #define USE_CAMERAROLL | ||
# | ||
# execute audioinit at startup | ||
# #define USE_AUDIOINIT | ||
# beef volume to max at startup (sensor related) | ||
# #define USE_AUDIOVOLUMEINIT | ||
# | ||
# generate device orientation events | ||
# #define USE_ORIENTATION | ||
# | ||
# #define USE_MULTITOUCH | ||
# | ||
# #define USE_GYROSCOPE | ||
# | ||
######################### | ||
# | ||
# plist | ||
# | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>CFBundleDevelopmentRegion</key> | ||
<string>English</string> | ||
<key>CFBundleExecutable</key> | ||
<string>@SYS_APPNAME@</string> | ||
<key>CFBundleIdentifier</key> | ||
<string>@SYS_ORGTLD@.@SYS_ORGSLD@.@SYS_LOCASEAPPNAME@</string> | ||
<key>CFBundleInfoDictionaryVersion</key> | ||
<string>6.0</string> | ||
<key>CFBundleLongVersionString</key> | ||
<string>@SYS_APPVERSION@</string> | ||
<key>CFBundlePackageType</key> | ||
<string>APPL</string> | ||
<key>CFBundleResourceSpecification</key> | ||
<string>ResourceRules.plist</string> | ||
<key>CFBundleSignature</key> | ||
<string>????</string> | ||
<key>CFBundleSupportedPlatforms</key> | ||
<array> | ||
<string>iPhoneOS</string> | ||
</array> | ||
<key>CFBundleVersion</key> | ||
<string>@SYS_APPVERSION@</string> | ||
<key>CFBundleDisplayName</key> | ||
<string>@SYS_APPNAME@</string> | ||
<key>CSResourcesFileMapped</key> | ||
<true/> | ||
<key>LSRequiresCarbon</key> | ||
<true/> | ||
<key>NSHumanReadableCopyright</key> | ||
<string></string> | ||
<key>CFBundleIconFiles</key> | ||
<array> | ||
<string>Icon.png</string> | ||
<string>[email protected]</string> | ||
<string>Icon-72.png</string> | ||
<string>[email protected]</string> | ||
</array> | ||
### hide top status bar | ||
<key>UIStatusBarHidden</key> | ||
<true/> | ||
### prevent auto-shading of icon | ||
#<key>UIPrerenderedIcon</key> | ||
#<true/> | ||
### allow files to be accessed from iTunes | ||
#<key>UIFileSharingEnabled</key> | ||
#<true/> | ||
### allow wifi when asleep | ||
#<key>UIRequiresPersistentWiFi</key> | ||
#<true/> | ||
### allow wifi/audio when in background | ||
#<key>UIBackgroundModes</key> | ||
#<array> | ||
##<string>voip</string> | ||
#<string>audio</string> | ||
#</array> | ||
### require specific hardware | ||
#<key>UIRequiredDeviceCapabilities</key> | ||
#<array> | ||
#<string>microphone</string> | ||
##<string>still-camera</string> | ||
#</array> | ||
### yes, exit on exit, really | ||
#<key>UIApplicationExitsOnSuspend</key> | ||
#<true/> | ||
</dict> | ||
</plist> | ||
#eof |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
cmss.ttf 7 18 ascii |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
libgambc libportaudio!iphone!android |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
config eventloop ln_core ln_glcore ln_glgui ln_audio |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
cmss.ttf 24 "HelloWorld" title |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1.0 |
Oops, something went wrong.