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 INCLUDED_VCL_SYSDATA_HXX
21 #define INCLUDED_VCL_SYSDATA_HXX
27 // predeclare the native classes to avoid header/include problems
28 typedef struct CGContext
*CGContextRef
;
29 typedef struct CGLayer
*CGLayerRef
;
30 typedef const struct __CTFont
* CTFontRef
;
39 typedef const struct __CTFont
* CTFontRef
;
40 typedef struct CGContext
*CGContextRef
;
51 unsigned long nSize
; // size in bytes of this structure
53 HWND hWnd
; // the window hwnd
54 #elif defined( MACOSX )
55 NSView
* mpNSView
; // the cocoa (NSView *) implementing this object
56 bool mbOpenGL
; // use a OpenGL providing NSView
57 #elif defined( ANDROID )
62 void* pDisplay
; // the relevant display connection
63 long aWindow
; // the window of the object
64 void* pSalFrame
; // contains a salframe, if object has one
65 void* pWidget
; // the corresponding widget
66 void* pVisual
; // the visual in use
67 int nScreen
; // the current screen of the window
68 int nDepth
; // depth of said visual
69 long aColormap
; // the colormap being used
70 void* pAppContext
; // the application context in use
71 long aShellWindow
; // the window of the frame's shell
72 void* pShellWidget
; // the frame's shell widget
79 #elif defined( MACOSX )
82 #elif defined( ANDROID )
101 struct SystemParentData
103 unsigned long nSize
; // size in bytes of this structure
105 HWND hWnd
; // the window hwnd
106 #elif defined( MACOSX )
107 NSView
* pView
; // the cocoa (NSView *) implementing this object
108 #elif defined( ANDROID )
113 long aWindow
; // the window of the object
114 bool bXEmbedSupport
:1; // decides whether the object in question
115 // should support the XEmbed protocol
119 struct SystemMenuData
121 unsigned long nSize
; // size in bytes of this structure
123 HMENU hMenu
; // the menu handle of the menu bar
124 #elif defined( MACOSX )
126 #elif defined( ANDROID )
135 struct SystemGraphicsData
137 unsigned long nSize
; // size in bytes of this structure
139 HDC hDC
; // handle to a device context
140 HWND hWnd
; // optional handle to a window
141 #elif defined( MACOSX )
142 CGContextRef rCGContext
; // CoreGraphics graphic context
143 #elif defined( ANDROID )
146 CGContextRef rCGContext
; // CoreGraphics graphic context
148 void* pDisplay
; // the relevant display connection
149 long hDrawable
; // a drawable
150 void* pVisual
; // the visual in use
151 int nScreen
; // the current screen of the drawable
152 int nDepth
; // depth of said visual
153 long aColormap
; // the colormap being used
154 void* pXRenderFormat
; // render format for drawable
157 : nSize( sizeof( SystemGraphicsData
) )
161 #elif defined( MACOSX )
163 #elif defined( ANDROID )
174 , pXRenderFormat( NULL
)
179 struct SystemWindowData
181 unsigned long nSize
; // size in bytes of this structure
182 #if defined( WNT ) // meaningless on Windows
183 #elif defined( MACOSX )
184 bool bOpenGL
; // create a OpenGL providing NSView
185 bool bLegacy
; // create a 2.1 legacy context, only valid if bOpenGL == true
186 #elif defined( ANDROID )
191 void* pVisual
; // the visual to be used
195 struct SystemGlyphData
203 struct SystemFontData
205 unsigned long nSize
; // size in bytes of this structure
207 HFONT hFont
; // native font object
208 #elif defined( MACOSX )
210 void* nFontId
; // native font id
211 int nFontFlags
; // native font flags
213 bool bFakeBold
; // Does this font need faking the bold style
214 bool bFakeItalic
; // Does this font need faking the italic style
215 bool bAntialias
; // Should this font be antialiased
216 bool bVerticalCharacterType
; // Is the font using vertical character type
219 : nSize( sizeof( SystemFontData
) )
222 #elif defined( MACOSX )
228 , bFakeItalic( false )
230 , bVerticalCharacterType( false )
235 typedef std::vector
<SystemGlyphData
> SystemGlyphDataVector
;
237 struct SystemTextLayoutData
239 unsigned long nSize
; // size in bytes of this structure
240 SystemGlyphDataVector rGlyphData
; // glyph data
241 int orientation
; // Text orientation
244 #endif // INCLUDED_VCL_SYSDATA_HXX
246 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */