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

int gp_widget_append ( CameraWidget widget,
CameraWidget child 
)

Appends a CameraWidget to a CameraWidget.

Parameters:
widget a CameraWidget
child the CameraWidget you would like to append to above
Returns:
a gphoto2 error code.

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

References _CameraWidget::changed, CHECK_NULL, _CameraWidget::children, _CameraWidget::children_count, GP_ERROR_BAD_PARAMETERS, GP_OK, GP_WIDGET_SECTION, GP_WIDGET_WINDOW, _CameraWidget::parent, and _CameraWidget::type.

{
      CHECK_NULL (widget && child);

      /* Return if they can't have any children */
        if ((widget->type != GP_WIDGET_WINDOW) && 
          (widget->type != GP_WIDGET_SECTION))
            return (GP_ERROR_BAD_PARAMETERS);

      widget->children[widget->children_count] = child;
      widget->children_count += 1;
      child->parent = widget;
      child->changed = 0;

      return (GP_OK);
}


Generated by  Doxygen 1.6.0   Back to index