1*906a4e93SYuri Dario /************************************************************** 2*906a4e93SYuri Dario * 3*906a4e93SYuri Dario * Licensed to the Apache Software Foundation (ASF) under one 4*906a4e93SYuri Dario * or more contributor license agreements. See the NOTICE file 5*906a4e93SYuri Dario * distributed with this work for additional information 6*906a4e93SYuri Dario * regarding copyright ownership. The ASF licenses this file 7*906a4e93SYuri Dario * to you under the Apache License, Version 2.0 (the 8*906a4e93SYuri Dario * "License"); you may not use this file except in compliance 9*906a4e93SYuri Dario * with the License. You may obtain a copy of the License at 10*906a4e93SYuri Dario * 11*906a4e93SYuri Dario * http://www.apache.org/licenses/LICENSE-2.0 12*906a4e93SYuri Dario * 13*906a4e93SYuri Dario * Unless required by applicable law or agreed to in writing, 14*906a4e93SYuri Dario * software distributed under the License is distributed on an 15*906a4e93SYuri Dario * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*906a4e93SYuri Dario * KIND, either express or implied. See the License for the 17*906a4e93SYuri Dario * specific language governing permissions and limitations 18*906a4e93SYuri Dario * under the License. 19*906a4e93SYuri Dario * 20*906a4e93SYuri Dario *************************************************************/ 21*906a4e93SYuri Dario 22*906a4e93SYuri Dario 23*906a4e93SYuri Dario 24*906a4e93SYuri Dario #ifndef _CAIROCANVAS_OS2_CAIRO_HXX 25*906a4e93SYuri Dario #define _CAIROCANVAS_OS2_CAIRO_HXX 26*906a4e93SYuri Dario 27*906a4e93SYuri Dario #include "cairo_cairo.hxx" 28*906a4e93SYuri Dario 29*906a4e93SYuri Dario typedef ULONG HFONT; 30*906a4e93SYuri Dario 31*906a4e93SYuri Dario namespace cairo { 32*906a4e93SYuri Dario 33*906a4e93SYuri Dario class Os2Surface : public Surface 34*906a4e93SYuri Dario { 35*906a4e93SYuri Dario CairoSurfaceSharedPtr mpSurface; 36*906a4e93SYuri Dario 37*906a4e93SYuri Dario public: 38*906a4e93SYuri Dario /// takes over ownership of passed cairo_surface 39*906a4e93SYuri Dario explicit Os2Surface( const CairoSurfaceSharedPtr& pSurface ); 40*906a4e93SYuri Dario /// create surface on subarea of given drawable 41*906a4e93SYuri Dario Os2Surface( HWND hWnd, int x, int y, int w, int h); 42*906a4e93SYuri Dario /// create surface for given bitmap data 43*906a4e93SYuri Dario Os2Surface( const BitmapSystemData& rBmpData ); 44*906a4e93SYuri Dario 45*906a4e93SYuri Dario // Surface interface 46*906a4e93SYuri Dario virtual CairoSharedPtr getCairo() const; getCairoSurface() const47*906a4e93SYuri Dario virtual CairoSurfaceSharedPtr getCairoSurface() const { return mpSurface; } 48*906a4e93SYuri Dario virtual SurfaceSharedPtr getSimilar( Content aContent, int width, int height ) const; 49*906a4e93SYuri Dario 50*906a4e93SYuri Dario virtual boost::shared_ptr<VirtualDevice> createVirtualDevice() const; 51*906a4e93SYuri Dario 52*906a4e93SYuri Dario virtual void Resize( int width, int height ); 53*906a4e93SYuri Dario 54*906a4e93SYuri Dario virtual void flush() const; 55*906a4e93SYuri Dario 56*906a4e93SYuri Dario int getDepth() const; 57*906a4e93SYuri Dario }; 58*906a4e93SYuri Dario 59*906a4e93SYuri Dario unsigned long ucs4toindex(unsigned int ucs4, const char* font); 60*906a4e93SYuri Dario } 61*906a4e93SYuri Dario 62*906a4e93SYuri Dario #endif 63