< prev index next >
src/java.base/share/native/libjli/splashscreen_stubs.c
Print this page
*** 23,33 ****
* questions.
*/
#include <stdio.h>
#include "splashscreen.h"
!
extern void* SplashProcAddress(const char* name); /* in java_md.c */
/*
* Prototypes of pointers to functions in splashscreen shared lib
*/
--- 23,33 ----
* questions.
*/
#include <stdio.h>
#include "splashscreen.h"
! #include "jni.h"
extern void* SplashProcAddress(const char* name); /* in java_md.c */
/*
* Prototypes of pointers to functions in splashscreen shared lib
*/
*** 36,47 ****
typedef void (*SplashInit_t)(void);
typedef void (*SplashClose_t)(void);
typedef void (*SplashSetFileJarName_t)(const char* fileName,
const char* jarName);
typedef void (*SplashSetScaleFactor_t)(float scaleFactor);
! typedef char* (*SplashGetScaledImageName_t)(const char* fileName,
! const char* jarName, float* scaleFactor);
/*
* This macro invokes a function from the shared lib.
* it locates a function with SplashProcAddress on demand.
* if SplashProcAddress fails, def value is returned.
--- 36,49 ----
typedef void (*SplashInit_t)(void);
typedef void (*SplashClose_t)(void);
typedef void (*SplashSetFileJarName_t)(const char* fileName,
const char* jarName);
typedef void (*SplashSetScaleFactor_t)(float scaleFactor);
! typedef jboolean (*SplashGetScaledImageName_t)(const char* fileName,
! const char* jarName, float* scaleFactor,
! char *scaleImageName, const size_t scaleImageNameLength);
! typedef int (*SplashGetScaledImgNameMaxPstfixLen_t)(const char* filename);
/*
* This macro invokes a function from the shared lib.
* it locates a function with SplashProcAddress on demand.
* if SplashProcAddress fails, def value is returned.
*** 58,67 ****
--- 60,70 ----
ret ((name##_t)proc)
#define INVOKE(name,def) _INVOKE(name,def,return)
#define INVOKEV(name) _INVOKE(name, ,;)
+
int DoSplashLoadMemory(void* pdata, int size) {
INVOKE(SplashLoadMemory, 0)(pdata, size);
}
int DoSplashLoadFile(const char* filename) {
*** 82,90 ****
void DoSplashSetScaleFactor(float scaleFactor) {
INVOKEV(SplashSetScaleFactor)(scaleFactor);
}
! char* DoSplashGetScaledImageName(const char* fileName, const char* jarName,
! float* scaleFactor) {
! INVOKE(SplashGetScaledImageName, NULL)(fileName, jarName, scaleFactor);
}
--- 85,99 ----
void DoSplashSetScaleFactor(float scaleFactor) {
INVOKEV(SplashSetScaleFactor)(scaleFactor);
}
! jboolean DoSplashGetScaledImageName(const char* fileName, const char* jarName,
! float* scaleFactor, char *scaledImageName, const size_t scaledImageNameLength) {
! INVOKE(SplashGetScaledImageName, 0)(fileName, jarName, scaleFactor,
! scaledImageName, scaledImageNameLength);
}
+
+ int DoSplashGetScaledImgNameMaxPstfixLen(const char *fileName) {
+ INVOKE(SplashGetScaledImgNameMaxPstfixLen, 0)(fileName);
+ }
+
< prev index next >