2 * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
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
14 #ifndef __CICO_HS_MENU_TILE_H__
15 #define __CICO_HS_MENU_TILE_H__
23 #include <Ecore_Wayland.h>
24 #include <Ecore_Evas.h>
27 #include "ico_syc_common.h"
28 #include "ico_syc_winctl.h"
30 #include "CicoHomeScreenCommon.h"
32 /*1920 * 1080 display*/
33 /*orientation is vertical*/
35 /*it can't use all height 1920 ,it needs deduct ControlBar 128 and StatusBar 64*/
36 /*home screen use 1728 * 1080*/
37 /*one rectangle size is 340 * 340 and space = 15*/
42 /***+---+---+---+******/
43 /***+ 0 + 1 + 2 +******/
44 /***+ 3 + 4 + 5 +******/
45 /***+ 6 + 7 + 8 +******/
46 /***+ 9 +10 +11 +******/
47 /***+---+---+---+******/
49 #define ICO_HS_MENUTILE_ROW 3
50 #define ICO_HS_MENUTILE_COLUMN 4
51 #define ICO_HS_MENUTILE_NUM (ICO_HS_MENUTILE_COLUMN * ICO_HS_MENUTILE_ROW)
52 #define ICO_HS_MENUTILE_POSITION_0 0
53 #define ICO_HS_MENUTILE_POSITION_1 1
54 #define ICO_HS_MENUTILE_POSITION_2 2
55 #define ICO_HS_MENUTILE_POSITION_3 3
56 #define ICO_HS_MENUTILE_POSITION_4 4
57 #define ICO_HS_MENUTILE_POSITION_5 5
58 #define ICO_HS_MENUTILE_POSITION_6 6
59 #define ICO_HS_MENUTILE_POSITION_7 7
60 #define ICO_HS_MENUTILE_POSITION_8 8
61 #define ICO_HS_MENUTILE_POSITION_9 9
62 #define ICO_HS_MENUTILE_POSITION_10 10
63 #define ICO_HS_MENUTILE_POSITION_11 11
64 #define ICO_HS_MENUTILE_POSITION_RESERVE 0xFFFF
66 #define ICO_HS_MENUTILE_WIDTH 290
67 #define ICO_HS_MENUTILE_HEIGHT 290
68 #define ICO_HS_MENUTILE_SPACE_TILE_AND_TILE 25
70 #define ICO_HS_MENUTILE_START_POS_X 80
71 #define ICO_HS_MENUTILE_START_POS_Y 210
73 #define ICO_HS_MENUTILE_TERM_ICON_PATH "/usr/apps/org.tizen.ico.homescreen/res/images/termIcon.png"
74 #define ICO_HS_MENUTILE_DEFAULT_ICON_PATH "/usr/apps/org.tizen.ico.homescreen/res/images/tizen_32.png"
75 #define ICO_HS_MENUTILE_TERM_ICON_WIDTH 64
76 #define ICO_HS_MENUTILE_TERM_ICON_HEIGHT 64
78 #define ICO_HS_MENUTILE_THUMBNAIL_FPS_SHOW 5 /* 5 frames/sec */
79 #define ICO_HS_MENUTILE_THUMBNAIL_FPS_HIDE -1 /* meanse 'not update' */
80 #define ICO_HS_MENUTILE_THUMBNAIL_REDUCE_PIX 4
81 #define ICO_HS_MENUTILE_THUMBNAIL_REDUCE_PIX2 6
82 #define ICO_HS_MENUTILE_THUMBNAIL_REDUCE_RATE 10
83 #define ICO_HS_MENUTILE_THUMBNAIL_REDUCTION 4
85 /*shared memory buffer*/
86 #define ICO_HS_THUMB_ICODIR "/tmp/ico"
87 #define ICO_HS_THUMB_FILEDIR "/thumbnail"
88 #define ICO_HS_THUMB_FILEEXT "bmp"
90 struct _CicoHSMenuTile_thumb {
91 int surface; // surface id
92 int type; // frame buffer type
93 int width; // frame buffer width
94 int height; // frame buff height
95 int stride; // frame buffer stride
96 int format; // frame buffer format(only EGL_TEXTURE_RGBA)
97 int fbcount; // frame buffer change counter
98 char *pixel_data; // glReadPixels data buffer
99 int pixel_bufsize; // data buffer size
105 CicoHSMenuTile(const char *appid,const char *icon_image_path
106 ,int page,int subpage,int position,int width,int height);
107 ~CicoHSMenuTile(void);
108 void CreateObject(Evas *evas);
109 void FreeObject(void);
110 void Resize(int width,int height);
111 void MovePosition(int page,int poisition);
112 void OffsetMove(int offset_x,int offset_y);
113 const char* GetImagePath(void);
116 int GetPosition(void);
118 int GetSubPage(void);
119 int GetPositionX(void);
120 int GetPositionY(void);
122 const char* GetAppId(void);
123 void ShowTermIcon(void);
124 void HideTermIcon(void);
125 void ValidMenuIcon(void);
126 void ValidThumbnail(int surface);
127 void SetThumbnail(ico_syc_thumb_info_t *info);
128 void ShowMenu(bool show);
129 void SetOrgThumbnail(CicoHSMenuTile *orgTile);
132 char appid[ICO_HS_MAX_PROCESS_NAME];
133 char icon_image_path[ICO_HS_MAX_PATH_BUFF_LEN];
147 Evas_Object *thumb_tile;
149 Evas_Object *small_icon;
150 Evas_Object *term_icon;
151 struct _CicoHSMenuTile_thumb thumb;
154 CicoHSMenuTile operator=(const CicoHSMenuTile&);
155 CicoHSMenuTile(const CicoHSMenuTile&);
158 // vim: set expandtab ts=4 sw=4: