65 { .
option =
"Auto", .description =
NLS_(
"Auto Select"), .value =
"AUTO", },
66 { .option =
"TRAY", .description =
NLS_(
"Tray"), .value =
"TRAY1", },
67 { .option =
"MANUAL", .description =
NLS_(
"Manual Feed"), .value =
"MANUAL", },
72 .option =
"InputSlot",
73 .description =
NLS_(
"Paper Source"),
74 .entry_count =
ARRAY_SIZE(hl20_input_tray_selections),
76 .entries = hl20_input_tray_selections,
86static __nonnull() void hl20_adapt_input_tray(struct brother_doc *info)
89 { .
keyword =
"DefaultInputSlot", .value = NULL, },
90 { .keyword =
"InputSlot", .name = NULL, .description =
NLS_(
"Paper Source"), .value = NULL, },
92 const char *input_slot, *default_input_slot;
95 input_slot = hl_setup_value_get(info->instance,
"paper",
"type");
96 if (input_slot != NULL) {
105 caps_print_warn(
_(
"Unknown paper type '%s', falling back to '%s'\n"), paper_type, hl20_paper_type_selections[idx].option);
110 one_type_only[0].
value = hl20_paper_type_selections[idx].option;
111 one_type_only[1].
name = hl20_paper_type_selections[idx].option;
112 one_type_only[1].
value = hl20_paper_type_selections[idx].value;
123 default_paper_type = hl_setup_value_get(info->instance,
"paper",
"default_type");
124 if (default_paper_type == NULL) {
132 caps_print_warn(
_(
"Unknown paper type '%s', falling back to '%s'\n"), default_paper_type, hl20_paper_type_selections[0].option);
137 hl20_media_type_selection.default_entry = (size_t)idx;
#define __nonnull(params)
Definition: libcapsbase.h:84
#define caps_print_noisy(fmt,...)
Definition: libcapsbase.h:284
#define caps_print_warn(fmt,...)
Definition: libcapsbase.h:260
#define caps_assert(expr)
Assert the given expression is true, else terminate the program.
Definition: libcapsbase.h:602
@ LIBCAPS_OT_PICKONE
Definition: libcapsppd.h:282
void hl_options_add(struct ppd_option_add *o, size_t entries, struct caps_ppd_option option[entries])
Definition: hl-series.c:44
ssize_t hl_selection_entry_get(size_t selection_cnt, const struct caps_ppd_selection_entry selection_list[selection_cnt], const char *entry)
Definition: hl-series.c:55
void hl_feature_selection_add(struct ppd_feature_add *f, struct caps_ppd_selection *s)
Definition: hl-series.c:36
#define NLS_(string)
National Language Support related.
Definition: libcapsbase-local.h:61
#define ARRAY_SIZE(x)
Definition: libcapsbase-local.h:37
#define _(string)
National Language Support related.
Definition: libcapsbase-local.h:54
static struct caps_ppd_selection drv_spl2_media_type_selection
Definition: samsung-spl2-ml-1640-2240.c:141
Structure to keep the information read-in from an external PPD files.
Definition: libcapsppd-api.h:151
const char * keyword
Definition: libcapsppd-api.h:152
const char * value
Definition: libcapsppd-api.h:158
const char * name
Definition: libcapsppd-api.h:154
Definition of one 'option' entry a PPD selection provides.
Definition: libcapsppd.h:292
const char * option
Definition: libcapsppd.h:293
Description of an OpenUI/CloseUI PPD selection.
Definition: libcapsppd.h:303
enum caps_ppd_option_type option_type
Definition: libcapsppd.h:304
size_t default_entry
Definition: libcapsppd.h:308