File: MSWin32.pm

package info (click to toggle)
libgtk2-ex-printdialog-perl 0.03-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, squeeze, stretch, wheezy
  • size: 116 kB
  • ctags: 58
  • sloc: perl: 414; makefile: 2
file content (65 lines) | stat: -rw-r--r-- 1,250 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
# $Id: MSWin32.pm,v 1.1 2005/10/05 14:15:06 jodrell Exp $
# Copyright (c) 2005 Gavin Brown. All rights reserved. This program is free
# software; you can redistribute it and/or modify it under the same terms as
# Perl itself.
package Gtk2::Ex::PrintDialog::MSWin32;
use Win32::Printer;
use Printer;
use strict;

sub new {
	my $self = bless({}, shift);
	$self->{prn} = Printer->new;     
	return $self;
}

sub get_printers {
	my $self = shift;
	use Data::Dumper;
	my %data = $self->{prn}->list_printers;
	return @{$data{name}};
}

sub print_file {
	my ($self, $printer, $file) = @_;
}

sub get_default_print_command {
	my $self = shift;
	return '';
}

sub can_print_pdf {
	return undef;
}

sub print_to_pdf {
	my ($self, $data, $file) = @_;
	return undef;
}

1;

__END__

=pod

=head1 NAME

Gtk2::Ex::PrintDialog::MSWin32 - generic Windows backend for L<Gtk2::Ex::PrintDialog>

=head1 DESCRIPTION

This module is a printing backend for L<Gtk2::Ex::PrintDialog>. You should
never need to access it directly.

=head1 AUTHOR

Gavin Brown (gavin dot brown at uk dot com)  

=head1 COPYRIGHT

(c) 2005 Gavin Brown. All rights reserved. This program is free software; you
can redistribute it and/or modify it under the same terms as Perl itself.     

=cut