Commit Graph

71 Commits

Author SHA1 Message Date
Davide Andreoli 2a303f29e1 Follow recent Eo class names changes 2014-06-30 20:52:36 +02:00
Kai Huuhko 5045352434 Evas: Add NULL safety to SmartObject callbacks, exposes a BUG
Apparently the Python instance gets deleted before the smart hide/del
callbacks are called (by eo callback?).
2014-06-02 09:18:01 +03:00
Kai Huuhko 4639836d3e warnings-- 2014-06-01 15:37:41 +03:00
Davide Andreoli 209d232836 Added evas_font_path_global_* API 2014-05-10 18:52:09 +02:00
Kai Huuhko 6baa292951 Code cleanup: Remove unused exception instances
This also gets rid of the old style syntax.
2014-04-15 20:49:06 +03:00
Kai Huuhko 5fcc33b17a Code cleanup: More print statements => functions 2014-04-15 16:17:44 +03:00
Kai Huuhko 286fd64489 Code cleanup: Single-quoted docstrings
Triple double-quotes should be used for docstrings
2014-04-14 23:39:59 +03:00
Kai Huuhko 8109cd62b4 Code cleanup: Spelling and grammar fixes 2014-04-14 23:39:59 +03:00
Davide Andreoli b3eef73b0e s/2013/2014/g 2014-04-14 22:21:03 +02:00
Kai Huuhko 6408f8d318 Code cleanup: Print statements => functions 2014-04-14 02:32:16 +03:00
Kai Huuhko ae64f89ab5 Code cleanup: Trailing semicolon in the statement 2014-04-14 01:46:39 +03:00
Kai Huuhko 186e9f8c84 Code cleanup: Simplify chained comparison 2014-04-14 01:40:22 +03:00
Kai Huuhko d65101b24b Code cleanup: Unused/misplaced cimports 2014-04-14 00:51:19 +03:00
Kai Huuhko d6dc3a2045 Revert "Remove Python -> C string hacks"
A quote from Cython documentation:

"The other direction, i.e. automatic encoding to C strings, is only supported
for the ASCII codec (and the “default encoding”, which is runtime specific
and may or may not be ASCII). This is because CPython handles the memory
management in this case by keeping an encoded copy of the string alive
together with the original unicode string. Otherwise, there would be no way
to limit the lifetime of the encoded string in any sensible way, thus
rendering any attempt to extract a C string pointer from it a dangerous
endeavour."

Cython plays it safe and we can't live with ASCII-only; reverting to
our earlier "hacks" for string conversion.

This reverts commit b547ff2aa2.

Conflicts:
	efl/elementary/entry.pyx
	efl/elementary/object.pyx
2014-04-06 23:48:16 +03:00
Davide Andreoli 5c3ced421c docs: remove the signatures from the docstring, are now autimatically added by cython 2014-04-06 17:03:58 +02:00
Kai Huuhko b547ff2aa2 Remove Python -> C string hacks 2014-04-06 01:50:29 +03:00
Kai Huuhko adf70fa26f Remove const hacks
They were a workaround for limitations in Cython <0.18
2014-04-05 03:13:15 +03:00
Kai Huuhko b21fde2ba7 Silence warnings in Cython 0.20 2014-01-24 22:52:34 +02:00
Davide Andreoli cabc442195 Try to fix evas SmartObject
* implemented a test for smart obj
* remove comments from factories methods
* install the metaclass also for the Clipped one

Smart object implementation is still broken :(
Every object segfault on delete, the reason is
the eo del callback called BEFORE the smart
delete function. need to investigate better.
2014-01-06 12:40:59 +01:00
Kai Huuhko a9a944b17b Add Python 2.6 compatibility, disabled one API method in evas.Image
Image.image_data_memoryview_get was disabled.

This method can be added back once we figure out how to do conditional
compilation using Python version.

Using an evas.Image instance as a memoryview object should do the same
thing as the disabled method.
2013-12-28 18:35:39 +02:00
Kai Huuhko 6db1f9d0d6 Use uintptr_t instead of long or unsigned long for handling pointers. 2013-12-15 15:08:57 +02:00
Davide Andreoli 74244a5ac7 Python-EFL: fix the mess with the lgpl version.
Elm was lgpl3, COPYING was lgpl3, docs say lgpl3. So fix everything to be v3.
Also fix the COPING for Lesser: we must include gpl (in COPYING) AND lgpl (in COPYING.LESSER).
2013-12-07 17:54:58 +01:00
Kai Huuhko 7344ad361f API review: Documented changes, corrected str repr, clean up. 2013-12-07 08:09:04 +02:00
Kai Huuhko f946d87318 Documentation: Add sphinx directives for added/changed/deprecated stuff. 2013-12-06 17:39:13 +02:00
Kai Huuhko 4e4b8e2fea Documentation: Fix invalid references and minor issues. 2013-12-05 08:48:34 +02:00
Kai Huuhko bb5307ea20 Evas: Use _set_properties_from_keyword_args 2013-12-04 13:14:12 +02:00
Kai Huuhko 7f76a38ebf Evas: Size hint constants were inadvertantly imported as enums
Change them back to floating point values.
2013-12-01 09:44:23 +02:00
Kai Huuhko 3473e92379 Evas: Improve and correct the event string representations.
__repr__ should be used for object string representation, __str__ is
for converting something to a string value.
2013-11-26 02:32:22 +02:00
Kai Huuhko b5ecf69887 Evas: py3k compatibility fix for events' modifier_is_set method 2013-11-25 17:10:22 +02:00
Kai Huuhko 225f061b05 Optimize exception propagation in several hot/time critical cases.
With "except *" a call is made to PyErr_Occurred on each call of a
function.

Adding a return value where possible and using an appropriate exception
value calls PyErr_Occurred only when that value is returned, ie.
an exception has been raised.

cdef void example_func() except *: <- PyErr_Occurred called on each call
cdef int example_func() except 0: <- PyErr_Occurred called only when
	an exception has been raised (the function thus returns 0)
2013-11-10 08:47:21 +02:00
Kai Huuhko d623a30032 Follow Eo class name changes.
See commits c7addf40839c85cf2568f322a34220e8082d26f0 and
7b10fdb8f39c3b36f575dd22d26a1efe6ecd28ec
2013-11-07 16:45:02 +02:00
Kai Huuhko 9db6938f1e Use types in objects' callback list definitions to simplify access.
Also use a more descriptive name for Evas' event callback list.
2013-11-07 11:35:03 +02:00
Kai Huuhko b05187b52e Evas.Image: Update to new Python buffer API, fix doc issues.
Needs testing.
2013-11-07 11:30:02 +02:00
Kai Huuhko 05cd30a2e3 Evas.SmartObject: Add a test from old bindings, fix trivial doc issues. 2013-11-06 05:03:41 +02:00
Kai Huuhko 4ca341d0d5 Evas.SmartObject: Basic object should be functional again.
At least the simple test passes.

Needs more work and tests.
2013-11-05 18:12:53 +02:00
Kai Huuhko 41f0aeff67 Reduce usage of cpdef.
It was intended to make things easier but created problems with
inheritance and Evas SmartObject object customization.
2013-11-05 03:18:36 +02:00
Kai Huuhko 1e40a8f5bb Simplify and correct string representation functions.
Calling str() uses __repr__ when __str__ is not found.

__repr__ should return a string with angle brackets when the object
cannot be reconstructed with exec(repr(obj)).
2013-10-28 18:55:58 +02:00
Kai Huuhko 9413b157b9 Evas/Eo: Fix couple of crashes related to Canvas cb's and Eo 2013-10-03 06:19:04 +03:00
Kai Huuhko 5f4a46da4b Move common conversion functions from efl.eo to efl.utils.conversions 2013-10-01 04:56:28 +03:00
Kai Huuhko 6587b5be67 Rename efl.pxd to efl.eina.pxd 2013-09-30 07:26:35 +03:00
Kai Huuhko 8b58ef24ea Documentation formatting fixes. 2013-08-10 08:34:46 +03:00
Kai Huuhko 0fc1e2bd98 Evas: Remove the unnecessary value assignments for enums. 2013-05-30 16:53:35 +03:00
Davide Andreoli 9ecda02403 Python-EFL: be consistent in file naming 2013-05-29 22:34:39 +02:00
Kai Huuhko fd7322fcda Disallow instantiating the base object classes. 2013-04-22 20:20:21 +03:00
Kai Huuhko 898f32371a Sed to the rescue. 2013-04-22 20:20:20 +03:00
Kai Huuhko 40e76e001a Evas: Add Grid. 2013-04-22 20:12:27 +03:00
Kai Huuhko 77ed60ae26 Evas: Add some missing API to Object. 2013-04-22 20:12:27 +03:00
Kai Huuhko 10635266ff Evas: Add Table. 2013-04-22 20:12:27 +03:00
Kai Huuhko b7abe5f423 Evas: Improve documentation for Box, Line, Map, Textblock, Text,
Textgrid, Rect.

Comment out broken Map properties.
2013-04-22 20:12:27 +03:00
Kai Huuhko 5685396582 Evas: Add some missing bits to Image. 2013-04-22 20:12:26 +03:00