File: printui.override

package info (click to toggle)
gnome-python-desktop 2.32.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 4,548 kB
  • sloc: sh: 10,214; xml: 8,851; ansic: 3,428; python: 1,457; makefile: 664
file content (67 lines) | stat: -rw-r--r-- 2,291 bytes parent folder | download | duplicates (4)
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
57
58
59
60
61
62
63
64
65
66
67
/* -*- Mode: C; c-basic-offset: 4 -*- */
%%
headers
#include <Python.h>

#define NO_IMPORT_PYGOBJECT
#include <pygobject.h>

#include <libgnomeprintui/gnome-print-dialog.h>
#include <libgnomeprintui/gnome-font-dialog.h>
#include <libgnomeprintui/gnome-print-job-preview.h>
#include <libgnomeprintui/gnome-print-preview.h>
#include <libgnomeprintui/gnome-print-paper-selector.h>
#include <libgnomeprintui/gnome-print-unit-selector.h>

#include "config.h"

    /* This should (and will) be in gnome-print-config.h */
#define GNOME_TYPE_PRINT_CONFIG         (gnome_print_config_get_type ())
#define GNOME_PRINT_CONFIG(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), GNOME_TYPE_PRINT_CONFIG, GnomePrintConfig))
#define GNOME_PRINT_CONFIG_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST ((k), GNOME_TYPE_PRINT_CONFIG, GnomePrintConfigClass))
#define GNOME_IS_PRINT_CONFIG(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), GNOME_TYPE_PRINT_CONFIG))
#define GNOME_IS_PRINT_CONFIG_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), GNOME_TYPE_PRINT_CONFIG))
#define GNOME_PRINT_CONFIG_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GNOME_TYPE_PRINT_CONFIG, GnomePrintConfigClass))


%%
modulename gnomeprint.ui
%%
import gobject.GObject     as PyGObject_Type
import gnomeprint.Job      as PyGnomePrintJob_Type
import gnomeprint.Context  as PyGnomePrintContext_Type
import gnomeprint.Config   as PyGnomePrintConfig_Type
import gnomeprint.Font     as PyGnomeFont_Type
import gnomeprint.FontFace as PyGnomeFontFace_Type
import gtk.Dialog          as PyGtkDialog_Type
import gtk.Window          as PyGtkWindow_Type
import gtk.Widget          as PyGtkWidget_Type
import gnomecanvas.Canvas  as PyGnomeCanvas_Type
%%
ignore-glob 
  *_get_type

%%
override gnome_print_dialog_get_copies
static PyObject *
_wrap_gnome_print_dialog_get_copies(PyGObject *self)
{
    int copies;
    gboolean collate;

    gnome_print_dialog_get_copies(GNOME_PRINT_DIALOG(self->obj), &copies,
				  &collate);
    return Py_BuildValue("ii", copies, collate);
}

%%
override gnome_print_dialog_get_range_page
static PyObject *
_wrap_gnome_print_dialog_get_range_page(PyGObject *self)
{
    gint ret, start, end;

    ret = gnome_print_dialog_get_range_page(GNOME_PRINT_DIALOG(self->obj), &start, &end);
    return Py_BuildValue("iii", ret, start, end);
}