Copyright | Will Thompson, Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
Safe Haskell | None |
Language | Haskell2010 |
- Exported types
- Methods
- addAnnot
- findText
- findTextWithOptions
- freeAnnotMapping
- freeFormFieldMapping
- freeImageMapping
- freeLinkMapping
- freeTextAttributes
- getAnnotMapping
- getCropBox
- getDuration
- getFormFieldMapping
- getImage
- getImageMapping
- getIndex
- getLabel
- getLinkMapping
- getSelectedRegion
- getSelectedText
- getSelectionRegion
- getSize
- getText
- getTextAttributes
- getTextAttributesForArea
- getTextForArea
- getTextLayout
- getTextLayoutForArea
- getThumbnail
- getThumbnailSize
- getTransition
- removeAnnot
- render
- renderForPrinting
- renderForPrintingWithOptions
- renderSelection
- renderToPs
- selectionRegionFree
- Properties
- newtype Page = Page (ManagedPtr Page)
- class GObject o => IsPage o
- toPage :: IsPage o => o -> IO Page
- noPage :: Maybe Page
- data PageAddAnnotMethodInfo
- pageAddAnnot :: (HasCallStack, MonadIO m, IsPage a, IsAnnot b) => a -> b -> m ()
- data PageFindTextMethodInfo
- pageFindText :: (HasCallStack, MonadIO m, IsPage a) => a -> Text -> m [Rectangle]
- data PageFindTextWithOptionsMethodInfo
- pageFindTextWithOptions :: (HasCallStack, MonadIO m, IsPage a) => a -> Text -> [FindFlags] -> m [Rectangle]
- pageFreeAnnotMapping :: (HasCallStack, MonadIO m) => [AnnotMapping] -> m ()
- pageFreeFormFieldMapping :: (HasCallStack, MonadIO m) => [FormFieldMapping] -> m ()
- pageFreeImageMapping :: (HasCallStack, MonadIO m) => [ImageMapping] -> m ()
- pageFreeLinkMapping :: (HasCallStack, MonadIO m) => [LinkMapping] -> m ()
- pageFreeTextAttributes :: (HasCallStack, MonadIO m) => [TextAttributes] -> m ()
- data PageGetAnnotMappingMethodInfo
- pageGetAnnotMapping :: (HasCallStack, MonadIO m, IsPage a) => a -> m [AnnotMapping]
- data PageGetCropBoxMethodInfo
- pageGetCropBox :: (HasCallStack, MonadIO m, IsPage a) => a -> m Rectangle
- data PageGetDurationMethodInfo
- pageGetDuration :: (HasCallStack, MonadIO m, IsPage a) => a -> m Double
- data PageGetFormFieldMappingMethodInfo
- pageGetFormFieldMapping :: (HasCallStack, MonadIO m, IsPage a) => a -> m [FormFieldMapping]
- data PageGetImageMethodInfo
- pageGetImage :: (HasCallStack, MonadIO m, IsPage a) => a -> Int32 -> m Surface
- data PageGetImageMappingMethodInfo
- pageGetImageMapping :: (HasCallStack, MonadIO m, IsPage a) => a -> m [ImageMapping]
- data PageGetIndexMethodInfo
- pageGetIndex :: (HasCallStack, MonadIO m, IsPage a) => a -> m Int32
- data PageGetLabelMethodInfo
- pageGetLabel :: (HasCallStack, MonadIO m, IsPage a) => a -> m Text
- data PageGetLinkMappingMethodInfo
- pageGetLinkMapping :: (HasCallStack, MonadIO m, IsPage a) => a -> m [LinkMapping]
- data PageGetSelectedRegionMethodInfo
- pageGetSelectedRegion :: (HasCallStack, MonadIO m, IsPage a) => a -> Double -> SelectionStyle -> Rectangle -> m Region
- data PageGetSelectedTextMethodInfo
- pageGetSelectedText :: (HasCallStack, MonadIO m, IsPage a) => a -> SelectionStyle -> Rectangle -> m Text
- data PageGetSelectionRegionMethodInfo
- pageGetSelectionRegion :: (HasCallStack, MonadIO m, IsPage a) => a -> Double -> SelectionStyle -> Rectangle -> m [Rectangle]
- data PageGetSizeMethodInfo
- pageGetSize :: (HasCallStack, MonadIO m, IsPage a) => a -> m (Double, Double)
- data PageGetTextMethodInfo
- pageGetText :: (HasCallStack, MonadIO m, IsPage a) => a -> m Text
- data PageGetTextAttributesMethodInfo
- pageGetTextAttributes :: (HasCallStack, MonadIO m, IsPage a) => a -> m [TextAttributes]
- data PageGetTextAttributesForAreaMethodInfo
- pageGetTextAttributesForArea :: (HasCallStack, MonadIO m, IsPage a) => a -> Rectangle -> m [TextAttributes]
- data PageGetTextForAreaMethodInfo
- pageGetTextForArea :: (HasCallStack, MonadIO m, IsPage a) => a -> Rectangle -> m Text
- data PageGetTextLayoutMethodInfo
- pageGetTextLayout :: (HasCallStack, MonadIO m, IsPage a) => a -> m (Bool, [Rectangle])
- data PageGetTextLayoutForAreaMethodInfo
- pageGetTextLayoutForArea :: (HasCallStack, MonadIO m, IsPage a) => a -> Rectangle -> m (Bool, [Rectangle])
- data PageGetThumbnailMethodInfo
- pageGetThumbnail :: (HasCallStack, MonadIO m, IsPage a) => a -> m Surface
- data PageGetThumbnailSizeMethodInfo
- pageGetThumbnailSize :: (HasCallStack, MonadIO m, IsPage a) => a -> m (Bool, Int32, Int32)
- data PageGetTransitionMethodInfo
- pageGetTransition :: (HasCallStack, MonadIO m, IsPage a) => a -> m PageTransition
- data PageRemoveAnnotMethodInfo
- pageRemoveAnnot :: (HasCallStack, MonadIO m, IsPage a, IsAnnot b) => a -> b -> m ()
- data PageRenderMethodInfo
- pageRender :: (HasCallStack, MonadIO m, IsPage a) => a -> Context -> m ()
- data PageRenderForPrintingMethodInfo
- pageRenderForPrinting :: (HasCallStack, MonadIO m, IsPage a) => a -> Context -> m ()
- data PageRenderForPrintingWithOptionsMethodInfo
- pageRenderForPrintingWithOptions :: (HasCallStack, MonadIO m, IsPage a) => a -> Context -> [PrintFlags] -> m ()
- data PageRenderSelectionMethodInfo
- pageRenderSelection :: (HasCallStack, MonadIO m, IsPage a) => a -> Context -> Rectangle -> Rectangle -> SelectionStyle -> Color -> Color -> m ()
- data PageRenderToPsMethodInfo
- pageRenderToPs :: (HasCallStack, MonadIO m, IsPage a, IsPSFile b) => a -> b -> m ()
- pageSelectionRegionFree :: (HasCallStack, MonadIO m) => [Rectangle] -> m ()
- data PageLabelPropertyInfo
- getPageLabel :: (MonadIO m, IsPage o) => o -> m (Maybe Text)
- pageLabel :: AttrLabelProxy "label"
Exported types
GObject Page Source # | |
IsObject Page Source # | |
IsPage Page Source # | |
((~) * info (ResolvePageMethod t Page), MethodInfo * info Page p) => IsLabel t (Page -> p) Source # | |
((~) * info (ResolvePageMethod t Page), MethodInfo * info Page p) => IsLabelProxy t (Page -> p) Source # | |
HasAttributeList * Page Source # | |
type AttributeList Page Source # | |
type SignalList Page Source # | |
Methods
addAnnot
data PageAddAnnotMethodInfo Source #
((~) * signature (b -> m ()), MonadIO m, IsPage a, IsAnnot b) => MethodInfo * PageAddAnnotMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsPage a, IsAnnot b) | |
=> a |
|
-> b |
|
-> m () |
Adds annotation annot
to page
.
Since: 0.16
findText
data PageFindTextMethodInfo Source #
((~) * signature (Text -> m [Rectangle]), MonadIO m, IsPage a) => MethodInfo * PageFindTextMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsPage a) | |
=> a |
|
-> Text |
|
-> m [Rectangle] |
Finds text
in page
with the default options (FindFlagsDefault
) and
returns a List
of rectangles for each occurance of the text on the page.
The coordinates are in PDF points.
findTextWithOptions
freeAnnotMapping
:: (HasCallStack, MonadIO m) | |
=> [AnnotMapping] |
|
-> m () |
Frees a list of AnnotMapping
<!-- -->s allocated by
pageGetAnnotMapping
. It also unreferences the Annot
<!-- -->s
that each mapping contains, so if you want to keep them around, you need to
reference them with objectRef
.
freeFormFieldMapping
pageFreeFormFieldMapping Source #
:: (HasCallStack, MonadIO m) | |
=> [FormFieldMapping] |
|
-> m () |
Frees a list of FormFieldMapping
<!-- -->s allocated by
pageGetFormFieldMapping
.
freeImageMapping
:: (HasCallStack, MonadIO m) | |
=> [ImageMapping] |
|
-> m () |
Frees a list of ImageMapping
<!-- -->s allocated by
pageGetImageMapping
.
freeLinkMapping
:: (HasCallStack, MonadIO m) | |
=> [LinkMapping] |
|
-> m () |
Frees a list of LinkMapping
<!-- -->s allocated by
pageGetLinkMapping
. It also frees the Action
<!-- -->s
that each mapping contains, so if you want to keep them around, you need to
copy them with actionCopy
.
freeTextAttributes
pageFreeTextAttributes Source #
:: (HasCallStack, MonadIO m) | |
=> [TextAttributes] |
|
-> m () |
Frees a list of TextAttributes
<!-- -->s allocated by
pageGetTextAttributes
.
Since: 0.18
getAnnotMapping
data PageGetAnnotMappingMethodInfo Source #
((~) * signature (m [AnnotMapping]), MonadIO m, IsPage a) => MethodInfo * PageGetAnnotMappingMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsPage a) | |
=> a |
|
-> m [AnnotMapping] | Returns: A |
Returns a list of AnnotMapping
items that map from a location on
page
to a Annot
. This list must be freed with
pageFreeAnnotMapping
when done.
getCropBox
data PageGetCropBoxMethodInfo Source #
((~) * signature (m Rectangle), MonadIO m, IsPage a) => MethodInfo * PageGetCropBoxMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsPage a) | |
=> a |
|
-> m Rectangle |
Retrurns the crop box of page
getDuration
data PageGetDurationMethodInfo Source #
((~) * signature (m Double), MonadIO m, IsPage a) => MethodInfo * PageGetDurationMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsPage a) | |
=> a |
|
-> m Double | Returns: duration in seconds of |
Returns the duration of page
getFormFieldMapping
data PageGetFormFieldMappingMethodInfo Source #
((~) * signature (m [FormFieldMapping]), MonadIO m, IsPage a) => MethodInfo * PageGetFormFieldMappingMethodInfo a signature Source # | |
pageGetFormFieldMapping Source #
:: (HasCallStack, MonadIO m, IsPage a) | |
=> a |
|
-> m [FormFieldMapping] | Returns: A |
Returns a list of FormFieldMapping
items that map from a
location on page
to a form field. This list must be freed
with pageFreeFormFieldMapping
when done.
getImage
data PageGetImageMethodInfo Source #
((~) * signature (Int32 -> m Surface), MonadIO m, IsPage a) => MethodInfo * PageGetImageMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsPage a) | |
=> a |
|
-> Int32 |
|
-> m Surface | Returns: A cairo surface for the image |
Returns a cairo surface for the image of the page
getImageMapping
data PageGetImageMappingMethodInfo Source #
((~) * signature (m [ImageMapping]), MonadIO m, IsPage a) => MethodInfo * PageGetImageMappingMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsPage a) | |
=> a |
|
-> m [ImageMapping] | Returns: A |
Returns a list of ImageMapping
items that map from a
location on page
to an image of the page. This list must be freed
with pageFreeImageMapping
when done.
getIndex
data PageGetIndexMethodInfo Source #
((~) * signature (m Int32), MonadIO m, IsPage a) => MethodInfo * PageGetIndexMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsPage a) | |
=> a |
|
-> m Int32 | Returns: index value of |
Returns the index of page
getLabel
data PageGetLabelMethodInfo Source #
((~) * signature (m Text), MonadIO m, IsPage a) => MethodInfo * PageGetLabelMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsPage a) | |
=> a |
|
-> m Text | Returns: a new allocated string containing the label of |
Returns the label of page
. Note that page labels
and page indices might not coincide.
Since: 0.16
getLinkMapping
data PageGetLinkMappingMethodInfo Source #
((~) * signature (m [LinkMapping]), MonadIO m, IsPage a) => MethodInfo * PageGetLinkMappingMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsPage a) | |
=> a |
|
-> m [LinkMapping] | Returns: A |
Returns a list of LinkMapping
items that map from a
location on page
to a Action
. This list must be freed
with pageFreeLinkMapping
when done.
getSelectedRegion
data PageGetSelectedRegionMethodInfo Source #
((~) * signature (Double -> SelectionStyle -> Rectangle -> m Region), MonadIO m, IsPage a) => MethodInfo * PageGetSelectedRegionMethodInfo a signature Source # | |
pageGetSelectedRegion Source #
:: (HasCallStack, MonadIO m, IsPage a) | |
=> a |
|
-> Double |
|
-> SelectionStyle |
|
-> Rectangle |
|
-> m Region | Returns: a cairo_region_t |
Returns a region containing the area that would be rendered by
pageRenderSelection
.
The returned region must be freed with cairo_region_destroy()
Since: 0.16
getSelectedText
data PageGetSelectedTextMethodInfo Source #
((~) * signature (SelectionStyle -> Rectangle -> m Text), MonadIO m, IsPage a) => MethodInfo * PageGetSelectedTextMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsPage a) | |
=> a |
|
-> SelectionStyle |
|
-> Rectangle |
|
-> m Text | Returns: a pointer to the contents of the |
Retrieves the contents of the specified selection
as text.
Since: 0.16
getSelectionRegion
data PageGetSelectionRegionMethodInfo Source #
((~) * signature (Double -> SelectionStyle -> Rectangle -> m [Rectangle]), MonadIO m, IsPage a) => MethodInfo * PageGetSelectionRegionMethodInfo a signature Source # | |
pageGetSelectionRegion Source #
:: (HasCallStack, MonadIO m, IsPage a) | |
=> a |
|
-> Double |
|
-> SelectionStyle |
|
-> Rectangle |
|
-> m [Rectangle] |
Deprecated: (Since version 0.16)Use pageGetSelectedRegion
instead.
Returns a region containing the area that would be rendered by
pageRenderSelection
as a List
of
Rectangle
. The returned list must be freed with
pageSelectionRegionFree
.
getSize
data PageGetSizeMethodInfo Source #
((~) * signature (m (Double, Double)), MonadIO m, IsPage a) => MethodInfo * PageGetSizeMethodInfo a signature Source # | |
Gets the size of page
at the current scale and rotation.
getText
data PageGetTextMethodInfo Source #
((~) * signature (m Text), MonadIO m, IsPage a) => MethodInfo * PageGetTextMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsPage a) | |
=> a |
|
-> m Text | Returns: a pointer to the text of the |
Retrieves the text of page
.
Since: 0.16
getTextAttributes
data PageGetTextAttributesMethodInfo Source #
((~) * signature (m [TextAttributes]), MonadIO m, IsPage a) => MethodInfo * PageGetTextAttributesMethodInfo a signature Source # | |
pageGetTextAttributes Source #
:: (HasCallStack, MonadIO m, IsPage a) | |
=> a |
|
-> m [TextAttributes] | Returns: A |
Obtains the attributes of the text as a List
of TextAttributes
.
This list must be freed with pageFreeTextAttributes
when done.
Each list element is a TextAttributes
struct where start_index and
end_index indicates the range of text (as returned by pageGetText
)
to which text attributes apply.
See also pageGetTextAttributesForArea
Since: 0.18
getTextAttributesForArea
data PageGetTextAttributesForAreaMethodInfo Source #
((~) * signature (Rectangle -> m [TextAttributes]), MonadIO m, IsPage a) => MethodInfo * PageGetTextAttributesForAreaMethodInfo a signature Source # | |
pageGetTextAttributesForArea Source #
:: (HasCallStack, MonadIO m, IsPage a) | |
=> a |
|
-> Rectangle |
|
-> m [TextAttributes] | Returns: A |
Obtains the attributes of the text in area
as a List
of TextAttributes
.
This list must be freed with pageFreeTextAttributes
when done.
Each list element is a TextAttributes
struct where start_index and
end_index indicates the range of text (as returned by pageGetTextForArea
)
to which text attributes apply.
Since: 0.26
getTextForArea
data PageGetTextForAreaMethodInfo Source #
((~) * signature (Rectangle -> m Text), MonadIO m, IsPage a) => MethodInfo * PageGetTextForAreaMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsPage a) | |
=> a |
|
-> Rectangle |
|
-> m Text | Returns: a pointer to the text as a string |
Retrieves the text of page
contained in area
.
Since: 0.26
getTextLayout
data PageGetTextLayoutMethodInfo Source #
((~) * signature (m (Bool, [Rectangle])), MonadIO m, IsPage a) => MethodInfo * PageGetTextLayoutMethodInfo a signature Source # | |
Obtains the layout of the text as a list of Rectangle
This array must be freed with free
when done.
The position in the array represents an offset in the text returned by
pageGetText
See also pageGetTextLayoutForArea
.
Since: 0.16
getTextLayoutForArea
pageGetTextLayoutForArea Source #
:: (HasCallStack, MonadIO m, IsPage a) | |
=> a |
|
-> Rectangle |
|
-> m (Bool, [Rectangle]) |
Obtains the layout of the text contained in area
as a list of Rectangle
This array must be freed with free
when done.
The position in the array represents an offset in the text returned by
pageGetTextForArea
Since: 0.26
getThumbnail
data PageGetThumbnailMethodInfo Source #
((~) * signature (m Surface), MonadIO m, IsPage a) => MethodInfo * PageGetThumbnailMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsPage a) | |
=> a |
|
-> m Surface | Returns: the tumbnail as a cairo_surface_t or |
Get the embedded thumbnail for the specified page. If the document
doesn't have an embedded thumbnail for the page, this function
returns Nothing
.
getThumbnailSize
:: (HasCallStack, MonadIO m, IsPage a) | |
=> a |
|
-> m (Bool, Int32, Int32) | Returns: |
Returns True
if page
has a thumbnail associated with it. It also
fills in width
and height
with the width and height of the
thumbnail. The values of width and height are not changed if no
appropriate thumbnail exists.
getTransition
data PageGetTransitionMethodInfo Source #
((~) * signature (m PageTransition), MonadIO m, IsPage a) => MethodInfo * PageGetTransitionMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsPage a) | |
=> a |
|
-> m PageTransition | Returns: a |
Returns the transition effect of page
removeAnnot
data PageRemoveAnnotMethodInfo Source #
((~) * signature (b -> m ()), MonadIO m, IsPage a, IsAnnot b) => MethodInfo * PageRemoveAnnotMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsPage a, IsAnnot b) | |
=> a |
|
-> b |
|
-> m () |
Removes annotation annot
from page
Since: 0.22
render
data PageRenderMethodInfo Source #
((~) * signature (Context -> m ()), MonadIO m, IsPage a) => MethodInfo * PageRenderMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsPage a) | |
=> a |
|
-> Context |
|
-> m () |
Render the page to the given cairo context. This function
is for rendering a page that will be displayed. If you want
to render a page that will be printed use
pageRenderForPrinting
instead
renderForPrinting
data PageRenderForPrintingMethodInfo Source #
((~) * signature (Context -> m ()), MonadIO m, IsPage a) => MethodInfo * PageRenderForPrintingMethodInfo a signature Source # | |
pageRenderForPrinting Source #
:: (HasCallStack, MonadIO m, IsPage a) | |
=> a |
|
-> Context |
|
-> m () |
Render the page to the given cairo context for printing.
renderForPrintingWithOptions
data PageRenderForPrintingWithOptionsMethodInfo Source #
((~) * signature (Context -> [PrintFlags] -> m ()), MonadIO m, IsPage a) => MethodInfo * PageRenderForPrintingWithOptionsMethodInfo a signature Source # | |
pageRenderForPrintingWithOptions Source #
:: (HasCallStack, MonadIO m, IsPage a) | |
=> a |
|
-> Context |
|
-> [PrintFlags] |
|
-> m () |
Render the page to the given cairo context for printing with the specified options
Since: 0.16
renderSelection
data PageRenderSelectionMethodInfo Source #
((~) * signature (Context -> Rectangle -> Rectangle -> SelectionStyle -> Color -> Color -> m ()), MonadIO m, IsPage a) => MethodInfo * PageRenderSelectionMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsPage a) | |
=> a |
|
-> Context |
|
-> Rectangle |
|
-> Rectangle |
|
-> SelectionStyle |
|
-> Color |
|
-> Color |
|
-> m () |
Render the selection specified by selection
for page
to
the given cairo context. The selection will be rendered, using
glyphColor
for the glyphs and backgroundColor
for the selection
background.
If non-NULL, oldSelection
specifies the selection that is already
rendered to cairo
, in which case this function will (some day)
only render the changed part of the selection.
renderToPs
data PageRenderToPsMethodInfo Source #
((~) * signature (b -> m ()), MonadIO m, IsPage a, IsPSFile b) => MethodInfo * PageRenderToPsMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsPage a, IsPSFile b) | |
=> a |
|
-> b |
|
-> m () |
Render the page on a postscript file
selectionRegionFree
pageSelectionRegionFree Source #
:: (HasCallStack, MonadIO m) | |
=> [Rectangle] | |
-> m () |
Deprecated: (Since version 0.16)
Frees region
Properties
label
data PageLabelPropertyInfo Source #
pageLabel :: AttrLabelProxy "label" Source #