File: pps-document-text.h

package info (click to toggle)
papers 49.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 21,044 kB
  • sloc: ansic: 37,728; sh: 197; xml: 127; makefile: 113
file content (63 lines) | stat: -rw-r--r-- 2,298 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
// SPDX-License-Identifier: GPL-2.0-or-later
/*
 *  Copyright (C) 2010 Yaco Sistemas, Daniel Garcia <danigm@yaco.es>
 */

#pragma once

#if !defined(__PPS_PAPERS_DOCUMENT_H_INSIDE__) && !defined(PAPERS_COMPILATION)
#error "Only <papers-document.h> can be included directly."
#endif

#include <glib-object.h>
#include <glib.h>
#include <pango/pango.h>

#include "pps-document.h"
#include "pps-macros.h"

G_BEGIN_DECLS

#define PPS_TYPE_DOCUMENT_TEXT (pps_document_text_get_type ())

PPS_PUBLIC
G_DECLARE_INTERFACE (PpsDocumentText, pps_document_text, PPS, DOCUMENT_TEXT, GObject)

struct _PpsDocumentTextInterface {
	GTypeInterface base_iface;

	/* Methods */
	cairo_region_t *(*get_text_mapping) (PpsDocumentText *document_text,
	                                     PpsPage *page);
	gchar *(*get_text) (PpsDocumentText *document_text,
	                    PpsPage *page);
	gboolean (*get_text_layout) (PpsDocumentText *document_text,
	                             PpsPage *page,
	                             PpsRectangle **areas,
	                             guint *n_areas);
	gchar *(*get_text_in_area) (PpsDocumentText *document_text,
	                            PpsPage *page,
	                            PpsRectangle *area);
	PangoAttrList *(*get_text_attrs) (PpsDocumentText *document_text,
	                                  PpsPage *page);
};

PPS_PUBLIC
gchar *pps_document_text_get_text (PpsDocumentText *document_text,
                                   PpsPage *page);
PPS_PUBLIC
gboolean pps_document_text_get_text_layout (PpsDocumentText *document_text,
                                            PpsPage *page,
                                            PpsRectangle **areas,
                                            guint *n_areas);
PPS_PUBLIC
gchar *pps_document_text_get_text_in_area (PpsDocumentText *document_text,
                                           PpsPage *page,
                                           PpsRectangle *area);
PPS_PUBLIC
cairo_region_t *pps_document_text_get_text_mapping (PpsDocumentText *document_text,
                                                    PpsPage *page);
PPS_PUBLIC
PangoAttrList *pps_document_text_get_text_attrs (PpsDocumentText *document_text,
                                                 PpsPage *page);
G_END_DECLS