Re: How do I test my custom GtkPrintBackend ?



Hi Rafal,
Thanks for the help!
I am trying to develop an alternative CUPS backend  using the new CUPS API - so it is going to list all the CUPS printers as well as the IPP printers;
Also, is there a way I can test my backend without installing it (to avoid messing with my system)- Is using JHBuild an option?

Thanks and regards,

Nilanjana.
Inline image 1
NILANJANA LODH
CS Undergrad 
@ IIEST, Shibpur

On Tue, May 23, 2017 at 4:33 AM, Rafal Luzynski <digitalfreak@lingonborough.com> wrote:
21.05.2017 23:07 Nilanjana Lodh <nilanjanalodh gmail com> wrote:
>
>  I am trying to develop my own GtkPrintBackend ,
>  taking help from here:
>
> https://mail.gnome.org/archives/desktop-devel-list/2006-December/msg00069.html

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.

Regards,

Rafal



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]