1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
23 #include <X11/Xutil.h>
25 #include <com/sun/star/uno/Sequence.hxx>
26 #include <sal/types.h>
31 sal_uInt8
* X11_getBmpFromPixmap( Display
* pDisplay
,
34 sal_Int32
& rOutSize
);
47 tools::ULong m_nBlueShift2Mask
, m_nRedShift2Mask
, m_nGreenShift2Mask
;
49 // these expect data pointers to bitmapinfo header
50 void setBitmapDataTC( const sal_uInt8
* pData
, XImage
* pImage
);
51 void setBitmapDataTCDither( const sal_uInt8
* pData
, XImage
* pImage
);
52 void setBitmapDataPalette( const sal_uInt8
* pData
, XImage
* pImage
);
54 tools::ULong
getTCPixel( sal_uInt8 r
, sal_uInt8 g
, sal_uInt8 b
) const;
56 PixmapHolder( Display
* pDisplay
);
59 // accepts bitmap file (including bitmap file header)
60 Pixmap
setBitmapData( const sal_uInt8
* pData
);
61 bool needsConversion( const sal_uInt8
* pData
) const;
63 Colormap
getColormap() const { return m_aColormap
; }
64 Pixmap
getPixmap() const { return m_aPixmap
; }
65 Pixmap
getBitmap() const { return m_aBitmap
; }
66 VisualID
getVisualID() const { return m_aInfo
.visualid
; }
67 int getDepth() const { return m_aInfo
.depth
; }
70 css::uno::Sequence
<sal_Int8
> convertBitmapDepth(
71 css::uno::Sequence
<sal_Int8
> const & data
, int depth
);
75 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */