< prev index next >

src/java.desktop/share/native/libsplashscreen/splashscreen_impl.h

Print this page


   1 /*
   2  * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  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 #include "jni.h"
  32 
  33 SPLASHEXPORT int SplashLoadMemory(void *pdata, int size); /* requires preloading the file */
  34 SPLASHEXPORT int SplashLoadFile(const char *filename);  // FIXME: range checking for SplashLoadMemory
  35 
  36 SPLASHEXPORT void SplashInit(void);
  37 SPLASHEXPORT void SplashClose(void);
  38 
  39 SPLASHEXPORT void SplashSetScaleFactor(float);
  40 SPLASHEXPORT jboolean SplashGetScaledImageName(const char*, const char*,









  41                               float*, char*, const size_t scaledImageNameLength);
  42 
  43 SPLASHEXPORT void
  44 SplashSetFileJarName(const char* fileName, const char* jarName);
  45 
  46 SPLASHEXPORT int
  47 SplashGetScaledImgNameMaxPstfixLen(const char*);
  48 typedef struct SplashImage
  49 {
  50     rgbquad_t *bitmapBits;
  51     int delay;                  /* before next image display, in msec                                                       */
  52 #if defined(WITH_WIN32)
  53     HRGN hRgn;
  54 #elif defined(WITH_X11)
  55     XRectangle *rects;
  56     int numRects;
  57 #endif
  58 } SplashImage;
  59 
  60 #define SPLASH_COLOR_MAP_SIZE 0x100
  61 
  62 typedef struct Splash
  63 {
  64     ImageFormat screenFormat;   /* must be preset before image decoding */
  65     DitherSettings dithers[3];
  66     ImageFormat imageFormat;


   1 /*
   2  * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  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 #include "jni.h"
  32 
  33 JNIEXPORT int JNICALL
  34 SplashLoadMemory(void *pdata, int size); /* requires preloading the file */
  35 
  36 JNIEXPORT int JNICALL
  37 SplashLoadFile(const char *filename);  // FIXME: range checking for SplashLoadMemory
  38 
  39 JNIEXPORT void JNICALL
  40 SplashInit(void);
  41 
  42 JNIEXPORT void JNICALL
  43 SplashClose(void);
  44 
  45 JNIEXPORT void JNICALL
  46 SplashSetScaleFactor(float);
  47 
  48 JNIEXPORT jboolean JNICALL
  49 SplashGetScaledImageName(const char*, const char*,
  50                               float*, char*, const size_t scaledImageNameLength);
  51 
  52 JNIEXPORT void JNICALL
  53 SplashSetFileJarName(const char* fileName, const char* jarName);
  54 
  55 JNIEXPORT int JNICALL
  56 SplashGetScaledImgNameMaxPstfixLen(const char*);
  57 typedef struct SplashImage
  58 {
  59     rgbquad_t *bitmapBits;
  60     int delay;                  /* before next image display, in msec                                                       */
  61 #if defined(WITH_WIN32)
  62     HRGN hRgn;
  63 #elif defined(WITH_X11)
  64     XRectangle *rects;
  65     int numRects;
  66 #endif
  67 } SplashImage;
  68 
  69 #define SPLASH_COLOR_MAP_SIZE 0x100
  70 
  71 typedef struct Splash
  72 {
  73     ImageFormat screenFormat;   /* must be preset before image decoding */
  74     DitherSettings dithers[3];
  75     ImageFormat imageFormat;


< prev index next >