2 * Copyright © 2021 Samsung Electronics co., Ltd. All Rights Reserved.
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
11 * The above copyright notice and this permission notice (including the next
12 * paragraph) shall be included in all copies or substantial portions of the
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21 * DEALINGS IN THE SOFTWARE.
28 #include <rpc-port/rpc-port.h>
29 #include <mmifw-event-types.h>
31 #define MMIFW_API __attribute__ ((visibility("default")))
33 MMIFW_API extern int MMI_EVENT_FOCUS;
34 MMIFW_API extern int MMI_EVENT_STATE_CHANGE;
35 MMIFW_API extern int MMI_EVENT_WAKE_UP;
36 MMIFW_API extern int MMI_EVENT_KEY;
37 MMIFW_API extern int MMI_EVENT_GESTURE;
38 MMIFW_API extern int MMI_EVENT_VOICE;
39 MMIFW_API extern int MMI_EVENT_ACTION;
40 MMIFW_API extern int MMI_EVENT_FEEDBACK;
42 typedef void* mmifw_rpc_h;
43 typedef Eina_Bool mmi_bool;
44 typedef Ecore_Event_Handler mmi_event_listener;
45 typedef Ecore_Event_Handler_Cb mmi_evnt_handler_cb;
46 typedef mmi_bool (*mmi_event_handler_cb)(void *data, int ev_type, void *event);
59 MMI_STATE_EXPLORATION,
62 MMI_STATE_OBSERVATION,
69 const char *sender_id;
73 const char *stub_appid;
76 typedef struct _mmi_struct* mmi_handle;
82 MMIFW_API int mmi_init(void);
83 MMIFW_API int mmi_shutdown(void);
84 MMIFW_API mmi_handle mmi_instance_create(const char *app_id);
85 MMIFW_API void mmi_instance_destroy(mmi_handle h);
87 MMIFW_API mmi_event_listener *mmi_event_add_listener(mmi_handle h, int ev_type, mmi_event_handler_cb func, const void *data);
88 MMIFW_API mmi_result mmi_request_send_get_focus(mmi_handle h);
89 MMIFW_API mmi_state mmi_state_get_current_state(mmi_handle h);
90 MMIFW_API mmi_result mmi_request_send_set_state(mmi_handle h, mmi_state state);
91 MMIFW_API void *mmi_event_remove_listener(mmi_handle h, mmi_event_listener *listener);
92 MMIFW_API void mmi_event_remove_all_listeners(mmi_handle h);