Class
PapersDocumentDocument
Functions
pps_document_factory_get_document
Creates a PpsDocument
for the document at uri
; or, if no backend handling
the document’s type is found, or an error occurred on opening the document,
returns NULL
and fills in error
.
If the document is encrypted, it is returned but also error
is set to
PPS_DOCUMENT_ERROR_ENCRYPTED
.
pps_document_factory_get_document_for_fd
Synchronously creates a PpsDocument
for the document from fd
using the backend
for loading documents of type mime_type
; or, if the backend does not support
loading from file descriptors, or an error occurred on opening the document,
returns NULL
and fills in error
.
If the document is encrypted, it is returned but also error
is set to
PPS_DOCUMENT_ERROR_ENCRYPTED
.
since: 42.0
pps_document_factory_get_document_full
Creates a PpsDocument
for the document at uri
; or, if no backend handling
the document’s type is found, or an error occurred on opening the document,
returns NULL
and fills in error
.
If the document is encrypted, it is returned but also error
is set to
PPS_DOCUMENT_ERROR_ENCRYPTED
.
pps_document_misc_format_datetime
Determine the preferred date and time representation for the current locale
for dt
.
since: 3.38
pps_document_misc_get_widget_dpi
Returns sensible guess for DPI of monitor on which given widget has been realized. If HiDPI display, use 192, else 96. Returns 96 as fallback value.
Instance methods
pps_document_load_fd
Synchronously loads the document from fd
, which must refer to
a regular file.
since: 42.0
Signals
Signals inherited from GObject (1)
GObject::notify
The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.
Class structure
struct PapersDocumentDocumentClass {
GObjectClass base_class;
gboolean (* load) (
PpsDocument* document,
const char* uri,
GError** error
);
gboolean (* save) (
PpsDocument* document,
const char* uri,
GError** error
);
gint (* get_n_pages) (
PpsDocument* document
);
PpsPage* (* get_page) (
PpsDocument* document,
gint index
);
void (* get_page_size) (
PpsDocument* document,
PpsPage* page_index,
double* width,
double* height
);
gchar* (* get_page_label) (
PpsDocument* document,
PpsPage* page
);
cairo_surface_t* (* render) (
PpsDocument* document,
PpsRenderContext* rc
);
GdkPixbuf* (* get_thumbnail) (
PpsDocument* document,
PpsRenderContext* rc
);
PpsDocumentInfo* (* get_info) (
PpsDocument* document
);
gboolean (* get_backend_info) (
PpsDocument* document,
PpsDocumentBackendInfo* info
);
gboolean (* load_stream) (
PpsDocument* document,
GInputStream* stream,
PpsDocumentLoadFlags flags,
GCancellable* cancellable,
GError** error
);
gboolean (* load_gfile) (
PpsDocument* document,
GFile* file,
PpsDocumentLoadFlags flags,
GCancellable* cancellable,
GError** error
);
cairo_surface_t* (* get_thumbnail_surface) (
PpsDocument* document,
PpsRenderContext* rc
);
gboolean (* load_fd) (
PpsDocument* document,
int fd,
PpsDocumentLoadFlags flags,
GCancellable* cancellable,
GError** error
);
}
No description available.
Class members
base_class: GObjectClass
No description available.
load: gboolean (* load) ( PpsDocument* document, const char* uri, GError** error )
No description available.
save: gboolean (* save) ( PpsDocument* document, const char* uri, GError** error )
No description available.
get_n_pages: gint (* get_n_pages) ( PpsDocument* document )
No description available.
get_page: PpsPage* (* get_page) ( PpsDocument* document, gint index )
No description available.
get_page_size: void (* get_page_size) ( PpsDocument* document, PpsPage* page_index, double* width, double* height )
No description available.
get_page_label: gchar* (* get_page_label) ( PpsDocument* document, PpsPage* page )
No description available.
render: cairo_surface_t* (* render) ( PpsDocument* document, PpsRenderContext* rc )
No description available.
get_thumbnail: GdkPixbuf* (* get_thumbnail) ( PpsDocument* document, PpsRenderContext* rc )
No description available.
get_info: PpsDocumentInfo* (* get_info) ( PpsDocument* document )
No description available.
get_backend_info: gboolean (* get_backend_info) ( PpsDocument* document, PpsDocumentBackendInfo* info )
No description available.
load_stream: gboolean (* load_stream) ( PpsDocument* document, GInputStream* stream, PpsDocumentLoadFlags flags, GCancellable* cancellable, GError** error )
No description available.
load_gfile: gboolean (* load_gfile) ( PpsDocument* document, GFile* file, PpsDocumentLoadFlags flags, GCancellable* cancellable, GError** error )
No description available.
get_thumbnail_surface: cairo_surface_t* (* get_thumbnail_surface) ( PpsDocument* document, PpsRenderContext* rc )
No description available.
load_fd: gboolean (* load_fd) ( PpsDocument* document, int fd, PpsDocumentLoadFlags flags, GCancellable* cancellable, GError** error )
No description available.
Virtual methods
PapersDocument.DocumentClass.load_fd
Synchronously loads the document from fd
, which must refer to
a regular file.
since: 42.0