|
Packit |
79f644 |
/*
|
|
Packit |
79f644 |
* Copyright (C) 2010 Collabora Ltd.
|
|
Packit |
79f644 |
* Copyright (C) 2007-2010 Nokia Corporation.
|
|
Packit |
79f644 |
*
|
|
Packit |
79f644 |
* This library is free software; you can redistribute it and/or
|
|
Packit |
79f644 |
* modify it under the terms of the GNU Lesser General Public
|
|
Packit |
79f644 |
* License as published by the Free Software Foundation; either
|
|
Packit |
79f644 |
* version 2.1 of the License, or (at your option) any later version.
|
|
Packit |
79f644 |
*
|
|
Packit |
79f644 |
* This library is distributed in the hope that it will be useful,
|
|
Packit |
79f644 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
79f644 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit |
79f644 |
* Lesser General Public License for more details.
|
|
Packit |
79f644 |
*
|
|
Packit |
79f644 |
* You should have received a copy of the GNU Lesser General Public
|
|
Packit |
79f644 |
* License along with this library; if not, write to the Free Software
|
|
Packit |
79f644 |
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
Packit |
79f644 |
*
|
|
Packit |
79f644 |
* Authors: Felix Kaser <felix.kaser@collabora.co.uk>
|
|
Packit |
79f644 |
* Xavier Claessens <xavier.claessens@collabora.co.uk>
|
|
Packit |
79f644 |
* Claudio Saavedra <csaavedra@igalia.com>
|
|
Packit |
79f644 |
*/
|
|
Packit |
79f644 |
|
|
Packit |
79f644 |
#ifndef __TPAW_LIVE_SEARCH_H__
|
|
Packit |
79f644 |
#define __TPAW_LIVE_SEARCH_H__
|
|
Packit |
79f644 |
|
|
Packit |
79f644 |
#include <gtk/gtk.h>
|
|
Packit |
79f644 |
|
|
Packit |
79f644 |
G_BEGIN_DECLS
|
|
Packit |
79f644 |
|
|
Packit |
79f644 |
#define TPAW_TYPE_LIVE_SEARCH (tpaw_live_search_get_type ())
|
|
Packit |
79f644 |
#define TPAW_LIVE_SEARCH(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TPAW_TYPE_LIVE_SEARCH, TpawLiveSearch))
|
|
Packit |
79f644 |
#define TPAW_LIVE_SEARCH_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), TPAW_TYPE_LIVE_SEARCH, TpawLiveSearchClass))
|
|
Packit |
79f644 |
#define TPAW_IS_LIVE_SEARCH(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), TPAW_TYPE_LIVE_SEARCH))
|
|
Packit |
79f644 |
#define TPAW_IS_LIVE_SEARCH_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), TPAW_TYPE_LIVE_SEARCH))
|
|
Packit |
79f644 |
#define TPAW_LIVE_SEARCH_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), TPAW_TYPE_LIVE_SEARCH, TpawLiveSearchClass))
|
|
Packit |
79f644 |
|
|
Packit |
79f644 |
typedef struct _TpawLiveSearch TpawLiveSearch;
|
|
Packit |
79f644 |
typedef struct _TpawLiveSearchPriv TpawLiveSearchPriv;
|
|
Packit |
79f644 |
typedef struct _TpawLiveSearchClass TpawLiveSearchClass;
|
|
Packit |
79f644 |
|
|
Packit |
79f644 |
struct _TpawLiveSearch {
|
|
Packit |
79f644 |
GtkBox parent;
|
|
Packit |
79f644 |
|
|
Packit |
79f644 |
/*<private>*/
|
|
Packit |
79f644 |
TpawLiveSearchPriv *priv;
|
|
Packit |
79f644 |
};
|
|
Packit |
79f644 |
|
|
Packit |
79f644 |
struct _TpawLiveSearchClass {
|
|
Packit |
79f644 |
GtkBoxClass parent_class;
|
|
Packit |
79f644 |
};
|
|
Packit |
79f644 |
|
|
Packit |
79f644 |
GType tpaw_live_search_get_type (void) G_GNUC_CONST;
|
|
Packit |
79f644 |
GtkWidget *tpaw_live_search_new (GtkWidget *hook);
|
|
Packit |
79f644 |
|
|
Packit |
79f644 |
GtkWidget *tpaw_live_search_get_hook_widget (TpawLiveSearch *self);
|
|
Packit |
79f644 |
void tpaw_live_search_set_hook_widget (TpawLiveSearch *self,
|
|
Packit |
79f644 |
GtkWidget *hook);
|
|
Packit |
79f644 |
|
|
Packit |
79f644 |
const gchar *tpaw_live_search_get_text (TpawLiveSearch *self);
|
|
Packit |
79f644 |
void tpaw_live_search_set_text (TpawLiveSearch *self,
|
|
Packit |
79f644 |
const gchar *text);
|
|
Packit |
79f644 |
|
|
Packit |
79f644 |
gboolean tpaw_live_search_match (TpawLiveSearch *self,
|
|
Packit |
79f644 |
const gchar *string);
|
|
Packit |
79f644 |
|
|
Packit |
79f644 |
GPtrArray * tpaw_live_search_strip_utf8_string (const gchar *string);
|
|
Packit |
79f644 |
|
|
Packit |
79f644 |
gboolean tpaw_live_search_match_words (const gchar *string,
|
|
Packit |
79f644 |
GPtrArray *words);
|
|
Packit |
79f644 |
|
|
Packit |
79f644 |
GPtrArray * tpaw_live_search_get_words (TpawLiveSearch *self);
|
|
Packit |
79f644 |
|
|
Packit |
79f644 |
/* Made public for unit tests */
|
|
Packit |
79f644 |
gboolean tpaw_live_search_match_string (const gchar *string,
|
|
Packit |
79f644 |
const gchar *prefix);
|
|
Packit |
79f644 |
|
|
Packit |
79f644 |
G_END_DECLS
|
|
Packit |
79f644 |
|
|
Packit |
79f644 |
#endif /* __TPAW_LIVE_SEARCH_H__ */
|