]>
code.delx.au - refind/blob - libeg/libegint.h
3 * EFI graphics library internal header
5 * Copyright (c) 2006 Christoph Pfisterer
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions are
12 * * Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
15 * * Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the
20 * * Neither the name of Christoph Pfisterer nor the names of the
21 * contributors may be used to endorse or promote products derived
22 * from this software without specific prior written permission.
24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
25 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
26 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
27 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
28 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
29 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
30 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
31 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
32 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
33 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
34 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37 #ifndef __LIBEG_LIBEGINT_H__
38 #define __LIBEG_LIBEGINT_H__
40 #ifdef __MAKEWITH_GNUEFI
44 #include "../include/tiano_includes.h"
51 typedef EG_IMAGE
* (*EG_DECODE_FUNC
)(IN UINT8
*FileData
, IN UINTN FileDataLength
, IN UINTN IconSize
, IN BOOLEAN WantAlpha
);
55 BOOLEAN
egSetScreenSize(IN OUT UINTN
*ScreenWidth
, IN OUT UINTN
*ScreenHeight
);
57 VOID
egRestrictImageArea(IN EG_IMAGE
*Image
,
58 IN UINTN AreaPosX
, IN UINTN AreaPosY
,
59 IN OUT UINTN
*AreaWidth
, IN OUT UINTN
*AreaHeight
);
60 VOID
egRawCopy(IN OUT EG_PIXEL
*CompBasePtr
, IN EG_PIXEL
*TopBasePtr
,
61 IN UINTN Width
, IN UINTN Height
,
62 IN UINTN CompLineOffset
, IN UINTN TopLineOffset
);
63 VOID
egRawCompose(IN OUT EG_PIXEL
*CompBasePtr
, IN EG_PIXEL
*TopBasePtr
,
64 IN UINTN Width
, IN UINTN Height
,
65 IN UINTN CompLineOffset
, IN UINTN TopLineOffset
);
67 #define PLPTR(imagevar, colorname) ((UINT8 *) &((imagevar)->PixelData->colorname))
69 VOID
egDecompressIcnsRLE(IN OUT UINT8
**CompData
, IN OUT UINTN
*CompLen
, IN UINT8
*DestPlanePtr
, IN UINTN PixelCount
);
70 VOID
egInsertPlane(IN UINT8
*SrcDataPtr
, IN UINT8
*DestPlanePtr
, IN UINTN PixelCount
);
71 VOID
egSetPlane(IN UINT8
*DestPlanePtr
, IN UINT8 Value
, IN UINTN PixelCount
);
72 VOID
egCopyPlane(IN UINT8
*SrcPlanePtr
, IN UINT8
*DestPlanePtr
, IN UINTN PixelCount
);
74 EG_IMAGE
* egDecodeBMP(IN UINT8
*FileData
, IN UINTN FileDataLength
, IN UINTN IconSize
, IN BOOLEAN WantAlpha
);
75 EG_IMAGE
* egDecodeICNS(IN UINT8
*FileData
, IN UINTN FileDataLength
, IN UINTN IconSize
, IN BOOLEAN WantAlpha
);
77 VOID
egEncodeBMP(IN EG_IMAGE
*Image
, OUT UINT8
**FileData
, OUT UINTN
*FileDataLength
);
80 #endif /* __LIBEG_LIBEGINT_H__ */