summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKai Huuhko <kai.huuhko@gmail.com>2013-02-17 19:35:20 +0000
committerKai Huuhko <kai.huuhko@gmail.com>2013-02-17 19:35:20 +0000
commit37aba43fb1c5fea99121a87f26845efc1c6683d2 (patch)
tree67b030e80584991ee078ac610f5719b25236cd00
parent43f9b5f319cb930a11850f8b3a3afc1506bbaf94 (diff)
python-efl: Copy over the experimental work on py-elm from my github repo:
- split modules, cuts down development time - Sphinx documentation - new work flow for list type widgets while keeping compatibility with the old one - input events now have functional propagation and support for mouse wheel events - assorted fixes SVN revision: 84027
Diffstat (limited to '')
-rw-r--r--efl/elementary/__init__.py526
-rw-r--r--efl/elementary/actionslider.pxd12
-rw-r--r--efl/elementary/actionslider.pyx (renamed from efl/elementary/efl.elementary_actionslider.pxi)138
-rw-r--r--efl/elementary/background.pxd13
-rw-r--r--efl/elementary/background.pyx206
-rw-r--r--efl/elementary/box.pxd43
-rw-r--r--efl/elementary/box.pyx549
-rw-r--r--efl/elementary/bubble.pxd7
-rw-r--r--efl/elementary/bubble.pyx127
-rw-r--r--efl/elementary/button.pxd16
-rw-r--r--efl/elementary/button.pyx166
-rw-r--r--efl/elementary/calendar_elm.pxd56
-rw-r--r--efl/elementary/calendar_elm.pyx468
-rw-r--r--efl/elementary/callbacks.pxi26
-rw-r--r--efl/elementary/check.pxd6
-rw-r--r--efl/elementary/check.pyx (renamed from efl/elementary/efl.elementary_check.pxi)57
-rw-r--r--efl/elementary/clock.pxd17
-rw-r--r--efl/elementary/clock.pyx276
-rw-r--r--efl/elementary/colorselector.pxd17
-rw-r--r--efl/elementary/colorselector.pyx (renamed from efl/elementary/efl.elementary_colorselector.pxi)151
-rw-r--r--efl/elementary/configuration.pxd90
-rw-r--r--efl/elementary/configuration.pyx692
-rw-r--r--efl/elementary/conformant.pxd5
-rw-r--r--efl/elementary/conformant.pyx (renamed from efl/elementary/efl.elementary_conformant.pxi)24
-rw-r--r--efl/elementary/conversions.pxi47
-rw-r--r--efl/elementary/ctxpopup.pxd18
-rw-r--r--efl/elementary/ctxpopup.pyx (renamed from efl/elementary/efl.elementary_ctxpopup.pxi)164
-rw-r--r--efl/elementary/datetime_elm.pxd19
-rw-r--r--efl/elementary/datetime_elm.pyx528
-rw-r--r--efl/elementary/dayselector.pxd13
-rw-r--r--efl/elementary/dayselector.pyx201
-rw-r--r--efl/elementary/diskselector.pxd28
-rw-r--r--efl/elementary/diskselector.pyx438
-rw-r--r--efl/elementary/efl.elementary_background.pxi98
-rw-r--r--efl/elementary/efl.elementary_box.pxi194
-rw-r--r--efl/elementary/efl.elementary_bubble.pxi44
-rw-r--r--efl/elementary/efl.elementary_button.pxi85
-rw-r--r--efl/elementary/efl.elementary_calendar.pxi139
-rw-r--r--efl/elementary/efl.elementary_clock.pxi116
-rw-r--r--efl/elementary/efl.elementary_configuration.pxi311
-rw-r--r--efl/elementary/efl.elementary_datetime.pxi142
-rw-r--r--efl/elementary/efl.elementary_dayselector.pxi61
-rw-r--r--efl/elementary/efl.elementary_diskselector.pxi168
-rw-r--r--efl/elementary/efl.elementary_entry.pxi683
-rw-r--r--efl/elementary/efl.elementary_fileselector.pxi138
-rw-r--r--efl/elementary/efl.elementary_flip.pxi75
-rw-r--r--efl/elementary/efl.elementary_flipselector.pxi134
-rw-r--r--efl/elementary/efl.elementary_gengrid.pxi810
-rw-r--r--efl/elementary/efl.elementary_genlist.pxi922
-rw-r--r--efl/elementary/efl.elementary_gesture_layer.pxi74
-rw-r--r--efl/elementary/efl.elementary_grid.pxi68
-rw-r--r--efl/elementary/efl.elementary_hover.pxi72
-rw-r--r--efl/elementary/efl.elementary_hoversel.pxi141
-rw-r--r--efl/elementary/efl.elementary_icon.pxi78
-rw-r--r--efl/elementary/efl.elementary_image.pxi227
-rw-r--r--efl/elementary/efl.elementary_index.pxi192
-rw-r--r--efl/elementary/efl.elementary_label.pxi79
-rw-r--r--efl/elementary/efl.elementary_layout.pxi45
-rw-r--r--efl/elementary/efl.elementary_layout_class.pxi139
-rw-r--r--efl/elementary/efl.elementary_list.pxi381
-rw-r--r--efl/elementary/efl.elementary_naviframe.pxi189
-rw-r--r--efl/elementary/efl.elementary_notify.pxi83
-rw-r--r--efl/elementary/efl.elementary_object.pxi563
-rw-r--r--efl/elementary/efl.elementary_object_item.pxi252
-rw-r--r--efl/elementary/efl.elementary_panes.pxi73
-rw-r--r--efl/elementary/efl.elementary_photocam.pxi188
-rw-r--r--efl/elementary/efl.elementary_popup.pxi104
-rw-r--r--efl/elementary/efl.elementary_progressbar.pxi119
-rw-r--r--efl/elementary/efl.elementary_radio.pxi85
-rw-r--r--efl/elementary/efl.elementary_scroller.pxi233
-rw-r--r--efl/elementary/efl.elementary_segment_control.pxi102
-rw-r--r--efl/elementary/efl.elementary_slider.pxi186
-rw-r--r--efl/elementary/efl.elementary_slideshow.pxi293
-rw-r--r--efl/elementary/efl.elementary_spinner.pxi159
-rw-r--r--efl/elementary/efl.elementary_table.pxi73
-rw-r--r--efl/elementary/efl.elementary_theme.pxi110
-rw-r--r--efl/elementary/efl.elementary_thumb.pxi110
-rw-r--r--efl/elementary/efl.elementary_toolbar.pxi395
-rw-r--r--efl/elementary/efl.elementary_transit.pxi154
-rw-r--r--efl/elementary/efl.elementary_window.pxi610
-rw-r--r--efl/elementary/entry.pxd101
-rw-r--r--efl/elementary/entry.pyx1603
-rw-r--r--efl/elementary/enums.pxd437
-rw-r--r--efl/elementary/fileselector.pxd21
-rw-r--r--efl/elementary/fileselector.pyx280
-rw-r--r--efl/elementary/fileselector_button.pxd22
-rw-r--r--efl/elementary/fileselector_button.pyx (renamed from efl/elementary/efl.elementary_fileselector_button.pxi)210
-rw-r--r--efl/elementary/fileselector_entry.pxd23
-rw-r--r--efl/elementary/fileselector_entry.pyx (renamed from efl/elementary/efl.elementary_fileselector_entry.pxi)260
-rw-r--r--efl/elementary/flip.pxd14
-rw-r--r--efl/elementary/flip.pyx400
-rw-r--r--efl/elementary/flipselector.pxd22
-rw-r--r--efl/elementary/flipselector.pyx340
-rw-r--r--efl/elementary/frame.pxd9
-rw-r--r--efl/elementary/frame.pyx (renamed from efl/elementary/efl.elementary_frame.pxi)79
-rw-r--r--efl/elementary/general.pxd132
-rw-r--r--efl/elementary/general.pyx (renamed from efl/elementary/efl.elementary.pyx)151
-rw-r--r--efl/elementary/gengrid.pxd97
-rw-r--r--efl/elementary/gengrid.pyx1576
-rw-r--r--efl/elementary/genlist.pxd110
-rw-r--r--efl/elementary/genlist.pyx2220
-rw-r--r--efl/elementary/gesture_layer.pxd53
-rw-r--r--efl/elementary/gesture_layer.pyx301
-rw-r--r--efl/elementary/grid.pxd13
-rw-r--r--efl/elementary/grid.pyx154
-rw-r--r--efl/elementary/hover.pxd15
-rw-r--r--efl/elementary/hover.pyx220
-rw-r--r--efl/elementary/hoversel.pxd20
-rw-r--r--efl/elementary/hoversel.pyx310
-rw-r--r--efl/elementary/icon.pxd15
-rw-r--r--efl/elementary/icon.pyx240
-rw-r--r--efl/elementary/image.pxd40
-rw-r--r--efl/elementary/image.pyx476
-rw-r--r--efl/elementary/index.pxd29
-rw-r--r--efl/elementary/index.pyx460
-rw-r--r--efl/elementary/innerwindow.pxd8
-rw-r--r--efl/elementary/innerwindow.pyx (renamed from efl/elementary/efl.elementary_innerwindow.pxi)46
-rw-r--r--efl/elementary/label.pxd16
-rw-r--r--efl/elementary/label.pyx204
-rw-r--r--efl/elementary/layout.pxd10
-rw-r--r--efl/elementary/layout.pyx233
-rw-r--r--efl/elementary/layout_class.pxd61
-rw-r--r--efl/elementary/layout_class.pyx628
-rw-r--r--efl/elementary/list.pxd41
-rw-r--r--efl/elementary/list.pyx919
-rw-r--r--efl/elementary/map.pxd91
-rw-r--r--efl/elementary/map.pyx (renamed from efl/elementary/efl.elementary_map.pxi)444
-rw-r--r--efl/elementary/mapbuf.pxd10
-rw-r--r--efl/elementary/mapbuf.pyx (renamed from efl/elementary/efl.elementary_mapbuf.pxi)65
-rw-r--r--efl/elementary/menu.pxd30
-rw-r--r--efl/elementary/menu.pyx (renamed from efl/elementary/efl.elementary_menu.pxi)269
-rw-r--r--efl/elementary/multibuttonentry.pxd28
-rw-r--r--efl/elementary/multibuttonentry.pyx (renamed from efl/elementary/efl.elementary_multibuttonentry.pxi)105
-rw-r--r--efl/elementary/naviframe.pxd27
-rw-r--r--efl/elementary/naviframe.pyx499
-rw-r--r--efl/elementary/need.pxd7
-rw-r--r--efl/elementary/need.pyx (renamed from efl/elementary/efl.elementary_need.pxi)12
-rw-r--r--efl/elementary/notify.pxd14
-rw-r--r--efl/elementary/notify.pyx204
-rw-r--r--efl/elementary/object.pxd146
-rw-r--r--efl/elementary/object.pyx1163
-rw-r--r--efl/elementary/object_item.pxd55
-rw-r--r--efl/elementary/object_item.pyx478
-rw-r--r--efl/elementary/panel.pxd10
-rw-r--r--efl/elementary/panel.pyx (renamed from efl/elementary/efl.elementary_panel.pxi)86
-rw-r--r--efl/elementary/panes.pxd12
-rw-r--r--efl/elementary/panes.pyx160
-rw-r--r--efl/elementary/photo.pxd12
-rw-r--r--efl/elementary/photo.pyx (renamed from efl/elementary/efl.elementary_photo.pxi)111
-rw-r--r--efl/elementary/photocam.pxd23
-rw-r--r--efl/elementary/photocam.pyx397
-rw-r--r--efl/elementary/plug.pxd7
-rw-r--r--efl/elementary/plug.pyx (renamed from efl/elementary/efl.elementary_plug.pxi)40
-rw-r--r--efl/elementary/popup.pxd16
-rw-r--r--efl/elementary/popup.pyx349
-rw-r--r--efl/elementary/progressbar.pxd18
-rw-r--r--efl/elementary/progressbar.pyx252
-rw-r--r--efl/elementary/radio.pxd12
-rw-r--r--efl/elementary/radio.pyx170
-rw-r--r--efl/elementary/scroller.pxd28
-rw-r--r--efl/elementary/scroller.pyx545
-rw-r--r--efl/elementary/segment_control.pxd17
-rw-r--r--efl/elementary/segment_control.pyx323
-rw-r--r--efl/elementary/separator.pxd6
-rw-r--r--efl/elementary/separator.pyx (renamed from efl/elementary/efl.elementary_separator.pxi)28
-rw-r--r--efl/elementary/slider.pxd24
-rw-r--r--efl/elementary/slider.pyx357
-rw-r--r--efl/elementary/slideshow.pxd46
-rw-r--r--efl/elementary/slideshow.pyx659
-rw-r--r--efl/elementary/spinner.pxd24
-rw-r--r--efl/elementary/spinner.pyx357
-rw-r--r--efl/elementary/table.pxd13
-rw-r--r--efl/elementary/table.pyx178
-rw-r--r--efl/elementary/theme.pxd49
-rw-r--r--efl/elementary/theme.pyx393
-rw-r--r--efl/elementary/thumb.pxd16
-rw-r--r--efl/elementary/thumb.pyx299
-rw-r--r--efl/elementary/toolbar.pxd66
-rw-r--r--efl/elementary/toolbar.pyx903
-rw-r--r--efl/elementary/tooltips.pxi48
-rw-r--r--efl/elementary/transit.pxd52
-rw-r--r--efl/elementary/transit.pyx781
-rw-r--r--efl/elementary/video.pxd24
-rw-r--r--efl/elementary/video.pyx (renamed from efl/elementary/efl.elementary_video.pxi)194
-rw-r--r--efl/elementary/web.pxd80
-rw-r--r--efl/elementary/web.pyx (renamed from efl/elementary/efl.elementary_web.pxi)126
-rw-r--r--efl/elementary/widget_header.pxi36
-rw-r--r--efl/elementary/window.pxd104
-rw-r--r--efl/elementary/window.pyx1384
189 files changed, 29646 insertions, 10296 deletions
diff --git a/efl/elementary/__init__.py b/efl/elementary/__init__.py
new file mode 100644
index 0000000..f0ea1d5
--- /dev/null
+++ b/efl/elementary/__init__.py
@@ -0,0 +1,526 @@
1# Copyright (c) 2008 Simon Busch
2# Copyright 2012 Kai Huuhko <kai.huuhko@gmail.com>
3#
4# This file is part of python-elementary.
5#
6# python-elementary is free software: you can redistribute it and/or modify
7# it under the terms of the GNU Lesser General Public License as published by
8# the Free Software Foundation, either version 3 of the License, or
9# (at your option) any later version.
10#
11# python-elementary is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU Lesser General Public License for more details.
15#
16# You should have received a copy of the GNU Lesser General Public License
17# along with python-elementary. If not, see <http://www.gnu.org/licenses/>.
18#
19
20from actionslider import Actionslider
21from background import Background
22from box import Box
23from bubble import Bubble
24from button import Button
25from calendar_elm import Calendar, CalendarMark
26from check import Check
27from clock import Clock
28from colorselector import Colorselector, ColorselectorPaletteItem
29from configuration import Configuration, \
30 config_finger_size_get, config_finger_size_set, \
31 config_tooltip_delay_get, config_tooltip_delay_set, \
32 focus_highlight_animate_get, focus_highlight_animate_set, \
33 focus_highlight_enabled_get, focus_highlight_enabled_set, \
34 preferred_engine_get, preferred_engine_set, \
35 engine_get, engine_set, scale_get, scale_set, \
36 cursor_engine_only_get, cursor_engine_only_set
37from conformant import Conformant
38from ctxpopup import Ctxpopup, CtxpopupItem
39from datetime_elm import Datetime
40from dayselector import Dayselector
41from diskselector import Diskselector, DiskselectorItem
42from entry import Entry
43from fileselector import Fileselector
44from fileselector_button import FileselectorButton
45from fileselector_entry import FileselectorEntry
46from flip import Flip
47from flipselector import FlipSelector, FlipSelectorItem
48from frame import Frame
49from general import init, shutdown, run, exit, coords_finger_size_adjust, policy_set, policy_get
50from gengrid import Gengrid, GengridItem, GengridItemClass
51from genlist import Genlist, GenlistItem, GenlistItemClass
52from gesture_layer import GestureLayer
53from grid import Grid
54from hover import Hover
55from hoversel import Hoversel, HoverselItem
56from icon import Icon
57from image import Image
58from index import Index, IndexItem
59from innerwindow import InnerWindow
60from label import Label
61from layout import Layout
62from layout_class import LayoutClass
63from list import List, ListItem
64from map import Map, MapName, MapOverlay, MapOverlayBubble, MapOverlayCircle, MapOverlayClass, MapOverlayLine, MapOverlayPolygon, MapOverlayRoute, MapOverlayScale
65from mapbuf import Mapbuf
66from menu import Menu, MenuItem, MenuSeparatorItem
67from multibuttonentry import MultiButtonEntry, MultiButtonEntryItem
68from naviframe import Naviframe, NaviframeItem
69from need import *
70from notify import Notify
71from object import Object
72from object_item import ObjectItem
73from panel import Panel
74from panes import Panes
75from photo import Photo
76from photocam import Photocam
77from plug import Plug
78from popup import Popup, PopupItem
79from progressbar import Progressbar
80from radio import Radio
81from scroller import Scroller
82from segment_control import SegmentControl, SegmentControlItem
83from separator import Separator
84from slider import Slider
85from slideshow import Slideshow, SlideshowItem, SlideshowItemClass
86from spinner import Spinner
87from table import Table
88from theme import Theme, theme_overlay_add, theme_extension_add
89from thumb import Thumb
90from toolbar import Toolbar, ToolbarItem
91from transit import Transit
92from video import Video, Player
93from web import Web
94from window import Window, StandardWindow
95
96from actionslider import \
97 ELM_ACTIONSLIDER_NONE, \
98 ELM_ACTIONSLIDER_LEFT, \
99 ELM_ACTIONSLIDER_CENTER, \
100 ELM_ACTIONSLIDER_RIGHT, \
101 ELM_ACTIONSLIDER_ALL
102
103from background import \
104 ELM_BG_OPTION_CENTER, \
105 ELM_BG_OPTION_SCALE, \
106 ELM_BG_OPTION_STRETCH, \
107 ELM_BG_OPTION_TILE, \
108 ELM_BG_OPTION_LAST
109
110from box import \
111 ELM_BOX_LAYOUT_HORIZONTAL, \
112 ELM_BOX_LAYOUT_VERTICAL, \
113 ELM_BOX_LAYOUT_HOMOGENEOUS_VERTICAL, \
114 ELM_BOX_LAYOUT_HOMOGENEOUS_HORIZONTAL, \
115 ELM_BOX_LAYOUT_HOMOGENEOUS_MAX_SIZE_HORIZONTAL, \
116 ELM_BOX_LAYOUT_HOMOGENEOUS_MAX_SIZE_VERTICAL, \
117 ELM_BOX_LAYOUT_FLOW_HORIZONTAL, \
118 ELM_BOX_LAYOUT_FLOW_VERTICAL, \
119 ELM_BOX_LAYOUT_STACK
120
121from bubble import \
122 ELM_BUBBLE_POS_TOP_LEFT, \
123 ELM_BUBBLE_POS_TOP_RIGHT, \
124 ELM_BUBBLE_POS_BOTTOM_LEFT, \
125 ELM_BUBBLE_POS_BOTTOM_RIGHT
126
127from calendar_elm import \
128 ELM_CALENDAR_UNIQUE, \
129 ELM_CALENDAR_DAILY, \
130 ELM_CALENDAR_WEEKLY, \
131 ELM_CALENDAR_MONTHLY, \
132 ELM_CALENDAR_ANNUALLY, \
133 ELM_CALENDAR_LAST_DAY_OF_MONTH, \
134 ELM_CALENDAR_SELECT_MODE_DEFAULT, \
135 ELM_CALENDAR_SELECT_MODE_ALWAYS, \
136 ELM_CALENDAR_SELECT_MODE_NONE, \
137 ELM_CALENDAR_SELECT_MODE_ONDEMAND
138
139from clock import \
140 ELM_CLOCK_EDIT_DEFAULT, \
141 ELM_CLOCK_EDIT_HOUR_DECIMAL, \
142 ELM_CLOCK_EDIT_HOUR_UNIT, \
143 ELM_CLOCK_EDIT_MIN_DECIMAL, \
144 ELM_CLOCK_EDIT_MIN_UNIT, \
145 ELM_CLOCK_EDIT_SEC_DECIMAL, \
146 ELM_CLOCK_EDIT_SEC_UNIT, \
147 ELM_CLOCK_EDIT_ALL
148
149from entry import \
150 ELM_CNP_MODE_MARKUP, \
151 ELM_CNP_MODE_NO_IMAGE, \
152 ELM_CNP_MODE_PLAINTEXT
153
154from colorselector import \
155 ELM_COLORSELECTOR_PALETTE, \
156 ELM_COLORSELECTOR_COMPONENTS, \
157 ELM_COLORSELECTOR_BOTH
158
159from ctxpopup import \
160 ELM_CTXPOPUP_DIRECTION_DOWN, \
161 ELM_CTXPOPUP_DIRECTION_RIGHT, \
162 ELM_CTXPOPUP_DIRECTION_LEFT, \
163 ELM_CTXPOPUP_DIRECTION_UP, \
164 ELM_CTXPOPUP_DIRECTION_UNKNOWN
165
166from datetime_elm import \
167 ELM_DATETIME_YEAR, \
168 ELM_DATETIME_MONTH, \
169 ELM_DATETIME_DATE, \
170 ELM_DATETIME_HOUR, \
171 ELM_DATETIME_MINUTE, \
172 ELM_DATETIME_AMPM
173
174from calendar_elm import \
175 ELM_DAY_SUNDAY, \
176 ELM_DAY_MONDAY, \
177 ELM_DAY_TUESDAY, \
178 ELM_DAY_WEDNESDAY, \
179 ELM_DAY_THURSDAY, \
180 ELM_DAY_FRIDAY, \
181 ELM_DAY_SATURDAY, \
182 ELM_DAY_LAST
183
184from dayselector import \
185 ELM_DAYSELECTOR_SUN, \
186 ELM_DAYSELECTOR_MON, \
187 ELM_DAYSELECTOR_TUE, \
188 ELM_DAYSELECTOR_WED, \
189 ELM_DAYSELECTOR_THU, \
190 ELM_DAYSELECTOR_FRI, \
191 ELM_DAYSELECTOR_SAT
192
193from fileselector import \
194 ELM_FILESELECTOR_LIST, \
195 ELM_FILESELECTOR_GRID
196
197from flip import \
198 ELM_FLIP_DIRECTION_UP, \
199 ELM_FLIP_DIRECTION_DOWN, \
200 ELM_FLIP_DIRECTION_LEFT, \
201 ELM_FLIP_DIRECTION_RIGHT, \
202 ELM_FLIP_INTERACTION_NONE, \
203 ELM_FLIP_INTERACTION_ROTATE, \
204 ELM_FLIP_INTERACTION_CUBE, \
205 ELM_FLIP_INTERACTION_PAGE, \
206 ELM_FLIP_ROTATE_Y_CENTER_AXIS, \
207 ELM_FLIP_ROTATE_X_CENTER_AXIS, \
208 ELM_FLIP_ROTATE_XZ_CENTER_AXIS, \
209 ELM_FLIP_ROTATE_YZ_CENTER_AXIS, \
210 ELM_FLIP_CUBE_LEFT, \
211 ELM_FLIP_CUBE_RIGHT, \
212 ELM_FLIP_CUBE_UP, \
213 ELM_FLIP_CUBE_DOWN, \
214 ELM_FLIP_PAGE_LEFT, \
215 ELM_FLIP_PAGE_RIGHT, \
216 ELM_FLIP_PAGE_UP, \
217 ELM_FLIP_PAGE_DOWN
218
219from object import \
220 ELM_FOCUS_PREVIOUS, \
221 ELM_FOCUS_NEXT
222
223from genlist import \
224 ELM_GENLIST_ITEM_NONE, \
225 ELM_GENLIST_ITEM_TREE, \
226 ELM_GENLIST_ITEM_GROUP, \
227 ELM_GENLIST_ITEM_MAX, \
228 ELM_GENLIST_ITEM_FIELD_ALL, \
229 ELM_GENLIST_ITEM_FIELD_TEXT, \
230 ELM_GENLIST_ITEM_FIELD_CONTENT, \
231 ELM_GENLIST_ITEM_FIELD_STATE
232
233from gesture_layer import \
234 ELM_GESTURE_STATE_UNDEFINED, \
235 ELM_GESTURE_STATE_START, \
236 ELM_GESTURE_STATE_MOVE, \
237 ELM_GESTURE_STATE_END, \
238 ELM_GESTURE_STATE_ABORT, \
239 ELM_GESTURE_FIRST, \
240 ELM_GESTURE_N_TAPS, \
241 ELM_GESTURE_N_LONG_TAPS, \
242 ELM_GESTURE_N_DOUBLE_TAPS, \
243 ELM_GESTURE_N_TRIPLE_TAPS, \
244 ELM_GESTURE_MOMENTUM, \
245 ELM_GESTURE_N_LINES, \
246 ELM_GESTURE_N_FLICKS, \
247 ELM_GESTURE_ZOOM, \
248 ELM_GESTURE_ROTATE
249
250from hover import \
251 ELM_HOVER_AXIS_NONE, \
252 ELM_HOVER_AXIS_HORIZONTAL, \
253 ELM_HOVER_AXIS_VERTICAL, \
254 ELM_HOVER_AXIS_BOTH
255
256from icon import \
257 ELM_ICON_NONE, \
258 ELM_ICON_FILE, \
259 ELM_ICON_STANDARD
260
261#~ from object import \
262 #~ ELM_ILLUME_COMMAND_FOCUS_BACK, \
263 #~ ELM_ILLUME_COMMAND_FOCUS_FORWARD, \
264 #~ ELM_ILLUME_COMMAND_FOCUS_HOME, \
265 #~ ELM_ILLUME_COMMAND_CLOSE
266
267from image import \
268 ELM_IMAGE_ORIENT_NONE, \
269 ELM_IMAGE_ROTATE_90, \
270 ELM_IMAGE_ROTATE_180, \
271 ELM_IMAGE_ROTATE_270, \
272 ELM_IMAGE_FLIP_HORIZONTAL, \
273 ELM_IMAGE_FLIP_VERTICAL, \
274 ELM_IMAGE_FLIP_TRANSPOSE, \
275 ELM_IMAGE_FLIP_TRANSVERSE
276
277from entry import \
278 ELM_INPUT_PANEL_LANG_AUTOMATIC, \
279 ELM_INPUT_PANEL_LANG_ALPHABET, \
280 ELM_INPUT_PANEL_LAYOUT_NORMAL, \
281 ELM_INPUT_PANEL_LAYOUT_NUMBER, \
282 ELM_INPUT_PANEL_LAYOUT_EMAIL, \
283 ELM_INPUT_PANEL_LAYOUT_URL, \
284 ELM_INPUT_PANEL_LAYOUT_PHONENUMBER, \
285 ELM_INPUT_PANEL_LAYOUT_IP, \
286 ELM_INPUT_PANEL_LAYOUT_MONTH, \
287 ELM_INPUT_PANEL_LAYOUT_NUMBERONLY, \
288 ELM_INPUT_PANEL_LAYOUT_INVALID, \
289 ELM_INPUT_PANEL_LAYOUT_HEX, \
290 ELM_INPUT_PANEL_LAYOUT_TERMINAL, \
291 ELM_INPUT_PANEL_LAYOUT_PASSWORD, \
292 ELM_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT, \
293 ELM_INPUT_PANEL_RETURN_KEY_TYPE_DONE, \
294 ELM_INPUT_PANEL_RETURN_KEY_TYPE_GO, \
295 ELM_INPUT_PANEL_RETURN_KEY_TYPE_JOIN, \
296 ELM_INPUT_PANEL_RETURN_KEY_TYPE_LOGIN, \
297 ELM_INPUT_PANEL_RETURN_KEY_TYPE_NEXT, \
298 ELM_INPUT_PANEL_RETURN_KEY_TYPE_SEARCH, \
299 ELM_INPUT_PANEL_RETURN_KEY_TYPE_SEND
300
301from list import \
302 ELM_LIST_COMPRESS, \
303 ELM_LIST_SCROLL, \
304 ELM_LIST_LIMIT
305
306from map import \
307 ELM_MAP_OVERLAY_TYPE_NONE, \
308 ELM_MAP_OVERLAY_TYPE_DEFAULT, \
309 ELM_MAP_OVERLAY_TYPE_CLASS, \
310 ELM_MAP_OVERLAY_TYPE_GROUP, \
311 ELM_MAP_OVERLAY_TYPE_BUBBLE, \
312 ELM_MAP_OVERLAY_TYPE_ROUTE, \
313 ELM_MAP_OVERLAY_TYPE_LINE, \
314 ELM_MAP_OVERLAY_TYPE_POLYGON, \
315 ELM_MAP_OVERLAY_TYPE_CIRCLE, \
316 ELM_MAP_OVERLAY_TYPE_SCALE, \
317 ELM_MAP_ROUTE_METHOD_FASTEST, \
318 ELM_MAP_ROUTE_METHOD_SHORTEST, \
319 ELM_MAP_ROUTE_METHOD_LAST, \
320 ELM_MAP_ROUTE_TYPE_MOTOCAR, \
321 ELM_MAP_ROUTE_TYPE_BICYCLE, \
322 ELM_MAP_ROUTE_TYPE_FOOT, \
323 ELM_MAP_ROUTE_TYPE_LAST, \
324 ELM_MAP_SOURCE_TYPE_TILE, \
325 ELM_MAP_SOURCE_TYPE_ROUTE, \
326 ELM_MAP_SOURCE_TYPE_NAME, \
327 ELM_MAP_SOURCE_TYPE_LAST, \
328 ELM_MAP_ZOOM_MODE_MANUAL, \
329 ELM_MAP_ZOOM_MODE_AUTO_FIT, \
330 ELM_MAP_ZOOM_MODE_AUTO_FILL, \
331 ELM_MAP_ZOOM_MODE_LAST
332
333from notify import \
334 ELM_NOTIFY_ORIENT_TOP, \
335 ELM_NOTIFY_ORIENT_CENTER, \
336 ELM_NOTIFY_ORIENT_BOTTOM, \
337 ELM_NOTIFY_ORIENT_LEFT, \
338 ELM_NOTIFY_ORIENT_RIGHT, \
339 ELM_NOTIFY_ORIENT_TOP_LEFT, \
340 ELM_NOTIFY_ORIENT_TOP_RIGHT, \
341 ELM_NOTIFY_ORIENT_BOTTOM_LEFT, \
342 ELM_NOTIFY_ORIENT_BOTTOM_RIGHT
343
344from list import \
345 ELM_OBJECT_SELECT_MODE_DEFAULT, \
346 ELM_OBJECT_SELECT_MODE_ALWAYS, \
347 ELM_OBJECT_SELECT_MODE_NONE, \
348 ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY, \
349 ELM_OBJECT_SELECT_MODE_MAX
350
351from panel import \
352 ELM_PANEL_ORIENT_TOP, \
353 ELM_PANEL_ORIENT_BOTTOM, \
354 ELM_PANEL_ORIENT_LEFT, \
355 ELM_PANEL_ORIENT_RIGHT
356
357from photocam import \
358 ELM_PHOTOCAM_ZOOM_MODE_MANUAL, \
359 ELM_PHOTOCAM_ZOOM_MODE_AUTO_FIT, \
360 ELM_PHOTOCAM_ZOOM_MODE_AUTO_FILL, \
361 ELM_PHOTOCAM_ZOOM_MODE_AUTO_FIT_IN
362
363from general import \
364 ELM_POLICY_QUIT, \
365 ELM_POLICY_QUIT_NONE, \
366 ELM_POLICY_QUIT_LAST_WINDOW_CLOSED
367
368from popup import \
369 ELM_POPUP_ORIENT_TOP, \
370 ELM_POPUP_ORIENT_CENTER, \
371 ELM_POPUP_ORIENT_BOTTOM, \
372 ELM_POPUP_ORIENT_LEFT, \
373 ELM_POPUP_ORIENT_RIGHT, \
374 ELM_POPUP_ORIENT_TOP_LEFT, \
375 ELM_POPUP_ORIENT_TOP_RIGHT, \
376 ELM_POPUP_ORIENT_BOTTOM_LEFT, \
377 ELM_POPUP_ORIENT_BOTTOM_RIGHT
378
379from scroller import \
380 ELM_SCROLLER_POLICY_AUTO, \
381 ELM_SCROLLER_POLICY_ON, \
382 ELM_SCROLLER_POLICY_OFF
383
384from entry import \
385 ELM_TEXT_FORMAT_PLAIN_UTF8, \
386 ELM_TEXT_FORMAT_MARKUP_UTF8
387
388from toolbar import \
389 ELM_TOOLBAR_SHRINK_NONE, \
390 ELM_TOOLBAR_SHRINK_HIDE, \
391 ELM_TOOLBAR_SHRINK_SCROLL, \
392 ELM_TOOLBAR_SHRINK_MENU, \
393 ELM_TOOLBAR_SHRINK_EXPAND, \
394 ELM_TOOLBAR_SHRINK_LAST
395
396from web import \
397 ELM_WEB_WINDOW_FEATURE_TOOLBAR, \
398 ELM_WEB_WINDOW_FEATURE_STATUSBAR, \
399 ELM_WEB_WINDOW_FEATURE_SCROLLBARS, \
400 ELM_WEB_WINDOW_FEATURE_MENUBAR, \
401 ELM_WEB_WINDOW_FEATURE_LOCATIONBAR, \
402 ELM_WEB_WINDOW_FEATURE_FULLSCREEN, \
403 ELM_WEB_ZOOM_MODE_MANUAL, \
404 ELM_WEB_ZOOM_MODE_AUTO_FIT, \
405 ELM_WEB_ZOOM_MODE_AUTO_FILL
406
407from window import \
408 ELM_WIN_BASIC, \
409 ELM_WIN_DIALOG_BASIC, \
410 ELM_WIN_DESKTOP, \
411 ELM_WIN_DOCK, \
412 ELM_WIN_TOOLBAR, \
413 ELM_WIN_MENU, \
414 ELM_WIN_UTILITY, \
415 ELM_WIN_SPLASH, \
416 ELM_WIN_DROPDOWN_MENU, \
417 ELM_WIN_POPUP_MENU, \
418 ELM_WIN_TOOLTIP, \
419 ELM_WIN_NOTIFICATION, \
420 ELM_WIN_COMBO, \
421 ELM_WIN_DND, \
422 ELM_WIN_INLINED_IMAGE, \
423 ELM_WIN_SOCKET_IMAGE, \
424 ELM_WIN_INDICATOR_UNKNOWN, \
425 ELM_WIN_INDICATOR_HIDE, \
426 ELM_WIN_INDICATOR_SHOW, \
427 ELM_WIN_INDICATOR_OPACITY_UNKNOWN, \
428 ELM_WIN_INDICATOR_OPAQUE, \
429 ELM_WIN_INDICATOR_TRANSLUCENT, \
430 ELM_WIN_INDICATOR_TRANSPARENT, \
431 ELM_WIN_KEYBOARD_UNKNOWN, \
432 ELM_WIN_KEYBOARD_OFF, \
433 ELM_WIN_KEYBOARD_ON, \
434 ELM_WIN_KEYBOARD_ALPHA, \
435 ELM_WIN_KEYBOARD_NUMERIC, \
436 ELM_WIN_KEYBOARD_PIN, \
437 ELM_WIN_KEYBOARD_PHONE_NUMBER, \
438 ELM_WIN_KEYBOARD_HEX, \
439 ELM_WIN_KEYBOARD_TERMINAL, \
440 ELM_WIN_KEYBOARD_PASSWORD, \
441 ELM_WIN_KEYBOARD_IP, \
442 ELM_WIN_KEYBOARD_HOST, \
443 ELM_WIN_KEYBOARD_FILE, \
444 ELM_WIN_KEYBOARD_URL, \
445 ELM_WIN_KEYBOARD_KEYPAD, \
446 ELM_WIN_KEYBOARD_J2ME
447
448from label import \
449 ELM_WRAP_NONE, \
450 ELM_WRAP_CHAR, \
451 ELM_WRAP_WORD, \
452 ELM_WRAP_MIXED
453
454#init()
455
456"""
457__all__ = [
458 "actionslider",
459 "background",
460 "box",
461 "bubble",
462 "button",
463 "calendar",
464 "check",
465 "clock",
466 "colorselector",
467 "configuration",
468 "conformant",
469 "ctxpopup",
470 "datetime_elm",
471 "dayselector",
472 "diskselector",
473 "entry",
474 "fileselector",
475 "fileselector_button",
476 "fileselector_entry",
477 "flip",
478 "frame",
479 "general",
480 "gengrid",
481 "genlist",
482 "gesture_layer",
483 "grid",
484 "hover",
485 "hoversel",
486 "icon",
487 "image",
488 "index",
489 "innerwindow",
490 "label",
491 "layout_class",
492 "layout",
493 "list",
494 "map",
495 "mapbuf",
496 "menu",
497 "multibuttonentry",
498 "naviframe",
499 "need",
500 "notify",
501 "object",
502 "object_item",
503 "panel",
504 "panes",
505 "photo",
506 "photocam",
507 "plug",
508 "popup",
509 "progressbar",
510 "radio",
511 "scroller",
512 "segment_control",
513 "separator",
514 "slider",
515 "slideshow",
516 "spinner",
517 "table",
518 "theme",
519 "thumb",
520 "toolbar",
521 "transit",
522 "video",
523 "web",
524 "window",
525]
526"""
diff --git a/efl/elementary/actionslider.pxd b/efl/elementary/actionslider.pxd
new file mode 100644
index 0000000..9cb6b9d
--- /dev/null
+++ b/efl/elementary/actionslider.pxd
@@ -0,0 +1,12 @@
1from efl.evas cimport Evas_Object
2from enums cimport Elm_Actionslider_Pos
3
4cdef extern from "Elementary.h":
5 Evas_Object *elm_actionslider_add(Evas_Object *parent)
6 char *elm_actionslider_selected_label_get(Evas_Object *obj)
7 void elm_actionslider_indicator_pos_set(Evas_Object *obj, Elm_Actionslider_Pos pos)
8 Elm_Actionslider_Pos elm_actionslider_indicator_pos_get(Evas_Object *obj)
9 void elm_actionslider_magnet_pos_set(Evas_Object *obj, Elm_Actionslider_Pos pos)
10 Elm_Actionslider_Pos elm_actionslider_magnet_pos_get(Evas_Object *obj)
11 void elm_actionslider_enabled_pos_set(Evas_Object *obj, Elm_Actionslider_Pos pos)
12 Elm_Actionslider_Pos elm_actionslider_enabled_pos_get(Evas_Object *obj)
diff --git a/efl/elementary/efl.elementary_actionslider.pxi b/efl/elementary/actionslider.pyx
index 9abb56f..647c7db 100644
--- a/efl/elementary/efl.elementary_actionslider.pxi
+++ b/efl/elementary/actionslider.pyx
@@ -14,63 +14,167 @@
14# 14#
15# You should have received a copy of the GNU Lesser General Public License 15# You should have received a copy of the GNU Lesser General Public License
16# along with this Python-EFL. If not, see <http://www.gnu.org/licenses/>. 16# along with this Python-EFL. If not, see <http://www.gnu.org/licenses/>.
17#
18
19"""
20
21.. rubric:: Actionslider positions
22
23.. data:: ELM_ACTIONSLIDER_NONE
24
25 No position
26
27.. data:: ELM_ACTIONSLIDER_LEFT
28
29 Left position
30
31.. data:: ELM_ACTIONSLIDER_CENTER
32
33 Center position
34.. data:: ELM_ACTIONSLIDER_RIGHT
17 35
36 Right position
37
38.. data:: ELM_ACTIONSLIDER_ALL
39
40 All positions
41
42"""
43
44include "widget_header.pxi"
45include "callbacks.pxi"
46
47from layout_class cimport LayoutClass
48
49cimport enums
50
51ELM_ACTIONSLIDER_NONE = enums.ELM_ACTIONSLIDER_NONE
52ELM_ACTIONSLIDER_LEFT = enums.ELM_ACTIONSLIDER_LEFT
53ELM_ACTIONSLIDER_CENTER = enums.ELM_ACTIONSLIDER_CENTER
54ELM_ACTIONSLIDER_RIGHT = enums.ELM_ACTIONSLIDER_RIGHT
55ELM_ACTIONSLIDER_ALL = enums.ELM_ACTIONSLIDER_ALL
18 56
19cdef class Actionslider(LayoutClass): 57cdef class Actionslider(LayoutClass):
20 58
59 """
60
61 An actionslider is a switcher for two or three labels with
62 customizable magnet properties.
63
64 The user drags and releases the indicator, to choose a label.
65
66 Labels can occupy the following positions.
67
68 - Left
69 - Right
70 - Center
71
72 Positions can be enabled or disabled.
73
74 Magnets can be set on the above positions.
75
76 When the indicator is released, it will move to its nearest "enabled and
77 magnetized" position.
78
79 This widget emits the following signals, besides the ones sent from
80 :py:class:`elementary.layout.Layout`:
81
82 - **selected** - when user selects an enabled position (the label is
83 passed as event info)".
84 - **pos_changed** - when the indicator reaches any of the
85 positions("left", "right" or "center").
86
87 Default text parts of the actionslider widget that you can use for are:
88
89 - **indicator** - An indicator label of the actionslider
90 - **left** - A left label of the actionslider
91 - **right** - A right label of the actionslider
92 - **center** - A center label of the actionslider
93
94 .. note:: By default all positions are set as enabled.
95
96 """
97
21 def __init__(self, evasObject parent): 98 def __init__(self, evasObject parent):
22 self._set_obj(elm_actionslider_add(parent.obj)) 99 self._set_obj(elm_actionslider_add(parent.obj))
23 100
101 property selected_label:
102 """Selected label.
103
104 :type: string
105
106 """
107 def __get__(self):
108 return elm_actionslider_selected_label_get(self.obj)
109
24 def selected_label_get(self): 110 def selected_label_get(self):
25 return elm_actionslider_selected_label_get(self.obj) 111 return elm_actionslider_selected_label_get(self.obj)
26 112
27 property selected_label: 113 property indicator_pos:
114 """Indicator position.
115
116 :type: Elm_Actionslider_Pos
117
118 """
28 def __get__(self): 119 def __get__(self):
29 return elm_actionslider_selected_label_get(self.obj) 120 return elm_actionslider_indicator_pos_get(self.obj)
121 def __set__(self, pos):
122 elm_actionslider_indicator_pos_set(self.obj, pos)
30 123
31 def indicator_pos_set(self, pos): 124 def indicator_pos_set(self, pos):
32 elm_actionslider_indicator_pos_set(self.obj, pos) 125 elm_actionslider_indicator_pos_set(self.obj, pos)
33
34 def indicator_pos_get(self): 126 def indicator_pos_get(self):
35 return elm_actionslider_indicator_pos_get(self.obj) 127 return elm_actionslider_indicator_pos_get(self.obj)
36 128
37 property indicator_pos: 129 property magnet_pos:
130 """The actionslider magnet position. To make multiple positions
131 magnets ``or`` them together(e.g.: ``ELM_ACTIONSLIDER_LEFT |
132 ELM_ACTIONSLIDER_RIGHT``)
133
134 :type: Elm_Actionslider_Pos
135
136 """
38 def __get__(self): 137 def __get__(self):
39 return elm_actionslider_indicator_pos_get(self.obj) 138 return self.magnet_pos_get()
40 def __set__(self, pos): 139 def __set__(self, pos):
41 elm_actionslider_indicator_pos_set(self.obj, pos) 140 self.magnet_pos_set(pos)
42 141
43 def magnet_pos_set(self, pos): 142 def magnet_pos_set(self, pos):
44 elm_actionslider_magnet_pos_set(self.obj, pos) 143 elm_actionslider_magnet_pos_set(self.obj, pos)
45
46 def magnet_pos_get(self): 144 def magnet_pos_get(self):
47 return elm_actionslider_magnet_pos_get(self.obj) 145 return elm_actionslider_magnet_pos_get(self.obj)
48 146
49 property magnet_pos: 147 property enabled_pos:
50 def __get__(self): 148 """The actionslider enabled position. To set multiple positions as
51 return self.magnet_pos_get() 149 enabled ``or`` them together(e.g.: ``ELM_ACTIONSLIDER_LEFT |
52 def __set__(self, pos): 150 ELM_ACTIONSLIDER_RIGHT``).
53 self.magnet_pos_set(pos)
54 151
55 def enabled_pos_set(self, pos): 152 .. note:: All the positions are enabled by default.
56 elm_actionslider_enabled_pos_set(self.obj, pos)
57 153
58 def enabled_pos_get(self): 154 :type: Elm_Actionslider_Pos
59 return elm_actionslider_enabled_pos_get(self.obj)
60 155
61 property enabled_pos: 156 """
62 def __get__(self): 157 def __get__(self):
63 return elm_actionslider_enabled_pos_get(self.obj) 158 return elm_actionslider_enabled_pos_get(self.obj)
64 def __set__(self, pos): 159 def __set__(self, pos):
65 elm_actionslider_enabled_pos_set(self.obj, pos) 160 elm_actionslider_enabled_pos_set(self.obj, pos)
66 161
162 def enabled_pos_set(self, pos):
163 elm_actionslider_enabled_pos_set(self.obj, pos)
164 def enabled_pos_get(self):
165 return elm_actionslider_enabled_pos_get(self.obj)
166
67 def callback_selected_add(self, func, *args, **kwargs): 167 def callback_selected_add(self, func, *args, **kwargs):
168 """Called when user selects an enabled position. The label is passed
169 as event info."""
68 self._callback_add_full("selected", _cb_string_conv, func, *args, **kwargs) 170 self._callback_add_full("selected", _cb_string_conv, func, *args, **kwargs)
69 171
70 def callback_selected_del(self, func): 172 def callback_selected_del(self, func):
71 self._callback_del_full("selected", _cb_string_conv, func) 173 self._callback_del_full("selected", _cb_string_conv, func)
72 174
73 def callback_pos_changed_add(self, func, *args, **kwargs): 175 def callback_pos_changed_add(self, func, *args, **kwargs):
176 """Called when the indicator reaches any of the positions **left**,
177 **right** or **center**. The label is passed as event info."""
74 self._callback_add_full("pos_changed", _cb_string_conv, func, *args, **kwargs) 178 self._callback_add_full("pos_changed", _cb_string_conv, func, *args, **kwargs)
75 179
76 def callback_pos_changed_del(self, func): 180 def callback_pos_changed_del(self, func):
diff --git a/efl/elementary/background.pxd b/efl/elementary/background.pxd
new file mode 100644
index 0000000..cb88787
--- /dev/null
+++ b/efl/elementary/background.pxd
@@ -0,0 +1,13 @@
1from efl.evas cimport Eina_Bool, Evas_Object, Evas_Coord
2from enums cimport Elm_Bg_Option
3from libc.string cimport const_char
4
5cdef extern from "Elementary.h":
6 Evas_Object *elm_bg_add(Evas_Object *parent)
7 Eina_Bool elm_bg_file_set(Evas_Object *obj, const_char *file, const_char *group)
8 void elm_bg_file_get(Evas_Object *obj, const_char **file, const_char **group)
9 void elm_bg_option_set(Evas_Object *obj, Elm_Bg_Option option)
10 Elm_Bg_Option elm_bg_option_get(Evas_Object *obj)
11 void elm_bg_color_set(Evas_Object *obj, int r, int g, int b)
12 void elm_bg_color_get(Evas_Object *obj, int *r, int *g, int *b)
13 void elm_bg_load_size_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
diff --git a/efl/elementary/background.pyx b/efl/elementary/background.pyx
new file mode 100644
index 0000000..de0fbae
--- /dev/null
+++ b/efl/elementary/background.pyx
@@ -0,0 +1,206 @@
1# Copyright (C) 2007-2013 various contributors (see AUTHORS)
2#
3# This file is part of Python-EFL.
4#
5# Python-EFL is free software; you can redistribute it and/or
6# modify it under the terms of the GNU Lesser General Public
7# License as published by the Free Software Foundation; either
8# version 2.1 of the License, or (at your option) any later version.
9#
10# Python-EFL is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13# Lesser General Public License for more details.
14#
15# You should have received a copy of the GNU Lesser General Public License
16# along with this Python-EFL. If not, see <http://www.gnu.org/licenses/>.
17#
18
19"""
20
21.. rubric:: Background tiling modes
22
23.. data:: ELM_BG_OPTION_CENTER
24
25 Center
26
27.. data:: ELM_BG_OPTION_SCALE
28
29 Scale
30
31.. data:: ELM_BG_OPTION_STRETCH
32
33 Stretch
34
35.. data:: ELM_BG_OPTION_TILE
36
37 Tile
38
39"""
40
41include "widget_header.pxi"
42
43from layout_class cimport LayoutClass
44
45cimport enums
46
47ELM_BG_OPTION_CENTER = enums.ELM_BG_OPTION_CENTER
48ELM_BG_OPTION_SCALE = enums.ELM_BG_OPTION_SCALE
49ELM_BG_OPTION_STRETCH = enums.ELM_BG_OPTION_STRETCH
50ELM_BG_OPTION_TILE = enums.ELM_BG_OPTION_TILE
51ELM_BG_OPTION_LAST = enums.ELM_BG_OPTION_LAST
52
53cdef class Background(LayoutClass):
54
55 """
56
57 Background widget object
58
59 Used for setting a solid color, image or Edje group as a background to a
60 window or any container object.
61
62 The background widget is used for setting (solid) background decorations
63 to a window (unless it has transparency enabled) or to any container
64 object. It works just like an image, but has some properties useful to a
65 background, like setting it to tiled, centered, scaled or stretched.
66
67 Default content parts of the bg widget that you can use for are:
68
69 - **overlay** - overlay of the bg
70
71 """
72
73 def __init__(self, evasObject parent):
74 self._set_obj(elm_bg_add(parent.obj))
75
76 property file:
77 """The file (image or edje collection) giving life for the background.
78
79 This property contains the image file name (and edje group) used in
80 the background object. If the image comes from an Edje group, it
81 will be stretched to completely fill the background object. If it
82 comes from a traditional image file, it will by default be centered
83 in this widget's are (thus retaining its aspect), what could lead to
84 some parts being not visible. You may change the mode of exhibition
85 for a real image file with :py:attr:`option`.
86
87 .. note:: Once the image is set, a previously set one will be deleted,
88 even if **file** is *None*.
89
90 .. note:: This will only affect the contents of one of the background's
91 swallow spots, namely *"elm.swallow.background"*. If you want to
92 achieve the :py:class:`elementary.layout.Layout`'s file setting
93 behavior, you'll have to call that method on this object.
94
95 :type: string file, optional string group
96
97 """
98 def __get__(self):
99 cdef const_char *filename, *group
100 elm_bg_file_get(self.obj, &filename, &group)
101 if filename == NULL:
102 filename = ""
103 if group == NULL:
104 group = ""
105 return (_ctouni(filename), _ctouni(group))
106
107 def __set__(self, value):
108 if isinstance(value, tuple) or isinstance(value, list):
109 filename, group = value
110 else:
111 filename = value
112 group = ""
113 elm_bg_file_set(self.obj, _cfruni(filename), _cfruni(group))
114
115 def file_set(self, filename, group = ""):
116 return bool(elm_bg_file_set(self.obj, _cfruni(filename), _cfruni(group)))
117 def file_get(self):
118 cdef const_char *filename, *group
119 elm_bg_file_get(self.obj, &filename, &group)
120 if filename == NULL:
121 filename = ""
122 if group == NULL:
123 group = ""
124 return (_ctouni(filename), _ctouni(group))
125
126 property option:
127 """The mode of display for a given background widget's image.
128
129 This property reflects how the background widget will display its
130 image. This will only work if :py:attr:`file` was previously set with an
131 image file. The image can be displayed tiled, scaled, centered or
132 stretched.
133
134 :type: Elm_Bg_Option
135
136 """
137 def __get__(self):
138 return elm_bg_option_get(self.obj)
139
140 def __set__(self, value):
141 elm_bg_option_set(self.obj, value)
142
143 def option_set(self, option):
144 elm_bg_option_set(self.obj, option)
145 def option_get(self):
146 return elm_bg_option_get(self.obj)
147
148 property color:
149 """The color on a given background widget.
150
151 This property reflects the color used for the background rectangle,
152 in RGB format. Each color component's range is from 0 to 255.
153
154 .. note:: You probably only want to use this property if you haven't
155 previously set :py:attr:`file`, so that you just want a solid color
156 background.
157
158 :type: (int r, int g, int b)
159
160 """
161 def __get__(self):
162 cdef int r, g, b
163 elm_bg_color_get(self.obj, &r, &g, &b)
164 return (r, g, b)
165
166 def __set__(self, value):
167 cdef int r, g, b
168 r, g, b = value
169 elm_bg_color_set(self.obj, r, g, b)
170
171 def color_set(self, r, g, b):
172 elm_bg_color_set(self.obj, r, g, b)
173 def color_get(self):
174 cdef int r, g, b
175 elm_bg_color_get(self.obj, &r, &g, &b)
176 return (r, g, b)
177
178 property load_size:
179 """The size of the pixmap representation of the image set on a given
180 background widget.
181
182 This property sets a new size for pixmap representation of the
183 given bg image. It allows for the image to be loaded already in the
184 specified size, reducing the memory usage and load time (for
185 example, when loading a big image file with its load size set to a
186 smaller size)
187
188 .. note:: This is just a hint for the underlying system. The real size
189 of the pixmap may differ depending on the type of image being
190 loaded, being bigger than requested.
191
192 .. warning:: This function just makes sense if an image file was set
193 with :py:attr:`file`.
194
195 :type: (Evas_Coord w, Evas_Coord h)
196
197 """
198 def __set__(self, value):
199 cdef Evas_Coord w, h
200 w, h = value
201 elm_bg_load_size_set(self.obj, w, h)
202
203 def load_size_set(self, w, h):
204 elm_bg_load_size_set(self.obj, w, h)
205
206_object_mapping_register("elm_bg", Background)
diff --git a/efl/elementary/box.pxd b/efl/elementary/box.pxd
new file mode 100644
index 0000000..c6f668b
--- /dev/null
+++ b/efl/elementary/box.pxd
@@ -0,0 +1,43 @@
1from efl.evas cimport Eina_Bool, Eina_List, const_Eina_List, Evas_Object, Evas_Coord
2from enums cimport Elm_Box_CLayout
3
4cdef extern from "Ecore.h":
5 ctypedef void (*Ecore_Cb)(void *data)
6
7cdef extern from "Evas.h":
8 ctypedef void *Evas_Object_Box_Data
9 ctypedef void *Elm_Box_Transition
10 ctypedef void (*Evas_Object_Box_Layout)(Evas_Object *o, Evas_Object_Box_Data *priv, void *user_data)
11 void evas_object_box_layout_horizontal(Evas_Object *o, Evas_Object_Box_Data *priv, void *data)
12 void evas_object_box_layout_vertical(Evas_Object *o, Evas_Object_Box_Data *priv, void *data)
13 void evas_object_box_layout_homogeneous_vertical(Evas_Object *o, Evas_Object_Box_Data *priv, void *data)
14 void evas_object_box_layout_homogeneous_horizontal(Evas_Object *o, Evas_Object_Box_Data *priv, void *data)
15 void evas_object_box_layout_homogeneous_max_size_horizontal(Evas_Object *o, Evas_Object_Box_Data *priv, void *data)
16 void evas_object_box_layout_homogeneous_max_size_vertical(Evas_Object *o, Evas_Object_Box_Data *priv, void *data)
17 void evas_object_box_layout_flow_horizontal(Evas_Object *o, Evas_Object_Box_Data *priv, void *data)
18 void evas_object_box_layout_flow_vertical(Evas_Object *o, Evas_Object_Box_Data *priv, void *data)
19 void evas_object_box_layout_stack(Evas_Object *o, Evas_Object_Box_Data *priv, void *data)
20 void elm_box_layout_transition(Evas_Object *o, Evas_Object_Box_Data *priv, void *data)
21
22cdef extern from "Elementary.h":
23 Evas_Object *elm_box_add(Evas_Object *parent)
24 void elm_box_horizontal_set(Evas_Object *obj, Eina_Bool horizontal)
25 Eina_Bool elm_box_horizontal_get(Evas_Object *obj)
26 void elm_box_homogeneous_set(Evas_Object *obj, Eina_Bool homogeneous)
27 Eina_Bool elm_box_homogeneous_get(Evas_Object *obj)
28 void elm_box_pack_start(Evas_Object *obj, Evas_Object *subobj)
29 void elm_box_pack_end(Evas_Object *obj, Evas_Object *subobj)
30 void elm_box_pack_before(Evas_Object *obj, Evas_Object *subobj, Evas_Object *before)
31 void elm_box_pack_after(Evas_Object *obj, Evas_Object *subobj, Evas_Object *after)
32 void elm_box_clear(Evas_Object *obj)
33 void elm_box_unpack(Evas_Object *obj, Evas_Object *subobj)
34 void elm_box_unpack_all(Evas_Object *obj)
35 void elm_box_recalculate(Evas_Object *obj)
36 Eina_List *elm_box_children_get(Evas_Object *obj)
37 void elm_box_padding_set(Evas_Object *obj, Evas_Coord horizontal, Evas_Coord vertical)
38 void elm_box_padding_get(Evas_Object *obj, Evas_Coord *horizontal, Evas_Coord *vertical)
39 void elm_box_align_set(Evas_Object *obj, double horizontal, double vertical)
40 void elm_box_align_get(Evas_Object *obj, double *horizontal, double *vertical)
41 void elm_box_layout_set(Evas_Object *obj, Evas_Object_Box_Layout cb, void *data, Ecore_Cb free_data)
42 Elm_Box_Transition *elm_box_transition_new(double duration, Evas_Object_Box_Layout start_layout, void *start_layout_data, Ecore_Cb start_layout_free_data, Evas_Object_Box_Layout end_layout, void *end_layout_data, Ecore_Cb end_layout_free_data, Ecore_Cb transition_end_cb, void *transition_end_data)
43 void elm_box_transition_free(void *data)
diff --git a/efl/elementary/box.pyx b/efl/elementary/box.pyx
new file mode 100644
index 0000000..c71a935
--- /dev/null
+++ b/efl/elementary/box.pyx
@@ -0,0 +1,549 @@
1# Copyright (C) 2007-2013 various contributors (see AUTHORS)
2#
3# This file is part of Python-EFL.
4#
5# Python-EFL is free software; you can redistribute it and/or
6# modify it under the terms of the GNU Lesser General Public
7# License as published by the Free Software Foundation; either
8# version 2.1 of the License, or (at your option) any later version.
9#
10# Python-EFL is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13# Lesser General Public License for more details.
14#
15# You should have received a copy of the GNU Lesser General Public License
16# along with this Python-EFL. If not, see <http://www.gnu.org/licenses/>.
17#
18
19"""
20
21.. rubric:: Box layout modes
22
23.. data:: ELM_BOX_LAYOUT_HORIZONTAL
24
25 Horizontal layout
26
27.. data:: ELM_BOX_LAYOUT_VERTICAL
28
29 Vertical layout
30
31.. data:: ELM_BOX_LAYOUT_HOMOGENEOUS_VERTICAL
32
33 Homogeneous vertical layout
34
35.. data:: ELM_BOX_LAYOUT_HOMOGENEOUS_HORIZONTAL
36
37 Homogeneous horizontal layout
38
39.. data:: ELM_BOX_LAYOUT_HOMOGENEOUS_MAX_SIZE_HORIZONTAL
40
41 Homogeneous layout, maximum size on the horizontal axis
42
43.. data:: ELM_BOX_LAYOUT_HOMOGENEOUS_MAX_SIZE_VERTICAL
44
45 Homogeneous layout, maximum size on the horizontal axis
46
47.. data:: ELM_BOX_LAYOUT_FLOW_HORIZONTAL
48
49 Horizontally flowing layout
50
51.. data:: ELM_BOX_LAYOUT_FLOW_VERTICAL
52
53 Vertically flowing layout
54
55.. data:: ELM_BOX_LAYOUT_STACK
56
57 Stacking layout
58
59"""
60
61include "widget_header.pxi"
62
63from object cimport Object
64
65from efl.evas cimport evas_object_data_get
66
67#~ ctypedef enum Elm_Box_CLayout:
68#~ ELM_BOX_LAYOUT_HORIZONTAL
69#~ ELM_BOX_LAYOUT_VERTICAL
70#~ ELM_BOX_LAYOUT_HOMOGENEOUS_VERTICAL
71#~ ELM_BOX_LAYOUT_HOMOGENEOUS_HORIZONTAL
72#~ ELM_BOX_LAYOUT_HOMOGENEOUS_MAX_SIZE_HORIZONTAL
73#~ ELM_BOX_LAYOUT_HOMOGENEOUS_MAX_SIZE_VERTICAL
74#~ ELM_BOX_LAYOUT_FLOW_HORIZONTAL
75#~ ELM_BOX_LAYOUT_FLOW_VERTICAL
76#~ ELM_BOX_LAYOUT_STACK
77
78ELM_BOX_LAYOUT_HORIZONTAL = 0
79ELM_BOX_LAYOUT_VERTICAL = 1
80ELM_BOX_LAYOUT_HOMOGENEOUS_VERTICAL = 2
81ELM_BOX_LAYOUT_HOMOGENEOUS_HORIZONTAL = 3
82ELM_BOX_LAYOUT_HOMOGENEOUS_MAX_SIZE_HORIZONTAL = 4
83ELM_BOX_LAYOUT_HOMOGENEOUS_MAX_SIZE_VERTICAL = 5
84ELM_BOX_LAYOUT_FLOW_HORIZONTAL = 6
85ELM_BOX_LAYOUT_FLOW_VERTICAL = 7
86ELM_BOX_LAYOUT_STACK = 8
87
88cdef Evas_Object_Box_Layout _py_elm_box_layout_resolv(int layout) with gil:
89 if layout == ELM_BOX_LAYOUT_HORIZONTAL:
90 return evas_object_box_layout_horizontal
91 elif layout == ELM_BOX_LAYOUT_VERTICAL:
92 return evas_object_box_layout_vertical
93 elif layout == ELM_BOX_LAYOUT_HOMOGENEOUS_VERTICAL:
94 return evas_object_box_layout_homogeneous_vertical
95 elif layout == ELM_BOX_LAYOUT_HOMOGENEOUS_HORIZONTAL:
96 return evas_object_box_layout_homogeneous_horizontal
97 elif layout == ELM_BOX_LAYOUT_HOMOGENEOUS_MAX_SIZE_HORIZONTAL:
98 return evas_object_box_layout_homogeneous_max_size_horizontal
99 elif layout == ELM_BOX_LAYOUT_HOMOGENEOUS_MAX_SIZE_VERTICAL:
100 return evas_object_box_layout_homogeneous_max_size_vertical
101 elif layout == ELM_BOX_LAYOUT_FLOW_HORIZONTAL:
102 return evas_object_box_layout_flow_horizontal
103 elif layout == ELM_BOX_LAYOUT_FLOW_VERTICAL:
104 return evas_object_box_layout_flow_vertical
105 elif layout == ELM_BOX_LAYOUT_STACK:
106 return evas_object_box_layout_stack
107 return evas_object_box_layout_vertical
108
109cdef class Box(Object):
110
111 """
112
113 A box arranges objects in a linear fashion, governed by a layout function
114 that defines the details of this arrangement.
115
116 By default, the box will use an internal function to set the layout to
117 a single row, either vertical or horizontal. This layout is affected
118 by a number of parameters, such as the homogeneous flag set by
119 :py:attr:`homogeneous`, the values given by :py:attr:`padding` and
120 :py:attr:`align` and the hints set to each object in the box.
121
122 For this default layout, it's possible to change the orientation with
123 :py:attr:`horizontal`. The box will start in the vertical orientation,
124 placing its elements ordered from top to bottom. When horizontal is set,
125 the order will go from left to right. If the box is set to be
126 homogeneous, every object in it will be assigned the same space, that
127 of the largest object. Padding can be used to set some spacing between
128 the cell given to each object. The alignment of the box, set with
129 :py:attr:`align`, determines how the bounding box of all the elements
130 will be placed within the space given to the box widget itself.
131
132 The size hints of each object also affect how they are placed and sized
133 within the box. :py:attr:`size_hint_min` will give the minimum
134 size the object can have, and the box will use it as the basis for all
135 latter calculations. Elementary widgets set their own minimum size as
136 needed, so there's rarely any need to use it manually.
137
138 :py:attr:`size_hint_weight`, when not in homogeneous mode, is
139 used to tell whether the object will be allocated the minimum size it
140 needs or if the space given to it should be expanded. It's important
141 to realize that expanding the size given to the object is not the same
142 thing as resizing the object. It could very well end being a small
143 widget floating in a much larger empty space. If not set, the weight
144 for objects will normally be 0.0 for both axis, meaning the widget will
145 not be expanded. To take as much space possible, set the weight to
146 ``EVAS_HINT_EXPAND`` (defined to 1.0) for the desired axis to expand.
147
148 Besides how much space each object is allocated, it's possible to control
149 how the widget will be placed within that space using
150 :py:attr:`size_hint_align`. By default, this value will be 0.5
151 for both axis, meaning the object will be centered, but any value from
152 0.0 (left or top, for the ``x`` and ``y`` axis, respectively) to 1.0
153 (right or bottom) can be used. The special value *EVAS_HINT_FILL*, which
154 is -1.0, means the object will be resized to fill the entire space it
155 was allocated.
156
157 In addition, customized functions to define the layout can be set, which
158 allow the application developer to organize the objects within the box
159 in any number of ways.
160
161 The special :py:func:`layout_transition()` function can be used
162 to switch from one layout to another, animating the motion of the
163 children of the box.
164
165 .. note:: Objects should not be added to box objects using _add() calls.
166
167 """
168
169 def __init__(self, evasObject parent):
170 """Add a new box to the parent
171
172 By default, the box will be in vertical mode and non-homogeneous.
173
174 :param parent: The parent object
175 :type parent: :py:class:`elementary.object.Object`
176 :return: The new object or None if it cannot be created
177 :rtype: :py:class:`elementary.object.Object`
178
179 """
180 self._set_obj(elm_box_add(parent.obj))
181
182 property horizontal:
183 """The horizontal orientation.
184
185 By default, box object arranges their contents vertically from top to
186 bottom. By setting this property as *True*, the box will become
187 horizontal, arranging contents from left to right.
188
189 .. note:: This flag is ignored if a custom layout function is set.
190
191 :type: bool
192
193 """
194 def __get__(self):
195 return elm_box_horizontal_get(self.obj)
196 def __set__(self, value):
197 elm_box_horizontal_set(self.obj, value)
198
199 def horizontal_set(self, horizontal):
200 elm_box_horizontal_set(self.obj, horizontal)
201 def horizontal_get(self):
202 return elm_box_horizontal_get(self.obj)
203
204 property homogeneous:
205 """Whether the box is using homogeneous mode or not
206
207 If enabled, homogeneous layout makes all items the same size, according
208 to the size of the largest of its children.
209
210 .. note:: This flag is ignored if a custom layout function is set.
211
212 :type: bool
213
214 """
215 def __get__(self):
216 return bool(elm_box_homogeneous_get(self.obj))
217
218 def __set__(self, value):
219 elm_box_homogeneous_set(self.obj, value)
220
221 def homogeneous_set(self, homogeneous):
222 elm_box_homogeneous_set(self.obj, homogeneous)
223 def homogeneous_get(self):
224 return bool(elm_box_homogeneous_get(self.obj))
225
226 def pack_start(self, evasObject obj):
227 """pack_start(evas.Object obj)
228
229 Add an object to the beginning of the pack list.
230
231 Pack ``subobj`` into the box, placing it first in the list of
232 children objects. The actual position the object will get on screen
233 depends on the layout used. If no custom layout is set, it will be at
234 the top or left, depending if the box is vertical or horizontal,
235 respectively.
236
237 :param subobj: The object to add to the box
238 :type subobj: :py:class:`evas.object.Object`
239
240 .. seealso::
241 :py:func:`pack_end()`
242 :py:func:`pack_before()`
243 :py:func:`pack_after()`
244 :py:func:`unpack()`
245 :py:func:`unpack_all()`
246 :py:func:`clear()`
247
248 """
249 elm_box_pack_start(self.obj, obj.obj)
250
251 def pack_end(self, evasObject obj):
252 """pack_end(evas.Object obj)
253
254 Add an object at the end of the pack list.
255
256 Pack ``subobj`` into the box, placing it last in the list of
257 children objects. The actual position the object will get on screen
258 depends on the layout used. If no custom layout is set, it will be at
259 the bottom or right, depending if the box is vertical or horizontal,
260 respectively.
261
262 :param subobj: The object to add to the box
263 :type subobj: :py:class:`evas.object.Object`
264
265 .. seealso::
266 :py:func:`pack_start()`
267 :py:func:`pack_before()`
268 :py:func:`pack_after()`
269 :py:func:`unpack()`
270 :py:func:`unpack_all()`
271 :py:func:`clear()`
272
273 """
274 elm_box_pack_end(self.obj, obj.obj)
275
276 def pack_before(self, evasObject obj, evasObject before):
277 """pack_before(evas.Object obj, evas.Object before)
278
279 Adds an object to the box before the indicated object.
280
281 This will add the ``subobj`` to the box indicated before the object
282 indicated with ``before``. If ``before`` is not already in the box, results
283 are undefined. Before means either to the left of the indicated object or
284 above it depending on orientation.
285
286 :param subobj: The object to add to the box
287 :type subobj: :py:class:`evas.object.Object`
288 :param before: The object before which to add it
289 :type before: :py:class:`evas.object.Object`
290
291 .. seealso::
292 :py:func:`pack_start()`
293 :py:func:`pack_end()`
294 :py:func:`pack_after()`
295 :py:func:`unpack()`
296 :py:func:`unpack_all()`
297 :py:func:`clear()`
298
299 """
300 elm_box_pack_before(self.obj, obj.obj, before.obj)
301
302 def pack_after(self, evasObject obj, evasObject after):
303 """pack_after(evas.Object obj, evas.Object)
304
305 Adds an object to the box after the indicated object.
306
307 This will add the ``subobj`` to the box indicated after the object
308 indicated with *after*. If ``after`` is not already in the box, results
309 are undefined. After means either to the right of the indicated object or
310 below it depending on orientation.
311
312 :param subobj: The object to add to the box
313 :type subobj: :py:class:`evas.object.Object`
314 :param after: The object after which to add it
315 :type after: :py:class:`evas.object.Object`
316
317 .. seealso::
318 :py:func:`pack_start()`
319 :py:func:`pack_end()`
320 :py:func:`pack_before()`
321 :py:func:`unpack()`
322 :py:func:`unpack_all()`
323 :py:func:`clear()`
324
325 """
326 elm_box_pack_after(self.obj, obj.obj, after.obj)
327
328 def clear(self):
329 """clear()
330
331 Clear the box of all children
332
333 Remove all the elements contained by the box, deleting the respective
334 objects.
335
336 .. seealso:: :py:func:`unpack()`, :py:func:`unpack_all()`
337
338 """
339 elm_box_clear(self.obj)
340
341 def unpack(self, evasObject obj):
342 """unpack(evas.Object obj)
343
344 Unpack a box item.
345
346 Remove the object given by ``subobj`` from the box without
347 deleting it.
348
349 :param subobj: The object to unpack
350 :type subobj: :py:class:`evas.object.Object`
351
352 .. seealso:: :py:func:`unpack_all()`, :py:func:`clear()`
353
354 """
355 elm_box_unpack(self.obj, obj.obj)
356
357 def unpack_all(self):
358 """unpack_all()
359
360 Remove all items from the box, without deleting them.
361
362 Clear the box from all children, but don't delete the respective objects.
363 If no other references of the box children exist, the objects will never
364 be deleted, and thus the application will leak the memory. Make sure
365 when using this function that you hold a reference to all the objects
366 in the box.
367
368 .. seealso:: :py:func:`clear()`, :py:func:`unpack()`
369
370 """
371 elm_box_unpack_all(self.obj)
372
373 property children:
374 """Retrieve a list of the objects packed into the box
375
376 Returns a ``tuple`` with the child :py:class:`evas.object.Object`.
377 The order of the list corresponds to the packing order the box uses.
378
379 :type: tuple of :py:class:`evas.object.Object`
380
381 """
382 def __get__(self):
383 cdef Evas_Object *o
384 cdef Object obj
385 cdef const_Eina_List *lst
386
387 ret = []
388 lst = elm_box_children_get(self.obj)
389 while lst:
390 o = <Evas_Object *> lst.data
391 obj = <Object>evas_object_data_get(o, "python-evas")
392 ret.append(obj)
393 lst = lst.next
394 return ret
395
396 #def __set__(self, value):
397 #TODO: unpack_all() and then get the objects from value and pack_end() them.
398
399 def __del__(self):
400 elm_box_clear(self.obj)
401
402 def children_get(self):
403 cdef Evas_Object *o
404 cdef Object obj
405 cdef const_Eina_List *lst
406
407 ret = []
408 lst = elm_box_children_get(self.obj)
409 while lst:
410 o = <Evas_Object *> lst.data
411 obj = <Object>evas_object_data_get(o, "python-evas")
412 ret.append(obj)
413 lst = lst.next
414 return ret
415
416 property padding:
417 """The space (padding) between the box's elements.
418
419 Extra space in pixels that will be added between a box child and its
420 neighbors after its containing cell has been calculated. This padding
421 is set for all elements in the box, besides any possible padding that
422 individual elements may have through their size hints.
423
424 :type: tuple of Evas_Coords (int)
425
426 """
427 def __get__(self):
428 cdef int horizontal, vertical
429 elm_box_padding_get(self.obj, &horizontal, &vertical)
430 return (horizontal, vertical)
431
432 def __set__(self, value):
433 cdef int horizontal, vertical
434 horizontal, vertical = value
435 elm_box_padding_set(self.obj, horizontal, vertical)
436
437 def padding_set(self, horizontal, vertical):
438 elm_box_padding_set(self.obj, horizontal, vertical)
439 def padding_get(self):
440 cdef int horizontal, vertical
441 elm_box_padding_get(self.obj, &horizontal, &vertical)
442 return (horizontal, vertical)
443
444 property align:
445 """Set the alignment of the whole bounding box of contents.
446
447 Sets how the bounding box containing all the elements of the box, after
448 their sizes and position has been calculated, will be aligned within
449 the space given for the whole box widget.
450
451 :rtype: tuple of floats
452
453 """
454 def __get__(self):
455 cdef double horizontal, vertical
456 elm_box_align_get(self.obj, &horizontal, &vertical)
457 return (horizontal, vertical)
458
459 def __set__(self, value):
460 cdef double horizontal, vertical
461 horizontal, vertical = value
462 elm_box_align_set(self.obj, horizontal, vertical)
463
464 def align_set(self, horizontal, vertical):
465 elm_box_align_set(self.obj, horizontal, vertical)
466 def align_get(self):
467 cdef double horizontal, vertical
468 elm_box_align_get(self.obj, &horizontal, &vertical)
469 return (horizontal, vertical)
470
471 def recalculate(self):
472 """recalculate()
473
474 Force the box to recalculate its children packing.
475
476 If any children was added or removed, box will not calculate the
477 values immediately rather leaving it to the next main loop
478 iteration. While this is great as it would save lots of
479 recalculation, whenever you need to get the position of a just
480 added item you must force recalculate before doing so.
481
482 """
483 elm_box_recalculate(self.obj)
484
485 property layout:
486 """Set the layout function for the box.
487
488 A box layout function affects how a box object displays child
489 elements within its area. The list of pre-defined box layouts
490 available in Evas is:
491
492 - elementary.ELM_BOX_LAYOUT_HORIZONTAL
493 - elementary.ELM_BOX_LAYOUT_VERTICAL
494 - elementary.ELM_BOX_LAYOUT_HOMOGENEOUS_VERTICAL
495 - elementary.ELM_BOX_LAYOUT_HOMOGENEOUS_HORIZONTAL
496 - elementary.ELM_BOX_LAYOUT_HOMOGENEOUS_MAX_SIZE_HORIZONTAL
497 - elementary.ELM_BOX_LAYOUT_HOMOGENEOUS_MAX_SIZE_VERTICAL
498 - elementary.ELM_BOX_LAYOUT_FLOW_HORIZONTAL
499 - elementary.ELM_BOX_LAYOUT_FLOW_VERTICAL
500 - elementary.ELM_BOX_LAYOUT_STACK
501
502 Note that you cannot set a custom layout function.
503
504 :type: Evas_Object_Box_Layout
505
506 """
507 def __set__(self, layout):
508 cdef Evas_Object_Box_Layout ly
509 ly = _py_elm_box_layout_resolv(layout)
510 elm_box_layout_set(self.obj, ly, NULL, NULL)
511
512 def layout_set(self, layout):
513 cdef Evas_Object_Box_Layout ly
514 ly = _py_elm_box_layout_resolv(layout)
515 elm_box_layout_set(self.obj, ly, NULL, NULL)
516
517 def layout_transition(self, duration, from_layout, to_layout):
518 """layout_transition(float duration, from_layout, to_layout)
519
520 Perform an animation between two given different layout.
521
522 If you want to animate the change from one layout to another, you
523 just need to call this function with the starting layout and
524 the final one.
525
526 .. seealso:: :py:attr:`layout` for the list of available layouts.
527
528 :param duration: the animation duration in seconds
529 :type duration: float
530 :param from_layout: one of elementary.ELM_BOX_LAYOUT
531 :type from_layout: Evas_Object_Box_Layout
532 :param to_layout: one of elementary.ELM_BOX_LAYOUT
533 :type to_layout: Evas_Object_Box_Layout
534
535 """
536 cdef Elm_Box_Transition *t
537 cdef Evas_Object_Box_Layout ly_from, ly_to
538
539 ly_from = _py_elm_box_layout_resolv(from_layout)
540 ly_to = _py_elm_box_layout_resolv(to_layout)
541 t = elm_box_transition_new(duration,
542 ly_from, NULL, NULL,
543 ly_to, NULL, NULL,
544 NULL, NULL)
545 elm_box_layout_set(self.obj, elm_box_layout_transition, t,
546 elm_box_transition_free)
547
548
549_object_mapping_register("elm_box", Box)
diff --git a/efl/elementary/bubble.pxd b/efl/elementary/bubble.pxd
new file mode 100644
index 0000000..b32e9cb
--- /dev/null
+++ b/efl/elementary/bubble.pxd
@@ -0,0 +1,7 @@
1from efl.evas cimport Evas_Object
2from enums cimport Elm_Bubble_Pos
3
4cdef extern from "Elementary.h":
5 Evas_Object *elm_bubble_add(Evas_Object *parent)
6 void elm_bubble_pos_set(Evas_Object *obj, Elm_Bubble_Pos pos)
7 Elm_Bubble_Pos elm_bubble_pos_get(Evas_Object *obj)
diff --git a/efl/elementary/bubble.pyx b/efl/elementary/bubble.pyx
new file mode 100644
index 0000000..fe4c771
--- /dev/null
+++ b/efl/elementary/bubble.pyx
@@ -0,0 +1,127 @@
1# Copyright (C) 2007-2013 various contributors (see AUTHORS)
2#
3# This file is part of Python-EFL.
4#
5# Python-EFL is free software; you can redistribute it and/or
6# modify it under the terms of the GNU Lesser General Public
7# License as published by the Free Software Foundation; either
8# version 2.1 of the License, or (at your option) any later version.
9#
10# Python-EFL is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13# Lesser General Public License for more details.
14#
15# You should have received a copy of the GNU Lesser General Public License
16# along with this Python-EFL. If not, see <http://www.gnu.org/licenses/>.
17#
18
19"""
20
21.. rubric:: Bubble arrow positions
22
23.. data:: ELM_BUBBLE_POS_TOP_LEFT
24
25 Top left position
26
27.. data:: ELM_BUBBLE_POS_TOP_RIGHT
28
29 Top right position
30
31.. data:: ELM_BUBBLE_POS_BOTTOM_LEFT
32
33 Bottom left position
34
35.. data:: ELM_BUBBLE_POS_BOTTOM_RIGHT
36
37 Bottom right position
38
39"""
40
41include "widget_header.pxi"
42
43from layout_class cimport LayoutClass
44
45cimport enums
46
47ELM_BUBBLE_POS_TOP_LEFT = enums.ELM_BUBBLE_POS_TOP_LEFT
48ELM_BUBBLE_POS_TOP_RIGHT = enums.ELM_BUBBLE_POS_TOP_RIGHT
49ELM_BUBBLE_POS_BOTTOM_LEFT = enums.ELM_BUBBLE_POS_BOTTOM_LEFT
50ELM_BUBBLE_POS_BOTTOM_RIGHT = enums.ELM_BUBBLE_POS_BOTTOM_RIGHT
51
52cdef class Bubble(LayoutClass):
53
54 """
55
56 The Bubble is a widget to show text similar to how speech is
57 represented in comics.
58
59 The bubble widget contains 5 important visual elements:
60
61 - The frame is a rectangle with rounded edjes and an "arrow".
62 - The ``icon`` is an image to which the frame's arrow points to.
63 - The ``label`` is a text which appears to the right of the icon if the
64 corner is **top_left** or **bottom_left** and is right aligned to
65 the frame otherwise.
66 - The ``info`` is a text which appears to the right of the label. Info's
67 font is of a lighter color than label.
68 - The ``content`` is an evas object that is shown inside the frame.
69
70 The position of the arrow, icon, label and info depends on which corner is
71 selected. The four available corners are:
72
73 - **top_left** - Default
74 - **top_right**
75 - **bottom_left**
76 - **bottom_right**
77
78 This widget emits the following signals, besides the ones sent from
79 :py:class:`elementary.layout.Layout`:
80
81 - ``clicked`` - This is called when a user has clicked the bubble.
82
83 Default content parts of the bubble that you can use for are:
84
85 - **default** - A content of the bubble
86 - **icon** - An icon of the bubble
87
88 Default text parts of the button widget that you can use for are:
89
90 - **default** - Label of the bubble
91 - **info** - info of the bubble
92
93 """
94
95 def __init__(self, evasObject parent):
96 self._set_obj(elm_bubble_add(parent.obj))
97
98 property pos:
99 """The corner of the bubble
100
101 This property reflects the corner of the bubble. The corner will be
102 used to determine where the arrow in the frame points to and where
103 label, icon and info are shown.
104
105 :type: Elm_Bubble_Pos
106
107 """
108 def __get__(self):
109 return elm_bubble_pos_get(self.obj)
110
111 def __set__(self, value):
112 elm_bubble_pos_set(self.obj, value)
113
114 def pos_set(self, pos):
115 elm_bubble_pos_set(self.obj, pos)
116 def pos_get(self):
117 return elm_bubble_pos_get(self.obj)
118
119 def callback_clicked_add(self, func, *args, **kwargs):
120 """This is called when a user has clicked the bubble."""
121 self._callback_add("clicked", func, *args, **kwargs)
122
123 def callback_clicked_del(self, func):
124 self._callback_del("clicked", func)
125
126
127_object_mapping_register("elm_bubble", Bubble)
diff --git a/efl/elementary/button.pxd b/efl/elementary/button.pxd
new file mode 100644
index 0000000..a2719f6
--- /dev/null
+++ b/efl/elementary/button.pxd
@@ -0,0 +1,16 @@
1from efl.evas cimport Eina_Bool, Evas_Object
2from layout_class cimport LayoutClass
3
4cdef extern from "Elementary.h":
5
6 # Button (api:DONE cb:DONE test:DONE doc:DONE)
7 Evas_Object *elm_button_add(Evas_Object *parent)
8 void elm_button_autorepeat_set(Evas_Object *obj, Eina_Bool on)
9 Eina_Bool elm_button_autorepeat_get(Evas_Object *obj)
10 void elm_button_autorepeat_initial_timeout_set(Evas_Object *obj, double t)
11 double elm_button_autorepeat_initial_timeout_get(Evas_Object *obj)
12 void elm_button_autorepeat_gap_timeout_set(Evas_Object *obj, double t)
13 double elm_button_autorepeat_gap_timeout_get(Evas_Object *obj)
14
15cdef class Button(LayoutClass):
16 pass
diff --git a/efl/elementary/button.pyx b/efl/elementary/button.pyx
new file mode 100644
index 0000000..fea42f7
--- /dev/null
+++ b/efl/elementary/button.pyx
@@ -0,0 +1,166 @@
1# Copyright (C) 2007-2013 various contributors (see AUTHORS)
2#
3# This file is part of Python-EFL.
4#
5# Python-EFL is free software; you can redistribute it and/or
6# modify it under the terms of the GNU Lesser General Public
7# License as published by the Free Software Foundation; either
8# version 2.1 of the License, or (at your option) any later version.
9#
10# Python-EFL is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13# Lesser General Public License for more details.
14#
15# You should have received a copy of the GNU Lesser General Public License
16# along with this Python-EFL. If not, see <http://www.gnu.org/licenses/>.
17
18include "widget_header.pxi"
19
20from layout_class cimport LayoutClass
21
22cdef class Button(LayoutClass):
23
24 """
25
26 This is a push-button. Press it and run some function. It can contain
27 a simple label and icon object and it also has an autorepeat feature.
28
29 This widget emits the following signals, besides the ones sent from
30 :py:class:`elementary.layout.Layout`:
31
32 - "clicked": the user clicked the button (press/release).
33 - "repeated": the user pressed the button without releasing it.
34 - "pressed": button was pressed.
35 - "unpressed": button was released after being pressed.
36
37 Also, defined in the default theme, the button has the following styles
38 available:
39
40 - default: a normal button.
41 - anchor: Like default, but the button fades away when the mouse is not
42 over it, leaving only the text or icon.
43 - hoversel_vertical: Internally used by
44 :py:class:`elementary.hoversel.Hoversel` to give a continuous look
45 across its options.
46 - hoversel_vertical_entry: Another internal for
47 :py:class:`elementary.hoversel.Hoversel`.
48 - naviframe: Internally used by
49 :py:class:`elementary.naviframe.Naviframe` for its back button.
50 - colorselector: Internally used by
51 :py:class:`elementary.colorselector.Colorselector` for its left and
52 right buttons.
53
54 Default content parts of the button widget that you can use for are:
55
56 - "icon" - An icon of the button
57
58 Default text parts of the button widget that you can use for are:
59
60 - "default" - Label of the button
61
62 """
63
64 def __init__(self, evasObject parent):
65 self._set_obj(elm_button_add(parent.obj))
66
67 property autorepeat:
68 """Turn on/off the autorepeat event generated when the button is
69 kept pressed
70
71 When off, no autorepeat is performed and buttons emit a normal
72 ``clicked`` signal when they are clicked.
73
74 When on, keeping a button pressed will continuously emit a
75 ``repeated`` signal until the button is released. The time it takes
76 until it starts emitting the signal is given by
77 :py:attr:`autorepeat_initial_timeout`, and the time between each new
78 emission by :py:attr:`autorepeat_gap_timeout`.
79
80 :type: bool
81
82 """
83 def __get__(self):
84 return bool(elm_button_autorepeat_get(self.obj))
85 def __set__(self, on):
86 elm_button_autorepeat_set(self.obj, on)
87
88 def autorepeat_set(self, on):
89 elm_button_autorepeat_set(self.obj, on)
90 def autorepeat_get(self):
91 return bool(elm_button_autorepeat_get(self.obj))
92
93 property autorepeat_initial_timeout:
94 """The initial timeout before the autorepeat event is generated
95
96 Reflects the timeout, in seconds, since the button is pressed until
97 the first ``repeated`` signal is emitted. If ``t`` is 0.0 or less,
98 there won't be any delay and the event will be fired the moment the
99 button is pressed.
100
101 .. seealso:: :py:attr:`autorepeat`, :py:attr:`autorepeat_gap_timeout`
102
103 :type: float
104
105 """
106 def __get__(self):
107 return elm_button_autorepeat_initial_timeout_get(self.obj)
108 def __set__(self, t):
109 elm_button_autorepeat_initial_timeout_set(self.obj, t)
110
111 def autorepeat_initial_timeout_set(self, t):
112 elm_button_autorepeat_initial_timeout_set(self.obj, t)
113 def autorepeat_initial_timeout_get(self):
114 return elm_button_autorepeat_initial_timeout_get(self.obj)
115
116 property autorepeat_gap_timeout:
117 """The interval between each generated autorepeat event
118
119 After the first ``repeated`` event is fired, all subsequent ones will
120 follow after a delay of ``t`` seconds for each.
121
122 .. seealso:: :py:attr:`autorepeat_initial_timeout`
123
124 :type: float
125
126 """
127 def __get__(self):
128 return elm_button_autorepeat_gap_timeout_get(self.obj)
129 def __set__(self, t):
130 elm_button_autorepeat_gap_timeout_set(self.obj, t)
131
132 def autorepeat_gap_timeout_set(self, t):
133 elm_button_autorepeat_gap_timeout_set(self.obj, t)
134 def autorepeat_gap_timeout_get(self):
135 return elm_button_autorepeat_gap_timeout_get(self.obj)
136
137 def callback_clicked_add(self, func, *args, **kwargs):
138 """The user clicked the button (press/release)."""
139 self._callback_add("clicked", func, *args, **kwargs)
140
141 def callback_clicked_del(self, func):
142 self._callback_del("clicked", func)
143
144 def callback_repeated_add(self, func, *args, **kwargs):
145 """The user pressed the button without releasing it."""
146 self._callback_add("repeated", func, *args, **kwargs)
147
148 def callback_repeated_del(self, func):
149 self._callback_del("repeated", func)
150
151 def callback_pressed_add(self, func, *args, **kwargs):
152 """The button was pressed."""
153 self._callback_add("pressed", func, *args, **kwargs)
154
155 def callback_pressed_del(self, func):
156 self._callback_del("pressed", func)
157
158 def callback_unpressed_add(self, func, *args, **kwargs):
159 """The button was released after being pressed."""
160 self._callback_add("unpressed", func, *args, **kwargs)
161
162 def callback_unpressed_del(self, func):
163 self._callback_del("unpressed", func)
164
165
166_object_mapping_register("elm_button", Button)
diff --git a/efl/elementary/calendar_elm.pxd b/efl/elementary/calendar_elm.pxd
new file mode 100644
index 0000000..10e7485
--- /dev/null
+++ b/efl/elementary/calendar_elm.pxd
@@ -0,0 +1,56 @@
1from efl.evas cimport Eina_Bool, Eina_List, const_Eina_List, Evas_Object
2from enums cimport Elm_Calendar_Mark_Repeat_Type, Elm_Calendar_Select_Mode, \
3 Elm_Calendar_Weekday
4from libc.string cimport const_char
5
6cdef extern from "string.h":
7 void *memcpy(void *dst, void *src, int n)
8 char *strdup(char *str)
9
10cdef extern from "time.h":
11 struct tm:
12 int tm_sec
13 int tm_min
14 int tm_hour
15 int tm_mday
16 int tm_mon
17 int tm_year
18 int tm_wday
19 int tm_yday
20 int tm_isdst
21
22 long int tm_gmtoff
23 const_char *tm_zone
24
25cdef extern from "Elementary.h":
26
27 ctypedef char *(*Elm_Calendar_Format_Cb) (tm *stime)
28
29 ctypedef struct Elm_Calendar_Mark:
30 Evas_Object *obj
31 Eina_List *node
32 tm *mark_time
33 const_char *mark_type
34 Elm_Calendar_Mark_Repeat_Type repeat
35
36 # Calendar (api:TODO cb:DONE test:TODO doc:DONE py3:DONE)
37 Evas_Object * elm_calendar_add(Evas_Object *parent)
38 const_char ** elm_calendar_weekdays_names_get(Evas_Object *obj)
39 void elm_calendar_weekdays_names_set(Evas_Object *obj, const_char *weekdays[])
40 void elm_calendar_min_max_year_set(Evas_Object *obj, int min, int max)
41 void elm_calendar_min_max_year_get(Evas_Object *obj, int *min, int *max)
42 void elm_calendar_select_mode_set(Evas_Object *obj, Elm_Calendar_Select_Mode mode)
43 Elm_Calendar_Select_Mode elm_calendar_select_mode_get(Evas_Object *obj)
44 void elm_calendar_selected_time_set(Evas_Object *obj, tm *selected_time)
45 Eina_Bool elm_calendar_selected_time_get(Evas_Object *obj, tm *selected_time)
46 void elm_calendar_format_function_set(Evas_Object *obj, Elm_Calendar_Format_Cb format_func)
47 Elm_Calendar_Mark * elm_calendar_mark_add(Evas_Object *obj, const_char *mark_type, tm *mark_time, Elm_Calendar_Mark_Repeat_Type repeat)
48 void elm_calendar_mark_del(Elm_Calendar_Mark *mark)
49 void elm_calendar_marks_clear(Evas_Object *obj)
50 const_Eina_List * elm_calendar_marks_get(Evas_Object *obj)
51 void elm_calendar_marks_draw(Evas_Object *obj)
52 void elm_calendar_interval_set(Evas_Object *obj, double interval)
53 double elm_calendar_interval_get(Evas_Object *obj)
54 void elm_calendar_first_day_of_week_set(Evas_Object *obj, Elm_Calendar_Weekday day)
55 Elm_Calendar_Weekday elm_calendar_first_day_of_week_get(Evas_Object *obj)
56
diff --git a/efl/elementary/calendar_elm.pyx b/efl/elementary/calendar_elm.pyx
new file mode 100644
index 0000000..e19c745
--- /dev/null
+++ b/efl/elementary/calendar_elm.pyx
@@ -0,0 +1,468 @@
1# Copyright (C) 2007-2013 various contributors (see AUTHORS)
2#
3# This file is part of Python-EFL.
4#
5# Python-EFL is free software; you can redistribute it and/or
6# modify it under the terms of the GNU Lesser General Public
7# License as published by the Free Software Foundation; either
8# version 2.1 of the License, or (at your option) any later version.
9#
10# Python-EFL is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13# Lesser General Public License for more details.
14#
15# You should have received a copy of the GNU Lesser General Public License
16# along with this Python-EFL. If not, see <http://www.gnu.org/licenses/>.
17#
18
19"""
20
21.. rubric:: Calendar mark types
22
23.. data:: ELM_CALENDAR_UNIQUE
24
25 Default value.
26
27 Marks will be displayed only on event day.
28
29.. data:: ELM_CALENDAR_DAILY
30
31 Marks will be displayed every day after event day (inclusive).
32
33.. data:: ELM_CALENDAR_WEEKLY
34
35 Marks will be displayed every week after event day (inclusive) - i.e.
36 each seven days.
37
38.. data:: ELM_CALENDAR_MONTHLY
39
40 Marks will be displayed every month day that coincides to event day.
41
42 E.g.: if an event is set to 30th Jan, no marks will be displayed on Feb,
43 but will be displayed on 30th Mar
44
45.. data:: ELM_CALENDAR_ANNUALLY
46
47 Marks will be displayed every year that coincides to event day (and month).
48
49 E.g. an event added to 30th Jan 2012 will be repeated on 30th Jan 2013.
50
51.. data:: ELM_CALENDAR_LAST_DAY_OF_MONTH
52
53 Marks will be displayed every last day of month after event day
54 (inclusive).
55
56
57.. rubric:: Calendar selection modes
58
59.. data:: ELM_CALENDAR_SELECT_MODE_DEFAULT
60
61 Default mode
62
63.. data:: ELM_CALENDAR_SELECT_MODE_ALWAYS
64
65 Select always
66
67.. data:: ELM_CALENDAR_SELECT_MODE_NONE
68
69 Don't select
70
71.. data:: ELM_CALENDAR_SELECT_MODE_ONDEMAND
72
73 Select on demand
74
75
76.. rubric:: Days
77
78.. data:: ELM_DAY_SUNDAY
79
80 Sunday
81
82.. data:: ELM_DAY_MONDAY
83
84 Monday
85
86.. data:: ELM_DAY_TUESDAY
87
88 Tuesday
89
90.. data:: ELM_DAY_WEDNESDAY
91
92 Wednesday
93
94.. data:: ELM_DAY_THURSDAY
95
96 Thursday
97
98.. data:: ELM_DAY_FRIDAY
99
100 Friday
101
102.. data:: ELM_DAY_SATURDAY
103
104 Saturday
105
106"""
107
108include "widget_header.pxi"
109from cpython cimport PyMem_Malloc, PyMem_Free
110
111from layout_class cimport LayoutClass
112
113from datetime import date
114
115cimport enums
116
117ELM_CALENDAR_UNIQUE = enums.ELM_CALENDAR_UNIQUE
118ELM_CALENDAR_DAILY = enums.ELM_CALENDAR_DAILY
119ELM_CALENDAR_WEEKLY = enums.ELM_CALENDAR_WEEKLY
120ELM_CALENDAR_MONTHLY = enums.ELM_CALENDAR_MONTHLY
121ELM_CALENDAR_ANNUALLY = enums.ELM_CALENDAR_ANNUALLY
122ELM_CALENDAR_LAST_DAY_OF_MONTH = enums.ELM_CALENDAR_LAST_DAY_OF_MONTH
123
124ELM_CALENDAR_SELECT_MODE_DEFAULT = enums.ELM_CALENDAR_SELECT_MODE_DEFAULT
125ELM_CALENDAR_SELECT_MODE_ALWAYS = enums.ELM_CALENDAR_SELECT_MODE_ALWAYS
126ELM_CALENDAR_SELECT_MODE_NONE = enums.ELM_CALENDAR_SELECT_MODE_NONE
127ELM_CALENDAR_SELECT_MODE_ONDEMAND = enums.ELM_CALENDAR_SELECT_MODE_ONDEMAND
128
129ELM_DAY_SUNDAY = enums.ELM_DAY_SUNDAY
130ELM_DAY_MONDAY = enums.ELM_DAY_MONDAY
131ELM_DAY_TUESDAY = enums.ELM_DAY_TUESDAY
132ELM_DAY_WEDNESDAY = enums.ELM_DAY_WEDNESDAY
133ELM_DAY_THURSDAY = enums.ELM_DAY_THURSDAY
134ELM_DAY_FRIDAY = enums.ELM_DAY_FRIDAY
135ELM_DAY_SATURDAY = enums.ELM_DAY_SATURDAY
136ELM_DAY_LAST = enums.ELM_DAY_LAST
137
138cdef class CalendarMark(object):
139
140 """
141
142 An item for the Calendar widget.
143
144 """
145
146 cdef Elm_Calendar_Mark *obj
147
148 def __init__(self, evasObject cal, mark_type, mark_time, repeat):
149 """.. seealso:: :py:func:`Calendar.mark_add()`"""
150 cdef tm time
151 tmtup = mark_time.timetuple()
152 time.tm_mday = tmtup.tm_mday
153 time.tm_mon = tmtup.tm_mon - 1
154 time.tm_year = tmtup.tm_year - 1900
155 time.tm_wday = tmtup.tm_wday
156 time.tm_yday = tmtup.tm_yday
157 time.tm_isdst = tmtup.tm_isdst
158 self.obj = elm_calendar_mark_add(cal.obj, _cfruni(mark_type), &time, repeat)
159
160 def delete(self):
161 """delete()
162
163 Delete a mark from the calendar.
164
165 If deleting all calendar marks is required, :py:func:`marks_clear()`
166 should be used instead of getting marks list and deleting each one.
167
168 .. seealso:: :py:func:`mark_add()`
169
170 :param mark: The mark to be deleted.
171 :type mark: :py:class:`CalendarMark`
172
173 """
174 elm_calendar_mark_del(self.obj)
175
176cdef class Calendar(LayoutClass):
177
178 """
179
180 This is a calendar widget.
181
182 It helps applications to flexibly display a calender with day of the week,
183 date, year and month. Applications are able to set specific dates to be
184 reported back, when selected, in the smart callbacks of the calendar widget.
185 The API of this widget lets the applications perform other functions, like:
186
187 - placing marks on specific dates
188 - setting the bounds for the calendar (minimum and maximum years)
189 - setting the day names of the week (e.g. "Thu" or "Thursday")
190 - setting the year and month format.
191
192 This widget emits the following signals, besides the ones sent from
193 :py:class:`elementary.layout.Layout`:
194
195 - ``changed`` - emitted when the date in the calendar is changed.
196
197 """
198
199 def __init__(self, evasObject parent):
200 self._set_obj(elm_calendar_add(parent.obj))
201
202 property weekdays_names:
203 """The weekdays' names to be displayed by the calendar.
204
205 By default, weekdays abbreviations get from system are displayed:
206 E.g. for an en_US locale: "Sun, Mon, Tue, Wed, Thu, Fri, Sat"
207
208 The first string should be related to Sunday, the second to Monday...
209
210 The usage should be like this::
211
212 weekdays =
213 (
214 "Sunday", "Monday", "Tuesday", "Wednesday",
215 "Thursday", "Friday", "Saturday"
216 )
217 calendar.weekdays_names = weekdays
218
219 :type: tuple of strings
220
221 .. warning:: It must have 7 elements, or it will access invalid memory.
222
223 """
224 def __get__(self):
225 cdef const_char **lst
226 cdef const_char *weekday
227 ret = []
228 lst = elm_calendar_weekdays_names_get(self.obj)
229 for i from 0 <= i < 7:
230 weekday = lst[i]
231 if weekday != NULL:
232 ret.append(_ctouni(weekday))
233 return ret
234
235 def __set__(self, weekdays):
236 cdef int i, day_len
237 cdef char **days, *weekday
238 days = <char **>PyMem_Malloc(7 * sizeof(char*))
239 for i from 0 <= i < 7:
240 weekday = _fruni(weekdays[i])
241 day_len = len(weekday)
242 days[i] = <char *>PyMem_Malloc(day_len + 1)
243 memcpy(days[i], weekday, day_len + 1)
244 elm_calendar_weekdays_names_set(self.obj, <const_char **>days)
245
246 property min_max_year:
247 """The minimum and maximum values for the year
248
249 Maximum must be greater than minimum, except if you don't want to set
250 maximum year.
251 Default values are 1902 and -1.
252
253 If the maximum year is a negative value, it will be limited depending
254 on the platform architecture (year 2037 for 32 bits)
255
256 :type: tuple of ints
257
258 """
259 def __get__(self):
260 cdef int min, max
261 elm_calendar_min_max_year_get(self.obj, &min, &max)
262 return (min, max)
263 def __set__(self, value):
264 cdef int min, max
265 min, max = value
266 elm_calendar_min_max_year_set(self.obj, min, max)
267
268 property select_mode:
269 """The day selection mode used.
270
271 :type: Elm_Calendar_Select_Mode
272
273 """
274 def __get__(self):
275 return elm_calendar_select_mode_get(self.obj)
276 def __set__(self, mode):
277 elm_calendar_select_mode_set(self.obj, mode)
278
279 property selected_time:
280 """Selected date on the calendar.
281
282 Setting this changes the displayed month if needed.
283 Selected date changes when the user goes to next/previous month or
284 select a day pressing over it on calendar.
285
286 :type: datetime.date
287
288 """
289 def __get__(self):
290 cdef tm time
291 elm_calendar_selected_time_get(self.obj, &time)
292 ret = date( time.tm_year + 1900,
293 time.tm_mon + 1,
294 time.tm_mday)
295 return ret
296
297 def __set__(self, selected_time):
298 cdef tm time
299 tmtup = selected_time.timetuple()
300 time.tm_mday = tmtup.tm_mday
301 time.tm_mon = tmtup.tm_mon - 1
302 time.tm_year = tmtup.tm_year - 1900
303 time.tm_wday = tmtup.tm_wday
304 time.tm_yday = tmtup.tm_yday
305 time.tm_isdst = tmtup.tm_isdst
306 elm_calendar_selected_time_set(self.obj, &time)
307
308 property format_function:
309 """Set a function to format the string that will be used to display
310 month and year.
311
312 By default it uses strftime with "%B %Y" format string.
313 It should allocate the memory that will be used by the string,
314 that will be freed by the widget after usage.
315 A pointer to the string and a pointer to the time struct will be provided.
316
317 Example::
318
319 static char *
320 _format_month_year(struct tm selected_time)
321 {
322 char buf[32];
323 if (!strftime(buf, sizeof(buf), "%B %Y", selected_time)) return NULL;
324 return strdup(buf);
325 }
326
327 elm_calendar_format_function_set(calendar, _format_month_year);
328
329 :param format_func: Function to set the month-year string given
330 the selected date
331 :type format_func: function
332
333 """
334 def __set__(self, format_func):
335 pass
336 #elm_calendar_format_function_set(self.obj, format_func)
337
338 def mark_add(self, mark_type, mark_time, repeat):
339 """mark_add(mark_type, mark_time, repeat) -> CalendarMark
340
341 Add a new mark to the calendar
342
343 Add a mark that will be drawn in the calendar respecting the insertion
344 time and periodicity. It will emit the type as signal to the widget theme.
345 Default theme supports "holiday" and "checked", but it can be extended.
346
347 It won't immediately update the calendar, drawing the marks.
348 For this, call :py:func:`marks_draw()`. However, when user selects
349 next or previous month calendar forces marks drawn.
350
351 Marks created with this method can be deleted with :py:func:`mark_del()`.
352
353 Example::
354
355 struct tm selected_time;
356 time_t current_time;
357
358 current_time = time(NULL) + 5 84600;
359 localtime_r(&current_time, &selected_time);
360 elm_calendar_mark_add(cal, "holiday", selected_time,
361 ELM_CALENDAR_ANNUALLY);
362
363 current_time = time(NULL) + 1 84600;
364 localtime_r(&current_time, &selected_time);
365 elm_calendar_mark_add(cal, "checked", selected_time, ELM_CALENDAR_UNIQUE);
366
367 elm_calendar_marks_draw(cal);
368
369 .. seealso::
370 :py:func:`marks_draw()`
371 :py:func:`mark_del()`
372
373 :param mark_type: A string used to define the type of mark. It will be
374 emitted to the theme, that should display a related modification on these
375 days representation.
376 :type mark_type: string
377 :param mark_time: A time struct to represent the date of inclusion of the
378 mark. For marks that repeats it will just be displayed after the inclusion
379 date in the calendar.
380 :type mark_time: tm struct
381 :param repeat: Repeat the event following this periodicity. Can be a unique
382 mark (that don't repeat), daily, weekly, monthly or annually.
383 :type repeat: Elm_Calendar_Mark_Repeat_Type
384 :return: The created mark or ``None`` upon failure.
385 :rtype: :py:class:`CalendarMark`
386
387 """
388 return CalendarMark(self, mark_type, mark_time, repeat)
389
390 property marks:
391 """Calendar marks.
392
393 :type: tuple of :py:class:`CalendarMark`
394
395 """
396 #def __get__(self):
397 #const_Eina_List *elm_calendar_marks_get(self.obj)
398 #def __set__(self, value):
399 def __del__(self):
400 elm_calendar_marks_clear(self.obj)
401
402 def marks_draw(self):
403 """marks_draw()
404
405 Draw calendar marks.
406
407 Should be used after adding, removing or clearing marks.
408 It will go through the entire marks list updating the calendar.
409 If lots of marks will be added, add all the marks and then call
410 this function.
411
412 When the month is changed, i.e. user selects next or previous month,
413 marks will be drawn.
414
415 .. seealso::
416 :py:func:`mark_add()`
417 :py:func:`mark_del()`
418 :py:func:`marks_clear()`
419
420 """
421 elm_calendar_marks_draw(self.obj)
422
423 property interval:
424 """Set the interval on time updates for an user mouse button hold
425 on calendar widgets' month selection.
426
427 This interval value is **decreased** while the user holds the
428 mouse pointer either selecting next or previous month.
429
430 This helps the user to get to a given month distant from the
431 current one easier/faster, as it will start to change quicker and
432 quicker on mouse button holds.
433
434 The calculation for the next change interval value, starting from
435 the one set with this call, is the previous interval divided by
436 1.05, so it decreases a little bit.
437
438 The default starting interval value for automatic changes is
439 **0.85** seconds.
440
441 :type: float
442
443 """
444 def __get__(self):
445 return elm_calendar_interval_get(self.obj)
446 def __set__(self, interval):
447 elm_calendar_interval_set(self.obj, interval)
448
449 property first_day_of_week:
450 """The first day of week to use on the calendar widget.
451
452 :type: int
453
454 """
455 def __get__(self):
456 return elm_calendar_first_day_of_week_get(self.obj)
457 def __set__(self, day):
458 elm_calendar_first_day_of_week_set(self.obj, day)
459
460 def callback_changed_add(self, func, *args, **kwargs):
461 """Emitted when the date in the calendar is changed."""
462 self._callback_add("changed", func, *args, **kwargs)
463
464 def callback_changed_del(self, func):
465 self._callback_del("changed", func)
466
467
468_object_mapping_register("elm_calendar", Calendar)
diff --git a/efl/elementary/callbacks.pxi b/efl/elementary/callbacks.pxi
new file mode 100644
index 0000000..3a96a39
--- /dev/null
+++ b/efl/elementary/callbacks.pxi
@@ -0,0 +1,26 @@
1# Copyright 2012 Kai Huuhko <kai.huuhko@gmail.com>
2#
3# This file is part of python-elementary.
4#
5# python-elementary is free software: you can redistribute it and/or modify
6# it under the terms of the GNU Lesser General Public License as published by
7# the Free Software Foundation, either version 3 of the License, or
8# (at your option) any later version.
9#
10# python-elementary is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13# GNU Lesser General Public License for more details.
14#
15# You should have received a copy of the GNU Lesser General Public License
16# along with python-elementary. If not, see <http://www.gnu.org/licenses/>.
17#
18
19from efl.eo cimport const_char_ptr
20
21def _cb_string_conv(long addr):
22 cdef const_char_ptr s = <const_char_ptr>addr
23 if s == NULL:
24 return None
25 else:
26 return s
diff --git a/efl/elementary/check.pxd b/efl/elementary/check.pxd
new file mode 100644
index 0000000..d30114b
--- /dev/null
+++ b/efl/elementary/check.pxd
@@ -0,0 +1,6 @@
1from efl.evas cimport Eina_Bool, Evas_Object
2
3cdef extern from "Elementary.h":
4 Evas_Object *elm_check_add(Evas_Object *parent)
5 void elm_check_state_set(Evas_Object *obj, Eina_Bool state)
6 Eina_Bool elm_check_state_get(Evas_Object *obj)
diff --git a/efl/elementary/efl.elementary_check.pxi b/efl/elementary/check.pyx
index b4291da..23f8437 100644
--- a/efl/elementary/efl.elementary_check.pxi
+++ b/efl/elementary/check.pyx
@@ -15,34 +15,65 @@
15# You should have received a copy of the GNU Lesser General Public License 15# You should have received a copy of the GNU Lesser General Public License
16# along with this Python-EFL. If not, see <http://www.gnu.org/licenses/>. 16# along with this Python-EFL. If not, see <http://www.gnu.org/licenses/>.
17 17
18include "widget_header.pxi"
19
20from layout_class cimport LayoutClass
18 21
19cdef class Check(LayoutClass): 22cdef class Check(LayoutClass):
20 23
24 """
25
26 The check widget allows for toggling a value between true and false.
27
28 Check objects are a lot like radio objects in layout and functionality,
29 except they do not work as a group, but independently, and only toggle
30 the value of a boolean between false and true. :py:attr:`state` sets the
31 boolean state and :py:attr:`state` returns the current state.
32
33 This widget emits the following signals, besides the ones sent from
34 :py:class:`elementary.layout.Layout`:
35
36 - ``changed`` - This is called whenever the user changes the state of
37 the check objects.
38
39 Default content parts of the check widget that you can use for are:
40
41 - "icon" - An icon of the check
42
43 Default text parts of the check widget that you can use for are:
44
45 - "default" - A label of the check
46 - "on" - On state label of the check
47 - "off" - Off state label of the check
48
49 """
50
21 def __init__(self, evasObject parent): 51 def __init__(self, evasObject parent):
22 self._set_obj(elm_check_add(parent.obj)) 52 self._set_obj(elm_check_add(parent.obj))
23 53
24 def state_set(self, value): 54 property state:
25 if value: 55 """The of/off state of the check object
26 elm_check_state_set(self.obj, 1)
27 else:
28 elm_check_state_set(self.obj, 0)
29 56
30 def state_get(self): 57 This property reflects the state of the check. Setting it **doesn't**
31 cdef Eina_Bool state 58 cause the "changed" signal to be emitted.
32 state = elm_check_state_get(self.obj)
33 if state == 0:
34 return False
35 else:
36 return True
37 59
38 property state: 60 :type: bool
61
62 """
39 def __get__(self): 63 def __get__(self):
40 return bool(elm_check_state_get(self.obj)) 64 return bool(elm_check_state_get(self.obj))
41 65
42 def __set__(self, value): 66 def __set__(self, value):
43 elm_check_state_set(self.obj, value) 67 elm_check_state_set(self.obj, value)
44 68
69 def state_set(self, value):
70 elm_check_state_set(self.obj, value)
71 def state_get(self):
72 return bool(elm_check_state_get(self.obj))
73
45 def callback_changed_add(self, func, *args, **kwargs): 74 def callback_changed_add(self, func, *args, **kwargs):
75 """This is called whenever the user changes the state of the check
76 objects."""
46 self._callback_add("changed", func, *args, **kwargs) 77 self._callback_add("changed", func, *args, **kwargs)
47 78
48 def callback_changed_del(self, func): 79 def callback_changed_del(self, func):
diff --git a/efl/elementary/clock.pxd b/efl/elementary/clock.pxd
new file mode 100644
index 0000000..a2b742b
--- /dev/null
+++ b/efl/elementary/clock.pxd
@@ -0,0 +1,17 @@
1from efl.evas cimport Evas_Object, Eina_Bool
2from enums cimport Elm_Clock_Edit_Mode
3
4cdef extern from "Elementary.h":
5 Evas_Object *elm_clock_add(Evas_Object *parent)
6 void elm_clock_time_set(Evas_Object *obj, int hrs, int min, int sec)
7 void elm_clock_time_get(Evas_Object *obj, int *hrs, int *min, int *sec)
8 void elm_clock_edit_set(Evas_Object *obj, Eina_Bool edit)
9 Eina_Bool elm_clock_edit_get(Evas_Object *obj)
10 void elm_clock_edit_mode_set(Evas_Object *obj, Elm_Clock_Edit_Mode mode)
11 Elm_Clock_Edit_Mode elm_clock_edit_mode_get(Evas_Object *obj)
12 void elm_clock_show_am_pm_set(Evas_Object *obj, Eina_Bool am_pm)
13 Eina_Bool elm_clock_show_am_pm_get(Evas_Object *obj)
14 void elm_clock_show_seconds_set(Evas_Object *obj, Eina_Bool seconds)
15 Eina_Bool elm_clock_show_seconds_get(Evas_Object *obj)
16 void elm_clock_first_interval_set(Evas_Object *obj, double interval)
17 double elm_clock_first_interval_get(Evas_Object *obj)
diff --git a/efl/elementary/clock.pyx b/efl/elementary/clock.pyx
new file mode 100644
index 0000000..5788fcf
--- /dev/null
+++ b/efl/elementary/clock.pyx
@@ -0,0 +1,276 @@
1# Copyright (C) 2007-2013 various contributors (see AUTHORS)
2#
3# This file is part of Python-EFL.
4#
5# Python-EFL is free software; you can redistribute it and/or
6# modify it under the terms of the GNU Lesser General Public
7# License as published by the Free Software Foundation; either
8# version 2.1 of the License, or (at your option) any later version.
9#
10# Python-EFL is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13# Lesser General Public License for more details.
14#
15# You should have received a copy of the GNU Lesser General Public License
16# along with this Python-EFL. If not, see <http://www.gnu.org/licenses/>.
17#
18
19"""
20
21.. rubric:: Clock edit modes
22
23.. data:: ELM_CLOCK_EDIT_DEFAULT
24
25 Default edit
26
27.. data:: ELM_CLOCK_EDIT_HOUR_DECIMAL
28
29 Edit hours' decimal
30
31.. data:: ELM_CLOCK_EDIT_HOUR_UNIT
32
33 Edit hours' unit
34
35.. data:: ELM_CLOCK_EDIT_MIN_DECIMAL
36
37 Edit minutes' decimal
38
39.. data:: ELM_CLOCK_EDIT_MIN_UNIT
40
41 Edit minutes' unit
42
43.. data:: ELM_CLOCK_EDIT_SEC_DECIMAL
44
45 Edit seconds' decimal
46
47.. data:: ELM_CLOCK_EDIT_SEC_UNIT
48
49 Edit seconds' unit
50
51.. data:: ELM_CLOCK_EDIT_ALL
52
53 Edit all
54
55"""
56
57include "widget_header.pxi"
58
59from layout_class cimport LayoutClass
60
61cimport enums
62
63ELM_CLOCK_EDIT_DEFAULT = enums.ELM_CLOCK_EDIT_DEFAULT
64ELM_CLOCK_EDIT_HOUR_DECIMAL = enums.ELM_CLOCK_EDIT_HOUR_DECIMAL
65ELM_CLOCK_EDIT_HOUR_UNIT = enums.ELM_CLOCK_EDIT_HOUR_UNIT
66ELM_CLOCK_EDIT_MIN_DECIMAL = enums.ELM_CLOCK_EDIT_MIN_DECIMAL
67ELM_CLOCK_EDIT_MIN_UNIT = enums.ELM_CLOCK_EDIT_MIN_UNIT
68ELM_CLOCK_EDIT_SEC_DECIMAL = enums.ELM_CLOCK_EDIT_SEC_DECIMAL
69ELM_CLOCK_EDIT_SEC_UNIT = enums.ELM_CLOCK_EDIT_SEC_UNIT
70ELM_CLOCK_EDIT_ALL = enums.ELM_CLOCK_EDIT_ALL
71
72cdef class Clock(LayoutClass):
73
74 """
75
76 This is a digital clock widget.
77
78 In its default theme, it has a vintage "flipping numbers clock" appearance,
79 which will animate sheets of individual algarisms individually as time goes
80 by.
81
82 A newly created clock will fetch system's time (already considering
83 local time adjustments) to start with, and will tick accordingly. It may
84 or may not show seconds.
85
86 Clocks have an **edition** mode. When in it, the sheets will display
87 extra arrow indications on the top and bottom and the user may click on
88 them to raise or lower the time values. After it's told to exit edition
89 mode, it will keep ticking with that new time set (it keeps the
90 difference from local time).
91
92 Also, when under edition mode, user clicks on the cited arrows which are
93 **held** for some time will make the clock to flip the sheet, thus
94 editing the time, continuously and automatically for the user. The
95 interval between sheet flips will keep growing in time, so that it helps
96 the user to reach a time which is distant from the one set.
97
98 The time display is, by default, in military mode (24h), but an am/pm
99 indicator may be optionally shown, too, when it will switch to 12h.
100
101 This widget emits the following signals, besides the ones sent from
102 :py:class:`elementary.layout.Layout`:
103
104 - ``changed`` - the clock's user changed the time
105
106 """
107
108 def __init__(self, evasObject parent):
109 self._set_obj(elm_clock_add(parent.obj))
110
111 property time:
112 """The clock widget's time
113
114 This property reflects the time that is showed by the clock widget.
115
116 Values **must** be set within the following ranges:
117
118 - 0 - 23, for hours
119 - 0 - 59, for minutes
120 - 0 - 59, for seconds,
121
122 even if the clock is not in "military" mode.
123
124 .. warning:: The behavior for values set out of those ranges is
125 **undefined**.
126
127 :type: (int h, int m, int s)
128
129 """
130 def __get__(self):
131 cdef int hrs, min, sec
132 elm_clock_time_get(self.obj, &hrs, &min, &sec)
133 return (hrs, min, sec)
134
135 def __set__(self, value):
136 cdef int hrs, min, sec
137 hrs, min, sec = value
138 elm_clock_time_set(self.obj, hrs, min, sec)
139
140 def time_set(self, hours, minutes, seconds):
141 elm_clock_time_set(self.obj, hours, minutes, seconds)
142 def time_get(self):
143 cdef int hrs, min, sec
144 elm_clock_time_get(self.obj, &hrs, &min, &sec)
145 return (hrs, min, sec)
146
147 property edit:
148 """Whether a given clock widget is under **edition mode** or under
149 (default) displaying-only mode.
150
151 This property reflects whether the clock editable or not **by user
152 interaction**. When in edition mode, clocks **stop** ticking, until
153 one brings them back to canonical mode. The :py:attr:`edit_mode`
154 property will influence which digits of the clock will be editable.
155
156 .. note:: am/pm sheets, if being shown, will **always** be editable
157 under edition mode.
158
159 :type: bool
160
161 """
162 def __get__(self):
163 return bool(elm_clock_edit_get(self.obj))
164
165 def __set__(self, edit):
166 elm_clock_edit_set(self.obj, edit)
167
168 def edit_set(self, edit):
169 elm_clock_edit_set(self.obj, edit)
170 def edit_get(self, edit):
171 return bool(elm_clock_edit_get(self.obj))
172
173 property edit_mode:
174 """Which digits of the given clock widget should be editable when in
175 edition mode.
176
177 :type: Elm_Clock_Edit_Mode
178
179 """
180 def __get__(self):
181 return elm_clock_edit_mode_get(self.obj)
182
183 def __set__(self, mode):
184 elm_clock_edit_mode_set(self.obj, mode)
185
186 def edit_mode_set(self, mode):
187 elm_clock_edit_mode_set(self.obj, mode)
188 def edit_mode_get(self):
189 return elm_clock_edit_mode_get(self.obj)
190
191 property show_am_pm:
192 """Whether the given clock widget must show hours in military or
193 am/pm mode
194
195 This property reflects if the clock must show hours in military or
196 am/pm mode. In some countries like Brazil the military mode
197 (00-24h-format) is used, in opposition to the USA, where the
198 am/pm mode is more commonly used.
199
200 ``True``, if in am/pm mode, ``False`` if in military
201
202 :type: bool
203
204 """
205 def __get__(self):
206 return elm_clock_show_am_pm_get(self.obj)
207
208 def __set__(self, am_pm):
209 elm_clock_show_am_pm_set(self.obj, am_pm)
210
211 def show_am_pm_set(self, am_pm):
212 elm_clock_show_am_pm_set(self.obj, am_pm)
213 def show_am_pm_get(self):
214 return elm_clock_show_am_pm_get(self.obj)
215
216 property show_seconds:
217 """Whether the given clock widget must show time with seconds or not
218
219 By default, they are **not** shown.
220
221 :type: bool
222
223 """
224 def __get__(self):
225 return elm_clock_show_seconds_get(self.obj)
226
227 def __set__(self, seconds):
228 elm_clock_show_seconds_set(self.obj, seconds)
229
230 def show_seconds_set(self, seconds):
231 elm_clock_show_seconds_set(self.obj, seconds)
232 def show_seconds_get(self):
233 return elm_clock_show_seconds_get(self.obj)
234
235 property first_interval:
236 """The first interval on time updates for a user mouse button hold
237 on clock widgets' time edition.
238
239 This interval value is **decreased** while the user holds the
240 mouse pointer either incrementing or decrementing a given the
241 clock digit's value.
242
243 This helps the user to get to a given time distant from the
244 current one easier/faster, as it will start to flip quicker and
245 quicker on mouse button holds.
246
247 The calculation for the next flip interval value, starting from
248 the one set with this call, is the previous interval divided by
249 1.05, so it decreases a little bit.
250
251 The default starting interval value for automatic flips is
252 **0.85** seconds.
253
254 :type: float
255
256 """
257 def __get__(self):
258 return elm_clock_first_interval_get(self.obj)
259
260 def __set__(self, interval):
261 elm_clock_first_interval_set(self.obj, interval)
262
263 def first_interval_set(self, interval):
264 elm_clock_first_interval_set(self.obj, interval)
265 def first_interval_get(self):
266 return elm_clock_first_interval_get(self.obj)
267
268 def callback_changed_add(self, func, *args, **kwargs):
269 """The clock's user changed the time"""
270 self._callback_add("changed", func, *args, **kwargs)
271
272 def callback_changed_del(self, func):
273 self._callback_del("changed", func)
274
275
276_object_mapping_register("elm_clock", Clock)
diff --git a/efl/elementary/colorselector.pxd b/efl/elementary/colorselector.pxd
new file mode 100644
index 0000000..51c229c
--- /dev/null
+++ b/efl/elementary/colorselector.pxd
@@ -0,0 +1,17 @@
1from efl.evas cimport Evas_Object
2from object_item cimport Elm_Object_Item
3from enums cimport Elm_Colorselector_Mode
4from libc.string cimport const_char
5
6cdef extern from "Elementary.h":
7 Evas_Object * elm_colorselector_add(Evas_Object *parent)
8 void elm_colorselector_color_set(Evas_Object *obj, int r, int g, int b, int a)
9 void elm_colorselector_color_get(Evas_Object *obj, int *r, int *g, int *b, int *a)
10 void elm_colorselector_mode_set(Evas_Object *obj, Elm_Colorselector_Mode mode)
11 Elm_Colorselector_Mode elm_colorselector_mode_get(Evas_Object *obj)
12 void elm_colorselector_palette_item_color_get(Elm_Object_Item *it, int *r, int *g, int *b, int *a)
13 void elm_colorselector_palette_item_color_set(Elm_Object_Item *it, int r, int g, int b, int a)
14 Elm_Object_Item * elm_colorselector_palette_color_add(Evas_Object *obj, int r, int g, int b, int a)
15 void elm_colorselector_palette_clear(Evas_Object *obj)
16 void elm_colorselector_palette_name_set(Evas_Object *obj, const_char *palette_name)
17 const_char * elm_colorselector_palette_name_get(Evas_Object *obj)
diff --git a/efl/elementary/efl.elementary_colorselector.pxi b/efl/elementary/colorselector.pyx
index 2e44b4f..f5c3533 100644
--- a/efl/elementary/efl.elementary_colorselector.pxi
+++ b/efl/elementary/colorselector.pyx
@@ -14,10 +14,45 @@
14# 14#
15# You should have received a copy of the GNU Lesser General Public License 15# You should have received a copy of the GNU Lesser General Public License
16# along with this Python-EFL. If not, see <http://www.gnu.org/licenses/>. 16# along with this Python-EFL. If not, see <http://www.gnu.org/licenses/>.
17#
18
19"""
20
21.. rubric:: Colorselector modes
22
23.. data:: ELM_COLORSELECTOR_PALETTE
24
25 Show palette
26
27.. data:: ELM_COLORSELECTOR_COMPONENTS
28
29 Show components
30
31.. data:: ELM_COLORSELECTOR_BOTH
32
33 Show palette and components
34
35"""
17 36
37include "widget_header.pxi"
38from object_item cimport ObjectItem
39from object_item import _cb_object_item_conv
40from layout_class cimport LayoutClass
41
42cimport enums
43
44ELM_COLORSELECTOR_PALETTE = enums.ELM_COLORSELECTOR_PALETTE
45ELM_COLORSELECTOR_COMPONENTS = enums.ELM_COLORSELECTOR_COMPONENTS
46ELM_COLORSELECTOR_BOTH = enums.ELM_COLORSELECTOR_BOTH
18 47
19cdef class ColorselectorPaletteItem(ObjectItem): 48cdef class ColorselectorPaletteItem(ObjectItem):
20 49
50 """
51
52 An item for the :py:class:`Colorselector` widget.
53
54 """
55
21 def __init__(self, evasObject cs, r, g, b, a): 56 def __init__(self, evasObject cs, r, g, b, a):
22 cdef Elm_Object_Item *item = elm_colorselector_palette_color_add(cs.obj, r, g, b, a) 57 cdef Elm_Object_Item *item = elm_colorselector_palette_color_add(cs.obj, r, g, b, a)
23 if item != NULL: 58 if item != NULL:
@@ -25,15 +60,12 @@ cdef class ColorselectorPaletteItem(ObjectItem):
25 else: 60 else:
26 Py_DECREF(self) 61 Py_DECREF(self)
27 62
28 def color_get(self): 63 property color:
29 cdef int r, g, b, a 64 """The palette item's color.
30 elm_colorselector_palette_item_color_get(self.item, &r, &g, &b, &a)
31 return (r, g, b, a)
32 65
33 def color_set(self, r, g, b, a): 66 :type: tuple of ints
34 elm_colorselector_palette_item_color_set(self.item, r, g, b, a)
35 67
36 property color: 68 """
37 def __get__(self): 69 def __get__(self):
38 cdef int r, g, b, a 70 cdef int r, g, b, a
39 elm_colorselector_palette_item_color_get(self.item, &r, &g, &b, &a) 71 elm_colorselector_palette_item_color_get(self.item, &r, &g, &b, &a)
@@ -43,21 +75,47 @@ cdef class ColorselectorPaletteItem(ObjectItem):
43 r, g, b, a = value 75 r, g, b, a = value
44 elm_colorselector_palette_item_color_set(self.item, r, g, b, a) 76 elm_colorselector_palette_item_color_set(self.item, r, g, b, a)
45 77
78 def color_get(self):
79 cdef int r, g, b, a
80 elm_colorselector_palette_item_color_get(self.item, &r, &g, &b, &a)
81 return (r, g, b, a)
82 def color_set(self, r, g, b, a):
83 elm_colorselector_palette_item_color_set(self.item, r, g, b, a)
46 84
47cdef class Colorselector(LayoutClass): 85cdef class Colorselector(LayoutClass):
48 86
87 """
88
89 A Colorselector is a color selection widget.
90
91 It allows application to set a series of colors. It also allows to
92 load/save colors from/to config with a unique identifier, by default,
93 the colors are loaded/saved from/to config using "default" identifier.
94 The colors can be picked by user from the color set by clicking on
95 individual color item on the palette or by selecting it from selector.
96
97 This widget emits the following signals, besides the ones sent from
98 :py:class:`elementary.layout.Layout`:
99
100 - ``"changed"`` - When the color value changes on selector
101 - ``"color,item,selected"`` - When user clicks on color item.
102 The event_info parameter of the callback will be the selected
103 color item.
104 - ``"color,item,longpressed"`` - When user long presses on color item.
105 The event_info parameter of the callback will be the selected
106 color item.
107
108 """
109
49 def __init__(self, evasObject parent): 110 def __init__(self, evasObject parent):
50 self._set_obj(elm_colorselector_add(parent.obj)) 111 self._set_obj(elm_colorselector_add(parent.obj))
51 112
52 def color_set(self, r, g, b, a): 113 property color:
53 elm_colorselector_color_set(self.obj, r, g, b, a) 114 """The current color (r, g, b, a).
54 115
55 def color_get(self): 116 :type: tuple of ints
56 cdef int r, g, b, a
57 elm_colorselector_color_get(self.obj, &r, &g, &b, &a)
58 return (r, g, b, a)
59 117
60 property color: 118 """
61 def __get__(self): 119 def __get__(self):
62 cdef int r, g, b, a 120 cdef int r, g, b, a
63 elm_colorselector_color_get(self.obj, &r, &g, &b, &a) 121 elm_colorselector_color_get(self.obj, &r, &g, &b, &a)
@@ -67,43 +125,86 @@ cdef class Colorselector(LayoutClass):
67 r, g, b, a = value 125 r, g, b, a = value
68 elm_colorselector_color_set(self.obj, r, g, b, a) 126 elm_colorselector_color_set(self.obj, r, g, b, a)
69 127
70 def mode_set(self, mode): 128 def color_set(self, r, g, b, a):
71 elm_colorselector_mode_set(self.obj, mode) 129 elm_colorselector_color_set(self.obj, r, g, b, a)
72 130 def color_get(self):
73 def mode_get(self): 131 cdef int r, g, b, a
74 return elm_colorselector_mode_get(self.obj) 132 elm_colorselector_color_get(self.obj, &r, &g, &b, &a)
133 return (r, g, b, a)
75 134
76 property mode: 135 property mode:
136 """Colorselector's mode.
137
138 Colorselector supports three modes palette only, selector only and both.
139
140 :type: Elm_Colorselector_Mode
141
142 """
77 def __get__(self): 143 def __get__(self):
78 return elm_colorselector_mode_get(self.obj) 144 return elm_colorselector_mode_get(self.obj)
79 def __set__(self, mode): 145 def __set__(self, mode):
80 elm_colorselector_mode_set(self.obj, mode) 146 elm_colorselector_mode_set(self.obj, mode)
81 147
148 def mode_set(self, mode):
149 elm_colorselector_mode_set(self.obj, mode)
150 def mode_get(self):
151 return elm_colorselector_mode_get(self.obj)
152
82 def palette_color_add(self, r, g, b, a): 153 def palette_color_add(self, r, g, b, a):
154 """palette_color_add(int r, int g, int b, int a) -> ColorselectorPaletteItem
155
156 Add a new color item to palette.
157
158 :param r: r-value of color
159 :type r: int
160 :param g: g-value of color
161 :type g: int
162 :param b: b-value of color
163 :type b: int
164 :param a: a-value of color
165 :type a: int
166 :return: A new color palette Item.
167 :rtype: :py:class:`ColorselectorPaletteItem`
168
169 """
83 return ColorselectorPaletteItem(self, r, g, b, a) 170 return ColorselectorPaletteItem(self, r, g, b, a)
84 171
85 def palette_clear(self): 172 def palette_clear(self):
173 """palette_clear()
174
175 Clear the palette items."""
86 elm_colorselector_palette_clear(self.obj) 176 elm_colorselector_palette_clear(self.obj)
87 177
88 def palette_name_set(self, palette_name): 178 property palette_name:
89 elm_colorselector_palette_name_set(self.obj, _cfruni(palette_name)) 179 """The current palette's name
90 180
91 def palette_name_get(self): 181 When colorpalette name is set, colors will be loaded from and saved
92 return _ctouni(elm_colorselector_palette_name_get(self.obj)) 182 to config using the set name. If no name is set then colors will be
183 loaded from or saved to "default" config.
93 184
94 property palette_name: 185 :type: string
186
187 """
95 def __get__(self): 188 def __get__(self):
96 return _ctouni(elm_colorselector_palette_name_get(self.obj)) 189 return _ctouni(elm_colorselector_palette_name_get(self.obj))
97 def __set__(self, palette_name): 190 def __set__(self, palette_name):
98 elm_colorselector_palette_name_set(self.obj, _cfruni(palette_name)) 191 elm_colorselector_palette_name_set(self.obj, _cfruni(palette_name))
99 192
193 def palette_name_set(self, palette_name):
194 elm_colorselector_palette_name_set(self.obj, _cfruni(palette_name))
195 def palette_name_get(self):
196 return _ctouni(elm_colorselector_palette_name_get(self.obj))
197
100 def callback_changed_add(self, func, *args, **kwargs): 198 def callback_changed_add(self, func, *args, **kwargs):
199 """When the color value changes on selector"""
101 self._callback_add("changed", func, *args, **kwargs) 200 self._callback_add("changed", func, *args, **kwargs)
102 201
103 def callback_changed_del(self, func): 202 def callback_changed_del(self, func):
104 self._callback_del("changed", func) 203 self._callback_del("changed", func)
105 204
106 def callback_color_item_selected_add(self, func, *args, **kwargs): 205 def callback_color_item_selected_add(self, func, *args, **kwargs):
206 """When user clicks on color item. The event_info parameter of the
207 callback will be the selected color item."""
107 self._callback_add_full("color,item,selected", 208 self._callback_add_full("color,item,selected",
108 _cb_object_item_conv, 209 _cb_object_item_conv,
109 func, *args, **kwargs) 210 func, *args, **kwargs)
@@ -113,6 +214,8 @@ cdef class Colorselector(LayoutClass):
113 _cb_object_item_conv, func) 214 _cb_object_item_conv, func)
114 215
115 def callback_color_item_longpressed_add(self, func, *args, **kwargs): 216 def callback_color_item_longpressed_add(self, func, *args, **kwargs):
217 """When user long presses on color item. The event_info parameter of
218 the callback will be the selected color item."""
116 self._callback_add_full("color,item,longpressed", 219 self._callback_add_full("color,item,longpressed",
117 _cb_object_item_conv, 220 _cb_object_item_conv,
118 func, *args, **kwargs) 221 func, *args, **kwargs)
diff --git a/efl/elementary/configuration.pxd b/efl/elementary/configuration.pxd
new file mode 100644
index 0000000..8bed18b
--- /dev/null
+++ b/efl/elementary/configuration.pxd
@@ -0,0 +1,90 @@
1from efl.evas cimport Eina_Bool, Eina_List, const_Eina_List, Evas_Coord, Evas_Object, Evas_Font_Size
2from libc.string cimport const_char
3
4cdef extern from "Elementary.h":
5
6 #font
7 ctypedef struct Elm_Font_Overlay:
8 const_char *text_class
9 const_char *font
10 Evas_Font_Size size
11
12 #text
13 ctypedef struct Elm_Text_Class:
14 const_char *name
15 const_char *desc
16
17 # Config (py3: TODO)
18 Eina_Bool elm_config_save()
19 void elm_config_reload()
20 void elm_config_all_flush()
21 const_char * elm_config_profile_get()
22 const_char * elm_config_profile_dir_get(const_char *profile, Eina_Bool is_user)
23 void elm_config_profile_dir_free(const_char *p_dir)
24 Eina_List * elm_config_profile_list_get()
25 void elm_config_profile_list_free(Eina_List *l)
26 void elm_config_profile_set(const_char *profile)
27 Eina_Bool elm_config_scroll_bounce_enabled_get()
28 void elm_config_scroll_bounce_enabled_set(Eina_Bool enabled)
29 double elm_config_scroll_bounce_friction_get()
30 void elm_config_scroll_bounce_friction_set(double friction)
31 double elm_config_scroll_page_scroll_friction_get()
32 void elm_config_scroll_page_scroll_friction_set(double friction)
33 double elm_config_scroll_bring_in_scroll_friction_get()
34 void elm_config_scroll_bring_in_scroll_friction_set(double friction)
35 double elm_config_scroll_zoom_friction_get()
36 void elm_config_scroll_zoom_friction_set(double friction)
37 Eina_Bool elm_config_scroll_thumbscroll_enabled_get()
38 void elm_config_scroll_thumbscroll_enabled_set(Eina_Bool enabled)
39 unsigned int elm_config_scroll_thumbscroll_threshold_get()
40 void elm_config_scroll_thumbscroll_threshold_set(unsigned int threshold)
41 double elm_config_scroll_thumbscroll_momentum_threshold_get()
42 void elm_config_scroll_thumbscroll_momentum_threshold_set(double threshold)
43 double elm_config_scroll_thumbscroll_friction_get()
44 void elm_config_scroll_thumbscroll_friction_set(double friction)
45 double elm_config_scroll_thumbscroll_border_friction_get()
46 void elm_config_scroll_thumbscroll_border_friction_set(double friction)
47 double elm_config_scroll_thumbscroll_sensitivity_friction_get()
48 void elm_config_scroll_thumbscroll_sensitivity_friction_set(double friction)
49 double elm_config_longpress_timeout_get()
50 void elm_config_longpress_timeout_set(double longpress_timeout)
51 double elm_config_tooltip_delay_get()
52 Eina_Bool elm_config_tooltip_delay_set(double delay)
53 int elm_config_cursor_engine_only_get()
54 Eina_Bool elm_config_cursor_engine_only_set(int engine_only)
55 double elm_config_scale_get()
56 void elm_config_scale_set(double scale)
57 Eina_Bool elm_config_password_show_last_get()
58 void elm_config_password_show_last_set(Eina_Bool password_show_last)
59 double elm_config_password_show_last_timeout_get()
60 void elm_config_password_show_last_timeout_set(double password_show_last_timeout)
61 const_char * elm_config_engine_get()
62 void elm_config_engine_set(const_char *engine)
63 const_char * elm_config_preferred_engine_get()
64 void elm_config_preferred_engine_set(const_char *engine)
65 Eina_List * elm_config_text_classes_list_get()
66 void elm_config_text_classes_list_free(Eina_List *list)
67 Eina_List * elm_config_font_overlay_list_get()
68 void elm_config_font_overlay_set(const_char *text_class, const_char *font, Evas_Font_Size size)
69 void elm_config_font_overlay_unset(const_char *text_class)
70 void elm_config_font_overlay_apply()
71 Evas_Coord elm_config_finger_size_get()
72 void elm_config_finger_size_set(Evas_Coord size)
73 int elm_config_cache_flush_interval_get()
74 void elm_config_cache_flush_interval_set(int size)
75 Eina_Bool elm_config_cache_flush_enabled_get()
76 void elm_config_cache_flush_enabled_set(Eina_Bool enabled)
77 int elm_config_cache_font_cache_size_get()
78 void elm_config_cache_font_cache_size_set(int size)
79 int elm_config_cache_image_cache_size_get()
80 void elm_config_cache_image_cache_size_set(int size)
81 int elm_config_cache_edje_file_cache_size_get()
82 void elm_config_cache_edje_file_cache_size_set(int size)
83 int elm_config_cache_edje_collection_cache_size_get()
84 void elm_config_cache_edje_collection_cache_size_set(int size)
85 Eina_Bool elm_config_focus_highlight_enabled_get()
86 void elm_config_focus_highlight_enabled_set(Eina_Bool enable)
87 Eina_Bool elm_config_focus_highlight_animate_get()
88 void elm_config_focus_highlight_animate_set(Eina_Bool animate)
89 Eina_Bool elm_config_mirrored_get()
90 void elm_config_mirrored_set(Eina_Bool mirrored)
diff --git a/efl/elementary/configuration.pyx b/efl/elementary/configuration.pyx
new file mode 100644
index 0000000..7015eaf
--- /dev/null
+++ b/efl/elementary/configuration.pyx
@@ -0,0 +1,692 @@
1# Copyright (C) 2007-2013 various contributors (see AUTHORS)
2#
3# This file is part of Python-EFL.
4#
5# Python-EFL is free software; you can redistribute it and/or
6# modify it under the terms of the GNU Lesser General Public
7# License as published by the Free Software Foundation; either
8# version 2.1 of the License, or (at your option) any later version.
9#
10# Python-EFL is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13# Lesser General Public License for more details.
14#
15# You should have received a copy of the GNU Lesser General Public License
16# along with this Python-EFL. If not, see <http://www.gnu.org/licenses/>.
17#
18
19include "widget_header.pxi"
20
21from efl.eo cimport _strings_to_python
22
23cdef class Configuration(object):
24
25 """
26
27 Elementary configuration is formed by a set options bounded to a
28 given profile, like theme, "finger size", etc.
29
30 These are functions with which one synchronizes changes made to those
31 values to the configuration storing files, de facto. You most probably
32 don't want to use the functions in this group unless you're writing an
33 elementary configuration manager.
34
35 .. rubric:: Profiles
36
37 Profiles are pre-set options that affect the whole look-and-feel of
38 Elementary-based applications. There are, for example, profiles
39 aimed at desktop computer applications and others aimed at mobile,
40 touchscreen-based ones. You most probably don't want to use the
41 functions in this group unless you're writing an elementary
42 configuration manager.
43
44 .. rubric:: Elementary Scrolling
45
46 These set how scrollable views in Elementary widgets should behave on
47 user interaction.
48
49 .. rubric:: Password show last
50
51 Show last feature of password mode enables user to view the last input
52 entered for few seconds before masking it. These functions allow to set
53 this feature in password mode of entry widget and also allow to
54 manipulate the duration for which the input has to be visible.
55
56 .. rubric:: Elementary Engine
57
58 These are functions setting and querying which rendering engine
59 Elementary will use for drawing its windows' pixels.
60
61 The following are the available engines:
62
63 - "software_x11"
64 - "fb"
65 - "directfb"
66 - "software_16_x11"
67 - "software_8_x11"
68 - "xrender_x11"
69 - "opengl_x11"
70 - "software_gdi"
71 - "software_16_wince_gdi"
72 - "sdl"
73 - "software_16_sdl"
74 - "opengl_sdl"
75 - "buffer"
76 - "ews"
77 - "opengl_cocoa"
78 - "psl1ght"
79
80 """
81
82 def save(self):
83 """save()
84
85 Save back Elementary's configuration, so that it will persist on
86 future sessions.
87
88 This function will take effect -- thus, do I/O -- immediately. Use
89 it when you want to save all configuration changes at once. The
90 current configuration set will get saved onto the current profile
91 configuration file.
92
93 :return: ``True``, when successful. ``False``, otherwise.
94 :rtype: bool
95
96 """
97 return bool(elm_config_save())
98
99 def reload(self):
100 """reload()
101
102 Reload Elementary's configuration, bounded to current selected
103 profile.
104
105 Useful when you want to force reloading of configuration values for
106 a profile. If one removes user custom configuration directories,
107 for example, it will force a reload with system values instead.
108
109 :return: ``True``, when successful. ``False``, otherwise.
110 :rtype: bool
111
112 """
113 elm_config_reload()
114
115 def all_flush(self):
116 """all_flush()
117
118 Flush all config settings then apply those settings to all
119 applications using elementary on the current display."""
120 elm_config_all_flush()
121
122 property profile:
123 """Elementary's profile in use.
124
125 The global profile that is applied to all Elementary applications.
126
127 :type: string
128
129 """
130 def __get__(self):
131 return _ctouni(elm_config_profile_get())
132 def __set__(self, profile):
133 elm_config_profile_set(_cfruni(profile))
134
135 def profile_dir_get(self, profile, is_user):
136 """profile_dir_get(unicode profile, bool is_user)
137
138 Get an Elementary's profile directory path in the filesystem. One
139 may want to fetch a system profile's dir or a user one (fetched
140 inside $HOME).
141
142 :param profile: The profile's name
143 :type profile: unicode
144 :param is_user: Whether to lookup for a user profile (``True``)
145 or a system one (``False``)
146 :type is_user: bool
147 :return: The profile's directory path.
148 :rtype: string
149
150 """
151 return _ctouni(elm_config_profile_dir_get(_cfruni(profile), is_user))
152
153 property profile_list:
154 """Get Elementary's list of available profiles.
155
156 :type: tuple of strings
157
158 """
159 def __get__(self):
160 cdef Eina_List *lst = elm_config_profile_list_get()
161 return tuple(_strings_to_python(lst))
162
163 property scroll_bounce_enabled:
164 """Whether scrollers should bounce when they reach their
165 viewport's edge during a scroll.
166
167 :type: bool
168
169 """
170 def __get__(self):
171 return bool(elm_config_scroll_bounce_enabled_get())
172 def __set__(self, enabled):
173 elm_config_scroll_bounce_enabled_set(enabled)
174
175 property scroll_bounce_friction:
176 """The amount of inertia a scroller will impose at bounce animations.
177
178 :type: float
179
180 """
181 def __get__(self):
182 return elm_config_scroll_bounce_friction_get()
183 def __set__(self, friction):
184 elm_config_scroll_bounce_friction_set(friction)
185
186 property scroll_page_scroll_friction:
187 """The amount of inertia a **paged** scroller will impose at page
188 fitting animations.
189
190 :type: float
191
192 """
193 def __get__(self):
194 return elm_config_scroll_page_scroll_friction_get()
195 def __set__(self, friction):
196 elm_config_scroll_page_scroll_friction_set(friction)
197
198 property scroll_bring_in_scroll_friction:
199 """The amount of inertia a scroller will impose at region bring
200 animations.
201
202 :type: float
203
204 """
205 def __get__(self):
206 return elm_config_scroll_bring_in_scroll_friction_get()
207 def __set__(self, friction):
208 elm_config_scroll_bring_in_scroll_friction_set(friction)
209
210 property scroll_zoom_friction:
211 """The amount of inertia scrollers will impose at animations
212 triggered by Elementary widgets' zooming API.
213
214 :type: float
215
216 """
217 def __get__(self):
218 return elm_config_scroll_zoom_friction_get()
219 def __set__(self, friction):
220 elm_config_scroll_zoom_friction_set(friction)
221
222 property scroll_thumbscroll_enabled:
223 """Whether scrollers should be draggable from any point in their views.
224
225 .. note:: This is the default behavior for touch screens, in general.
226 .. note:: All other functions namespaced with "thumbscroll" will only
227 have effect if this mode is enabled.
228
229 :type: bool
230
231 """
232 def __get__(self):
233 return bool(elm_config_scroll_thumbscroll_enabled_get())
234 def __set__(self, enabled):
235 elm_config_scroll_thumbscroll_enabled_set(enabled)
236
237 property scroll_thumbscroll_threshold:
238 """The number of pixels one should travel while dragging a
239 scroller's view to actually trigger scrolling.
240
241 One would use higher values for touch screens, in general, because
242 of their inherent imprecision.
243
244 :type: int
245
246 """
247 def __get__(self):
248 return elm_config_scroll_thumbscroll_threshold_get()
249 def __set__(self, threshold):
250 elm_config_scroll_thumbscroll_threshold_set(threshold)
251
252 property scroll_thumbscroll_momentum_threshold:
253 """The minimum speed of mouse cursor movement which will trigger list
254 self scrolling animation after a mouse up event (pixels/second).
255
256 :type: float
257
258 """
259 def __get__(self):
260 return elm_config_scroll_thumbscroll_momentum_threshold_get()
261 def __set__(self, threshold):
262 elm_config_scroll_thumbscroll_momentum_threshold_set(threshold)
263
264 property scroll_thumbscroll_friction:
265 """The amount of inertia a scroller will impose at self scrolling
266 animations.
267
268 :type: float
269
270 """
271 def __get__(self):
272 return elm_config_scroll_thumbscroll_friction_get()
273 def __set__(self, friction):
274 elm_config_scroll_thumbscroll_friction_set(friction)
275
276 property scroll_thumbscroll_border_friction:
277 """The amount of lag between your actual mouse cursor dragging
278 movement and a scroller's view movement itself, while pushing it
279 into bounce state manually.
280
281 .. note:: parameter value will get bound to 0.0 - 1.0 interval, always
282
283 :type: float
284
285 """
286 def __get__(self):
287 return elm_config_scroll_thumbscroll_border_friction_get()
288 def __set__(self, friction):
289 elm_config_scroll_thumbscroll_border_friction_set(friction)
290
291 property scroll_thumbscroll_sensitivity_friction:
292<