Pepper_42_C++_interfaces
compositor_layer_samsung.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015 Samsung Electronics, Visual Display Division.
3  * All Rights Reserved.
4  *
5  * @author Michal Jurkiewicz <m.jurkiewicz@samsung.com>
6  *
7  * This source code is written basing on the Chromium source code.
8  *
9  * Copyright (c) 2014 The Chromium Authors. All rights reserved.
10  *
11  * Use of this source code is governed by a BSD-style license that can be
12  * found in the Chromium-LICENSE file.
13  */
14 
15 #ifndef PPAPI_CPP_SAMSUNG_COMPOSITOR_LAYER_SAMSUNG_H_
16 #define PPAPI_CPP_SAMSUNG_COMPOSITOR_LAYER_SAMSUNG_H_
17 
18 #include "ppapi/c/samsung/ppb_compositor_layer_samsung.h"
19 #include "ppapi/cpp/compositor_layer.h"
20 
21 namespace pp {
22 
24 public:
25 
26  /** Default constructor for creating an is_null()
27  * <code>CompositorLayerSamsung</code> object.
28  */
30 
31  /** The copy constructor for <code>CompositorLayerSamsung</code>.
32  *
33  * @param[in] other A reference to a <code>CompositorLayerSamsung</code>.
34  */
36 
37  /** Constructs a <code>CompositorLayerSamsung</code> from
38  * a <code>CompositorLayer</code>.
39  *
40  * @param[in] other A reference to a <code>CompositorLayer</code>.
41  */
43 
44  /** Constructs a <code>CompositorLayer</code> from a <code>Resource</code>.
45  *
46  * @param[in] resource A <code>PPB_CompositorLayer</code> resource.
47  */
48  explicit CompositorLayerSamsung(const Resource& resource);
49 
50  /** A constructor used when you have received a <code>PP_Resource</code> as a
51  * return value that has had 1 ref added for you.
52  *
53  * @param[in] resource A <code>PPB_CompositorLayer_Samsung</code> resource.
54  */
56 
57  /** Destructor.
58  */
60 
61  /**
62  * Sets the background plane layer, which allows to present
63  * background plane content.
64  * If the layer is uninitialized, it will initialize the layer first,
65  * and then set the background plane.
66  * If the layer has been initialized to another kind of layer, the layer will
67  * not be changed, and <code>PP_ERROR_BADARGUMENT</code> will be returned.
68  * Position of layer can be controlled using <code>SetClipRect</code>
69  * method from <code>PPB_CompositorLayer</code>.
70  *
71  * param[in] layer A <code>PP_Resource</code> corresponding to a compositor
72  * layer resource.
73  * param[in] size A <code>PP_Size</code> for the size of the layer before
74  * transform.
75  *
76  * @return An int32_t containing a result code from <code>pp_errors.h</code>.
77  */
78  int32_t SetBackgroundPlane(const Size& size);
79 
80  /**
81  * Checks whether a <code>Resource</code> is a compositor layer samsung,
82  * to test whether it is appropriate for use with the
83  * <code>CompositorLayerSamsung</code> constructor.
84  *
85  * @param[in] resource A <code>Resource</code> to test.
86  *
87  * @return True if <code>resource</code> is a compositor layer.
88  */
89  static bool IsCompositorLayerSamsung(const Resource& resource);
90 };
91 
92 } // namespace pp
93 
94 #endif // PPAPI_CPP_SAMSUNG_COMPOSITOR_LAYER_SAMSUNG_H_
static bool IsCompositorLayerSamsung(const Resource &resource)
A size of an object based on width and height.
Definition: size.h:18
PassRef
Definition: pass_ref.h:17
int32_t SetBackgroundPlane(const Size &size)
A reference counted module resource.
Definition: resource.h:20