74f5abd2e7a8731669aff4bfd1321bb91c4e0d0d
[profile/ivi/ico-uxf-homescreen.git] / src / onscreen / CicoOnScreen.h
1 /*
2  * Copyright (c) 2014, TOYOTA MOTOR CORPORATION.
3  *
4  * This program is licensed under the terms and conditions of the
5  * Apache License, version 2.0.  The full text of the Apache License is at
6  * http://www.apache.org/licenses/LICENSE-2.0
7  *
8  */
9 /**
10  * @brief   On Screen
11  *
12  * @date    Jan-07-2014
13  */
14 #ifndef __CICO_ON_SCREEN_H__
15 #define __CICO_ON_SCREEN_H__
16
17 #ifdef HAVE_CONFIG_H
18     #include "config.h"
19     #define __UNUSED__
20 #else
21     #define __UNUSED__
22 #endif
23
24 #include <cstdio>
25 #include <unistd.h>
26 #include <cstring>
27 #include <list>
28
29 #include <app.h>
30 #include <aul.h>
31 #include <Ecore_Evas.h>
32 #include <Evas.h>
33 #include <Edje.h>
34
35 #include <stdbool.h>
36 #include <CicoNotification.h>
37 #include <CicoNotificationService.h>
38
39 #include "ico_syc_common.h"
40 #include "ico_syc_privilege.h"
41
42 #include "ico_log.h"
43 #include "CicoOSPopWindow.h"
44
45 /*============================================================================*/
46 /* Define fixed parameters                                                    */
47 /*============================================================================*/
48
49 /*============================================================================*/
50 /* Define data types                                                          */
51 /*============================================================================*/
52
53 /*============================================================================*/
54 /* Define class                                                               */
55 /*============================================================================*/
56 class CicoOnScreen
57 {
58 public:
59     CicoOnScreen(void);
60     ~CicoOnScreen(void);
61     bool StartOnScreen(void);
62
63     static void NotificationCallback(void *data,
64                                      notification_type_e type,
65                                      notification_op *op_list,
66                                      int num_op);
67 protected:
68     bool requestShowSC();
69
70     static void EventCallBack(const ico_syc_ev_e event,
71                               const void *detail,
72                               void *user_data);
73     bool entryWindowId(uint32_t resourceId);
74     bool releaseWindow(uint32_t resourceId);
75     bool insertNoti(notification_h noti_h);
76     bool deleteNoti(int priv_id);
77
78     static CicoOnScreen *os_instance;
79
80 protected:
81     CicoNotificationService notiservice_;
82     std::list<CicoOSPopWindow*> m_mngWin;
83     std::list<CicoOSPopWindow*> m_waitMngWin;
84     CicoOSPopWindow*            m_request;
85     bool                        m_del;
86     CicoOSPopWindow*            m_reserve;
87 };
88 #endif  // __CICO_ON_SCREEN_H__
89 // vim:set expandtab ts=4 sw=4: