Elm: Fix docs and compat, add test that imports all modules

This commit is contained in:
Kai Huuhko 2015-04-19 17:29:12 +03:00
parent d3569bf1f1
commit e4d3924317
8 changed files with 394 additions and 330 deletions

View File

@ -80,7 +80,7 @@ Bubble arrow positions
Inheritance diagram
===================
.. inheritance-diagram:: efl.elementary.bubble
.. inheritance-diagram:: efl.elementary.Bubble
:parts: 2
.. automodule:: efl.elementary.bubble
.. autoclass:: efl.elementary.Bubble

View File

@ -54,7 +54,7 @@ Colorselector modes
Inheritance diagram
===================
.. inheritance-diagram:: efl.elementary.colorselector
.. inheritance-diagram:: efl.elementary.Colorselector
:parts: 2

View File

@ -52,6 +52,251 @@ A sample Python Elementary program
API Reference
=============
.. _Fingers:
Fingers
=======
Elementary is designed to be finger-friendly for touchscreens,
and so in addition to scaling for display resolution, it can
also scale based on finger "resolution" (or size). You can then
customize the granularity of the areas meant to receive clicks
on touchscreens.
Different profiles may have pre-set values for finger sizes.
Enumerations
============
.. _Elm_Object_Layer:
Object layers
-------------
.. versionadded:: 1.14
.. data:: ELM_OBJECT_LAYER_BACKGROUND
where to place backgrounds
.. data:: ELM_OBJECT_LAYER_DEFAULT
Evas_Object default layer (and thus for Elementary)
.. data:: ELM_OBJECT_LAYER_FOCUS
where focus object visualization is
.. data:: ELM_OBJECT_LAYER_TOOLTIP
where to show tooltips
.. data:: ELM_OBJECT_LAYER_CURSOR
where to show cursors
.. data:: ELM_OBJECT_LAYER_LAST
last layer known by Elementary
.. _Elm_Policy:
Policy types
------------
.. data:: ELM_POLICY_QUIT
Under which circumstances the application should quit automatically.
.. data:: ELM_POLICY_EXIT
Defines elm_exit() behaviour. (since 1.8)
.. data:: ELM_POLICY_THROTTLE
Defines how throttling should work (since 1.8)
.. _Elm_Policy_Quit:
Quit policy types
-----------------
.. data:: ELM_POLICY_QUIT_NONE
Never quit the application automatically
.. data:: ELM_POLICY_QUIT_LAST_WINDOW_CLOSED
Quit when the application's last window is closed
.. _Elm_Policy_Exit:
Exit policy types
-----------------
Possible values for the ELM_POLICY_EXIT policy.
.. data:: ELM_POLICY_EXIT_NONE
Just quit the main loop on exit().
.. data:: ELM_POLICY_EXIT_WINDOWS_DEL
Delete all the windows after quitting the main loop.
.. _Elm_Policy_Throttle:
Throttle policy types
---------------------
Possible values for the #ELM_POLICY_THROTTLE policy.
.. data:: ELM_POLICY_THROTTLE_CONFIG
Do whatever elementary config is configured to do.
.. data:: ELM_POLICY_THROTTLE_HIDDEN_ALWAYS
Always throttle when all windows are no longer visible.
.. data:: ELM_POLICY_THROTTLE_NEVER
Never throttle when windows are all hidden, regardless of config settings.
.. _Elm_Process_State:
Elm_Process_State
-----------------
.. data:: ELM_PROCESS_STATE_FOREGROUND
The process is in a foreground/active/running state - work as normal.
.. versionadded:: 1.12
.. data:: ELM_PROCESS_STATE_BACKGROUND
The process is in the bacgkround, so you may want to stop animating,
fetching data as often etc.
.. versionadded:: 1.12
.. _Elm_Sys_Notify_Closed_Reason:
Notify close reasons
--------------------
The reason the notification was closed
.. data:: ELM_SYS_NOTIFY_CLOSED_EXPIRED
The notification expired.
.. versionadded:: 1.10
.. data:: ELM_SYS_NOTIFY_CLOSED_DISMISSED
The notification was dismissed by the user.
.. versionadded:: 1.10
.. data:: ELM_SYS_NOTIFY_CLOSED_REQUESTED
The notification was closed by a call to CloseNotification method.
.. versionadded:: 1.10
.. data:: ELM_SYS_NOTIFY_CLOSED_UNDEFINED
Undefined/reserved reasons.
.. versionadded:: 1.10
.. _Elm_Sys_Notify_Urgency:
Notify urgency levels
---------------------
Urgency levels of a notification
:see: :py:func:`sys_notify_send`
.. data:: ELM_SYS_NOTIFY_URGENCY_LOW
Low
.. versionadded:: 1.10
.. data:: ELM_SYS_NOTIFY_URGENCY_NORMAL
Normal
.. versionadded:: 1.10
.. data:: ELM_SYS_NOTIFY_URGENCY_CRITICAL
Critical
.. versionadded:: 1.10
.. _Elm_Glob_Match_Flags:
Glob matching
-------------
Glob matching bitfiled flags
.. data:: ELM_GLOB_MATCH_NO_ESCAPE
Treat backslash as an ordinary character instead of escape.
.. versionadded:: 1.11
.. data:: ELM_GLOB_MATCH_PATH
Match a slash in string only with a slash in pattern and not by an
asterisk (*) or a question mark (?) metacharacter, nor by a bracket
expression ([]) containing a slash.
.. versionadded:: 1.11
.. data:: ELM_GLOB_MATCH_PERIOD
Leading period in string has to be matched exactly by a period in
pattern. A period is considered to be leading if it is the first
character in string, or if both ELM_GLOB_MATCH_PATH is set and the
period immediately follows a slash.
.. versionadded:: 1.11
.. data:: ELM_GLOB_MATCH_NOCASE
The pattern is matched case-insensitively.
.. versionadded:: 1.11
.. _General:
General
=======
General Elementary API. Functions that don't relate to
Elementary objects specifically.
Here are documented functions which init/shutdown the library,
that apply to generic Elementary objects, that deal with
configuration, et cetera.
.. autofunction:: init
.. autofunction:: shutdown
.. autofunction:: run
@ -94,73 +339,70 @@ Inheritance diagram
===================
.. inheritance-diagram::
efl.elementary.actionslider
efl.elementary.background
efl.elementary.box
efl.elementary.bubble
efl.elementary.button
efl.elementary.calendar_elm
efl.elementary.check
efl.elementary.clock
efl.elementary.colorselector
efl.elementary.configuration
efl.elementary.conformant
efl.elementary.ctxpopup
efl.elementary.datetime_elm
efl.elementary.dayselector
efl.elementary.diskselector
efl.elementary.entry
efl.elementary.fileselector
efl.elementary.fileselector_button
efl.elementary.fileselector_entry
efl.elementary.flip
efl.elementary.flipselector
efl.elementary.frame
efl.elementary.general
efl.elementary.gengrid
efl.elementary.genlist
efl.elementary.gesture_layer
efl.elementary.grid
efl.elementary.hover
efl.elementary.hoversel
efl.elementary.icon
efl.elementary.image
efl.elementary.index
efl.elementary.innerwindow
efl.elementary.label
efl.elementary.layout
efl.elementary.layout_class
efl.elementary.list
efl.elementary.map
efl.elementary.mapbuf
efl.elementary.menu
efl.elementary.multibuttonentry
efl.elementary.naviframe
efl.elementary.need
efl.elementary.notify
efl.elementary.object
efl.elementary.object_item
efl.elementary.panel
efl.elementary.panes
efl.elementary.photo
efl.elementary.photocam
efl.elementary.plug
efl.elementary.popup
efl.elementary.progressbar
efl.elementary.radio
efl.elementary.scroller
efl.elementary.segment_control
efl.elementary.separator
efl.elementary.slider
efl.elementary.slideshow
efl.elementary.spinner
efl.elementary.systray
efl.elementary.table
efl.elementary.theme
efl.elementary.thumb
efl.elementary.toolbar
efl.elementary.transit
efl.elementary.video
efl.elementary.web
efl.elementary.window
:parts: 2
efl.elementary.Actionslider
efl.elementary.Background
efl.elementary.Box
efl.elementary.Bubble
efl.elementary.Button
efl.elementary.Calendar
efl.elementary.Check
efl.elementary.Clock
efl.elementary.Colorselector
efl.elementary.Configuration
efl.elementary.Conformant
efl.elementary.Ctxpopup
efl.elementary.Datetime
efl.elementary.Dayselector
efl.elementary.Diskselector
efl.elementary.Entry
efl.elementary.Fileselector
efl.elementary.FileselectorButton
efl.elementary.FileselectorEntry
efl.elementary.Flip
efl.elementary.FlipSelector
efl.elementary.Frame
efl.elementary.Gengrid
efl.elementary.Genlist
efl.elementary.GestureLayer
efl.elementary.Grid
efl.elementary.Hover
efl.elementary.Hoversel
efl.elementary.Icon
efl.elementary.Image
efl.elementary.Index
efl.elementary.InnerWindow
efl.elementary.Label
efl.elementary.Layout
efl.elementary.List
efl.elementary.Map
efl.elementary.Mapbuf
efl.elementary.Menu
efl.elementary.MultiButtonEntry
efl.elementary.Naviframe
efl.elementary.Notify
efl.elementary.Object
efl.elementary.ObjectItem
efl.elementary.Panel
efl.elementary.Panes
efl.elementary.Photo
efl.elementary.Photocam
efl.elementary.Plug
efl.elementary.Popup
efl.elementary.Progressbar
efl.elementary.Radio
efl.elementary.Scroller
efl.elementary.SegmentControl
efl.elementary.Separator
efl.elementary.Slider
efl.elementary.Slideshow
efl.elementary.Spinner
efl.elementary.Systray
efl.elementary.Table
efl.elementary.Theme
efl.elementary.Thumb
efl.elementary.Toolbar
efl.elementary.Transit
efl.elementary.Video
efl.elementary.Web
efl.elementary.Window
:parts: 1

View File

@ -40,7 +40,7 @@ Layout text parts
Inheritance diagram
===================
.. inheritance-diagram:: efl.elementary.Flipselector
.. inheritance-diagram:: efl.elementary.FlipSelector
:parts: 2

View File

@ -53,7 +53,6 @@ __all__ = (
"index",
"innerwindow",
"label",
"layout_class",
"layout",
"list",
"map",
@ -64,7 +63,6 @@ __all__ = (
"need",
"notify",
"object",
"object_item",
"panel",
"panes",
"photo",

View File

@ -16,259 +16,6 @@
# along with this Python-EFL. If not, see <http://www.gnu.org/licenses/>.
#
"""
:mod:`elementary` Module
########################
.. _General:
General
=======
General Elementary API. Functions that don't relate to
Elementary objects specifically.
Here are documented functions which init/shutdown the library,
that apply to generic Elementary objects, that deal with
configuration, et cetera.
.. _Fingers:
Fingers
=======
Elementary is designed to be finger-friendly for touchscreens,
and so in addition to scaling for display resolution, it can
also scale based on finger "resolution" (or size). You can then
customize the granularity of the areas meant to receive clicks
on touchscreens.
Different profiles may have pre-set values for finger sizes.
Enumerations
============
.. _Elm_Object_Layer:
Object layers
-------------
.. versionadded:: 1.14
.. data:: ELM_OBJECT_LAYER_BACKGROUND
where to place backgrounds
.. data:: ELM_OBJECT_LAYER_DEFAULT
Evas_Object default layer (and thus for Elementary)
.. data:: ELM_OBJECT_LAYER_FOCUS
where focus object visualization is
.. data:: ELM_OBJECT_LAYER_TOOLTIP
where to show tooltips
.. data:: ELM_OBJECT_LAYER_CURSOR
where to show cursors
.. data:: ELM_OBJECT_LAYER_LAST
last layer known by Elementary
.. _Elm_Policy:
Policy types
------------
.. data:: ELM_POLICY_QUIT
Under which circumstances the application should quit automatically.
.. data:: ELM_POLICY_EXIT
Defines elm_exit() behaviour. (since 1.8)
.. data:: ELM_POLICY_THROTTLE
Defines how throttling should work (since 1.8)
.. _Elm_Policy_Quit:
Quit policy types
-----------------
.. data:: ELM_POLICY_QUIT_NONE
Never quit the application automatically
.. data:: ELM_POLICY_QUIT_LAST_WINDOW_CLOSED
Quit when the application's last window is closed
.. _Elm_Policy_Exit:
Exit policy types
-----------------
Possible values for the ELM_POLICY_EXIT policy.
.. data:: ELM_POLICY_EXIT_NONE
Just quit the main loop on exit().
.. data:: ELM_POLICY_EXIT_WINDOWS_DEL
Delete all the windows after quitting the main loop.
.. _Elm_Policy_Throttle:
Throttle policy types
---------------------
Possible values for the #ELM_POLICY_THROTTLE policy.
.. data:: ELM_POLICY_THROTTLE_CONFIG
Do whatever elementary config is configured to do.
.. data:: ELM_POLICY_THROTTLE_HIDDEN_ALWAYS
Always throttle when all windows are no longer visible.
.. data:: ELM_POLICY_THROTTLE_NEVER
Never throttle when windows are all hidden, regardless of config settings.
.. _Elm_Process_State:
Elm_Process_State
-----------------
.. data:: ELM_PROCESS_STATE_FOREGROUND
The process is in a foreground/active/running state - work as normal.
.. versionadded:: 1.12
.. data:: ELM_PROCESS_STATE_BACKGROUND
The process is in the bacgkround, so you may want to stop animating,
fetching data as often etc.
.. versionadded:: 1.12
.. _Elm_Sys_Notify_Closed_Reason:
Notify close reasons
--------------------
The reason the notification was closed
.. data:: ELM_SYS_NOTIFY_CLOSED_EXPIRED
The notification expired.
.. versionadded:: 1.10
.. data:: ELM_SYS_NOTIFY_CLOSED_DISMISSED
The notification was dismissed by the user.
.. versionadded:: 1.10
.. data:: ELM_SYS_NOTIFY_CLOSED_REQUESTED
The notification was closed by a call to CloseNotification method.
.. versionadded:: 1.10
.. data:: ELM_SYS_NOTIFY_CLOSED_UNDEFINED
Undefined/reserved reasons.
.. versionadded:: 1.10
.. _Elm_Sys_Notify_Urgency:
Notify urgency levels
---------------------
Urgency levels of a notification
:see: :py:func:`sys_notify_send`
.. data:: ELM_SYS_NOTIFY_URGENCY_LOW
Low
.. versionadded:: 1.10
.. data:: ELM_SYS_NOTIFY_URGENCY_NORMAL
Normal
.. versionadded:: 1.10
.. data:: ELM_SYS_NOTIFY_URGENCY_CRITICAL
Critical
.. versionadded:: 1.10
.. _Elm_Glob_Match_Flags:
Glob matching
-------------
Glob matching bitfiled flags
.. data:: ELM_GLOB_MATCH_NO_ESCAPE
Treat backslash as an ordinary character instead of escape.
.. versionadded:: 1.11
.. data:: ELM_GLOB_MATCH_PATH
Match a slash in string only with a slash in pattern and not by an
asterisk (*) or a question mark (?) metacharacter, nor by a bracket
expression ([]) containing a slash.
.. versionadded:: 1.11
.. data:: ELM_GLOB_MATCH_PERIOD
Leading period in string has to be matched exactly by a period in
pattern. A period is considered to be leading if it is the first
character in string, or if both ELM_GLOB_MATCH_PATH is set and the
period immediately follows a slash.
.. versionadded:: 1.11
.. data:: ELM_GLOB_MATCH_NOCASE
The pattern is matched case-insensitively.
.. versionadded:: 1.11
"""
from cpython cimport PyUnicode_AsUTF8String, PyMem_Malloc, Py_DECREF, Py_INCREF
from libc.string cimport memcpy, strdup
from libc.stdlib cimport malloc, free

View File

@ -1 +1 @@
from . import Flipselector, FlipselectorItem
from . import FlipSelector, FlipSelectorItem

View File

@ -0,0 +1,77 @@
from efl import elementary as elm
from efl.elementary.actionslider import *
from efl.elementary.background import *
from efl.elementary.box import *
from efl.elementary.bubble import *
from efl.elementary.button import *
from efl.elementary.calendar_elm import *
from efl.elementary.check import *
from efl.elementary.clock import *
from efl.elementary.colorselector import *
from efl.elementary.configuration import *
from efl.elementary.conformant import *
from efl.elementary.ctxpopup import *
from efl.elementary.datetime_elm import *
from efl.elementary.dayselector import *
from efl.elementary.diskselector import *
from efl.elementary.entry import *
from efl.elementary.fileselector import *
from efl.elementary.fileselector_button import *
from efl.elementary.fileselector_entry import *
from efl.elementary.flip import *
from efl.elementary.flipselector import *
from efl.elementary.frame import *
from efl.elementary.general import *
from efl.elementary.gengrid import *
from efl.elementary.genlist import *
from efl.elementary.gesture_layer import *
from efl.elementary.grid import *
from efl.elementary.hover import *
from efl.elementary.hoversel import *
from efl.elementary.icon import *
from efl.elementary.image import *
from efl.elementary.index import *
from efl.elementary.innerwindow import *
from efl.elementary.label import *
from efl.elementary.layout import *
from efl.elementary.list import *
from efl.elementary.map import *
from efl.elementary.mapbuf import *
from efl.elementary.menu import *
from efl.elementary.multibuttonentry import *
from efl.elementary.naviframe import *
from efl.elementary.need import *
from efl.elementary.notify import *
from efl.elementary.object import *
from efl.elementary.panel import *
from efl.elementary.panes import *
from efl.elementary.photo import *
from efl.elementary.photocam import *
from efl.elementary.plug import *
from efl.elementary.popup import *
from efl.elementary.progressbar import *
from efl.elementary.radio import *
from efl.elementary.scroller import *
from efl.elementary.segment_control import *
from efl.elementary.separator import *
from efl.elementary.slider import *
from efl.elementary.slideshow import *
from efl.elementary.spinner import *
from efl.elementary.systray import *
from efl.elementary.table import *
from efl.elementary.theme import *
from efl.elementary.thumb import *
from efl.elementary.toolbar import *
from efl.elementary.transit import *
from efl.elementary.video import *
from efl.elementary.web import *
from efl.elementary.window import *
elm.init()
win = StandardWindow("test", "test", size=(320, 320))
win.callback_delete_request_add(lambda x: elm.exit())
win.show()
elm.run()
elm.shutdown()