Lines Matching defs:device

104   {"device-name", required_argument, NULL, 'd'},
106 {"formatted-device-list", required_argument, NULL, 'f'},
142 static SANE_Handle device;
163 static void fetch_options (SANE_Device * device);
328 if (device)
335 sane_cancel (device);
374 print_option (SANE_Device * device, int opt_num, const SANE_Option_Descriptor *opt)
568 sane_control_option (device, opt_num, SANE_ACTION_GET_VALUE, val,
894 fetch_options (SANE_Device * device)
901 opt = sane_get_option_descriptor (device, 0);
908 status = sane_control_option (device, 0, SANE_ACTION_GET_VALUE,
921 opt = sane_get_option_descriptor (device, i);
1007 sane_control_option (device, window[i],
1011 sane_control_option (device, window[i + 2],
1020 set_option (SANE_Handle device, int optnum, void *valuep)
1027 opt = sane_get_option_descriptor (device, optnum);
1047 status = sane_control_option (device, optnum, SANE_ACTION_SET_VALUE,
1068 fetch_options (device);
1072 process_backend_option (SANE_Handle device, int optnum, const char *optarg)
1082 opt = sane_get_option_descriptor (device, optnum);
1100 status = sane_control_option (device, optnum, SANE_ACTION_SET_AUTO,
1170 set_option (device, optnum, valuep);
1389 status = sane_start (device);
1393 status = sane_start (device);
1403 status = sane_get_parameters (device, &parm);
1544 status = sane_read (device, buffer, buffer_size, &len);
1879 status = sane_start (device);
1883 status = sane_start (device);
1893 status = sane_get_parameters (device, &parm);
1919 status = sane_read (device, image.data, parm.bytes_per_line, &len);
1926 status = sane_read (device, image.data, 1, &len);
1935 status = sane_read (device, image.data, i, &len);
1945 status = sane_read (device, image.data, i - 1, &len);
1952 sane_cancel (device);
1968 resopt = sane_get_option_descriptor (device, resolution_optind);
1976 sane_control_option (device, resolution_optind, SANE_ACTION_GET_VALUE, val,
1989 if (device)
1992 fprintf (stderr, "Closing device\n");
1993 sane_close (device);
2008 /** @brief print device options to stdout
2010 * @param device struct of the opened device to describe
2011 * @param num_dev_options number of device options
2014 static void print_options(SANE_Device * device, SANE_Int num_dev_options, SANE_Bool ro)
2029 opt = sane_get_option_descriptor (device, i);
2037 print_option (device, i, opt);
2252 printf ("device `%s' is a %s %s %s\n",
2341 printf ("default device is `%s'\n", defdevname);
2353 break; /* ignore device specific options for now */
2361 Start image acquisition on a scanner device and write image data to\n\
2365 -d epson) and by a \"=\" from multi-character options (e.g. --device-name=epson).\n\
2366 -d, --device-name=DEVICE use a given scanner device (e.g. hp:/dev/scanner)\n\
2371 -f, --formatted-device-list=FORMAT similar to -L, but the FORMAT of the output\n\
2372 can be specified: %%d (device name), %%v (vendor),\n\
2412 /* If no device name was specified explicitly, we look at the
2414 is not set, we open the first device we find (if any): */
2434 status = sane_open (devname, &device);
2437 fprintf (stderr, "%s: open of device %s failed: %s\n",
2440 fprintf (stderr, "\nYou seem to have specified a UNIX device name, "
2442 "image acquisition device you want to use. As an example,\n"
2448 device = 0;
2453 if (device)
2458 desc_ptr = sane_get_option_descriptor(device, 0);
2466 /* We got a device, find out how many options it has */
2467 status = sane_control_option (device, 0, SANE_ACTION_GET_VALUE,
2489 fetch_options (device);
2561 process_backend_option (device, window[2], optarg);
2565 process_backend_option (device, window[3], optarg);
2569 process_backend_option (device, option_number[index], optarg);
2592 sane_control_option (device, window[index + 2],
2596 set_option (device, window[index], &val);
2599 /* output device-specific help */
2602 printf ("\nOptions specific to device `%s':\n", devname);
2603 print_options(device, num_dev_options, SANE_FALSE);
2606 /* list all device-specific options */
2609 printf ("\nAll options specific to device `%s':\n", devname);
2610 print_options(device, num_dev_options, SANE_TRUE);
2615 /* output device list */
2780 status = sane_start (device);
2784 status = sane_start (device);
2823 sane_cancel (device);
2865 sane_cancel (device);
2876 sane_cancel (device);
2966 sane_cancel (device);