| 1 | /* |
|---|
| 2 | * Copyright (C) 2007 Luca Bruno <lethalman88@gmail.com> |
|---|
| 3 | * |
|---|
| 4 | * This library is free software; you can redistribute it and/or |
|---|
| 5 | * modify it under the terms of the GNU Lesser General Public |
|---|
| 6 | * License as published by the Free Software Foundation; either |
|---|
| 7 | * version 2 of the License, or (at your option) any later version. |
|---|
| 8 | * |
|---|
| 9 | * This library is distributed in the hope that it will be useful, |
|---|
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|---|
| 12 | * Lesser General Public License for more details. |
|---|
| 13 | * |
|---|
| 14 | * You should have received a copy of the GNU Lesser General Public |
|---|
| 15 | * License along with this library; if not, write to the Free Software |
|---|
| 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
|---|
| 17 | */ |
|---|
| 18 | |
|---|
| 19 | #include "config.h" |
|---|
| 20 | #include "PasteboardHelperGtk.h" |
|---|
| 21 | |
|---|
| 22 | #include "Frame.h" |
|---|
| 23 | #include "webkitwebframe.h" |
|---|
| 24 | #include "webkitwebview.h" |
|---|
| 25 | #include "webkitprivate.h" |
|---|
| 26 | |
|---|
| 27 | #include <gtk/gtk.h> |
|---|
| 28 | |
|---|
| 29 | using namespace WebCore; |
|---|
| 30 | |
|---|
| 31 | namespace WebKit |
|---|
| 32 | { |
|---|
| 33 | |
|---|
| 34 | GtkClipboard* PasteboardHelperGtk::getClipboard(Frame* frame) const { |
|---|
| 35 | WebKitWebView* webView = webkit_web_frame_get_web_view(kit(frame)); |
|---|
| 36 | return gtk_widget_get_clipboard(GTK_WIDGET (webView), |
|---|
| 37 | GDK_SELECTION_CLIPBOARD); |
|---|
| 38 | } |
|---|
| 39 | |
|---|
| 40 | GtkTargetList* PasteboardHelperGtk::getCopyTargetList(Frame* frame) const { |
|---|
| 41 | WebKitWebView* webView = webkit_web_frame_get_web_view(kit(frame)); |
|---|
| 42 | return webkit_web_view_get_copy_target_list(webView); |
|---|
| 43 | } |
|---|
| 44 | |
|---|
| 45 | GtkTargetList* PasteboardHelperGtk::getPasteTargetList(Frame* frame) const { |
|---|
| 46 | WebKitWebView* webView = webkit_web_frame_get_web_view(kit(frame)); |
|---|
| 47 | return webkit_web_view_get_paste_target_list(webView); |
|---|
| 48 | } |
|---|
| 49 | |
|---|
| 50 | } |
|---|