1 /* EasyTAG - Tag editor for audio files
2  * Copyright (C) 2014  David King <amigadave@amigadave.com>
3  * Copyright (C) 2000-2003  Jerome Couderc <easytag@gmail.com>
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18  */
19 
20 #ifndef ET_CORE_H_
21 #define ET_CORE_H_
22 
23 #include <glib.h>
24 
25 G_BEGIN_DECLS
26 
27 #include <gdk/gdk.h>
28 
29 #include "file.h"
30 
31 /*
32  * Colors Used (see declaration into et_core.c)
33  */
34 extern GdkRGBA RED;
35 
36 /*
37  * Description of all variables, lists needed by EasyTAG
38  */
39 typedef struct
40 {
41     // The main list of files
42     GList *ETFileList;                  // List of ALL FILES (ET_File) loaded in the directory and sub-directories (List of ET_File) (This list musn't be altered, and points always to the first item)
43 
44     // The list of files organized by artist then album
45     GList *ETArtistAlbumFileList;
46 
47     // Displayed list (part of the main list of files displayed in BrowserList) (used when displaying by Artist & Album)
48     GList *ETFileDisplayedList;                 // List of files displayed (List of ET_File from ETFileList / ATArtistAlbumFileList) | !! May not point to the first item!!
49     guint  ETFileDisplayedList_Length;          // Contains the length of the displayed list
50     gfloat ETFileDisplayedList_TotalSize;       // Total of the size of files in displayed list (in bytes)
51     gulong ETFileDisplayedList_TotalDuration;   // Total of duration of files in displayed list (in seconds)
52 
53     // Displayed item
54     ET_File *ETFileDisplayed;           // Pointer to the current ETFile displayed in EasyTAG (may be NULL)
55 
56 
57     // History list
58     GList *ETHistoryFileList;           // History list of files changes for undo/redo actions
59 } ET_Core;
60 
61 extern ET_Core *ETCore; /* Main pointer to structure needed by EasyTAG. */
62 
63 void ET_Core_Create (void);
64 void ET_Core_Free (void);
65 
66 G_END_DECLS
67 
68 #endif /* ET_CORE_H_ */
69