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

int gp_widget_get_child_by_id ( CameraWidget widget,
int  id,
CameraWidget **  child 

Retrieves the child with id id of the widget.

widget a CameraWidget
id the id of the child
a gphoto2 error code.

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

References CHECK_NULL, _CameraWidget::children, _CameraWidget::children_count, GP_ERROR_BAD_PARAMETERS, GP_OK, gp_widget_get_child_by_id(), and _CameraWidget::id.

Referenced by gp_widget_get_child_by_id().

      int x;

      CHECK_NULL (widget && child);

      if (widget->id == id) {
            *child = widget;
            return (GP_OK);
      for (x = 0; x < widget->children_count; x++) {
            int result;
            CameraWidget *child_rec;
            result = gp_widget_get_child_by_id (widget->children[x], id, 
            if (result == GP_OK) {
                  *child = child_rec;
                  return (GP_OK);


Generated by  Doxygen 1.6.0   Back to index