2 * Copyright (c) 2013-2015 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #ifndef _MINICTRL_PROVIDER_H_
18 #define _MINICTRL_PROVIDER_H_
22 #include "minicontrol-error.h"
23 #include "minicontrol-type.h"
30 * @file minicontrol-provider.h
31 * @brief This minicontrol provider library used to create evas socket window.\n
32 * This library is providing functions for create a remote evas object to draw a minicontrol on a minicontrol viewer and\n
33 * sending some requests to the minicontrol viewer.\n
34 * Drawings on this remote evas object will be shown on the place ofthe minicontrol viewer.
38 * @addtogroup MINICONTROL_PROVIDER_MODULE
43 * @brief Called when a event comes from viewer
45 * @param[in] event_type The type of fired event
46 * @param[in] event_arg argument of the event
47 * @pre minicontrol_viewer_register_event_callback() used to register this callback.
48 * @see #minicontrol_create_window
49 * @see #minicontrol_viewer_event_e
51 typedef void (*minicontrol_event_cb) (minicontrol_viewer_event_e event_type, bundle *event_arg);
54 * @brief Creates a window for minicontrol.
57 * @privilege %http://tizen.org/privilege/minicontrol.provider
58 * @param[in] name Name of minicontrol socket window
59 * @param[in] target_viewer Target viewer for minicontrol. You can select multiple viewers by using bitwise OR operator.
60 * @param[in] callback a callback function for events originated by minicontrol viewer.
61 * @return Evas object of socket window. @c NULL failed to create, get_last_result() will returns reason of failure.
62 * @see #minicontrol_target_viewer_e
63 * @see #minicontrol_event_cb
65 Evas_Object* minicontrol_create_window(const char *name, minicontrol_target_viewer_e target_viewer, minicontrol_event_cb callback);
68 * @brief Sends a event to the viewer.
69 * @remarks When a viewer doesn't handle some events, it can be ignored.
72 * @privilege %http://tizen.org/privilege/minicontrol.provider
73 * @param[in] minicontrol minicontrol window
74 * @param[in] event Type of the event
75 * @param[in] event_arg Bundle argument of the event
76 * @return #MINICONTROL_ERROR_NONE on success,
77 * otherwise an error code (see #MINICONTROL_ERROR_XXX) on failure
78 * @retval #MINICONTROL_ERROR_INVALID_PARAMETER Invalid argument
79 * @retval #MINICONTROL_ERROR_PERMISSION_DENIED Permission denied
80 * @see #minicontrol_provider_event_e
81 * @see #minicontrol_create_window
82 * @see #minicontrol_request_to_viewer_e
84 int minicontrol_send_event(Evas_Object *mincontrol, minicontrol_provider_event_e event, bundle *event_arg);
93 #endif /* _MINICTRL_PROVIDER_H_ */