1 /*
2  * Copyright (c) 2020-2021 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 /**
17  * @addtogroup UI_Events
18  * @{
19  *
20  * @brief Defines UI events, such as press, click and drag events.
21  *
22  * @since 1.0
23  * @version 1.0
24  */
25 
26 /**
27  * @file aod_callback.h
28  *
29  * @brief Defines the callback for the touch event notification in screen-off mode.
30  *
31  * @since 1.0
32  * @version 1.0
33  */
34 
35 #include "components/ui_view.h"
36 #include "graphic_config.h"
37 
38 #ifndef AOD_CALLBACK_H
39 #define AOD_CALLBACK_H
40 
41 #if ENABLE_AOD
42 namespace OHOS {
43 /**
44  * @brief Called when a tap event occurs on the state machine. The screen-off display module will be notified of this
45  *        event.
46  *
47  * @param view Indicates the view instance where the tap event occurs.
48  */
49 void OnClickEventHappen(UIView& view);
50 
51 /**
52  * @brief Called when a sliding end event occurs on the state machine. The screen-off display module will be notified of
53  *        this event.
54  *
55  * @param view Indicates the view instance where the sliding end event occurs.
56  */
57 void OnDragEndEventHappen(UIView& view);
58 
59 /**
60  * @brief Called when a press event occurs on the state machine. The screen-off display module will be notified of this
61  *        event.
62  *
63  * @param view the attached view
64  */
65 void OnLongPressEventHappen(UIView& view);
66 } // namespace OHOS
67 #endif // ENABLE_AOD
68 #endif // AOD_CALLBACK_H
69