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 .
20 #ifndef _SV_SYSDATA_HXX
21 #define _SV_SYSDATA_HXX
27 // predeclare the native classes to avoid header/include problems
28 typedef struct CGContext
*CGContextRef
;
29 typedef struct CGLayer
*CGLayerRef
;
30 #ifdef ENABLE_CORETEXT
31 typedef const struct __CTFont
* CTFontRef
;
41 typedef const struct __CTFont
* CTFontRef
;
42 typedef struct CGContext
*CGContextRef
;
48 #pragma warning(disable:4201)
62 unsigned long nSize
; // size in bytes of this structure
64 HWND hWnd
; // the window hwnd
65 #elif defined( MACOSX )
66 NSView
* pView
; // the cocoa (NSView *) implementing this object
67 #elif defined( ANDROID )
72 void* pDisplay
; // the relevant display connection
73 long aWindow
; // the window of the object
74 void* pSalFrame
; // contains a salframe, if object has one
75 void* pWidget
; // the corresponding widget
76 void* pVisual
; // the visual in use
77 int nScreen
; // the current screen of the window
78 int nDepth
; // depth of said visual
79 long aColormap
; // the colormap being used
80 void* pAppContext
; // the application context in use
81 long aShellWindow
; // the window of the frame's shell
82 void* pShellWidget
; // the frame's shell widget
86 #define SystemChildData SystemEnvData
88 // --------------------
89 // - SystemParentData -
90 // --------------------
92 struct SystemParentData
94 unsigned long nSize
; // size in bytes of this structure
96 HWND hWnd
; // the window hwnd
97 #elif defined( MACOSX )
98 NSView
* pView
; // the cocoa (NSView *) implementing this object
99 #elif defined( ANDROID )
104 long aWindow
; // the window of the object
105 bool bXEmbedSupport
:1; // decides whether the object in question
106 // should support the XEmbed protocol
110 // --------------------
111 // - SystemMenuData -
112 // --------------------
114 struct SystemMenuData
116 unsigned long nSize
; // size in bytes of this structure
118 HMENU hMenu
; // the menu handle of the menu bar
119 #elif defined( MACOSX )
121 #elif defined( ANDROID )
130 // --------------------
131 // - SystemGraphicsData -
132 // --------------------
134 struct SystemGraphicsData
136 unsigned long nSize
; // size in bytes of this structure
138 HDC hDC
; // handle to a device context
139 #elif defined( MACOSX )
140 CGContextRef rCGContext
; // CoreGraphics graphic context
141 #elif defined( ANDROID )
146 void* pDisplay
; // the relevant display connection
147 long hDrawable
; // a drawable
148 void* pVisual
; // the visual in use
149 int nScreen
; // the current screen of the drawable
150 int nDepth
; // depth of said visual
151 long aColormap
; // the colormap being used
152 void* pXRenderFormat
; // render format for drawable
155 : nSize( sizeof( SystemGraphicsData
) )
158 #elif defined( MACOSX )
160 #elif defined( ANDROID )
171 , pXRenderFormat( NULL
)
177 // --------------------
178 // - SystemWindowData -
179 // --------------------
181 struct SystemWindowData
183 unsigned long nSize
; // size in bytes of this structure
184 #if defined( WNT ) // meaningless on Windows
185 #elif defined( MACOSX ) // meaningless on Mac OS X
187 #elif defined( ANDROID )
192 void* pVisual
; // the visual to be used
197 // --------------------
198 // - SystemGlyphData -
199 // --------------------
201 struct SystemGlyphData
210 // --------------------
211 // - SystemFontData -
212 // --------------------
213 struct SystemFontData
215 unsigned long nSize
; // size in bytes of this structure
217 HFONT hFont
; // native font object
218 #elif defined( MACOSX )
219 #ifdef ENABLE_CORETEXT
220 CTFontRef rCTFont
; // native font object
222 void* aATSUFontID
; // native font object
225 CTFontRef rCTFont
; // native font object
227 void* nFontId
; // native font id
228 int nFontFlags
; // native font flags
230 bool bFakeBold
; // Does this font need faking the bold style
231 bool bFakeItalic
; // Does this font need faking the italic style
232 bool bAntialias
; // Should this font be antialiased
233 bool bVerticalCharacterType
; // Is the font using vertical character type
236 : nSize( sizeof( SystemFontData
) )
239 #elif defined( MACOSX )
240 #ifdef ENABLE_CORETEXT
242 , aATSUFontID( NULL
)
250 , bFakeItalic( false )
252 , bVerticalCharacterType( false )
257 // --------------------
258 // - SystemTextLayoutData -
259 // --------------------
261 typedef std::vector
<SystemGlyphData
> SystemGlyphDataVector
;
263 struct SystemTextLayoutData
265 unsigned long nSize
; // size in bytes of this structure
266 SystemGlyphDataVector rGlyphData
; // glyph data
267 int orientation
; // Text orientation
270 #endif // _SV_SYSDATA_HXX
272 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */