Commit 4c9b811d authored by abarth@webkit.org's avatar abarth@webkit.org
Browse files

2009-08-07 Maxime Simon <simon.maxime@gmail.com>

        Reviewed by Eric Seidel.

        Added four Haiku-specific files for WebCore:
        PopupMenuHaiku.cpp, ScreenHaiku.cpp,
        SearchPopupMenuHaiku.cpp and SoundHaiku.cpp
        https://bugs.webkit.org/show_bug.cgi?id=28080

        * platform/haiku/PopupMenuHaiku.cpp: Added.
        (WebCore::PopupMenu::PopupMenu):
        (WebCore::PopupMenu::~PopupMenu):
        (WebCore::PopupMenu::show):
        (WebCore::PopupMenu::hide):
        (WebCore::PopupMenu::updateFromElement):
        (WebCore::PopupMenu::itemWritingDirectionIsNatural):
        * platform/haiku/ScreenHaiku.cpp: Added.
        (WebCore::screenRect):
        (WebCore::screenAvailableRect):
        (WebCore::screenDepth):
        (WebCore::screenDepthPerComponent):
        (WebCore::screenIsMonochrome):
        * platform/haiku/SearchPopupMenuHaiku.cpp: Added.
        (WebCore::SearchPopupMenu::SearchPopupMenu):
        (WebCore::SearchPopupMenu::saveRecentSearches):
        (WebCore::SearchPopupMenu::loadRecentSearches):
        (WebCore::SearchPopupMenu::enabled):
        * platform/haiku/SoundHaiku.cpp: Added.
        (WebCore::systemBeep):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@46924 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent fcf9bf19
2009-08-07 Maxime Simon <simon.maxime@gmail.com>
Reviewed by Eric Seidel.
Added four Haiku-specific files for WebCore:
PopupMenuHaiku.cpp, ScreenHaiku.cpp,
SearchPopupMenuHaiku.cpp and SoundHaiku.cpp
https://bugs.webkit.org/show_bug.cgi?id=28080
* platform/haiku/PopupMenuHaiku.cpp: Added.
(WebCore::PopupMenu::PopupMenu):
(WebCore::PopupMenu::~PopupMenu):
(WebCore::PopupMenu::show):
(WebCore::PopupMenu::hide):
(WebCore::PopupMenu::updateFromElement):
(WebCore::PopupMenu::itemWritingDirectionIsNatural):
* platform/haiku/ScreenHaiku.cpp: Added.
(WebCore::screenRect):
(WebCore::screenAvailableRect):
(WebCore::screenDepth):
(WebCore::screenDepthPerComponent):
(WebCore::screenIsMonochrome):
* platform/haiku/SearchPopupMenuHaiku.cpp: Added.
(WebCore::SearchPopupMenu::SearchPopupMenu):
(WebCore::SearchPopupMenu::saveRecentSearches):
(WebCore::SearchPopupMenu::loadRecentSearches):
(WebCore::SearchPopupMenu::enabled):
* platform/haiku/SoundHaiku.cpp: Added.
(WebCore::systemBeep):
2009-08-07 Maxime Simon <simon.maxime@gmail.com>
 
Reviewed by Eric Seidel.
......
/*
* This file is part of the popup menu implementation for <select> elements in WebCore.
*
* Copyright (C) 2007 Ryan Leavengood <leavengood@gmail.com>
*
* 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.
*
*/
#include "config.h"
#include "PopupMenu.h"
#include "FrameView.h"
#include "NotImplemented.h"
#include <Menu.h>
namespace WebCore {
PopupMenu::PopupMenu(PopupMenuClient* client)
: m_popupClient(client)
, m_menu(0)
{
}
PopupMenu::~PopupMenu()
{
delete m_menu;
m_menu = 0;
}
void PopupMenu::show(const IntRect& rect, FrameView* view, int index)
{
notImplemented();
}
void PopupMenu::hide()
{
notImplemented();
}
void PopupMenu::updateFromElement()
{
notImplemented();
}
bool PopupMenu::itemWritingDirectionIsNatural()
{
notImplemented();
return true;
}
} // namespace WebCore
/*
* Copyright (C) 2007 Ryan Leavengood <leavengood@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 "Screen.h"
#include "FloatRect.h"
#include "Frame.h"
#include "FrameView.h"
#include "IntRect.h"
#include "NotImplemented.h"
#include "Page.h"
#include "Widget.h"
#include <GraphicsDefs.h>
#include <interface/Screen.h>
namespace WebCore {
FloatRect screenRect(Widget*)
{
BScreen screen;
// FIXME: We assume this screen is valid
return FloatRect(screen.Frame());
}
FloatRect screenAvailableRect(Widget* widget)
{
// FIXME: We could use the get_deskbar_frame() function
// from InterfaceDefs.h to make this smaller
return screenRect(widget);
}
int screenDepth(Widget*)
{
BScreen screen;
// FIXME: We assume this screen is valid
color_space cs = screen.ColorSpace();
size_t pixelChunk, rowAlignment, pixelsPerChunk;
if (get_pixel_size_for(cs, &pixelChunk, &rowAlignment, &pixelsPerChunk) == B_OK)
// FIXME: Not sure if this is right
return pixelChunk * 8;
return 8;
}
int screenDepthPerComponent(Widget*)
{
notImplemented();
return 8;
}
bool screenIsMonochrome(Widget*)
{
BScreen screen;
// FIXME: We assume this screen is valid
return screen.ColorSpace() == B_MONOCHROME_1_BIT;
}
} // namespace WebCore
/*
* Copyright (C) 2007 Ryan Leavengood <leavengood@gmail.com>
*
* 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.
*/
#include "config.h"
#include "SearchPopupMenu.h"
#include "AtomicString.h"
#include "NotImplemented.h"
namespace WebCore {
SearchPopupMenu::SearchPopupMenu(PopupMenuClient* client)
: PopupMenu(client)
{
}
void SearchPopupMenu::saveRecentSearches(const AtomicString& name, const Vector<String>& searchItems)
{
notImplemented();
}
void SearchPopupMenu::loadRecentSearches(const AtomicString& name, Vector<String>& searchItems)
{
notImplemented();
}
bool SearchPopupMenu::enabled()
{
notImplemented();
return false;
}
} // namespace WebCore
/*
* Copyright (C) 2007 Ryan Leavengood <leavengood@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 "Sound.h"
#include <Beep.h>
namespace WebCore {
void systemBeep()
{
beep();
}
} // namespace WebCore
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment