Whole document tree
    

Whole document tree

CameraWidget

CameraWidget

Name

CameraWidget -- 

Synopsis



struct      CameraWidget;
int         gp_widget_new                   (CameraWidgetType type,
                                             const char *label,
                                             CameraWidget **widget);
int         gp_widget_free                  (CameraWidget *widget);
int         gp_widget_ref                   (CameraWidget *widget);
int         gp_widget_unref                 (CameraWidget *widget);
int         gp_widget_append                (CameraWidget *widget,
                                             CameraWidget *child);
int         gp_widget_prepend               (CameraWidget *widget,
                                             CameraWidget *child);
int         gp_widget_count_children        (CameraWidget *widget);
int         gp_widget_get_child             (CameraWidget *widget,
                                             int child_number,
                                             CameraWidget **child);
int         gp_widget_get_child_by_label    (CameraWidget *widget,
                                             const char *label,
                                             CameraWidget **child);
int         gp_widget_get_child_by_id       (CameraWidget *widget,
                                             int id,
                                             CameraWidget **child);
int         gp_widget_get_root              (CameraWidget *widget,
                                             CameraWidget **root);
int         gp_widget_set_info              (CameraWidget *widget,
                                             const char *info);
int         gp_widget_get_info              (CameraWidget *widget,
                                             const char **info);
int         gp_widget_get_id                (CameraWidget *widget,
                                             int *id);
int         gp_widget_get_type              (CameraWidget *widget,
                                             CameraWidgetType *type);
int         gp_widget_get_label             (CameraWidget *widget,
                                             const char **label);
int         gp_widget_set_value             (CameraWidget *widget,
                                             void *value);
int         gp_widget_get_value             (CameraWidget *widget,
                                             void *value);
int         gp_widget_get_range             (CameraWidget *range,
                                             float *min,
                                             float *max,
                                             float *increment);
int         gp_widget_add_choice            (CameraWidget *widget,
                                             const char *choice);
int         gp_widget_count_choices         (CameraWidget *widget);
int         gp_widget_get_choice            (CameraWidget *widget,
                                             int choice_number,
                                             const char **choice);
int         gp_widget_changed               (CameraWidget *widget);

Description

Details

struct CameraWidget

struct CameraWidget;

The internals of the CameraWidget are only visible to gphoto2. You can only access them using the functions provided by gphoto2.


gp_widget_new ()

int         gp_widget_new                   (CameraWidgetType type,
                                             const char *label,
                                             CameraWidget **widget);

The function creates a new CameraWidget of specified type and with given label.



gp_widget_ref ()

int         gp_widget_ref                   (CameraWidget *widget);

Increments the reference count for the CameraWidget.


gp_widget_unref ()

int         gp_widget_unref                 (CameraWidget *widget);

Decrements the reference count for the CameraWidget:


gp_widget_append ()

int         gp_widget_append                (CameraWidget *widget,
                                             CameraWidget *child);

Appends a CameraWidget to a CameraWidget.



gp_widget_count_children ()

int         gp_widget_count_children        (CameraWidget *widget);

Counts the children of the CameraWidget.


gp_widget_get_child ()

int         gp_widget_get_child             (CameraWidget *widget,
                                             int child_number,
                                             CameraWidget **child);

Retrieves the child number child_number of the parent.


gp_widget_get_child_by_label ()

int         gp_widget_get_child_by_label    (CameraWidget *widget,
                                             const char *label,
                                             CameraWidget **child);

Retrieves the child with label label of the CameraWidget.


gp_widget_get_child_by_id ()

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

Retrieves the child with id id of the widget.


gp_widget_get_root ()

int         gp_widget_get_root              (CameraWidget *widget,
                                             CameraWidget **root);

Retrieves the root of the CameraWidget.


gp_widget_set_info ()

int         gp_widget_set_info              (CameraWidget *widget,
                                             const char *info);

Sets the information about the widget.


gp_widget_get_info ()

int         gp_widget_get_info              (CameraWidget *widget,
                                             const char **info);

Retrieves the information about the widget.


gp_widget_get_id ()

int         gp_widget_get_id                (CameraWidget *widget,
                                             int *id);

Retrieves the unique id of the CameraWidget.


gp_widget_get_type ()

int         gp_widget_get_type              (CameraWidget *widget,
                                             CameraWidgetType *type);

Retrieves the type of the CameraWidget.


gp_widget_get_label ()

int         gp_widget_get_label             (CameraWidget *widget,
                                             const char **label);

Retrieves the label of the CameraWidget.


gp_widget_set_value ()

int         gp_widget_set_value             (CameraWidget *widget,
                                             void *value);

Sets the value of the widget. Please pass (char*) for GP_WIDGET_MENU, GP_WIDGET_TEXT, (float) for GP_WIDGET_RANGE, (int) for GP_WIDGET_DATE, GP_WIDGET_TOGGLE, GP_WIDGET_RADIO, and (CameraWidgetCallback) for GP_WIDGET_BUTTON.


gp_widget_get_value ()

int         gp_widget_get_value             (CameraWidget *widget,
                                             void *value);

Retrieves the value of the CameraWidget.


gp_widget_get_range ()

int         gp_widget_get_range             (CameraWidget *range,
                                             float *min,
                                             float *max,
                                             float *increment);

Retrieves some range parameters of the CameraWidget.


gp_widget_add_choice ()

int         gp_widget_add_choice            (CameraWidget *widget,
                                             const char *choice);

Adds a choice to the CameraWidget.



gp_widget_get_choice ()

int         gp_widget_get_choice            (CameraWidget *widget,
                                             int choice_number,
                                             const char **choice);

Retrieves the choice number choice_number.


gp_widget_changed ()

int         gp_widget_changed               (CameraWidget *widget);

Returns 1 if the state of the CameraWidget has been changed or 0 if not. In addition, it resets the changed flag to 0.