2014-10-01 02:22:38 +09:00
|
|
|
/* Copyright 2014 Mozilla Foundation
|
2014-09-21 02:21:49 +09:00
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
2017-04-28 19:02:42 +09:00
|
|
|
/* eslint-disable no-unused-vars */
|
2014-09-21 02:21:49 +09:00
|
|
|
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @interface
|
|
|
|
*/
|
2017-05-08 05:01:49 +09:00
|
|
|
class IPDFLinkService {
|
2014-09-21 02:21:49 +09:00
|
|
|
/**
|
|
|
|
* @returns {number}
|
|
|
|
*/
|
2017-05-08 05:01:49 +09:00
|
|
|
get page() {}
|
|
|
|
|
2014-09-21 02:21:49 +09:00
|
|
|
/**
|
|
|
|
* @param {number} value
|
|
|
|
*/
|
2017-05-08 05:01:49 +09:00
|
|
|
set page(value) {}
|
|
|
|
|
2014-09-21 02:21:49 +09:00
|
|
|
/**
|
|
|
|
* @param dest - The PDF destination object.
|
|
|
|
*/
|
2017-05-08 05:01:49 +09:00
|
|
|
navigateTo(dest) {}
|
|
|
|
|
2014-09-21 02:21:49 +09:00
|
|
|
/**
|
|
|
|
* @param dest - The PDF destination object.
|
|
|
|
* @returns {string} The hyperlink to the PDF object.
|
|
|
|
*/
|
2017-05-08 05:01:49 +09:00
|
|
|
getDestinationHash(dest) {}
|
|
|
|
|
2014-09-21 02:21:49 +09:00
|
|
|
/**
|
|
|
|
* @param hash - The PDF parameters/hash.
|
|
|
|
* @returns {string} The hyperlink to the PDF object.
|
|
|
|
*/
|
2017-05-08 05:01:49 +09:00
|
|
|
getAnchorUrl(hash) {}
|
|
|
|
|
2014-09-22 20:41:17 +09:00
|
|
|
/**
|
|
|
|
* @param {string} hash
|
|
|
|
*/
|
2017-05-08 05:01:49 +09:00
|
|
|
setHash(hash) {}
|
|
|
|
|
2014-10-01 02:22:38 +09:00
|
|
|
/**
|
|
|
|
* @param {string} action
|
|
|
|
*/
|
2017-05-08 05:01:49 +09:00
|
|
|
executeNamedAction(action) {}
|
2015-04-28 00:25:32 +09:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @param {number} pageNum - page number.
|
|
|
|
* @param {Object} pageRef - reference to the page.
|
|
|
|
*/
|
2017-05-08 05:01:49 +09:00
|
|
|
cachePageRef(pageNum, pageRef) {}
|
|
|
|
}
|
2014-09-21 02:21:49 +09:00
|
|
|
|
2015-04-27 23:04:11 +09:00
|
|
|
/**
|
|
|
|
* @interface
|
|
|
|
*/
|
2017-05-08 05:01:49 +09:00
|
|
|
class IPDFHistory {
|
|
|
|
forward() {}
|
|
|
|
back() {}
|
|
|
|
push(params) {}
|
|
|
|
updateNextHashParam(hash) {}
|
|
|
|
}
|
2015-04-27 23:04:11 +09:00
|
|
|
|
2014-09-21 02:21:49 +09:00
|
|
|
/**
|
|
|
|
* @interface
|
|
|
|
*/
|
2017-05-08 05:01:49 +09:00
|
|
|
class IRenderableView {
|
2014-09-21 02:21:49 +09:00
|
|
|
/**
|
|
|
|
* @returns {string} - Unique ID for rendering queue.
|
|
|
|
*/
|
2017-05-08 05:01:49 +09:00
|
|
|
get renderingId() {}
|
|
|
|
|
2014-09-21 02:21:49 +09:00
|
|
|
/**
|
|
|
|
* @returns {RenderingStates}
|
|
|
|
*/
|
2017-05-08 05:01:49 +09:00
|
|
|
get renderingState() {}
|
|
|
|
|
2014-09-21 02:21:49 +09:00
|
|
|
/**
|
2014-12-18 05:47:14 +09:00
|
|
|
* @returns {Promise} Resolved on draw completion.
|
2014-09-21 02:21:49 +09:00
|
|
|
*/
|
2017-05-08 05:01:49 +09:00
|
|
|
draw() {}
|
|
|
|
|
|
|
|
resume() {}
|
|
|
|
}
|
2014-09-21 02:21:49 +09:00
|
|
|
|
2014-09-28 23:35:33 +09:00
|
|
|
/**
|
|
|
|
* @interface
|
|
|
|
*/
|
2017-05-08 05:01:49 +09:00
|
|
|
class IPDFTextLayerFactory {
|
2014-09-28 23:35:33 +09:00
|
|
|
/**
|
|
|
|
* @param {HTMLDivElement} textLayerDiv
|
|
|
|
* @param {number} pageIndex
|
|
|
|
* @param {PageViewport} viewport
|
2016-09-02 01:07:12 +09:00
|
|
|
* @param {boolean} enhanceTextSelection
|
2014-09-28 23:35:33 +09:00
|
|
|
* @returns {TextLayerBuilder}
|
|
|
|
*/
|
2017-04-28 19:02:42 +09:00
|
|
|
createTextLayerBuilder(textLayerDiv, pageIndex, viewport,
|
|
|
|
enhanceTextSelection = false) {}
|
2017-05-08 05:01:49 +09:00
|
|
|
}
|
2014-09-30 01:05:28 +09:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @interface
|
|
|
|
*/
|
2017-04-28 19:02:42 +09:00
|
|
|
class IPDFAnnotationLayerFactory {
|
2014-09-30 01:05:28 +09:00
|
|
|
/**
|
|
|
|
* @param {HTMLDivElement} pageDiv
|
|
|
|
* @param {PDFPage} pdfPage
|
2016-09-18 02:44:25 +09:00
|
|
|
* @param {boolean} renderInteractiveForms
|
2015-12-17 20:54:53 +09:00
|
|
|
* @returns {AnnotationLayerBuilder}
|
2014-09-30 01:05:28 +09:00
|
|
|
*/
|
2017-04-24 03:52:58 +09:00
|
|
|
createAnnotationLayerBuilder(pageDiv, pdfPage,
|
|
|
|
renderInteractiveForms = false) {}
|
|
|
|
}
|