19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 #ifndef SPLASHSCREEN_IMPL_H
27 #define SPLASHSCREEN_IMPL_H
28
29 #include "splashscreen_config.h"
30 #include "splashscreen_gfx.h"
31
32 SPLASHEXPORT int SplashLoadMemory(void *pdata, int size); /* requires preloading the file */
33 SPLASHEXPORT int SplashLoadFile(const char *filename); // FIXME: range checking for SplashLoadMemory
34
35 SPLASHEXPORT void SplashInit(void);
36 SPLASHEXPORT void SplashClose(void);
37
38 SPLASHEXPORT void SplashSetScaleFactor(float);
39 SPLASHEXPORT char* SplashGetScaledImageName(const char*, const char*, float*);
40
41 SPLASHEXPORT void
42 SplashSetFileJarName(const char* fileName, const char* jarName);
43
44 typedef struct SplashImage
45 {
46 rgbquad_t *bitmapBits;
47 int delay; /* before next image display, in msec */
48 #if defined(WITH_WIN32)
49 HRGN hRgn;
50 #elif defined(WITH_X11)
51 XRectangle *rects;
52 int numRects;
53 #endif
54 } SplashImage;
55
56 #define SPLASH_COLOR_MAP_SIZE 0x100
57
58 typedef struct Splash
59 {
102 pthread_mutex_t lock;
103 int controlpipe[2];
104 NSWindow * window;
105 #endif
106 } Splash;
107
108 /* various shared and/or platform dependent splash screen functions */
109
110 /*************** Platform-specific ******************/
111
112 /* To be implemented in the platform-specific native code. */
113
114
115 void SplashInitPlatform(Splash * splash);
116 void SplashCreateThread(Splash * splash);
117 void SplashCleanupPlatform(Splash * splash);
118 void SplashDonePlatform(Splash * splash);
119
120 unsigned SplashTime();
121 char* SplashConvertStringAlloc(const char* in, int *size);
122 char* SplashGetScaledImageName(const char* jarName,
123 const char* fileName, float *scaleFactor);
124
125 void SplashLock(Splash * splash);
126 void SplashUnlock(Splash * splash);
127
128 void SplashInitFrameShape(Splash * splash, int imageIndex);
129
130 void SplashUpdate(Splash * splash);
131 void SplashReconfigure(Splash * splash);
132 void SplashClosePlatform(Splash * splash);
133
134
135
136 /********************* Shared **********************/
137 Splash *SplashGetInstance();
138
139 int SplashIsStillLooping(Splash * splash);
140 void SplashNextFrame(Splash * splash);
141 void SplashStart(Splash * splash);
142 void SplashDone(Splash * splash);
143
|
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 #ifndef SPLASHSCREEN_IMPL_H
27 #define SPLASHSCREEN_IMPL_H
28
29 #include "splashscreen_config.h"
30 #include "splashscreen_gfx.h"
31
32 SPLASHEXPORT int SplashLoadMemory(void *pdata, int size); /* requires preloading the file */
33 SPLASHEXPORT int SplashLoadFile(const char *filename); // FIXME: range checking for SplashLoadMemory
34
35 SPLASHEXPORT void SplashInit(void);
36 SPLASHEXPORT void SplashClose(void);
37
38 SPLASHEXPORT void SplashSetScaleFactor(float);
39 SPLASHEXPORT void SplashGetScaledImageName(const char*, const char*,
40 float*, char*, const size_t);
41
42 SPLASHEXPORT void
43 SplashSetFileJarName(const char* fileName, const char* jarName);
44
45 typedef struct SplashImage
46 {
47 rgbquad_t *bitmapBits;
48 int delay; /* before next image display, in msec */
49 #if defined(WITH_WIN32)
50 HRGN hRgn;
51 #elif defined(WITH_X11)
52 XRectangle *rects;
53 int numRects;
54 #endif
55 } SplashImage;
56
57 #define SPLASH_COLOR_MAP_SIZE 0x100
58
59 typedef struct Splash
60 {
103 pthread_mutex_t lock;
104 int controlpipe[2];
105 NSWindow * window;
106 #endif
107 } Splash;
108
109 /* various shared and/or platform dependent splash screen functions */
110
111 /*************** Platform-specific ******************/
112
113 /* To be implemented in the platform-specific native code. */
114
115
116 void SplashInitPlatform(Splash * splash);
117 void SplashCreateThread(Splash * splash);
118 void SplashCleanupPlatform(Splash * splash);
119 void SplashDonePlatform(Splash * splash);
120
121 unsigned SplashTime();
122 char* SplashConvertStringAlloc(const char* in, int *size);
123 void SplashGetScaledImageName(const char* jarName,
124 const char* fileName, float *scaleFactor,
125 char *scaleImageName, const size_t scaleImageNameLength);
126
127 void SplashLock(Splash * splash);
128 void SplashUnlock(Splash * splash);
129
130 void SplashInitFrameShape(Splash * splash, int imageIndex);
131
132 void SplashUpdate(Splash * splash);
133 void SplashReconfigure(Splash * splash);
134 void SplashClosePlatform(Splash * splash);
135
136
137
138 /********************* Shared **********************/
139 Splash *SplashGetInstance();
140
141 int SplashIsStillLooping(Splash * splash);
142 void SplashNextFrame(Splash * splash);
143 void SplashStart(Splash * splash);
144 void SplashDone(Splash * splash);
145
|