gtk/modules/printbackends/gtkprintbackendcpdb.h
tinytrebuchet 41b60bbd6c New CPDB print backend for GTK Print Dialog
The Common Print Dialog Backends (CPDB) concept has GUI-toolkit-independent
backends for each print technology (CUPS, Print to File, cloud printing
services, ...) and each print dialog (GTK, Qt, Chromium, ...) is supposed
to use this backend, so that changes in print technologies can be centrally
and quickly covered by changing the backends and everything new gets available
in all print dialogs.

This commit provides a GTK print dialog backend to add support for the CPDB
concept. It communicates with all installed CPDB backends and so gives support
for all these print technologies to the GTK print dialog.

To make use of CPDB the GTK print dialog is supposed to be installed with this
backend and the 'Print To File' backend, and not any others to prevent printer
duplication.
2023-02-11 01:13:48 +05:30

44 lines
1.7 KiB
C

/* GTK - The GIMP Toolkit
* gtkprintbackendcpdb.h: Default implementation of GtkPrintBackend
* for the Common Print Dialog Backends (CPDB)
* Copyright (C) 2022, 2023 TinyTrebuchet <tinytrebuchet@protonmail.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __GTK_PRINT_BACKEND_CPDB_H__
#define __GTK_PRINT_BACKEND_CPDB_H__
#include <glib-object.h>
#include <gtk/gtk.h>
#include "gtkprintbackendprivate.h"
G_BEGIN_DECLS
#define GTK_TYPE_PRINT_BACKEND_CPDB (gtk_print_backend_cpdb_get_type ())
#define GTK_PRINT_BACKEND_CPDB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_PRINT_BACKEND_CPDB, GtkPrintBackendCpdb))
#define GTK_IS_PRINT_BACKEND_CPDB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_PRINT_BACKEND_CPDB))
typedef struct _GtkPrintBackendCpdbClass GtkPrintBackendCpdbClass;
typedef struct _GtkPrintBackendCpdb GtkPrintBackendCpdb;
GtkPrintBackend *gtk_print_backend_cpdb_new (void);
GType gtk_print_backend_cpdb_get_type (void) G_GNUC_CONST;
G_END_DECLS
#endif /* __GTK_PRINT_BACKEND_CPDB_H__ */