graphicscomposition/openwfcompositionengine/adaptation/include/owfscreen.h
changeset 152 9f1c3fea0f87
parent 0 5d03bc08d59c
child 164 25ffed67c7ef
equal deleted inserted replaced
111:29ddb8a72f0e 152:9f1c3fea0f87
     1 /* Copyright (c) 2009 The Khronos Group Inc.
     1 /* Copyright (c) 2009 The Khronos Group Inc.
       
     2  * Portions copyright (c) 2009-2010  Nokia Corporation and/or its subsidiary(-ies)
     2  *
     3  *
     3  * Permission is hereby granted, free of charge, to any person obtaining a
     4  * Permission is hereby granted, free of charge, to any person obtaining a
     4  * copy of this software and/or associated documentation files (the
     5  * copy of this software and/or associated documentation files (the
     5  * "Materials"), to deal in the Materials without restriction, including
     6  * "Materials"), to deal in the Materials without restriction, including
     6  * without limitation the rights to use, copy, modify, merge, publish,
     7  * without limitation the rights to use, copy, modify, merge, publish,
    65     OWF_PIXEL_FORMAT pixelFormat;
    66     OWF_PIXEL_FORMAT pixelFormat;
    66     OWF_ORIENTATION_INFO normal;
    67     OWF_ORIENTATION_INFO normal;
    67     OWF_ORIENTATION_INFO flipped;
    68     OWF_ORIENTATION_INFO flipped;
    68 } OWF_SCREEN;
    69 } OWF_SCREEN;
    69 
    70 
    70 typedef void (*OWF_SCREEN_CALLBACK)(void* obj, OWFint screenNumber, char event);
       
    71 
       
    72 /*!
    71 /*!
    73  * \brief Get systems's default screen
    72  * \brief Get systems's default screen
    74  *
    73  *
    75  * \return The screen number of systems default screen
    74  * \return The screen number of systems default screen
    76  */
    75  */
    78 OWF_Screen_GetDefaultNumber();
    77 OWF_Screen_GetDefaultNumber();
    79 
    78 
    80 /*!
    79 /*!
    81  * \brief Get screen's dimensions
    80  * \brief Get screen's dimensions
    82  *
    81  *
    83  * \param screen screen number
    82  * \param dc display context
    84  * \param header returned screen attributes
    83  * \param header returned screen attributes
    85  *
    84  *
    86  * \return OWF_TRUE if screen exists
    85  * \return OWF_TRUE if screen exists
    87  * \return OWF_FALSE if screen does not exist
    86  * \return OWF_FALSE if screen does not exist
    88  */
    87  */
    89 OWF_API_CALL OWFboolean
    88 OWF_API_CALL OWFboolean
    90 OWF_Screen_GetHeader(OWFint screen, OWF_SCREEN* header);
    89 OWF_Screen_GetHeader(OWF_DISPCTX dc, OWF_SCREEN* header);
    91 
    90 
    92 OWF_API_CALL OWFboolean
    91 /*!
    93 OWF_Number_Of_Screens(OWFint *pNumberOfScreens);
    92  * \brief Validate a screen number
    94 
    93  *
       
    94  * \param screen screen number
       
    95  *
       
    96  * \return OWF_TRUE if screen exists
       
    97  * \return OWF_FALSE if screen does not exist
       
    98  */
    95 OWF_API_CALL OWFboolean
    99 OWF_API_CALL OWFboolean
    96 OWF_Screen_Valid(OWFint screen);
   100 OWF_Screen_Valid(OWFint screen);
    97 
       
    98 OWF_API_CALL OWFboolean
       
    99 OWF_Screen_Valid_And_Available(OWFint screen);
       
   100 
   101 
   101 /*!
   102 /*!
   102  * \brief Checks if the screen rotation support is enabled
   103  * \brief Checks if the screen rotation support is enabled
   103  *
   104  *
   104  * \param screen screen number
   105  * \param dc display context
   105  *
   106  *
   106  * \return OWF_TRUE if the screen rotation is enabled
   107  * \return OWF_TRUE if the screen rotation is enabled
   107  * \return OWF_FALSE if the screen rotation is enabled
   108  * \return OWF_FALSE if the screen rotation is enabled
   108  */
   109  */
   109 OWF_API_CALL OWFboolean
   110 OWF_API_CALL OWFboolean
   110 OWF_Screen_Rotation_Supported(OWFint screen);
   111 OWF_Screen_Rotation_Supported(OWF_DISPCTX dc);
   111 
   112 
   112 /*!
   113 /*!
   113  * \brief Create a new screen
   114  * \brief Create a new screen
   114  *
   115  *
   115  * \param width
   116  * \param dc display context
   116  * \param height
   117  * \param screen screen number
   117  *
   118  *
   118  * \return screen number
   119  * \return OWF_TRUE if screen exists
       
   120  * \return OWF_FALSE if screen does not exist
   119  */
   121  */
   120 OWF_API_CALL OWFint
   122 OWF_API_CALL OWFboolean
   121 OWF_Screen_Create(OWFint width, OWFint height, OWF_SCREEN_CALLBACK func, void* obj);
   123 OWF_Screen_Create(OWFint screen, OWF_DISPCTX dc);
   122 
   124 
   123 /*!
   125 /*!
   124  * \brief Destroy a screen
   126  * \brief Destroy a screen
   125  *
   127  *
   126  * \param screen number
   128  * \param dc display context
   127  *
   129  *
   128  * \return OWF_TRUE if screen exists
   130  * \return OWF_TRUE if screen exists
   129  * \return OWF_FALSE if screen does not exist
   131  * \return OWF_FALSE if screen does not exist
   130  */
   132  */
   131 OWF_API_CALL void
   133 OWF_API_CALL void
   132 OWF_Screen_Destroy(OWFint screenNumber);
   134 OWF_Screen_Destroy(OWF_DISPCTX dc);
   133 
       
   134 /*!
       
   135  * \brief Resize screen
       
   136  *
       
   137  * \param width
       
   138  * \param height
       
   139  *
       
   140  * \return OWF_TRUE if resize OK
       
   141  * \return OWF_FALSE if resize failed.
       
   142  */
       
   143 OWF_API_CALL OWFboolean
       
   144 OWF_Screen_Resize(OWFint screen, OWFint width, OWFint height);
       
   145 
   135 
   146 /*!
   136 /*!
   147  * \brief Blit image to screen
   137  * \brief Blit image to screen
   148  *
   138  *
   149  * \param screen screen number
   139  * \param dc display context
   150  * \param rotation the context rotation
   140  * \param dc stream the stream containing the buffer to be displayed
       
   141  * rotation the current context rotation
   151  *
   142  *
   152  * \return OWF_TRUE if screen exists and blitting is  OK
   143  * \return OWF_TRUE if screen exists and blitting is  OK
   153  * \return OWF_FALSE if screen does not exist or blitting is not allowed.
   144  * \return OWF_FALSE if screen does not exist or blitting is not allowed.
   154  */
   145  */
   155 OWF_API_CALL OWFboolean
   146 OWF_API_CALL OWFboolean
   156 OWF_Screen_Blit(OWFint screen, void* buffer, OWF_ROTATION rotation);
   147 OWF_Screen_Post_Topmost_Layer(OWF_DISPCTX dc, OWFNativeStreamType stream, OWF_ROTATION rotation);
   157 
       
   158 /*!
       
   159  * \brief Notify objects
       
   160  *
       
   161  * Send data to objects associated with screens
       
   162  *
       
   163  * \param data
       
   164  *
       
   165  */
       
   166 OWF_API_CALL void
       
   167 OWF_Screen_Notify(void* data);
       
   168 
   148 
   169 #ifdef __cplusplus
   149 #ifdef __cplusplus
   170 }
   150 }
   171 #endif
   151 #endif
   172 
   152