2 #include <glib/gprintf.h>
4 #include "eail_clipboard.h"
7 * Copyright (c) 2013 Samsung Electronics Co., Ltd.
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; either
12 * version 2 of the License, or (at your option) any later version.
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
19 * You should have received a copy of the GNU Lesser General Public License
20 * along with this library; see the file COPYING.LIB. If not, write to
21 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
22 * Boston, MA 02110-1301, USA.
26 * @file eail_clipboard.c
28 * @brief EailClipboard implementation
30 * Widget that is being used to store clipboard data for ATK widgets
34 * @brief Holds copied/cut text
36 static char *clipboard;
39 * @brief Gets clipboard text
40 * @returns clipboard text
42 const char *eail_clipboard_get_text(void)
48 * @brief Sets clipboard text
49 * @param text new clipboard text
51 void eail_clipboard_set_text(const char *text)
53 if (clipboard) g_free(clipboard);
54 clipboard = g_strdup(text);
58 * @brief Frees memory allocated by clipboard
60 void eail_clipboard_free(void)
62 if (clipboard) g_free(clipboard);