File: GtkPrintContext.xs

package info (click to toggle)
libgtk2-perl 2:1.2499-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 4,668 kB
  • ctags: 594
  • sloc: perl: 22,100; ansic: 122; makefile: 17
file content (56 lines) | stat: -rw-r--r-- 1,811 bytes parent folder | download | duplicates (5)
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
/*
 * Copyright (c) 2006 by the gtk2-perl team (see the file AUTHORS)
 *
 * Licensed under the LGPL, see LICENSE file for more information.
 *
 * $Id$
 */

#include "gtk2perl.h"
#include <cairo-perl.h>

MODULE = Gtk2::PrintContext	PACKAGE = Gtk2::PrintContext	PREFIX = gtk_print_context_

cairo_t * gtk_print_context_get_cairo_context (GtkPrintContext *context);

GtkPageSetup * gtk_print_context_get_page_setup (GtkPrintContext *context);

gdouble gtk_print_context_get_width (GtkPrintContext *context);

gdouble gtk_print_context_get_height (GtkPrintContext *context);

gdouble gtk_print_context_get_dpi_x (GtkPrintContext *context);

gdouble gtk_print_context_get_dpi_y (GtkPrintContext *context);

PangoFontMap * gtk_print_context_get_pango_fontmap (GtkPrintContext *context);

PangoContext_noinc * gtk_print_context_create_pango_context (GtkPrintContext *context);

PangoLayout_noinc * gtk_print_context_create_pango_layout (GtkPrintContext *context);

void gtk_print_context_set_cairo_context (GtkPrintContext *context, cairo_t *cr, double dpi_x, double dpi_y);

#if GTK_CHECK_VERSION (2, 20, 0)

# gboolean gtk_print_context_get_hard_margins (GtkPrintContext *context, gdouble *top, gdouble *bottom, gdouble *left, gdouble *right)
=for apidoc
=for signature (top, bottom, left, right) = $context->get_hard_margins

Returns an empty list if the hard margins could not be retrieved.

=cut
void
gtk_print_context_get_hard_margins (GtkPrintContext *context)
    PREINIT:
	gdouble top, bottom, left, right;
    PPCODE:
	if (!gtk_print_context_get_hard_margins (context, &top, &bottom, &left, &right))
		XSRETURN_EMPTY;
	EXTEND (SP, 4);
	PUSHs (sv_2mortal (newSVnv (top)));
	PUSHs (sv_2mortal (newSVnv (bottom)));
	PUSHs (sv_2mortal (newSVnv (left)));
	PUSHs (sv_2mortal (newSVnv (right)));

#endif /* 2.20 */