Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Merge from https://bitbucket.org/keestux/sdl ... SDL_gesture code cle…

…anup.
  • Loading branch information
icculus committed Nov 8, 2011
2 parents e1c85ea + 4106ff6 commit 24d5a8e1baafab75498b8d4fb11d8b7237bd26d1
Showing with 905 additions and 1,219 deletions.
  1. +1 −1 include/SDL_clipboard.h
  2. +0 −1 include/SDL_config.h.in
  3. +2 −2 include/SDL_events.h
  4. +1 −1 include/SDL_log.h
  5. +4 −0 include/SDL_opengl.h
  6. +2 −2 include/SDL_render.h
  7. +2 −0 include/SDL_surface.h
  8. +1 −1 src/SDL_assert.c
  9. +3 −0 src/SDL_error_c.h
  10. +1 −1 src/SDL_log.c
  11. +4 −0 src/audio/alsa/SDL_alsa_audio.c
  12. +4 −0 src/audio/android/SDL_androidaudio.c
  13. +4 −0 src/audio/arts/SDL_artsaudio.c
  14. +4 −0 src/audio/baudio/SDL_beaudio.cc
  15. +4 −0 src/audio/bsd/SDL_bsdaudio.c
  16. +4 −0 src/audio/directsound/SDL_directsound.c
  17. +4 −0 src/audio/disk/SDL_diskaudio.c
  18. +4 −0 src/audio/dsp/SDL_dspaudio.c
  19. +4 −0 src/audio/esd/SDL_esdaudio.c
  20. +4 −0 src/audio/fusionsound/SDL_fsaudio.c
  21. +4 −0 src/audio/nas/SDL_nasaudio.c
  22. +4 −0 src/audio/nds/SDL_ndsaudio.c
  23. +4 −0 src/audio/paudio/SDL_paudio.c
  24. +4 −0 src/audio/qsa/SDL_qsa_audio.c
  25. +9 −5 src/audio/sun/SDL_sunaudio.c
  26. +0 −556 src/audio/ums/SDL_umsaudio.c
  27. +0 −47 src/audio/ums/SDL_umsaudio.h
  28. +4 −0 src/audio/winmm/SDL_winmm.c
  29. +3 −2 src/audio/xaudio2/SDL_xaudio2.c
  30. +4 −0 src/core/android/SDL_android.cpp
  31. +4 −0 src/core/windows/SDL_windows.c
  32. +8 −22 src/events/SDL_gesture.c
  33. +0 −17 src/events/SDL_keyboard.c
  34. +2 −1 src/events/SDL_touch.c
  35. +1 −1 src/libm/e_atan2.c
  36. +1 −1 src/libm/e_log.c
  37. +1 −1 src/libm/e_pow.c
  38. +1 −1 src/libm/e_rem_pio2.c
  39. +1 −1 src/libm/e_sqrt.c
  40. +1 −1 src/libm/k_cos.c
  41. +1 −1 src/libm/k_rem_pio2.c
  42. +1 −1 src/libm/k_sin.c
  43. +7 −0 src/libm/{math.h → math_libm.h}
  44. +1 −1 src/libm/s_atan.c
  45. +1 −1 src/libm/s_copysign.c
  46. +1 −1 src/libm/s_cos.c
  47. +1 −1 src/libm/s_fabs.c
  48. +1 −1 src/libm/s_floor.c
  49. +1 −1 src/libm/s_scalbn.c
  50. +1 −1 src/libm/s_sin.c
  51. +6 −0 src/main/android/SDL_android_main.cpp
  52. +3 −0 src/main/beos/SDL_BApp.h
  53. +6 −2 src/main/beos/SDL_BeApp.cc
  54. +5 −0 src/main/windows/SDL_windows_main.c
  55. +1 −1 src/power/beos/SDL_syspower.c
  56. +1 −1 src/power/linux/SDL_syspower.c
  57. +1 −1 src/power/macosx/SDL_syspower.c
  58. +1 −1 src/power/nds/SDL_syspower.c
  59. +7 −2 src/{thread/irix/SDL_systhread_c.h → power/uikit/SDL_syspower.h}
  60. +2 −1 src/power/uikit/SDL_syspower.m
  61. +1 −1 src/power/windows/SDL_syspower.c
  62. +39 −1 src/render/SDL_render.c
  63. +1 −0 src/render/SDL_sysrender.h
  64. +59 −3 src/render/opengles/SDL_render_gles.c
  65. +83 −17 src/render/opengles2/SDL_render_gles2.c
  66. +1 −0 src/render/software/SDL_render_sw.c
  67. +1 −1 src/stdlib/SDL_string.c
  68. +1 −0 src/thread/SDL_thread.c
  69. +1 −2 src/thread/SDL_thread_c.h
  70. +4 −0 src/thread/beos/SDL_syssem.c
  71. +4 −0 src/thread/beos/SDL_systhread.c
  72. +0 −230 src/thread/irix/SDL_syssem.c
  73. +0 −81 src/thread/irix/SDL_systhread.c
  74. +0 −6 src/thread/nds/SDL_systhread.c
  75. +4 −0 src/thread/windows/SDL_sysmutex.c
  76. +4 −0 src/thread/windows/SDL_syssem.c
  77. +4 −0 src/thread/windows/SDL_systhread.c
  78. +7 −1 src/thread/windows/win_ce_semaphore.c
  79. +22 −19 src/video/SDL_blit_copy.c
  80. +1 −1 src/video/SDL_bmp.c
  81. +4 −1 src/video/SDL_clipboard.c
  82. +1 −0 src/video/SDL_rect.c
  83. +2 −2 src/video/SDL_shape.c
  84. +1 −1 src/video/SDL_surface.c
  85. +5 −8 src/video/SDL_video.c
  86. +4 −0 src/video/android/SDL_androidevents.c
  87. +4 −0 src/video/android/SDL_androidgl.c
  88. +4 −0 src/video/android/SDL_androidkeyboard.c
  89. +4 −0 src/video/android/SDL_androidtouch.c
  90. +4 −0 src/video/android/SDL_androidvideo.c
  91. +4 −0 src/video/android/SDL_androidwindow.c
  92. +0 −2 src/video/bwindow/SDL_BWin.h
  93. +20 −24 src/video/bwindow/SDL_bclipboard.cc
  94. +5 −0 src/video/bwindow/SDL_bevents.cc
  95. +5 −1 src/video/bwindow/SDL_bframebuffer.cc
  96. +6 −1 src/video/bwindow/SDL_bkeyboard.cc
  97. +9 −1 src/video/bwindow/SDL_bmodes.cc
  98. +6 −5 src/video/bwindow/SDL_bopengl.cc
  99. +4 −1 src/video/bwindow/SDL_bvideo.cc
  100. +3 −0 src/video/bwindow/SDL_bwindow.cc
  101. +9 −17 src/video/cocoa/SDL_cocoaclipboard.m
  102. +4 −0 src/video/cocoa/SDL_cocoaevents.m
  103. +5 −1 src/video/cocoa/SDL_cocoakeyboard.m
  104. +5 −1 src/video/cocoa/SDL_cocoamodes.m
  105. +4 −15 src/video/cocoa/SDL_cocoamouse.m
  106. +2 −2 src/video/cocoa/SDL_cocoaopengl.m
  107. +10 −0 src/video/cocoa/SDL_cocoashape.m
  108. +4 −0 src/video/cocoa/SDL_cocoavideo.m
  109. +4 −2 src/video/cocoa/SDL_cocoawindow.m
  110. +4 −0 src/video/directfb/SDL_DirectFB_WM.c
  111. +4 −1 src/video/directfb/SDL_DirectFB_dyn.c
  112. +4 −0 src/video/directfb/SDL_DirectFB_events.c
  113. +5 −0 src/video/directfb/SDL_DirectFB_modes.c
  114. +5 −1 src/video/directfb/SDL_DirectFB_mouse.c
  115. +5 −0 src/video/directfb/SDL_DirectFB_opengl.c
  116. +5 −0 src/video/directfb/SDL_DirectFB_render.c
  117. +4 −0 src/video/directfb/SDL_DirectFB_shape.c
  118. +5 −0 src/video/directfb/SDL_DirectFB_video.c
  119. +5 −0 src/video/directfb/SDL_DirectFB_window.c
  120. +4 −0 src/video/dummy/SDL_nullevents.c
  121. +5 −0 src/video/dummy/SDL_nullframebuffer.c
  122. +4 −0 src/video/dummy/SDL_nullvideo.c
  123. +3 −2 src/video/nds/SDL_ndsevents.c
  124. +4 −0 src/video/nds/SDL_ndsvideo.c
  125. +4 −0 src/video/nds/SDL_ndswindow.c
  126. +5 −1 src/video/pandora/SDL_pandora.c
  127. +4 −0 src/video/pandora/SDL_pandora_events.c
  128. +5 −0 src/video/uikit/SDL_uikitappdelegate.m
  129. +4 −0 src/video/uikit/SDL_uikitevents.m
  130. +6 −3 src/video/uikit/SDL_uikitopengles.m
  131. +5 −0 src/video/uikit/SDL_uikitopenglview.m
  132. +6 −4 src/video/uikit/SDL_uikitvideo.m
  133. +8 −1 src/video/uikit/SDL_uikitview.m
  134. +23 −19 src/video/uikit/SDL_uikitviewcontroller.m
  135. +11 −10 src/video/uikit/SDL_uikitwindow.m
  136. +11 −5 src/video/windows/SDL_windowsclipboard.c
  137. +4 −1 src/video/windows/SDL_windowsevents.c
  138. +4 −0 src/video/windows/SDL_windowsframebuffer.c
  139. +4 −0 src/video/windows/SDL_windowskeyboard.c
  140. +4 −0 src/video/windows/SDL_windowsmodes.c
  141. +4 −1 src/video/windows/SDL_windowsmouse.c
  142. +4 −0 src/video/windows/SDL_windowsopengl.c
  143. +5 −1 src/video/windows/SDL_windowsshape.c
  144. +4 −0 src/video/windows/SDL_windowsvideo.c
  145. +4 −0 src/video/windows/SDL_windowswindow.c
  146. +8 −13 src/video/x11/SDL_x11clipboard.c
  147. +5 −0 src/video/x11/SDL_x11opengl.c
  148. +2 −2 src/video/x11/SDL_x11opengles.c
  149. +9 −17 src/video/x11/SDL_x11window.c
  150. +5 −0 src/video/x11/imKStoUCS.c
  151. +140 −6 test/test-automation/tests/testclipboard/testclipboard.c
@@ -55,7 +55,7 @@ extern DECLSPEC int SDLCALL SDL_SetClipboardText(const char *text);
extern DECLSPEC char * SDLCALL SDL_GetClipboardText(void);

/**
* \brief Returns whether the clipboard has text
* \brief Returns a flag indicating whether the clipboard exists and contains a text string that it non-empty
*
* \sa SDL_GetClipboardText()
*/
@@ -233,7 +233,6 @@
#undef SDL_THREAD_PTHREAD
#undef SDL_THREAD_PTHREAD_RECURSIVE_MUTEX
#undef SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP
#undef SDL_THREAD_SPROC
#undef SDL_THREAD_WINDOWS

/* Enable various timer systems */
@@ -280,7 +280,7 @@ typedef struct SDL_JoyButtonEvent


/**
* \brief Touch finger motion/finger event structure (event.tmotion.*)
* \brief Touch finger motion/finger event structure (event.tfinger.*)
*/
typedef struct SDL_TouchFingerEvent
{
@@ -302,7 +302,7 @@ typedef struct SDL_TouchFingerEvent


/**
* \brief Touch finger motion/finger event structure (event.tmotion.*)
* \brief Touch finger motion/finger event structure (event.tbutton.*)
*/
typedef struct SDL_TouchButtonEvent
{
@@ -121,7 +121,7 @@ extern DECLSPEC void SDLCALL SDL_LogSetPriority(int category,
SDL_LogPriority priority);

/**
* \brief Set the priority of a particular log category
* \brief Get the priority of a particular log category
*/
extern DECLSPEC SDL_LogPriority SDLCALL SDL_LogGetPriority(int category);

@@ -30,6 +30,8 @@

#include "SDL_config.h"

#ifndef __IPHONEOS__

#ifdef __WIN32__
#define WIN32_LEAN_AND_MEAN
#ifndef NOMINMAX
/* *INDENT-ON* */
#endif /* NO_SDL_GLEXT */

#endif /* !__IPHONEOS__ */

#endif /* _SDL_opengl_h */

/* vi: set ts=4 sw=4 expandtab: */
@@ -389,7 +389,7 @@ extern DECLSPEC void SDLCALL SDL_RenderGetViewport(SDL_Renderer * renderer,
SDL_Rect * rect);

/**
* \brief Set the color used for drawing operations (Fill and Line).
* \brief Set the color used for drawing operations (Rect, Line and Clear).
*
* \param r The red value used to draw on the rendering target.
* \param g The green value used to draw on the rendering target.
@@ -404,7 +404,7 @@ extern DECLSPEC int SDL_SetRenderDrawColor(SDL_Renderer * renderer,
Uint8 a);

/**
* \brief Get the color used for drawing operations (Fill and Line).
* \brief Get the color used for drawing operations (Rect, Line and Clear).
*
* \param r A pointer to the red value used to draw on the rendering target.
* \param g A pointer to the green value used to draw on the rendering target.
@@ -355,6 +355,8 @@ extern DECLSPEC SDL_Surface *SDLCALL SDL_ConvertSurfaceFormat

/**
* \brief Copy a block of pixels of one format to another format
*
* \return 0 on success, or -1 if there was an error
*/
extern DECLSPEC int SDLCALL SDL_ConvertPixels(int width, int height,
Uint32 src_format,
@@ -319,7 +319,7 @@ SDL_PromptAssertion(const SDL_assert_data *data, void *userdata)
#ifdef __WIN32__
state = SDL_PromptAssertion_windows(data);

#elif __MACOSX__
#elif defined __MACOSX__ && defined SDL_VIDEO_DRIVER_COCOA
/* This has to be done in an Objective-C (*.m) file, so we call out. */
extern SDL_assert_state SDL_PromptAssertion_cocoa(const SDL_assert_data *);
state = SDL_PromptAssertion_cocoa(data);
@@ -56,6 +56,9 @@ typedef struct SDL_error
} args[ERR_MAX_ARGS];
} SDL_error;

/* Defined in SDL_thread.c */
extern SDL_error *SDL_GetErrBuf(void);

#endif /* _SDL_error_c_h */

/* vi: set ts=4 sw=4 expandtab: */
@@ -258,7 +258,7 @@ SDL_LogMessageV(int category, SDL_LogPriority priority, const char *fmt, va_list
}

/* Make sure we don't exceed array bounds */
if (priority < 0 || priority >= SDL_NUM_LOG_PRIORITIES) {
if ((int)priority < 0 || priority >= SDL_NUM_LOG_PRIORITIES) {
return;
}

@@ -20,6 +20,8 @@
*/
#include "SDL_config.h"

#if SDL_AUDIO_DRIVER_ALSA

/* Allow access to a raw mixing buffer */

#include <sys/types.h>
@@ -693,4 +695,6 @@ AudioBootStrap ALSA_bootstrap = {
"alsa", "ALSA PCM audio", ALSA_Init, 0
};

#endif /* SDL_AUDIO_DRIVER_ALSA */

/* vi: set ts=4 sw=4 expandtab: */
@@ -20,6 +20,8 @@
*/
#include "SDL_config.h"

#if SDL_AUDIO_DRIVER_ANDROID

/* Output audio to Android */

#include "SDL_audio.h"
@@ -154,4 +156,6 @@ Android_RunAudioThread()
SDL_RunAudio(audioDevice);
}

#endif /* SDL_AUDIO_DRIVER_ANDROID */

/* vi: set ts=4 sw=4 expandtab: */
@@ -20,6 +20,8 @@
*/
#include "SDL_config.h"

#if SDL_AUDIO_DRIVER_ARTS

/* Allow access to a raw mixing buffer */

#ifdef HAVE_SIGNAL_H
@@ -372,4 +374,6 @@ AudioBootStrap ARTS_bootstrap = {
"arts", "Analog RealTime Synthesizer", ARTS_Init, 0
};

#endif /* SDL_AUDIO_DRIVER_ARTS */

/* vi: set ts=4 sw=4 expandtab: */
@@ -20,6 +20,8 @@
*/
#include "SDL_config.h"

#if SDL_AUDIO_DRIVER_BEOSAUDIO

/* Allow access to the audio stream on BeOS */

#include <SoundPlayer.h>
@@ -214,4 +216,6 @@ AudioBootStrap BEOSAUDIO_bootstrap = {
"baudio", "BeOS BSoundPlayer", BEOSAUDIO_Init, 0
};

#endif /* SDL_AUDIO_DRIVER_BEOSAUDIO */

/* vi: set ts=4 sw=4 expandtab: */
@@ -20,6 +20,8 @@
*/
#include "SDL_config.h"

#if SDL_AUDIO_DRIVER_BSD

/*
* Driver for native OpenBSD/NetBSD audio(4).
* vedge@vedge.com.ar.
@@ -364,4 +366,6 @@ AudioBootStrap BSD_AUDIO_bootstrap = {
"bsd", "BSD audio", BSDAUDIO_Init, 0
};

#endif /* SDL_AUDIO_DRIVER_BSD */

/* vi: set ts=4 sw=4 expandtab: */
@@ -20,6 +20,8 @@
*/
#include "SDL_config.h"

#if SDL_AUDIO_DRIVER_DSOUND

/* Allow access to a raw mixing buffer */

#include "SDL_timer.h"
@@ -549,4 +551,6 @@ AudioBootStrap DSOUND_bootstrap = {
"directsound", "DirectSound", DSOUND_Init, 0
};

#endif /* SDL_AUDIO_DRIVER_DSOUND */

/* vi: set ts=4 sw=4 expandtab: */
@@ -20,6 +20,8 @@
*/
#include "SDL_config.h"

#if SDL_AUDIO_DRIVER_DISK

/* Output raw audio data to a file. */

#if HAVE_STDIO_H
@@ -159,4 +161,6 @@ AudioBootStrap DISKAUD_bootstrap = {
"disk", "direct-to-disk audio", DISKAUD_Init, 1
};

#endif /* SDL_AUDIO_DRIVER_DISK */

/* vi: set ts=4 sw=4 expandtab: */
@@ -20,6 +20,8 @@
*/
#include "SDL_config.h"

#if SDL_AUDIO_DRIVER_OSS

/* Allow access to a raw mixing buffer */

#include <stdio.h> /* For perror() */
@@ -312,4 +314,6 @@ AudioBootStrap DSP_bootstrap = {
"dsp", "OSS /dev/dsp standard audio", DSP_Init, 0
};

#endif /* SDL_AUDIO_DRIVER_OSS */

/* vi: set ts=4 sw=4 expandtab: */
@@ -20,6 +20,8 @@
*/
#include "SDL_config.h"

#if SDL_AUDIO_DRIVER_ESD

/* Allow access to an ESD network stream mixing buffer */

#include <sys/types.h>
@@ -345,4 +347,6 @@ AudioBootStrap ESD_bootstrap = {
"esd", "Enlightened Sound Daemon", ESD_Init, 0
};

#endif /* SDL_AUDIO_DRIVER_ESD */

/* vi: set ts=4 sw=4 expandtab: */
@@ -20,6 +20,8 @@
*/
#include "SDL_config.h"

#if SDL_AUDIO_DRIVER_FUSIONSOUND

/* Allow access to a raw mixing buffer */

#ifdef HAVE_SIGNAL_H
@@ -345,4 +347,6 @@ AudioBootStrap FUSIONSOUND_bootstrap = {
"fusionsound", "FusionSound", SDL_FS_Init, 0
};

#endif /* SDL_AUDIO_DRIVER_FUSIONSOUND */

/* vi: set ts=4 sw=4 expandtab: */
@@ -20,6 +20,8 @@
*/
#include "SDL_config.h"

#if SDL_AUDIO_DRIVER_NAS

/* Allow access to a raw mixing buffer */

#include <signal.h>
@@ -397,4 +399,6 @@ AudioBootStrap NAS_bootstrap = {
"nas", "Network Audio System", NAS_Init, 0
};

#endif /* SDL_AUDIO_DRIVER_NAS */

/* vi: set ts=4 sw=4 expandtab: */
@@ -20,6 +20,8 @@
*/
#include "SDL_config.h"

#if SDL_AUDIO_DRIVER_NDS

/* Output audio to NDS */

#include <nds.h>
@@ -122,4 +124,6 @@ AudioBootStrap NDSAUD_bootstrap = {
"nds", "SDL NDS audio driver", NDSAUD_Init, 0 /*1? */
};

#endif /* SDL_AUDIO_DRIVER_NDS */

/* vi: set ts=4 sw=4 expandtab: */
@@ -20,6 +20,8 @@
*/
#include "SDL_config.h"

#if SDL_AUDIO_DRIVER_PAUDIO

/* Allow access to a raw mixing buffer */

#include <errno.h>
@@ -545,4 +547,6 @@ AudioBootStrap PAUDIO_bootstrap = {
"paud", "AIX Paudio", PAUDIO_Init, 0
};

#endif /* SDL_AUDIO_DRIVER_PAUDIO */

/* vi: set ts=4 sw=4 expandtab: */
@@ -21,6 +21,8 @@

#include "SDL_config.h"

#if SDL_AUDIO_DRIVER_QSA

#include <errno.h>
#include <unistd.h>
#include <fcntl.h>
@@ -863,4 +865,6 @@ AudioBootStrap QSAAUDIO_bootstrap = {
"qsa", "QNX QSA Audio", QSA_Init, 0
};

#endif /* SDL_AUDIO_DRIVER_QSA */

/* vi: set ts=4 sw=4 expandtab: */
@@ -1,8 +1,3 @@
/* I'm gambling no one uses this audio backend...we'll see who emails. :) */
#error this code has not been updated for SDL 1.3.
#error if no one emails icculus at icculus.org and tells him that this
#error code is needed, this audio backend will eventually be removed from SDL.

/*
Simple DirectMedia Layer
Copyright (C) 1997-2011 Sam Lantinga <slouken@libsdl.org>
@@ -25,6 +20,13 @@
*/
#include "SDL_config.h"

#if SDL_AUDIO_DRIVER_SUNAUDIO

/* I'm gambling no one uses this audio backend...we'll see who emails. :) */
#error this code has not been updated for SDL 1.3.
#error if no one emails icculus at icculus.org and tells him that this
#error code is needed, this audio backend will eventually be removed from SDL.

/* Allow access to a raw mixing buffer */

#include <fcntl.h>
@@ -450,4 +452,6 @@ snd2au(int sample)
return (mask & sample);
}

#endif /* SDL_AUDIO_DRIVER_SUNAUDIO */

/* vi: set ts=4 sw=4 expandtab: */

0 comments on commit 24d5a8e

Please sign in to comment.