public void PDFiumBridge_FPDFLinkEnumerate_SimpleCall_NoException() { int start_pos = 0; var link_annot = new FPDF_LINK(); _bridge.FPDFLink_Enumerate(FPDF_PAGE.InvalidHandle, ref start_pos, ref link_annot); }
/// <summary> /// Get the count of quadrilateral points to the |link_annot|. /// </summary> /// <param name="link_annot">Handle to the link annotation.</param> /// <returns>Returns the count of quadrilateral points.</returns> /// <remarks> /// FPDF_EXPORT int FPDF_CALLCONV FPDFLink_CountQuadPoints(FPDF_LINK link_annot);. /// </remarks> public int FPDFLink_CountQuadPoints(FPDF_LINK link_annot) { lock (_syncObject) { return(FPDFLink_CountQuadPointsStatic(link_annot)); } }
/// <summary> /// Get the quadrilateral points for the specified |quad_index| in |link_annot|. /// </summary> /// <param name="link_annot">Handle to the link annotation.</param> /// <param name="quad_index">The specified quad point index.</param> /// <param name="quad_points">Receives the quadrilateral points.</param> /// <returns>Returns true on success.</returns> /// <remarks> /// FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFLink_GetQuadPoints(FPDF_LINK link_annot, int quad_index, FS_QUADPOINTSF* quad_points);. /// </remarks> public bool FPDFLink_GetQuadPoints(FPDF_LINK link_annot, int quad_index, ref FS_QUADPOINTSF quad_points) { lock (_syncObject) { return(FPDFLink_GetQuadPointsStatic(link_annot, quad_index, ref quad_points)); } }
/// <summary> /// Get the rectangle for |link_annot|. /// </summary> /// <param name="link_annot">Handle to the link annotation.</param> /// <param name="rect">The annotation rectangle.</param> /// <returns>Returns true on success.</returns> /// <remarks> /// FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFLink_GetAnnotRect(FPDF_LINK link_annot, FS_RECTF* rect);. /// </remarks> public bool FPDFLink_GetAnnotRect(FPDF_LINK link_annot, ref FS_RECTF rect) { lock (_syncObject) { return(FPDFLink_GetAnnotRectStatic(link_annot, ref rect)); } }
/// <summary> /// Gets FPDF_ANNOTATION object for |link_annot|. Experimental API. /// </summary> /// <param name="page">Handle to the page in which FPDF_LINK object is present.</param> /// <param name="link_annot">Handle to link annotation.</param> /// <returns>Returns FPDF_ANNOTATION from the FPDF_LINK and NULL on failure, if the input link annot or page is NULL.</returns> /// <remarks> /// FPDF_EXPORT FPDF_ANNOTATION FPDF_CALLCONV FPDFLink_GetAnnot(FPDF_PAGE page, FPDF_LINK link_annot);. /// </remarks> public FPDF_ANNOTATION FPDFLink_GetAnnot(FPDF_PAGE page, FPDF_LINK link_annot) { lock (_syncObject) { return(FPDFLink_GetAnnotStatic(page, link_annot)); } }
/// <summary> /// Enumerates all the link annotations in |page|. /// </summary> /// <param name="page">Handle to the page.</param> /// <param name="start_pos">The start position, should initially be 0 and is updated with the next start position on return.</param> /// <param name="link_annot">The link handle for |startPos|.</param> /// <returns>Returns TRUE on success.</returns> /// <remarks> /// FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFLink_Enumerate(FPDF_PAGE page, int* start_pos, FPDF_LINK* link_annot);. /// </remarks> public bool FPDFLink_Enumerate(FPDF_PAGE page, ref int start_pos, ref FPDF_LINK link_annot) { lock (_syncObject) { return(FPDFLink_EnumerateStatic(page, ref start_pos, ref link_annot)); } }
/// <summary> /// Get action info for |link|. /// </summary> /// <param name="link">Handle to the link.</param> /// <returns>Returns a handle to the action associated to |link|, or NULL if no action.</returns> /// <remarks> /// FPDF_EXPORT FPDF_ACTION FPDF_CALLCONV FPDFLink_GetAction(FPDF_LINK link);. /// </remarks> public FPDF_ACTION FPDFLink_GetAction(FPDF_LINK link) { lock (_syncObject) { return(FPDFLink_GetActionStatic(link)); } }
/// <summary> /// Get destination info for |link|. /// </summary> /// <param name="document">Handle to the document.</param> /// <param name="link">Handle to the link.</param> /// <returns>Returns a handle to the destination, or NULL if there is no destination associated with the link. /// In this case, you should call FPDFLink_GetAction() to retrieve the action associated with |link|.</returns> /// <remarks> /// FPDF_EXPORT FPDF_DEST FPDF_CALLCONV FPDFLink_GetDest(FPDF_DOCUMENT document, FPDF_LINK link);. /// </remarks> public FPDF_DEST FPDFLink_GetDest(FPDF_DOCUMENT document, FPDF_LINK link) { lock (_syncObject) { return(FPDFLink_GetDestStatic(document, link)); } }
/// <summary> /// Initializes a new instance of the <see cref="PDFLink"/> class. /// </summary> /// <param name="mainComponent">Main component where this bookmark belongs.</param> /// <param name="linkHandle">Handle of this link.</param> public PDFLink(PDFComponent mainComponent, FPDF_LINK linkHandle) { _mainComponent = mainComponent ?? throw new ArgumentNullException(nameof(mainComponent)); _linkHandle = linkHandle; }
public void FPDF_LINK_Constructor_Call2_Success() { var h = new FPDF_LINK(new IntPtr(1)); Assert.IsTrue(h.IsValid); }
public void FPDF_LINK_Constructor_Call1_Success() { var h = new FPDF_LINK(); Assert.IsFalse(h.IsValid); }