File: bonobo-print-client.h

package info (click to toggle)
bonobo 1.0.22-2.2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 13,412 kB
  • ctags: 5,445
  • sloc: ansic: 51,714; sh: 7,733; makefile: 1,425; yacc: 318; xml: 266; sed: 16
file content (77 lines) | stat: -rw-r--r-- 2,664 bytes parent folder | download | duplicates (2)
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
68
69
70
71
72
73
74
75
76
77
/**
 * bonobo-print-client.h: a print client interface for compound documents.
 *
 * Author:
 *    Michael Meeks (mmeeks@gnu.org)
 *
 * Copyright 2000, Helix Code, Inc.
 */
#ifndef __BONOBO_PRINT_CLIENT_H__
#define __BONOBO_PRINT_CLIENT_H__

#include <stdarg.h>
#include <libgnome/gnome-defs.h>
#include <bonobo/bonobo-object-client.h>
#include <bonobo/bonobo-print.h>
#include <libgnomeprint/gnome-print.h>

BEGIN_GNOME_DECLS

#define BONOBO_PRINT_CLIENT_TYPE        (bonobo_print_client_get_type ())
#define BONOBO_PRINT_CLIENT(o)          (GTK_CHECK_CAST ((o), BONOBO_PRINT_CLIENT_TYPE, BonoboPrintClient))
#define BONOBO_PRINT_CLIENT_CLASS(k)    (GTK_CHECK_CLASS_CAST((k), BONOBO_PRINT_CLIENT_TYPE, BonoboPrintClientClass))
#define BONOBO_IS_PRINT_CLIENT(o)       (GTK_CHECK_TYPE ((o), BONOBO_PRINT_CLIENT_TYPE))
#define BONOBO_IS_PRINT_CLIENT_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), BONOBO_PRINT_CLIENT_TYPE))

typedef struct {
	GtkObject    parent;
	Bonobo_Print corba_print;
} BonoboPrintClient;

typedef struct {
	GtkObjectClass			parent;
} BonoboPrintClientClass;

/* FIXME: at the least, this should be opaque */
typedef struct {
	double width;
	double height;
	
	double width_first_page;
	double width_per_page;
	double height_first_page;
	double height_per_page;

	GnomePrintMeta *meta_data;
} BonoboPrintData;

GtkType             bonobo_print_client_get_type           (void);
BonoboPrintClient  *bonobo_print_client_new                (Bonobo_Print         corba_print);
BonoboPrintClient  *bonobo_print_client_get                (BonoboObjectClient  *object);

void                bonobo_print_client_render             (BonoboPrintClient   *client,
							    BonoboPrintData     *pd);

BonoboPrintData    *bonobo_print_data_new                  (double               width,
							    double               height);

BonoboPrintData    *bonobo_print_data_new_full             (double               width,
							    double               height,
							    double               width_first_page,
							    double               width_per_page,
							    double               height_first_page,
							    double               height_per_page);

void                bonobo_print_data_free                 (BonoboPrintData     *pd);

GnomePrintMeta     *bonobo_print_data_get_meta             (BonoboPrintData     *pd);
void                bonobo_print_data_render               (GnomePrintContext   *pc,
							    double               x,
							    double               y,
							    BonoboPrintData     *pd,
							    double               meta_x,
							    double               meta_y);

END_GNOME_DECLS

#endif /* ! ___BONOBO_PRINT_CLIENT_H__ */