NetSurf
|
Free text search (implementation) More...
#include "amiga/os3support.h"
#include "utils/config.h"
#include <ctype.h>
#include <string.h>
#include <stdlib.h>
#include <proto/intuition.h>
#include <proto/exec.h>
#include <proto/window.h>
#include <proto/layout.h>
#include <proto/string.h>
#include <proto/button.h>
#include <proto/label.h>
#include <proto/checkbox.h>
#include <classes/window.h>
#include <gadgets/layout.h>
#include <gadgets/string.h>
#include <gadgets/button.h>
#include <gadgets/checkbox.h>
#include <images/label.h>
#include <reaction/reaction_macros.h>
#include "utils/log.h"
#include "utils/messages.h"
#include "utils/utils.h"
#include "content/content.h"
#include "netsurf/browser_window.h"
#include "desktop/search.h"
#include "netsurf/mouse.h"
#include "netsurf/window.h"
#include "netsurf/search.h"
#include "amiga/libs.h"
#include "amiga/gui.h"
#include "amiga/memory.h"
#include "amiga/search.h"
#include "amiga/object.h"
#include "amiga/theme.h"
#include "amiga/utf8.h"
Go to the source code of this file.
Data Structures | |
struct | find_window |
Macros | |
#define | NOF_ELEMENTS(array) (sizeof(array)/sizeof(*(array))) |
Enumerations | |
enum | { OID_S_MAIN = 0 , GID_S_MAIN , GID_S_NEXT , GID_S_PREV , GID_S_SEARCHSTRING , GID_S_SHOWALL , GID_S_CASE , GID_S_LAST } |
enum | { SSTR_TITLE = 0 , SSTR_CASE , SSTR_SHOWALL , SSTR_PREV , SSTR_NEXT , SSTR_LAST } |
Functions | |
search_flags_t | ami_search_flags (void) |
retrieve state of 'case sensitive', 'show all' checks in gui More... | |
char * | ami_search_string (void) |
retrieve string being searched for from gui More... | |
static void | ami_search_set_status (bool found, void *p) |
Change the displayed search status. More... | |
static void | ami_search_set_hourglass (bool active, void *p) |
display hourglass while searching More... | |
static void | ami_search_add_recent (const char *string, void *p) |
add search string to recent searches list front is at liberty how to implement the bare notification should normally store a strdup() of the string; core gives no guarantee of the integrity of the const char * More... | |
static void | ami_search_set_forward_state (bool active, void *p) |
activate search forwards button in gui More... | |
static void | ami_search_set_back_state (bool active, void *p) |
activate search forwards button in gui More... | |
static BOOL | ami_search_event (void *w) |
struct gui_window * | ami_search_get_gwin (struct find_window *fw) |
Obtain gui window associated with find window. More... | |
void | ami_search_open (struct gui_window *gwin) |
Change the displayed search status. More... | |
void | ami_search_close (void) |
Close search. More... | |
Variables | |
static bool | search_insert |
static struct find_window * | fwin = NULL |
static struct gui_search_table | search_table |
static const struct ami_win_event_table | ami_search_table |
struct gui_search_table * | amiga_search_table = &search_table |
Free text search (implementation)
Definition in file search.c.
#define NOF_ELEMENTS | ( | array | ) | (sizeof(array)/sizeof(*(array))) |
anonymous enum |
anonymous enum |
|
static |
add search string to recent searches list front is at liberty how to implement the bare notification should normally store a strdup() of the string; core gives no guarantee of the integrity of the const char *
string | search pattern |
p | the pointer sent to search_verify_new() / search_create_context() |
void ami_search_close | ( | void | ) |
Close search.
Definition at line 229 of file search.c.
References ami_gui_get_browser_window(), ami_gui_set_find_window(), ami_gui_win_list_remove(), ami_utf8_free(), browser_window_search_clear(), fwin, find_window::gwin, find_window::message, find_window::objects, OID_S_MAIN, and SSTR_LAST.
Referenced by ami_search_event(), and gui_window_destroy().
|
static |
Definition at line 244 of file search.c.
References ami_gui_get_browser_window(), ami_gui_get_window(), ami_search_close(), ami_search_flags(), ami_search_string(), browser_window_search(), browser_window_search_clear(), fwin, GID_S_NEXT, GID_S_PREV, GID_S_SEARCHSTRING, find_window::gwin, find_window::objects, OID_S_MAIN, RefreshSetGadgetAttrs(), result, SEARCH_FLAG_FORWARDS, search_insert, and find_window::win.
search_flags_t ami_search_flags | ( | void | ) |
retrieve state of 'case sensitive', 'show all' checks in gui
Definition at line 386 of file search.c.
References fwin, GID_S_CASE, GID_S_SHOWALL, find_window::objects, SEARCH_FLAG_CASE_SENSITIVE, and SEARCH_FLAG_SHOWALL.
Referenced by ami_search_event().
struct gui_window * ami_search_get_gwin | ( | struct find_window * | fw | ) |
Obtain gui window associated with find window.
Definition at line 127 of file search.c.
References find_window::gwin.
Referenced by gui_window_destroy().
void ami_search_open | ( | struct gui_window * | gwin | ) |
Change the displayed search status.
gwin | gui window to open search for. |
Definition at line 140 of file search.c.
References ami_gui_get_browser_window(), ami_gui_get_screen(), ami_gui_get_screen_title(), ami_gui_get_shared_msgport(), ami_gui_set_find_window(), ami_gui_win_list_add(), ami_search_table, ami_utf8_easy(), AMINS_FINDWINDOW, browser_window_search_clear(), ButtonObj, CheckBoxObj, fwin, GID_S_CASE, GID_S_MAIN, GID_S_NEXT, GID_S_PREV, GID_S_SEARCHSTRING, GID_S_SHOWALL, find_window::gwin, LayoutHObj, LayoutVObj, find_window::message, messages_get(), find_window::objects, OID_S_MAIN, search_insert, SSTR_CASE, SSTR_NEXT, SSTR_PREV, SSTR_SHOWALL, SSTR_TITLE, StringObj, find_window::win, and WindowObj.
Referenced by HOOKF().
|
static |
activate search forwards button in gui
active | activate/inactivate |
p | the pointer sent to search_verify_new() / search_create_context() |
Definition at line 375 of file search.c.
References fwin, GID_S_PREV, find_window::objects, RefreshSetGadgetAttrs(), and find_window::win.
|
static |
activate search forwards button in gui
active | activate/inactivate |
p | the pointer sent to search_verify_new() / search_create_context() |
Definition at line 361 of file search.c.
References fwin, GID_S_NEXT, find_window::objects, RefreshSetGadgetAttrs(), and find_window::win.
|
static |
display hourglass while searching
active | start/stop indicator |
p | the pointer sent to search_verify_new() / search_create_context() |
Definition at line 322 of file search.c.
References ami_update_pointer(), fwin, GUI_POINTER_DEFAULT, GUI_POINTER_WAIT, and find_window::win.
|
static |
char * ami_search_string | ( | void | ) |
retrieve string being searched for from gui
Definition at line 334 of file search.c.
References fwin, GID_S_SEARCHSTRING, find_window::objects, and text().
Referenced by ami_search_event().
|
static |
struct gui_search_table* amiga_search_table = &search_table |
|
static |
Definition at line 101 of file search.c.
Referenced by ami_search_close(), ami_search_event(), ami_search_flags(), ami_search_open(), ami_search_set_back_state(), ami_search_set_forward_state(), ami_search_set_hourglass(), and ami_search_string().
|
static |
Definition at line 70 of file search.c.
Referenced by ami_search_event(), and ami_search_open().
|
static |