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

int gp_widget_get_child_by_name ( CameraWidget widget,
const char *  name,
CameraWidget **  child 
)

Retrieves the child with name name of the widget.

Parameters:
widgeta CameraWidget
namethe name of the child
Returns:
a gphoto2 error code.

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

References GP_ERROR_BAD_PARAMETERS, GP_OK, and gp_widget_get_child_by_name().

Referenced by gp_widget_get_child_by_name().

{
      int x;

      CHECK_NULL (widget && child);

      if (!strcmp (widget->name, name)) {
            *child = widget;
            return (GP_OK);
      }
      
      for (x = 0; x < widget->children_count; x++) {
            int result;
            CameraWidget *child_rec;
            
            result = gp_widget_get_child_by_name (widget->children[x], name,
                                          &child_rec);
            if (result == GP_OK) {
                  *child = child_rec;
                  return (GP_OK);
            }
      }

      return (GP_ERROR_BAD_PARAMETERS);
}

Here is the call graph for this function:

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index