fdo#74697 Add Bluez 5 support for impress remote.
[LibreOffice.git] / include / vcl / sysdata.hxx
blobd06e72aee22fdda3ffced16b5953864eb38df22c
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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
23 #include <vector>
24 #include <cstddef>
26 #ifdef MACOSX
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;
32 #endif
33 #ifdef __OBJC__
34 @class NSView;
35 #else
36 class NSView;
37 #endif
38 #endif
40 #ifdef IOS
41 typedef const struct __CTFont * CTFontRef;
42 typedef struct CGContext *CGContextRef;
43 #endif
45 #if defined( WNT )
46 #ifdef _MSC_VER
47 #pragma warning(push)
48 #pragma warning(disable:4201)
49 #endif
50 #include <windef.h>
51 #ifdef _MSC_VER
52 #pragma warning(pop)
53 #endif
54 #endif
56 // -----------------
57 // - SystemEnvData -
58 // -----------------
60 struct SystemEnvData
62 unsigned long nSize; // size in bytes of this structure
63 #if defined( WNT )
64 HWND hWnd; // the window hwnd
65 #elif defined( MACOSX )
66 NSView* pView; // the cocoa (NSView *) implementing this object
67 #elif defined( ANDROID )
68 // Nothing
69 #elif defined( IOS )
70 // Nothing
71 #elif defined( UNX )
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
83 #endif
86 #define SystemChildData SystemEnvData
88 // --------------------
89 // - SystemParentData -
90 // --------------------
92 struct SystemParentData
94 unsigned long nSize; // size in bytes of this structure
95 #if defined( WNT )
96 HWND hWnd; // the window hwnd
97 #elif defined( MACOSX )
98 NSView* pView; // the cocoa (NSView *) implementing this object
99 #elif defined( ANDROID )
100 // Nothing
101 #elif defined( IOS )
102 // Nothing
103 #elif defined( UNX )
104 long aWindow; // the window of the object
105 bool bXEmbedSupport:1; // decides whether the object in question
106 // should support the XEmbed protocol
107 #endif
110 // --------------------
111 // - SystemMenuData -
112 // --------------------
114 struct SystemMenuData
116 unsigned long nSize; // size in bytes of this structure
117 #if defined( WNT )
118 HMENU hMenu; // the menu handle of the menu bar
119 #elif defined( MACOSX )
120 // Nothing
121 #elif defined( ANDROID )
122 // Nothing
123 #elif defined( IOS )
124 // Nothing
125 #elif defined( UNX )
126 long aMenu; // ???
127 #endif
130 // --------------------
131 // - SystemGraphicsData -
132 // --------------------
134 struct SystemGraphicsData
136 unsigned long nSize; // size in bytes of this structure
137 #if defined( WNT )
138 HDC hDC; // handle to a device context
139 #elif defined( MACOSX )
140 CGContextRef rCGContext; // CoreGraphics graphic context
141 #elif defined( ANDROID )
142 // Nothing
143 #elif defined( IOS )
144 // Nothing
145 #elif defined( UNX )
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
153 #endif
154 SystemGraphicsData()
155 : nSize( sizeof( SystemGraphicsData ) )
156 #if defined( WNT )
157 , hDC( 0 )
158 #elif defined( MACOSX )
159 // Nothing
160 #elif defined( ANDROID )
161 // Nothing
162 #elif defined( IOS )
163 // Nothing
164 #elif defined( UNX )
165 , pDisplay( NULL )
166 , hDrawable( 0 )
167 , pVisual( NULL )
168 , nScreen( 0 )
169 , nDepth( 0 )
170 , aColormap( 0 )
171 , pXRenderFormat( NULL )
172 #endif
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
186 // Nothing
187 #elif defined( ANDROID )
188 // Nothing
189 #elif defined( IOS )
190 // Nothing
191 #elif defined( UNX )
192 void* pVisual; // the visual to be used
193 #endif
197 // --------------------
198 // - SystemGlyphData -
199 // --------------------
201 struct SystemGlyphData
203 unsigned long index;
204 double x;
205 double y;
206 int fallbacklevel;
210 // --------------------
211 // - SystemFontData -
212 // --------------------
213 struct SystemFontData
215 unsigned long nSize; // size in bytes of this structure
216 #if defined( WNT )
217 HFONT hFont; // native font object
218 #elif defined( MACOSX )
219 #ifdef ENABLE_CORETEXT
220 CTFontRef rCTFont; // native font object
221 #else
222 void* aATSUFontID; // native font object
223 #endif
224 #elif defined( IOS )
225 CTFontRef rCTFont; // native font object
226 #elif defined( UNX )
227 void* nFontId; // native font id
228 int nFontFlags; // native font flags
229 #endif
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
235 SystemFontData()
236 : nSize( sizeof( SystemFontData ) )
237 #if defined( WNT )
238 , hFont( 0 )
239 #elif defined( MACOSX )
240 #ifdef ENABLE_CORETEXT
241 #else
242 , aATSUFontID( NULL )
243 #endif
244 #elif defined( IOS )
245 #elif defined( UNX )
246 , nFontId( NULL )
247 , nFontFlags( 0 )
248 #endif
249 , bFakeBold( false )
250 , bFakeItalic( false )
251 , bAntialias( true )
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: */