2 * Copyright (c) 2013 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 * @file user_delegates.h
18 * @author Tomasz Iwanek (t.iwanek@samsung.com)
19 * @brief user delegates
21 #ifndef USER_DELEGATES_H
22 #define USER_DELEGATES_H
24 #include <dpl/fast_delegate.h>
25 #include <widget_model.h>
31 typedef DPL::FastDelegate0<void> ProgressStartedCB;
32 typedef DPL::FastDelegate2<Evas_Object*, double, void> ProgressCB;
33 typedef DPL::FastDelegate0<void> ProgressFinishCB;
34 typedef DPL::FastDelegate1<Evas_Object*, void> LoadStartCB;
35 typedef DPL::FastDelegate1<Evas_Object*, void> LoadFinishCB;
36 typedef DPL::FastDelegate0<void> WebCrashCB;
37 typedef DPL::FastDelegate2<Evas**, Evas_Object*, void> WindowCreateBeforeCB;
38 typedef DPL::FastDelegate2<Evas_Object*, Evas_Object*, void> WindowCreateAfterCB;
39 typedef DPL::FastDelegate1<Evas_Object*, void> WindowCloseCB;
40 typedef DPL::FastDelegate2<Evas_Object*, std::string&, void> NavigationDecideCB;
41 typedef DPL::FastDelegate0<void> WebkitExitCB;
42 typedef DPL::FastDelegate1<bool, void> ResumeCB;
43 typedef DPL::FastDelegate1<bool, void> SuspendCB;
44 typedef DPL::FastDelegate1<bool, void> ResetCB;
45 typedef DPL::FastDelegate1<Evas_Object*, void> BufferUnsetCB;
46 typedef DPL::FastDelegate1<Evas_Object*, void> BufferSetCB;
47 typedef DPL::FastDelegate1<bool, void> ToggleFullscreenCB;
48 typedef DPL::FastDelegate1<bool, void> EditorclientImeCB;
49 typedef DPL::FastDelegate1<int, void> OrientationCB;
50 typedef DPL::FastDelegate1<const std::string&, void> HWkeyCB;
52 struct UserDelegates {
53 ProgressStartedCB progressStarted;
55 ProgressFinishCB progressFinish;
56 LoadStartCB loadStart;
57 LoadFinishCB loadFinish;
59 WindowCreateBeforeCB windowCreateBefore;
60 WindowCreateAfterCB windowCreateAfter;
61 WindowCloseCB windowClose;
62 NavigationDecideCB navigationDecide;
63 WebkitExitCB webkitExit;
67 BufferUnsetCB bufferUnset;
68 BufferSetCB bufferSet;
69 ToggleFullscreenCB toggleFullscreen;
70 OrientationCB setOrientation;
74 typedef std::shared_ptr<UserDelegates> UserDelegatesPtr;
75 typedef std::shared_ptr<WidgetModel> WidgetModelPtr;
78 #endif // USER_DELEGATES_H