Pepper_47_C_interfaces
ppb_remote_controller_samsung.h
Go to the documentation of this file.
1 /* Copyright 2016 Samsung Electronics. 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 samsung/ppb_remote_controller_samsung.idl,
7  * modified Fri Oct 7 12:45:45 2016.
8  */
9 
10 #ifndef PPAPI_C_SAMSUNG_PPB_REMOTE_CONTROLLER_SAMSUNG_H_
11 #define PPAPI_C_SAMSUNG_PPB_REMOTE_CONTROLLER_SAMSUNG_H_
12 
13 #include "ppapi/c/pp_instance.h"
14 #include "ppapi/c/pp_macros.h"
15 #include "ppapi/c/pp_stdint.h"
16 
17 #define PPB_REMOTECONTROLLER_SAMSUNG_INTERFACE_0_1 \
18  "PPB_RemoteController_Samsung;0.1"
19 #define PPB_REMOTECONTROLLER_SAMSUNG_INTERFACE \
20  PPB_REMOTECONTROLLER_SAMSUNG_INTERFACE_0_1
21 
22 /**
23  * @file
24  * This file defines <code>PPB_RemoteController_Samsung</code> interface,
25  * which can be used for various actions related to TV Remote Controller like
26  * registering for input Keys.
27  *
28  * See
29  * <code>https://www.samsungdforum.com/TizenGuide/tizen231/index.html</code>
30  * for description of Remote Controller and its keys.
31  */
32 
33 
34 /**
35  * @addtogroup Interfaces
36  * @{
37  */
38 /**
39  * The PPB_RemoteControl_Samsung interface contains pointer to functions
40  * related to Remote Controller.
41  *
42  * See
43  * <code>https://www.samsungdforum.com/TizenGuide/tizen231/index.html</code>
44  * for description of Remote Controller and its keys.
45  */
47  /**
48  * RegisterKeys() function registers given key arrays to be grabbed by
49  * the application/widget containing pepper plugin calling this method.
50  *
51  * <strong>Note:</strong>
52  * After registering for grabbing keys, events related to that key
53  * will be delivered directly to the application/widget.
54  *
55  * <strong>Note:</strong>
56  * For some embedders, we can`t tell if key that we try to register have
57  * failed because it have been already registered. So if at least one key
58  * have been successfully processed, we assume that other keys that failed,
59  * have been already registered before this call.
60  *
61  * @param[in] instance A <code>PP_Instance</code> identifying instance
62  * of the module
63  * @param[in] key_count A number of keys which will be grabbed.
64  * @param[in] keys An array containing list of keys which should be grabbed.
65  *
66  * @return An int32_t containing an error code from <code>pp_errors.h</code>.
67  * Returns <code>PP_ERROR_BADARGUMENT</code> if <code>key_count</code> is
68  * equal 0 or one of <code>keys</code> is not supported anymore.
69  * Returns <code>PP_ERROR_NOTSUPPORTED</code> if currently launched embedder
70  * doesn`t support key registering.
71  * Returns <code>PP_ERROR_FAILED</code> if registering all <code>keys</code>
72  * have failed.
73  * Returns <code>PP_OK</code> if at lest one key from <code>keys</code> have
74  * been registered.
75  */
76  int32_t (*RegisterKeys)(PP_Instance instance,
77  uint32_t key_count,
78  const char* keys[]);
79  /**
80  * UnregisterKeys() function unregisters given key arrays from being grabbed
81  * by the application/widget containing pepper plugin calling this method.
82  *
83  * <strong>Note:</strong>
84  * For some embedders, we can`t tell if key that we try to unregister have
85  * failed because it have been already unregistered. So if at least one key
86  * have been successfully processed, we assume that other keys that failed,
87  * have been already unregistered before this call.
88  *
89  * @param[in] instance A <code>PP_Instance</code> identifying instance
90  * of the module
91  * @param[in] key_count A number of keys which will be grabbed.
92  * @param[in] keys An array containing list of keys which should be grabbed.
93  *
94  * @return An int32_t containing an error code from <code>pp_errors.h</code>.
95  * Returns <code>PP_ERROR_BADARGUMENT</code> if <code>key_count</code> is
96  * equal 0 or one of <code>keys</code> is not supported anymore.
97  * Returns <code>PP_ERROR_NOTSUPPORTED</code> if currently launched embedder
98  * doesn`t support key registering.
99  * Returns <code>PP_ERROR_FAILED</code> if registering all <code>keys</code>
100  * have failed.
101  * Returns <code>PP_OK</code> if at lest one key from <code>keys</code> have
102  * been registered.
103  */
104  int32_t (*UnRegisterKeys)(PP_Instance instance,
105  uint32_t key_count,
106  const char* keys[]);
107 };
108 
110 /**
111  * @}
112  */
113 
114 #endif /* PPAPI_C_SAMSUNG_PPB_REMOTE_CONTROLLER_SAMSUNG_H_ */
115 
int32_t(* RegisterKeys)(PP_Instance instance, uint32_t key_count, const char *keys[])
int32_t PP_Instance
Definition: pp_instance.h:34
int32_t(* UnRegisterKeys)(PP_Instance instance, uint32_t key_count, const char *keys[])