125ea7f45SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 325ea7f45SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 425ea7f45SAndrew Rist * or more contributor license agreements. See the NOTICE file 525ea7f45SAndrew Rist * distributed with this work for additional information 625ea7f45SAndrew Rist * regarding copyright ownership. The ASF licenses this file 725ea7f45SAndrew Rist * to you under the Apache License, Version 2.0 (the 825ea7f45SAndrew Rist * "License"); you may not use this file except in compliance 925ea7f45SAndrew Rist * with the License. You may obtain a copy of the License at 10cdf0e10cSrcweir * 1125ea7f45SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12cdf0e10cSrcweir * 1325ea7f45SAndrew Rist * Unless required by applicable law or agreed to in writing, 1425ea7f45SAndrew Rist * software distributed under the License is distributed on an 1525ea7f45SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 1625ea7f45SAndrew Rist * KIND, either express or implied. See the License for the 1725ea7f45SAndrew Rist * specific language governing permissions and limitations 1825ea7f45SAndrew Rist * under the License. 19cdf0e10cSrcweir * 2025ea7f45SAndrew Rist *************************************************************/ 2125ea7f45SAndrew Rist 2225ea7f45SAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir 25cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove 26cdf0e10cSrcweir #include "precompiled_canvas.hxx" 27cdf0e10cSrcweir 28cdf0e10cSrcweir #include "cairo_cairo.hxx" 29cdf0e10cSrcweir 30cdf0e10cSrcweir #ifdef WNT 31cdf0e10cSrcweir # include <tools/prewin.h> 32cdf0e10cSrcweir # include <windows.h> 33cdf0e10cSrcweir # include <tools/postwin.h> 34cdf0e10cSrcweir #endif 35cdf0e10cSrcweir 36*906a4e93SYuri Dario #ifdef OS2 37*906a4e93SYuri Dario # include <svpm.h> 38*906a4e93SYuri Dario #endif 39*906a4e93SYuri Dario 40cdf0e10cSrcweir #include <vcl/sysdata.hxx> 41cdf0e10cSrcweir #include <vcl/syschild.hxx> 42cdf0e10cSrcweir 43cdf0e10cSrcweir namespace cairo 44cdf0e10cSrcweir { 45cdf0e10cSrcweir /**************************************************************************************** 46cdf0e10cSrcweir * Platform independent part of surface backends for OpenOffice.org Cairo Canvas * 47cdf0e10cSrcweir * For the rest of the functions (and the platform-specific derived * 48cdf0e10cSrcweir * Surface classes), see platform specific cairo_<platform>_cairo.cxx * 49cdf0e10cSrcweir ****************************************************************************************/ 50cdf0e10cSrcweir GetSysData(const Window * pOutputWindow)51cdf0e10cSrcweir const SystemEnvData* GetSysData(const Window *pOutputWindow) 52cdf0e10cSrcweir { 53cdf0e10cSrcweir const SystemEnvData* pSysData = NULL; 54cdf0e10cSrcweir // check whether we're a SysChild: have to fetch system data 55cdf0e10cSrcweir // directly from SystemChildWindow, because the GetSystemData 56cdf0e10cSrcweir // method is unfortunately not virtual 57cdf0e10cSrcweir const SystemChildWindow* pSysChild = dynamic_cast< const SystemChildWindow* >( pOutputWindow ); 58cdf0e10cSrcweir if( pSysChild ) 59cdf0e10cSrcweir pSysData = pSysChild->GetSystemData(); 60cdf0e10cSrcweir else 61cdf0e10cSrcweir pSysData = pOutputWindow->GetSystemData(); 62cdf0e10cSrcweir return pSysData; 63cdf0e10cSrcweir } 64cdf0e10cSrcweir } 65