gphoto2-widget.h

Go to the documentation of this file.
00001 
00024 #ifndef __GPHOTO2_WIDGET_H__
00025 #define __GPHOTO2_WIDGET_H__
00026 
00027 #include <gphoto2/gphoto2-context.h>
00028 
00030 typedef struct _CameraWidget CameraWidget;
00031 
00032 #include <gphoto2/gphoto2-camera.h>
00033 
00040 typedef enum {                                                                  /* Value (get/set):     */
00041         GP_WIDGET_WINDOW,       
00044         GP_WIDGET_SECTION,      
00045         GP_WIDGET_TEXT,                                 /* char *               */
00046         GP_WIDGET_RANGE,                                /* float                */
00047         GP_WIDGET_TOGGLE,               /* int                  */
00048         GP_WIDGET_RADIO,                        /* char *               */
00049         GP_WIDGET_MENU,                 /* char *               */
00050         GP_WIDGET_BUTTON,                       /* CameraWidgetCallback */
00051         GP_WIDGET_DATE                          /* int                  */
00052 } CameraWidgetType;
00053 
00057 typedef int (* CameraWidgetCallback) (Camera *, CameraWidget *, GPContext *);
00058 
00059 int     gp_widget_new   (CameraWidgetType type, const char *label, 
00060                          CameraWidget **widget);
00061 int     gp_widget_free  (CameraWidget *widget);
00062 int     gp_widget_ref   (CameraWidget *widget);
00063 int     gp_widget_unref (CameraWidget *widget);
00064 
00065 int     gp_widget_append        (CameraWidget *widget, CameraWidget *child);
00066 int     gp_widget_prepend       (CameraWidget *widget, CameraWidget *child);
00067 
00068 int     gp_widget_count_children     (CameraWidget *widget);
00069 int     gp_widget_get_child          (CameraWidget *widget, int child_number, 
00070                                       CameraWidget **child);
00071 
00072 /* Retrieve Widgets */
00073 int     gp_widget_get_child_by_label (CameraWidget *widget,
00074                                       const char *label,
00075                                       CameraWidget **child);
00076 int     gp_widget_get_child_by_id    (CameraWidget *widget, int id, 
00077                                       CameraWidget **child);
00078 int     gp_widget_get_child_by_name  (CameraWidget *widget,
00079                                       const char *name,
00080                                       CameraWidget **child);
00081 int     gp_widget_get_root           (CameraWidget *widget,
00082                                       CameraWidget **root);
00083 int     gp_widget_get_parent         (CameraWidget *widget,
00084                                       CameraWidget **parent);
00085 
00086 int     gp_widget_set_value     (CameraWidget *widget, const void *value);
00087 int     gp_widget_get_value     (CameraWidget *widget, void *value);
00088 
00089 int     gp_widget_set_name      (CameraWidget *widget, const char  *name);
00090 int     gp_widget_get_name      (CameraWidget *widget, const char **name);
00091 
00092 int     gp_widget_set_info      (CameraWidget *widget, const char  *info);
00093 int     gp_widget_get_info      (CameraWidget *widget, const char **info);
00094 
00095 int     gp_widget_get_id        (CameraWidget *widget, int *id);
00096 int     gp_widget_get_type      (CameraWidget *widget, CameraWidgetType *type);
00097 int     gp_widget_get_label     (CameraWidget *widget, const char **label);
00098 
00099 int     gp_widget_set_range     (CameraWidget *range, 
00100                                  float  low, float  high, float  increment);
00101 int     gp_widget_get_range     (CameraWidget *range, 
00102                                  float *min, float *max, float *increment);
00103 
00104 int     gp_widget_add_choice     (CameraWidget *widget, const char *choice);
00105 int     gp_widget_count_choices  (CameraWidget *widget);
00106 int     gp_widget_get_choice     (CameraWidget *widget, int choice_number, 
00107                                   const char **choice);
00108 
00109 int     gp_widget_changed        (CameraWidget *widget);
00110 int     gp_widget_set_changed    (CameraWidget *widget, int changed);
00111 
00112 #endif /* __GPHOTO2_WIDGET_H__ */

Generated on Sun Jul 22 19:29:31 2007 for libgphoto2 photo camera library (libgphoto2) by  doxygen 1.5.0