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 #include <InputHandler.h>
24 class CFileGrid : public CListenerMgr, IMouseMoveListener, IKeyUpListener {
30 void(*cbUpdateEmptyFocusSequence)(void* cookie);
31 void(*cbUpdatedGrid)(void* cookie);
32 void(*cbUnsetFocus)(void* cookie);
33 void(*cbLinkApp)(void* cookie, int type, int source_type, char *path);
38 static void sm_CbRealized(void *data, Evas_Object *obj, void *event_info);
39 static void sm_CbUnrealized(void *data, Evas_Object *obj, void *event_info);
41 void m_DeleteContextView(void);
42 static void sm_CbSelectItem(void *data, Elm_Object_Item *it, const char *emission, const char *source);
44 void m_HandleSelection(void);
45 void m_GetMediaList(char *pFolderId);
46 void m_GetFolderList(void);
49 void t_CreateFileGrid(void);
51 void t_Empty(bool sort_flag);
52 void t_Update(char *fid, bool sort_flag);
56 CFileGrid() : IMouseMoveListener(this), IKeyUpListener(this), m(0) { }
57 virtual ~CFileGrid() { if (m) Destroy(); }
59 bool Create(Evas_Object* win, Evas_Object* base, const SCallback* cb);
60 virtual void Destroy(void);
61 void Update(bool sort_flag);
63 void SetFocus(Eina_Bool flag);
64 Evas_Object* Grid(void);
68 virtual void OnMouseMove(int id, Evas *e, Evas_Object *obj, Evas_Event_Mouse_Move *ev);
70 virtual void OnKeyUp(int id, Evas *e, Evas_Object *obj, Evas_Event_Key_Up *ev);
74 #endif /* __FILE_GRID_H__ */