orx  stable
Portable Game Engine
orxViewport.h
Go to the documentation of this file.
1 /* Orx - Portable Game Engine
2  *
3  * Copyright (c) 2008-2017 Orx-Project
4  *
5  * This software is provided 'as-is', without any express or implied
6  * warranty. In no event will the authors be held liable for any damages
7  * arising from the use of this software.
8  *
9  * Permission is granted to anyone to use this software for any purpose,
10  * including commercial applications, and to alter it and redistribute it
11  * freely, subject to the following restrictions:
12  *
13  * 1. The origin of this software must not be misrepresented; you must not
14  * claim that you wrote the original software. If you use this software
15  * in a product, an acknowledgment in the product documentation would be
16  * appreciated but is not required.
17  *
18  * 2. Altered source versions must be plainly marked as such, and must not be
19  * misrepresented as being the original software.
20  *
21  * 3. This notice may not be removed or altered from any source
22  * distribution.
23  */
24 
44 #ifndef _orxVIEWPORT_H_
45 #define _orxVIEWPORT_H_
46 
47 #include "orxInclude.h"
48 #include "core/orxClock.h"
49 #include "render/orxCamera.h"
51 #include "display/orxDisplay.h"
52 #include "display/orxTexture.h"
53 
54 
57 #define orxVIEWPORT_KU32_FLAG_ALIGN_CENTER 0x00000000
58 #define orxVIEWPORT_KU32_FLAG_ALIGN_LEFT 0x10000000
59 #define orxVIEWPORT_KU32_FLAG_ALIGN_RIGHT 0x20000000
60 #define orxVIEWPORT_KU32_FLAG_ALIGN_TOP 0x40000000
61 #define orxVIEWPORT_KU32_FLAG_ALIGN_BOTTOM 0x80000000
62 #define orxVIEWPORT_KU32_FLAG_NO_DEBUG 0x01000000
67 #define orxVIEWPORT_KU32_MAX_TEXTURE_NUMBER 8
68 
69 
71 typedef struct __orxVIEWPORT_t orxVIEWPORT;
72 
73 
76 typedef enum __orxVIEWPORT_EVENT_t
77 {
81 
82  orxVIEWPORT_EVENT_NONE = orxENUM_NONE
83 
85 
86 
89 extern orxDLLAPI void orxFASTCALL orxViewport_Setup();
90 
93 extern orxDLLAPI orxSTATUS orxFASTCALL orxViewport_Init();
94 
97 extern orxDLLAPI void orxFASTCALL orxViewport_Exit();
98 
99 
103 extern orxDLLAPI orxVIEWPORT *orxFASTCALL orxViewport_Create();
104 
109 extern orxDLLAPI orxVIEWPORT *orxFASTCALL orxViewport_CreateFromConfig(const orxSTRING _zConfigID);
110 
115 extern orxDLLAPI orxSTATUS orxFASTCALL orxViewport_Delete(orxVIEWPORT *_pstViewport);
116 
117 
122 extern orxDLLAPI void orxFASTCALL orxViewport_SetAlignment(orxVIEWPORT *_pstViewport, orxU32 _u32AlignFlags);
123 
124 
130 extern orxDLLAPI void orxFASTCALL orxViewport_SetTextureList(orxVIEWPORT *_pstViewport, orxU32 _u32TextureNumber, orxTEXTURE **_apstTextureList);
131 
138 extern orxDLLAPI orxSTATUS orxFASTCALL orxViewport_GetTextureList(const orxVIEWPORT *_pstViewport, orxU32 _u32TextureNumber, orxTEXTURE **_apstTextureList);
139 
144 extern orxDLLAPI orxU32 orxFASTCALL orxViewport_GetTextureCounter(const orxVIEWPORT *_pstViewport);
145 
146 
147 
153 extern orxDLLAPI orxSTATUS orxFASTCALL orxViewport_SetBackgroundColor(orxVIEWPORT *_pstViewport, const orxCOLOR *_pstColor);
154 
159 extern orxDLLAPI orxSTATUS orxFASTCALL orxViewport_ClearBackgroundColor(orxVIEWPORT *_pstViewport);
160 
165 extern orxDLLAPI orxBOOL orxFASTCALL orxViewport_HasBackgroundColor(const orxVIEWPORT *_pstViewport);
166 
172 extern orxDLLAPI orxCOLOR *orxFASTCALL orxViewport_GetBackgroundColor(const orxVIEWPORT *_pstViewport, orxCOLOR *_pstColor);
173 
174 
179 extern orxDLLAPI void orxFASTCALL orxViewport_Enable(orxVIEWPORT *_pstViewport, orxBOOL _bEnable);
180 
185 extern orxDLLAPI orxBOOL orxFASTCALL orxViewport_IsEnabled(const orxVIEWPORT *_pstViewport);
186 
187 
192 extern orxDLLAPI void orxFASTCALL orxViewport_SetCamera(orxVIEWPORT *_pstViewport, orxCAMERA *_pstCamera);
193 
198 extern orxDLLAPI orxCAMERA *orxFASTCALL orxViewport_GetCamera(const orxVIEWPORT *_pstViewport);
199 
200 
206 extern orxDLLAPI orxSTATUS orxFASTCALL orxViewport_AddShader(orxVIEWPORT *_pstViewport, const orxSTRING _zShaderConfigID);
207 
213 extern orxDLLAPI orxSTATUS orxFASTCALL orxViewport_RemoveShader(orxVIEWPORT *_pstViewport, const orxSTRING _zShaderConfigID);
214 
219 extern orxDLLAPI void orxFASTCALL orxViewport_EnableShader(orxVIEWPORT *_pstViewport, orxBOOL _bEnable);
220 
225 extern orxDLLAPI orxBOOL orxFASTCALL orxViewport_IsShaderEnabled(const orxVIEWPORT *_pstViewport);
226 
231 extern orxDLLAPI const orxSHADERPOINTER *orxFASTCALL orxViewport_GetShaderPointer(const orxVIEWPORT *_pstViewport);
232 
233 
238 extern orxDLLAPI orxSTATUS orxFASTCALL orxViewport_SetBlendMode(orxVIEWPORT *_pstViewport, orxDISPLAY_BLEND_MODE _eBlendMode);
239 
244 extern orxDLLAPI orxDISPLAY_BLEND_MODE orxFASTCALL orxViewport_GetBlendMode(const orxVIEWPORT *_pstViewport);
245 
246 
252 extern orxDLLAPI void orxFASTCALL orxViewport_SetPosition(orxVIEWPORT *_pstViewport, orxFLOAT _fX, orxFLOAT _fY);
253 
259 extern orxDLLAPI orxSTATUS orxFASTCALL orxViewport_SetRelativePosition(orxVIEWPORT *_pstViewport, orxU32 _u32AlignFlags);
260 
266 extern orxDLLAPI void orxFASTCALL orxViewport_GetPosition(const orxVIEWPORT *_pstViewport, orxFLOAT *_pfX, orxFLOAT *_pfY);
267 
268 
274 extern orxDLLAPI void orxFASTCALL orxViewport_SetSize(orxVIEWPORT *_pstViewport, orxFLOAT _fWidth, orxFLOAT _fHeight);
275 
282 extern orxDLLAPI orxSTATUS orxFASTCALL orxViewport_SetRelativeSize(orxVIEWPORT *_pstViewport, orxFLOAT _fWidth, orxFLOAT _fHeight);
283 
289 extern orxDLLAPI void orxFASTCALL orxViewport_GetSize(const orxVIEWPORT *_pstViewport, orxFLOAT *_pfWidth, orxFLOAT *_pfHeight);
290 
296 extern orxDLLAPI void orxFASTCALL orxViewport_GetRelativeSize(const orxVIEWPORT *_pstViewport, orxFLOAT *_pfWidth, orxFLOAT *_pfHeight);
297 
303 extern orxDLLAPI orxAABOX *orxFASTCALL orxViewport_GetBox(const orxVIEWPORT *_pstViewport, orxAABOX *_pstBox);
304 
309 extern orxDLLAPI orxFLOAT orxFASTCALL orxViewport_GetCorrectionRatio(const orxVIEWPORT *_pstViewport);
310 
315 extern orxDLLAPI const orxSTRING orxFASTCALL orxViewport_GetName(const orxVIEWPORT *_pstViewport);
316 
317 #endif /* _orxVIEWPORT_H_ */
318 
orxDLLAPI void orxFASTCALL orxViewport_SetAlignment(orxVIEWPORT *_pstViewport, orxU32 _u32AlignFlags)
orxDLLAPI const orxSHADERPOINTER *orxFASTCALL orxViewport_GetShaderPointer(const orxVIEWPORT *_pstViewport)
orxDLLAPI orxBOOL orxFASTCALL orxViewport_IsShaderEnabled(const orxVIEWPORT *_pstViewport)
orxDLLAPI void orxFASTCALL orxViewport_Exit()
struct __orxTEXTURE_t orxTEXTURE
Definition: orxTexture.h:77
orxDLLAPI orxSTATUS orxFASTCALL orxViewport_AddShader(orxVIEWPORT *_pstViewport, const orxSTRING _zShaderConfigID)
orxDLLAPI orxBOOL orxFASTCALL orxViewport_HasBackgroundColor(const orxVIEWPORT *_pstViewport)
struct __orxCAMERA_t orxCAMERA
Definition: orxCamera.h:72
orxVIEWPORT_EVENT
Definition: orxViewport.h:76
orxDLLAPI orxFLOAT orxFASTCALL orxViewport_GetCorrectionRatio(const orxVIEWPORT *_pstViewport)
orxDLLAPI void orxFASTCALL orxViewport_GetRelativeSize(const orxVIEWPORT *_pstViewport, orxFLOAT *_pfWidth, orxFLOAT *_pfHeight)
orxDLLAPI orxSTATUS orxFASTCALL orxViewport_Delete(orxVIEWPORT *_pstViewport)
orxDLLAPI orxSTATUS orxFASTCALL orxViewport_SetRelativeSize(orxVIEWPORT *_pstViewport, orxFLOAT _fWidth, orxFLOAT _fHeight)
orxDLLAPI orxVIEWPORT *orxFASTCALL orxViewport_CreateFromConfig(const orxSTRING _zConfigID)
orxDLLAPI orxSTATUS orxFASTCALL orxViewport_SetBlendMode(orxVIEWPORT *_pstViewport, orxDISPLAY_BLEND_MODE _eBlendMode)
orxDLLAPI orxCAMERA *orxFASTCALL orxViewport_GetCamera(const orxVIEWPORT *_pstViewport)
orxDLLAPI orxSTATUS orxFASTCALL orxViewport_SetRelativePosition(orxVIEWPORT *_pstViewport, orxU32 _u32AlignFlags)
orxDLLAPI void orxFASTCALL orxViewport_SetCamera(orxVIEWPORT *_pstViewport, orxCAMERA *_pstCamera)
orxDLLAPI void orxFASTCALL orxViewport_SetPosition(orxVIEWPORT *_pstViewport, orxFLOAT _fX, orxFLOAT _fY)
orxDLLAPI orxBOOL orxFASTCALL orxViewport_IsEnabled(const orxVIEWPORT *_pstViewport)
orxDLLAPI void orxFASTCALL orxViewport_SetSize(orxVIEWPORT *_pstViewport, orxFLOAT _fWidth, orxFLOAT _fHeight)
orxDLLAPI void orxFASTCALL orxViewport_Enable(orxVIEWPORT *_pstViewport, orxBOOL _bEnable)
orxSTATUS
Definition: orxType.h:243
orxDLLAPI orxSTATUS orxFASTCALL orxViewport_GetTextureList(const orxVIEWPORT *_pstViewport, orxU32 _u32TextureNumber, orxTEXTURE **_apstTextureList)
orxDLLAPI orxAABOX *orxFASTCALL orxViewport_GetBox(const orxVIEWPORT *_pstViewport, orxAABOX *_pstBox)
orxDLLAPI orxSTATUS orxFASTCALL orxViewport_ClearBackgroundColor(orxVIEWPORT *_pstViewport)
#define orxDLLAPI
Definition: orxDecl.h:387
orxDLLAPI orxSTATUS orxFASTCALL orxViewport_RemoveShader(orxVIEWPORT *_pstViewport, const orxSTRING _zShaderConfigID)
orxDISPLAY_BLEND_MODE
Definition: orxDisplay.h:151
orxDLLAPI orxSTATUS orxFASTCALL orxViewport_SetBackgroundColor(orxVIEWPORT *_pstViewport, const orxCOLOR *_pstColor)
orxDLLAPI orxCOLOR *orxFASTCALL orxViewport_GetBackgroundColor(const orxVIEWPORT *_pstViewport, orxCOLOR *_pstColor)
orxDLLAPI const orxSTRING orxFASTCALL orxViewport_GetName(const orxVIEWPORT *_pstViewport)
orxDLLAPI void orxFASTCALL orxViewport_SetTextureList(orxVIEWPORT *_pstViewport, orxU32 _u32TextureNumber, orxTEXTURE **_apstTextureList)
struct __orxSHADERPOINTER_t orxSHADERPOINTER
orxDLLAPI void orxFASTCALL orxViewport_GetSize(const orxVIEWPORT *_pstViewport, orxFLOAT *_pfWidth, orxFLOAT *_pfHeight)
orxDLLAPI void orxFASTCALL orxViewport_EnableShader(orxVIEWPORT *_pstViewport, orxBOOL _bEnable)
orxDLLAPI orxDISPLAY_BLEND_MODE orxFASTCALL orxViewport_GetBlendMode(const orxVIEWPORT *_pstViewport)
orxDLLAPI orxU32 orxFASTCALL orxViewport_GetTextureCounter(const orxVIEWPORT *_pstViewport)
orxDLLAPI orxSTATUS orxFASTCALL orxViewport_Init()
orxDLLAPI void orxFASTCALL orxViewport_GetPosition(const orxVIEWPORT *_pstViewport, orxFLOAT *_pfX, orxFLOAT *_pfY)
struct __orxVIEWPORT_t orxVIEWPORT
Definition: orxViewport.h:71
orxDLLAPI void orxFASTCALL orxViewport_Setup()
orxDLLAPI orxVIEWPORT *orxFASTCALL orxViewport_Create()

Generated for orx by doxygen 1.5.6