os/graphics/graphicscomposition/openwfcompositionengine/adaptation/include/owfscreen.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/graphics/graphicscomposition/openwfcompositionengine/adaptation/include/owfscreen.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,154 @@
     1.4 +/* Copyright (c) 2009 The Khronos Group Inc.
     1.5 + * Portions copyright (c) 2009-2010  Nokia Corporation and/or its subsidiary(-ies)
     1.6 + *
     1.7 + * Permission is hereby granted, free of charge, to any person obtaining a
     1.8 + * copy of this software and/or associated documentation files (the
     1.9 + * "Materials"), to deal in the Materials without restriction, including
    1.10 + * without limitation the rights to use, copy, modify, merge, publish,
    1.11 + * distribute, sublicense, and/or sell copies of the Materials, and to
    1.12 + * permit persons to whom the Materials are furnished to do so, subject to
    1.13 + * the following conditions:
    1.14 + *
    1.15 + * The above copyright notice and this permission notice shall be included
    1.16 + * in all copies or substantial portions of the Materials.
    1.17 + *
    1.18 + * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
    1.19 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
    1.20 + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
    1.21 + * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
    1.22 + * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
    1.23 + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
    1.24 + * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
    1.25 + */
    1.26 +
    1.27 +#ifndef _owfscreen_h
    1.28 +#define _owfscreen_h
    1.29 +
    1.30 +/*
    1.31 + * owfscreen.h
    1.32 + *
    1.33 + * These functions connect composition/display to physical screen devices
    1.34 + */
    1.35 +
    1.36 +
    1.37 +#include "owftypes.h"
    1.38 +#include "owfimage.h"
    1.39 +#include "owfextensions.h"
    1.40 +
    1.41 +
    1.42 +#ifdef __cplusplus
    1.43 +extern "C" {
    1.44 +#endif
    1.45 +
    1.46 +#define OWF_INVALID_SCREEN_NUMBER   (0)
    1.47 +
    1.48 +/*  
    1.49 + * On-screen context size and color format
    1.50 + * SEE: /graphics/graphicscomposition/graphicscompositionengine/openwfcmigraion/gceopenwfclayerimpl.h
    1.51 + * */
    1.52 +#define OWF_SURFACE_WIDTH  (768) /* needs to be > 640 + 2 to allow S60 nHD config to work */
    1.53 +#define OWF_SURFACE_HEIGHT (768) /* needs to be > 640 + 2 to allow S60 nHD config to work */
    1.54 +#define OWF_SURFACE_PIXEL_FORMAT (OWF_IMAGE_XRGB8888)
    1.55 +#define OWF_SURFACE_LINEAR (OWF_FALSE)
    1.56 +#define OWF_SURFACE_ROWPADDING (4)
    1.57 +#define OWF_SURFACE_PREMULTIPLIED (OWF_FALSE)
    1.58 +
    1.59 +typedef struct {
    1.60 +    OWFint width;
    1.61 +    OWFint height;
    1.62 +    OWFint stride;
    1.63 +} OWF_ORIENTATION_INFO;
    1.64 +
    1.65 +typedef struct {
    1.66 +    OWFuint supportedRotations;
    1.67 +    OWF_ROTATION initialRotation;
    1.68 +    OWF_ROTATION currentRotation;
    1.69 +    OWF_PIXEL_FORMAT pixelFormat;
    1.70 +    OWF_ORIENTATION_INFO normal;
    1.71 +    OWF_ORIENTATION_INFO flipped;
    1.72 +} OWF_SCREEN;
    1.73 +
    1.74 +/*!
    1.75 + * \brief Get systems's default screen
    1.76 + *
    1.77 + * \return The screen number of systems default screen
    1.78 + */
    1.79 +OWF_API_CALL OWFint
    1.80 +OWF_Screen_GetDefaultNumber();
    1.81 +
    1.82 +/*!
    1.83 + * \brief Get screen's dimensions
    1.84 + *
    1.85 + * \param dc display context
    1.86 + * \param header returned screen attributes
    1.87 + *
    1.88 + * \return OWF_TRUE if screen exists
    1.89 + * \return OWF_FALSE if screen does not exist
    1.90 + */
    1.91 +OWF_API_CALL OWFboolean
    1.92 +OWF_Screen_GetHeader(OWF_DISPCTX dc, OWF_SCREEN* header);
    1.93 +
    1.94 +/*!
    1.95 + * \brief Validate a screen number
    1.96 + *
    1.97 + * \param screen screen number
    1.98 + *
    1.99 + * \return OWF_TRUE if screen exists
   1.100 + * \return OWF_FALSE if screen does not exist
   1.101 + */
   1.102 +OWF_API_CALL OWFboolean
   1.103 +OWF_Screen_Valid(OWFint screen);
   1.104 +
   1.105 +/*!
   1.106 + * \brief Checks if the screen rotation support is enabled
   1.107 + *
   1.108 + * \param dc display context
   1.109 + *
   1.110 + * \return OWF_TRUE if the screen rotation is enabled
   1.111 + * \return OWF_FALSE if the screen rotation is enabled
   1.112 + */
   1.113 +OWF_API_CALL OWFboolean
   1.114 +OWF_Screen_Rotation_Supported(OWF_DISPCTX dc);
   1.115 +
   1.116 +/*!
   1.117 + * \brief Create a new screen
   1.118 + *
   1.119 + * \param dc display context
   1.120 + * \param screen screen number
   1.121 + *
   1.122 + * \return OWF_TRUE if screen exists
   1.123 + * \return OWF_FALSE if screen does not exist
   1.124 + */
   1.125 +OWF_API_CALL OWFboolean
   1.126 +OWF_Screen_Create(OWFint screen, OWF_DISPCTX dc);
   1.127 +
   1.128 +/*!
   1.129 + * \brief Destroy a screen
   1.130 + *
   1.131 + * \param dc display context
   1.132 + *
   1.133 + * \return OWF_TRUE if screen exists
   1.134 + * \return OWF_FALSE if screen does not exist
   1.135 + */
   1.136 +OWF_API_CALL void
   1.137 +OWF_Screen_Destroy(OWF_DISPCTX dc);
   1.138 +
   1.139 +/*!
   1.140 + * \brief Blit image to screen
   1.141 + *
   1.142 + * \param dc display context
   1.143 + * \param dc stream the stream containing the buffer to be displayed
   1.144 + * rotation the current context rotation
   1.145 + *
   1.146 + * \return OWF_TRUE if screen exists and blitting is  OK
   1.147 + * \return OWF_FALSE if screen does not exist or blitting is not allowed.
   1.148 + */
   1.149 +OWF_API_CALL OWFboolean
   1.150 +OWF_Screen_Post_Topmost_Layer(OWF_DISPCTX dc, OWFNativeStreamType stream, OWF_ROTATION rotation);
   1.151 +
   1.152 +#ifdef __cplusplus
   1.153 +}
   1.154 +#endif
   1.155 +
   1.156 +
   1.157 +#endif