*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* $Id$
*/
typedef struct _EvRectangle EvRectangle;
+typedef struct _EvDocumentBackendInfo EvDocumentBackendInfo;
+struct _EvDocumentBackendInfo
+{
+ const gchar *name;
+ const gchar *version;
+};
+
struct _EvDocument
{
GObject base;
cairo_surface_t * (* render) (EvDocument *document,
EvRenderContext *rc);
EvDocumentInfo * (* get_info) (EvDocument *document);
+ gboolean (* get_backend_info)(EvDocument *document,
+ EvDocumentBackendInfo *info);
};
GType ev_document_get_type (void) G_GNUC_CONST;
gboolean ev_document_fc_mutex_trylock (void);
EvDocumentInfo *ev_document_get_info (EvDocument *document);
+gboolean ev_document_get_backend_info (EvDocument *document,
+ EvDocumentBackendInfo *info);
gboolean ev_document_load (EvDocument *document,
const char *uri,
GError **error);
void ev_document_get_max_page_size (EvDocument *document,
gdouble *width,
gdouble *height);
+void ev_document_get_min_page_size (EvDocument *document,
+ gdouble *width,
+ gdouble *height);
gboolean ev_document_check_dimensions (EvDocument *document);
gint ev_document_get_max_label_len (EvDocument *document);
gboolean ev_document_has_text_page_labels (EvDocument *document);
return g_define_type_id__volatile; \
}
-/* A convenience macro for GTypeInterface definitions, which declares
- * a default vtable initialization function and defines a *_get_type()
- * function.
- *
- * The macro expects the interface initialization function to have the
- * name <literal>t_n ## _default_init</literal>, and the interface
- * structure to have the name <literal>TN ## Interface</literal>.
- */
-#define EV_DEFINE_INTERFACE(TypeName, type_name, TYPE_PREREQ) \
-static void type_name##_class_init (TypeName##Iface *klass); \
- \
-GType \
-type_name##_get_type (void) \
-{ \
- static volatile gsize g_define_type_id__volatile = 0; \
- if (g_once_init_enter (&g_define_type_id__volatile)) { \
- GType g_define_type_id = \
- g_type_register_static_simple (G_TYPE_INTERFACE, \
- g_intern_static_string (#TypeName), \
- sizeof (TypeName##Iface), \
- (GClassInitFunc)type_name##_class_init, \
- 0, \
- (GInstanceInitFunc)NULL, \
- (GTypeFlags) 0); \
- if (TYPE_PREREQ) \
- g_type_interface_add_prerequisite (g_define_type_id, TYPE_PREREQ); \
- g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); \
- } \
- return g_define_type_id__volatile; \
-}
-
-/*
- * A convenience macro for boxed type implementations, which defines a
- * type_name_get_type() function registering the boxed type.
- */
-#define EV_DEFINE_BOXED_TYPE(TypeName, type_name, copy_func, free_func) \
-GType \
-type_name##_get_type (void) \
-{ \
- static volatile gsize g_define_type_id__volatile = 0; \
- if (g_once_init_enter (&g_define_type_id__volatile)) { \
- GType g_define_type_id = \
- g_boxed_type_register_static (g_intern_static_string (#TypeName), \
- (GBoxedCopyFunc) copy_func, \
- (GBoxedFreeFunc) free_func); \
- g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); \
- } \
- return g_define_type_id__volatile; \
-}
-
G_END_DECLS
#endif /* EV_DOCUMENT_H */