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.
7 * This file defines the <code>PP_Bool</code> enumeration for use in PPAPI C
12 * The <code>PP_Bool</code> enum is a boolean value for use in PPAPI C headers.
13 * The standard bool type is not available to pre-C99 compilers, and is not
14 * guaranteed to be compatible between C and C++, whereas the PPAPI C headers
15 * can be included from C or C++ code.
17 [assert_size
(4)] enum PP_Bool
{
24 * Converts a C++ "bool" type to a PP_Bool.
26 * @param[in] b A C++ "bool" type.
30 inline PP_Bool PP_FromBool
(bool b
) {
31 return b ? PP_TRUE
: PP_FALSE
;
35 * Converts a PP_Bool to a C++ "bool" type.
37 * @param[in] b A PP_Bool.
39 * @return A C++ "bool" type.
41 inline bool PP_ToBool
(PP_Bool b
) {
42 return
(b
!= PP_FALSE
);