src/core/android/SDL_android.h
author Sam Lantinga <slouken@libsdl.org>
Fri, 08 Apr 2011 13:03:26 -0700
changeset 5535 96594ac5fd1a
parent 5262 b530ef003506
child 5582 1281a3f1f0a6
permissions -rw-r--r--
SDL 1.3 is now under the zlib license.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4994
e4ed74189d63 Added missing header
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
     1
/*
5535
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5262
diff changeset
     2
  Simple DirectMedia Layer
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5262
diff changeset
     3
  Copyright (C) 1997-2011 Sam Lantinga <slouken@libsdl.org>
4994
e4ed74189d63 Added missing header
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
     4
5535
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5262
diff changeset
     5
  This software is provided 'as-is', without any express or implied
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5262
diff changeset
     6
  warranty.  In no event will the authors be held liable for any damages
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5262
diff changeset
     7
  arising from the use of this software.
4994
e4ed74189d63 Added missing header
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
     8
5535
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5262
diff changeset
     9
  Permission is granted to anyone to use this software for any purpose,
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5262
diff changeset
    10
  including commercial applications, and to alter it and redistribute it
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5262
diff changeset
    11
  freely, subject to the following restrictions:
4994
e4ed74189d63 Added missing header
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    12
5535
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5262
diff changeset
    13
  1. The origin of this software must not be misrepresented; you must not
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5262
diff changeset
    14
     claim that you wrote the original software. If you use this software
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5262
diff changeset
    15
     in a product, an acknowledgment in the product documentation would be
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5262
diff changeset
    16
     appreciated but is not required.
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5262
diff changeset
    17
  2. Altered source versions must be plainly marked as such, and must not be
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5262
diff changeset
    18
     misrepresented as being the original software.
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5262
diff changeset
    19
  3. This notice may not be removed or altered from any source distribution.
4994
e4ed74189d63 Added missing header
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    20
*/
e4ed74189d63 Added missing header
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    21
#include "SDL_config.h"
e4ed74189d63 Added missing header
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    22
e4ed74189d63 Added missing header
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    23
/* Set up for C function definitions, even when using C++ */
e4ed74189d63 Added missing header
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    24
#ifdef __cplusplus
e4ed74189d63 Added missing header
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    25
/* *INDENT-OFF* */
e4ed74189d63 Added missing header
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    26
extern "C" {
e4ed74189d63 Added missing header
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    27
/* *INDENT-ON* */
e4ed74189d63 Added missing header
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    28
#endif
e4ed74189d63 Added missing header
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    29
e4ed74189d63 Added missing header
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    30
/* Interface from the SDL library into the Android Java activity */
5222
c66b2a778b7e Try to create an OpenGL ES 2.0 context on Android and successfully fall back to OpenGL ES 1.1 if that fails.
Sam Lantinga <slouken@libsdl.org>
parents: 5090
diff changeset
    31
extern SDL_bool Android_JNI_CreateContext(int majorVersion, int minorVersion);
5000
6a10693e66c3 Cleaned up internal accelerometer interface
Sam Lantinga <slouken@libsdl.org>
parents: 4998
diff changeset
    32
extern void Android_JNI_SwapWindow();
6a10693e66c3 Cleaned up internal accelerometer interface
Sam Lantinga <slouken@libsdl.org>
parents: 4998
diff changeset
    33
extern void Android_JNI_SetActivityTitle(const char *title);
6a10693e66c3 Cleaned up internal accelerometer interface
Sam Lantinga <slouken@libsdl.org>
parents: 4998
diff changeset
    34
extern void Android_JNI_GetAccelerometerValues(float values[3]);
4995
9f9bea41e88f Working audio implementation contributed by Joseph Lunderville
Sam Lantinga <slouken@libsdl.org>
parents: 4994
diff changeset
    35
9f9bea41e88f Working audio implementation contributed by Joseph Lunderville
Sam Lantinga <slouken@libsdl.org>
parents: 4994
diff changeset
    36
// Audio support
5000
6a10693e66c3 Cleaned up internal accelerometer interface
Sam Lantinga <slouken@libsdl.org>
parents: 4998
diff changeset
    37
extern int Android_JNI_OpenAudioDevice(int sampleRate, int is16Bit, int channelCount, int desiredBufferFrames);
6a10693e66c3 Cleaned up internal accelerometer interface
Sam Lantinga <slouken@libsdl.org>
parents: 4998
diff changeset
    38
extern void* Android_JNI_GetAudioBuffer();
6a10693e66c3 Cleaned up internal accelerometer interface
Sam Lantinga <slouken@libsdl.org>
parents: 4998
diff changeset
    39
extern void Android_JNI_WriteAudioBuffer();
6a10693e66c3 Cleaned up internal accelerometer interface
Sam Lantinga <slouken@libsdl.org>
parents: 4998
diff changeset
    40
extern void Android_JNI_CloseAudioDevice();
4994
e4ed74189d63 Added missing header
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    41
e4ed74189d63 Added missing header
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    42
/* Ends C function definitions when using C++ */
e4ed74189d63 Added missing header
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    43
#ifdef __cplusplus
e4ed74189d63 Added missing header
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    44
/* *INDENT-OFF* */
e4ed74189d63 Added missing header
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    45
}
e4ed74189d63 Added missing header
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    46
/* *INDENT-ON* */
e4ed74189d63 Added missing header
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    47
#endif
e4ed74189d63 Added missing header
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    48
e4ed74189d63 Added missing header
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    49
/* vi: set ts=4 sw=4 expandtab: */