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 #include <vcl/sysdata.hxx> 37 #include <vcl/syschild.hxx> 38 39 namespace cairo 40 { 41 /**************************************************************************************** 42 * Platform independent part of surface backends for OpenOffice.org Cairo Canvas * 43 * For the rest of the functions (and the platform-specific derived * 44 * Surface classes), see platform specific cairo_<platform>_cairo.cxx * 45 ****************************************************************************************/ 46 47 const SystemEnvData* GetSysData(const Window *pOutputWindow) 48 { 49 const SystemEnvData* pSysData = NULL; 50 // check whether we're a SysChild: have to fetch system data 51 // directly from SystemChildWindow, because the GetSystemData 52 // method is unfortunately not virtual 53 const SystemChildWindow* pSysChild = dynamic_cast< const SystemChildWindow* >( pOutputWindow ); 54 if( pSysChild ) 55 pSysData = pSysChild->GetSystemData(); 56 else 57 pSysData = pOutputWindow->GetSystemData(); 58 return pSysData; 59 } 60 } 61