1# This file was automatically generated by SWIG (http://www.swig.org).
2# Version 4.0.2
3#
4# Do not make changes to this file unless you know what you are doing--modify
5# the SWIG interface file instead.
6
7from sys import version_info as _swig_python_version_info
8if _swig_python_version_info < (2, 7, 0):
9    raise RuntimeError("Python 2.7 or later required")
10
11# Import the low-level C/C++ module
12if __package__ or "." in __name__:
13    from . import _context
14else:
15    import _context
16
17try:
18    import builtins as __builtin__
19except ImportError:
20    import __builtin__
21
22_swig_new_instance_method = _context.SWIG_PyInstanceMethod_New
23_swig_new_static_method = _context.SWIG_PyStaticMethod_New
24
25def _swig_repr(self):
26    try:
27        strthis = "proxy of " + self.this.__repr__()
28    except __builtin__.Exception:
29        strthis = ""
30    return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
31
32
33def _swig_setattr_nondynamic_instance_variable(set):
34    def set_instance_attr(self, name, value):
35        if name == "thisown":
36            self.this.own(value)
37        elif name == "this":
38            set(self, name, value)
39        elif hasattr(self, name) and isinstance(getattr(type(self), name), property):
40            set(self, name, value)
41        else:
42            raise AttributeError("You cannot add instance attributes to %s" % self)
43    return set_instance_attr
44
45
46def _swig_setattr_nondynamic_class_variable(set):
47    def set_class_attr(cls, name, value):
48        if hasattr(cls, name) and not isinstance(getattr(cls, name), property):
49            set(cls, name, value)
50        else:
51            raise AttributeError("You cannot add class attributes to %s" % cls)
52    return set_class_attr
53
54
55def _swig_add_metaclass(metaclass):
56    """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass"""
57    def wrapper(cls):
58        return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy())
59    return wrapper
60
61
62class _SwigNonDynamicMeta(type):
63    """Meta class to enforce nondynamic attributes (no new attributes) for a class"""
64    __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__)
65
66
67import gphoto2.abilities_list
68import gphoto2.camera
69import gphoto2.file
70import gphoto2.filesys
71import gphoto2.list
72import gphoto2.port_info_list
73import gphoto2.port_log
74import gphoto2.result
75import gphoto2.version
76import gphoto2.widget
77class CallbackDetails(object):
78    r"""Proxy of C CallbackDetails struct."""
79
80    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
81
82    def __init__(self, *args, **kwargs):
83        raise AttributeError("No constructor defined")
84    __repr__ = _swig_repr
85    func_1 = property(_context.CallbackDetails_func_1_get, _context.CallbackDetails_func_1_set, doc=r"""func_1""")
86    func_2 = property(_context.CallbackDetails_func_2_get, _context.CallbackDetails_func_2_set, doc=r"""func_2""")
87    func_3 = property(_context.CallbackDetails_func_3_get, _context.CallbackDetails_func_3_set, doc=r"""func_3""")
88    __swig_destroy__ = _context.delete_CallbackDetails
89
90# Register CallbackDetails in _context:
91_context.CallbackDetails_swigregister(CallbackDetails)
92
93unset_progress_funcs = _context.unset_progress_funcs
94class Context(object):
95    r"""Proxy of C _GPContext struct."""
96
97    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
98    __repr__ = _swig_repr
99    camera_autodetect = _swig_new_instance_method(_context.Context_camera_autodetect)
100    set_idle_func = _swig_new_instance_method(_context.Context_set_idle_func)
101    set_error_func = _swig_new_instance_method(_context.Context_set_error_func)
102    set_message_func = _swig_new_instance_method(_context.Context_set_message_func)
103    set_question_func = _swig_new_instance_method(_context.Context_set_question_func)
104    set_cancel_func = _swig_new_instance_method(_context.Context_set_cancel_func)
105    set_progress_funcs = _swig_new_instance_method(_context.Context_set_progress_funcs)
106    set_status_func = _swig_new_instance_method(_context.Context_set_status_func)
107
108    def __init__(self):
109        r"""__init__(self) -> Context"""
110        _context.Context_swiginit(self, _context.new_Context())
111    __swig_destroy__ = _context.delete_Context
112
113# Register Context in _context:
114_context.Context_swigregister(Context)
115
116gp_context_new = _context.gp_context_new
117GP_CONTEXT_FEEDBACK_OK = _context.GP_CONTEXT_FEEDBACK_OK
118
119GP_CONTEXT_FEEDBACK_CANCEL = _context.GP_CONTEXT_FEEDBACK_CANCEL
120
121gp_context_set_idle_func = _context.gp_context_set_idle_func
122gp_context_set_progress_funcs = _context.gp_context_set_progress_funcs
123gp_context_set_error_func = _context.gp_context_set_error_func
124gp_context_set_status_func = _context.gp_context_set_status_func
125gp_context_set_question_func = _context.gp_context_set_question_func
126gp_context_set_cancel_func = _context.gp_context_set_cancel_func
127gp_context_set_message_func = _context.gp_context_set_message_func
128
129
130