#include "config.h"
#include <gphoto2/gphoto2-widget.h>
#include <stdlib.h>
#include <string.h>
#include <gphoto2/gphoto2-result.h>
#include <gphoto2/gphoto2-port-log.h>
Include dependency graph for gphoto2-widget.c:
Defines | |
#define | CHECK_NULL(r) {if (!(r)) return (GP_ERROR_BAD_PARAMETERS);} |
Functions | |
int | gp_widget_new (CameraWidgetType type, const char *label, CameraWidget **widget) |
Create a new widget. | |
int | gp_widget_free (CameraWidget *widget) |
Frees a CameraWidget. | |
int | gp_widget_ref (CameraWidget *widget) |
Increments the reference count for the CameraWidget. | |
int | gp_widget_unref (CameraWidget *widget) |
Decrements the reference count for the CameraWidget. | |
int | gp_widget_get_info (CameraWidget *widget, const char **info) |
Retrieves the information about the widget. | |
int | gp_widget_set_info (CameraWidget *widget, const char *info) |
Sets the information about the widget. | |
int | gp_widget_get_name (CameraWidget *widget, const char **name) |
Gets the name of the widget. | |
int | gp_widget_set_name (CameraWidget *widget, const char *name) |
Sets the name of the widget. | |
int | gp_widget_get_id (CameraWidget *widget, int *id) |
Retrieves the unique id of the CameraWidget. | |
int | gp_widget_set_changed (CameraWidget *widget, int changed) |
Tells that the widget has been changed. | |
int | gp_widget_get_type (CameraWidget *widget, CameraWidgetType *type) |
Retrieves the type of the CameraWidget. | |
int | gp_widget_get_label (CameraWidget *widget, const char **label) |
Retrieves the label of the CameraWidget. | |
int | gp_widget_set_value (CameraWidget *widget, const void *value) |
Sets the value of the widget. | |
int | gp_widget_get_value (CameraWidget *widget, void *value) |
Retrieves the value of the CameraWidget. | |
int | gp_widget_append (CameraWidget *widget, CameraWidget *child) |
Appends a CameraWidget to a CameraWidget. | |
int | gp_widget_prepend (CameraWidget *widget, CameraWidget *child) |
Prepends a CameraWidget to a CameraWidget. | |
int | gp_widget_count_children (CameraWidget *widget) |
Counts the children of the CameraWidget. | |
int | gp_widget_get_child (CameraWidget *widget, int child_number, CameraWidget **child) |
Retrieves the child number child_number of the parent. | |
int | gp_widget_get_child_by_label (CameraWidget *widget, const char *label, CameraWidget **child) |
Retrieves the child with label label of the CameraWidget. | |
int | gp_widget_get_child_by_id (CameraWidget *widget, int id, CameraWidget **child) |
Retrieves the child with id id of the widget. | |
int | gp_widget_get_child_by_name (CameraWidget *widget, const char *name, CameraWidget **child) |
Retrieves the child with name name of the widget. | |
int | gp_widget_get_parent (CameraWidget *widget, CameraWidget **parent) |
Retrieves the parent of a CameraWidget. | |
int | gp_widget_get_root (CameraWidget *widget, CameraWidget **root) |
Retrieves the root of the CameraWidget. | |
int | gp_widget_set_range (CameraWidget *range, float min, float max, float increment) |
Sets some range parameters of the CameraWidget. | |
int | gp_widget_get_range (CameraWidget *range, float *min, float *max, float *increment) |
Retrieves some range parameters of the CameraWidget. | |
int | gp_widget_add_choice (CameraWidget *widget, const char *choice) |
Adds a choice to the CameraWidget. | |
int | gp_widget_count_choices (CameraWidget *widget) |
Counts the choices of the CameraWidget. | |
int | gp_widget_get_choice (CameraWidget *widget, int choice_number, const char **choice) |
Retrieves the choice number choice_number . | |
int | gp_widget_changed (CameraWidget *widget) |
Tells if the widget has been changed. |
int gp_widget_add_choice | ( | CameraWidget * | widget, | |
const char * | choice | |||
) |
Adds a choice to the CameraWidget.
widget | a CameraWidget of type GP_WIDGET_RADIO or GP_WIDGET_MENU | |
choice |
int gp_widget_append | ( | CameraWidget * | widget, | |
CameraWidget * | child | |||
) |
Appends a CameraWidget to a CameraWidget.
widget | a CameraWidget | |
child | the CameraWidget you would like to append to above |
int gp_widget_changed | ( | CameraWidget * | widget | ) |
Tells if the widget has been changed.
widget | a CameraWidget |
int gp_widget_count_children | ( | CameraWidget * | widget | ) |
Counts the children of the CameraWidget.
widget | a CameraWidget |
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 |
int gp_widget_free | ( | CameraWidget * | widget | ) |
int gp_widget_get_child | ( | CameraWidget * | widget, | |
int | child_number, | |||
CameraWidget ** | child | |||
) |
Retrieves the child number child_number
of the parent.
widget | a CameraWidget | |
child_number | the number of the child | |
child |
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 | |
child |
int gp_widget_get_child_by_label | ( | CameraWidget * | widget, | |
const char * | label, | |||
CameraWidget ** | child | |||
) |
Retrieves the child with label label
of the CameraWidget.
widget | a CameraWidget | |
label | the label of the child | |
child |
int gp_widget_get_child_by_name | ( | CameraWidget * | widget, | |
const char * | name, | |||
CameraWidget ** | child | |||
) |
Retrieves the child with name name
of the widget.
widget | a CameraWidget | |
name | the name of the child |
int gp_widget_get_choice | ( | CameraWidget * | widget, | |
int | choice_number, | |||
const char ** | choice | |||
) |
Retrieves the choice number choice_number
.
widget | a CameraWidget of type GP_WIDGET_RADIO or GP_WIDGET_MENU | |
choice_number | ||
choice |
int gp_widget_get_id | ( | CameraWidget * | widget, | |
int * | id | |||
) |
Retrieves the unique id of the CameraWidget.
widget | a CameraWidget | |
id |
int gp_widget_get_info | ( | CameraWidget * | widget, | |
const char ** | info | |||
) |
Retrieves the information about the widget.
widget | a CameraWidget | |
info |
int gp_widget_get_label | ( | CameraWidget * | widget, | |
const char ** | label | |||
) |
Retrieves the label of the CameraWidget.
widget | a CameraWidget | |
label |
int gp_widget_get_name | ( | CameraWidget * | widget, | |
const char ** | name | |||
) |
Gets the name of the widget.
widget | a CameraWidget | |
name | Name of above widget |
int gp_widget_get_parent | ( | CameraWidget * | widget, | |
CameraWidget ** | parent | |||
) |
Retrieves the parent of a CameraWidget.
widget | a CameraWidget | |
parent | the pointer to the parent to return |
int gp_widget_get_range | ( | CameraWidget * | range, | |
float * | min, | |||
float * | max, | |||
float * | increment | |||
) |
Retrieves some range parameters of the CameraWidget.
range | a CameraWidget of type GP_WIDGET_RANGE | |
min | ||
max | ||
increment |
int gp_widget_get_root | ( | CameraWidget * | widget, | |
CameraWidget ** | root | |||
) |
Retrieves the root of the CameraWidget.
widget | a CameraWidget | |
root |
int gp_widget_get_type | ( | CameraWidget * | widget, | |
CameraWidgetType * | type | |||
) |
Retrieves the type of the CameraWidget.
widget | a CameraWidget | |
type |
int gp_widget_get_value | ( | CameraWidget * | widget, | |
void * | value | |||
) |
Retrieves the value of the CameraWidget.
widget | a CameraWidget | |
value |
int gp_widget_new | ( | CameraWidgetType | type, | |
const char * | label, | |||
CameraWidget ** | widget | |||
) |
Create a new widget.
The function creates a new CameraWidget of specified type and with given label.
type | the type | |
label | the label | |
widget |
int gp_widget_prepend | ( | CameraWidget * | widget, | |
CameraWidget * | child | |||
) |
Prepends a CameraWidget to a CameraWidget.
widget | a CameraWidget | |
child | the CameraWidget you would like to prepend to above |
int gp_widget_ref | ( | CameraWidget * | widget | ) |
Increments the reference count for the CameraWidget.
widget | a CameraWidget you want to ref-count |
int gp_widget_set_changed | ( | CameraWidget * | widget, | |
int | changed | |||
) |
Tells that the widget has been changed.
widget | a CameraWidget | |
changed | a boolean whether we changed or not |
int gp_widget_set_info | ( | CameraWidget * | widget, | |
const char * | info | |||
) |
Sets the information about the widget.
widget | a CameraWidget | |
info | Information about above widget |
int gp_widget_set_name | ( | CameraWidget * | widget, | |
const char * | name | |||
) |
Sets the name of the widget.
widget | a CameraWidget | |
name | Name of above widget |
int gp_widget_set_range | ( | CameraWidget * | range, | |
float | min, | |||
float | max, | |||
float | increment | |||
) |
Sets some range parameters of the CameraWidget.
range | a CameraWidget of type GP_WIDGET_RANGE | |
min | ||
max | ||
increment |
int gp_widget_set_value | ( | CameraWidget * | widget, | |
const void * | value | |||
) |
Sets the value of the widget.
widget | a CameraWidget | |
value |
int gp_widget_unref | ( | CameraWidget * | widget | ) |
Decrements the reference count for the CameraWidget.
widget | a CameraWidget you want to unref |