EvDocumentMisc: Evince Document Library Reference Manual

## EvDocumentMisc EvDocumentMisc |

## Functions

void | ev_document_misc_get_pointer_position ()
gdouble | ev_document_misc_get_screen_dpi ()
gdouble | ev_document_misc_get_widget_dpi ()
cairo_surface_t * | ev_document_misc_surface_from_pixbuf ()
GdkPixbuf * | ev_document_misc_pixbuf_from_surface ()
cairo_surface_t * | ev_document_misc_surface_rotate_and_scale ()
void | ev_document_misc_invert_surface ()
void | ev_document_misc_invert_pixbuf ()
gchar * | ev_document_misc_format_date ()
GdkPixbuf * | ev_document_misc_render_loading_thumbnail ()
GdkPixbuf * | ev_document_misc_render_thumbnail_with_frame ()
cairo_surface_t * | ev_document_misc_render_loading_thumbnail_surface ()
cairo_surface_t * | ev_document_misc_render_thumbnail_surface_with_frame ()
GdkPixbuf * | ev_document_misc_get_loading_thumbnail ()
void | ev_document_misc_get_page_border_size ()
void | ev_document_misc_paint_one_page ()
GdkPixbuf * | ev_document_misc_get_thumbnail_frame ()

## Description

## Functions

### ev_document_misc_get_pointer_position ()

    void
    ev_document_misc_get_pointer_position (GtkWidget *widget,
                                           gint *x,
                                           gint *y);

Get the pointer's x and y position relative to `widget` .

#### Parameters

widget | a GtkWidget |
x | the pointer's "x" position, or -1 if the position is not available. | [out]
y | the pointer's "y" position, or -1 if the position is not available. | [out]

### ev_document_misc_get_screen_dpi ()

    gdouble
    ev_document_misc_get_screen_dpi (GdkScreen *screen);

`ev_document_misc_get_screen_dpi` has been deprecated since version 3.36 and should not be used in newly-written code.

This uses a deprecated GDK API. Use `ev_document_misc_get_widget_dpi()` instead, which uses GDK's per-monitor information.

#### Parameters

screen | a GdkScreen |

#### Returns

The DPI of `screen` , or 96 if the DPI is not available

### ev_document_misc_get_widget_dpi ()

    gdouble
    ev_document_misc_get_widget_dpi (GtkWidget *widget);

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.

#### Parameters

widget | a GtkWidget |

#### Returns

DPI as gdouble

### ev_document_misc_surface_from_pixbuf ()

    cairo_surface_t *
    ev_document_misc_surface_from_pixbuf (GdkPixbuf *pixbuf);

### ev_document_misc_pixbuf_from_surface ()

    GdkPixbuf *
    ev_document_misc_pixbuf_from_surface (cairo_surface_t *surface);

#### Parameters

surface | a cairo_surface_t |

#### Returns

a GdkPixbuf.

[transfer full]

### ev_document_misc_surface_rotate_and_scale ()

    cairo_surface_t *
    ev_document_misc_surface_rotate_and_scale
                                   (cairo_surface_t *surface,
                                    gint dest_width,
                                    gint dest_height,
                                    gint dest_rotation);

### ev_document_misc_invert_surface ()

    void
    ev_document_misc_invert_surface (cairo_surface_t *surface);

### ev_document_misc_invert_pixbuf ()

    void
    ev_document_misc_invert_pixbuf (GdkPixbuf *pixbuf);

### ev_document_misc_format_date ()

    gchar *
    ev_document_misc_format_date (GTime utime);

`ev_document_misc_format_date` has been deprecated since version 3.38 and should not be used in newly-written code.

use ev_document_misc_format_datetime instead as GTime is deprecated because it is not year-2038 safe.

#### Parameters

utime | a GTime |

#### Returns

a locale specific date and time representation.

[transfer full]

### ev_document_misc_render_loading_thumbnail ()

    GdkPixbuf *
    ev_document_misc_render_loading_thumbnail
                                   (GtkWidget *widget,
                                    int width,
                                    int height,
                                    gboolean inverted_colors);

#### Parameters

widget | a GtkWidget to use for style information |
width | the desired width |
height | the desired height |
inverted_colors | whether to invert colors |

#### Returns

a GdkPixbuf.

[transfer full]

Since: 3.8

### ev_document_misc_render_thumbnail_with_frame ()

    GdkPixbuf *
    ev_document_misc_render_thumbnail_with_frame
                                   (GtkWidget *widget,
                                    GdkPixbuf *source_pixbuf);

#### Parameters

widget | a GtkWidget to use for style information |
source_pixbuf | a GdkPixbuf |

#### Returns

a GdkPixbuf.

[transfer full]

Since: 3.8

### ev_document_misc_render_loading_thumbnail_surface ()

    cairo_surface_t *
    ev_document_misc_render_loading_thumbnail_surface
                                   (GtkWidget *widget,
                                    int width,
                                    int height,
                                    gboolean inverted_colors);

#### Parameters

widget | a GtkWidget to use for style information |
width | the desired width |
height | the desired height |
inverted_colors | whether to invert colors |

#### Returns

a cairo_surface_t.

[transfer full]

Since: 3.14

### ev_document_misc_render_thumbnail_surface_with_frame ()

    cairo_surface_t *
    ev_document_misc_render_thumbnail_surface_with_frame
                                   (GtkWidget *widget,
                                    cairo_surface_t *source_surface,
                                    int width,
                                    int height);

#### Parameters

widget | a GtkWidget to use for style information |
source_surface | a cairo_surface_t |
width | the desired width |
height | the desired height |

#### Returns

a cairo_surface_t.

[transfer full]

Since: 3.14

### ev_document_misc_get_loading_thumbnail ()

    GdkPixbuf *
    ev_document_misc_get_loading_thumbnail
                                   (int width,
                                    int height,
                                    gboolean inverted_colors);

`ev_document_misc_get_loading_thumbnail` is deprecated and should not be used in newly-written code.

#### Parameters

width | the desired width |
height | the desired height |
inverted_colors | whether to invert colors |

#### Returns

a GdkPixbuf.

[transfer full]

### ev_document_misc_get_page_border_size ()

    void
    ev_document_misc_get_page_border_size (gint page_width,
                                           gint page_height,
                                           GtkBorder *border);

`ev_document_misc_get_page_border_size` is deprecated and should not be used in newly-written code.

### ev_document_misc_paint_one_page ()

    void
    ev_document_misc_paint_one_page (cairo_t *cr,
                                     GtkWidget *widget,
                                     GdkRectangle *area,
                                     GtkBorder *border,
                                     gboolean highlight,
                                     gboolean inverted_colors);

`ev_document_misc_paint_one_page` has been deprecated since version 3.10. and should not be used in newly-written code.

#### Parameters

cr | a cairo_tEvannotation `widget` a GtkWidget |
area | a GdkRectangle |
border | a GtkBorder |
highlight | whether to highlight the text |
inverted_colors | whether to invert colors |

### ev_document_misc_get_thumbnail_frame ()

    GdkPixbuf *
    ev_document_misc_get_thumbnail_frame (int width,
                                          int height,
                                          GdkPixbuf *source_pixbuf);

`ev_document_misc_get_thumbnail_frame` is deprecated and should not be used in newly-written code.

#### Parameters

width | the desired width |
height | the desired height |
source_pixbuf | a GdkPixbuf |

#### Returns

a GdkPixbuf.

[transfer full]