interfaces.js 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. /**
  2. * @licstart The following is the entire license notice for the
  3. * JavaScript code in this page
  4. *
  5. * Copyright 2022 Mozilla Foundation
  6. *
  7. * Licensed under the Apache License, Version 2.0 (the "License");
  8. * you may not use this file except in compliance with the License.
  9. * You may obtain a copy of the License at
  10. *
  11. * http://www.apache.org/licenses/LICENSE-2.0
  12. *
  13. * Unless required by applicable law or agreed to in writing, software
  14. * distributed under the License is distributed on an "AS IS" BASIS,
  15. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  16. * See the License for the specific language governing permissions and
  17. * limitations under the License.
  18. *
  19. * @licend The above is the entire license notice for the
  20. * JavaScript code in this page
  21. */
  22. "use strict";
  23. Object.defineProperty(exports, "__esModule", {
  24. value: true
  25. });
  26. exports.IRenderableView = exports.IPDFXfaLayerFactory = exports.IPDFTextLayerFactory = exports.IPDFStructTreeLayerFactory = exports.IPDFLinkService = exports.IPDFAnnotationLayerFactory = exports.IPDFAnnotationEditorLayerFactory = exports.IL10n = exports.IDownloadManager = void 0;
  27. class IPDFLinkService {
  28. get pagesCount() {}
  29. get page() {}
  30. set page(value) {}
  31. get rotation() {}
  32. set rotation(value) {}
  33. get externalLinkEnabled() {}
  34. set externalLinkEnabled(value) {}
  35. async goToDestination(dest) {}
  36. goToPage(val) {}
  37. addLinkAttributes(link, url, newWindow = false) {}
  38. getDestinationHash(dest) {}
  39. getAnchorUrl(hash) {}
  40. setHash(hash) {}
  41. executeNamedAction(action) {}
  42. cachePageRef(pageNum, pageRef) {}
  43. isPageVisible(pageNumber) {}
  44. isPageCached(pageNumber) {}
  45. }
  46. exports.IPDFLinkService = IPDFLinkService;
  47. class IRenderableView {
  48. constructor() {
  49. this.resume = null;
  50. }
  51. get renderingId() {}
  52. get renderingState() {}
  53. draw() {}
  54. }
  55. exports.IRenderableView = IRenderableView;
  56. class IPDFTextLayerFactory {
  57. createTextLayerBuilder({
  58. textLayerDiv,
  59. pageIndex,
  60. viewport,
  61. enhanceTextSelection = false,
  62. eventBus,
  63. highlighter
  64. }) {}
  65. }
  66. exports.IPDFTextLayerFactory = IPDFTextLayerFactory;
  67. class IPDFAnnotationLayerFactory {
  68. createAnnotationLayerBuilder({
  69. pageDiv,
  70. pdfPage,
  71. annotationStorage = null,
  72. imageResourcesPath = "",
  73. renderForms = true,
  74. l10n = undefined,
  75. enableScripting = false,
  76. hasJSActionsPromise = null,
  77. mouseState = null,
  78. fieldObjectsPromise = null,
  79. annotationCanvasMap = null
  80. }) {}
  81. }
  82. exports.IPDFAnnotationLayerFactory = IPDFAnnotationLayerFactory;
  83. class IPDFAnnotationEditorLayerFactory {
  84. createAnnotationEditorLayerBuilder({
  85. uiManager = null,
  86. pageDiv,
  87. pdfPage,
  88. l10n,
  89. annotationStorage = null
  90. }) {}
  91. }
  92. exports.IPDFAnnotationEditorLayerFactory = IPDFAnnotationEditorLayerFactory;
  93. class IPDFXfaLayerFactory {
  94. createXfaLayerBuilder({
  95. pageDiv,
  96. pdfPage,
  97. annotationStorage = null
  98. }) {}
  99. }
  100. exports.IPDFXfaLayerFactory = IPDFXfaLayerFactory;
  101. class IPDFStructTreeLayerFactory {
  102. createStructTreeLayerBuilder({
  103. pdfPage
  104. }) {}
  105. }
  106. exports.IPDFStructTreeLayerFactory = IPDFStructTreeLayerFactory;
  107. class IDownloadManager {
  108. downloadUrl(url, filename) {}
  109. downloadData(data, filename, contentType) {}
  110. openOrDownloadData(element, data, filename) {}
  111. download(blob, url, filename) {}
  112. }
  113. exports.IDownloadManager = IDownloadManager;
  114. class IL10n {
  115. async getLanguage() {}
  116. async getDirection() {}
  117. async get(key, args = null, fallback) {}
  118. async translate(element) {}
  119. }
  120. exports.IL10n = IL10n;