summaryrefslogtreecommitdiff
path: root/doc/elementary/elementary.rst
blob: 2f2c987dec59ca642dcf5dca03c937543da33795 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
.. module:: efl.elementary

What is elementary?
*******************

Elementary is a  the high level toolkit based on the underlying efl
technologies (:doc:`Evas </evas/evas>`, :doc:`Edje </edje/edje>`,
:doc:`Ecore </ecore/ecore>`, etc...). It provide all the
widget you need to build a full application.

It is meant to make the programmers work almost brainless but give them lots
of flexibility.


Callbacks
*********

Widget callbacks
================

Widget callbacks are set with callback_*_add methods which take a callable,
and optional args, kwargs as data.

The callbacks have a signature of either::

    obj, *args, **kwargs

or::

    obj, event_info, *args, **kwargs


Event callbacks
===============

Event callbacks have signature of::

    object, source_object, event_type, event_info, *args, **kwargs


A sample Python Elementary program
**********************************

.. literalinclude:: ../../examples/elementary/test_win_dialog.py
    :language: python


API Reference
*************


Enumerations
============

.. _Elm_Object_Layer:

Object layers
-------------

.. versionadded:: 1.14

.. data:: ELM_OBJECT_LAYER_BACKGROUND

    where to place backgrounds

.. data:: ELM_OBJECT_LAYER_DEFAULT

    Evas_Object default layer (and thus for Elementary)

.. data:: ELM_OBJECT_LAYER_FOCUS

    where focus object visualization is

.. data:: ELM_OBJECT_LAYER_TOOLTIP

    where to show tooltips

.. data:: ELM_OBJECT_LAYER_CURSOR

    where to show cursors

.. data:: ELM_OBJECT_LAYER_LAST

    last layer known by Elementary


.. _Elm_Policy:

Policy types
------------

.. data:: ELM_POLICY_QUIT

    Under which circumstances the application should quit automatically.

.. data:: ELM_POLICY_EXIT

    Defines elm_exit() behaviour. (since 1.8)

.. data:: ELM_POLICY_THROTTLE

    Defines how throttling should work (since 1.8)


.. _Elm_Policy_Quit:

Quit policy types
-----------------

.. data:: ELM_POLICY_QUIT_NONE

    Never quit the application automatically

.. data:: ELM_POLICY_QUIT_LAST_WINDOW_CLOSED

    Quit when the application's last window is closed

.. data:: ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN

    Quit when the application's last window is hidden

    .. versionadded:: 1.15


.. _Elm_Policy_Exit:

Exit policy types
-----------------

Possible values for the ELM_POLICY_EXIT policy.

.. data:: ELM_POLICY_EXIT_NONE

    Just quit the main loop on exit().

.. data:: ELM_POLICY_EXIT_WINDOWS_DEL

    Delete all the windows after quitting the main loop.


.. _Elm_Policy_Throttle:

Throttle policy types
---------------------

Possible values for the #ELM_POLICY_THROTTLE policy.

.. data:: ELM_POLICY_THROTTLE_CONFIG

    Do whatever elementary config is configured to do.

.. data:: ELM_POLICY_THROTTLE_HIDDEN_ALWAYS

    Always throttle when all windows are no longer visible.

.. data:: ELM_POLICY_THROTTLE_NEVER

    Never throttle when windows are all hidden, regardless of config settings.


.. _Elm_Object_Multi_Select_Mode:

Object multi select policy values
---------------------------------

Possible values for the #ELM_OBJECT_MULTI_SELECT_MODE policy.

.. versionadded:: 1.18

.. data:: ELM_OBJECT_MULTI_SELECT_MODE_DEFAULT

    Default multiple select mode.

.. data:: ELM_OBJECT_MULTI_SELECT_MODE_WITH_CONTROL

    Disallow mutiple selection when clicked without control key pressed.


.. _Elm_Process_State:

Elm_Process_State
-----------------

.. data:: ELM_PROCESS_STATE_FOREGROUND

    The process is in a foreground/active/running state - work as normal.

    .. versionadded:: 1.12

.. data:: ELM_PROCESS_STATE_BACKGROUND

    The process is in the bacgkround, so you may want to stop animating,
    fetching data as often etc.

    .. versionadded:: 1.12


.. _Elm_Sys_Notify_Closed_Reason:

Notify close reasons
--------------------

The reason the notification was closed

.. data:: ELM_SYS_NOTIFY_CLOSED_EXPIRED

    The notification expired.

    .. versionadded:: 1.10

.. data:: ELM_SYS_NOTIFY_CLOSED_DISMISSED

    The notification was dismissed by the user.

    .. versionadded:: 1.10

.. data:: ELM_SYS_NOTIFY_CLOSED_REQUESTED

    The notification was closed by a call to CloseNotification method.

    .. versionadded:: 1.10

.. data:: ELM_SYS_NOTIFY_CLOSED_UNDEFINED

    Undefined/reserved reasons.

    .. versionadded:: 1.10


.. _Elm_Sys_Notify_Urgency:

Notify urgency levels
---------------------

Urgency levels of a notification

:see: :py:func:`sys_notify_send`

.. data:: ELM_SYS_NOTIFY_URGENCY_LOW

    Low

    .. versionadded:: 1.10

.. data:: ELM_SYS_NOTIFY_URGENCY_NORMAL

    Normal

    .. versionadded:: 1.10

.. data:: ELM_SYS_NOTIFY_URGENCY_CRITICAL

    Critical

    .. versionadded:: 1.10


.. _Elm_Glob_Match_Flags:

Glob matching
-------------

Glob matching bitfiled flags

.. data:: ELM_GLOB_MATCH_NO_ESCAPE

    Treat backslash as an ordinary character instead of escape.

    .. versionadded:: 1.11

.. data:: ELM_GLOB_MATCH_PATH

    Match a slash in string only with a slash in pattern and not by an
    asterisk (*) or a question mark (?) metacharacter, nor by a bracket
    expression ([]) containing a slash.

    .. versionadded:: 1.11

.. data:: ELM_GLOB_MATCH_PERIOD

    Leading period in string has to be matched exactly by a period in
    pattern. A period is considered to be leading if it is the first
    character in string, or if both ELM_GLOB_MATCH_PATH is set and the
    period immediately follows a slash.

    .. versionadded:: 1.11

.. data:: ELM_GLOB_MATCH_NOCASE

    The pattern is matched case-insensitively.

    .. versionadded:: 1.11


.. _General:

General
=======

General Elementary API. Functions that don't relate to
Elementary objects specifically.

Here are documented functions which init/shutdown the library,
that apply to generic Elementary objects, that deal with
configuration, et cetera.

.. autoclass:: EthumbConnect
.. autoclass:: ConfigAllChanged
.. autoclass:: PolicyChanged
.. autoclass:: ProcessBackground
.. autoclass:: ProcessForeground

.. autofunction:: on_ethumb_connect
.. autofunction:: on_config_all_changed
.. autofunction:: on_policy_changed
.. autofunction:: on_process_background
.. autofunction:: on_process_foreground

.. autofunction:: init
.. autofunction:: shutdown
.. autofunction:: run
.. autofunction:: exit

.. autofunction:: policy_set
.. autofunction:: policy_get
.. autofunction:: language_set
.. autofunction:: process_state_get


.. _Fingers:

Fingers
=======

Elementary is designed to be finger-friendly for touchscreens,
and so in addition to scaling for display resolution, it can
also scale based on finger "resolution" (or size). You can then
customize the granularity of the areas meant to receive clicks
on touchscreens.

Different profiles may have pre-set values for finger sizes.

.. autofunction:: coords_finger_size_adjust


.. _Caches:

Caches
======

These are functions which let one fine-tune some cache values for
Elementary applications, thus allowing for performance adjustments.

.. autofunction:: cache_all_flush


.. _Fonts:

Fonts
=====

These are functions dealing with font rendering, selection and the
like for Elementary applications. One might fetch which system
fonts are there to use and set custom fonts for individual classes
of UI items containing text (text classes).

.. autofunction:: font_properties_get
.. autofunction:: font_properties_free

.. autofunction:: font_fontconfig_name_get

.. autoclass:: FontProperties


.. _Debug:

Debug
=====

Don't use them unless you are sure.

.. autofunction:: object_tree_dump
.. autofunction:: object_tree_dot_dump


.. _Sys_Notify:

Sys Notify
==========

.. autofunction:: sys_notify_close
.. autofunction:: sys_notify_send

.. autofunction:: on_sys_notify_notification_closed
.. autofunction:: on_sys_notify_action_invoked

.. autoclass:: SysNotifyNotificationClosed
.. autoclass:: SysNotifyActionInvoked


Widgets
=======

.. toctree:: *
   :glob:
   :maxdepth: 1



Inheritance diagram
===================

.. inheritance-diagram::
    efl.elementary.Actionslider
    efl.elementary.Background
    efl.elementary.Box
    efl.elementary.Bubble
    efl.elementary.Button
    efl.elementary.Calendar
    efl.elementary.Check
    efl.elementary.Clock
    efl.elementary.Colorselector
    efl.elementary.Combobox
    efl.elementary.Configuration
    efl.elementary.Conformant
    efl.elementary.Ctxpopup
    efl.elementary.Datetime
    efl.elementary.Dayselector
    efl.elementary.Diskselector
    efl.elementary.Entry
    efl.elementary.Fileselector
    efl.elementary.FileselectorButton
    efl.elementary.FileselectorEntry
    efl.elementary.Flip
    efl.elementary.FlipSelector
    efl.elementary.Frame
    efl.elementary.Gengrid
    efl.elementary.Genlist
    efl.elementary.GestureLayer
    efl.elementary.Grid
    efl.elementary.Hover
    efl.elementary.Hoversel
    efl.elementary.Icon
    efl.elementary.Image
    efl.elementary.Index
    efl.elementary.InnerWindow
    efl.elementary.Label
    efl.elementary.Layout
    efl.elementary.List
    efl.elementary.Map
    efl.elementary.Mapbuf
    efl.elementary.Menu
    efl.elementary.MultiButtonEntry
    efl.elementary.Naviframe
    efl.elementary.Notify
    efl.elementary.Object
    efl.elementary.ObjectItem
    efl.elementary.Panel
    efl.elementary.Panes
    efl.elementary.Photo
    efl.elementary.Photocam
    efl.elementary.Plug
    efl.elementary.Popup
    efl.elementary.Progressbar
    efl.elementary.Radio
    efl.elementary.Scroller
    efl.elementary.SegmentControl
    efl.elementary.Separator
    efl.elementary.Slider
    efl.elementary.Slideshow
    efl.elementary.Spinner
    efl.elementary.Systray
    efl.elementary.Table
    efl.elementary.Theme
    efl.elementary.Thumb
    efl.elementary.Toolbar
    efl.elementary.Transit
    efl.elementary.Video
    efl.elementary.Web
    efl.elementary.Window
    :parts: 1