interfaces.js 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  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. accessibilityManager
  65. }) {}
  66. }
  67. exports.IPDFTextLayerFactory = IPDFTextLayerFactory;
  68. class IPDFAnnotationLayerFactory {
  69. createAnnotationLayerBuilder({
  70. pageDiv,
  71. pdfPage,
  72. annotationStorage = null,
  73. imageResourcesPath = "",
  74. renderForms = true,
  75. l10n = undefined,
  76. enableScripting = false,
  77. hasJSActionsPromise = null,
  78. mouseState = null,
  79. fieldObjectsPromise = null,
  80. annotationCanvasMap = null,
  81. accessibilityManager = null
  82. }) {}
  83. }
  84. exports.IPDFAnnotationLayerFactory = IPDFAnnotationLayerFactory;
  85. class IPDFAnnotationEditorLayerFactory {
  86. createAnnotationEditorLayerBuilder({
  87. uiManager = null,
  88. pageDiv,
  89. pdfPage,
  90. l10n,
  91. annotationStorage = null,
  92. accessibilityManager
  93. }) {}
  94. }
  95. exports.IPDFAnnotationEditorLayerFactory = IPDFAnnotationEditorLayerFactory;
  96. class IPDFXfaLayerFactory {
  97. createXfaLayerBuilder({
  98. pageDiv,
  99. pdfPage,
  100. annotationStorage = null
  101. }) {}
  102. }
  103. exports.IPDFXfaLayerFactory = IPDFXfaLayerFactory;
  104. class IPDFStructTreeLayerFactory {
  105. createStructTreeLayerBuilder({
  106. pdfPage
  107. }) {}
  108. }
  109. exports.IPDFStructTreeLayerFactory = IPDFStructTreeLayerFactory;
  110. class IDownloadManager {
  111. downloadUrl(url, filename) {}
  112. downloadData(data, filename, contentType) {}
  113. openOrDownloadData(element, data, filename) {}
  114. download(blob, url, filename) {}
  115. }
  116. exports.IDownloadManager = IDownloadManager;
  117. class IL10n {
  118. async getLanguage() {}
  119. async getDirection() {}
  120. async get(key, args = null, fallback) {}
  121. async translate(element) {}
  122. }
  123. exports.IL10n = IL10n;