1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
|
/*
* Copyright (c) 2000-2015 Samsung Electronics Co., Ltd All Rights Reserved
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
#ifndef __DOC_UGDATA_H__
#define __DOC_UGDATA_H__
#include <glib.h>
#include <Elementary.h>
#include <stdio.h>
#include <string.h>
#include <ui-gadget-module.h>
#include <Eina.h>
#include <app.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#define HALF_MODE_PORTRAIT_HEIGHT 362
#define FULL_MODE_PORTRAIT_HEIGHT 1036
#define LANDSCAPE_HEIGHT 528
typedef enum {
DOC_FILE_SELECT_T_NONE,
DOC_FILE_SELECT_T_ONE,
DOC_FILE_SELECT_T_MULTIPLE,
DOC_FILE_SELECT_T_SLIDESHOW,
} doc_file_select_e;
typedef enum {
DOC_FILE_T_NONE,
DOC_FILE_T_IMAGE,
DOC_FILE_T_VIDEO,
DOC_FILE_T_ALL,
} doc_file_type_e;
typedef enum {
DOC_ROTATE_NONE,
DOC_ROTATE_PORTRAIT,
DOC_ROTATE_PORTRAIT_UPSIDEDOWN,
DOC_ROTATE_LANDSCAPE,
DOC_ROTATE_LANDSCAPE_UPSIDEDOWN,
} doc_rotate_mode;
typedef enum {
DOC_UPDATE_NONE,
DOC_UPDATE_NORMAL,
DOC_UPDATE_MMC_REMOVED,
DOC_UPDATE_MMC_ADDED,
DOC_UPDATE_VIEW_INOTIFY
} doc_update_mode;
typedef struct _doc_ugdata doc_ugdata;
typedef struct _doc_item doc_item;
typedef struct _doc_sel_item_t doc_sel_item_s;
typedef struct _doc_cluster doc_cluster;
typedef struct _doc_thumbs_t doc_thumbs_s;
typedef struct doc_db_noti_t doc_db_noti_s;
typedef int (*doc_folder_append_cb)(doc_ugdata *ugd, doc_cluster *album);
typedef int (*doc_rotate_view_cb)(doc_ugdata *ugd);
struct _doc_sel_item_t {
char *uuid;
char *file_url;
int store_type;
int valid;
int sequence;
};
struct _doc_item {
doc_media_s* item;
doc_ugdata* ugd;
Elm_Object_Item *elm_item;
bool checked;
doc_cluster *album;
int store_type;
int sequence;
};
struct _doc_cluster {
doc_ugdata *ugd;
int sel_cnt; /* Selected medias count of current album */
bool select;
};
typedef enum {
ATTACH_PANEL_NONE,
ATTACH_PANEL_FULL_MODE,
ATTACH_PANEL_HALF_MODE,
}_doc_attach_panel_display_mode;
struct _doc_ugdata {//[ToDo] Check what all members needed.
Evas_Object *win;
Evas_Object *ly_parent;
Evas_Object *ly_main;
Evas_Object *bg;
Elm_Theme *th;
Evas_Object *naviframe;
Elm_Object_Item *nf_it;
Evas_Object *conform;
Elm_Win_Indicator_Opacity_Mode indi_o_mode;
Elm_Win_Indicator_Mode indi_mode;
bool overlap_mode;
int rotate_mode;
Eina_List *rotate_cbs;
Evas_Object *list_view;
Evas_Object *list_view_ly;
Evas_Object *nocontents;
Evas_Object *popup;
Ecore_Timer *del_timer;
ui_gadget_h ug_called_by_me;
ui_gadget_h ug;
char *ug_path;
app_control_h service; /*added for "ug_send_result"*/
Eina_List *selected_elist;
Eina_Bool ck_state;
int file_select_mode;
int file_type_mode;
int max_count;
bool b_multifile; /* Multipe files selection */
bool b_hide_indicator;
doc_thumbs_s *thumbs_d;
doc_db_noti_s *db_noti_d;
_doc_attach_panel_display_mode attach_panel_display_mode;
bool is_attach_panel;
long long int selsize;
long long int limitsize;
};
struct _doc_thumbs_t {
doc_ugdata *ugd;
Evas_Object *view;
Evas_Object *check;
Evas_Object *nocontents;
Evas_Object *layout;
Elm_Genlist_Item_Class *gic;
Elm_Object_Item *nf_it;
int store_type;
int tot_selected;
int medias_cnt; /* Data from DB */
Eina_List *medias_elist;
bool b_multifile; /* Multiple file selection */
bool b_mainview; /* First level view */
doc_cluster *album;
bool b_editmode;
Evas_Object *genlist;
};
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __DOC_UGDATA_H__ */
|