Logo Search packages:      
Sourcecode: libgphoto2 version File versions  Download package

int gp_widget_count_choices ( CameraWidget widget  ) 

Counts the choices of the CameraWidget.

widget a CameraWidget of type GP_WIDGET_RADIO or GP_WIDGET_MENU
a gphoto2 error code or number of choices.

Definition at line 753 of file gphoto2-widget.c.

References CHECK_NULL, _CameraWidget::choice_count, GP_ERROR_BAD_PARAMETERS, GP_WIDGET_MENU, GP_WIDGET_RADIO, and _CameraWidget::type.

      CHECK_NULL (widget);
      if ((widget->type != GP_WIDGET_RADIO) &&
          (widget->type != GP_WIDGET_MENU))
            return (GP_ERROR_BAD_PARAMETERS);

      return (widget->choice_count);

Generated by  Doxygen 1.6.0   Back to index