26 #ifndef SPLASHSCREEN_IMPL_H |
26 #ifndef SPLASHSCREEN_IMPL_H |
27 #define SPLASHSCREEN_IMPL_H |
27 #define SPLASHSCREEN_IMPL_H |
28 |
28 |
29 #include "splashscreen_config.h" |
29 #include "splashscreen_config.h" |
30 #include "splashscreen_gfx.h" |
30 #include "splashscreen_gfx.h" |
|
31 #include "jni.h" |
31 |
32 |
32 SPLASHEXPORT int SplashLoadMemory(void *pdata, int size); /* requires preloading the file */ |
33 SPLASHEXPORT int SplashLoadMemory(void *pdata, int size); /* requires preloading the file */ |
33 SPLASHEXPORT int SplashLoadFile(const char *filename); // FIXME: range checking for SplashLoadMemory |
34 SPLASHEXPORT int SplashLoadFile(const char *filename); // FIXME: range checking for SplashLoadMemory |
34 |
35 |
35 SPLASHEXPORT void SplashInit(void); |
36 SPLASHEXPORT void SplashInit(void); |
36 SPLASHEXPORT void SplashClose(void); |
37 SPLASHEXPORT void SplashClose(void); |
37 |
38 |
38 SPLASHEXPORT void SplashSetScaleFactor(float); |
39 SPLASHEXPORT void SplashSetScaleFactor(float); |
39 SPLASHEXPORT char* SplashGetScaledImageName(const char*, const char*, float*); |
40 SPLASHEXPORT jboolean SplashGetScaledImageName(const char*, const char*, |
|
41 float*, char*, const size_t scaledImageNameLength); |
40 |
42 |
41 SPLASHEXPORT void |
43 SPLASHEXPORT void |
42 SplashSetFileJarName(const char* fileName, const char* jarName); |
44 SplashSetFileJarName(const char* fileName, const char* jarName); |
43 |
45 |
|
46 SPLASHEXPORT int |
|
47 SplashGetScaledImgNameMaxPstfixLen(const char*); |
44 typedef struct SplashImage |
48 typedef struct SplashImage |
45 { |
49 { |
46 rgbquad_t *bitmapBits; |
50 rgbquad_t *bitmapBits; |
47 int delay; /* before next image display, in msec */ |
51 int delay; /* before next image display, in msec */ |
48 #if defined(WITH_WIN32) |
52 #if defined(WITH_WIN32) |
117 void SplashCleanupPlatform(Splash * splash); |
121 void SplashCleanupPlatform(Splash * splash); |
118 void SplashDonePlatform(Splash * splash); |
122 void SplashDonePlatform(Splash * splash); |
119 |
123 |
120 unsigned SplashTime(); |
124 unsigned SplashTime(); |
121 char* SplashConvertStringAlloc(const char* in, int *size); |
125 char* SplashConvertStringAlloc(const char* in, int *size); |
122 char* SplashGetScaledImageName(const char* jarName, |
126 jboolean SplashGetScaledImageName(const char* jarName, |
123 const char* fileName, float *scaleFactor); |
127 const char* fileName, float *scaleFactor, |
124 |
128 char *scaleImageName, const size_t scaledImageNameLength); |
125 void SplashLock(Splash * splash); |
129 void SplashLock(Splash * splash); |
126 void SplashUnlock(Splash * splash); |
130 void SplashUnlock(Splash * splash); |
127 |
131 |
128 void SplashInitFrameShape(Splash * splash, int imageIndex); |
132 void SplashInitFrameShape(Splash * splash, int imageIndex); |
129 |
133 |
143 |
147 |
144 void SplashUpdateScreenData(Splash * splash); |
148 void SplashUpdateScreenData(Splash * splash); |
145 |
149 |
146 void SplashCleanup(Splash * splash); |
150 void SplashCleanup(Splash * splash); |
147 void SplashSetScaleFactor(float scaleFactor); |
151 void SplashSetScaleFactor(float scaleFactor); |
148 |
152 int SplashGetScaledImgNameMaxPstfixLen(const char *fileName); |
149 |
153 |
150 typedef struct SplashStream { |
154 typedef struct SplashStream { |
151 int (*read)(void* pStream, void* pData, int nBytes); |
155 int (*read)(void* pStream, void* pData, int nBytes); |
152 int (*peek)(void* pStream); |
156 int (*peek)(void* pStream); |
153 void (*close)(void* pStream); |
157 void (*close)(void* pStream); |