1 | /** |
---|
2 | * bonobo-print-client.h: a print client interface for compound documents. |
---|
3 | * |
---|
4 | * Author: |
---|
5 | * Michael Meeks (mmeeks@gnu.org) |
---|
6 | * |
---|
7 | * Copyright 2000, Helix Code, Inc. |
---|
8 | */ |
---|
9 | #ifndef __BONOBO_PRINT_CLIENT_H__ |
---|
10 | #define __BONOBO_PRINT_CLIENT_H__ |
---|
11 | |
---|
12 | #include <stdarg.h> |
---|
13 | #include <libgnome/gnome-defs.h> |
---|
14 | #include <bonobo/bonobo-object-client.h> |
---|
15 | #include <bonobo/bonobo-print.h> |
---|
16 | #include <libgnomeprint/gnome-print.h> |
---|
17 | |
---|
18 | BEGIN_GNOME_DECLS |
---|
19 | |
---|
20 | #define BONOBO_PRINT_CLIENT_TYPE (bonobo_print_client_get_type ()) |
---|
21 | #define BONOBO_PRINT_CLIENT(o) (GTK_CHECK_CAST ((o), BONOBO_PRINT_CLIENT_TYPE, BonoboPrintClient)) |
---|
22 | #define BONOBO_PRINT_CLIENT_CLASS(k) (GTK_CHECK_CLASS_CAST((k), BONOBO_PRINT_CLIENT_TYPE, BonoboPrintClientClass)) |
---|
23 | #define BONOBO_IS_PRINT_CLIENT(o) (GTK_CHECK_TYPE ((o), BONOBO_PRINT_CLIENT_TYPE)) |
---|
24 | #define BONOBO_IS_PRINT_CLIENT_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), BONOBO_PRINT_CLIENT_TYPE)) |
---|
25 | |
---|
26 | typedef struct { |
---|
27 | GtkObject parent; |
---|
28 | Bonobo_Print corba_print; |
---|
29 | } BonoboPrintClient; |
---|
30 | |
---|
31 | typedef struct { |
---|
32 | GtkObjectClass parent; |
---|
33 | } BonoboPrintClientClass; |
---|
34 | |
---|
35 | /* FIXME: at the least, this should be opaque */ |
---|
36 | typedef struct { |
---|
37 | double width; |
---|
38 | double height; |
---|
39 | |
---|
40 | double width_first_page; |
---|
41 | double width_per_page; |
---|
42 | double height_first_page; |
---|
43 | double height_per_page; |
---|
44 | |
---|
45 | GnomePrintMeta *meta_data; |
---|
46 | } BonoboPrintData; |
---|
47 | |
---|
48 | GtkType bonobo_print_client_get_type (void); |
---|
49 | BonoboPrintClient *bonobo_print_client_new (Bonobo_Print corba_print); |
---|
50 | BonoboPrintClient *bonobo_print_client_get (BonoboObjectClient *object); |
---|
51 | |
---|
52 | void bonobo_print_client_render (BonoboPrintClient *client, |
---|
53 | BonoboPrintData *pd); |
---|
54 | |
---|
55 | BonoboPrintData *bonobo_print_data_new (double width, |
---|
56 | double height); |
---|
57 | |
---|
58 | BonoboPrintData *bonobo_print_data_new_full (double width, |
---|
59 | double height, |
---|
60 | double width_first_page, |
---|
61 | double width_per_page, |
---|
62 | double height_first_page, |
---|
63 | double height_per_page); |
---|
64 | |
---|
65 | void bonobo_print_data_free (BonoboPrintData *pd); |
---|
66 | |
---|
67 | GnomePrintMeta *bonobo_print_data_get_meta (BonoboPrintData *pd); |
---|
68 | void bonobo_print_data_render (GnomePrintContext *pc, |
---|
69 | double x, |
---|
70 | double y, |
---|
71 | BonoboPrintData *pd, |
---|
72 | double meta_x, |
---|
73 | double meta_y); |
---|
74 | |
---|
75 | END_GNOME_DECLS |
---|
76 | |
---|
77 | #endif /* ! ___BONOBO_PRINT_CLIENT_H__ */ |
---|