2 * Copyright © 2005 Christian Persch
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2, or (at your option)
9 * This program 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
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23 #include "ephy-embed-find.h"
26 ephy_embed_find_set_embed (EphyEmbedFind *find,
29 EphyEmbedFindIface *iface = EPHY_EMBED_FIND_GET_IFACE (find);
30 iface->set_embed (find, embed);
34 * ephy_embed_find_set_properties:
35 * @find: an #EphyEmbedFind
36 * @case_sensitive: %TRUE for "case sensitive" to be set
38 * Sets the properties of @find
41 ephy_embed_find_set_properties (EphyEmbedFind *find,
42 const char *search_string,
43 gboolean case_sensitive)
45 EphyEmbedFindIface *iface = EPHY_EMBED_FIND_GET_IFACE (find);
46 iface->set_properties (find, search_string, case_sensitive);
50 * ephy_embed_find_find:
51 * @embed: an #EphyEmbedFind
52 * @search_string: the text to search for
53 * @links_only: whether to only search the text in links
55 * Return value: whether a match was found
58 ephy_embed_find_find (EphyEmbedFind *find,
59 const char *search_string,
62 EphyEmbedFindIface *iface = EPHY_EMBED_FIND_GET_IFACE (find);
63 return iface->find (find, search_string, links_only);
67 * ephy_embed_find_find_again:
68 * @embed: an #EphyEmbedFind
69 * @forward %TRUE to search forwards in the document
70 * @links_only: whether to only search the text in links
72 * Return value: whether a match was found
75 ephy_embed_find_find_again (EphyEmbedFind *find,
79 EphyEmbedFindIface *iface = EPHY_EMBED_FIND_GET_IFACE (find);
80 return iface->find_again (find, forward, links_only);
84 ephy_embed_find_set_selection (EphyEmbedFind *find,
87 EphyEmbedFindIface *iface = EPHY_EMBED_FIND_GET_IFACE (find);
88 iface->set_selection (find, attention);
92 * ephy_embed_find_activate_link:
93 * @embed: an #EphyEmbedFind
96 * Activates the currently focused link, if there is any.
98 * Return value: %TRUE if a link was activated
101 ephy_embed_find_activate_link (EphyEmbedFind *find,
102 GdkModifierType mask)
104 EphyEmbedFindIface *iface = EPHY_EMBED_FIND_GET_IFACE (find);
105 return iface->activate_link (find, mask);
109 ephy_embed_find_get_type (void)
111 static GType type = 0;
113 if (G_UNLIKELY (type == 0))
115 const GTypeInfo our_info =
117 sizeof (EphyEmbedFindIface),
122 type = g_type_register_static (G_TYPE_INTERFACE,
124 &our_info, (GTypeFlags) 0);