Lines Matching refs:wbuf

108   struct ricoh_window_data wbuf;
203 memset (&wbuf, 0, sizeof (wbuf));
204 status = get_window (fd, &wbuf);
239 dev->info.xres_default = _2btol(wbuf.x_res);
240 dev->info.yres_default = _2btol(wbuf.y_res);
241 dev->info.image_mode_default = wbuf.image_comp;
247 if (wbuf.image_comp == RICOH_GRAYSCALE || wbuf.image_comp == RICOH_DITHERED_MONOCHROME)
249 dev->info.brightness_default = 256 - wbuf.brightness;
251 dev->info.contrast_default = wbuf.contrast;
253 dev->info.contrast_default = 256 - wbuf.contrast;
255 else /* wbuf.image_comp == RICOH_BINARY_MONOCHROME */
257 dev->info.brightness_default = wbuf.brightness;
258 dev->info.contrast_default = wbuf.contrast;
798 struct ricoh_window_data wbuf;
840 memset (&wbuf, 0, sizeof (wbuf));
841 _lto2b(sizeof(wbuf) - 8, wbuf.len);
842 _lto2b(s->xres, wbuf.x_res);
843 _lto2b(s->yres, wbuf.y_res);
844 _lto4b(s->ulx, wbuf.x_org);
845 _lto4b(s->uly, wbuf.y_org);
846 _lto4b(s->width, wbuf.width);
847 _lto4b(s->length, wbuf.length);
849 wbuf.image_comp = s->image_composition;
852 if (wbuf.image_comp == RICOH_GRAYSCALE || wbuf.image_comp == RICOH_DITHERED_MONOCHROME)
854 if (wbuf.image_comp == RICOH_GRAYSCALE)
855 wbuf.mrif_filtering_gamma_id = (SANE_Byte) 0x90;
856 if (wbuf.image_comp == RICOH_DITHERED_MONOCHROME)
857 wbuf.mrif_filtering_gamma_id = (SANE_Byte) 0x10;
858 wbuf.brightness = 256 - (SANE_Byte) s->brightness;
860 wbuf.contrast = (SANE_Byte) s->contrast;
862 wbuf.contrast = 256 - (SANE_Byte) s->contrast;
864 else /* wbuf.image_comp == RICOH_BINARY_MONOCHROME */
866 wbuf.mrif_filtering_gamma_id = (SANE_Byte) 0x00;
867 wbuf.brightness = (SANE_Byte) s->brightness;
868 wbuf.contrast = (SANE_Byte) s->contrast;
871 wbuf.threshold = 0;
872 wbuf.bits_per_pixel = s->bpp;
874 wbuf.halftone_pattern[0] = 2;
875 wbuf.halftone_pattern[1] = 0;
876 wbuf.pad_type = 3;
877 wbuf.bit_ordering[0] = 0;
878 wbuf.bit_ordering[1] = 3;
880 DBG (5, "xres=%d\n", _2btol(wbuf.x_res));
881 DBG (5, "yres=%d\n", _2btol(wbuf.y_res));
882 DBG (5, "ulx=%d\n", _4btol(wbuf.x_org));
883 DBG (5, "uly=%d\n", _4btol(wbuf.y_org));
884 DBG (5, "width=%d\n", _4btol(wbuf.width));
885 DBG (5, "length=%d\n", _4btol(wbuf.length));
886 DBG (5, "image_comp=%d\n", wbuf.image_comp);
889 status = set_window (s->fd, &wbuf);
897 memset (&wbuf, 0, sizeof (wbuf));
898 status = get_window (s->fd, &wbuf);
904 DBG (5, "xres=%d\n", _2btol(wbuf.x_res));
905 DBG (5, "yres=%d\n", _2btol(wbuf.y_res));
906 DBG (5, "ulx=%d\n", _4btol(wbuf.x_org));
907 DBG (5, "uly=%d\n", _4btol(wbuf.y_org));
908 DBG (5, "width=%d\n", _4btol(wbuf.width));
909 DBG (5, "length=%d\n", _4btol(wbuf.length));
910 DBG (5, "image_comp=%d\n", wbuf.image_comp);