make sure "S" is generated.
[AROS-Contrib.git] / vpdf / system / file.h
blob9cefba5f0e87aa2e20454a49a8b3286216cc7001
2 #ifndef FILE_H
3 #define FILE_H
5 #include <exec/types.h>
6 #include <dos/dos.h>
7 #include <intuition/classusr.h>
9 #include "chunky.h"
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
15 void *fileLoad(char *name);
16 void fileFree(void *mem);
17 char *fileGetFilePart(char *fname);
18 unsigned int fileLength(char *fname);
19 #define FileLen fileLength
21 #define loadfile(name) loadfileN(name)
23 Texture *AllocTextureStruct(void);
24 void FreeTexture(Texture *txt);
25 #define txtFree FreeTexture
27 Texture *LoadChunkyPicture(char *name,int width,int height);
28 Texture *LoadPicture(char *fname);
29 Texture *LoadPictureHI16(char *fname);
30 Texture *LoadPictureTRUE24(char *fname);
31 Texture *LoadPictureTRUE32(char *fname);
32 Texture *LoadPictureGRAY8(char *fname);
33 Texture *LoadPictureARGB32(char *fname);
34 Texture *LoadPictureARGB16(char *fname);
37 Texture *txt_CreateBlank(int width,int height);
38 Texture *txt_CreateBlank16(int width,int height);
39 Texture *txt_CreateBlank24(int width,int height);
40 Texture *txt_CreateBlank32(int width,int height);
42 Texture *txtCreate(int width, int height, int pixfmt);
43 Texture *txtCreateFromImage(ChkImage *image);
44 Texture *txtCreateBlank(int width, int height, int format);
46 int savefile(char *name,void *mem,int len);
48 int jpegGetDimmensions(char *fname, int *width, int *height);
49 struct texture *LoadPictureJPEG (char *fname);
50 struct texture *LoadPictureJPEG24(char *fname);
51 struct texture *LoadPictureJPEG24Scaled(char *fname, int minwidth, int minheight, int *realwidth, int *realheight);
52 struct texture *LoadPictureJPEG8 (char *fname);
53 struct texture *LoadPictureJPEG32(char *fname);
54 struct texture *LoadPictureJPEGThumbnail(char *fname, int *realwidth, int *realheight, int minwidth, int minheight);
56 #define LoadPictureJPEG16(fname) LoadPictureJPEG(fname)
58 void txtReloadImage(Texture *txt, char *name);
60 void SetDebugMode(int mode);
62 int isDTPicture(char *fname);
63 int checkExtension(char *fname, char *extension);
65 char *getLastFileType(void);
66 void fileGetType(char *fname, char *type);
68 typedef struct FileInfo_s
70 unsigned int gid; /* from datatypes GID_xx */
71 char *type; /* */
72 struct DateStamp datestamp;
73 unsigned int filesize;
74 int width; /* != if available */
75 int height; /* */
76 } FileInfo;
78 #define FINFO_DATATYPE 1
79 #define FINFO_DIMMENSIONS 2
81 FileInfo *fileGetInfo(char *fname, int flags);
82 void fileFreeInfo(FileInfo *finfo);
84 void dirDelete(char *path, int recursive);
85 int fileCopyTo(char *src, char *dst);
86 int pathEquals(char *p1, char *p2);
87 int fileDelete(char *src);
88 int filesCopy(Object *app, char *reqtitle, char **list, char *dest, int move);
90 char *CapacityFormat(char *s, unsigned int size, unsigned long long n);
92 #ifdef __cplusplus
94 #endif
96 #endif