Fix coverity issue 1149129
[apps/native/volume-app.git] / inc / key_event.h
1 /*
2  * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved
3  *
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  */
16
17
18 #ifndef __VOLUME_KEY_EVENT_H__
19 #define __VOLUME_KEY_EVENT_H__
20
21 #define KEY_VOLUMEUP "XF86AudioRaiseVolume"
22 #define KEY_VOLUMEDOWN "XF86AudioLowerVolume"
23 #define KEY_MUTE "XF86AudioMute"
24 #define KEY_BACK "XF86Back"
25 #define KEY_CANCEL "Cancel"
26 #define SAFETY_LIMIT 9
27
28 extern Ecore_X_Window volume_key_event_input_window_get(void);
29 extern Ecore_Event_Handler *volume_key_event_handler_volume_up_get(void);
30 extern Ecore_Event_Handler *volume_key_event_handler_volume_down_get(void);
31 extern Ecore_Event_Handler *volume_key_event_handler_qp_state_check(void);
32 extern Eina_Bool volume_key_event_is_pressing_get(void);
33 extern int volume_key_event_count_grabed_get(void);
34 extern void volume_key_event_count_grabed_set(int val);
35
36 extern sound_type_e volume_key_event_sound_type_at_key_pressed_get(void);
37
38 extern int volume_key_event_key_grab(Ecore_X_Window _xwin, int grab_mode);
39 extern volume_error_e volume_key_event_key_ungrab(void);
40
41 extern void volume_key_event_handler_add(void);
42 extern void volume_key_event_handler_del(void);
43 extern volume_error_e volume_key_event_input_window_create(void);
44
45 #endif /* __VOLUME_KEY_EVENT_H__ */