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