23 #if !defined (__EV_EVINCE_DOCUMENT_H_INSIDE__) && !defined (EVINCE_COMPILATION)
24 #error "Only <evince-document.h> can be included directly."
30 #include <glib-object.h>
42 #define EV_TYPE_DOCUMENT (ev_document_get_type ())
43 #define EV_DOCUMENT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), EV_TYPE_DOCUMENT, EvDocument))
44 #define EV_DOCUMENT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), EV_TYPE_DOCUMENT, EvDocumentClass))
45 #define EV_IS_DOCUMENT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), EV_TYPE_DOCUMENT))
46 #define EV_IS_DOCUMENT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EV_TYPE_DOCUMENT))
47 #define EV_DOCUMENT_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), EV_TYPE_DOCUMENT, EvDocumentClass))
53 #define EV_DOCUMENT_ERROR ev_document_error_quark ()
54 #define EV_DOC_MUTEX_LOCK (ev_document_doc_mutex_lock ())
55 #define EV_DOC_MUTEX_UNLOCK (ev_document_doc_mutex_unlock ())
123 GInputStream *stream,
125 GCancellable *cancellable,
130 GCancellable *cancellable,
132 cairo_surface_t * (* get_thumbnail_surface) (
EvDocument *document,
162 GInputStream *stream,
164 GCancellable *cancellable,
169 GCancellable *cancellable,
203 const gchar *page_label,
220 #define EV_TYPE_RECTANGLE (ev_rectangle_get_type ())
239 #define EV_TYPE_SOURCE_LINK (ev_source_link_get_type ())
262 #define EV_BACKEND_IMPLEMENT_INTERFACE(TYPE_IFACE, iface_init) { \
263 const GInterfaceInfo g_implement_interface_info = { \
264 (GInterfaceInitFunc) iface_init, NULL, NULL \
266 g_type_module_add_interface (module, \
269 &g_implement_interface_info); \
277 #define EV_BACKEND_REGISTER_WITH_CODE(BackendName, backend_name, CODE) \
279 static GType g_define_type_id = 0; \
282 backend_name##_get_type (void) \
284 return g_define_type_id; \
287 static void backend_name##_init (BackendName *self); \
288 static void backend_name##_class_init (BackendName##Class *klass); \
289 static gpointer backend_name##_parent_class = NULL; \
290 static void backend_name##_class_intern_init (gpointer klass) \
292 backend_name##_parent_class = g_type_class_peek_parent (klass); \
293 backend_name##_class_init ((BackendName##Class *) klass); \
296 G_MODULE_EXPORT GType \
297 register_evince_backend (GTypeModule *module) \
299 const GTypeInfo our_info = { \
300 sizeof (BackendName##Class), \
303 (GClassInitFunc) backend_name##_class_intern_init, \
306 sizeof (BackendName), \
308 (GInstanceInitFunc) backend_name##_init \
312 bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR); \
313 bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); \
315 g_define_type_id = g_type_module_register_type (module, \
323 return g_define_type_id; \
331 #define EV_BACKEND_REGISTER(BackendName, backend_name) \
332 EV_BACKEND_REGISTER_WITH_CODE(BackendName, backend_name, ;)