davemds pushed a commit to branch master. http://git.enlightenment.org/bindings/python/python-efl.git/commit/?id=6ff99982587c8e44b84bd384eb06ab28e6b558cf
commit 6ff99982587c8e44b84bd384eb06ab28e6b558cf Author: Dave Andreoli <d...@gurumeditation.it> Date: Sat Jan 3 20:17:24 2015 +0100 Lots of documentation fixes for ALL the classes Mainly with regard of class __init__ params and the **keyword param --- doc/conf.py | 2 +- doc/ecore/animator_timeline.rst | 6 ++ doc/ecore/ecore.rst | 1 + efl/ecore/efl.ecore_animator.pxi | 46 +++++++-- efl/ecore/efl.ecore_exe.pxi | 4 +- efl/ecore/efl.ecore_fd_handler.pxi | 23 +++-- efl/ecore/efl.ecore_file_download.pxi | 17 +-- efl/ecore/efl.ecore_file_monitor.pxi | 18 ++-- efl/ecore/efl.ecore_idler.pxi | 80 +++++++++----- efl/ecore/efl.ecore_poller.pxi | 25 +++-- efl/ecore/efl.ecore_timer.pxi | 30 ++++-- efl/edje/efl.edje_object.pxi | 55 ++++++---- efl/elementary/access.pyx | 13 ++- efl/elementary/actionslider.pyx | 13 ++- efl/elementary/background.pyx | 20 +++- efl/elementary/box.pyx | 15 ++- efl/elementary/bubble.pyx | 13 ++- efl/elementary/button.pyx | 13 ++- efl/elementary/calendar_elm.pyx | 20 +++- efl/elementary/check.pyx | 13 ++- efl/elementary/clock.pyx | 13 ++- efl/elementary/colorselector.pyx | 32 +++++- efl/elementary/conformant.pyx | 13 ++- efl/elementary/ctxpopup.pyx | 49 +++++---- efl/elementary/datetime_elm.pyx | 184 +++++++++++++-------------------- efl/elementary/dayselector.pyx | 13 ++- efl/elementary/diskselector.pyx | 26 ++++- efl/elementary/entry.pyx | 51 ++++----- efl/elementary/fileselector.pyx | 13 ++- efl/elementary/fileselector_button.pyx | 13 ++- efl/elementary/fileselector_entry.pyx | 11 +- efl/elementary/flip.pyx | 9 +- efl/elementary/flipselector.pyx | 36 ++++--- efl/elementary/frame.pyx | 13 ++- efl/elementary/gengrid_item.pxi | 5 +- efl/elementary/gengrid_widget.pxi | 13 ++- efl/elementary/genlist_item.pxi | 16 +-- efl/elementary/genlist_widget.pxi | 13 ++- efl/elementary/gesture_layer.pyx | 39 ++++--- efl/elementary/glview.pyx | 13 ++- efl/elementary/grid.pyx | 9 +- efl/elementary/hover.pyx | 9 +- efl/elementary/hoversel.pyx | 23 ++++- efl/elementary/icon.pyx | 13 ++- efl/elementary/image.pyx | 25 +++-- efl/elementary/index.pyx | 23 +++-- efl/elementary/innerwindow.pyx | 13 ++- efl/elementary/label.pyx | 13 ++- efl/elementary/layout.pyx | 13 ++- efl/elementary/layout_class.pyx | 1 - efl/elementary/list.pyx | 25 +++-- efl/elementary/map.pyx | 8 ++ efl/elementary/mapbuf.pyx | 13 ++- efl/elementary/menu.pyx | 23 ++++- efl/elementary/multibuttonentry.pyx | 18 +++- efl/elementary/naviframe.pyx | 18 +++- efl/elementary/notify.pyx | 9 +- efl/elementary/object.pyx | 1 - efl/elementary/object_item.pyx | 1 - efl/elementary/panel.pyx | 11 +- efl/elementary/panes.pyx | 13 ++- efl/elementary/photo.pyx | 13 ++- efl/elementary/photocam.pyx | 21 +++- efl/elementary/plug.pyx | 9 +- efl/elementary/popup.pyx | 18 +++- efl/elementary/progressbar.pyx | 13 ++- efl/elementary/radio.pyx | 13 ++- efl/elementary/scroller.pyx | 1 - efl/elementary/segment_control.pyx | 18 +++- efl/elementary/separator.pyx | 13 ++- efl/elementary/slider.pyx | 13 ++- efl/elementary/slideshow.pyx | 18 +++- efl/elementary/spinner.pyx | 13 ++- efl/elementary/store.pyx | 5 +- efl/elementary/table.pyx | 9 +- efl/elementary/theme.pyx | 1 - efl/elementary/thumb.pyx | 13 ++- efl/elementary/toolbar.pyx | 19 +++- efl/elementary/transit.pyx | 22 ++-- efl/elementary/video.pyx | 22 +++- efl/elementary/web.pyx | 14 ++- efl/elementary/window.pyx | 47 +++++---- efl/emotion/efl.emotion.pyx | 25 ++--- efl/ethumb/efl.ethumb_client.pyx | 21 ++-- efl/evas/efl.evas_canvas.pxi | 4 +- efl/evas/efl.evas_object.pxi | 6 +- efl/evas/efl.evas_object_box.pxi | 21 ++-- efl/evas/efl.evas_object_grid.pxi | 13 +++ efl/evas/efl.evas_object_image.pxi | 54 ++++------ efl/evas/efl.evas_object_line.pxi | 40 +++---- efl/evas/efl.evas_object_polygon.pxi | 35 +++---- efl/evas/efl.evas_object_rectangle.pxi | 26 ++--- efl/evas/efl.evas_object_table.pxi | 12 +++ efl/evas/efl.evas_object_text.pxi | 53 ++++------ efl/evas/efl.evas_object_textblock.pxi | 29 ++---- efl/evas/efl.evas_object_textgrid.pxi | 11 +- efl/evas/efl.evas_rect.pxi | 6 +- 97 files changed, 1352 insertions(+), 603 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index 3151c76..849c79e 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -162,7 +162,7 @@ autodoc_docstring_signature = True def setup(app): from sphinx.ext.autodoc import cut_lines app.connect('autodoc-process-signature', autodoc_process_signature) - app.connect('autodoc-process-docstring', cut_lines(2, what=['class'])) + app.connect('autodoc-process-docstring', cut_lines(1, what=['class'])) def autodoc_process_signature(app, what, name, obj, options, signature, return_annotation): """Cleanup params: remove the 'self' param and all the cython types""" diff --git a/doc/ecore/animator_timeline.rst b/doc/ecore/animator_timeline.rst new file mode 100644 index 0000000..1a3d7e8 --- /dev/null +++ b/doc/ecore/animator_timeline.rst @@ -0,0 +1,6 @@ +.. currentmodule:: efl.ecore + +:class:`efl.ecore.AnimatorTimeline` Class +========================================= + +.. autoclass:: efl.ecore.AnimatorTimeline diff --git a/doc/ecore/ecore.rst b/doc/ecore/ecore.rst index 6ac5ceb..952d399 100644 --- a/doc/ecore/ecore.rst +++ b/doc/ecore/ecore.rst @@ -92,6 +92,7 @@ API Reference x timer animator + animator_timeline poller idler idleenterer diff --git a/efl/ecore/efl.ecore_animator.pxi b/efl/ecore/efl.ecore_animator.pxi index ebcc9fb..d80f767 100644 --- a/efl/ecore/efl.ecore_animator.pxi +++ b/efl/ecore/efl.ecore_animator.pxi @@ -17,7 +17,9 @@ cdef class Animator(Eo): - """Creates an animator to tick off at every animaton tick during main loop + """ + + Creates an animator to tick off at every animaton tick during main loop execution. This class represents an animator that will call the given ``func`` @@ -36,13 +38,23 @@ cdef class Animator(Eo): returning *False* from ``func``, otherwise they'll continue alive, even if the current python context delete it's reference to it. - :param func: - function to call every frame. Expected signature:: + """ + def __init__(self, func, *args, **kargs): + """Animator(...) + + :param func: function to call at every frame. + :type func: callable + :param \*args: All the remaining arguments will be passed + back in the callback function. + :param \**kwargs: All the remaining keyword arguments will be passed + back in the callback function. + + Expected **func** signature:: func(*args, **kargs) -> bool - """ - def __init__(self, func, *args, **kargs): + """ + if not callable(func): raise TypeError("Parameter 'func' must be callable") self.func = func @@ -85,11 +97,12 @@ cdef Eina_Bool _ecore_timeline_cb(void *data, double pos) with gil: return ret + cdef class AnimatorTimeline(Animator): - """Add an animator that runs for a limited time + """ + + Create an animator that runs for a limited time - :param runtime: The time to run in seconds - :param func: The function to call when it ticks off This is just like a normal :py:class:`Animator` except the animator only runs for a limited time specified in seconds by ``runtime``. Once the @@ -111,6 +124,23 @@ cdef class AnimatorTimeline(Animator): """ def __init__(self, func, double runtime, *args, **kargs): + """AnimatorTimeline(...) + + :param func: The function to call when it ticks off + :type func: callable + :param runtime: The time to run in seconds + :type runtime: double + :param \*args: All the remaining arguments will be passed + back in the callback function. + :param \**kwargs: All the remaining keyword arguments will be passed + back in the callback function. + + Expected **func** signature:: + + func(pos, *args, **kargs) -> bool + + """ + if not callable(func): raise TypeError("Parameter 'func' must be callable") self.func = func diff --git a/efl/ecore/efl.ecore_exe.pxi b/efl/ecore/efl.ecore_exe.pxi index ef62ec2..c5979ad 100644 --- a/efl/ecore/efl.ecore_exe.pxi +++ b/efl/ecore/efl.ecore_exe.pxi @@ -166,7 +166,9 @@ cdef void _ecore_exe_pre_free_cb(void *data, const Ecore_Exe *exe) with gil: cdef class Exe(object): - """Spawns a child process with its stdin/out available for communication. + """ + + Spawns a child process with its stdin/out available for communication. This function forks and runs the given command using ``/bin/sh``. diff --git a/efl/ecore/efl.ecore_fd_handler.pxi b/efl/ecore/efl.ecore_fd_handler.pxi index 3de448c..db4dfec 100644 --- a/efl/ecore/efl.ecore_fd_handler.pxi +++ b/efl/ecore/efl.ecore_fd_handler.pxi @@ -56,7 +56,9 @@ cdef Eina_Bool fd_handler_cb(void *data, Ecore_Fd_Handler *fdh) with gil: cdef class FdHandler(object): - """Adds a callback for activity on the given file descriptor. + """ + + Adds a callback for activity on the given file descriptor. ``func`` will be called during the execution of ``main_loop_begin()`` when the file descriptor is available for reading, or writing, or both. @@ -74,16 +76,19 @@ cdef class FdHandler(object): - thread wake-up and synchronization; - non-blocking file description operations. - :param fd: file descriptor or object with fileno() method. - :param flags: bitwise OR of ECORE_FD_READ, ECORE_FD_WRITE... - :param func: - function to call when file descriptor state changes. - Expected signature:: - - func(fd_handler, *args, **kargs): bool - """ def __init__(self, fd, int flags, func, *args, **kargs): + """FdHandler(...) + + :param fd: file descriptor or object with fileno() method. + :param flags: bitwise OR of ECORE_FD_READ, ECORE_FD_WRITE... + :param func: function to call when file descriptor state changes. + + Expected **func** signature:: + + func(fd_handler, *args, **kargs): bool + + """ if not callable(func): raise TypeError("Parameter 'func' must be callable") self.func = func diff --git a/efl/ecore/efl.ecore_file_download.pxi b/efl/ecore/efl.ecore_file_download.pxi index f82ef62..5c7e61c 100644 --- a/efl/ecore/efl.ecore_file_download.pxi +++ b/efl/ecore/efl.ecore_file_download.pxi @@ -34,7 +34,9 @@ cdef int _progress_cb(void *data, const char *file, long int dltotal, cdef class FileDownload(object): - """ Download the given url to destination. + """ + + Download the given url to destination. You must provide the full url, including 'http://', 'ftp://' or 'file://'. If ``dst`` already exist it will not be overwritten and the function will fail. @@ -69,13 +71,16 @@ cdef class FileDownload(object): "/path/to/destination", None, None) ecore.file_download_abort(dl) - :param url: The complete url to download - :param dst: Where to download the file - :param completion_cb: A callback called on download complete - :param progress_cb: A callback called during the download operation - """ def __init__(self, url, dst, completion_cb, progress_cb, *args, **kargs): + """FileDownload(...) + + :param url: The complete url to download + :param dst: Where to download the file + :param completion_cb: A callback called on download complete + :param progress_cb: A callback called during the download operation + + """ cdef Ecore_File_Download_Job *job if completion_cb is not None and not callable(completion_cb): diff --git a/efl/ecore/efl.ecore_file_monitor.pxi b/efl/ecore/efl.ecore_file_monitor.pxi index 8b1c558..17fc0de 100644 --- a/efl/ecore/efl.ecore_file_monitor.pxi +++ b/efl/ecore/efl.ecore_file_monitor.pxi @@ -27,7 +27,9 @@ cdef void _file_monitor_cb(void *data, Ecore_File_Monitor *em, Ecore_File_Event cdef class FileMonitor(object): - """ Monitor the given path for changes. + """ + + Monitor the given path for changes. The callback signatures is:: @@ -54,16 +56,18 @@ cdef class FileMonitor(object): ecore.FileMonitor("/tmp", monitor_cb) ecore.main_loop_begin() - - :param path: The complete path of the folder you want to monitor. - :type path: str - :param monitor_cb: A callback called when something change in `path` - :type monitor_cb: callable - .. versionadded:: 1.8 """ def __init__(self, path, monitor_cb, *args, **kargs): + """FileMonitor(...) + + :param path: The complete path of the folder you want to monitor. + :type path: str + :param monitor_cb: A callback called when something change in `path` + :type monitor_cb: callable + + """ if not callable(monitor_cb): raise TypeError("Parameter 'monitor_cb' must be callable") diff --git a/efl/ecore/efl.ecore_idler.pxi b/efl/ecore/efl.ecore_idler.pxi index 456c1b1..bb3bed6 100644 --- a/efl/ecore/efl.ecore_idler.pxi +++ b/efl/ecore/efl.ecore_idler.pxi @@ -17,15 +17,17 @@ cdef class Idler(Eo): - """Add an idler handler. + """ + + Add an idler handler. This class represents an idler on the event loop that will call ``func`` when there is nothing more to do. The function will be passed any extra parameters given to constructor. When the idler ``func`` is called, it must return a value of either - True or False (remember that Python returns None if no value is - explicitly returned and None evaluates to False). If it returns + **True** or **False** (remember that Python returns **None** if no value + is explicitly returned and **None** evaluates to False). If it returns **True**, it will be called again when system become idle, or if it returns **False** it will be deleted automatically making any references/handles for it invalid. @@ -36,14 +38,22 @@ cdef class Idler(Eo): Idlers are useful for progressively prossessing data without blocking. - :param func: - Function to call when system is idle. - Expected signature:: + """ + def __init__(self, func, *args, **kargs): + """Idler(...) + + :param func: Function to call when system is idle. + :type func: callable + :param \*args: All the remaining arguments will be passed + back in the callback function. + :param \**kwargs: All the remaining keyword arguments will be passed + back in the callback function. + + Expected **func** signature:: func(*args, **kargs): bool - """ - def __init__(self, func, *args, **kargs): + """ if not callable(func): raise TypeError("Parameter 'func' must be callable") self.func = func @@ -72,33 +82,45 @@ cdef class Idler(Eo): cdef class IdleEnterer(Idler): - """Add an idle enterer handler. + """ + + Add an idle enterer handler. This class represents a function that will be called before systems enter idle. The function will be passed any extra parameters given to constructor. When the idle enterer ``func`` is called, it must return a value of - either *True* or *False* (remember that Python returns *None* if no value - is explicitly returned and *None* evaluates to *False*). If it returns - *True*, it will be called again when system become idle, or if it - returns *False* it will be deleted automatically making any + either **True** or **False** (remember that Python returns **None** if + no value is explicitly returned and **None** evaluates to **False**). If + it returns **True**, it will be called again when system become idle, or + if it returns **False** it will be deleted automatically making any references/handles for it invalid. Idle enterers should be stopped/deleted by means of delete() or - returning *False* from ``func``, otherwise they'll continue alive, even + returning **False** from ``func``, otherwise they'll continue alive, even if the current python context delete it's reference to it. Idle enterer are useful for post-work jobs, like garbage collection. - :param func: - Function to call when system enters idle. - Expected signature:: - func(*args, **kargs): bool """ def __init__(self, func, *args, **kargs): + """IdleEnterer(...) + + :param func: Function to call when system enters idle. + :type func: callable + :param \*args: All the remaining arguments will be passed + back in the callback function. + :param \**kwargs: All the remaining keyword arguments will be passed + back in the callback function. + + Expected **func** signature:: + + func(*args, **kargs): bool + + """ if not callable(func): raise TypeError("Parameter 'func' must be callable") self.func = func @@ -112,7 +134,9 @@ cdef class IdleEnterer(Idler): cdef class IdleExiter(Idler): - """Add an idle exiter handler. + """ + + Add an idle exiter handler. This class represents a function that will be called before systems exits idle. The function will be passed any extra parameters given @@ -129,14 +153,21 @@ cdef class IdleExiter(Idler): returning *False* from ``func``, otherwise they'll continue alive, even if the current python context delete it's reference to it. - :param func: - Function to call when system exits idle. - Expected signature:: + """ + def __init__(self, func, *args, **kargs): + """ IdleExiter(...) + + :param func: Function to call when system exits idle. + :param \*args: All the remaining arguments will be passed + back in the callback function. + :param \**kwargs: All the remaining keyword arguments will be passed + back in the callback function. + + Expected **func** signature:: func(*args, **kargs): bool - """ - def __init__(self, func, *args, **kargs): + """ if not callable(func): raise TypeError("Parameter 'func' must be callable") self.func = func @@ -145,6 +176,7 @@ cdef class IdleExiter(Idler): self._set_obj(ecore_idle_exiter_add(_ecore_task_cb, <void *>self)) def delete(self): + """Stop callback emission and free internal resources.""" ecore_idle_exiter_del(self.obj) diff --git a/efl/ecore/efl.ecore_poller.pxi b/efl/ecore/efl.ecore_poller.pxi index 9879cdd..33e25bf 100644 --- a/efl/ecore/efl.ecore_poller.pxi +++ b/efl/ecore/efl.ecore_poller.pxi @@ -56,17 +56,28 @@ cdef class Poller(Eo): ecore.Poller(4, poller_cb) - :param interval: The poll interval - :type interval: int - :param func: The function to call at every interval - :type func: callable - :param poll_type: The ticker type to attach the poller to. Must be ECORE_POLLER_CORE - :type poll_type: Ecore_Poll_Type - .. versionadded:: 1.8 """ def __init__(self, int interval, func, pol_type=0, *args, **kargs): + """Poller(...) + + :param interval: The poll interval + :type interval: int + :param func: The function to call at every interval + :type func: callable + :param pol_type: The ticker type to attach the poller to. Must be ECORE_POLLER_CORE + :type pol_type: Ecore_Poll_Type + :param \*args: All the remaining arguments will be passed + back in the callback function. + :param \**kwargs: All the remaining keyword arguments will be passed + back in the callback function. + + Expected **func** signature:: + + func(*args, **kargs): bool + + """ if not callable(func): raise TypeError("Parameter 'func' must be callable") self.func = func diff --git a/efl/ecore/efl.ecore_timer.pxi b/efl/ecore/efl.ecore_timer.pxi index a42546a..4eb224e 100644 --- a/efl/ecore/efl.ecore_timer.pxi +++ b/efl/ecore/efl.ecore_timer.pxi @@ -26,26 +26,34 @@ cdef class Timer(Eo): parameters given to constructor. When the timer ``func`` is called, it must return a value of either - *True* or *False* (remember that Python returns *None* if no value is - explicitly returned and *None* evaluates to *False*). If it returns - *True*, it will be called again at the next interval, or if it returns - *False* it will be deleted automatically making any references/handles + **True** or **False** (remember that Python returns **None** if no value is + explicitly returned and **None** evaluates to **False**). If it returns + **True**, it will be called again at the next interval, or if it returns + **False** it will be deleted automatically making any references/handles for it invalid. Timers should be stopped/deleted by means of ``delete()`` or returning *False* from ``func``, otherwise they'll continue alive, even if the current python context delete it's reference to it. - :param interval: interval in seconds. - :type interval: float - :param func: - function to callback when timer expires. - The function signature is:: + """ + def __init__(self, double interval, func, *args, **kargs): + """Timer(...) + + :param interval: interval in seconds. + :type interval: float + :param func: function to callback when timer expires. + :type func: callable + :param \*args: All the remaining arguments will be passed + back in the callback function. + :param \**kwargs: All the remaining keyword arguments will be passed + back in the callback function. + + Expected **func** signature:: func(*args, **kargs): bool - """ - def __init__(self, double interval, func, *args, **kargs): + """ if not callable(func): raise TypeError("Parameter 'func' must be callable") self.func = func diff --git a/efl/edje/efl.edje_object.pxi b/efl/edje/efl.edje_object.pxi index b02414b..1f8fdb7 100644 --- a/efl/edje/efl.edje_object.pxi +++ b/efl/edje/efl.edje_object.pxi @@ -86,11 +86,13 @@ class EdjeLoadError(Exception): cdef class Edje(Object): - """Edje evas object. + """ + + Edje evas object. - This is a high level `efl.evas.SmartObject` that is defined as a group of - parts (`efl.evas.Object`, usually written in text files (.edc) and - compiled as a package using EET to store resources (.edj). + This is a high level :class:`efl.evas.SmartObject` that is defined as a + group of parts, usually written in text files (.edc) and compiled as a + package using EET to store resources (.edj). Edje is an important EFL component because it makes easy to split logic and UI, usually used as theme engine but can be much more powerful than @@ -128,7 +130,24 @@ cdef class Edje(Object): self._signal_callbacks = {} def __init__(self, Canvas canvas not None, file=None, group=None, size=None, - geometry=None, **kwargs): + geometry=None, **kwargs): + """Edje(...) + + :param canvas: Evas canvas for this object + :type canvas: :py:class:`~efl.evas.Canvas` + :keyword file: File name + :type file: string + :keyword group: Group name + :type group: string + :keyword size: Min size for the object + :type size: tuple of ints + :keyword geometry: Geometry for the object + :type geometry: tuple of ints + :keyword \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance + + """ + self._set_obj(edje_object_add(canvas.obj)) _register_decorated_callbacks(self) @@ -295,19 +314,19 @@ cdef class Edje(Object): int r3, int g3, int b3, int a3): """Set color class. - :parm color_class: color class name - :parm r: - :parm g: - :parm b: - :parm a: - :parm r2: - :parm g2: - :parm b2: - :parm a2: - :parm r3: - :parm g3: - :parm b3: - :parm a3: + :param color_class: color class name + :param r: + :param g: + :param b: + :param a: + :param r2: + :param g2: + :param b2: + :param a2: + :param r3: + :param g3: + :param b3: + :param a3: """ if isinstance(color_class, unicode): diff --git a/efl/elementary/access.pyx b/efl/elementary/access.pyx index 323e3c5..6a663da 100644 --- a/efl/elementary/access.pyx +++ b/efl/elementary/access.pyx @@ -36,15 +36,18 @@ cdef void access_activate_cb(void *data, Evas_Object *part_obj, Elm_Object_Item pass cdef class Accessible(Object): + """ - """An accessible object.""" + An accessible object. - def __init__(self, target, parent = None): - """__init__(target, parent = None) + Register evas object as an accessible object. - Register evas object as an accessible object. + :since: 1.8 + + """ - :since: 1.8 + def __init__(self, target, parent = None): + """Accessible(...) :param target: The evas object to register as an accessible object. :param parent: The elementary object which is used for creating diff --git a/efl/elementary/actionslider.pyx b/efl/elementary/actionslider.pyx index 385253e..737478c 100644 --- a/efl/elementary/actionslider.pyx +++ b/efl/elementary/actionslider.pyx @@ -106,10 +106,21 @@ def _cb_string_conv(uintptr_t addr): return _ctouni(s) if s is not NULL else None cdef class Actionslider(LayoutClass): + """ - """This is the class that actually implements the widget.""" + This is the class that actually implements the widget. + + """ def __init__(self, evasObject parent, *args, **kwargs): + """Actionslider(..) + + :param parent: Parent object + :type parent: :py:class:`efl.evas.Object` + :param \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance + + """ self._set_obj(elm_actionslider_add(parent.obj)) self._set_properties_from_keyword_args(kwargs) diff --git a/efl/elementary/background.pyx b/efl/elementary/background.pyx index 84054ee..2dcfce1 100644 --- a/efl/elementary/background.pyx +++ b/efl/elementary/background.pyx @@ -24,11 +24,10 @@ Widget description ------------------ The background widget is used for setting a solid color, image or Edje group -as a background to a window or any container object. +as a background to a window (unless it has transparency enabled) or any +container object. -The background widget is used for setting (solid) background decorations -to a window (unless it has transparency enabled) or to any container -object. It works just like an image, but has some properties useful to a +It works just like an image, but has some properties useful to a background, like setting it to tiled, centered, scaled or stretched. @@ -79,10 +78,21 @@ ELM_BG_OPTION_TILE = enums.ELM_BG_OPTION_TILE ELM_BG_OPTION_LAST = enums.ELM_BG_OPTION_LAST cdef class Background(LayoutClass): + """ - """This is the class that actually implements the widget.""" + This is the class that actually implements the widget. + + """ def __init__(self, evasObject parent, *args, **kwargs): + """Background(...) + + :param parent: The parent object + :type parent: :py:class:`efl.evas.Object` + :param \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance + + """ self._set_obj(elm_bg_add(parent.obj)) self._set_properties_from_keyword_args(kwargs) diff --git a/efl/elementary/box.pyx b/efl/elementary/box.pyx index ff809cb..92c2e92 100644 --- a/efl/elementary/box.pyx +++ b/efl/elementary/box.pyx @@ -174,16 +174,21 @@ cdef Evas_Object_Box_Layout _py_elm_box_layout_resolv(int layout) with gil: return evas_object_box_layout_vertical cdef class Box(Object): + """ - """This is the class that actually implements the widget.""" + This is the class that actually implements the widget. + + By default, the box will be in vertical mode and non-homogeneous. + + """ def __init__(self, evasObject parent, *args, **kwargs): - """By default, the box will be in vertical mode and non-homogeneous. + """Box(...) :param parent: The parent object - :type parent: :py:class:`~efl.elementary.object.Object` - :return: The new object or None if it cannot be created - :rtype: :py:class:`Box` + :type parent: :py:class:`efl.evas.Object` + :param \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance """ self._set_obj(elm_box_add(parent.obj)) diff --git a/efl/elementary/bubble.pyx b/efl/elementary/bubble.pyx index 3fe7930..d0d3acd 100644 --- a/efl/elementary/bubble.pyx +++ b/efl/elementary/bubble.pyx @@ -101,10 +101,21 @@ ELM_BUBBLE_POS_BOTTOM_LEFT = enums.ELM_BUBBLE_POS_BOTTOM_LEFT ELM_BUBBLE_POS_BOTTOM_RIGHT = enums.ELM_BUBBLE_POS_BOTTOM_RIGHT cdef class Bubble(LayoutClass): + """ - """This is the class that actually implements the widget.""" + This is the class that actually implements the widget. + + """ def __init__(self, evasObject parent, *args, **kwargs): + """Bubble(...) + + :param parent: The parent object + :type parent: :py:class:`efl.evas.Object` + :param \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance + + """ self._set_obj(elm_bubble_add(parent.obj)) self._set_properties_from_keyword_args(kwargs) diff --git a/efl/elementary/button.pyx b/efl/elementary/button.pyx index 16d3716..a0194df 100644 --- a/efl/elementary/button.pyx +++ b/efl/elementary/button.pyx @@ -68,10 +68,21 @@ from efl.evas cimport Object as evasObject from layout_class cimport LayoutClass cdef class Button(LayoutClass): + """ - """This is the class that actually implements the widget.""" + This is the class that actually implements the widget. + + """ def __init__(self, evasObject parent, *args, **kwargs): + """Button(...) + + :param parent: The parent object + :type parent: :py:class:`efl.evas.Object` + :param \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance + + """ self._set_obj(elm_button_add(parent.obj)) self._set_properties_from_keyword_args(kwargs) diff --git a/efl/elementary/calendar_elm.pyx b/efl/elementary/calendar_elm.pyx index 1368615..efcc493 100644 --- a/efl/elementary/calendar_elm.pyx +++ b/efl/elementary/calendar_elm.pyx @@ -202,7 +202,6 @@ ELM_DAY_LAST = enums.ELM_DAY_LAST cdef class CalendarMark(object): - """ An item for the Calendar widget. @@ -236,9 +235,11 @@ cdef class CalendarMark(object): cdef Elm_Calendar_Mark *obj def __init__(self, evasObject cal, mark_type, mark_time, - Elm_Calendar_Mark_Repeat_Type repeat): - """Create a new Calendar mark + Elm_Calendar_Mark_Repeat_Type repeat): + """CalendarMark(...) + :param parent: The parent object + :type parent: :py:class:`efl.evas.Object` :param mark_type: A string used to define the type of mark. It will be emitted to the theme, that should display a related modification on these days representation. @@ -284,10 +285,21 @@ cdef class CalendarMark(object): elm_calendar_mark_del(self.obj) cdef class Calendar(LayoutClass): + """ - """This is the class that actually implements the widget.""" + This is the class that actually implements the widget. + + """ def __init__(self, evasObject parent, *args, **kwargs): + """Calendar(..) + + :param parent: The parent object + :type parent: :py:class:`efl.evas.Object` + :param \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance + + """ self._set_obj(elm_calendar_add(parent.obj)) self._set_properties_from_keyword_args(kwargs) diff --git a/efl/elementary/check.pyx b/efl/elementary/check.pyx index 8464ab1..b475319 100644 --- a/efl/elementary/check.pyx +++ b/efl/elementary/check.pyx @@ -55,10 +55,21 @@ from efl.evas cimport Object as evasObject from layout_class cimport LayoutClass cdef class Check(LayoutClass): + """ - """This is the class that actually implements the widget.""" + This is the class that actually implements the widget. + + """ def __init__(self, evasObject parent, *args, **kwargs): + """Check(...) + + :param parent: The parent object + :type parent: :py:class:`efl.evas.Object` + :param \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance + + """ self._set_obj(elm_check_add(parent.obj)) self._set_properties_from_keyword_args(kwargs) diff --git a/efl/elementary/clock.pyx b/efl/elementary/clock.pyx index d2b0260..16506bf 100644 --- a/efl/elementary/clock.pyx +++ b/efl/elementary/clock.pyx @@ -115,10 +115,21 @@ ELM_CLOCK_EDIT_SEC_UNIT = enums.ELM_CLOCK_EDIT_SEC_UNIT ELM_CLOCK_EDIT_ALL = enums.ELM_CLOCK_EDIT_ALL cdef class Clock(LayoutClass): + """ - """This is the class that actually implements the widget.""" + This is the class that actually implements the widget. + + """ def __init__(self, evasObject parent, *args, **kwargs): + """Clock(...) + + :param parent: The parent object + :type parent: :py:class:`efl.evas.Object` + :param \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance + + """ self._set_obj(elm_clock_add(parent.obj)) self._set_properties_from_keyword_args(kwargs) diff --git a/efl/elementary/colorselector.pyx b/efl/elementary/colorselector.pyx index ba9118b..6522b4b 100644 --- a/efl/elementary/colorselector.pyx +++ b/efl/elementary/colorselector.pyx @@ -88,12 +88,29 @@ def _cb_object_item_conv(uintptr_t addr): return _object_item_to_python(it) cdef class ColorselectorPaletteItem(ObjectItem): + """ - """An item for the :py:class:`Colorselector` widget.""" + An item for the :py:class:`Colorselector` widget. + + """ cdef int r, g, b, a def __init__(self, int r, int g, int b, int a, *args, **kwargs): + """ColorselectorPaletteItem(...) + + :param r: Red value of color + :type r: int + :param g: Green value of color + :type g: int + :param b: Blue value of color + :type b: int + :param a: Alpha value of color + :type a: int + :param \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance + + """ self.r, self.g, self.b, self.a = r, g, b, a self.args, self.kwargs = args, kwargs @@ -152,10 +169,21 @@ cdef class ColorselectorPaletteItem(ObjectItem): cdef class Colorselector(LayoutClass): + """ + + This is the class that actually implements the widget. - """This is the class that actually implements the widget.""" + """ def __init__(self, evasObject parent, *args, **kwargs): + """Colorselector(...) + + :param parent: The parent object + :type parent: :py:class:`efl.evas.Object` + :param \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance + + """ self._set_obj(elm_colorselector_add(parent.obj)) self._set_properties_from_keyword_args(kwargs) diff --git a/efl/elementary/conformant.pyx b/efl/elementary/conformant.pyx index 1e55e75..ab0af44 100644 --- a/efl/elementary/conformant.pyx +++ b/efl/elementary/conformant.pyx @@ -53,10 +53,21 @@ from efl.evas cimport Object as evasObject from layout_class cimport LayoutClass cdef class Conformant(LayoutClass): + """ - """This is the class that actually implements the widget.""" + This is the class that actually implements the widget. + + """ def __init__(self, evasObject parent, *args, **kwargs): + """Conformant(...) + + :param parent: The parent object + :type parent: :py:class:`efl.evas.Object` + :param \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance + + """ self._set_obj(elm_conformant_add(parent.obj)) self._set_properties_from_keyword_args(kwargs) diff --git a/efl/elementary/ctxpopup.pyx b/efl/elementary/ctxpopup.pyx index dec3584..02f75d4 100644 --- a/efl/elementary/ctxpopup.pyx +++ b/efl/elementary/ctxpopup.pyx @@ -106,8 +106,15 @@ ELM_CTXPOPUP_DIRECTION_UP = enums.ELM_CTXPOPUP_DIRECTION_UP ELM_CTXPOPUP_DIRECTION_UNKNOWN = enums.ELM_CTXPOPUP_DIRECTION_UNKNOWN cdef class CtxpopupItem(ObjectItem): + """ + + An item for Ctxpopup widget. - """An item for Ctxpopup widget.""" + .. warning:: Ctxpopup can't hold both an item list and a content at the + same time. When an item is added, any previous content will be + removed. + + """ cdef: bytes label @@ -115,19 +122,17 @@ cdef class CtxpopupItem(ObjectItem): def __init__(self, label = None, evasObject icon = None, callback = None, cb_data = None, *args, **kargs): - """ - .. warning:: Ctxpopup can't hold both an item list and a content at the - same time. When an item is added, any previous content will be - removed. + """CtxpopupItem(...) - :param icon: Icon to be set on new item - :type icon: :py:class:`~efl.evas.Object` :param label: The Label of the new item :type label: string - :param func: Convenience function called when item selected - :type func: function - :return: The item added or ``None``, on errors - :rtype: :py:class:`CtxpopupItem` + :param icon: Icon to be set on new item + :type icon: :py:class:`efl.evas.Object` + :param callback: Convenience function called when item selected + :type callback: callable + :param cb_data: User data for the callback function + :param \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance """ if callback is not None: @@ -145,10 +150,6 @@ cdef class CtxpopupItem(ObjectItem): def append_to(self, evasObject ctxpopup): """Add a new item to a ctxpopup object. - .. warning:: Ctxpopup can't hold both an item list and a content at the - same time. When an item is added, any previous content will be - removed. - .. seealso:: :py:attr:`~efl.elementary.object.Object.content` :param ctxpopup: The Ctxpopup widget this item is to be appended on @@ -178,10 +179,6 @@ cdef class CtxpopupItem(ObjectItem): def prepend_to(self, evasObject ctxpopup): """Prepend a new item to a ctxpopup object. - .. warning:: Ctxpopup can't hold both an item list and a content at the - same time. When an item is added, any previous content will be - removed. - .. seealso:: :py:attr:`~efl.elementary.object.Object.content` :param ctxpopup: The Ctxpopup widget this item is to be prepended on @@ -234,14 +231,24 @@ cdef class CtxpopupItem(ObjectItem): cdef class Ctxpopup(LayoutClass): - """This is the class that actually implements the widget. + """ + + This is the class that actually implements the widget. .. versionchanged:: 1.8 - Inherits from LayoutClass + Inherits from :py:class:`~efl.elementary.layout_class.LayoutClass` """ def __init__(self, evasObject parent, *args, **kwargs): + """Ctxpopup(...) + + :param parent: The parent object + :type parent: :py:class:`efl.evas.Object` + :param \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance + + """ self._set_obj(elm_ctxpopup_add(parent.obj)) self._set_properties_from_keyword_args(kwargs) diff --git a/efl/elementary/datetime_elm.pyx b/efl/elementary/datetime_elm.pyx index 6163026..0dee36d 100644 --- a/efl/elementary/datetime_elm.pyx +++ b/efl/elementary/datetime_elm.pyx @@ -36,80 +36,58 @@ format. Elm_datetime supports only the following sub set of libc date format specifiers: -**%%Y** - The year as a decimal number including the century (example: 2011). +**%%Y** The year as a decimal number including the century (example: 2011). -**%%y** - The year as a decimal number without a century (range 00 to 99) +**%%y** The year as a decimal number without a century (range 00 to 99) -**%%m** - The month as a decimal number (range 01 to 12). +**%%m** The month as a decimal number (range 01 to 12). -**%%b** - The abbreviated month name according to the current locale. +**%%b** The abbreviated month name according to the current locale. -**%%B** - The full month name according to the current locale. +**%%B** The full month name according to the current locale. -**%%h** - The abbreviated month name according to the current locale(same as %%b). +**%%h** The abbreviated month name according to the current locale(same as %%b). -**%%d** - The day of the month as a decimal number (range 01 to 31). +**%%d** The day of the month as a decimal number (range 01 to 31). -**%%e** - The day of the month as a decimal number (range 1 to 31). single - digits are preceded by a blank. +**%%e** The day of the month as a decimal number (range 1 to 31). single + digits are preceded by a blank. -**%%I** - The hour as a decimal number using a 12-hour clock (range 01 to 12). +**%%I** The hour as a decimal number using a 12-hour clock (range 01 to 12). -**%%H** - The hour as a decimal number using a 24-hour clock (range 00 to 23). +**%%H** The hour as a decimal number using a 24-hour clock (range 00 to 23). -**%%k** - The hour (24-hour clock) as a decimal number (range 0 to 23). single - digits are preceded by a blank. +**%%k** The hour (24-hour clock) as a decimal number (range 0 to 23). single + digits are preceded by a blank. -**%%l** - The hour (12-hour clock) as a decimal number (range 1 to 12); single - digits are preceded by a blank. +**%%l** The hour (12-hour clock) as a decimal number (range 1 to 12); single + digits are preceded by a blank. -**%%M** - The minute as a decimal number (range 00 to 59). +**%%M** The minute as a decimal number (range 00 to 59). -**%%p** - Either 'AM' or 'PM' according to the given time value, or the - corresponding strings for the current locale. Noon is treated as 'PM' - and midnight as 'AM' +**%%p** Either 'AM' or 'PM' according to the given time value, or the + corresponding strings for the current locale. Noon is treated as 'PM' + and midnight as 'AM' -**%%P** - Like %p but in lower case: 'am' or 'pm' or a corresponding string for - the current locale. +**%%P** Like %p but in lower case: 'am' or 'pm' or a corresponding string for + the current locale. -**%%c** - The preferred date and time representation for the current locale. +**%%c** The preferred date and time representation for the current locale. -**%%x** - The preferred date representation for the current locale without the time. +**%%x** The preferred date representation for the current locale without the time. -**%%X** - The preferred time representation for the current locale without the date. +**%%X** The preferred time representation for the current locale without the date. -**%%r** - The complete calendar time using the AM/PM format of the current locale. +**%%r** The complete calendar time using the AM/PM format of the current locale. -**%%R** - The hour and minute in decimal numbers using the format %H:%M. +**%%R** The hour and minute in decimal numbers using the format %H:%M. -**%%T** - The time of day in decimal numbers using the format %H:%M:%S. +**%%T** The time of day in decimal numbers using the format %H:%M:%S. -**%%D** - The date using the format %%m/%%d/%%y. +**%%D** The date using the format %%m/%%d/%%y. + +**%%F** The date using the format %%Y-%%m-%%d. -**%%F** - The date using the format %%Y-%%m-%%d. (For more reference on the available **LIBC date format specifiers**, please visit the link: @@ -194,7 +172,7 @@ The following functions are expected to be implemented in a Datetime module: |__________| |__________| Any module can use the following shared functions that are implemented in -elm_datetime.c : +elm_datetime.c: **field_format_get()** - gives the field format. @@ -207,10 +185,8 @@ To enable a module, set the ELM_MODULES environment variable as shown: This widget emits the following signals, besides the ones sent from :py:class:`~efl.elementary.layout_class.LayoutClass`: -- ``changed`` - whenever Datetime field value is changed, this - signal is sent. -- ``language,changed`` - whenever system locale changes, this - signal is sent. +- ``changed`` - whenever Datetime field value is changed, this signal is sent. +- ``language,changed`` - whenever system locale changes, this signal is sent. - ``focused`` - When the datetime has received focus. (since 1.8) - ``unfocused`` - When the datetime has lost focus. (since 1.8) @@ -269,10 +245,21 @@ ELM_DATETIME_MINUTE = enums.ELM_DATETIME_MINUTE ELM_DATETIME_AMPM = enums.ELM_DATETIME_AMPM cdef class Datetime(Object): + """ + + This is the class that actually implements the widget. - """This is the class that actually implements the widget.""" + """ def __init__(self, evasObject parent, *args, **kwargs): + """Datetime(...) + + :param parent: The parent object + :type parent: :py:class:`efl.evas.Object` + :param \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance + + """ self._set_obj(elm_datetime_add(parent.obj)) self._set_properties_from_keyword_args(kwargs) @@ -290,80 +277,57 @@ cdef class Datetime(Object): Following are the allowed set of format specifiers for each datetime field. - **%%Y** - The year as a decimal number including the century. + **%%Y** The year as a decimal number including the century. - **%%y** - The year as a decimal number without a century (range 00 to 99). + **%%y** The year as a decimal number without a century (range 00 to 99). - **%%m** - The month as a decimal number (range 01 to 12). + **%%m** The month as a decimal number (range 01 to 12). - **%%b** - The abbreviated month name according to the current locale. + **%%b** The abbreviated month name according to the current locale. - **%%B** - The full month name according to the current locale. + **%%B** The full month name according to the current locale. - **%%h** - The abbreviated month name according to the current locale(same as %%b). + **%%h** The abbreviated month name according to the current locale(same as %%b). - **%%d** - The day of the month as a decimal number (range 01 to 31). + **%%d** The day of the month as a decimal number (range 01 to 31). - **%%e** - The day of the month as a decimal number (range 1 to 31). single - digits are preceded by a blank. + **%%e** The day of the month as a decimal number (range 1 to 31). single + digits are preceded by a blank. - **%%I** - The hour as a decimal number using a 12-hour clock (range 01 to 12). + **%%I** The hour as a decimal number using a 12-hour clock (range 01 to 12). - **%%H** - The hour as a decimal number using a 24-hour clock (range 00 to 23). + **%%H** The hour as a decimal number using a 24-hour clock (range 00 to 23). - **%%k** - The hour (24-hour clock) as a decimal number (range 0 to 23). single - digits are preceded by a blank. + **%%k** The hour (24-hour clock) as a decimal number (range 0 to 23). single + digits are preceded by a blank. - **%%l** - The hour (12-hour clock) as a decimal number (range 1 to 12); single - digits are preceded by a blank. + **%%l** The hour (12-hour clock) as a decimal number (range 1 to 12); single + digits are preceded by a blank. - **%%M** - The minute as a decimal number (range 00 to 59). + **%%M** The minute as a decimal number (range 00 to 59). - **%%p** - Either 'AM' or 'PM' according to the given time value, or the - corresponding strings for the current locale. Noon is treated as 'PM' - and midnight as 'AM'. + **%%p** Either 'AM' or 'PM' according to the given time value, or the + corresponding strings for the current locale. Noon is treated as 'PM' + and midnight as 'AM'. - **%%P** - Like %p but in lower case: 'am' or 'pm' or a corresponding string for - the current locale. + **%%P** Like %p but in lower case: 'am' or 'pm' or a corresponding string for + the current locale. - **%%c** - The preferred date and time representation for the current locale. + **%%c** The preferred date and time representation for the current locale. - **%%x** - The preferred date representation for the current locale without the time. + **%%x** The preferred date representation for the current locale without the time. - **%%X** - The preferred time representation for the current locale without the date. + **%%X** The preferred time representation for the current locale without the date. - **%%r** - The complete calendar time using the AM/PM format of the current locale. + **%%r** The complete calendar time using the AM/PM format of the current locale. - **%%R** - The hour and minute in decimal numbers using the format %H:%M. + **%%R** The hour and minute in decimal numbers using the format %H:%M. - **%%T** - The time of day in decimal numbers using the format %H:%M:%S. + **%%T** The time of day in decimal numbers using the format %H:%M:%S. - **%%D** - The date using the format %%m/%%d/%%y. + **%%D** The date using the format %%m/%%d/%%y. - **%%F** - The date using the format %%Y-%%m-%%d. + **%%F** The date using the format %%Y-%%m-%%d. These specifiers can be arranged in any order and the widget will display the fields accordingly. diff --git a/efl/elementary/dayselector.pyx b/efl/elementary/dayselector.pyx index 18cfd77..40372a5 100644 --- a/efl/elementary/dayselector.pyx +++ b/efl/elementary/dayselector.pyx @@ -126,10 +126,21 @@ ELM_DAYSELECTOR_SAT = enums.ELM_DAYSELECTOR_SAT ELM_DAYSELECTOR_MAX = enums.ELM_DAYSELECTOR_MAX cdef class Dayselector(LayoutClass): + """ - """This is the class that actually implements the widget.""" + This is the class that actually implements the widget. + + """ def __init__(self, evasObject parent, *args, **kwargs): + """Dayselector(...) + + :param parent: The parent object + :type parent: :py:class:`efl.evas.Object` + :param \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance + + """ self._set_obj(elm_dayselector_add(parent.obj)) self._set_properties_from_keyword_args(kwargs) diff --git a/efl/elementary/diskselector.pyx b/efl/elementary/diskselector.pyx index e55ec4a..dafd6b1 100644 --- a/efl/elementary/diskselector.pyx +++ b/efl/elementary/diskselector.pyx @@ -88,9 +88,11 @@ def _cb_object_item_conv(uintptr_t addr): cdef Elm_Object_Item *it = <Elm_Object_Item *>addr return _object_item_to_python(it) + cdef class DiskselectorItem(ObjectItem): + """ - """An item for the Diskselector widget. + An item for the :py:class:`Diskselector` widget. A new item will be created and appended to the diskselector, i.e., will be set as last item. Also, if there is no selected item, it will @@ -126,7 +128,7 @@ cdef class DiskselectorItem(ObjectItem): def __init__(self, label=None, evasObject icon=None, callback=None, cb_data=None, *args, **kargs): - """ + """DiskselectorItem(...) :param label: The label of the diskselector item. :type label: string @@ -134,8 +136,11 @@ cdef class DiskselectorItem(ObjectItem): icon can be any Evas object, but usually it is an :py:class:`~efl.elementary.icon.Icon`. :type icon: :py:class:`~efl.evas.Object` - :param func: The function to call when the item is selected. - :type func: function + :param callback: The function to call when the item is selected. + :type callback: callable + :param cb_data: User data for the callback function + :param \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance """ if callback is not None: @@ -243,10 +248,21 @@ cdef class DiskselectorItem(ObjectItem): return _object_item_to_python(it) cdef class Diskselector(Object): + """ - """This is the class that actually implements the widget.""" + This is the class that actually implements the widget. + + """ def __init__(self, evasObject parent, *args, **kwargs): + """Diskselector(...) + + :param parent: The parent object + :type parent: :py:class:`efl.evas.Object` + :param \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance + + """ self._set_obj(elm_diskselector_add(parent.obj)) self._set_properties_from_keyword_args(kwargs) diff --git a/efl/elementary/entry.pyx b/efl/elementary/entry.pyx index 385b1a3..5ea2a56 100644 --- a/efl/elementary/entry.pyx +++ b/efl/elementary/entry.pyx @@ -680,14 +680,12 @@ cdef void _entry_context_menu_callback(void *data, Evas_Object *obj, void *event @DEPRECATED("1.8", "Use markup_to_utf8() instead.") def Entry_markup_to_utf8(string): - """Entry_markup_to_utf8(string)""" if isinstance(string, unicode): string = PyUnicode_AsUTF8String(string) return _touni(elm_entry_markup_to_utf8( <const char *>string if string is not None else NULL)) @DEPRECATED("1.8", "Use utf8_to_markup() instead.") def Entry_utf8_to_markup(string): - """Entry_utf8_to_markup(string)""" if isinstance(string, unicode): string = PyUnicode_AsUTF8String(string) return _touni(elm_entry_utf8_to_markup( <const char *>string if string is not None else NULL)) @@ -703,7 +701,7 @@ def utf8_to_markup(string): <const char *>string if string is not None else NULL)) cdef class EntryContextMenuItem(object): - """ + """EntryContextMenuItem(...) Type of contextual item that can be added in to long press menu. @@ -715,8 +713,6 @@ cdef class EntryContextMenuItem(object): property label: """Get the text of the contextual menu item. - Gets the text of the contextual menu item of entry. - :type: unicode .. versionadded:: 1.8 @@ -728,8 +724,6 @@ cdef class EntryContextMenuItem(object): property icon: """Get the icon object of the contextual menu item. - Gets the icon object packed in the contextual menu item of entry. - :type: (unicode **icon_file**, unicode **icon_group**, :ref:`Icon type <Elm_Icon_Type>` **icon_type**) .. versionadded:: 1.8 @@ -849,9 +843,10 @@ cdef void py_elm_entry_filter_cb(void *data, Evas_Object *entry, char **text) wi text[0] = strdup(<char *>ret) class EntryAnchorInfo(object): - """ + """EntryAnchorInfo(...) - The info sent in the callback for the "anchor,clicked" signals emitted by entries. + The info sent in the callback for the ``anchor,clicked`` signals emitted + by entries. :var name: The name of the anchor, as stated in its href. :var button: The mouse button used to click on it. @@ -870,9 +865,10 @@ class EntryAnchorInfo(object): self.h = 0 class EntryAnchorHoverInfo(object): - """ + """EntryAnchorHoverInfo(...) - The info sent in the callback for "anchor,clicked" signals emitted by the Anchor_Hover widget. + The info sent in the callback for ``anchor,clicked`` signals emitted by + the entries. :var anchor_info: The actual anchor info. :var hover: The hover object to use for the popup. @@ -917,11 +913,19 @@ def _entryanchorhover_conv(uintptr_t addr): return eahi cdef class Entry(LayoutClass): + """ + + This is the class that actually implements the widget. + + By default, entries are: - """This is the class that actually implements the widget. + - not scrolled + - multi-line + - word wrapped + - autosave is enabled .. versionchanged:: 1.8 - Inherits from LayoutClass. + Inherits from :py:class:`~efl.elementary.layout_class.LayoutClass`. """ @@ -931,25 +935,24 @@ cdef class Entry(LayoutClass): self.markup_filters = [] def __init__(self, evasObject parent, *args, **kwargs): - """By default, entries are: - - - not scrolled - - multi-line - - word wrapped - - autosave is enabled + """Entry(...) :param parent: The parent object - :type parent: :py:class:`~efl.elementary.object.Object` + :type parent: :py:class:`efl.evas.Object` + :param \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance """ self._set_obj(elm_entry_add(parent.obj)) self._set_properties_from_keyword_args(kwargs) def text_style_user_push(self, style): - """Push the style to the top of user style stack. If there is styles in the - user style stack, the properties in the top style of user style stack - will replace the properties in current theme. The input style is - specified in format ``tag='property=value'`` (i.e. ``DEFAULT='font=Sans + """Push the style to the top of user style stack. + + If there is styles in the user style stack, the properties in the + top style of user style stack will replace the properties in current + theme. The input style is specified in format + ``tag='property=value'`` (i.e. ``DEFAULT='font=Sans font_size=60'hilight=' + font_weight=Bold'``). :param string style: The style user to push diff --git a/efl/elementary/fileselector.pyx b/efl/elementary/fileselector.pyx index c21d7e5..cf44cc0 100644 --- a/efl/elementary/fileselector.pyx +++ b/efl/elementary/fileselector.pyx @@ -177,10 +177,21 @@ cdef Eina_Bool py_elm_fileselector_custom_filter_cb(const char *path, Eina_Bool cdef class Fileselector(LayoutClass): + """ - """This is the class that actually implements the widget.""" + This is the class that actually implements the widget. + + """ def __init__(self, evasObject parent, *args, **kwargs): + """Fileselector(...) + + :param parent: The parent object + :type parent: :py:class:`efl.evas.Object` + :param \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance + + """ self._set_obj(elm_fileselector_add(parent.obj)) self._set_properties_from_keyword_args(kwargs) diff --git a/efl/elementary/fileselector_button.pyx b/efl/elementary/fileselector_button.pyx index fe55917..a566b98 100644 --- a/efl/elementary/fileselector_button.pyx +++ b/efl/elementary/fileselector_button.pyx @@ -95,10 +95,21 @@ def _cb_string_conv(uintptr_t addr): return _ctouni(s) if s is not NULL else None cdef class FileselectorButton(Button): + """ - """This is the class that actually implements the widget.""" + This is the class that actually implements the widget. + + """ def __init__(self, evasObject parent, *args, **kwargs): + """FileselectorButton(...) + + :param parent: The parent object + :type parent: :py:class:`efl.evas.Object` + :param \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance + + """ self._set_obj(elm_fileselector_button_add(parent.obj)) self._set_properties_from_keyword_args(kwargs) diff --git a/efl/elementary/fileselector_entry.pyx b/efl/elementary/fileselector_entry.pyx index 4faf6a5..e9678b3 100644 --- a/efl/elementary/fileselector_entry.pyx +++ b/efl/elementary/fileselector_entry.pyx @@ -111,8 +111,9 @@ def _cb_string_conv(uintptr_t addr): return _ctouni(s) if s is not NULL else None cdef class FileselectorEntry(LayoutClass): + """ - """This is the class that actually implements the widget. + This is the class that actually implements the widget. .. versionchanged:: 1.8 Inherits from LayoutClass. @@ -120,6 +121,14 @@ cdef class FileselectorEntry(LayoutClass): """ def __init__(self, evasObject parent, *args, **kwargs): + """FileselectorEntry(...) + + :param parent: The parent object + :type parent: :py:class:`efl.evas.Object` + :param \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance + + """ self._set_obj(elm_fileselector_entry_add(parent.obj)) self._set_properties_from_keyword_args(kwargs) diff --git a/efl/elementary/flip.pyx b/efl/elementary/flip.pyx index 2839001..91ed6f4 100644 --- a/efl/elementary/flip.pyx +++ b/efl/elementary/flip.pyx @@ -203,7 +203,6 @@ ELM_FLIP_PAGE_UP = enums.ELM_FLIP_PAGE_UP ELM_FLIP_PAGE_DOWN = enums.ELM_FLIP_PAGE_DOWN cdef class Flip(Object): - """ This is the class that actually implement the widget. @@ -211,6 +210,14 @@ cdef class Flip(Object): """ def __init__(self, evasObject parent, *args, **kwargs): + """Flip(...) + + :param parent: The parent object + :type parent: :py:class:`efl.evas.Object` + :param \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance + + """ self._set_obj(elm_flip_add(parent.obj)) self._set_properties_from_keyword_args(kwargs) diff --git a/efl/elementary/flipselector.pyx b/efl/elementary/flipselector.pyx index d2b782f..a87329b 100644 --- a/efl/elementary/flipselector.pyx +++ b/efl/elementary/flipselector.pyx @@ -70,11 +70,15 @@ def _cb_object_item_conv(uintptr_t addr): return _object_item_to_python(it) cdef class FlipSelectorItem(ObjectItem): - """ An item for the :py:class:`FlipSelector` widget. + The widget's list of labels to show will be appended with the + given value. If the user wishes so, a callback function + can be passed, which will get called when this same item is + selected. + .. note:: The current selection *won't* be modified by appending an element to the list. @@ -89,21 +93,16 @@ cdef class FlipSelectorItem(ObjectItem): def __init__(self, label = None, callback = None, cb_data = None, *args, **kwargs): - """ - - The widget's list of labels to show will be appended with the - given value. If the user wishes so, a callback function - can be passed, which will get called when this same item is - selected. + """FlipSelectorItem(...) :param label: The (text) label of the new item :type label: string - :param func: Convenience callback function to take place when item + :param callback: Convenience callback function to take place when item is selected - :type func: function - - :return: A handle to the item added or ``None``, on errors - :rtype: :py:class:`FlipSelectorItem` + :type callback: callable + :param cb_data: User data for the callback function + :param \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance """ @@ -226,10 +225,21 @@ cdef class FlipSelectorItem(ObjectItem): elm_flipselector_item_next_get(self.item)) cdef class FlipSelector(Object): + """ + + This is the class that actually implements the widget. - """This is the class that actually implements the widget.""" + """ def __init__(self, evasObject parent, *args, **kwargs): + """FlipSelector(...) + + :param parent: The parent object + :type parent: :py:class:`efl.evas.Object` + :param \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance + + """ self._set_obj(elm_flipselector_add(parent.obj)) self._set_properties_from_keyword_args(kwargs) diff --git a/efl/elementary/frame.pyx b/efl/elementary/frame.pyx index 149a988..7e5c6f7 100644 --- a/efl/elementary/frame.pyx +++ b/efl/elementary/frame.pyx @@ -58,10 +58,21 @@ from efl.evas cimport Object as evasObject from layout_class cimport LayoutClass cdef class Frame(LayoutClass): + """ - """This is the class that actually implements the widget.""" + This is the class that actually implements the widget. + + """ def __init__(self, evasObject parent, *args, **kwargs): + """Frame(...) + + :param parent: The parent object + :type parent: :py:class:`efl.evas.Object` + :param \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance + + """ self._set_obj(elm_frame_add(parent.obj)) self._set_properties_from_keyword_args(kwargs) diff --git a/efl/elementary/gengrid_item.pxi b/efl/elementary/gengrid_item.pxi index a535bf5..df5db48 100644 --- a/efl/elementary/gengrid_item.pxi +++ b/efl/elementary/gengrid_item.pxi @@ -1,6 +1,9 @@ cdef class GengridItem(ObjectItem): + """ - """An item for the :py:class:`Gengrid` widget.""" + An item for the :py:class:`Gengrid` widget. + + """ cdef: readonly GengridItemClass item_class diff --git a/efl/elementary/gengrid_widget.pxi b/efl/elementary/gengrid_widget.pxi index d9cab8a..86f615a 100644 --- a/efl/elementary/gengrid_widget.pxi +++ b/efl/elementary/gengrid_widget.pxi @@ -1,10 +1,21 @@ #include "cnp_callbacks.pxi" cdef class Gengrid(Object): + """ - """This is the class that actually implements the widget.""" + This is the class that actually implements the widget. + + """ def __init__(self, evasObject parent, *args, **kwargs): + """Gengrid(...) + + :param parent: The parent object + :type parent: :py:class:`efl.evas.Object` + :param \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance + + """ self._set_obj(elm_gengrid_add(parent.obj)) self._set_properties_from_keyword_args(kwargs) diff --git a/efl/elementary/genlist_item.pxi b/efl/elementary/genlist_item.pxi index a5f84cc..32e0335 100644 --- a/efl/elementary/genlist_item.pxi +++ b/efl/elementary/genlist_item.pxi @@ -1,6 +1,9 @@ cdef class GenlistItem(ObjectItem): + """ - """An item for the :py:class:`Genlist` widget.""" + An item for the :py:class:`Genlist` widget. + + """ cdef: readonly GenlistItemClass item_class @@ -8,12 +11,11 @@ cdef class GenlistItem(ObjectItem): int flags object comparison_func, item_data, func_data - def __init__(self, - GenlistItemClass item_class not None, item_data=None, - GenlistItem parent_item=None, - Elm_Genlist_Item_Type flags=enums.ELM_GENLIST_ITEM_NONE, - func=None, func_data=None, *args, **kwargs): - """Create a new GenlistItem. + def __init__(self, GenlistItemClass item_class not None, item_data=None, + GenlistItem parent_item=None, + Elm_Genlist_Item_Type flags=enums.ELM_GENLIST_ITEM_NONE, + func=None, func_data=None, *args, **kwargs): + """GenlistItem(...) :param item_data: Data that defines the model of this row. This value will be given to methods of ``item_class`` such as diff --git a/efl/elementary/genlist_widget.pxi b/efl/elementary/genlist_widget.pxi index dc6aa00..c23c95e 100644 --- a/efl/elementary/genlist_widget.pxi +++ b/efl/elementary/genlist_widget.pxi @@ -3,10 +3,21 @@ from efl.eo cimport _object_mapping_register, PY_REFCOUNT #include "cnp_callbacks.pxi" cdef class Genlist(Object): + """ - """This is the class that actually implements the widget.""" + This is the class that actually implements the widget. + + """ def __init__(self, evasObject parent not None, *args, **kwargs): + """Genlist(...) + + :param parent: The parent object + :type parent: :py:class:`efl.evas.Object` + :param \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance + + """ self._set_obj(elm_genlist_add(parent.obj)) self._set_properties_from_keyword_args(kwargs) diff --git a/efl/elementary/gesture_layer.pyx b/efl/elementary/gesture_layer.pyx index 62653e9..ca2c010 100644 --- a/efl/elementary/gesture_layer.pyx +++ b/efl/elementary/gesture_layer.pyx @@ -189,8 +189,11 @@ ELM_GESTURE_LAST = enums.ELM_GESTURE_LAST cdef class GestureTapsInfo(object): + """GestureTapsInfo(...) - """Holds taps info for user""" + Holds taps info for user + + """ cdef Elm_Gesture_Taps_Info *info @@ -231,8 +234,7 @@ cdef class GestureTapsInfo(object): return self.info.timestamp cdef class GestureMomentumInfo(object): - - """ + """GestureMomentumInfo(...) Holds momentum info for user x1 and y1 are not necessarily in sync @@ -326,15 +328,18 @@ cdef class GestureMomentumInfo(object): return self.info.n cdef class GestureLineInfo(object): + """GestureLineInfo(...) - """Holds line info for user""" + Holds line info for user + + """ cdef Elm_Gesture_Line_Info *info property momentum: """Line momentum info - :type: GestureMomentumInfo + :type: :py:class:`GestureMomentumInfo` """ def __get__(self): @@ -352,8 +357,11 @@ cdef class GestureLineInfo(object): return self.info.angle cdef class GestureZoomInfo(object): + """GestureZoomInfo(...) + + Holds zoom info for user - """Holds zoom info for user""" + """ cdef Elm_Gesture_Zoom_Info *info @@ -403,8 +411,11 @@ cdef class GestureZoomInfo(object): return self.info.momentum cdef class GestureRotateInfo(object): + """GestureRotateInfo(...) + + Holds rotation info for user - """Holds rotation info for user""" + """ cdef Elm_Gesture_Rotate_Info *info @@ -513,24 +524,22 @@ cdef Evas_Event_Flags _gesture_layer_rotate_event_cb(void *data, void *event_inf traceback.print_exc() cdef class GestureLayer(Object): - """ This is the class that actually implement the widget. + .. note:: You have to call :py:func:`attach()` in order to 'activate' + gesture-layer. + """ def __init__(self, evasObject parent, *args, **kwargs): - """Call this function to construct a new gesture-layer object. - - This does not activate the gesture layer. You have to call - :py:func:`attach()` in order to 'activate' gesture-layer. + """GestureLayer(...) :param parent: The gesture layer's parent widget. :type parent: :py:class:`~efl.evas.Object` - - :return: A new gesture layer object. - :rtype: :py:class:`GestureLayer` + :param \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance """ self._set_obj(elm_gesture_layer_add(parent.obj)) diff --git a/efl/elementary/glview.pyx b/efl/elementary/glview.pyx index 384442a..cab7190 100644 --- a/efl/elementary/glview.pyx +++ b/efl/elementary/glview.pyx @@ -165,12 +165,23 @@ cdef void py_elm_glview_render_func_cb(Evas_Object *obj): traceback.print_exc() cdef class GLView(LayoutClass): + """ - """This is the class that actually implements the widget.""" + This is the class that actually implements the widget. + + """ cdef object init_func_cb, del_func_cb, resize_func_cb, render_func_cb def __init__(self, evasObject parent, *args, **kwargs): + """GLView(...) + + :param parent: The parent object + :type parent: :py:class:`efl.evas.Object` + :param \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance + + """ self._set_obj(elm_glview_add(parent.obj)) self._set_properties_from_keyword_args(kwargs) diff --git a/efl/elementary/grid.pyx b/efl/elementary/grid.pyx index ea0d356..0950114 100644 --- a/efl/elementary/grid.pyx +++ b/efl/elementary/grid.pyx @@ -42,7 +42,6 @@ from object cimport Object from efl.utils.conversions cimport eina_list_objects_to_python_list cdef class Grid(Object): - """ This is the class that actually implement the widget. @@ -50,6 +49,14 @@ cdef class Grid(Object): """ def __init__(self, evasObject parent, *args, **kwargs): + """Grid(...) + + :param parent: The parent object + :type parent: :py:class:`efl.evas.Object` + :param \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance + + """ self._set_obj(elm_grid_add(parent.obj)) self._set_properties_from_keyword_args(kwargs) diff --git a/efl/elementary/hover.pyx b/efl/elementary/hover.pyx index 32eb691..7579f79 100644 --- a/efl/elementary/hover.pyx +++ b/efl/elementary/hover.pyx @@ -124,7 +124,6 @@ ELM_HOVER_AXIS_VERTICAL = enums.ELM_HOVER_AXIS_VERTICAL ELM_HOVER_AXIS_BOTH = enums.ELM_HOVER_AXIS_BOTH cdef class Hover(LayoutClass): - """ This is the class that actually implement the widget. @@ -132,6 +131,14 @@ cdef class Hover(LayoutClass): """ def __init__(self, evasObject parent, *args, **kwargs): + """Hover(...) + + :param parent: The parent object + :type parent: :py:class:`efl.evas.Object` + :param \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance + + """ self._set_obj(elm_hover_add(parent.obj)) self._set_properties_from_keyword_args(kwargs) diff --git a/efl/elementary/hoversel.pyx b/efl/elementary/hoversel.pyx index d91a341..c9e9dbb 100644 --- a/efl/elementary/hoversel.pyx +++ b/efl/elementary/hoversel.pyx @@ -96,11 +96,13 @@ def _cb_object_item_conv(uintptr_t addr): return _object_item_to_python(it) cdef class HoverselItem(ObjectItem): - """ An item for the :py:class:`Hoversel` widget. + For more information on what ``icon_file`` and ``icon_type`` are, + see :py:class:`~efl.elementary.icon.Icon`. + """ cdef: object label, icon_file, icon_group @@ -109,8 +111,7 @@ cdef class HoverselItem(ObjectItem): def __init__(self, label = None, icon_file = None, icon_type = ELM_ICON_NONE, callback = None, cb_data = None, *args, **kwargs): - """For more information on what ``icon_file`` and ``icon_type`` are, - see :py:class:`~efl.elementary.icon.Icon`. + """HoverselItem(...) :param label: The text label to use for the item (None if not desired) :type label: string @@ -122,6 +123,9 @@ cdef class HoverselItem(ObjectItem): :param callback: Convenience function to call when this item is selected :type callback: function + :param cb_data: User data for the callback function + :param \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance """ if isinstance(label, unicode): label = PyUnicode_AsUTF8String(label) @@ -237,10 +241,21 @@ cdef class HoverselItem(ObjectItem): return (_ctouni(icon_file), _ctouni(icon_group), icon_type) cdef class Hoversel(Button): + """ + + This is the class that actually implements the widget. - """This is the class that actually implements the widget.""" + """ def __init__(self, evasObject parent, *args, **kwargs): + """Hoversel(...) + + :param parent: The parent object + :type parent: :py:class:`efl.evas.Object` + :param \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance + + """ self._set_obj(elm_hoversel_add(parent.obj)) self._set_properties_from_keyword_args(kwargs) diff --git a/efl/elementary/icon.pyx b/efl/elementary/icon.pyx index 664570f..7360d1c 100644 --- a/efl/elementary/icon.pyx +++ b/efl/elementary/icon.pyx @@ -206,10 +206,21 @@ ELM_ICON_FILE = enums.ELM_ICON_FILE ELM_ICON_STANDARD = enums.ELM_ICON_STANDARD cdef class Icon(Image): + """ - """This is the class that actually implements the widget.""" + This is the class that actually implements the widget. + + """ def __init__(self, evasObject parent, *args, **kwargs): + """Icon(...) + + :param parent: The parent object + :type parent: :py:class:`efl.evas.Object` + :param \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance + + """ self._set_obj(elm_icon_add(parent.obj)) self._set_properties_from_keyword_args(kwargs) diff --git a/efl/elementary/image.pyx b/efl/elementary/image.pyx index 1b57e1a..f0adc2e 100644 --- a/efl/elementary/image.pyx +++ b/efl/elementary/image.pyx @@ -117,10 +117,10 @@ def _cb_string_conv(uintptr_t addr): return _ctouni(s) if s is not NULL else None class ImageProgressInfo(object): - """ + """ImageProgressInfo(...) - The info sent in the callback for the "download,progress" signals emitted - by Image while downloading remote urls. + The info sent in the callback for the ``download,progress`` signals emitted + by :class:`Image` while downloading remote urls. :var now: The amount of data received so far. :var total: The total amount of data to download. @@ -140,10 +140,10 @@ def _image_download_progress_conv(uintptr_t addr): return ipi class ImageErrorInfo(object): - """ + """ImageErrorInfo(...) - The info sent in the callback for the "download,error" signals emitted - by Image when fail to download remote urls. + The info sent in the callback for the ``download,error`` signals emitted + by :class:`Image` when fail to download remote urls. :var status: The http error code (such as 401) :var open_error: TODO @@ -165,10 +165,21 @@ def _image_download_error_conv(uintptr_t addr): cdef class Image(Object): + """ + + This is the class that actually implements the widget. - """This is the class that actually implements the widget.""" + """ def __init__(self, evasObject parent, *args, **kwargs): + """Image(...) + + :param parent: The parent object + :type parent: :py:class:`efl.evas.Object` + :param \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance + + """ self._set_obj(elm_image_add(parent.obj)) self._set_properties_from_keyword_args(kwargs) diff --git a/efl/elementary/index.pyx b/efl/elementary/index.pyx index c563030..fc43d21 100644 --- a/efl/elementary/index.pyx +++ b/efl/elementary/index.pyx @@ -133,7 +133,6 @@ cdef int _index_data_compare_func(const void *data1, const void *data2) with gil return 0 cdef class IndexItem(ObjectItem): - """ An item on an :py:class:`Index` widget. @@ -148,15 +147,16 @@ cdef class IndexItem(ObjectItem): :param letter: Letter under which the item should be indexed :type letter: string :param callback: The function to call when the item is selected. - :type callback: function - + :type callback: callable + :param cb_data: User data for the callback function + :param \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance """ cdef: bytes letter object compare_func, data_compare_func - def __init__(self, letter, callback = None, cb_data = None, - *args, **kwargs): + def __init__(self, letter, callback = None, cb_data = None, *args, **kwargs): if callback is not None: if not callable(callback): raise TypeError("callback is not callable") @@ -348,10 +348,21 @@ cdef class IndexItem(ObjectItem): cdef class Index(LayoutClass): + """ + + This is the class that actually implements the widget. - """This is the class that actually implements the widget.""" + """ def __init__(self, evasObject parent, *args, **kwargs): + """Index(...) + + :param parent: The parent object + :type parent: :py:class:`efl.evas.Object` + :param \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance + + """ self._set_obj(elm_index_add(parent.obj)) self._set_properties_from_keyword_args(kwargs) diff --git a/efl/elementary/innerwindow.pyx b/efl/elementary/innerwindow.pyx index d288043..6d80c28 100644 --- a/efl/elementary/innerwindow.pyx +++ b/efl/elementary/innerwindow.pyx @@ -51,10 +51,21 @@ from efl.evas cimport Object as evasObject from layout_class cimport LayoutClass cdef class InnerWindow(LayoutClass): + """ - """This is the class that actually implements the widget.""" + This is the class that actually implements the widget. + + """ def __init__(self, evasObject parent, *args, **kwargs): + """InnerWindow(...) + + :param parent: The parent object + :type parent: :py:class:`efl.evas.Object` + :param \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance + + """ self._set_obj(elm_win_inwin_add(parent.obj)) self._set_properties_from_keyword_args(kwargs) diff --git a/efl/elementary/label.pyx b/efl/elementary/label.pyx index 1caadac..4d77a55 100644 --- a/efl/elementary/label.pyx +++ b/efl/elementary/label.pyx @@ -113,10 +113,21 @@ ELM_LABEL_SLIDE_MODE_ALWAYS = enums.ELM_LABEL_SLIDE_MODE_ALWAYS cdef class Label(LayoutClass): + """ - """This is the class that actually implements the widget.""" + This is the class that actually implements the widget. + + """ def __init__(self, evasObject parent, *args, **kwargs): + """Label(...) + + :param parent: The parent object + :type parent: :py:class:`efl.evas.Object` + :param \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance + + """ self._set_obj(elm_label_add(parent.obj)) self._set_properties_from_keyword_args(kwargs) diff --git a/efl/elementary/layout.pyx b/efl/elementary/layout.pyx index d745c1f..dbdab28 100644 --- a/efl/elementary/layout.pyx +++ b/efl/elementary/layout.pyx @@ -142,10 +142,21 @@ from efl.evas cimport Object as evasObject from layout_class cimport LayoutClass cdef class Layout(LayoutClass): + """ - """This is the class that actually implements the widget.""" + This is the class that actually implements the widget. + + """ def __init__(self, evasObject parent, *args, **kwargs): + """Layout(...) + + :param parent: The parent object + :type parent: :py:class:`efl.evas.Object` + :param \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance + + """ self._set_obj(elm_layout_add(parent.obj)) self._set_properties_from_keyword_args(kwargs) diff --git a/efl/elementary/layout_class.pyx b/efl/elementary/layout_class.pyx index adffa87..edbd313 100644 --- a/efl/elementary/layout_class.pyx +++ b/efl/elementary/layout_class.pyx @@ -36,7 +36,6 @@ cdef void layout_signal_callback(void *data, Evas_Object *obj, traceback.print_exc() cdef class LayoutClass(Object): - """ Elementary, besides having the :py:class:`~efl.elementary.layout.Layout` diff --git a/efl/elementary/list.pyx b/efl/elementary/list.pyx index a084c3c..6057972 100644 --- a/efl/elementary/list.pyx +++ b/efl/elementary/list.pyx @@ -195,16 +195,20 @@ def _cb_object_item_conv(uintptr_t addr): return _object_item_to_python(it) cdef class ListItem(ObjectItem): + """ + + An item for the list widget. + + """ - """An item for the list widget.""" cdef: object label Evas_Object *icon_obj Evas_Object *end_obj - def __init__(self, label = None, evasObject icon = None, - evasObject end = None, callback = None, cb_data = None, *args, **kargs): - """Create a new ListItem + def __init__(self, label=None, evasObject icon=None, evasObject end=None, + callback=None, cb_data=None, *args, **kargs): + """ListItem(...) :param string label: The label of the list item. :param icon: The icon object to use for the left side of the item. An @@ -215,7 +219,9 @@ cdef class ListItem(ObjectItem): icon can be any Evas object. :type end: :py:class:`~efl.evas.Object` :param callable callback: The function to call when the item is clicked. - :param cb_data: An object associated with the callback. + :param cb_data: User data for the callback function + :param \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance """ if isinstance(label, unicode): label = PyUnicode_AsUTF8String(label) @@ -579,7 +585,6 @@ cdef class ListItem(ObjectItem): cdef class List(Object): - """ This is the class that actually implement the widget. @@ -587,6 +592,14 @@ cdef class List(Object): """ def __init__(self, evasObject parent, *args, **kwargs): + """List(...) + + :param parent: The parent object + :type parent: :py:class:`efl.evas.Object` + :param \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance + + """ self._set_obj(elm_list_add(parent.obj)) self._set_properties_from_keyword_args(kwargs) diff --git a/efl/elementary/map.pyx b/efl/elementary/map.pyx index ceab8d2..33101be 100644 --- a/efl/elementary/map.pyx +++ b/efl/elementary/map.pyx @@ -949,6 +949,14 @@ cdef class Map(Object): """ def __init__(self, evasObject parent, *args, **kwargs): + """Map(...) + + :param parent: The parent object + :type parent: :py:class:`efl.evas.Object` + :param \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance + + """ self._set_obj(elm_map_add(parent.obj)) self._set_properties_from_keyword_args(kwargs) diff --git a/efl/elementary/mapbuf.pyx b/efl/elementary/mapbuf.pyx index 1b64061..941c04f 100644 --- a/efl/elementary/mapbuf.pyx +++ b/efl/elementary/mapbuf.pyx @@ -41,10 +41,21 @@ from efl.evas cimport Object as evasObject from object cimport Object cdef class Mapbuf(Object): + """ - """This is the class that actually implements the widget.""" + This is the class that actually implements the widget. + + """ def __init__(self, evasObject parent, *args, **kwargs): + """Mapbuf(...) + + :param parent: The parent object + :type parent: :py:class:`efl.evas.Object` + :param \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance + + """ self._set_obj(elm_mapbuf_add(parent.obj)) self._set_properties_from_keyword_args(kwargs) diff --git a/efl/elementary/menu.pyx b/efl/elementary/menu.pyx index 9e176bc..a3dc528 100644 --- a/efl/elementary/menu.pyx +++ b/efl/elementary/menu.pyx @@ -53,8 +53,11 @@ from object_item cimport _object_item_callback, _object_item_list_to_python, \ _object_item_to_python, _object_item_callback2, ObjectItem cdef class MenuItem(ObjectItem): + """ - """An item for the :py:class:`Menu` widget.""" + An item for the :class:`Menu` widget. + + """ cdef: MenuItem parent @@ -229,8 +232,11 @@ cdef class MenuItem(ObjectItem): return _object_item_to_python(elm_menu_item_prev_get(self.item)) cdef class MenuSeparatorItem(ObjectItem): + """ + + A separator type menu item. - """A separator type menu item.""" + """ cdef MenuItem parent @@ -299,10 +305,21 @@ cdef class MenuSeparatorItem(ObjectItem): return _object_item_to_python(elm_menu_item_prev_get(self.item)) cdef class Menu(Object): + """ + + This is the class that actually implements the widget. - """This is the class that actually implements the widget.""" + """ def __init__(self, evasObject parent, *args, **kwargs): + """Menu(...) + + :param parent: The parent object + :type parent: :py:class:`efl.evas.Object` + :param \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance + + """ self._set_obj(elm_menu_add(parent.obj)) self._set_properties_from_keyword_args(kwargs) diff --git a/efl/elementary/multibuttonentry.pyx b/efl/elementary/multibuttonentry.pyx index 65c5f23..195de8b 100644 --- a/efl/elementary/multibuttonentry.pyx +++ b/efl/elementary/multibuttonentry.pyx @@ -114,8 +114,11 @@ cdef char * _multibuttonentry_format_cb(int count, void *data) with gil: cdef class MultiButtonEntryItem(ObjectItem): + """ - """An item for the MultiButtonEntry widget.""" + An item for the MultiButtonEntry widget. + + """ cdef: bytes label @@ -254,10 +257,21 @@ cdef void _py_elm_mbe_item_added_cb( it._set_obj(item) cdef class MultiButtonEntry(Object): + """ + + This is the class that actually implements the widget. - """This is the class that actually implements the widget.""" + """ def __init__(self, evasObject parent, *args, **kwargs): + """MultiButtonEntry(...) + + :param parent: The parent object + :type parent: :py:class:`efl.evas.Object` + :param \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance + + """ self._set_obj(elm_multibuttonentry_add(parent.obj)) evas_object_smart_callback_add( self.obj, "item,added", diff --git a/efl/elementary/naviframe.pyx b/efl/elementary/naviframe.pyx index e66d3f0..ce7260b 100644 --- a/efl/elementary/naviframe.pyx +++ b/efl/elementary/naviframe.pyx @@ -106,8 +106,11 @@ from object_item cimport _object_item_to_python, _object_item_list_to_python, \ from efl.utils.deprecated cimport DEPRECATED cdef class NaviframeItem(ObjectItem): + """ - """An item for the Naviframe widget.""" + An item for the Naviframe widget. + + """ cdef: object label, item_style @@ -389,10 +392,21 @@ cdef class NaviframeItem(ObjectItem): cdef class Naviframe(LayoutClass): + """ + + This is the class that actually implements the widget. - """This is the class that actually implements the widget.""" + """ def __init__(self, evasObject parent, *args, **kwargs): + """Naviframe(...) + + :param parent: The parent object + :type parent: :py:class:`efl.evas.Object` + :param \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance + + """ self._set_obj(elm_naviframe_add(parent.obj)) self._set_properties_from_keyword_args(kwargs) diff --git a/efl/elementary/notify.pyx b/efl/elementary/notify.pyx index 0cebea0..ec4defc 100644 --- a/efl/elementary/notify.pyx +++ b/efl/elementary/notify.pyx @@ -75,7 +75,6 @@ ELM_NOTIFY_ORIENT_LAST = enums.ELM_NOTIFY_ORIENT_LAST ELM_NOTIFY_ALIGN_FILL = -1.0 cdef class Notify(Object): - """ This is the class that actually implement the widget. @@ -83,6 +82,14 @@ cdef class Notify(Object): """ def __init__(self, evasObject parent, *args, **kwargs): + """Notify(...) + + :param parent: The parent object + :type parent: :py:class:`efl.evas.Object` + :param \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance + + """ self._set_obj(elm_notify_add(parent.obj)) self._set_properties_from_keyword_args(kwargs) diff --git a/efl/elementary/object.pyx b/efl/elementary/object.pyx index 28be57a..3c45ba4 100644 --- a/efl/elementary/object.pyx +++ b/efl/elementary/object.pyx @@ -410,7 +410,6 @@ cdef class Canvas(evasCanvas): pass cdef class Object(evasObject): - """ An abstract class to manage object and callback handling. diff --git a/efl/elementary/object_item.pyx b/efl/elementary/object_item.pyx index 73a0c1a..924b220 100644 --- a/efl/elementary/object_item.pyx +++ b/efl/elementary/object_item.pyx @@ -98,7 +98,6 @@ cdef void _object_item_callback2(void *data, Evas_Object *obj, void *event_info) traceback.print_exc() cdef class ObjectItem(object): - """ A generic item for the widgets. diff --git a/efl/elementary/panel.pyx b/efl/elementary/panel.pyx index 0df85b3..388f5e2 100644 --- a/efl/elementary/panel.pyx +++ b/efl/elementary/panel.pyx @@ -83,8 +83,9 @@ ELM_PANEL_ORIENT_LEFT = enums.ELM_PANEL_ORIENT_LEFT ELM_PANEL_ORIENT_RIGHT = enums.ELM_PANEL_ORIENT_RIGHT cdef class Panel(LayoutClass): + """ - """This is the class that actually implements the widget. + This is the class that actually implements the widget. .. versionchanged:: 1.8 Inherits from LayoutClass. @@ -92,6 +93,14 @@ cdef class Panel(LayoutClass): """ def __init__(self, evasObject parent, *args, **kwargs): + """Panel(...) + + :param parent: The parent object + :type parent: :py:class:`efl.evas.Object` + :param \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance + + """ self._set_obj(elm_panel_add(parent.obj)) self._set_properties_from_keyword_args(kwargs) diff --git a/efl/elementary/panes.pyx b/efl/elementary/panes.pyx index 630f2c1..13d7a8d 100644 --- a/efl/elementary/panes.pyx +++ b/efl/elementary/panes.pyx @@ -57,10 +57,21 @@ from efl.evas cimport Object as evasObject from layout_class cimport LayoutClass cdef class Panes(LayoutClass): + """ - """This is the class that actually implements the widget.""" + This is the class that actually implements the widget. + + """ def __init__(self, evasObject parent, *args, **kwargs): + """Panes(...) + + :param parent: The parent object + :type parent: :py:class:`efl.evas.Object` + :param \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance + + """ self._set_obj(elm_panes_add(parent.obj)) self._set_properties_from_keyword_args(kwargs) diff --git a/efl/elementary/photo.pyx b/efl/elementary/photo.pyx index a054a1c..458a548 100644 --- a/efl/elementary/photo.pyx +++ b/efl/elementary/photo.pyx @@ -48,10 +48,21 @@ from efl.evas cimport Object as evasObject from object cimport Object cdef class Photo(Object): + """ - """This is the class that actually implements the widget.""" + This is the class that actually implements the widget. + + """ def __init__(self, evasObject parent, *args, **kwargs): + """Photo(...) + + :param parent: The parent object + :type parent: :py:class:`efl.evas.Object` + :param \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance + + """ self._set_obj(elm_photo_add(parent.obj)) self._set_properties_from_keyword_args(kwargs) diff --git a/efl/elementary/photocam.pyx b/efl/elementary/photocam.pyx index e978487..ae6233c 100644 --- a/efl/elementary/photocam.pyx +++ b/efl/elementary/photocam.pyx @@ -121,9 +121,9 @@ ELM_PHOTOCAM_ZOOM_MODE_LAST = enums.ELM_PHOTOCAM_ZOOM_MODE_LAST class PhotocamProgressInfo(object): - """ + """PhotocamProgressInfo(...) - The info sent in the callback for the "download,progress" signals emitted + The info sent in the callback for the ``download,progress`` signals emitted by Photocam while downloading remote urls. :var now: The amount of data received so far. @@ -144,9 +144,9 @@ def _photocam_download_progress_conv(uintptr_t addr): return ppi class PhotocamErrorInfo(object): - """ + """PhotocamErrorInfo(...) - The info sent in the callback for the "download,error" signals emitted + The info sent in the callback for the ``download,error`` signals emitted by Photocam when fail to download remote urls. :var status: The http error code (such as 401) @@ -168,10 +168,21 @@ def _photocam_download_error_conv(uintptr_t addr): cdef class Photocam(Object): + """ + + This is the class that actually implements the widget. - """This is the class that actually implements the widget.""" + """ def __init__(self, evasObject parent, *args, **kwargs): + """Photocam(...) + + :param parent: The parent object + :type parent: :py:class:`efl.evas.Object` + :param \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance + + """ self._set_obj(elm_photocam_add(parent.obj)) self._set_properties_from_keyword_args(kwargs) diff --git a/efl/elementary/plug.pyx b/efl/elementary/plug.pyx index 8cb727c..d30f545 100644 --- a/efl/elementary/plug.pyx +++ b/efl/elementary/plug.pyx @@ -46,7 +46,6 @@ from efl.evas cimport Object as evasObject from object cimport Object cdef class Plug(Object): - """ An object that allows one to show an image which other process created. @@ -55,6 +54,14 @@ cdef class Plug(Object): """ def __init__(self, evasObject parent, *args, **kwargs): + """Plug(...) + + :param parent: The parent object + :type parent: :py:class:`efl.evas.Object` + :param \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance + + """ self._set_obj(elm_plug_add(parent.obj)) self._set_properties_from_keyword_args(kwargs) diff --git a/efl/elementary/popup.pyx b/efl/elementary/popup.pyx index b4cc2ca..71a0352 100644 --- a/efl/elementary/popup.pyx +++ b/efl/elementary/popup.pyx @@ -214,18 +214,17 @@ def _cb_object_item_conv(uintptr_t addr): return _object_item_to_python(it) cdef class PopupItem(ObjectItem): - """ - An item for :py:class:`Popup`. + An item for the :py:class:`Popup` widget. Default contents parts of the popup items that you can use for are: - - "default" -Item's icon + - ``default`` - Item's icon Default text parts of the popup items that you can use for are: - - "default" - Item's label + - ``default`` - Item's label """ cdef: @@ -276,8 +275,9 @@ cdef class PopupItem(ObjectItem): self.args) cdef class Popup(LayoutClass): + """ - """This is the class that actually implements the widget. + This is the class that actually implements the widget. .. versionchanged:: 1.8 Inherits from LayoutClass. @@ -285,6 +285,14 @@ cdef class Popup(LayoutClass): """ def __init__(self, evasObject parent, *args, **kwargs): + """Popup(...) + + :param parent: The parent object + :type parent: :py:class:`efl.evas.Object` + :param \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance + + """ self._set_obj(elm_popup_add(parent.obj)) self._set_properties_from_keyword_args(kwargs) diff --git a/efl/elementary/progressbar.pyx b/efl/elementary/progressbar.pyx index 8882a5a..ad7c3a1 100644 --- a/efl/elementary/progressbar.pyx +++ b/efl/elementary/progressbar.pyx @@ -82,10 +82,21 @@ from efl.evas cimport Object as evasObject from layout_class cimport LayoutClass cdef class Progressbar(LayoutClass): + """ - """This is the class that actually implements the widget.""" + This is the class that actually implements the widget. + + """ def __init__(self, evasObject parent, *args, **kwargs): + """Progressbar(...) + + :param parent: The parent object + :type parent: :py:class:`efl.evas.Object` + :param \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance + + """ self._set_obj(elm_progressbar_add(parent.obj)) self._set_properties_from_keyword_args(kwargs) diff --git a/efl/elementary/radio.pyx b/efl/elementary/radio.pyx index 39f7296..aa056c9 100644 --- a/efl/elementary/radio.pyx +++ b/efl/elementary/radio.pyx @@ -69,10 +69,21 @@ from efl.evas cimport Object as evasObject from layout_class cimport LayoutClass cdef class Radio(LayoutClass): + """ - """This is the class that actually implements the widget.""" + This is the class that actually implements the widget. + + """ def __init__(self, evasObject parent, *args, **kwargs): + """Radio(...) + + :param parent: The parent object + :type parent: :py:class:`efl.evas.Object` + :param \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance + + """ self._set_obj(elm_radio_add(parent.obj)) self._set_properties_from_keyword_args(kwargs) diff --git a/efl/elementary/scroller.pyx b/efl/elementary/scroller.pyx index 6677606..66be273 100644 --- a/efl/elementary/scroller.pyx +++ b/efl/elementary/scroller.pyx @@ -164,7 +164,6 @@ ELM_SCROLLER_MOVEMENT_BLOCK_VERTICAL = enums.ELM_SCROLLER_MOVEMENT_BLOCK_VERTICA ELM_SCROLLER_MOVEMENT_BLOCK_HORIZONTAL = enums.ELM_SCROLLER_MOVEMENT_BLOCK_HORIZONTAL cdef class Scrollable(Object): - """ An Elementary scrollable interface will handle an internal **panning** diff --git a/efl/elementary/segment_control.pyx b/efl/elementary/segment_control.pyx index c46a4e6..0d398f8 100644 --- a/efl/elementary/segment_control.pyx +++ b/efl/elementary/segment_control.pyx @@ -68,8 +68,11 @@ def _cb_object_item_conv(uintptr_t addr): return _object_item_to_python(it) cdef class SegmentControlItem(ObjectItem): + """ - """An item for :py:class:`SegmentControl`.""" + An item for :py:class:`SegmentControl`. + + """ cdef: evasObject icon @@ -222,10 +225,21 @@ cdef class SegmentControlItem(ObjectItem): elm_segment_control_item_selected_set(self.item, select) cdef class SegmentControl(LayoutClass): + """ + + This is the class that actually implements the widget. - """This is the class that actually implements the widget.""" + """ def __init__(self, evasObject parent, *args, **kwargs): + """SegmentControl(...) + + :param parent: The parent object + :type parent: :py:class:`efl.evas.Object` + :param \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance + + """ self._set_obj(elm_segment_control_add(parent.obj)) self._set_properties_from_keyword_args(kwargs) diff --git a/efl/elementary/separator.pyx b/efl/elementary/separator.pyx index 90bcbce..1de78b6 100644 --- a/efl/elementary/separator.pyx +++ b/efl/elementary/separator.pyx @@ -37,10 +37,21 @@ from efl.evas cimport Object as evasObject from layout_class cimport LayoutClass cdef class Separator(LayoutClass): + """ - """This is the class that actually implements the widget.""" + This is the class that actually implements the widget. + + """ def __init__(self, evasObject parent, *args, **kwargs): + """Separator(...) + + :param parent: The parent object + :type parent: :py:class:`efl.evas.Object` + :param \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance + + """ self._set_obj(elm_separator_add(parent.obj)) self._set_properties_from_keyword_args(kwargs) diff --git a/efl/elementary/slider.pyx b/efl/elementary/slider.pyx index 25be424..25d0b4b 100644 --- a/efl/elementary/slider.pyx +++ b/efl/elementary/slider.pyx @@ -81,10 +81,21 @@ from efl.evas cimport Object as evasObject from layout_class cimport LayoutClass cdef class Slider(LayoutClass): + """ - """This is the class that actually implements the widget.""" + This is the class that actually implements the widget. + + """ def __init__(self, evasObject parent, *args, **kwargs): + """Slider(...) + + :param parent: The parent object + :type parent: :py:class:`efl.evas.Object` + :param \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance + + """ self._set_obj(elm_slider_add(parent.obj)) self._set_properties_from_keyword_args(kwargs) diff --git a/efl/elementary/slideshow.pyx b/efl/elementary/slideshow.pyx index 06d1fc1..95179f6 100644 --- a/efl/elementary/slideshow.pyx +++ b/efl/elementary/slideshow.pyx @@ -231,8 +231,11 @@ cdef class SlideshowItemClass (object): return None cdef class SlideshowItem(ObjectItem): + """ + + An item for the :class:`Slideshow` widget. - """An item for Slideshow.""" + """ cdef: SlideshowItemClass cls @@ -373,10 +376,21 @@ cdef class SlideshowItem(ObjectItem): elm_slideshow_item_show(self.item) cdef class Slideshow(LayoutClass): + """ - """This is the class that actually implements the widget.""" + This is the class that actually implements the widget. + + """ def __init__(self, evasObject parent, *args, **kwargs): + """Slideshow(...) + + :param parent: The parent object + :type parent: :py:class:`efl.evas.Object` + :param \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance + + """ self._set_obj(elm_slideshow_add(parent.obj)) self._set_properties_from_keyword_args(kwargs) diff --git a/efl/elementary/spinner.pyx b/efl/elementary/spinner.pyx index 6efad99..20b0e43 100644 --- a/efl/elementary/spinner.pyx +++ b/efl/elementary/spinner.pyx @@ -63,10 +63,21 @@ from efl.evas cimport Object as evasObject from layout_class cimport LayoutClass cdef class Spinner(LayoutClass): + """ - """This is the class that actually implements the widget.""" + This is the class that actually implements the widget. + + """ def __init__(self, evasObject parent, *args, **kwargs): + """Spinner(...) + + :param parent: The parent object + :type parent: :py:class:`efl.evas.Object` + :param \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance + + """ self._set_obj(elm_spinner_add(parent.obj)) self._set_properties_from_keyword_args(kwargs) diff --git a/efl/elementary/store.pyx b/efl/elementary/store.pyx index 2807f37..b4612c1 100644 --- a/efl/elementary/store.pyx +++ b/efl/elementary/store.pyx @@ -270,8 +270,11 @@ cdef class StoreItemInfoFilesystem(object): cdef class Store(object): + """ - """The class that holds the implementation of the widget.""" + The class that holds the implementation of the widget. + + """ cdef Elm_Store *st diff --git a/efl/elementary/table.pyx b/efl/elementary/table.pyx index a13616d..dc7ad35 100644 --- a/efl/elementary/table.pyx +++ b/efl/elementary/table.pyx @@ -46,7 +46,6 @@ from efl.evas cimport Object as evasObject from object cimport Object cdef class Table(Object): - """ This is the class that actually implement the widget. @@ -54,6 +53,14 @@ cdef class Table(Object): """ def __init__(self, evasObject parent, *args, **kwargs): + """Table(...) + + :param parent: The parent object + :type parent: :py:class:`efl.evas.Object` + :param \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance + + """ self._set_obj(elm_table_add(parent.obj)) self._set_properties_from_keyword_args(kwargs) diff --git a/efl/elementary/theme.pyx b/efl/elementary/theme.pyx index 6f3bb0a..1754333 100644 --- a/efl/elementary/theme.pyx +++ b/efl/elementary/theme.pyx @@ -93,7 +93,6 @@ from efl.utils.conversions cimport _ctouni, eina_list_strings_to_python_list from efl.eina cimport eina_list_free, eina_stringshare_del cdef class Theme(object): - """ This is the class that actually implements the widget. diff --git a/efl/elementary/thumb.pyx b/efl/elementary/thumb.pyx index 48d7f6a..8858683 100644 --- a/efl/elementary/thumb.pyx +++ b/efl/elementary/thumb.pyx @@ -210,10 +210,21 @@ ETHUMB_THUMB_ORIENT_ORIGINAL = enums.ETHUMB_THUMB_ORIENT_ORIGINAL cdef class Thumb(Object): + """ - """This is the class that actually implements the widget.""" + This is the class that actually implements the widget. + + """ def __init__(self, evasObject parent, *args, **kwargs): + """Thumb(...) + + :param parent: The parent object + :type parent: :py:class:`efl.evas.Object` + :param \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance + + """ self._set_obj(elm_thumb_add(parent.obj)) self._set_properties_from_keyword_args(kwargs) diff --git a/efl/elementary/toolbar.pyx b/efl/elementary/toolbar.pyx index af3d725..26c8ef0 100644 --- a/efl/elementary/toolbar.pyx +++ b/efl/elementary/toolbar.pyx @@ -228,8 +228,11 @@ cdef void _toolbar_item_state_callback(void *data, Evas_Object *obj, void *event item.item = NULL cdef class ToolbarItemState(object): + """ + + A state for a :py:class:`ToolbarItem`. - """A state for a :py:class:`ToolbarItem`.""" + """ cdef Elm_Toolbar_Item_State *state cdef object params @@ -262,8 +265,11 @@ cdef class ToolbarItemState(object): cdef class ToolbarItem(ObjectItem): + """ + + An item for the toolbar. - """An item for the toolbar.""" + """ cdef: object label @@ -764,7 +770,6 @@ cdef class ToolbarItem(ObjectItem): cdef class Toolbar(LayoutClass): - """ This is the class that actually implements the widget. @@ -775,6 +780,14 @@ cdef class Toolbar(LayoutClass): """ def __init__(self, evasObject parent, *args, **kwargs): + """Toolbar(...) + + :param parent: The parent object + :type parent: :py:class:`efl.evas.Object` + :param \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance + + """ self._set_obj(elm_toolbar_add(parent.obj)) self._set_properties_from_keyword_args(kwargs) diff --git a/efl/elementary/transit.pyx b/efl/elementary/transit.pyx index 156880b..b9766a2 100644 --- a/efl/elementary/transit.pyx +++ b/efl/elementary/transit.pyx @@ -170,10 +170,10 @@ ELM_TRANSIT_TWEEN_MODE_ACCELERATE = enums.ELM_TRANSIT_TWEEN_MODE_ACCELERATE import traceback -cdef class TransitCustomEffect: - """ +cdef class TransitCustomEffect(object): + """TransitCustomEffect(...) - A prototype class for a Transit widgets custom effect. + A prototype class for a :class:`Transit` widgets custom effect. Inherit this class and override methods to create your custom effect. @@ -242,11 +242,15 @@ cdef void elm_transit_del_cb(void *data, Elm_Transit *transit) with gil: Py_DECREF(trans) cdef class Transit(object): - """ This is the class that actually implement the widget. + .. note:: It is not necessary to delete the transit object, it will be + deleted at the end of its operation. + + .. note:: The transit will start playing when the program enters the + main loop. """ cdef: @@ -256,14 +260,10 @@ cdef class Transit(object): dict del_cb_kwargs def __init__(self, *args, **kwargs): - """Create new transit. - - .. note:: It is not necessary to delete the transit object, it will be - deleted at the end of its operation. - .. note:: The transit will start playing when the program enters the - main loop. + """Transit(...) - :return: The transit object. + :param \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance """ self.obj = elm_transit_add() diff --git a/efl/elementary/video.pyx b/efl/elementary/video.pyx index d76ba54..642a291 100644 --- a/efl/elementary/video.pyx +++ b/efl/elementary/video.pyx @@ -43,10 +43,21 @@ from efl.evas cimport Object as evasObject from layout_class cimport LayoutClass cdef class Video(LayoutClass): + """ + + This is the class that actually implements the widget. - """This is the class that actually implements the widget.""" + """ def __init__(self, evasObject parent, *args, **kwargs): + """Video(...) + + :param parent: The parent object + :type parent: :py:class:`efl.evas.Object` + :param \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance + + """ self._set_obj(elm_video_add(parent.obj)) self._set_properties_from_keyword_args(kwargs) @@ -255,7 +266,6 @@ _object_mapping_register("Elm_Video", Video) cdef class Player(LayoutClass): - """ Player is a video player that need to be linked with a :py:class:`Video`. @@ -284,6 +294,14 @@ cdef class Player(LayoutClass): """ def __init__(self, evasObject parent, *args, **kwargs): + """Player(...) + + :param parent: The parent object + :type parent: :py:class:`efl.evas.Object` + :param \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance + + """ self._set_obj(elm_player_add(parent.obj)) self._set_properties_from_keyword_args(kwargs) diff --git a/efl/elementary/web.pyx b/efl/elementary/web.pyx index 74acf48..ce1e02b 100644 --- a/efl/elementary/web.pyx +++ b/efl/elementary/web.pyx @@ -262,13 +262,25 @@ cdef class WebWindowFeatures(object): """ elm_web_window_features_unref(self.wf) + cdef class Web(Object): + """ + + This class actually implements the widget. - """This class actually implements the widget.""" + """ cdef object _console_message_hook def __init__(self,evasObject parent, *args, **kwargs): + """Web(...) + + :param parent: The parent object + :type parent: :py:class:`efl.evas.Object` + :param \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance + + """ self._set_obj(elm_web_add(parent.obj)) self._set_properties_from_keyword_args(kwargs) diff --git a/efl/elementary/window.pyx b/efl/elementary/window.pyx index 7603e14..207dea0 100644 --- a/efl/elementary/window.pyx +++ b/efl/elementary/window.pyx @@ -416,11 +416,14 @@ ELM_ILLUME_COMMAND_FOCUS_HOME = enums.ELM_ILLUME_COMMAND_FOCUS_HOME ELM_ILLUME_COMMAND_CLOSE = enums.ELM_ILLUME_COMMAND_CLOSE cdef class Window(Object): + """ + + This is the class that actually implements the widget. - """This is the class that actually implements the widget.""" + """ def __init__(self, name, type, evasObject parent=None, *args, **kwargs): - """ + """Window(...) :param name: A name for the new window. :type name: string @@ -1867,22 +1870,25 @@ _object_mapping_register("Elm_Win", Window) cdef class StandardWindow(Window): - - """A :py:class:`Window` with standard setup. + """ + A :py:class:`Window` with standard setup. This creates a window like :py:class:`Window` but also puts in a standard :py:class:`Background <efl.elementary.background.Background>`, as well as setting the window title to ``title``. The window type created is of type ELM_WIN_BASIC, with ``None`` as the parent widget. - :param name: A name for the new window. - :type name: string - :param title: A title for the new window. - :type title: string - """ def __init__(self, name, title, *args, **kwargs): + """StandardWindow(..) + + :param name: A name for the new window. + :type name: string + :param title: A title for the new window. + :type title: string + + """ if isinstance(name, unicode): name = PyUnicode_AsUTF8String(name) if isinstance(title, unicode): title = PyUnicode_AsUTF8String(title) self._set_obj(elm_win_util_standard_add( @@ -1892,8 +1898,8 @@ cdef class StandardWindow(Window): cdef class DialogWindow(Window): - - """A :py:class:`Window` with standard dialog setup. + """ + A :py:class:`Window` with standard dialog setup. This creates a window like :py:class:`Window` but also puts in a standard :py:class:`Background <efl.elementary.background.Background>`, as well as @@ -1901,18 +1907,21 @@ cdef class DialogWindow(Window): ELM_WIN_DIALOG_BASIC. This tipe of window will be handled in special mode by window managers with regards of it's parent window. - :param parent: The parent window (mandatory) - :type parent: :py:class:`efl.evas.Object` - :param name: A name for the new window. - :type name: string - :param title: A title for the new window. - :type title: string - - .. versionadded :: 1.13 + .. versionadded:: 1.13 """ def __init__(self, evasObject parent not None, name, title, *args, **kwargs): + """DialogWindow(...) + + :param parent: The parent window (mandatory) + :type parent: :py:class:`efl.evas.Object` + :param name: A name for the new window. + :type name: string + :param title: A title for the new window. + :type title: string + + """ if isinstance(name, unicode): name = PyUnicode_AsUTF8String(name) if isinstance(title, unicode): title = PyUnicode_AsUTF8String(title) self._set_obj(elm_win_util_dialog_add(parent.obj, diff --git a/efl/emotion/efl.emotion.pyx b/efl/emotion/efl.emotion.pyx index 8cf66cb..5162891 100644 --- a/efl/emotion/efl.emotion.pyx +++ b/efl/emotion/efl.emotion.pyx @@ -180,17 +180,7 @@ cdef class Emotion(evasObject): The Emotion object - :see: :py:mod:`The documentation page<efl.emotion>` - - :param evas: The canvas where the object will be added to. - :type evas: efl.evas.Canvas - :param module_name: name of the engine to use (gstreamer, xine, vlc or generic) - :param module_params: Extra parameters, module specific - :param size: (w, h) - :param pos: (x, y) - :param geometry: (x, y, w, h) - :param color: (r, g, b, a) - :return: The emotion object instance just created. + .. seealso:: :py:mod:`The documentation page<efl.emotion>` .. versionchanged:: 1.8 Keyword argument module_filename was renamed to module_name. @@ -200,7 +190,18 @@ cdef class Emotion(evasObject): self._emotion_callbacks = {} def __init__(self, Canvas canvas not None, module_name="gstreamer", - module_params=None, **kwargs): + module_params=None, **kwargs): + """Emotion(...) + + :param canvas: Evas canvas for this object + :type canvas: :py:class:`~efl.evas.Canvas` + :keyword module_name: name of the engine to use + :type module_name: string + :keyword module_params: Extra parameters, module specific + :keyword \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance + + """ self._set_obj(emotion_object_add(canvas.obj)) _register_decorated_callbacks(self) diff --git a/efl/ethumb/efl.ethumb_client.pyx b/efl/ethumb/efl.ethumb_client.pyx index f46f29b..569a176 100644 --- a/efl/ethumb/efl.ethumb_client.pyx +++ b/efl/ethumb/efl.ethumb_client.pyx @@ -114,20 +114,21 @@ cdef class Client: """ def __init__(self, func, *args, **kargs): - """ - - Ethumb Client constructor. - - Server is ready to receive requests just after **func** is - called back with ``status == True``. + """Client(...) :param func: function to call when connection with server is - established. Function signature is:: + established. + :param \*args: Any other parameters will be passed back in the + callback function + :keyword \**kargs: Any other keyword parameters will be passed back + in the callback function + + Expected **func** signature:: - func(client, status, *args, **kargs) + func(client, status, *args, **kargs) - with status being True for successful connection or False - on error. + with status being **True** for successful connection or **False** + on error. :raise TypeError: if **func** is not callable. :raise SystemError: if it was not possible to connect to diff --git a/efl/evas/efl.evas_canvas.pxi b/efl/evas/efl.evas_canvas.pxi index d233543..8e42613 100644 --- a/efl/evas/efl.evas_canvas.pxi +++ b/efl/evas/efl.evas_canvas.pxi @@ -78,7 +78,9 @@ cdef _canvas_del_callback_from_list(Canvas canvas, int type, func): cdef class Canvas(Eo): - """ The Evas Canvas. + """ + + The Evas Canvas. Canvas is the base drawing area and scene manager, it should have a number of objects (or actors) that will be managed. Object state diff --git a/efl/evas/efl.evas_object.pxi b/efl/evas/efl.evas_object.pxi index a01a32c..0e84e7a 100644 --- a/efl/evas/efl.evas_object.pxi +++ b/efl/evas/efl.evas_object.pxi @@ -106,7 +106,9 @@ cdef _object_del_callback_from_list(Object obj, int type, func): cdef class Object(Eo): - """ Basic Graphical Object (or actor). + """ + + Basic Graphical Object (or actor). Objects are managed by :py:class:`Canvas <efl.evas.Canvas>` in a non- immediate way, that is, all operations, like moving, resizing, changing the @@ -146,7 +148,7 @@ cdef class Object(Eo): that can have it's methods implemented in order to apply methods to its children. - .. attention:: + .. warning:: Since we have two systems controlling object's life (Evas and Python) objects need to be explicitly deleted using :py:func:`delete` call. If diff --git a/efl/evas/efl.evas_object_box.pxi b/efl/evas/efl.evas_object_box.pxi index 07e838f..5de2cf6 100644 --- a/efl/evas/efl.evas_object_box.pxi +++ b/efl/evas/efl.evas_object_box.pxi @@ -28,21 +28,16 @@ cdef class Box(Object): inside their cell space. - :param canvas: The evas canvas for this object - :type canvas: :py:class:`Canvas` - :keyword size: Width and height - :type size: tuple of ints - :keyword pos: X and Y - :type pos: tuple of ints - :keyword geometry: X, Y, width, height - :type geometry: tuple of ints - :keyword color: R, G, B, A - :type color: tuple of ints - :keyword name: Object name - :type name: string - """ def __init__(self, Canvas canvas not None, **kwargs): + """Box(...) + + :param canvas: The evas canvas for this object + :type canvas: :py:class:`Canvas` + :param \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance + + """ self._set_obj(evas_object_box_add(canvas.obj)) self._set_properties_from_keyword_args(kwargs) diff --git a/efl/evas/efl.evas_object_grid.pxi b/efl/evas/efl.evas_object_grid.pxi index 5d3d093..2c212b3 100644 --- a/efl/evas/efl.evas_object_grid.pxi +++ b/efl/evas/efl.evas_object_grid.pxi @@ -17,8 +17,21 @@ cdef class Grid(Object): + """ + + TODO: doc this object + + """ def __init__(self, Canvas canvas not None, **kwargs): + """Grid(...) + + :param canvas: The evas canvas for this object + :type canvas: :py:class:`Canvas` + :param \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance + + """ self._set_obj(evas_object_grid_add(canvas.obj)) self._set_properties_from_keyword_args(kwargs) diff --git a/efl/evas/efl.evas_object_image.pxi b/efl/evas/efl.evas_object_image.pxi index f35b5e6..da9cdb1 100644 --- a/efl/evas/efl.evas_object_image.pxi +++ b/efl/evas/efl.evas_object_image.pxi @@ -101,7 +101,7 @@ cdef class Image(Object): just 50% transparent. Values are 0 == black, 255 == solid or full red, green or blue. - .. **EVAS_COLORSPACE_RGB565_A5P:** In the process of being implemented in + - **EVAS_COLORSPACE_RGB565_A5P:** In the process of being implemented in 1 engine only. This may change. This is a pointer to image data for 16-bit half-word pixel data in 16bpp RGB 565 format (5 bits red, 6 bits green, 5 bits blue), with the high-byte containing red and the @@ -125,23 +125,18 @@ cdef class Image(Object): **scaled** you need to call :py:attr:`fill` with ``x=0, y=0, w=new_width, h=new_height``, or you should use :py:class:`FilledImage` instead. - :param canvas: Evas canvas for this object - :type canvas: Canvas - :keyword size: Width and height - :type size: tuple of ints - :keyword pos: X and Y - :type pos: tuple of ints - :keyword geometry: X, Y, width, height - :type geometry: tuple of ints - :keyword color: R, G, B, A - :type color: tuple of ints - :keyword name: Object name - :type name: string - :keyword file: File name - :type file: string - """ def __init__(self, Canvas canvas not None, file=None, **kwargs): + """Image(...) + + :param canvas: Evas canvas for this object + :type canvas: Canvas + :param file: File name or (File name, key) + :type file: string or tuple + :param \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance + + """ self._set_obj(evas_object_image_add(canvas.obj)) if file is not None: @@ -1340,29 +1335,24 @@ cdef void _cb_on_filled_image_resize(void *data, Evas *e, cdef class FilledImage(Image): - """Image that automatically resize it's contents to fit object size. + """ + + Image that automatically resize it's contents to fit object size. This :py:class:`Image` subclass already calls :py:attr:`Image.fill` on resize so it will match and so be scaled to fill the whole area. - :param canvas: The evas canvas for this object - :type canvas: :py:class:`~efl.evas.Canvas` - :keyword size: Width and height - :type size: tuple of ints - :keyword pos: X and Y - :type pos: tuple of ints - :keyword geometry: X, Y, width, height - :type geometry: tuple of ints - :keyword color: R, G, B, A - :type color: tuple of ints - :keyword name: Object name - :type name: string - :keyword file: File name - :type file: string - """ def __init__(self, Canvas canvas not None, **kargs): + """FilledImage(...) + + :param canvas: The evas canvas for this object + :type canvas: :py:class:`~efl.evas.Canvas` + :param \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance + + """ Image.__init__(self, canvas, **kargs) w, h = self.size_get() Image.fill_set(self, 0, 0, w, h) diff --git a/efl/evas/efl.evas_object_line.pxi b/efl/evas/efl.evas_object_line.pxi index bd8033c..62491a8 100644 --- a/efl/evas/efl.evas_object_line.pxi +++ b/efl/evas/efl.evas_object_line.pxi @@ -17,29 +17,31 @@ cdef class Line(Object): - """A straight line. - - :param canvas: Evas canvas for this object - :type canvas: efl.evas.Canvas - :keyword size: Width and height - :type size: tuple of ints - :keyword pos: X and Y - :type pos: tuple of ints - :keyword geometry: X, Y, width, height - :type geometry: tuple of ints - :keyword color: R, G, B, A - :type color: tuple of ints - :keyword name: Object name - :type name: string - :keyword start: Start coordinates - :type file: tuple of ints - :keyword end: End coordinates - :type end: tuple of ints + """ + + A straight line. """ def __init__(self, Canvas canvas not None, start=None, end=None, - geometry=None, size=None, pos=None, **kwargs): + geometry=None, size=None, pos=None, **kwargs): + """Line(...) + + :param canvas: Evas canvas for this object + :type canvas: :py:class:`~efl.evas.Canvas` + :keyword start: Start coordinates (x, y) + :type start: tuple of ints + :keyword end: End coordinates (x, y) + :type end: tuple of ints + :keyword geometry: Geometry of the line (x, y, w, h) + :type geometry: tuple of ints + :keyword size: Size of the line (w, h) + :type size: tuple of ints + :keyword pos: Position of the line (x, y) + :type pos: tuple of ints + :keyword \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance + """ self._set_obj(evas_object_line_add(canvas.obj)) if start and end: diff --git a/efl/evas/efl.evas_object_polygon.pxi b/efl/evas/efl.evas_object_polygon.pxi index a289d00..1d1359f 100644 --- a/efl/evas/efl.evas_object_polygon.pxi +++ b/efl/evas/efl.evas_object_polygon.pxi @@ -17,25 +17,22 @@ cdef class Polygon(Object): - """A polygon. - - :param canvas: Evas canvas for this object - :type canvas: Canvas - :keyword size: Width and height - :type size: tuple of ints - :keyword pos: X and Y - :type pos: tuple of ints - :keyword geometry: X, Y, width, height - :type geometry: tuple of ints - :keyword color: R, G, B, A - :type color: tuple of ints - :keyword name: Object name - :type name: string - :keyword points: Points of the polygon - :type points: tuple of x, y int pairs + """ + + A polygon. """ def __init__(self, Canvas canvas not None, points=None, **kwargs): + """Polygon(...) + + :param canvas: Evas canvas for this object + :type canvas: :py:class:`~efl.evas.Canvas` + :keyword points: Points of the polygon + :type points: list of tuple of x, y int pairs + :keyword \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance + + """ self._set_obj(evas_object_polygon_add(canvas.obj)) self._set_properties_from_keyword_args(kwargs) if points: @@ -45,8 +42,10 @@ cdef class Polygon(Object): def point_add(self, int x, int y): """Add a new point to the polygon - :param x: - :param y: + :param x: X coordinate + :type x: int + :param y: Y Coordinate + :type y: int """ evas_object_polygon_point_add(self.obj, x, y) diff --git a/efl/evas/efl.evas_object_rectangle.pxi b/efl/evas/efl.evas_object_rectangle.pxi index 949a21b..d8aba2f 100644 --- a/efl/evas/efl.evas_object_rectangle.pxi +++ b/efl/evas/efl.evas_object_rectangle.pxi @@ -17,7 +17,9 @@ cdef class Rectangle(Object): - """A rectangle. + """ + + A rectangle. There is only one function to deal with rectangle objects, this may make this function seem useless given there are no functions to manipulate @@ -115,25 +117,19 @@ cdef class Rectangle(Object): obj.clip_set(clipper) clipper.show() - .. warning:: We don't guarantee any proper results if you create a Rectangle object without setting the evas engine. - :param canvas: Evas canvas for this object - :type canvas: Canvas - :keyword size: Width and height - :type size: tuple of ints - :keyword pos: X and Y - :type pos: tuple of ints - :keyword geometry: X, Y, width, height - :type geometry: tuple of ints - :keyword color: R, G, B, A - :type color: tuple of ints - :keyword name: Object name - :type name: string - """ def __init__(self, Canvas canvas not None, **kwargs): + """Rectangle(...) + + :param canvas: Evas canvas for this object + :type canvas: :py:class:`~efl.evas.Canvas` + :keyword \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance + + """ self._set_obj(evas_object_rectangle_add(canvas.obj)) self._set_properties_from_keyword_args(kwargs) diff --git a/efl/evas/efl.evas_object_table.pxi b/efl/evas/efl.evas_object_table.pxi index fea9521..8dbdaa5 100644 --- a/efl/evas/efl.evas_object_table.pxi +++ b/efl/evas/efl.evas_object_table.pxi @@ -33,8 +33,20 @@ EVAS_OBJECT_TABLE_HOMOGENEOUS_ITEM = 2 from efl.utils.conversions cimport eina_list_objects_to_python_list cdef class Table(Object): + """ + TODO: doc this class + + """ def __init__(self, Canvas canvas not None, **kwargs): + """Table(...) + + :param canvas: Evas canvas for this object + :type canvas: :py:class:`~efl.evas.Canvas` + :keyword \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance + + """ self._set_obj(evas_object_table_add(canvas.obj)) self._set_properties_from_keyword_args(kwargs) diff --git a/efl/evas/efl.evas_object_text.pxi b/efl/evas/efl.evas_object_text.pxi index bc2ec95..35d0f11 100644 --- a/efl/evas/efl.evas_object_text.pxi +++ b/efl/evas/efl.evas_object_text.pxi @@ -17,42 +17,33 @@ cdef class Text(Object): - """Text. - - :param canvas: Evas canvas for this object - :type canvas: Canvas - :keyword size: Width and height - :type size: tuple of ints - :keyword pos: X and Y - :type pos: tuple of ints - :keyword geometry: X, Y, width, height - :type geometry: tuple of ints - :keyword color: R, G, B, A - :type color: tuple of ints - :keyword name: Object name - :type name: string - :keyword text: The text - :type text: string - :keyword font: Font name - :type font: string - :keyword font_source: Where to find the font - :type font_source: string - :keyword style: Style - :type style: string - :keyword shadow_color: The shadow color - :type shadow_color: tuple of ints - :keyword glow_color: The primary glow color - :type glow_color: tuple of ints - :keyword glow2_color: The secondary glow color - :type glow2_color: tuple of ints - :keyword outline_color: The outline color - :type outline_color: tuple of ints + """ + + A Text object. """ def __init__(self, Canvas canvas not None, font=None, shadow_color=None, - glow_color=None, glow2_color=None, outline_color=None, **kwargs): + glow_color=None, glow2_color=None, outline_color=None, + **kwargs): + """Text(...) + + :param canvas: Evas canvas for this object + :type canvas: :py:class:`~efl.evas.Canvas` + :keyword font: Font name + :type font: string + :keyword shadow_color: The shadow color + :type shadow_color: tuple of ints + :keyword glow_color: The primary glow color + :type glow_color: tuple of ints + :keyword glow2_color: The secondary glow color + :type glow2_color: tuple of ints + :keyword outline_color: The outline color + :type outline_color: tuple of ints + :keyword \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance + """ self._set_obj(evas_object_text_add(canvas.obj)) self._set_properties_from_keyword_args(kwargs) diff --git a/efl/evas/efl.evas_object_textblock.pxi b/efl/evas/efl.evas_object_textblock.pxi index 8ae86a6..6847848 100644 --- a/efl/evas/efl.evas_object_textblock.pxi +++ b/efl/evas/efl.evas_object_textblock.pxi @@ -17,28 +17,21 @@ cdef class Textblock(Object): - """A Textblock. - - :param canvas: Evas canvas for this object - :type canvas: Canvas - :keyword size: Width and height - :type size: tuple of ints - :keyword pos: X and Y - :type pos: tuple of ints - :keyword geometry: X, Y, width, height - :type geometry: tuple of ints - :keyword color: R, G, B, A - :type color: tuple of ints - :keyword name: Object name - :type name: string - :keyword text_markup: Markup text - :type text_markup: string - :keyword style: The style - :type style: string + """ + + A Textblock. """ def __init__(self, Canvas canvas not None, **kwargs): + """Textblock(...) + + :param canvas: Evas canvas for this object + :type canvas: :py:class:`~efl.evas.Canvas` + :keyword \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance + + """ self._set_obj(evas_object_textblock_add(canvas.obj)) self._set_properties_from_keyword_args(kwargs) diff --git a/efl/evas/efl.evas_object_textgrid.pxi b/efl/evas/efl.evas_object_textgrid.pxi index 7161c1c..ed34ebb 100644 --- a/efl/evas/efl.evas_object_textgrid.pxi +++ b/efl/evas/efl.evas_object_textgrid.pxi @@ -218,13 +218,22 @@ cdef class TextgridCell(object): return <bint>self.cell.double_width cdef class Textgrid(Object): - """ + A textgrid object. + .. versionadded:: 1.8 """ def __init__(self, Canvas canvas not None, **kwargs): + """Textgrid(...) + + :param canvas: Evas canvas for this object + :type canvas: :py:class:`~efl.evas.Canvas` + :keyword \**kwargs: All the remaining keyword arguments are interpreted + as properties of the instance + + """ self._set_obj(evas_object_textgrid_add(canvas.obj)) self._set_properties_from_keyword_args(kwargs) diff --git a/efl/evas/efl.evas_rect.pxi b/efl/evas/efl.evas_rect.pxi index 1856af2..f06ef71 100644 --- a/efl/evas/efl.evas_rect.pxi +++ b/efl/evas/efl.evas_rect.pxi @@ -17,7 +17,9 @@ cdef class Rect(object): - """Type to store and manipulate rectangular coordinates. + """ + + Type to store and manipulate rectangular coordinates. This class provides the description of a rectangle and means to access and modify its properties in an easy way. @@ -27,7 +29,7 @@ cdef class Rect(object): >>> r1 = Rect(10, 20, 30, 40) >>> r2 = Rect((0, 0), (100, 100)) >>> r1 - Rect(x=10, y=20, w=30, h=40) + Rect(x=10, y=20, w=30, h=40) >>> r2 Rect(x=0, y=0, w=100, h=100) >>> r1.contains(r2) --