/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
struct VCL_DLLPUBLIC SystemEnvData
{ enumclass Toolkit { Invalid, Gen, Gtk, Qt };
Toolkit toolkit; // the toolkit in use #ifdefined(_WIN32)
HWND hWnd; // the window hwnd #elifdefined( MACOSX )
NSView* mpNSView; // the cocoa (NSView *) implementing this object bool mbOpenGL; // use an OpenGL providing NSView #elifdefined( ANDROID ) // Nothing #elifdefined( IOS ) // Nothing #elifdefined( UNX ) enumclass Platform { Invalid, Wayland, Xcb, WASM };
void* pDisplay; // the relevant display connection
SalFrame* pSalFrame; // contains a salframe, if object has one void* pWidget; // the corresponding widget void* pVisual; // the visual in use int nScreen; // the current screen of the window
Platform platform; // the windowing system in use private:
sal_uIntPtr aWindow; // the window of the object public:
// SalFrame can be any SalFrame, just needed to determine which backend to use // to resolve the window handle
sal_uIntPtr GetWindowHandle(const SalFrame* pReference) const;
struct SystemParentData
{
sal_uInt32 nSize; // size in bytes of this structure #ifdefined(_WIN32)
HWND hWnd; // the window hwnd #elifdefined( MACOSX )
NSView* pView; // the cocoa (NSView *) implementing this object #elifdefined( ANDROID ) // Nothing #elifdefined( IOS ) // Nothing #elifdefined( UNX )
sal_uIntPtr aWindow; // the window of the object bool bXEmbedSupport:1; // decides whether the object in question // should support the XEmbed protocol #endif
};
struct SystemMenuData
{ #ifdefined(_WIN32)
HMENU hMenu; // the menu handle of the menu bar #else // Nothing #endif
};
struct SystemGraphicsData
{
sal_uInt32 nSize; // size in bytes of this structure #ifdefined(_WIN32)
HDC hDC; // handle to a device context
HWND hWnd; // optional handle to a window #elifdefined( MACOSX )
CGContextRef rCGContext; // CoreGraphics graphic context #elifdefined( ANDROID ) // Nothing #elifdefined( IOS )
CGContextRef rCGContext; // CoreGraphics graphic context #elifdefined( UNX ) void* pDisplay; // the relevant display connection
sal_uIntPtr hDrawable; // a drawable void* pVisual; // the visual in use int nScreen; // the current screen of the drawable #endif #if USE_HEADLESS_CODE void* pSurface; // the cairo surface when using svp-based backends, which includes gtk[3|4] #endif
SystemGraphicsData()
: nSize( sizeof( SystemGraphicsData ) ) #ifdefined(_WIN32)
, hDC( nullptr )
, hWnd( nullptr ) #elifdefined( MACOSX )
, rCGContext( nullptr ) #elifdefined( ANDROID ) // Nothing #elifdefined( IOS )
, rCGContext( NULL ) #elifdefined( UNX )
, pDisplay( nullptr )
, hDrawable( 0 )
, pVisual( nullptr )
, nScreen( 0 ) #endif #if USE_HEADLESS_CODE
, pSurface( nullptr ) #endif
{ }
};
struct SystemWindowData
{ #ifdefined(_WIN32) // meaningless on Windows #elifdefined( MACOSX ) bool bOpenGL; // create an OpenGL providing NSView bool bLegacy; // create a 2.1 legacy context, only valid if bOpenGL == true #elifdefined( ANDROID ) // Nothing #elifdefined( IOS ) // Nothing #elifdefined( UNX ) void* pVisual; // the visual to be used bool bClipUsingNativeWidget; // default is false, true will attempt to clip the childwindow with a native widget #endif
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.