< prev index next >
src/java.desktop/share/native/libsplashscreen/splashscreen_impl.c
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 44,65 ****
preInitialized = 1;
}
return &splash;
}
! SPLASHEXPORT void
SplashSetFileJarName(const char* fileName, const char* jarName) {
Splash *splash = SplashGetInstance();
free(splash->fileName);
splash->fileName = SplashConvertStringAlloc(fileName, &splash->fileNameLen);
free(splash->jarName);
splash->jarName = SplashConvertStringAlloc(jarName, &splash->jarNameLen);
}
! SPLASHEXPORT void
SplashInit()
{
Splash *splash = SplashGetInstance();
memset(splash, 0, sizeof(Splash));
--- 44,65 ----
preInitialized = 1;
}
return &splash;
}
! JNIEXPORT void JNICALL
SplashSetFileJarName(const char* fileName, const char* jarName) {
Splash *splash = SplashGetInstance();
free(splash->fileName);
splash->fileName = SplashConvertStringAlloc(fileName, &splash->fileNameLen);
free(splash->jarName);
splash->jarName = SplashConvertStringAlloc(jarName, &splash->jarNameLen);
}
! JNIEXPORT void JNICALL
SplashInit()
{
Splash *splash = SplashGetInstance();
memset(splash, 0, sizeof(Splash));
*** 68,78 ****
initFormat(&splash->imageFormat, QUAD_RED_MASK, QUAD_GREEN_MASK,
QUAD_BLUE_MASK, QUAD_ALPHA_MASK);
SplashInitPlatform(splash);
}
! SPLASHEXPORT void
SplashClose()
{
Splash *splash = SplashGetInstance();
if (splash->isVisible > 0) {
--- 68,78 ----
initFormat(&splash->imageFormat, QUAD_RED_MASK, QUAD_GREEN_MASK,
QUAD_BLUE_MASK, QUAD_ALPHA_MASK);
SplashInitPlatform(splash);
}
! JNIEXPORT void JNICALL
SplashClose()
{
Splash *splash = SplashGetInstance();
if (splash->isVisible > 0) {
*** 105,115 ****
splash->overlayData = NULL;
}
SplashSetFileJarName(NULL, NULL);
}
! SPLASHEXPORT void
SplashSetScaleFactor(float scaleFactor)
{
Splash *splash = SplashGetInstance();
splash->scaleFactor = scaleFactor;
}
--- 105,115 ----
splash->overlayData = NULL;
}
SplashSetFileJarName(NULL, NULL);
}
! JNIEXPORT void JNICALL
SplashSetScaleFactor(float scaleFactor)
{
Splash *splash = SplashGetInstance();
splash->scaleFactor = scaleFactor;
}
*** 300,318 ****
SplashUnlock(splash);
}
return success;
}
! SPLASHEXPORT int
SplashLoadFile(const char *filename)
{
SplashStream stream;
return SplashStreamInitFile(&stream, filename) &&
SplashLoadStream(&stream);
}
! SPLASHEXPORT int
SplashLoadMemory(void *data, int size)
{
SplashStream stream;
return SplashStreamInitMemory(&stream, data, size) &&
SplashLoadStream(&stream);
--- 300,318 ----
SplashUnlock(splash);
}
return success;
}
! JNIEXPORT int JNICALL
SplashLoadFile(const char *filename)
{
SplashStream stream;
return SplashStreamInitFile(&stream, filename) &&
SplashLoadStream(&stream);
}
! JNIEXPORT int JNICALL
SplashLoadMemory(void *data, int size)
{
SplashStream stream;
return SplashStreamInitMemory(&stream, data, size) &&
SplashLoadStream(&stream);
*** 393,403 ****
pStream->peek = peekMem;
pStream->close = closeMem;
return 1;
}
! SPLASHEXPORT int
SplashGetScaledImgNameMaxPstfixLen(const char *fileName){
return strlen(fileName) + strlen("@100pct") + 1;
}
jboolean GetScaledImageName(const char *fileName, char *scaleImageName,
--- 393,403 ----
pStream->peek = peekMem;
pStream->close = closeMem;
return 1;
}
! JNIEXPORT int JNICALL
SplashGetScaledImgNameMaxPstfixLen(const char *fileName){
return strlen(fileName) + strlen("@100pct") + 1;
}
jboolean GetScaledImageName(const char *fileName, char *scaleImageName,
< prev index next >