Pepper_47_C_interfaces
Main Page
Modules
Classes
Files
File List
File Members
pp_size.h
Go to the documentation of this file.
1
/* Copyright (c) 2012 The Chromium Authors. All rights reserved.
2
* Use of this source code is governed by a BSD-style license that can be
3
* found in the LICENSE file.
4
*/
5
6
/* From pp_size.idl modified Thu Oct 20 13:57:04 2016. */
7
8
#ifndef PPAPI_C_PP_SIZE_H_
9
#define PPAPI_C_PP_SIZE_H_
10
11
#include "
ppapi/c/pp_macros.h
"
12
#include "
ppapi/c/pp_stdint.h
"
13
14
/**
15
* @file
16
* This file defines the width and height of a 2D rectangle.
17
*/
18
19
20
/**
21
* @addtogroup Structs
22
* @{
23
*/
24
/**
25
* The <code>PP_Size</code> struct contains the size of a 2D rectangle.
26
*/
27
struct
PP_Size
{
28
/** This value represents the width of the rectangle. */
29
int32_t
width
;
30
/** This value represents the height of the rectangle. */
31
int32_t
height
;
32
};
33
PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES
(
PP_Size
, 8);
34
35
/**
36
* The <code>PP_FloatSize</code> struct contains the size of a 2D rectangle.
37
*/
38
struct
PP_FloatSize
{
39
/** This value represents the width of the rectangle. */
40
float
width
;
41
/** This value represents the height of the rectangle. */
42
float
height
;
43
};
44
/**
45
* @}
46
*/
47
48
/**
49
* @addtogroup Functions
50
* @{
51
*/
52
53
/**
54
* PP_MakeSize() creates a <code>PP_Size</code> given a width and height as
55
* int32_t values.
56
*
57
* @param[in] w An int32_t value representing a width.
58
* @param[in] h An int32_t value representing a height.
59
*
60
* @return A <code>PP_Size</code> structure.
61
*/
62
PP_INLINE
struct
PP_Size
PP_MakeSize
(int32_t w, int32_t h) {
63
struct
PP_Size
ret;
64
ret.
width
= w;
65
ret.
height
= h;
66
return
ret;
67
}
68
69
/**
70
* PP_MakeFloatSize() creates a <code>PP_FloatSize</code> given a
71
* width and height as float values.
72
*
73
* @param[in] w An float value representing a width.
74
* @param[in] h An float value representing a height.
75
*
76
* @return A <code>PP_FloatSize</code> structure.
77
*/
78
PP_INLINE
struct
PP_FloatSize
PP_MakeFloatSize
(float w, float h) {
79
struct
PP_FloatSize
ret;
80
ret.
width
= w;
81
ret.
height
= h;
82
return
ret;
83
}
84
/**
85
* @}
86
*/
87
#endif
/* PPAPI_C_PP_SIZE_H_ */
88
pp_macros.h
PP_MakeFloatSize
PP_INLINE struct PP_FloatSize PP_MakeFloatSize(float w, float h)
Definition:
pp_size.h:78
PP_INLINE
#define PP_INLINE
Definition:
pp_macros.h:46
PP_FloatSize::width
float width
Definition:
pp_size.h:40
PP_FloatSize
Definition:
pp_size.h:38
PP_Size::height
int32_t height
Definition:
pp_size.h:31
PP_MakeSize
PP_INLINE struct PP_Size PP_MakeSize(int32_t w, int32_t h)
Definition:
pp_size.h:62
pp_stdint.h
PP_FloatSize::height
float height
Definition:
pp_size.h:42
PP_Size::width
int32_t width
Definition:
pp_size.h:29
PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES
PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_Size, 8)
PP_Size
Definition:
pp_size.h:27
Generated on Wed Apr 5 2017 11:09:16 for Pepper_47_C_interfaces by
1.8.6