include/SDL_video.h
changeset 12143 673ec0369266
parent 11886 27d81cb6e6af
child 12180 a3c2b6e89522
     1.1 --- a/include/SDL_video.h	Wed Aug 22 17:44:28 2018 -0700
     1.2 +++ b/include/SDL_video.h	Wed Aug 22 21:48:28 2018 -0700
     1.3 @@ -170,6 +170,24 @@
     1.4  } SDL_WindowEventID;
     1.5  
     1.6  /**
     1.7 + *  \brief Event subtype for display events
     1.8 + */
     1.9 +typedef enum
    1.10 +{
    1.11 +    SDL_DISPLAYEVENT_NONE,          /**< Never used */
    1.12 +    SDL_DISPLAYEVENT_ORIENTATION,   /**< Display orientation has changed to data1 */
    1.13 +} SDL_DisplayEventID;
    1.14 +
    1.15 +typedef enum
    1.16 +{
    1.17 +    SDL_ORIENTATION_UNKNOWN,            /**< The display orientation can't be determined */
    1.18 +    SDL_ORIENTATION_LANDSCAPE,          /**< The display is in landscape mode, with the right side up, relative to portrait mode */
    1.19 +    SDL_ORIENTATION_LANDSCAPE_FLIPPED,  /**< The display is in landscape mode, with the left side up, relative to portrait mode */
    1.20 +    SDL_ORIENTATION_PORTRAIT,           /**< The display is in portrait mode */
    1.21 +    SDL_ORIENTATION_PORTRAIT_FLIPPED,   /**< The display is in portrait mode, upside down */
    1.22 +} SDL_DisplayOrientation;
    1.23 +
    1.24 +/**
    1.25   *  \brief An opaque handle to an OpenGL context.
    1.26   */
    1.27  typedef void *SDL_GLContext;
    1.28 @@ -317,18 +335,6 @@
    1.29  extern DECLSPEC int SDLCALL SDL_GetDisplayBounds(int displayIndex, SDL_Rect * rect);
    1.30  
    1.31  /**
    1.32 - *  \brief Get the dots/pixels-per-inch for a display
    1.33 - *
    1.34 - *  \note Diagonal, horizontal and vertical DPI can all be optionally
    1.35 - *        returned if the parameter is non-NULL.
    1.36 - *
    1.37 - *  \return 0 on success, or -1 if no DPI information is available or the index is out of range.
    1.38 - *
    1.39 - *  \sa SDL_GetNumVideoDisplays()
    1.40 - */
    1.41 -extern DECLSPEC int SDLCALL SDL_GetDisplayDPI(int displayIndex, float * ddpi, float * hdpi, float * vdpi);
    1.42 -
    1.43 -/**
    1.44   *  \brief Get the usable desktop area represented by a display, with the
    1.45   *         primary display located at 0,0
    1.46   *
    1.47 @@ -348,6 +354,27 @@
    1.48  extern DECLSPEC int SDLCALL SDL_GetDisplayUsableBounds(int displayIndex, SDL_Rect * rect);
    1.49  
    1.50  /**
    1.51 + *  \brief Get the dots/pixels-per-inch for a display
    1.52 + *
    1.53 + *  \note Diagonal, horizontal and vertical DPI can all be optionally
    1.54 + *        returned if the parameter is non-NULL.
    1.55 + *
    1.56 + *  \return 0 on success, or -1 if no DPI information is available or the index is out of range.
    1.57 + *
    1.58 + *  \sa SDL_GetNumVideoDisplays()
    1.59 + */
    1.60 +extern DECLSPEC int SDLCALL SDL_GetDisplayDPI(int displayIndex, float * ddpi, float * hdpi, float * vdpi);
    1.61 +
    1.62 +/**
    1.63 + *  \brief Get the orientation of a display
    1.64 + *
    1.65 + *  \return The orientation of the display, or SDL_ORIENTATION_UNKNOWN if it isn't available.
    1.66 + *
    1.67 + *  \sa SDL_GetNumVideoDisplays()
    1.68 + */
    1.69 +extern DECLSPEC SDL_DisplayOrientation SDLCALL SDL_GetDisplayOrientation(int displayIndex);
    1.70 +
    1.71 +/**
    1.72   *  \brief Returns the number of available display modes.
    1.73   *
    1.74   *  \sa SDL_GetDisplayMode()