printer: Make private

We want to subclass this in print backends,
but we don't want to allow out-of-tree subclassing.
This commit is contained in:
Matthias Clasen 2019-05-26 20:35:55 +00:00
parent cb2369bf70
commit 9422973c2a
2 changed files with 24 additions and 35 deletions

View File

@ -73,43 +73,10 @@ GType gtk_print_capabilities_get_type (void) G_GNUC_CONST;
#define GTK_TYPE_PRINTER (gtk_printer_get_type ())
#define GTK_PRINTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_PRINTER, GtkPrinter))
#define GTK_PRINTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_PRINTER, GtkPrinterClass))
#define GTK_IS_PRINTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_PRINTER))
#define GTK_IS_PRINTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_PRINTER))
#define GTK_PRINTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_PRINTER, GtkPrinterClass))
typedef struct _GtkPrinter GtkPrinter;
typedef struct _GtkPrinterClass GtkPrinterClass;
typedef struct _GtkPrinterPrivate GtkPrinterPrivate;
typedef struct _GtkPrintBackend GtkPrintBackend;
struct _GtkPrintBackend;
struct _GtkPrinter
{
GObject parent_instance;
/*< private >*/
GtkPrinterPrivate *priv;
};
struct _GtkPrinterClass
{
GObjectClass parent_class;
void (*details_acquired) (GtkPrinter *printer,
gboolean success);
/* Padding for future expansion */
void (*_gtk_reserved1) (void);
void (*_gtk_reserved2) (void);
void (*_gtk_reserved3) (void);
void (*_gtk_reserved4) (void);
void (*_gtk_reserved5) (void);
void (*_gtk_reserved6) (void);
void (*_gtk_reserved7) (void);
void (*_gtk_reserved8) (void);
};
typedef struct _GtkPrinter GtkPrinter;
typedef struct _GtkPrintBackend GtkPrintBackend;
GDK_AVAILABLE_IN_ALL
GType gtk_printer_get_type (void) G_GNUC_CONST;

View File

@ -25,6 +25,28 @@
G_BEGIN_DECLS
#define GTK_PRINTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_PRINTER, GtkPrinterClass))
#define GTK_IS_PRINTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_PRINTER))
#define GTK_PRINTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_PRINTER, GtkPrinterClass))
typedef struct _GtkPrinterClass GtkPrinterClass;
typedef struct _GtkPrinterPrivate GtkPrinterPrivate;
struct _GtkPrinter
{
GObject parent_instance;
GtkPrinterPrivate *priv;
};
struct _GtkPrinterClass
{
GObjectClass parent_class;
void (*details_acquired) (GtkPrinter *printer,
gboolean success);
};
GtkPrinterOptionSet *_gtk_printer_get_options (GtkPrinter *printer,
GtkPrintSettings *settings,
GtkPageSetup *page_setup,