comparison src/ui3/bmi/mmiFileManager.h @ 421:6a4d9f47793e

src/ui3/bmi: file renames to make the case consistent
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 21 Jan 2018 03:28:53 +0000
parents src/ui3/bmi/mmifilemanager.h@e8ddbb0837ed
children
comparison
equal deleted inserted replaced
420:e8ddbb0837ed 421:6a4d9f47793e
1 #ifndef _MMI_FILEMANGER_H_
2 #define _MMI_FILEMANGER_H_
3
4 #include "rfs/rfs_api.h"
5 #include "mfw_fm.h"
6
7
8 /*******************************************************************************
9
10 Interface constants
11
12 *******************************************************************************/
13 typedef enum
14 {
15 FM_INIT,
16 FM_DRAW,
17 FM_SUSPEND,
18 FM_RESUME,
19 FM_DESTROY,
20 FM_IMGDRAW_INIT,
21 FM_IMGDRAW_DRAW,
22 FM_IMGDRAW_SUSPEND,
23 FM_IMGDRAW_RESUME,
24 FM_IMGDRAW_DESTROY,
25 FM_EDITOR_INIT,
26 FM_EDITOR_CANCEL,
27 FM_EDITOR_SELECT,
28 FM_EDITOR_ERROR,
29 FM_COPY_INIT,
30 FM_COPY_DRAW,
31 FM_COPY_SUSPEND,
32 FM_COPY_RESUME,
33 FM_COPY_DESTROY
34 }T_FM_WIN_EVNETS;
35 typedef enum
36 {
37 FM_LIST_CREATE = -1,
38 FM_LIST_RECREATE,
39 FM_LIST_UPDATE
40 }T_FM_LIST_STATE;
41
42
43 /* ====================================================== */
44 /*
45 * FielManager window structure
46 */
47 /* ====================================================== */
48 typedef struct
49 {
50 T_MFW_FM_COPYMOVE_STRUCT *data;
51 T_MFW_HND win;
52 T_MFW_HND timer;
53 }T_FM_COPYMOVE;
54 typedef struct
55 {
56 T_MMI_CONTROL mmi_control;
57 T_MFW_HND parent_win;
58
59 T_MFW_HND dest_drive_win;
60 T_MFW_HND dest_root_win;
61 T_MFW_HND dest_rootfolderlist_win;
62 T_MFW_HND dest_list_win;
63 ListMenuData *dest_menu_list_data;
64 T_FM_DEVICE_TYPE destination;//Destination drive for copy or move scenario
65 T_FM_DESTDIR *dest_dir;
66 T_FM_APP_TYPE app;//Destination drive for copy or move scenario
67 }T_MMI_FM_DEST_STRUCT;
68 typedef struct
69 {
70 T_MMI_CONTROL mmi_control;
71
72 T_MFW_HND parent_win;//Hanlder for the parent window
73
74 T_MFW_HND root_win;//Handler for the Root dummy window
75 T_MFW_HND mfw_win; //handler for the mfw component to the root window
76
77 T_MFW_HND list_win;//Hanlder for the list
78 ListMenuData *menu_list_data;//List menu data
79 int lineheight;
80
81 T_MFW_HND opt_win; //Handler for the options window
82
83 T_MFW_HND img_win; //Hanlder for the image view window
84
85 T_FM_OPERATION_TYPE opt_type;//Holds the operation being excecuted
86
87 T_FM_LIST_STATE list_state;//Indicates whether list should be recreated on entering the list window
88
89 T_FM_DEVICE_TYPE source;//Source drive
90 T_FM_CURDIR *cur_dir;//Current directory
91 T_FM_APP_TYPE app;
92 T_FM_COPYMOVE copymove;//Hold the copy or move related details
93 T_MMI_FM_DEST_STRUCT *dest_data;//Holds the destination drirectory details
94
95
96 int nFreeBytes;
97 int nUsedBytes;
98 char * edt_buf;
99 } T_MMI_FM_STRUCT;
100
101 typedef struct
102 {
103 T_MMI_CONTROL mmi_control;
104
105 T_MFW_HND parent_win;
106 T_MFW_HND img_win;
107 T_MFW_HND kbd;
108 int zoom;
109 T_FM_IMG_ROTATE rotate;
110 } T_MMI_FM_IMGDRAW_STRUCT;
111 typedef struct
112 {
113 T_MMI_CONTROL mmi_control;
114
115 T_MFW_HND parent_win;
116 T_MFW_HND win;
117 T_MFW_HND kbd;
118 } T_MMI_FM_COPY_STRUCT;
119
120 #define FM_MAX_DETAILS_BUFFER 100
121 #define FM_COPYMOVE_TIMER 500
122 /* ====================================================== */
123 /*
124 * List Attribute
125 */
126 /* ====================================================== */
127 static const MfwMnuAttr FMList_Attrib =
128 {
129 &FileType_menuArea,
130 MNU_LEFT| MNU_LIST_ICONS| MNU_CUR_LINE, /* centered page menu */
131 (U8)-1, /* use default font */
132 NULL, /* with these items */
133 0, /* number of items */
134 COLOUR_LIST_XX,
135 TxtFileMgmt,
136 NULL,
137 MNUATTRSPARE
138 };
139 /*******************************************************************************
140
141 Public methods
142
143 *******************************************************************************/
144 GLOBAL int mmi_fm_display(MfwMnu* mnu, MfwMnuItem* item);
145 GLOBAL int mmi_fm_root_folders(MfwMnu* mnu, MfwMnuItem* item);
146
147 GLOBAL int mmi_fm_rename (MfwMnu* m, MfwMnuItem* i);
148 GLOBAL int mmi_fm_newdir(MfwMnu * m, MfwMnuItem * i);
149
150 GLOBAL int mmi_fm_copy (MfwMnu* m, MfwMnuItem* i);
151 GLOBAL int mmi_fm_move (MfwMnu* m, MfwMnuItem* i);
152 GLOBAL int mmi_fm_remove(MfwMnu * m, MfwMnuItem * i);
153 GLOBAL int mmi_fm_properties(MfwMnu* m, MfwMnuItem* i);
154 GLOBAL int mmi_fm_drives(MfwMnu* mnu, MfwMnuItem* item);
155 GLOBAL int mmi_fm_memStat(MfwMnu* m, MfwMnuItem* i);
156 GLOBAL int mmi_fm_format(MfwMnu* m, MfwMnuItem* i);
157 GLOBAL int mmi_fm_dest_display(MfwMnu* mnu, MfwMnuItem* item);
158 GLOBAL int mmi_fm_dest_root_folders(MfwMnu* mnu, MfwMnuItem* item);
159 USHORT showCopyMove( struct MfwMnuTag *m, struct MfwMnuAttrTag *ma, struct MfwMnuItemTag *mi );
160 USHORT showCreate( struct MfwMnuTag *m, struct MfwMnuAttrTag *ma, struct MfwMnuItemTag *mi );
161 USHORT check_dev( struct MfwMnuTag *m, struct MfwMnuAttrTag *ma, struct MfwMnuItemTag *mi );
162 USHORT format_check_dev( struct MfwMnuTag *m, struct MfwMnuAttrTag *ma, struct MfwMnuItemTag *mi );
163 USHORT check_source_image( struct MfwMnuTag *m, struct MfwMnuAttrTag *ma, struct MfwMnuItemTag *mi );
164 USHORT check_source_audio( struct MfwMnuTag *m, struct MfwMnuAttrTag *ma, struct MfwMnuItemTag *mi );
165 USHORT check_source_setting( struct MfwMnuTag *m, struct MfwMnuAttrTag *ma, struct MfwMnuItemTag *mi );
166 GLOBAL int mmi_pb_on_off(MfwMnu* m, MfwMnuItem* i);
167 #endif
168