Edit

kc3-lang/SDL/src/video/android/SDL_androidmessagebox.h

Branch :

  • Show log

    Commit

  • Author : Sam Lantinga
    Date : 2014-09-13 02:15:18
    Hash : 5f39ea89
    Message : Fixed bug 2415 - Message Boxes aren't implemented on Android Philipp Wiesemann I attached a patch for an incomplete implementation of the messagebox parts. It was not tested on lots of devices yet and features a very fragile workaround to block the calling SDL thread while the dialog is handled on Android's UI thread. Although it works for testmessage.c I assume there are lot of situations were it may fail (standby, device rotation and other changes). Also not all flags and colors are implemented. On the other hand most uses of the messagebox are to show an error on start and fragility (or working at all) may not matter there.

  • src/video/android/SDL_androidmessagebox.h
  • /*
      Simple DirectMedia Layer
      Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
    
      This software is provided 'as-is', without any express or implied
      warranty.  In no event will the authors be held liable for any damages
      arising from the use of this software.
    
      Permission is granted to anyone to use this software for any purpose,
      including commercial applications, and to alter it and redistribute it
      freely, subject to the following restrictions:
    
      1. The origin of this software must not be misrepresented; you must not
         claim that you wrote the original software. If you use this software
         in a product, an acknowledgment in the product documentation would be
         appreciated but is not required.
      2. Altered source versions must be plainly marked as such, and must not be
         misrepresented as being the original software.
      3. This notice may not be removed or altered from any source distribution.
    */
    #include "../../SDL_internal.h"
    
    #if SDL_VIDEO_DRIVER_ANDROID
    
    extern int Android_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid);
    
    #endif /* SDL_VIDEO_DRIVER_ANDROID */
    
    /* vi: set ts=4 sw=4 expandtab: */