// Path: android-pdf-viewer/src/main/java/com/github/barteksc/pdfviewer/link/LinkHandler.java
// public interface LinkHandler {
// 
//     /**
//      * Called when link was tapped by user
//      *
//      * @param event current event
//      */
//     void handleLinkEvent(LinkTapEvent event);
// }
// 
// Path: android-pdf-viewer/src/main/java/com/github/barteksc/pdfviewer/model/LinkTapEvent.java
// public class LinkTapEvent {
//     private float originalX;
//     private float originalY;
//     private float documentX;
//     private float documentY;
//     private RectF mappedLinkRect;
//     private PdfDocument.Link link;
// 
//     public LinkTapEvent(float originalX, float originalY, float documentX, float documentY, RectF mappedLinkRect, PdfDocument.Link link) {
//         this.originalX = originalX;
//         this.originalY = originalY;
//         this.documentX = documentX;
//         this.documentY = documentY;
//         this.mappedLinkRect = mappedLinkRect;
//         this.link = link;
//     }
// 
//     public float getOriginalX() {
//         return originalX;
//     }
// 
//     public float getOriginalY() {
//         return originalY;
//     }
// 
//     public float getDocumentX() {
//         return documentX;
//     }
// 
//     public float getDocumentY() {
//         return documentY;
//     }
// 
//     public RectF getMappedLinkRect() {
//         return mappedLinkRect;
//     }
// 
//     public PdfDocument.Link getLink() {
//         return link;
//     }
// }


import android.view.MotionEvent;
import com.github.barteksc.pdfviewer.link.LinkHandler;
import com.github.barteksc.pdfviewer.model.LinkTapEvent;
    public void setOnDrawAll(OnDrawListener onDrawAllListener) {
        this.onDrawAllListener = onDrawAllListener;
    }

    public OnDrawListener getOnDrawAll() {
        return onDrawAllListener;
    }

    public void setOnTap(OnTapListener onTapListener) {
        this.onTapListener = onTapListener;
    }

    public boolean callOnTap(MotionEvent event) {
        return onTapListener != null && onTapListener.onTap(event);
    }

    public void setOnLongPress(OnLongPressListener onLongPressListener) {
        this.onLongPressListener = onLongPressListener;
    }

    public void callOnLongPress(MotionEvent event) {
        if (onLongPressListener != null) {
            onLongPressListener.onLongPress(event);
        }
    }

    public void setLinkHandler(LinkHandler linkHandler) {
        this.linkHandler = linkHandler;
    }

// Path: android-pdf-viewer/src/main/java/com/github/barteksc/pdfviewer/link/LinkHandler.java
// public interface LinkHandler {
// 
//     /**
//      * Called when link was tapped by user
//      *
//      * @param event current event
//      */
//     void handleLinkEvent(LinkTapEvent event);
// }
// 
// Path: android-pdf-viewer/src/main/java/com/github/barteksc/pdfviewer/model/LinkTapEvent.java
// public class LinkTapEvent {
//     private float originalX;
//     private float originalY;
//     private float documentX;
//     private float documentY;
//     private RectF mappedLinkRect;
//     private PdfDocument.Link link;
// 
//     public LinkTapEvent(float originalX, float originalY, float documentX, float documentY, RectF mappedLinkRect, PdfDocument.Link link) {
//         this.originalX = originalX;
//         this.originalY = originalY;
//         this.documentX = documentX;
//         this.documentY = documentY;
//         this.mappedLinkRect = mappedLinkRect;
//         this.link = link;
//     }
// 
//     public float getOriginalX() {
//         return originalX;
//     }
// 
//     public float getOriginalY() {
//         return originalY;
//     }
// 
//     public float getDocumentX() {
//         return documentX;
//     }
// 
//     public float getDocumentY() {
//         return documentY;
//     }
// 
//     public RectF getMappedLinkRect() {
//         return mappedLinkRect;
//     }
// 
//     public PdfDocument.Link getLink() {
//         return link;
//     }
// }


// Path: android-pdf-viewer/src/main/java/com/github/barteksc/pdfviewer/listener/Callbacks.java
import android.view.MotionEvent;
import com.github.barteksc.pdfviewer.link.LinkHandler;
import com.github.barteksc.pdfviewer.model.LinkTapEvent;

    public void setOnDrawAll(OnDrawListener onDrawAllListener) {
        this.onDrawAllListener = onDrawAllListener;
    }

    public OnDrawListener getOnDrawAll() {
        return onDrawAllListener;
    }

    public void setOnTap(OnTapListener onTapListener) {
        this.onTapListener = onTapListener;
    }

    public boolean callOnTap(MotionEvent event) {
        return onTapListener != null && onTapListener.onTap(event);
    }

    public void setOnLongPress(OnLongPressListener onLongPressListener) {
        this.onLongPressListener = onLongPressListener;
    }

    public void callOnLongPress(MotionEvent event) {
        if (onLongPressListener != null) {
            onLongPressListener.onLongPress(event);
        }
    }

    public void setLinkHandler(LinkHandler linkHandler) {
        this.linkHandler = linkHandler;
    }

    public void callLinkHandler(LinkTapEvent event) {