![]() |
![]() |
![]() |
GXPS Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy |
#include <libgxps/gxps.h> GXPSLinkTarget; GXPSLink; GXPSLinkTarget * gxps_link_target_copy (GXPSLinkTarget *target
); void gxps_link_target_free (GXPSLinkTarget *target
); gboolean gxps_link_target_is_internal (GXPSLinkTarget *target
); const gchar * gxps_link_target_get_anchor (GXPSLinkTarget *target
); const gchar * gxps_link_target_get_uri (GXPSLinkTarget *target
); GXPSLink * gxps_link_copy (GXPSLink *link
); void gxps_link_free (GXPSLink *link
); GXPSLinkTarget * gxps_link_get_target (GXPSLink *link
); void gxps_link_get_area (GXPSLink *link
,cairo_rectangle_t *area
);
GXPSLinkTarget is a hyperlink source that can point to a location in
any of the documents of the XPS file or to an external document.
Internal GXPSLinkTargets have an URI relative to the XPS file,
and a named destination represented by an anchor. External
GXPSLinkTargets have an absolute URI pointing to a location
in another XPS File and might optionally have an anchor.
To get the destination pointed by a in internal GXPSLinkTarget you can use
gxps_file_get_document_for_link_target()
to get the document within the file,
gxps_document_get_page_for_anchor()
to get the page within the document, and
gxps_page_get_anchor_destination()
to get the page area.
GXPSLink maps a location in a page to a GXPSLinkTarget. To get the list of
link for a page you can use gxps_page_get_links()
.
typedef struct _GXPSLinkTarget GXPSLinkTarget;
GXPSLinkTarget represents a hyperlink source.
GXPSLinkTarget * gxps_link_target_copy (GXPSLinkTarget *target
);
Creates a copy of a GXPSLinkTarget
|
a GXPSLinkTarget |
Returns : |
a copy of target .
Free the returned object with gxps_link_target_free()
|
void gxps_link_target_free (GXPSLinkTarget *target
);
Frees a GXPSLinkTarget.
|
a GXPSLinkTarget |
gboolean gxps_link_target_is_internal (GXPSLinkTarget *target
);
Gets whether target
destination is internal or not.
|
a GXPSLinkTarget |
Returns : |
TRUE if the GXPSLinkTarget points to an internal location,
FALSE if it points to a external one. |
const gchar * gxps_link_target_get_anchor (GXPSLinkTarget *target
);
Gets the anchor name target
links to. If target
is
an internal GXPSLinkTarget this function always returns
and anchor, if it is external it might return NULL
if the
target
does not have an anchor.
|
a GXPSLinkTarget |
Returns : |
the name of the anchor of target . |
const gchar * gxps_link_target_get_uri (GXPSLinkTarget *target
);
Gets the URI target
links to.
|
a GXPSLinkTarget |
Returns : |
the URI of target . |
GXPSLink * gxps_link_copy (GXPSLink *link
);
Creates a copy of a GXPSLink.
|
a GXPSLink |
Returns : |
a copy of link .
Free the returned object with gxps_link_free() . |
GXPSLinkTarget * gxps_link_get_target (GXPSLink *link
);
Gets the GXPSLinkTarget mapped by link
.
|
a GXPSLink |
Returns : |
the GXPSLinkTarget of link . [transfer none]
|
void gxps_link_get_area (GXPSLink *link
,cairo_rectangle_t *area
);
Gets the rectangle of a page where the GXPSLinkTarget
mapped by link
is.
|
a GXPSLink |
|
return location for page area. [out] |