Kigs Framework  Doc version 0.8
Open source multi purpose Rapid Application Development framework
PlatformCore.h
1 #ifndef _MAC_CORE_H_
2 #define _MAC_CORE_H_
3 
4 // MAC_FILE struct to "emulate" fopen fread ... on mainbundle ressources
5 #include <stdio.h>
6 
7 class FileHandle;
8 
9 template<typename smartPointOn>
10 class SmartPointer;
11 
12 struct MAC_FILE {
13  void* myData; // store NSString path
14  unsigned int myCurrentPos;
15  unsigned int mySize;
16  FILE* myFile;
17 };
18 
19 struct UITouch;
20 /****** Touch ******/
21 struct structCoord
22 {
23  float mouseCoordinate[2];
24  unsigned int phase;
25  int tapCount;
26  bool active;
27  UITouch* Touch;
28 };
29 
30 extern structCoord listCoordinate[5];
31 /*******************/
32 
33 
34 extern bool IPhonefopen(FileHandle* handle, const char* mode);
35 extern SmartPointer<FileHandle> IPhonefopen(const char* name, const char * mode);
36 
37 extern long int IPhonefread(void * ptr, long size, long count, FileHandle* handle);
38 extern long int IPhonefwrite(const void * ptr, long size, long count, FileHandle* handle);
39 extern long int IPhoneftell(FileHandle* handle);
40 extern int IPhonefseek(FileHandle* handle, long int offset, int origin);
41 extern int IPhonefflush(FileHandle* handle);
42 extern int IPhonefclose(FileHandle* handle);
43 
44 extern SmartPointer<FileHandle> IPhoneFindFullName(const kstl::string& filename);
45 extern void IPhoneCheckState(FileHandle* handle);
46 extern void IPhoneCreateFolderTree(FileHandle* hndl);
47 
48 #endif //_MAC_CORE_H_