1
/* GTK - The GIMP Toolkit
2
* gtkprinteroption.h: printer option
3
* Copyright (C) 2006, Red Hat, Inc.
5
* This library is free software; you can redistribute it and/or
6
* modify it under the terms of the GNU Lesser General Public
7
* License as published by the Free Software Foundation; either
8
* version 2 of the License, or (at your option) any later version.
10
* This library is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
* Lesser General Public License for more details.
15
* You should have received a copy of the GNU Lesser General Public
16
* License along with this library; if not, write to the
17
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18
* Boston, MA 02111-1307, USA.
21
#ifndef __GTK_PRINTER_OPTION_H__
22
#define __GTK_PRINTER_OPTION_H__
24
/* This is a "semi-private" header; it is meant only for
25
* alternate GtkPrintDialog backend modules; no stability guarantees
26
* are made at this point
28
#ifndef GTK_PRINT_BACKEND_ENABLE_UNSUPPORTED
29
#error "GtkPrintBackend is not supported API for general use"
32
#include <glib-object.h>
36
#define GTK_TYPE_PRINTER_OPTION (gtk_printer_option_get_type ())
37
#define GTK_PRINTER_OPTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_PRINTER_OPTION, GtkPrinterOption))
38
#define GTK_IS_PRINTER_OPTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_PRINTER_OPTION))
40
typedef struct _GtkPrinterOption GtkPrinterOption;
41
typedef struct _GtkPrinterOptionClass GtkPrinterOptionClass;
43
#define GTK_PRINTER_OPTION_GROUP_IMAGE_QUALITY "ImageQuality"
44
#define GTK_PRINTER_OPTION_GROUP_FINISHING "Finishing"
47
GTK_PRINTER_OPTION_TYPE_BOOLEAN,
48
GTK_PRINTER_OPTION_TYPE_PICKONE,
49
GTK_PRINTER_OPTION_TYPE_PICKONE_PASSWORD,
50
GTK_PRINTER_OPTION_TYPE_PICKONE_PASSCODE,
51
GTK_PRINTER_OPTION_TYPE_PICKONE_REAL,
52
GTK_PRINTER_OPTION_TYPE_PICKONE_INT,
53
GTK_PRINTER_OPTION_TYPE_PICKONE_STRING,
54
GTK_PRINTER_OPTION_TYPE_ALTERNATIVE,
55
GTK_PRINTER_OPTION_TYPE_STRING,
56
GTK_PRINTER_OPTION_TYPE_FILESAVE
57
} GtkPrinterOptionType;
59
struct _GtkPrinterOption
61
GObject parent_instance;
65
GtkPrinterOptionType type;
71
char **choices_display;
73
gboolean has_conflict;
77
struct _GtkPrinterOptionClass
79
GObjectClass parent_class;
81
void (*changed) (GtkPrinterOption *option);
83
/* Padding for future expansion */
84
void (*_gtk_reserved1) (void);
85
void (*_gtk_reserved2) (void);
86
void (*_gtk_reserved3) (void);
87
void (*_gtk_reserved4) (void);
88
void (*_gtk_reserved5) (void);
89
void (*_gtk_reserved6) (void);
90
void (*_gtk_reserved7) (void);
93
GType gtk_printer_option_get_type (void) G_GNUC_CONST;
95
GtkPrinterOption *gtk_printer_option_new (const char *name,
96
const char *display_text,
97
GtkPrinterOptionType type);
98
void gtk_printer_option_set (GtkPrinterOption *option,
100
void gtk_printer_option_set_has_conflict (GtkPrinterOption *option,
101
gboolean has_conflict);
102
void gtk_printer_option_clear_has_conflict (GtkPrinterOption *option);
103
void gtk_printer_option_set_boolean (GtkPrinterOption *option,
105
void gtk_printer_option_allocate_choices (GtkPrinterOption *option,
107
void gtk_printer_option_choices_from_array (GtkPrinterOption *option,
110
char *choices_display[]);
111
gboolean gtk_printer_option_has_choice (GtkPrinterOption *option,
117
#endif /* __GTK_PRINTER_OPTION_H__ */