123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138 |
- #ifndef __GPHOTO2_CONTEXT_H__
- #define __GPHOTO2_CONTEXT_H__
- #include <stdarg.h>
- #ifdef __cplusplus
- extern "C" {
- #endif
- typedef struct _GPContext GPContext;
- GPContext *gp_context_new (void);
- void gp_context_ref (GPContext *context);
- void gp_context_unref (GPContext *context);
- typedef enum _GPContextFeedback {
- GP_CONTEXT_FEEDBACK_OK,
- GP_CONTEXT_FEEDBACK_CANCEL
- } GPContextFeedback;
- typedef void (* GPContextIdleFunc) (GPContext *context, void *data);
- typedef void (* GPContextErrorFunc) (GPContext *context, const char *text, void *data);
- typedef void (* GPContextStatusFunc) (GPContext *context, const char *text, void *data);
- typedef void (* GPContextMessageFunc) (GPContext *context, const char *text, void *data);
- typedef GPContextFeedback (* GPContextQuestionFunc) (GPContext *context,
- const char *text, void *data);
- typedef GPContextFeedback (* GPContextCancelFunc) (GPContext *context,
- void *data);
- typedef unsigned int (* GPContextProgressStartFunc) (GPContext *context,
- float target,
- const char *text,
- void *data);
- typedef void (* GPContextProgressUpdateFunc) (GPContext *context,
- unsigned int id,
- float current,
- void *data);
- typedef void (* GPContextProgressStopFunc) (GPContext *context,
- unsigned int id,
- void *data);
- void gp_context_set_idle_func (GPContext *context,
- GPContextIdleFunc func, void *data);
- void gp_context_set_progress_funcs (GPContext *context,
- GPContextProgressStartFunc start_func,
- GPContextProgressUpdateFunc update_func,
- GPContextProgressStopFunc stop_func,
- void *data);
- void gp_context_set_error_func (GPContext *context,
- GPContextErrorFunc func, void *data);
- void gp_context_set_status_func (GPContext *context,
- GPContextStatusFunc func, void *data);
- void gp_context_set_question_func (GPContext *context,
- GPContextQuestionFunc func, void *data);
- void gp_context_set_cancel_func (GPContext *context,
- GPContextCancelFunc func, void *data);
- void gp_context_set_message_func (GPContext *context,
- GPContextMessageFunc func, void *data);
- void gp_context_idle (GPContext *context);
- void gp_context_error (GPContext *context, const char *format, ...)
- #ifdef __GNUC__
- __attribute__((__format__(printf,2,3)))
- #endif
- ;
- void gp_context_status (GPContext *context, const char *format, ...)
- #ifdef __GNUC__
- __attribute__((__format__(printf,2,3)))
- #endif
- ;
- void gp_context_message (GPContext *context, const char *format, ...)
- #ifdef __GNUC__
- __attribute__((__format__(printf,2,3)))
- #endif
- ;
- GPContextFeedback gp_context_question (GPContext *context, const char *format,
- ...)
- #ifdef __GNUC__
- __attribute__((__format__(printf,2,3)))
- #endif
- ;
- GPContextFeedback gp_context_cancel (GPContext *context);
- unsigned int gp_context_progress_start (GPContext *context, float target,
- const char *format, ...)
- #ifdef __GNUC__
- __attribute__((__format__(printf,3,4)))
- #endif
- ;
- void gp_context_progress_update (GPContext *context, unsigned int id,
- float current);
- void gp_context_progress_stop (GPContext *context, unsigned int id);
- #ifdef __cplusplus
- }
- #endif
- #endif
|