2 * Copyright (c) 2014 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 #ifndef __FILE_GRID_H__
18 #define __FILE_GRID_H__
21 class CFileGrid : public CListenerMgr, IMouseMoveListener, IKeyUpListener {
27 void(*cbUpdateEmptyFocusSequence)(void* cookie);
28 void(*cbUpdatedGrid)(void* cookie);
29 void(*cbUnsetFocus)(void* cookie);
30 void(*cbLinkApp)(void* cookie, int type, int source_type, char *path);
35 static void sm_CbRealized(void *data, Evas_Object *obj, void *event_info);
36 static void sm_CbUnrealized(void *data, Evas_Object *obj, void *event_info);
38 void m_DeleteContextView(void);
39 static void sm_CbSelectItem(void *data, Elm_Object_Item *it, const char *emission, const char *source);
41 void m_HandleSelection(void);
42 void m_GetMediaList(char *pFolderId);
43 void m_GetFolderList(void);
46 void t_CreateFileGrid(void);
48 void t_Empty(bool sort_flag);
49 void t_Update(char *fid, bool sort_flag);
53 CFileGrid() : IMouseMoveListener(this), IKeyUpListener(this), m(0) { }
54 virtual ~CFileGrid() { if (m) Destroy(); }
56 bool Create(Evas_Object* win, Evas_Object* base, const SCallback* cb);
57 virtual void Destroy(void);
58 void Update(bool sort_flag);
60 void SetFocus(Eina_Bool flag);
61 Evas_Object* Grid(void);
65 virtual void OnMouseMove(int id, Evas *e, Evas_Object *obj, Evas_Event_Mouse_Move *ev);
67 virtual void OnKeyUp(int id, Evas *e, Evas_Object *obj, Evas_Event_Key_Up *ev);
71 #endif /* __FILE_GRID_H__ */