Re: How do I test my custom GtkPrintBackend ?
- Date: Tue, 23 May 2017 01:03:43 +0200 (CEST)
- From: Rafal Luzynski <digitalfreak@xxxxxxxxxxxxxxxxx>
- Subject: Re: How do I test my custom GtkPrintBackend ?
21.05.2017 23:07 Nilanjana Lodh <nilanjanalodh@xxxxxxxxx> wrote:
> I am trying to develop my own GtkPrintBackend ,
> taking help from here:
Note that this tutorial has been written for GTK+ 2.x
series and things may work differently in GTK+ 3.x and
soon coming GTK+ 4.x.
> But, I now want to test my print backend( by making the print dialog use my
> backend instead). How do I do that?
> That is , how do I make the Print dialog use my backend instead?
It's been a while since I was working with print backends
so my memory may be incomplete or outdated. But as far
as I remember there is no such thing as "use this print
backend instead of that". All print backends work in parallel,
or more precisely: are available concurrently and loaded
and called by the framework as needed. All you have to do
is to implement the backend, install it, and make it provide
at least one printer. As soon as you do it correctly you
can run any GTK application, open the default print dialog,
and select a printer provided by your backend. Of course
you can disable (e.g., uninstall) other backends if you
have a good reason but most probably you don't need it.
You did not write more details like whether your backend
supports physical or virtual printers, and whether these
printers are already supported by other backends. You may
want to avoid conflicts and make sure it's your backend
running rather than another one which supports the same
printer, or to avoid wasting physical resources like real
paper or lots of electrical energy.
However, do not hesitate to ask if you have more questions.
gtk-list mailing list