Pepper_47_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"
20 
21 namespace pp {
22 
24  public:
25  /** Default constructor for creating an is_null()
26  * <code>CompositorLayerSamsung</code> object.
27  */
29 
30  /** The copy constructor for <code>CompositorLayerSamsung</code>.
31  *
32  * @param[in] other A reference to a <code>CompositorLayerSamsung</code>.
33  */
35 
36  /** Constructs a <code>CompositorLayerSamsung</code> from
37  * a <code>CompositorLayer</code>.
38  *
39  * @param[in] other A reference to a <code>CompositorLayer</code>.
40  */
42 
43  /** Constructs a <code>CompositorLayer</code> from a <code>Resource</code>.
44  *
45  * @param[in] resource A <code>PPB_CompositorLayer</code> resource.
46  */
47  explicit CompositorLayerSamsung(const Resource& resource);
48 
49  /** A constructor used when you have received a <code>PP_Resource</code> as a
50  * return value that has had 1 ref added for you.
51  *
52  * @param[in] resource A <code>PPB_CompositorLayer_Samsung</code> resource.
53  */
55 
56  /** Destructor.
57  */
59 
60  /**
61  * Sets the background plane layer, which allows to present
62  * background plane content.
63  * If the layer is uninitialized, it will initialize the layer first,
64  * and then set the background plane.
65  * If the layer has been initialized to another kind of layer, the layer will
66  * not be changed, and <code>PP_ERROR_BADARGUMENT</code> will be returned.
67  * Position of layer can be controlled using <code>SetClipRect</code>
68  * method from <code>PPB_CompositorLayer</code>.
69  *
70  * param[in] layer A <code>PP_Resource</code> corresponding to a compositor
71  * layer resource.
72  * param[in] size A <code>PP_Size</code> for the size of the layer before
73  * transform.
74  *
75  * @return An int32_t containing a result code from <code>pp_errors.h</code>.
76  */
77  int32_t SetBackgroundPlane(const Size& size);
78 
79  /**
80  * Checks whether a <code>Resource</code> is a compositor layer samsung,
81  * to test whether it is appropriate for use with the
82  * <code>CompositorLayerSamsung</code> constructor.
83  *
84  * @param[in] resource A <code>Resource</code> to test.
85  *
86  * @return True if <code>resource</code> is a compositor layer.
87  */
88  static bool IsCompositorLayerSamsung(const Resource& resource);
89 };
90 
91 } // namespace pp
92 
93 #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