Commit 6fb113f0 authored by darin's avatar darin

Reviewed and worked over a lot by Darin.

        - check in first set of GDK-specific sources

        * platform/gdk/BrowserExtensionGdk.h: Added.
        * platform/gdk/CookieJarGdk.cpp: Added.
        * platform/gdk/CursorGdk.cpp: Added.
        * platform/gdk/FontCacheGdk.cpp: Added.
        * platform/gdk/FontDataGdk.cpp: Added.
        * platform/gdk/FontGdk.cpp: Added.
        * platform/gdk/FontPlatformData.h: Added.
        * platform/gdk/FontPlatformDataGdk.cpp: Added.
        * platform/gdk/FrameGdk.cpp: Added.
        * platform/gdk/FrameGdk.h: Added.
        * platform/gdk/GlyphMapGdk.cpp: Added.
        * platform/gdk/KeyEventGdk.cpp: Added.
        * platform/gdk/KeyboardCodes.h: Added.
        * platform/gdk/MouseEventGdk.cpp: Added.
        * platform/gdk/PageGdk.cpp: Added.
        * platform/gdk/RenderThemeGdk.cpp: Added.
        * platform/gdk/RenderThemeGdk.h: Added.
        * platform/gdk/ScreenGdk.cpp: Added.
        * platform/gdk/ScrollViewGdk.cpp: Added.
        * platform/gdk/SharedTimerLinux.cpp: Added.
        * platform/gdk/SystemTimeLinux.cpp: Added.
        * platform/gdk/TemporaryLinkStubs.cpp: Added.
        * platform/gdk/TransferJobCurl.cpp: Added.
        * platform/gdk/TransferJobManager.cpp: Added.
        * platform/gdk/TransferJobManager.h: Added.
        * platform/gdk/WheelEventGdk.cpp: Added.
        * platform/gdk/WidgetGdk.cpp: Added.
        * platform/gdk/gdk-encodings.txt: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15124 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 86c42062
2006-06-30 Mike Emmel <mike.emmel@gmail.com>
Reviewed and worked over a lot by Darin.
- check in first set of GDK-specific sources
* platform/gdk/BrowserExtensionGdk.h: Added.
* platform/gdk/CookieJarGdk.cpp: Added.
* platform/gdk/CursorGdk.cpp: Added.
* platform/gdk/FontCacheGdk.cpp: Added.
* platform/gdk/FontDataGdk.cpp: Added.
* platform/gdk/FontGdk.cpp: Added.
* platform/gdk/FontPlatformData.h: Added.
* platform/gdk/FontPlatformDataGdk.cpp: Added.
* platform/gdk/FrameGdk.cpp: Added.
* platform/gdk/FrameGdk.h: Added.
* platform/gdk/GlyphMapGdk.cpp: Added.
* platform/gdk/KeyEventGdk.cpp: Added.
* platform/gdk/KeyboardCodes.h: Added.
* platform/gdk/MouseEventGdk.cpp: Added.
* platform/gdk/PageGdk.cpp: Added.
* platform/gdk/RenderThemeGdk.cpp: Added.
* platform/gdk/RenderThemeGdk.h: Added.
* platform/gdk/ScreenGdk.cpp: Added.
* platform/gdk/ScrollViewGdk.cpp: Added.
* platform/gdk/SharedTimerLinux.cpp: Added.
* platform/gdk/SystemTimeLinux.cpp: Added.
* platform/gdk/TemporaryLinkStubs.cpp: Added.
* platform/gdk/TransferJobCurl.cpp: Added.
* platform/gdk/TransferJobManager.cpp: Added.
* platform/gdk/TransferJobManager.h: Added.
* platform/gdk/WheelEventGdk.cpp: Added.
* platform/gdk/WidgetGdk.cpp: Added.
* platform/gdk/gdk-encodings.txt: Added.
2006-06-30 Mike Emmel <mike.emmel@gmail.com>
Reviewed by Darin.
......
/*
* Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
* Copyright (C) 2006 Michael Emmel mike.emmel@gmail.com
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef BrowserExtensionGdk_H_
#define BrowserExtensionGdk_H_
#include "BrowserExtension.h"
namespace WebCore {
class Frame;
class FrameGdk;
class BrowserExtensionGdk : public BrowserExtension {
public:
BrowserExtensionGdk(Frame*);
virtual void createNewWindow(const ResourceRequest&);
virtual void createNewWindow(const ResourceRequest&, const WindowArgs&, Frame*&);
virtual void setIconURL(const KURL&);
virtual void setTypedIconURL(const KURL&, const String& type);
virtual int getHistoryLength();
virtual void goBackOrForward(int distance);
virtual KURL historyURL(int distance);
virtual bool canRunModal();
virtual bool canRunModalNow();
virtual void runModal();
private:
FrameGdk* m_frame;
};
}
#endif
/*
* Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
* Copyright (C) 2006 Michael Emmel mike.emmel@gmail.com
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "config.h"
#include "CookieJar.h"
#include "DeprecatedString.h"
#include "KURL.h"
#include "PlatformString.h"
#include "StringHash.h"
#include <wtf/HashMap.h>
namespace WebCore {
static HashMap<String, String> cookieJar;
void setCookies(const KURL& url, const KURL& /*policyURL*/, const String& value)
{
cookieJar.set(url.url(), value);
}
String cookies(const KURL& url)
{
return cookieJar.get(url.url());
}
bool cookiesEnabled()
{
return true;
}
}
/*
* Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
* Copyright (C) 2006 Michael Emmel mike.emmel@gmail.com
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "config.h"
#include "Cursor.h"
#include "DeprecatedString.h"
#include <gdk/gdk.h>
#include <wtf/Assertions.h>
namespace WebCore {
Cursor::Cursor(const Cursor& other)
: m_impl(other.m_impl)
{
if (m_impl)
gdk_cursor_ref(m_impl);
}
Cursor::~Cursor()
{
if (m_impl)
gdk_cursor_unref(m_impl);
}
Cursor& Cursor::operator=(const Cursor& other)
{
gdk_cursor_ref(other.m_impl);
gdk_cursor_unref(m_impl);
m_impl = other.m_impl;
return *this;
}
Cursor::Cursor(GdkCursor* c)
: m_impl(c)
{
m_impl = c;
ASSERT(c);
gdk_cursor_ref(c);
}
const Cursor& crossCursor()
{
static Cursor c = gdk_cursor_new(GDK_CROSS);
return c;
}
const Cursor& handCursor()
{
static Cursor c = gdk_cursor_new(GDK_HAND2);
return c;
}
const Cursor& iBeamCursor()
{
static Cursor c = gdk_cursor_new(GDK_XTERM);
return c;
}
const Cursor& waitCursor()
{
static Cursor c = gdk_cursor_new(GDK_WATCH);
return c;
}
const Cursor& helpCursor()
{
static Cursor c = gdk_cursor_new(GDK_QUESTION_ARROW);
return c;
}
const Cursor& eastResizeCursor()
{
static Cursor c = gdk_cursor_new(GDK_RIGHT_SIDE);
return c;
}
const Cursor& northResizeCursor()
{
static Cursor c = gdk_cursor_new(GDK_TOP_SIDE);
return c;
}
const Cursor& northEastResizeCursor()
{
static Cursor c = gdk_cursor_new(GDK_TOP_RIGHT_CORNER);
return c;
}
const Cursor& northWestResizeCursor()
{
static Cursor c = gdk_cursor_new(GDK_TOP_LEFT_CORNER);
return c;
}
const Cursor& southResizeCursor()
{
static Cursor c = gdk_cursor_new(GDK_BOTTOM_SIDE);
return c;
}
const Cursor& southEastResizeCursor()
{
static Cursor c = gdk_cursor_new(GDK_BOTTOM_RIGHT_CORNER);
return c;
}
const Cursor& southWestResizeCursor()
{
static Cursor c = gdk_cursor_new(GDK_BOTTOM_LEFT_CORNER);
return c;
}
const Cursor& westResizeCursor()
{
static Cursor c = gdk_cursor_new(GDK_LEFT_SIDE);
return c;
}
const Cursor& northSouthResizeCursor()
{
static Cursor c = gdk_cursor_new(GDK_TOP_TEE);
return c;
}
const Cursor& eastWestResizeCursor()
{
static Cursor c = gdk_cursor_new(GDK_LEFT_SIDE);
return c;
}
const Cursor& northEastSouthWestResizeCursor()
{
static Cursor c = gdk_cursor_new(GDK_SIZING);
return c;
}
const Cursor& northWestSouthEastResizeCursor()
{
static Cursor c = gdk_cursor_new(GDK_SIZING);
return c;
}
const Cursor& columnResizeCursor()
{
static Cursor c = gdk_cursor_new(GDK_DOUBLE_ARROW);
return c;
}
const Cursor& rowResizeCursor()
{
static Cursor c = gdk_cursor_new(GDK_DOUBLE_ARROW);
return c;
}
}
/*
* Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
* Copyright (C) 2006 Michael Emmel mike.emmel@gmail.com
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "config.h"
#include "FontCache.h"
#include "Font.h"
#include "FontPlatformData.h"
namespace WebCore {
void FontCache::platformInit()
{
if (!FontPlatformData::init()) {
assert(0);
fprintf(stderr, "no fonts found exiting\n");
exit(-1);
}
}
const FontData* FontCache::getFontDataForCharacters(const Font& font, const UChar* characters, int length)
{
FontData* fontData = 0;
fontData = new FontData(FontPlatformData(font.fontDescription(), font.family().family()));
return fontData;
}
FontPlatformData* FontCache::getSimilarFontPlatformData(const Font& font)
{
return new FontPlatformData(font.fontDescription(), font.family().family());
}
FontPlatformData* FontCache::getLastResortFallbackFont(const Font& font)
{
// FIXME: Would be even better to somehow get the user's default font here.
// For now we'll pick the default that the user would get without changing any prefs.
static AtomicString timesStr("Times New Roman");
return getCachedFontPlatformData(font.fontDescription(), timesStr);
}
FontPlatformData* FontCache::createFontPlatformData(const FontDescription& fontDescription, const AtomicString& family)
{
return new FontPlatformData(fontDescription, family);
}
}
/*
* Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
* Copyright (C) 2006 Michael Emmel mike.emmel@gmail.com
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "config.h"
#include "FontData.h"
#include "FloatRect.h"
#include "Font.h"
#include "FontCache.h"
#include "FontDescription.h"
#include "GlyphBuffer.h"
#include <cairo.h>
#include <unicode/uchar.h>
#include <unicode/unorm.h>
#include <wtf/MathExtras.h>
namespace WebCore {
void FontData::platformInit()
{
cairo_font_extents_t font_extents;
cairo_text_extents_t text_extents;
cairo_scaled_font_extents(m_font.m_scaledFont, &font_extents);
m_ascent = static_cast<int>(font_extents.ascent);
m_descent = static_cast<int>(font_extents.descent);
m_lineSpacing = static_cast<int>(font_extents.height);
cairo_scaled_font_text_extents(m_font.m_scaledFont, "x", &text_extents);
m_xHeight = text_extents.height;
cairo_scaled_font_text_extents(m_font.m_scaledFont, " ", &text_extents);
m_spaceWidth = static_cast<int>(text_extents.x_advance);
assert(m_spaceWidth != 0);
m_lineGap = m_lineSpacing - m_ascent - m_descent;
}
void FontData::platformDestroy()
{
delete m_smallCapsFontData;
}
FontData* FontData::smallCapsFontData(const FontDescription& fontDescription) const
{
if (!m_smallCapsFontData) {
FontDescription desc = FontDescription(fontDescription);
desc.setSpecifiedSize(0.70f*fontDescription.computedSize());
const FontPlatformData* pdata = new FontPlatformData(desc, desc.family().family());
m_smallCapsFontData = new FontData(*pdata);
}
return m_smallCapsFontData;
}
bool FontData::containsCharacters(const UChar* characters, int length) const
{
for (unsigned i = 0; i < length; i++)
if (getGlyphIndex(characters[i]) == 0)
return false;
return true;
}
void FontData::determinePitch()
{
m_treatAsFixedPitch = m_font.isFixedPitch();
}
float FontData::platformWidthForGlyph(Glyph glyph) const
{
cairo_glyph_t cglyph;
cglyph.index = (int)glyph;
cairo_text_extents_t extents;
cairo_scaled_font_glyph_extents(m_font.m_scaledFont, &cglyph, 1, &extents);
float w = extents.x_advance;
if (w == 0)
w = m_spaceWidth;
return w;
}
void FontData::setFont(cairo_t* cr) const
{
m_font.setFont(cr);
}
}
/*
* Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
* Copyright (C) 2006 Michael Emmel mike.emmel@gmail.com
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "config.h"
#include "Font.h"
#include "FontData.h"
#include "GraphicsContext.h"
#include <cairo.h>
namespace WebCore {
void Font::drawGlyphs(GraphicsContext* graphicsContext, const FontData* font, const GlyphBuffer& glyphBuffer,
int from, int numGlyphs, const FloatPoint& point) const
{
cairo_t* context = graphicsContext->platformContext();
// Set the text color to use for drawing.
float red, green, blue, alpha;
Color penColor = graphicsContext->pen().color();
penColor.getRGBA(red, green, blue, alpha);
cairo_set_source_rgba(context, red, green, blue, alpha);
// Select the scaled font.
font->setFont(context);
GlyphBufferGlyph* glyphs = glyphBuffer.glyphs(from);
float offset = point.x();
for (unsigned i = 0; i < numGlyphs; i++) {
glyphs[i].x = offset;
glyphs[i].y = point.y();
offset += glyphBuffer.advanceAt(from + i);
}
cairo_show_glyphs(context, glyphs, numGlyphs);
}
}
/*
* This file is part of the internal font implementation. It should not be included by anyone other than
* FontMac.cpp, FontWin.cpp and Font.cpp.
*
* Copyright (C) 2006 Apple Computer, Inc.
* Copyright (C) 2006 Michael Emmel mike.emmel@gmail.com
* All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
*/
#ifndef FontPlatformData_H
#define FontPlatformData_H
#include "GlyphBuffer.h"
#include "FontDescription.h"
#include <cairo.h>
#include <cairo-ft.h>
#include <fontconfig/fcfreetype.h>
namespace WebCore {
class FontPlatformData {
public:
class Deleted {};
FontPlatformData(Deleted) : m_pattern((FcPattern*)-1) { }
FontPlatformData() : m_pattern(0) { }
FontPlatformData(const FontDescription&, const AtomicString& family);
~FontPlatformData();