Lines Matching refs:option

12    License, or (at your option) any later version.
422 "return a height of -1. Setting this option allows one "
424 "correctly. This option also enables a fixed width "
540 "bit modes. This option can be used to test the 16 "
693 "different SANE option types.");
798 SANE_I18N ("(1/6) Bool test option that has soft select and soft "
800 "normal bool option.");
816 SANE_I18N ("(2/6) Bool test option that has hard select and soft "
818 "option can't be set by the frontend but by the user "
834 od->desc = SANE_I18N ("(3/6) Bool test option that has hard select "
835 "(and advanced) capabilities. That means the option "
853 od->desc = SANE_I18N ("(4/6) Bool test option that has soft detect "
854 "(and advanced) capabilities. That means the option "
870 od->desc = SANE_I18N ("(5/6) Bool test option that has soft select, soft "
887 od->desc = SANE_I18N ("(6/6) Bool test option that has soft select, soft "
889 "This option can be automatically set by the backend.");
918 od->desc = SANE_I18N ("(1/7) Int test option with no unit and no "
934 od->desc = SANE_I18N ("(2/7) Int test option with unit pixel and "
951 od->desc = SANE_I18N ("(3/7) Int test option with unit bits and "
967 od->desc = SANE_I18N ("(4/7) Int test option with unit mm and using "
983 od->desc = SANE_I18N ("(5/7) Int test option with unit dpi and using "
1001 od->desc = SANE_I18N ("(6/7) Int test option with unit percent and using "
1018 od->desc = SANE_I18N ("(7/7) Int test option that modifies the value "
1105 od->desc = SANE_I18N ("(1/3) Fixed test option with no unit and no "
1121 od->desc = SANE_I18N ("(2/3) Fixed test option with unit microsecond and "
1138 od->desc = SANE_I18N ("(3/3) Fixed test option with no unit and "
1167 od->desc = SANE_I18N ("(1/3) String test option without constraint.");
1185 od->desc = SANE_I18N ("(2/3) String test option with string list "
1205 od->desc = SANE_I18N ("(3/3) String test option with string list "
1239 od->desc = SANE_I18N ("(1/1) Button test option. Prints some text...");
1324 DBG (3, "read_option: option `%s' requires parameter\n",
1330 DBG (3, "read_option: option `%s' requires parameter "
1338 DBG (3, "read_option: set option `%s' to %s\n", option_string,
1353 DBG (3, "read_option: option `%s' requires parameter\n",
1359 DBG (3, "read_option: option `%s': can't parse parameter `%s' "
1365 DBG (3, "read_option: set option `%s' to %d\n", option_string,
1383 DBG (3, "read_option: option `%s' requires parameter\n",
1389 DBG (3, "read_option: option `%s': can't parse parameter `%s' "
1395 DBG (3, "read_option: set option `%s' to %.0f\n", option_string,
1409 DBG (3, "read_option: option `%s' requires parameter\n",
1415 DBG (3, "read_option: set option `%s' to `%s'\n", option_string,
1694 init_string = strdup ("This is the contents of the string option. "
1830 DBG (3, "sane-init: I don't know how to handle option `%s'\n",
2054 sane_get_option_descriptor (SANE_Handle handle, SANE_Int option)
2058 DBG (4, "sane_get_option_descriptor: handle=%p, option = %d\n",
2059 (void *) handle, option);
2078 if (option < 0 || option >= num_options)
2080 DBG (3, "sane_get_option_descriptor: option < 0 || "
2081 "option > num_options\n");
2085 test_device->loaded[option] = 1;
2087 return &test_device->opt[option];
2091 sane_control_option (SANE_Handle handle, SANE_Int option, SANE_Action action,
2099 (void *) handle, option, action, (void *) value, (void *) info);
2121 if (option < 0 || option >= num_options)
2123 DBG (1, "sane_control_option: option < 0 || option > num_options\n");
2127 if (!test_device->loaded[option])
2129 DBG (1, "sane_control_option: option not loaded\n");
2133 if (!SANE_OPTION_IS_ACTIVE (test_device->opt[option].cap))
2135 DBG (1, "sane_control_option: option is inactive\n");
2139 if (test_device->opt[option].type == SANE_TYPE_GROUP)
2141 DBG (1, "sane_control_option: option is a group\n");
2148 if (!SANE_OPTION_IS_SETTABLE (test_device->opt[option].cap))
2150 DBG (1, "sane_control_option: option is not setable\n");
2153 if (!(test_device->opt[option].cap & SANE_CAP_AUTOMATIC))
2155 DBG (1, "sane_control_option: option is not automatically "
2159 switch (option)
2162 test_device->val[option].w = SANE_TRUE;
2163 DBG (4, "sane_control_option: set option %d (%s) automatically "
2164 "to %s\n", option, test_device->opt[option].name,
2165 test_device->val[option].w == SANE_TRUE ? "true" : "false");
2170 "unexpected option\n");
2176 if (!SANE_OPTION_IS_SETTABLE (test_device->opt[option].cap))
2178 DBG (1, "sane_control_option: option is not setable\n");
2181 status = sanei_constrain_value (&test_device->opt[option],
2189 switch (option)
2196 if (test_device->val[option].w == *(SANE_Fixed *) value)
2198 DBG (4, "sane_control_option: option %d (%s) not changed\n",
2199 option, test_device->opt[option].name);
2202 test_device->val[option].w = *(SANE_Fixed *) value;
2204 DBG (4, "sane_control_option: set option %d (%s) to %.0f %s\n",
2205 option, test_device->opt[option].name,
2207 test_device->opt[option].unit == SANE_UNIT_MM ? "mm" : "dpi");
2211 if (test_device->val[option].w == *(SANE_Fixed *) value)
2213 DBG (4, "sane_control_option: option %d (%s) not changed\n",
2214 option, test_device->opt[option].name);
2217 test_device->val[option].w = *(SANE_Fixed *) value;
2218 DBG (4, "sane_control_option: set option %d (%s) to %.0f\n",
2219 option, test_device->opt[option].name,
2227 if (test_device->val[option].w == *(SANE_Int *) value)
2229 DBG (4, "sane_control_option: option %d (%s) not changed\n",
2230 option, test_device->opt[option].name);
2233 test_device->val[option].w = *(SANE_Int *) value;
2234 DBG (4, "sane_control_option: set option %d (%s) to %d\n",
2235 option, test_device->opt[option].name, *(SANE_Int *) value);
2238 if (test_device->val[option].w == *(SANE_Int *) value)
2240 DBG (4, "sane_control_option: option %d (%s) not changed\n",
2241 option, test_device->opt[option].name);
2245 test_device->val[option].w = *(SANE_Int *) value;
2247 DBG (4, "sane_control_option: set option %d (%s) to %d\n",
2248 option, test_device->opt[option].name, *(SANE_Int *) value);
2251 if (test_device->val[option].w == *(SANE_Bool *) value)
2253 DBG (4, "sane_control_option: option %d (%s) not changed\n",
2254 option, test_device->opt[option].name);
2257 test_device->val[option].w = *(SANE_Bool *) value;
2259 DBG (4, "sane_control_option: set option %d (%s) to %s\n",
2260 option, test_device->opt[option].name,
2269 if (test_device->val[option].w == *(SANE_Bool *) value)
2271 DBG (4, "sane_control_option: option %d (%s) not changed\n",
2272 option, test_device->opt[option].name);
2275 test_device->val[option].w = *(SANE_Bool *) value;
2276 DBG (4, "sane_control_option: set option %d (%s) to %s\n",
2277 option, test_device->opt[option].name,
2281 if (test_device->val[option].w == *(SANE_Int *) value)
2283 DBG (4, "sane_control_option: option %d (%s) not changed\n",
2284 option, test_device->opt[option].name);
2287 test_device->val[option].w = *(SANE_Int *) value;
2288 if (test_device->val[option].w == 16)
2295 DBG (4, "sane_control_option: set option %d (%s) to %d\n",
2296 option, test_device->opt[option].name, *(SANE_Int *) value);
2299 if (strcmp (test_device->val[option].s, value) == 0)
2301 DBG (4, "sane_control_option: option %d (%s) not changed\n",
2302 option, test_device->opt[option].name);
2305 strcpy (test_device->val[option].s, (SANE_String) value);
2307 DBG (4, "sane_control_option: set option %d (%s) to %s\n",
2308 option, test_device->opt[option].name, (SANE_String) value);
2312 if (test_device->val[option].w == *(SANE_Int *) value)
2314 DBG (4, "sane_control_option: option %d (%s) not changed\n",
2315 option, test_device->opt[option].name);
2318 test_device->val[option].w = *(SANE_Int *) value;
2319 DBG (4, "sane_control_option: set option %d (%s) to %d\n",
2320 option, test_device->opt[option].name, *(SANE_Int *) value);
2328 if (strcmp (test_device->val[option].s, value) == 0)
2330 DBG (4, "sane_control_option: option %d (%s) not changed\n",
2331 option, test_device->opt[option].name);
2334 strcpy (test_device->val[option].s, (SANE_String) value);
2335 DBG (4, "sane_control_option: set option %d (%s) to `%s'\n",
2336 option, test_device->opt[option].name, (SANE_String) value);
2345 memcpy (test_device->val[option].wa, value,
2346 (size_t) test_device->opt[option].size);
2347 DBG (4, "sane_control_option: set option %d (%s) to %p\n",
2348 option, test_device->opt[option].name, (void *) value);
2349 if (option == opt_gamma_all) {
2352 if (option == opt_gamma_red) {
2358 DBG (4, "sane_control_option: set option %d (%s)\n",
2359 option, test_device->opt[option].name);
2364 DBG (4, "sane_control_option: set option %d (%s)\n",
2365 option, test_device->opt[option].name);
2368 if (strcmp (test_device->val[option].s, value) == 0)
2370 DBG (4, "sane_control_option: option %d (%s) not changed\n",
2371 option, test_device->opt[option].name);
2374 strcpy (test_device->val[option].s, (SANE_String) value);
2377 if (strcmp (test_device->val[option].s, SANE_VALUE_SCAN_MODE_COLOR) == 0)
2389 DBG (4, "sane_control_option: set option %d (%s) to %s\n",
2390 option, test_device->opt[option].name, (SANE_String) value);
2393 if (test_device->val[option].w == *(SANE_Bool *) value)
2395 DBG (4, "sane_control_option: option %d (%s) not changed\n",
2396 option, test_device->opt[option].name);
2399 test_device->val[option].w = *(SANE_Bool *) value;
2402 if (test_device->val[option].w == SANE_TRUE)
2406 DBG (4, "sane_control_option: set option %d (%s) to %s\n",
2407 option, test_device->opt[option].name,
2411 if (test_device->val[option].w == *(SANE_Bool *) value)
2413 DBG (4, "sane_control_option: option %d (%s) not changed\n",
2414 option, test_device->opt[option].name);
2417 test_device->val[option].w = *(SANE_Bool *) value;
2420 if (test_device->val[option].w == SANE_TRUE)
2434 DBG (4, "sane_control_option: set option %d (%s) to %s\n",
2435 option, test_device->opt[option].name,
2439 if (test_device->val[option].w == *(SANE_Bool *) value)
2441 DBG (4, "sane_control_option: option %d (%s) not changed\n",
2442 option, test_device->opt[option].name);
2445 test_device->val[option].w = *(SANE_Bool *) value;
2447 if (test_device->val[option].w == SANE_TRUE)
2451 DBG (4, "sane_control_option: set option %d (%s) to %s\n",
2452 option, test_device->opt[option].name,
2456 if (test_device->val[option].w == *(SANE_Bool *) value)
2458 DBG (4, "sane_control_option: option %d (%s) not changed\n",
2459 option, test_device->opt[option].name);
2462 test_device->val[option].w = *(SANE_Bool *) value;
2464 if (test_device->val[option].w == SANE_TRUE)
2470 DBG (4, "sane_control_option: set option %d (%s) to %s\n", option,
2471 test_device->opt[option].name,
2477 if (test_device->val[option].w == *(SANE_Bool *) value)
2479 DBG (4, "sane_control_option: option %d (%s) not changed\n",
2480 option, test_device->opt[option].name);
2483 test_device->val[option].w = *(SANE_Bool *) value;
2490 if (test_device->val[option].w == SANE_TRUE)
2495 DBG (4, "sane_control_option: set option %d (%s) to %s\n",
2496 option, test_device->opt[option].name,
2501 DBG (1, "sane_control_option: trying to set unexpected option\n");
2507 switch (option)
2511 DBG (4, "sane_control_option: get option 0, value = %d\n",
2523 *(SANE_Fixed *) value = test_device->val[option].w;
2525 "sane_control_option: get option %d (%s), value=%.1f %s\n",
2526 option, test_device->opt[option].name,
2528 test_device->opt[option].unit ==
2546 *(SANE_Bool *) value = test_device->val[option].w;
2548 "sane_control_option: get option %d (%s), value=%s\n",
2549 option, test_device->opt[option].name,
2560 strcpy (value, test_device->val[option].s);
2561 DBG (4, "sane_control_option: get option %d (%s), value=`%s'\n",
2562 option, test_device->opt[option].name, (SANE_String) value);
2572 *(SANE_Int *) value = test_device->val[option].w;
2573 DBG (4, "sane_control_option: get option %d (%s), value=%d\n",
2574 option, test_device->opt[option].name, *(SANE_Int *) value);
2583 memcpy (value, test_device->val[option].wa,
2584 (size_t) test_device->opt[option].size);
2585 DBG (4, "sane_control_option: get option %d (%s), value=%p\n",
2586 option, test_device->opt[option].name, (void *) value);
2589 DBG (1, "sane_control_option: trying to get unexpected option\n");