MiniDisplay.h
author sl
Mon, 07 Jul 2014 22:27:56 +0200
changeset 3 d235c10ff460
parent 2 d8186e7b69bf
child 4 36894fc4dad6
permissions -rw-r--r--
Adding APIs for size and set pixel.
     1 //
     2 //
     3 //
     4 
     5 #ifndef MINI_DISPLAY_H
     6 #define MINI_DISPLAY_H
     7 
     8 /* Cmake will define MyLibrary_EXPORTS on Windows when it
     9 configures to build a shared library. If you are going to use
    10 another build system on windows or create the visual studio
    11 projects by hand you need to define MyLibrary_EXPORTS when
    12 building a DLL on windows.
    13 */
    14 // We are using the Visual Studio Compiler and building Shared libraries
    15 
    16 #if defined (_WIN32) 
    17   #if defined(MiniDisplay_EXPORTS)
    18     #define  MDAPI __declspec(dllexport)
    19   #else
    20     #define  MDAPI __declspec(dllimport)
    21   #endif /* MyLibrary_EXPORTS */
    22 #else /* defined (_WIN32) */
    23  #define MDAPI
    24 #endif
    25 
    26 typedef void* MiniDisplayDevice;
    27 
    28 //Open & Close functions
    29 extern "C" MDAPI MiniDisplayDevice MiniDisplayOpen();
    30 extern "C" MDAPI void MiniDisplayClose(MiniDisplayDevice aDevice);
    31 
    32 /**
    33 Clear our MiniDisplay.
    34 @param [IN] The device to apply this command to.
    35 */
    36 extern "C" MDAPI void MiniDisplayClear(MiniDisplayDevice aDevice);
    37 
    38 /**
    39 Fill our MiniDisplay.
    40 @param [IN] The device to apply this command to.
    41 */
    42 extern "C" MDAPI void MiniDisplayFill(MiniDisplayDevice aDevice);
    43 
    44 /**
    45 Swap our MiniDisplay buffers committing our back buffer content to the screen.
    46 @param [IN] The device to apply this command to.
    47 */
    48 extern "C" MDAPI void MiniDisplaySwapBuffers(MiniDisplayDevice aDevice);
    49 
    50 /**
    51 Provide maximum brightness level for the given device.
    52 @param [IN] The device to apply this command to.
    53 @return Maximum brightness level.
    54 */
    55 extern "C" MDAPI int MiniDisplayMaxBrightness(MiniDisplayDevice aDevice);
    56 
    57 /**
    58 Provide minimum brightness level for the given device.
    59 @param [IN] The device to apply this command to.
    60 @return Minimum brightness level.
    61 */
    62 extern "C" MDAPI int MiniDisplayMinBrightness(MiniDisplayDevice aDevice);
    63 
    64 /**
    65 Set device brightness level.
    66 @param [IN] The device to apply this command to.
    67 @param [IN] Brightness level
    68 */
    69 extern "C" MDAPI void MiniDisplaySetBrightness(MiniDisplayDevice aDevice, int aBrightness);
    70 
    71 /**
    72 Provide pixels width of our display.
    73 @param [IN] The device to apply this command to.
    74 @return Width in pixels.
    75 */
    76 extern "C" MDAPI int MiniDisplayWidthInPixels(MiniDisplayDevice aDevice);
    77 
    78 /**
    79 Provide pixels height of our display.
    80 @param [IN] The device to apply this command to.
    81 @return Height in pixels.
    82 */
    83 extern "C" MDAPI int MiniDisplayHeightInPixels(MiniDisplayDevice aDevice);
    84 
    85 /**
    86 Set our given pixel.
    87 @param [IN] The device to apply this command to.
    88 @param [IN] Pixel X coordinate.
    89 @param [IN] Pixel Y coordinate.
    90 @param [IN] Pixel value.
    91 */
    92 extern "C" MDAPI void MiniDisplaySetPixel(MiniDisplayDevice aDevice, int aX, int aY, int aValue);
    93 
    94 //TODO: Have an API to specify pixel depth
    95 
    96 
    97 #endif
    98