#include <EvBrowserPlugin.h>
|
| NPError | initialize (NPMIMEType, uint16_t mode, int16_t argc, char *argn[], char *argv[], NPSavedData *) |
| |
| NPError | setWindow (NPWindow *) |
| |
| NPError | newStream (NPMIMEType, NPStream *, NPBool seekable, uint16_t *stype) |
| |
| NPError | destroyStream (NPStream *, NPReason) |
| |
| void | streamAsFile (NPStream *, const char *fname) |
| |
| int32_t | writeReady (NPStream *) |
| |
| int32_t | write (NPStream *, int32_t offset, int32_t len, void *buffer) |
| |
| void | print (NPPrint *) |
| |
| int16_t | handleEvent (XEvent *) |
| |
| void | urlNotify (const char *url, NPReason, void *notifyData) |
| |
| EvDocumentModel * | model () const |
| |
| unsigned | currentPage () const |
| |
| unsigned | pageCount () const |
| |
| double | zoom () const |
| |
| void | setZoom (double scale) |
| |
| void | goToPreviousPage () |
| |
| void | goToNextPage () |
| |
| void | goToPage (unsigned page) |
| |
| void | goToPage (const char *pageLabel) |
| |
| void | activateLink (EvLink *) |
| |
| bool | isContinuous () const |
| |
| void | setContinuous (bool) |
| |
| void | toggleContinuous () |
| |
| bool | isDual () const |
| |
| void | setDual (bool) |
| |
| void | toggleDual () |
| |
| void | zoomIn () |
| |
| void | zoomOut () |
| |
| EvSizingMode | sizingMode () const |
| |
| void | setSizingMode (EvSizingMode) |
| |
| void | download () const |
| |
| void | print () const |
| |
| bool | toolbarVisible () const |
| |
| void | setToolbarVisible (bool) |
| |
| bool | canDownload () const |
| |
| void | setSearchModeEnabled (bool) |
| |
| void | search (EvJobFind *) |
| |
| void | search (SearchDirection) |
| |
| void | clearSearch () |
| |
| void | restartSearch () |
| |
|
| static NPObject * | allocate (NPP, NPClass *) |
| |
| static void | deallocate (NPObject *) |
| |
| static void | invalidate (NPObject *) |
| |
| static bool | hasMethod (NPObject *, NPIdentifier name) |
| |
| static bool | invoke (NPObject *, NPIdentifier name, const NPVariant *args, uint32_t argCount, NPVariant *result) |
| |
| static bool | hasProperty (NPObject *, NPIdentifier name) |
| |
| static bool | getProperty (NPObject *, NPIdentifier name, NPVariant *) |
| |
| static bool | setProperty (NPObject *, NPIdentifier name, const NPVariant *) |
| |
Definition at line 31 of file EvBrowserPlugin.h.
| EvBrowserPlugin::EvBrowserPlugin |
( |
NPP |
instance) | |
|
|
private |
| EvBrowserPlugin::~EvBrowserPlugin |
( |
) | |
|
|
privatevirtual |
| void EvBrowserPlugin::activateLink |
( |
EvLink * |
link) | |
|
| bool EvBrowserPlugin::canDownload |
( |
) | |
const |
| void EvBrowserPlugin::clearSearch |
( |
) | |
|
| unsigned EvBrowserPlugin::currentPage |
( |
) | |
const |
| void EvBrowserPlugin::deallocate |
( |
NPObject * |
npObject) | |
|
|
staticprivate |
| const char * EvBrowserPlugin::descriptionString |
( |
) | |
|
|
static |
Definition at line 84 of file EvBrowserPlugin.cpp.
86 return "The <a href=\"http://wiki.gnome.org/Apps/Evince/\">Evince</a> " PACKAGE_VERSION
" plugin handles documents inside the browser window.";
| void EvBrowserPlugin::download |
( |
) | |
const |
Definition at line 604 of file EvBrowserPlugin.cpp.
621 const char *zoomMode;
628 zoomMode =
"fit-page";
631 zoomMode =
"fit-width";
640 size_t zoomModeLength = strlen(zoomMode);
641 char *result =
static_cast<char *
>(
NPN_MemAlloc(zoomModeLength + 1));
642 memcpy(result, zoomMode, zoomModeLength);
643 result[zoomModeLength] =
'\0';
| void EvBrowserPlugin::goToNextPage |
( |
) | |
|
| void EvBrowserPlugin::goToPage |
( |
unsigned |
page) | |
|
| void EvBrowserPlugin::goToPage |
( |
const char * |
pageLabel) | |
|
| void EvBrowserPlugin::goToPreviousPage |
( |
) | |
|
| int16_t EvBrowserPlugin::handleEvent |
( |
XEvent * |
) | |
|
Definition at line 531 of file EvBrowserPlugin.cpp.
533 for (
unsigned i = 0; i < EvBrowserPluginClass::Methods::NumMethodIdentifiers; ++i) {
535 if (i == EvBrowserPluginClass::Methods::Download)
Definition at line 595 of file EvBrowserPlugin.cpp.
597 for (
unsigned i = 0; i < EvBrowserPluginClass::Properties::NumPropertyIdentifiers; ++i) {
Definition at line 168 of file EvBrowserPlugin.cpp.
174 bool continuous =
true;
178 for (int16_t i = 0; i < argc; ++i) {
179 if (g_ascii_strcasecmp(argn[i],
"toolbar") == 0)
181 else if (g_ascii_strcasecmp(argn[i],
"currentpage") == 0)
183 else if (g_ascii_strcasecmp(argn[i],
"zoom") == 0)
185 else if (g_ascii_strcasecmp(argn[i],
"zoommode") == 0)
187 else if (g_ascii_strcasecmp(argn[i],
"continuous") == 0)
189 else if (g_ascii_strcasecmp(argn[i],
"dual") == 0)
| void EvBrowserPlugin::invalidate |
( |
NPObject * |
) | |
|
|
staticprivate |
| bool EvBrowserPlugin::isContinuous |
( |
) | |
const |
| bool EvBrowserPlugin::isDual |
( |
) | |
const |
| const char * EvBrowserPlugin::nameString |
( |
) | |
|
|
static |
| unsigned EvBrowserPlugin::pageCount |
( |
) | |
const |
| void EvBrowserPlugin::print |
( |
NPPrint * |
) | |
|
| void EvBrowserPlugin::print |
( |
) | |
const |
Definition at line 427 of file EvBrowserPlugin.cpp.
440 if (
char *dot = g_strrstr(outputBasename.get(),
"."))
443 unique_gptr<char> unescapedBasename(g_uri_unescape_string(outputBasename.get(),
nullptr));
445 GtkPrintSettings *printSettings = gtk_print_settings_new();
446 gtk_print_settings_set(printSettings, GTK_PRINT_SETTINGS_OUTPUT_BASENAME, unescapedBasename.get());
453 g_object_unref(printSettings);
455 g_signal_connect(printOperation,
"done", G_CALLBACK(g_object_unref),
nullptr);
457 GtkWidget *toplevel = gtk_widget_get_toplevel(GTK_WIDGET(
m_view));
| void EvBrowserPlugin::restartSearch |
( |
) | |
|
| void EvBrowserPlugin::search |
( |
EvJobFind * |
job) | |
|
| void EvBrowserPlugin::setContinuous |
( |
bool |
continuous) | |
|
| void EvBrowserPlugin::setDual |
( |
bool |
dual) | |
|
Definition at line 665 of file EvBrowserPlugin.cpp.
680 if (g_strcmp0(zoomMode.get(),
"none") == 0)
682 else if (g_strcmp0(zoomMode.get(),
"fit-page") == 0)
684 else if (g_strcmp0(zoomMode.get(),
"fit-width") == 0)
686 else if (g_strcmp0(zoomMode.get(),
"auto") == 0)
| void EvBrowserPlugin::setSearchModeEnabled |
( |
bool |
enabled) | |
|
| void EvBrowserPlugin::setSizingMode |
( |
EvSizingMode |
sizingMode) | |
|
| void EvBrowserPlugin::setToolbarVisible |
( |
bool |
isVisible) | |
|
Definition at line 214 of file EvBrowserPlugin.cpp.
217 m_window = gtk_plug_new(reinterpret_cast<Window>(window->
window));
220 GtkWidget *vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
223 GtkWidget *scrolledWindow = gtk_scrolled_window_new(
nullptr,
nullptr);
224 gtk_container_add(GTK_CONTAINER(scrolledWindow), GTK_WIDGET(
m_view));
225 gtk_widget_show(GTK_WIDGET(
m_view));
227 gtk_box_pack_start(GTK_BOX(vbox), scrolledWindow,
TRUE,
TRUE, 0);
228 gtk_widget_show(scrolledWindow);
230 gtk_container_add(GTK_CONTAINER(
m_window), vbox);
231 gtk_widget_show(vbox);
| void EvBrowserPlugin::setZoom |
( |
double |
scale) | |
|
| void EvBrowserPlugin::streamAsFile |
( |
NPStream * |
, |
|
|
const char * |
fname |
|
) |
| |
Definition at line 252 of file EvBrowserPlugin.cpp.
254 GFile *file = g_file_new_for_commandline_arg(fname);
256 g_object_unref(file);
260 GError *error =
nullptr;
263 g_printerr(
"Error loading document %s: %s\n", uri.get(), error->message);
267 g_object_unref(document);
| void EvBrowserPlugin::toggleContinuous |
( |
) | |
|
| void EvBrowserPlugin::toggleDual |
( |
) | |
|
| bool EvBrowserPlugin::toolbarVisible |
( |
) | |
const |
| void EvBrowserPlugin::urlNotify |
( |
const char * |
url, |
|
|
NPReason |
, |
|
|
void * |
notifyData |
|
) |
| |
| int32_t EvBrowserPlugin::write |
( |
NPStream * |
, |
|
|
int32_t |
offset, |
|
|
int32_t |
len, |
|
|
void * |
buffer |
|
) |
| |
| int32_t EvBrowserPlugin::writeReady |
( |
NPStream * |
) | |
|
| double EvBrowserPlugin::zoom |
( |
) | |
const |
| void EvBrowserPlugin::zoomIn |
( |
) | |
|
| void EvBrowserPlugin::zoomOut |
( |
) | |
|
| NPP EvBrowserPlugin::m_NPP |
|
private |
| GtkWidget* EvBrowserPlugin::m_toolbar |
|
private |
| EvView* EvBrowserPlugin::m_view |
|
private |
| GtkWidget* EvBrowserPlugin::m_window |
|
private |
The documentation for this class was generated from the following files: