Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/browser-plugin/plugin.h
diff options
context:
space:
mode:
authorTommi Komulainen <tko@litl.com>2009-08-25 17:15:03 (GMT)
committer Marco Pesenti Gritti <marcopg@litl.com>2010-07-27 22:04:23 (GMT)
commit5ff761c012fca4cfc925de1511afca90c08d5d74 (patch)
tree5de65c9e652cf39c304d6deb96f6bb74d0752331 /browser-plugin/plugin.h
parent84cc52bd4fd197ec4aad845d9b09bcd5b74453d5 (diff)
browser-plugin: implement search
Changed the API to be better match for find as you type. Using property access workaround. Example: plugin.findTerms = "hello"; begin searching and highlights all matches in the document plugin.findNext = 42; (workaround) jump to next match plugin.findPrevious = 42; (workaround) jump to previous match
Diffstat (limited to 'browser-plugin/plugin.h')
-rw-r--r--browser-plugin/plugin.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/browser-plugin/plugin.h b/browser-plugin/plugin.h
index 7da0aa3..96089ba 100644
--- a/browser-plugin/plugin.h
+++ b/browser-plugin/plugin.h
@@ -37,8 +37,9 @@ class Plugin {
void ZoomOut ();
double GetZoom () const;
void SetZoom (double);
- void FindNext (const char *text);
- void FindPrevious (const char *text);
+ void Find (const char *text);
+ void FindNext ();
+ void FindPrevious ();
void CopyClipboard ();
void ShowLoadingError ();
NPObject *GetScriptableNPObject ();
@@ -46,6 +47,7 @@ class Plugin {
private:
void UpdateSizingMode ();
void ClearLoadJob ();
+ void ClearFindJob ();
void CallBrowser (const char *function_name);
@@ -60,13 +62,18 @@ class Plugin {
gpointer data);
static void LoadJobFinishedCallback (EvJob *job,
gpointer data);
+ static void FindJobUpdatedCallback (EvJobFind *job,
+ int page,
+ gpointer data);
NPP mInstance;
NPObject *mScriptableObject;
GdkNativeWindow mWindow;
GtkWidget *mScrolledWindow;
GtkWidget *mView;
+ EvDocument *mDocument;
EvJob *mLoadJob;
+ EvJob *mFindJob;
public:
char *mTitle;