## ev-document

ev-document —

## Synopsis

    #define     EV_DOCUMENT_IFACE               (k)
    #define     EV_IS_DOCUMENT_IFACE            (k)
                EvDocument;
                EvDocumentIface;
                EvPageCache;
                EvPageCacheClass;
    #define     EV_DOCUMENT_ERROR
    #define     EV_DOC_MUTEX_LOCK
    #define     EV_DOC_MUTEX_UNLOCK
    enum        EvDocumentError;
                EvPoint;
                EvRectangle;
    GQuark      ev_document_error_quark         (void);
    GMutex*     ev_document_get_doc_mutex       (void);
    void        ev_document_doc_mutex_lock      (void);
    void        ev_document_doc_mutex_unlock    (void);
    GMutex*     ev_document_get_fc_mutex        (void);
    void        ev_document_fc_mutex_lock       (void);
    void        ev_document_fc_mutex_unlock     (void);
    EvDocumentInfo* ev_document_get_info        (EvDocument *document);
    gboolean    ev_document_load                (EvDocument *document,
                                                 const char *uri,
                                                 GError **error);
    gboolean    ev_document_save                (EvDocument *document,
                                                 const char *uri,
                                                 GError **error);
    int         ev_document_get_n_pages         (EvDocument *document);
    void        ev_document_get_page_size       (EvDocument *document,
                                                 int page,
                                                 double *width,
                                                 double *height);
    char*       ev_document_get_page_label      (EvDocument *document,
                                                 int page);
    gboolean    ev_document_can_get_text        (EvDocument *document);
    char*       ev_document_get_text            (EvDocument *document,
                                                 int page,
                                                 EvRectangle *rect);
    gboolean    ev_document_has_attachments     (EvDocument *document);
    GList*      ev_document_get_attachments     (EvDocument *document);
    GdkPixbuf*  ev_document_render_pixbuf       (EvDocument *document,
                                                 EvRenderContext *rc);
    gint        ev_rect_cmp                     (EvRectangle *a,
                                                 EvRectangle *b);

## Object Hierarchy

      GInterface
       +----EvDocument

      GObject
       +----EvPageCache

## Signals

    "history-changed"
                void        user_function      (EvPageCache *evpagecache,
                                                gint         arg1,
                                                gpointer     user_data)        : Run last
    "page-changed"
                void        user_function      (EvPageCache *evpagecache,
                                                gint         arg1,
                                                gpointer     user_data)        : Run last

## Description

## Details

### EV_DOCUMENT_IFACE()

    #define EV_DOCUMENT_IFACE(k)	    (G_TYPE_CHECK_CLASS_CAST((k), EV_TYPE_DOCUMENT, EvDocumentIface))

`k` : |

### EV_IS_DOCUMENT_IFACE()

    #define EV_IS_DOCUMENT_IFACE(k)	    (G_TYPE_CHECK_CLASS_TYPE ((k), EV_TYPE_DOCUMENT))

`k` : |

### EvDocument

    typedef struct _EvDocument EvDocument;

### EvDocumentIface

    typedef struct {
    	GTypeInterface base_iface;

    	/* Methods  */
    	gboolean         (* load)	     (EvDocument   *document,
    					      const char   *uri,
    					      GError      **error);
    	gboolean         (* save)	     (EvDocument   *document,
    					      const char   *uri,
    					      GError      **error);
    	int              (* get_n_pages)     (EvDocument   *document);
    	void	         (* get_page_size)   (EvDocument   *document,
    					      int           page,
    					      double       *width,
    					      double       *height);
    	char	       * (* get_page_label)  (EvDocument   *document,
    					      int           page);
    	gboolean         (* can_get_text)    (EvDocument   *document);
    	char	       * (* get_text)	     (EvDocument   *document,
    					      int           page,
    					      EvRectangle  *rect);
    	gboolean         (* has_attachments) (EvDocument   *document);
    	GList          * (* get_attachments) (EvDocument   *document);
    	GdkPixbuf      * (* render_pixbuf)   (EvDocument      *document,
    					      EvRenderContext *rc);
    	EvDocumentInfo * (* get_info)        (EvDocument   *document);
    } EvDocumentIface;

### EvPageCache

    typedef struct _EvPageCache EvPageCache;

### EvPageCacheClass

    typedef struct _EvPageCacheClass EvPageCacheClass;

### EV_DOCUMENT_ERROR

    #define EV_DOCUMENT_ERROR ev_document_error_quark ()

### EV_DOC_MUTEX_LOCK

    #define EV_DOC_MUTEX_LOCK (ev_document_doc_mutex_lock ())

### EV_DOC_MUTEX_UNLOCK

    #define EV_DOC_MUTEX_UNLOCK (ev_document_doc_mutex_unlock ())

### enum EvDocumentError

    typedef enum
    {
    	EV_DOCUMENT_ERROR_INVALID,
    	EV_DOCUMENT_ERROR_ENCRYPTED
    } EvDocumentError;

### EvPoint

    typedef struct {
    	double x;
    	double y;
    } EvPoint;

### EvRectangle

    typedef struct {
    	double x1;
    	double y1;
    	double x2;
    	double y2;
    } EvRectangle;

### ev_document_error_quark ()

    GQuark      ev_document_error_quark         (void);

Returns : |

### ev_document_get_doc_mutex ()

    GMutex*     ev_document_get_doc_mutex       (void);

Returns : |

### ev_document_doc_mutex_lock ()

    void        ev_document_doc_mutex_lock      (void);

### ev_document_doc_mutex_unlock ()

    void        ev_document_doc_mutex_unlock    (void);

### ev_document_get_fc_mutex ()

    GMutex*     ev_document_get_fc_mutex        (void);

Returns : |

### ev_document_fc_mutex_lock ()

    void        ev_document_fc_mutex_lock       (void);

### ev_document_fc_mutex_unlock ()

    void        ev_document_fc_mutex_unlock     (void);

### ev_document_get_info ()

    EvDocumentInfo* ev_document_get_info        (EvDocument *document);

`document` : |
Returns : |

### ev_document_load ()

    gboolean    ev_document_load                (EvDocument *document,
                                                 const char *uri,
                                                 GError **error);

`document` : |
`uri` : |
`error` : |
Returns : |

### ev_document_save ()

    gboolean    ev_document_save                (EvDocument *document,
                                                 const char *uri,
                                                 GError **error);

`document` : |
`uri` : |
`error` : |
Returns : |

### ev_document_get_n_pages ()

    int         ev_document_get_n_pages         (EvDocument *document);

`document` : |
Returns : |

### ev_document_get_page_size ()

    void        ev_document_get_page_size       (EvDocument *document,
                                                 int page,
                                                 double *width,
                                                 double *height);

`document` : |
`page` : |
`width` : |
`height` : |

### ev_document_get_page_label ()

    char*       ev_document_get_page_label      (EvDocument *document,
                                                 int page);

`document` : |
`page` : |
Returns : |

### ev_document_can_get_text ()

    gboolean    ev_document_can_get_text        (EvDocument *document);

`document` : |
Returns : |

### ev_document_get_text ()

    char*       ev_document_get_text            (EvDocument *document,
                                                 int page,
                                                 EvRectangle *rect);

`document` : |
`page` : |
`rect` : |
Returns : |

### ev_document_has_attachments ()

    gboolean    ev_document_has_attachments     (EvDocument *document);

`document` : |
Returns : |

### ev_document_get_attachments ()

    GList*      ev_document_get_attachments     (EvDocument *document);

`document` : |
Returns : |

### ev_document_render_pixbuf ()

    GdkPixbuf*  ev_document_render_pixbuf       (EvDocument *document,
                                                 EvRenderContext *rc);

`document` : |
`rc` : |
Returns : |

### ev_rect_cmp ()

    gint        ev_rect_cmp                     (EvRectangle *a,
                                                 EvRectangle *b);

`a` : |
`b` : |
Returns : |

## Signal Details

### The "history-changed" signal

    void        user_function                  (EvPageCache *evpagecache,
                                                gint         arg1,
                                                gpointer     user_data)        : Run last

`evpagecache` : | the object which received the signal.
`arg1` : |
`user_data` : | user data set when the signal handler was connected.

### The "page-changed" signal

    void        user_function                  (EvPageCache *evpagecache,
                                                gint         arg1,
                                                gpointer     user_data)        : Run last

`evpagecache` : | the object which received the signal.
`arg1` : |
`user_data` : | user data set when the signal handler was connected.