1 /* sane - Scanner Access Now Easy. 2 Copyright (C) 1997 Geoffrey T. Dairiki 3 This file is part of the SANE package. 4 5 This program is free software; you can redistribute it and/or 6 modify it under the terms of the GNU General Public License as 7 published by the Free Software Foundation; either version 2 of the 8 License, or (at your option) any later version. 9 10 This program is distributed in the hope that it will be useful, but 11 WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 General Public License for more details. 14 15 You should have received a copy of the GNU General Public License 16 along with this program. If not, see <https://www.gnu.org/licenses/>. 17 18 As a special exception, the authors of SANE give permission for 19 additional uses of the libraries contained in this release of SANE. 20 21 The exception is that, if you link a SANE library with other files 22 to produce an executable, this does not by itself cause the 23 resulting executable to be covered by the GNU General Public 24 License. Your use of that executable is in no way restricted on 25 account of linking the SANE library code into it. 26 27 This exception does not, however, invalidate any other reasons why 28 the executable file might be covered by the GNU General Public 29 License. 30 31 If you submit changes to SANE to the maintainers to be included in 32 a subsequent release, you agree by submitting the changes that 33 those changes may be distributed with this exception intact. 34 35 If you write modifications of your own for SANE, it is your choice 36 whether to permit this exception to apply to your modifications. 37 If you do not wish that, delete this exception notice. 38 39 This file is part of a SANE backend for HP Scanners supporting 40 HP Scanner Control Language (SCL). 41 */ 42 43 #ifndef HP_ACCESSOR_H_INCLUDED 44 #define HP_ACCESSOR_H_INCLUDED 45 #include "hp.h" 46 47 HpData sanei_hp_data_new (void); 48 HpData sanei_hp_data_dup (HpData orig); 49 void sanei_hp_data_destroy (HpData this); 50 51 HpAccessor sanei_hp_accessor_new (HpData data, size_t size); 52 HpAccessor sanei_hp_accessor_int_new (HpData data); 53 HpAccessor sanei_hp_accessor_bool_new (HpData data); 54 HpAccessor sanei_hp_accessor_fixed_new (HpData data); 55 HpAccessor sanei_hp_accessor_choice_new(HpData data, HpChoice choices, 56 hp_bool_t may_change); 57 HpAccessor sanei_hp_accessor_vector_new(HpData data, 58 unsigned length, unsigned depth); 59 HpAccessor sanei_hp_accessor_gamma_vector_new(HpData data, 60 unsigned length, unsigned depth); 61 HpAccessor sanei_hp_accessor_matrix_vector_new(HpData data, 62 unsigned length, unsigned depth); 63 HpAccessor sanei_hp_accessor_subvector_new(HpAccessorVector super, 64 unsigned nchan, unsigned chan); 65 66 HpAccessor sanei_hp_accessor_geometry_new (HpAccessor val, HpAccessor lim, 67 hp_bool_t is_br, HpAccessor res); 68 69 SANE_Status sanei_hp_accessor_get (HpAccessor this, HpData data, void * valp); 70 SANE_Status sanei_hp_accessor_set (HpAccessor this, HpData data, void * valp); 71 int sanei_hp_accessor_getint(HpAccessor this, HpData data); 72 void sanei_hp_accessor_setint(HpAccessor this, HpData data, int v); 73 const void *sanei_hp_accessor_data (HpAccessor this, HpData data); 74 void * sanei__hp_accessor_data (HpAccessor this, HpData data); 75 size_t sanei_hp_accessor_size (HpAccessor this); 76 77 unsigned sanei_hp_accessor_vector_length (HpAccessorVector this); 78 SANE_Fixed sanei_hp_accessor_vector_minval (HpAccessorVector this); 79 SANE_Fixed sanei_hp_accessor_vector_maxval (HpAccessorVector this); 80 81 SANE_Int sanei_hp_accessor_choice_maxsize (HpAccessorChoice this); 82 SANE_String_Const * 83 sanei_hp_accessor_choice_strlist (HpAccessorChoice this, HpOptSet optset, 84 HpData data, const HpDeviceInfo *info); 85 86 #endif /* HP_ACCESSOR_H_INCLUDED */ 87