diff -Nru python-efl-1.17.99~201312040125/COPYING python-efl-1.8.2~201401231220/COPYING --- python-efl-1.17.99~201312040125/COPYING 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/COPYING 2014-01-18 12:24:01.000000000 +0000 @@ -1,165 +1,674 @@ - GNU LESSER GENERAL PUBLIC LICENSE + GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. + Preamble - This version of the GNU Lesser General Public License incorporates -the terms and conditions of version 3 of the GNU General Public -License, supplemented by the additional permissions listed below. - - 0. Additional Definitions. - - As used herein, "this License" refers to version 3 of the GNU Lesser -General Public License, and the "GNU GPL" refers to version 3 of the GNU -General Public License. - - "The Library" refers to a covered work governed by this License, -other than an Application or a Combined Work as defined below. - - An "Application" is any work that makes use of an interface provided -by the Library, but which is not otherwise based on the Library. -Defining a subclass of a class defined by the Library is deemed a mode -of using an interface provided by the Library. - - A "Combined Work" is a work produced by combining or linking an -Application with the Library. The particular version of the Library -with which the Combined Work was made is also called the "Linked -Version". - - The "Minimal Corresponding Source" for a Combined Work means the -Corresponding Source for the Combined Work, excluding any source code -for portions of the Combined Work that, considered in isolation, are -based on the Application, and not on the Linked Version. - - The "Corresponding Application Code" for a Combined Work means the -object code and/or source code for the Application, including any data -and utility programs needed for reproducing the Combined Work from the -Application, but excluding the System Libraries of the Combined Work. - - 1. Exception to Section 3 of the GNU GPL. - - You may convey a covered work under sections 3 and 4 of this License -without being bound by section 3 of the GNU GPL. - - 2. Conveying Modified Versions. - - If you modify a copy of the Library, and, in your modifications, a -facility refers to a function or data to be supplied by an Application -that uses the facility (other than as an argument passed when the -facility is invoked), then you may convey a copy of the modified -version: - - a) under this License, provided that you make a good faith effort to - ensure that, in the event an Application does not supply the - function or data, the facility still operates, and performs - whatever part of its purpose remains meaningful, or - - b) under the GNU GPL, with none of the additional permissions of - this License applicable to that copy. - - 3. Object Code Incorporating Material from Library Header Files. - - The object code form of an Application may incorporate material from -a header file that is part of the Library. You may convey such object -code under terms of your choice, provided that, if the incorporated -material is not limited to numerical parameters, data structure -layouts and accessors, or small macros, inline functions and templates -(ten or fewer lines in length), you do both of the following: - - a) Give prominent notice with each copy of the object code that the - Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the object code with a copy of the GNU GPL and this license - document. - - 4. Combined Works. - - You may convey a Combined Work under terms of your choice that, -taken together, effectively do not restrict modification of the -portions of the Library contained in the Combined Work and reverse -engineering for debugging such modifications, if you also do each of -the following: - - a) Give prominent notice with each copy of the Combined Work that - the Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the Combined Work with a copy of the GNU GPL and this license - document. - - c) For a Combined Work that displays copyright notices during - execution, include the copyright notice for the Library among - these notices, as well as a reference directing the user to the - copies of the GNU GPL and this license document. - - d) Do one of the following: - - 0) Convey the Minimal Corresponding Source under the terms of this - License, and the Corresponding Application Code in a form - suitable for, and under terms that permit, the user to - recombine or relink the Application with a modified version of - the Linked Version to produce a modified Combined Work, in the - manner specified by section 6 of the GNU GPL for conveying - Corresponding Source. - - 1) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (a) uses at run time - a copy of the Library already present on the user's computer - system, and (b) will operate properly with a modified version - of the Library that is interface-compatible with the Linked - Version. - - e) Provide Installation Information, but only if you would otherwise - be required to provide such information under section 6 of the - GNU GPL, and only to the extent that such information is - necessary to install and execute a modified version of the - Combined Work produced by recombining or relinking the - Application with a modified version of the Linked Version. (If - you use option 4d0, the Installation Information must accompany - the Minimal Corresponding Source and Corresponding Application - Code. If you use option 4d1, you must provide the Installation - Information in the manner specified by section 6 of the GNU GPL - for conveying Corresponding Source.) - - 5. Combined Libraries. - - You may place library facilities that are a work based on the -Library side by side in a single library together with other library -facilities that are not Applications and are not covered by this -License, and convey such a combined library under terms of your -choice, if you do both of the following: - - a) Accompany the combined library with a copy of the same work based - on the Library, uncombined with any other library facilities, - conveyed under the terms of this License. - - b) Give prominent notice with the combined library that part of it - is a work based on the Library, and explaining where to find the - accompanying uncombined form of the same work. - - 6. Revised Versions of the GNU Lesser General Public License. - - The Free Software Foundation may publish revised and/or new versions -of the GNU Lesser General Public License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the -Library as you received it specifies that a certain numbered version -of the GNU Lesser General Public License "or any later version" -applies to it, you have the option of following the terms and -conditions either of that published version or of any later version -published by the Free Software Foundation. If the Library as you -received it does not specify a version number of the GNU Lesser -General Public License, you may choose any version of the GNU Lesser -General Public License ever published by the Free Software Foundation. - - If the Library as you received it specifies that a proxy can decide -whether future versions of the GNU Lesser General Public License shall -apply, that proxy's public statement of acceptance of any version is -permanent authorization for you to choose that version for the -Library. + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff -Nru python-efl-1.17.99~201312040125/COPYING.LESSER python-efl-1.8.2~201401231220/COPYING.LESSER --- python-efl-1.17.99~201312040125/COPYING.LESSER 1970-01-01 00:00:00.000000000 +0000 +++ python-efl-1.8.2~201401231220/COPYING.LESSER 2014-01-18 12:24:01.000000000 +0000 @@ -0,0 +1,165 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. diff -Nru python-efl-1.17.99~201312040125/INSTALL python-efl-1.8.2~201401231220/INSTALL --- python-efl-1.17.99~201312040125/INSTALL 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/INSTALL 2014-01-18 12:24:01.000000000 +0000 @@ -2,8 +2,8 @@ 1. REQUIREMENTS: ---------------- - * Python 2.7 or higher (http://www.python.org/) - - Tested with Python 2.7 / 3.2 + * Python 2.6 or higher (http://www.python.org/) + - Tested with Python 2.6 / 2.7 / 3.2 / 3.3 * Cython 0.17.0 or higher (http://cython.org/) - Tested with Cython 0.17.1 @@ -89,6 +89,8 @@ tests or use the 00_run_all_tests.py in each folder or even in the tests/ base dir to run all the tests at once. + Python 2.7 is required for running the tests. + The scripts in examples/ folder must be run by the user as they require user interaction. diff -Nru python-efl-1.17.99~201312040125/MANIFEST.in python-efl-1.8.2~201401231220/MANIFEST.in --- python-efl-1.17.99~201312040125/MANIFEST.in 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/MANIFEST.in 2014-01-18 12:24:01.000000000 +0000 @@ -1,5 +1,7 @@ -include README INSTALL COPYING AUTHORS +include README INSTALL COPYING COPYING.LESSER AUTHORS changes.html recursive-include efl *.c *.h +graft tests +recursive-exclude tests *.pyc graft examples recursive-exclude examples *.pyc graft doc diff -Nru python-efl-1.17.99~201312040125/README python-efl-1.8.2~201401231220/README --- python-efl-1.17.99~201312040125/README 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/README 2014-01-18 12:24:01.000000000 +0000 @@ -1,7 +1,7 @@ ------------------ -PYTHON-EFL 1.7.99 ------------------ +---------------- +PYTHON-EFL 1.8.1 +---------------- EFL is a collection of libraries for handling many common tasks a developer man have such as data structures, communication, rendering, @@ -16,6 +16,8 @@ CHANGES FROM 1.7 to 1.8 ======================= +See also changes.html. + * added efl container package * ecore.file.Download => efl.ecore.FileDownload * edje.edit.EdjeEdit => efl.edje_edit.EdjeEdit diff -Nru python-efl-1.17.99~201312040125/TODO python-efl-1.8.2~201401231220/TODO --- python-efl-1.17.99~201312040125/TODO 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/TODO 2014-01-18 12:24:01.000000000 +0000 @@ -1,50 +1,20 @@ BUGS ==== +* EdjeEdit: PartState API does not work +* Elm.Map: overlays_show segfaults, scrollers in examples are jumpy -* EdjeEdit: PartState API does not work (edje edit is disabled for now) -* Edje.External: The unit test fails (marked as known failure in unittest) -* Elm.Map: overlays_show segfaults, scrollers in examples jump when menu opens -* Bad binaries produced when build environment is invalid (T504) +Failing unit tests +------------------ +* tests.edje.test_04_edit: testPartEffect (marked as known failure) +* tests.edje.test_04_edit: testGroupDel (skipped, segfault) +* tests.edje.test_04_edit: testExternal (skipped, TODO) - -TODO -==== - -* Improve, review and document our use of exceptions -* Check that README has all changes listed -* Overall API review - -Elementary ----------- - -* Review the new container type object item system. -* Get rid of enums in __init__.py - - -TODO (optional) -=============== - -* Use more _set_properties_from_keyword_args, replace Evas' _set_common_params - with it? +TODO (after 1.8) +================ * update links and text on: http://www.freedesktop.org/wiki/Software/DBusBindings (requires fd.org shell account?) -* Add more documentation for callbacks, events, etc. -* Check for missing Eo type mappings - -Elm ---- -* Images missing in the documentation: - - datetime - - video - - web - - window ? - - -TODO (future) -============= - * Review the internal functions and name them consistently * Evas: SmartObject needs testing, work. Make it inheritable by extension classes? @@ -53,6 +23,8 @@ * include python-ethumb * edje: complete the unit tests * Initial Evas GL support (for Elm) +* Add more documentation for callbacks, events, etc. +* Check for missing Eo type mappings Elm --- @@ -60,3 +32,9 @@ * Automate compilation of the example edje files. * Add more examples * Prefs +* GLView +* Images missing in the documentation: + - datetime + - video + - web + - window ? diff -Nru python-efl-1.17.99~201312040125/changes.html python-efl-1.8.2~201401231220/changes.html --- python-efl-1.17.99~201312040125/changes.html 1970-01-01 00:00:00.000000000 +0000 +++ python-efl-1.8.2~201401231220/changes.html 2014-01-18 12:24:01.000000000 +0000 @@ -0,0 +1,997 @@ + + + + + Changes in Version 1.8 — Python Bindings for Enlightenment Foundation Libraries 1.8.0 + + + +
+
+

Automatically generated list of changes in version 1.8

+ +

efl

+ +
    +
  • Module level: added: New in version 1.8.
  • + +
  • Module level: added: New in version 1.8: Loggers
  • + +
  • Module level: added: New in version 1.8: Using keyword arguments to set properties
  • +
+ + +

efl.ecore

+ +
    +
  • FileMonitor: added: New in version 1.8.
  • + +
  • Poller: added: New in version 1.8.
  • + +
  • Timer.delay: added: New in version 1.8.
  • + +
  • Timer.pending: added: New in version 1.8.
  • + +
  • Timer.reset: added: New in version 1.8.
  • +
+ + +

efl.edje

+ +
    +
  • Edje.mirrored: added: New in version 1.8.
  • + +
  • Edje.preload: added: New in version 1.8.
  • + +
  • Edje.scale: added: New in version 1.8.
  • + +
  • Edje.size_min_restricted_calc: added: New in version 1.8.
  • + +
  • Edje.update_hints: added: New in version 1.8.
  • +
+ + +

efl.elementary.bubble

+ +
    +
  • Bubble.callback_focused_add: added: New in version 1.8.
  • + +
  • Bubble.callback_unfocused_add: added: New in version 1.8.
  • +
+ + +

efl.elementary.button

+ +
    +
  • Button.callback_focused_add: added: New in version 1.8.
  • + +
  • Button.callback_unfocused_add: added: New in version 1.8.
  • +
+ + +

efl.elementary.calendar_elm

+ +
    +
  • Calendar.callback_focused_add: added: New in version 1.8.
  • + +
  • Calendar.callback_unfocused_add: added: New in version 1.8.
  • + +
  • Calendar.displayed_time: added: New in version 1.8.
  • + +
  • Calendar.selectable: added: New in version 1.8.
  • + +
  • Calendar.selected_time: changed: Changed in version 1.8: Returns None when the selected date cannot be fetched.
  • +
+ + +

efl.elementary.check

+ +
    +
  • Check.callback_focused_add: added: New in version 1.8.
  • + +
  • Check.callback_unfocused_add: added: New in version 1.8.
  • +
+ + +

efl.elementary.clock

+ +
    +
  • Clock.callback_focused_add: added: New in version 1.8.
  • + +
  • Clock.callback_unfocused_add: added: New in version 1.8.
  • +
+ + +

efl.elementary.colorselector

+ +
    +
  • Colorselector.callback_focused_add: added: New in version 1.8.
  • + +
  • Colorselector.callback_unfocused_add: added: New in version 1.8.
  • +
+ + +

efl.elementary.configuration

+ +
    +
  • Configuration.clouseau_enabled: added: New in version 1.8.
  • + +
  • Configuration.glayer_double_tap_timeout: added: New in version 1.8.
  • + +
  • Configuration.glayer_long_tap_start_timeout: added: New in version 1.8.
  • + +
  • Configuration.indicator_service_get: added: New in version 1.8.
  • + +
  • Configuration.scroll_thumbscroll_acceleration_threshold: added: New in version 1.8.
  • + +
  • Configuration.scroll_thumbscroll_acceleration_time_limit: added: New in version 1.8.
  • + +
  • Configuration.scroll_thumbscroll_acceleration_weight: added: New in version 1.8.
  • + +
  • Configuration.scroll_thumbscroll_border_friction: added: New in version 1.8.
  • + +
  • Configuration.scroll_thumbscroll_flick_distance_tolerance: added: New in version 1.8.
  • + +
  • Configuration.scroll_thumbscroll_hold_threshold: added: New in version 1.8.
  • + +
  • Configuration.scroll_thumbscroll_min_friction: added: New in version 1.8.
  • + +
  • Configuration.selection_unfocused_clear: added: New in version 1.8.
  • + +
  • Configuration.softcursor_mode: added: New in version 1.8.
  • +
+ + +

efl.elementary.conformant

+ +
    +
  • Conformant.callback_clipboard_state_off_add: added: New in version 1.8.
  • + +
  • Conformant.callback_clipboard_state_on_add: added: New in version 1.8.
  • + +
  • Conformant.callback_virtualkeypad_state_off_add: added: New in version 1.8.
  • + +
  • Conformant.callback_virtualkeypad_state_on_add: added: New in version 1.8.
  • +
+ + +

efl.elementary.ctxpopup

+ +
    +
  • Ctxpopup: changed: Changed in version 1.8: Inherits from LayoutClass
  • + +
  • Ctxpopup.callback_focused_add: added: New in version 1.8.
  • + +
  • Ctxpopup.callback_unfocused_add: added: New in version 1.8.
  • +
+ + +

efl.elementary.datetime_elm

+ +
    +
  • Datetime.callback_focused_add: added: New in version 1.8.
  • + +
  • Datetime.callback_unfocused_add: added: New in version 1.8.
  • + +
  • Datetime.value: changed: Changed in version 1.8: Returns None when the value cannot be fetched, raise RuntimeError when setting the value failed.
  • + +
  • Datetime.value_max: changed: Changed in version 1.8: Returns None when the max value cannot be fetched, raise RuntimeError when setting the max value failed.
  • + +
  • Datetime.value_min: changed: Changed in version 1.8: Returns None when the min value cannot be fetched, raise RuntimeError when setting the min value failed.
  • +
+ + +

efl.elementary.dayselector

+ +
    +
  • Dayselector.weekdays_names: added: New in version 1.8.
  • +
+ + +

efl.elementary.diskselector

+ +
    +
  • Diskselector.bounce: deprecated: Deprecated since version 1.8: You should combine with Scrollable class instead.
  • + +
  • Diskselector.callback_focused_add: added: New in version 1.8.
  • + +
  • Diskselector.callback_unfocused_add: added: New in version 1.8.
  • + +
  • Diskselector.scroller_policy: deprecated: Deprecated since version 1.8: You should combine with Scrollable class instead.
  • +
+ + +

efl.elementary.entry

+ +
    +
  • Entry: changed: Changed in version 1.8: Inherits from LayoutClass.
  • + +
  • Entry.autocapital_type: added: New in version 1.8.
  • + +
  • Entry.bounce: deprecated: Deprecated since version 1.8: You should combine with Scrollable class instead.
  • + +
  • Entry.context_menu_item_add: added: New in version 1.8.
  • + +
  • Entry.cursor_geometry_get: changed: Changed in version 1.8: Returns None when the cursor geometry cannot be fetched.
  • + +
  • Entry.end_visible: added: New in version 1.8.
  • + +
  • Entry.file: changed: Changed in version 1.8: Raise RuntimeError when setting the file fails, instead of returning a bool.
  • + +
  • Entry.input_panel_layout_variation: added: New in version 1.8.
  • + +
  • Entry.markup_filter_append: added: New in version 1.8.
  • + +
  • Entry.markup_filter_prepend: added: New in version 1.8.
  • + +
  • Entry.markup_filter_remove: added: New in version 1.8.
  • + +
  • Entry.markup_to_utf8: deprecated: Deprecated since version 1.8: Use the module level markup_to_utf8() method instead.
  • + +
  • Entry.scrollbar_policy: deprecated: Deprecated since version 1.8: You should combine with Scrollable class instead.
  • + +
  • Entry.text_style_user_peek: added: New in version 1.8.
  • + +
  • Entry.text_style_user_pop: added: New in version 1.8.
  • + +
  • Entry.text_style_user_push: added: New in version 1.8.
  • + +
  • Entry.utf8_to_markup: deprecated: Deprecated since version 1.8: Use the module level utf8_to_markup() method instead.
  • + +
  • EntryContextMenuItem: added: New in version 1.8.
  • + +
  • EntryContextMenuItem.icon: added: New in version 1.8.
  • + +
  • EntryContextMenuItem.label: added: New in version 1.8.
  • + +
  • Entry_markup_to_utf8: deprecated: Deprecated since version 1.8: Use markup_to_utf8() instead.
  • + +
  • Entry_utf8_to_markup: deprecated: Deprecated since version 1.8: Use utf8_to_markup() instead.
  • +
+ + +

efl.elementary.fileselector

+ +
    +
  • Fileselector.filters_clear: added: New in version 1.8.
  • + +
  • Fileselector.hidden_visible: added: New in version 1.8.
  • + +
  • Fileselector.mime_types_filter_append: added: New in version 1.8.
  • + +
  • Fileselector.multi_select: added: New in version 1.8.
  • + +
  • Fileselector.selected_paths: added: New in version 1.8.
  • +
+ + +

efl.elementary.fileselector_entry

+ +
    +
  • FileselectorEntry: changed: Changed in version 1.8: Inherits from LayoutClass.
  • +
+ + +

efl.elementary.flip

+ +
    +
  • Flip.flip_go_to: added: New in version 1.8.
  • +
+ + +

efl.elementary.flipselector

+ +
    +
  • FlipSelector.callback_focused_add: added: New in version 1.8.
  • + +
  • FlipSelector.callback_unfocused_add: added: New in version 1.8.
  • +
+ + +

efl.elementary.general

+ +
    +
  • cache_all_flush: added: New in version 1.8.
  • + +
  • font_fontconfig_name_get: added: New in version 1.8.
  • + +
  • font_properties_free: added: New in version 1.8.
  • + +
  • font_properties_get: added: New in version 1.8.
  • + +
  • object_tree_dot_dump: added: New in version 1.8.
  • + +
  • object_tree_dump: added: New in version 1.8.
  • +
+ + +

efl.elementary.gengrid

+ +
    +
  • Gengrid.at_xy_item_get: added: New in version 1.8.
  • + +
  • Gengrid.bounce: deprecated: Deprecated since version 1.8: You should combine with Scrollable class instead.
  • + +
  • Gengrid.callback_focused_add: added: New in version 1.8.
  • + +
  • Gengrid.callback_unfocused_add: added: New in version 1.8.
  • + +
  • Gengrid.nth_item_get: added: New in version 1.8.
  • + +
  • Gengrid.scroller_policy: deprecated: Deprecated since version 1.8: You should combine with Scrollable class instead.
  • + +
  • GengridItem.append_to: added: New in version 1.8.
  • + +
  • GengridItem.insert_after: added: New in version 1.8.
  • + +
  • GengridItem.insert_before: added: New in version 1.8.
  • + +
  • GengridItem.item_tooltip_unset: deprecated: Deprecated since version 1.8: Use tooltip_unset() instead
  • + +
  • GengridItem.prepend_to: added: New in version 1.8.
  • + +
  • GengridItem.sorted_insert: added: New in version 1.8.
  • + +
  • GengridItemClass.free: added: New in version 1.8.
  • + +
  • GengridItemClass.ref: added: New in version 1.8.
  • + +
  • GengridItemClass.unref: added: New in version 1.8.
  • +
+ + +

efl.elementary.genlist

+ +
    +
  • Genlist.bounce: deprecated: Deprecated since version 1.8: You should combine with Scrollable class instead.
  • + +
  • Genlist.callback_focused_add: added: New in version 1.8.
  • + +
  • Genlist.callback_unfocused_add: added: New in version 1.8.
  • + +
  • Genlist.focus_on_selection: added: New in version 1.8.
  • + +
  • Genlist.nth_item_get: added: New in version 1.8.
  • + +
  • Genlist.scroller_policy: deprecated: Deprecated since version 1.8: You should combine with Scrollable class instead.
  • + +
  • GenlistItemClass.free: added: New in version 1.8.
  • + +
  • GenlistItemClass.ref: added: New in version 1.8.
  • + +
  • GenlistItemClass.unref: added: New in version 1.8.
  • +
+ + +

efl.elementary.gesture_layer

+ +
    +
  • GestureLayer.attach: changed: Changed in version 1.8: Raise RuntimeError on failure, instead of returning a bool
  • + +
  • GestureLayer.continues_enable: added: New in version 1.8.
  • + +
  • GestureLayer.double_tap_timeout: added: New in version 1.8.
  • + +
  • GestureLayer.flick_time_limit_ms: added: New in version 1.8.
  • + +
  • GestureLayer.line_angular_tolerance: added: New in version 1.8.
  • + +
  • GestureLayer.line_distance_tolerance: added: New in version 1.8.
  • + +
  • GestureLayer.line_min_length: added: New in version 1.8.
  • + +
  • GestureLayer.long_tap_start_timeout: added: New in version 1.8.
  • + +
  • GestureLayer.rotate_angular_tolerance: added: New in version 1.8.
  • + +
  • GestureLayer.tap_finger_size: added: New in version 1.8.
  • + +
  • GestureLayer.zoom_distance_tolerance: added: New in version 1.8.
  • + +
  • GestureLayer.zoom_finger_factor: added: New in version 1.8.
  • + +
  • GestureLayer.zoom_wheel_factor: added: New in version 1.8.
  • +
+ + +

efl.elementary.hover

+ +
    +
  • Hover.callback_focused_add: added: New in version 1.8.
  • + +
  • Hover.callback_unfocused_add: added: New in version 1.8.
  • +
+ + +

efl.elementary.icon

+ +
    +
  • Icon.standard: changed: Changed in version 1.8: Raises RuntimeWarning when setting the standard name fails, instead of returning a bool.
  • +
+ + +

efl.elementary.image

+ +
    +
  • Image.file: changed: Changed in version 1.8: Raises RuntimeError when setting the file fails, instead of returning a bool.
  • + +
  • ImageErrorInfo: added: New in version 1.8.
  • + +
  • ImageProgressInfo: added: New in version 1.8.
  • +
+ + +

efl.elementary.index

+ +
    +
  • Index.callback_focused_add: added: New in version 1.8.
  • + +
  • Index.callback_unfocused_add: added: New in version 1.8.
  • + +
  • Index.delay_change_time: added: New in version 1.8.
  • + +
  • Index.item_find: deprecated: Deprecated since version 1.8: Broken, don't use.
  • + +
  • Index.omit_enabled: added: New in version 1.8.
  • +
+ + +

efl.elementary.label

+ +
    +
  • Label.slide: deprecated: Deprecated since version 1.8: Use slide_mode instead.
  • + +
  • Label.slide_get: deprecated: Deprecated since version 1.8: Use slide_mode instead.
  • + +
  • Label.slide_go: added: New in version 1.8.
  • + +
  • Label.slide_mode: added: New in version 1.8.
  • + +
  • Label.slide_set: deprecated: Deprecated since version 1.8: Use slide_mode instead.
  • +
+ + +

efl.elementary.layout_class

+ +
    +
  • LayoutClass.box_append: changed: Changed in version 1.8: Raises RuntimeError if adding the child fails
  • + +
  • LayoutClass.box_insert_at: changed: Changed in version 1.8: Raises RuntimeError if adding the child fails
  • + +
  • LayoutClass.box_insert_before: changed: Changed in version 1.8: Raises RuntimeError if adding the child fails
  • + +
  • LayoutClass.box_prepend: changed: Changed in version 1.8: Raises RuntimeError if adding the child fails
  • + +
  • LayoutClass.box_remove_all: changed: Changed in version 1.8: Raises RuntimeError if removing the children fails
  • + +
  • LayoutClass.content_set: changed: Changed in version 1.8: Raises RuntimeError if setting the content fails.
  • + +
  • LayoutClass.edje_object_can_access: added: New in version 1.8.
  • + +
  • LayoutClass.file: changed: Changed in version 1.8: Raises RuntimeError if setting the file fails
  • + +
  • LayoutClass.freeze: added: New in version 1.8.
  • + +
  • LayoutClass.part_cursor_engine_only_set: changed: Changed in version 1.8: Raises RuntimeError if setting the value fails
  • + +
  • LayoutClass.part_cursor_set: changed: Changed in version 1.8: Raises RuntimeError if setting the cursor fails
  • + +
  • LayoutClass.part_cursor_style_set: changed: Changed in version 1.8: Raises RuntimeError if setting the cursor style fails
  • + +
  • LayoutClass.part_cursor_unset: changed: Changed in version 1.8: Raises RuntimeError if unsetting the cursor fails
  • + +
  • LayoutClass.table_clear: changed: Changed in version 1.8: Raises RuntimeError if clearing the table fails
  • + +
  • LayoutClass.table_pack: changed: Changed in version 1.8: Raises RuntimeError if adding the child fails
  • + +
  • LayoutClass.text_set: changed: Changed in version 1.8: Raises RuntimeError if setting the text fails
  • + +
  • LayoutClass.thaw: added: New in version 1.8.
  • + +
  • LayoutClass.theme: changed: Changed in version 1.8: Raises RuntimeError if setting the theme fails
  • +
+ + +

efl.elementary.list

+ +
    +
  • List.at_xy_item_get: added: New in version 1.8.
  • + +
  • List.bounce: deprecated: Deprecated since version 1.8: You should combine with Scrollable class instead.
  • + +
  • List.callback_focused_add: added: New in version 1.8.
  • + +
  • List.callback_unfocused_add: added: New in version 1.8.
  • + +
  • List.focus_on_selection: added: New in version 1.8.
  • + +
  • List.scroller_policy: deprecated: Deprecated since version 1.8: You should combine with Scrollable class instead.
  • +
+ + +

efl.elementary.map

+ +
    +
  • Map.bounce: deprecated: Deprecated since version 1.8: You should combine with Scrollable class instead.
  • + +
  • Map.callback_focused_add: added: New in version 1.8.
  • + +
  • Map.callback_unfocused_add: added: New in version 1.8.
  • + +
  • Map.scroller_policy: deprecated: Deprecated since version 1.8: You should combine with Scrollable class instead.
  • +
+ + +

efl.elementary.mapbuf

+ +
    +
  • Mapbuf.auto: added: New in version 1.8.
  • +
+ + +

efl.elementary.menu

+ +
    +
  • Menu.callback_dismissed_add: added: New in version 1.8.
  • + +
  • MenuItem.subitems: added: New in version 1.8: Calling del on this property clears the subitems
  • +
+ + +

efl.elementary.multibuttonentry

+ +
    +
  • MultiButtonEntry.editable: added: New in version 1.8.
  • +
+ + +

efl.elementary.naviframe

+ +
    +
  • Naviframe.callback_focused_add: added: New in version 1.8.
  • + +
  • Naviframe.callback_unfocused_add: added: New in version 1.8.
  • + +
  • NaviframeItem.item_pop_to: deprecated: Deprecated since version 1.8: Use pop_to() instead.
  • + +
  • NaviframeItem.item_promote: deprecated: Deprecated since version 1.8: Use promote() instead.
  • +
+ + +

efl.elementary.need

+ +
    +
  • need_e_dbus: deprecated: Deprecated since version 1.8: Use need_eldbus() for eldbus (v2) support. Old API is deprecated.
  • + +
  • need_eldbus: added: New in version 1.8.
  • + +
  • need_elocation: added: New in version 1.8.
  • + +
  • need_sys_notify: added: New in version 1.8.
  • + +
  • need_systray: added: New in version 1.8.
  • +
+ + +

efl.elementary.notify

+ +
    +
  • ELM_NOTIFY_ALIGN_FILL: added: New in version 1.8.
  • + +
  • Notify.align: added: New in version 1.8.
  • + +
  • Notify.orient_get: deprecated: Deprecated since version 1.8: Use align instead.
  • + +
  • Notify.orient_set: deprecated: Deprecated since version 1.8: Use align instead.
  • +
+ + +

efl.elementary.object

+ +
    +
  • Object.domain_part_text_translatable_set: added: New in version 1.8.
  • + +
  • Object.domain_translatable_part_text_set: added: New in version 1.8.
  • + +
  • Object.domain_translatable_text_part_set: deprecated: Deprecated since version 1.8: Use domain_translatable_part_text_set() instead.
  • + +
  • Object.focus_next_object_get: added: New in version 1.8.
  • + +
  • Object.focus_next_object_set: added: New in version 1.8.
  • + +
  • Object.focused_object: added: New in version 1.8.
  • + +
  • Object.orientation_mode_disabled: added: New in version 1.8.
  • + +
  • Object.scroll_freeze: added: New in version 1.8.
  • + +
  • Object.scroll_hold: added: New in version 1.8.
  • + +
  • Object.translatable_part_text_get: added: New in version 1.8.
  • + +
  • Object.translatable_text_part_get: deprecated: Deprecated since version 1.8: Use translatable_part_text_get() instead.
  • + +
  • Object.widget_check: deprecated: Deprecated since version 1.8: Use type(obj) instead.
  • + +
  • SelectionData.action: added: New in version 1.8.
  • +
+ + +

efl.elementary.object_item

+ +
    +
  • ObjectItem.data_get: deprecated: Deprecated since version 1.8: Use the data attribute (dict) instead.
  • + +
  • ObjectItem.data_set: deprecated: Deprecated since version 1.8: Use the data attribute (dict) instead.
  • + +
  • ObjectItem.domain_part_text_translatable_set: added: New in version 1.8.
  • + +
  • ObjectItem.domain_translatable_part_text_set: added: New in version 1.8.
  • + +
  • ObjectItem.translatable_part_text_get: added: New in version 1.8.
  • +
+ + +

efl.elementary.panel

+ +
    +
  • Panel: changed: Changed in version 1.8: Inherits from LayoutClass.
  • + +
  • Panel.callback_focused_add: added: New in version 1.8.
  • + +
  • Panel.callback_unfocused_add: added: New in version 1.8.
  • +
+ + +

efl.elementary.photo

+ +
    +
  • Photo.file: changed: Changed in version 1.8: Raises RuntimeError if setting the file fails
  • +
+ + +

efl.elementary.photocam

+ +
    +
  • Photocam.bounce: deprecated: Deprecated since version 1.8: You should combine with Scrollable class instead.
  • + +
  • Photocam.callback_focused_add: added: New in version 1.8.
  • + +
  • Photocam.callback_unfocused_add: added: New in version 1.8.
  • + +
  • Photocam.scroller_policy: deprecated: Deprecated since version 1.8: You should combine with Scrollable class instead.
  • + +
  • PhotocamErrorInfo: added: New in version 1.8.
  • + +
  • PhotocamProgressInfo: added: New in version 1.8.
  • +
+ + +

efl.elementary.plug

+ +
    +
  • Plug.connect: changed: Changed in version 1.8: Raises RuntimeError if adding the child fails
  • +
+ + +

efl.elementary.popup

+ +
    +
  • Popup: changed: Changed in version 1.8: Inherits from LayoutClass.
  • + +
  • Popup.callback_focused_add: added: New in version 1.8.
  • + +
  • Popup.callback_language_changed_add: added: New in version 1.8.
  • + +
  • Popup.callback_unfocused_add: added: New in version 1.8.
  • +
+ + +

efl.elementary.progressbar

+ +
    +
  • Progressbar.callback_focused_add: added: New in version 1.8.
  • + +
  • Progressbar.callback_unfocused_add: added: New in version 1.8.
  • + +
  • Progressbar.part_value_get: added: New in version 1.8.
  • + +
  • Progressbar.part_value_set: added: New in version 1.8.
  • +
+ + +

efl.elementary.radio

+ +
    +
  • Radio.callback_focused_add: added: New in version 1.8.
  • + +
  • Radio.callback_unfocused_add: added: New in version 1.8.
  • + +
  • Radio.value_pointer_set: deprecated: Deprecated since version 1.8: Don't use this, only works in C.
  • +
+ + +

efl.elementary.scroller

+ +
    +
  • Scrollable.callback_focused_add: added: New in version 1.8.
  • + +
  • Scrollable.callback_unfocused_add: added: New in version 1.8.
  • + +
  • Scrollable.custom_widget_base_theme_set: deprecated: Deprecated since version 1.8: Use theme instead.
  • + +
  • Scrollable.movement_block: added: New in version 1.8.
  • + +
  • Scrollable.page_scroll_limit: added: New in version 1.8.
  • + +
  • Scrollable.page_size: added: New in version 1.8: Getter for this property
  • + +
  • Scrollable.page_snap: added: New in version 1.8.
  • + +
  • Scrollable.single_direction: added: New in version 1.8.
  • +
+ + +

efl.elementary.slider

+ +
    +
  • Slider.callback_focused_add: added: New in version 1.8.
  • + +
  • Slider.callback_unfocused_add: added: New in version 1.8.
  • + +
  • Slider.step: added: New in version 1.8.
  • +
+ + +

efl.elementary.slideshow

+ +
    +
  • Slideshow.callback_focused_add: added: New in version 1.8.
  • + +
  • Slideshow.callback_unfocused_add: added: New in version 1.8.
  • +
+ + +

efl.elementary.spinner

+ +
    +
  • Spinner.callback_focused_add: added: New in version 1.8.
  • + +
  • Spinner.callback_unfocused_add: added: New in version 1.8.
  • + +
  • Spinner.special_value_del: added: New in version 1.8.
  • + +
  • Spinner.special_value_get: added: New in version 1.8.
  • +
+ + +

efl.elementary.table

+ +
    +
  • Table.child_get: added: New in version 1.8.
  • +
+ + +

efl.elementary.thumb

+ +
    +
  • Thumb.aspect: added: New in version 1.8.
  • + +
  • Thumb.compress: added: New in version 1.8.
  • + +
  • Thumb.crop_align: added: New in version 1.8.
  • + +
  • Thumb.editable: changed: Changed in version 1.8: Raises RuntimeError if cannot be set as editable
  • + +
  • Thumb.fdo_size: added: New in version 1.8.
  • + +
  • Thumb.format: added: New in version 1.8.
  • + +
  • Thumb.orientation: added: New in version 1.8.
  • + +
  • Thumb.quality: added: New in version 1.8.
  • + +
  • Thumb.size: added: New in version 1.8.
  • +
+ + +

efl.elementary.toolbar

+ +
    +
  • Toolbar: changed: Changed in version 1.8: Inherits from LayoutClass.
  • + +
  • Toolbar.bounce: deprecated: Deprecated since version 1.8: You should combine with Scrollable class instead.
  • + +
  • Toolbar.callback_focused_add: added: New in version 1.8.
  • + +
  • Toolbar.callback_unfocused_add: added: New in version 1.8.
  • + +
  • Toolbar.reorder_mode: added: New in version 1.8.
  • + +
  • Toolbar.scroller_policy: deprecated: Deprecated since version 1.8: You should combine with Scrollable class instead.
  • + +
  • Toolbar.transverse_expanded: added: New in version 1.8.
  • + +
  • ToolbarItem.bring_in: added: New in version 1.8.
  • + +
  • ToolbarItem.show: added: New in version 1.8.
  • +
+ + +

efl.elementary.transit

+ +
    +
  • Transit.smooth: added: New in version 1.8.
  • + +
  • Transit.tween_mode_factor: added: New in version 1.8.
  • +
+ + +

efl.elementary.video

+ +
    +
  • Player.callback_focused_add: added: New in version 1.8.
  • + +
  • Player.callback_unfocused_add: added: New in version 1.8.
  • + +
  • Video.callback_focused_add: added: New in version 1.8.
  • + +
  • Video.callback_unfocused_add: added: New in version 1.8.
  • + +
  • Video.file: changed: Changed in version 1.8: Raises RuntimeError if setting the file/uri fails
  • +
+ + +

efl.elementary.web

+ +
    +
  • Web.callback_focused_add: added: New in version 1.8.
  • + +
  • Web.callback_unfocused_add: added: New in version 1.8.
  • + +
  • Web.uri: deprecated: Deprecated since version 1.8: Use property "url" instead.
  • + +
  • Web.url: added: New in version 1.8.
  • +
+ + +

efl.elementary.window

+ +
    +
  • Window.available_profiles: added: New in version 1.8.
  • + +
  • Window.callback_focused_add: added: New in version 1.8.
  • + +
  • Window.callback_unfocused_add: added: New in version 1.8.
  • + +
  • Window.floating_mode: added: New in version 1.8.
  • + +
  • Window.focus_highlight_animate: added: New in version 1.8.
  • + +
  • Window.main_menu: added: New in version 1.8.
  • + +
  • Window.norender: added: New in version 1.8.
  • + +
  • Window.norender_pop: added: New in version 1.8.
  • + +
  • Window.norender_push: added: New in version 1.8.
  • + +
  • Window.profile: added: New in version 1.8.
  • + +
  • Window.render: added: New in version 1.8.
  • + +
  • Window.screen_dpi: added: New in version 1.8.
  • + +
  • Window.socket_listen: changed: Changed in version 1.8: Raises RuntimeError if creating a socket fails
  • +
+ + +

efl.emotion

+ +
    +
  • Emotion: changed: Changed in version 1.8: Keyword argument module_filename was renamed to module_name.
  • + +
  • Emotion.bg_color: added: New in version 1.8.
  • + +
  • Emotion.border: added: New in version 1.8.
  • + +
  • Emotion.image_get: added: New in version 1.8.
  • + +
  • Emotion.keep_aspect: added: New in version 1.8.
  • + +
  • Emotion.last_position_load: added: New in version 1.8.
  • + +
  • Emotion.last_position_save: added: New in version 1.8.
  • + +
  • Emotion.play_speed: added: New in version 1.8.
  • + +
  • Emotion.priority: added: New in version 1.8.
  • + +
  • Emotion.suspend: added: New in version 1.8.
  • + +
  • Emotion.video_subtitle_file: added: New in version 1.8.
  • +
+ + +

efl.evas

+ +
    +
  • Image.source_events: added: New in version 1.8.
  • + +
  • Image.source_visible: added: New in version 1.8.
  • + +
  • Textgrid: added: New in version 1.8.
  • + +
  • TextgridCell: added: New in version 1.8.
  • +
+ + +
+
+ + diff -Nru python-efl-1.17.99~201312040125/debian/changelog python-efl-1.8.2~201401231220/debian/changelog --- python-efl-1.17.99~201312040125/debian/changelog 2013-12-03 21:25:34.000000000 +0000 +++ python-efl-1.8.2~201401231220/debian/changelog 2014-01-23 08:21:06.000000000 +0000 @@ -1,4 +1,4 @@ -python-efl (1.17.99~201312040125-1ppa1~precise) precise; urgency=high +python-efl (1.8.2~201401231220-1ppa1~precise) precise; urgency=high * Autobuild. diff -Nru python-efl-1.17.99~201312040125/doc/conf.py python-efl-1.8.2~201401231220/doc/conf.py --- python-efl-1.17.99~201312040125/doc/conf.py 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/doc/conf.py 2014-01-18 12:24:01.000000000 +0000 @@ -77,7 +77,7 @@ # General information about the project. project = u'Python Bindings for Enlightenment Foundation Libraries' -copyright = u'2008-2013, Simon Busch, Gustavo Sverzut Barbieri, Ulisses Furquim, ProFUSION embedded systems, Boris Faure, Fabiano Fidencio, Davide Andreoli, Kai Huuhko' +copyright = u'2008-2014, Simon Busch, Gustavo Sverzut Barbieri, Ulisses Furquim, ProFUSION embedded systems, Boris Faure, Fabiano Fidencio, Davide Andreoli, Kai Huuhko' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the @@ -86,7 +86,7 @@ # The short X.Y version. version = '1.8' # The full version, including alpha/beta/rc tags. -release = '1.7.99' +release = '1.8.1' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. @@ -125,6 +125,29 @@ # Setting this True will show missing references as warnings. #nitpicky = True +# nitpick_ignore = [ +# ('py:obj', 'int'), +# ('py:obj', 'float'), +# ('py:obj', 'double'), +# ('py:obj', 'callable'), +# ('py:obj', 'function'), +# ('py:obj', 'str'), +# ('py:exc', 'RuntimeError'), +# ('py:exc', 'RuntimeWarning'), +# ('py:exc', 'ValueError'), +# ('py:exc', 'TypeError'), +# ('py:obj', 'Evas_Coord (int)'), +# ('py:obj', 'string'), +# ('py:obj', 'list'), +# ('py:class', 'object'), +# ('py:obj', 'unicode'), +# ('py:obj', 'bool'), +# ('py:obj', 'tuple of ints'), +# ('py:class', 'efl.eo.Eo'), +# ('py:attr', 'efl.eo.Eo.data'), +# ('py:obj', 'datetime.date'), +# ] + # -- Options for HTML output --------------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for @@ -290,7 +313,7 @@ epub_title = u'Python Bindings for EFL' epub_author = u'Simon Busch, Gustavo Sverzut Barbieri, Ulisses Furquim, ProFUSION embedded systems, Boris Faure, Fabiano Fidencio, Davide Andreoli, Kai Huuhko' epub_publisher = u'Simon Busch, Gustavo Sverzut Barbieri, Ulisses Furquim, ProFUSION embedded systems, Boris Faure, Fabiano Fidencio, Davide Andreoli, Kai Huuhko' -epub_copyright = u'2008-2013, Simon Busch, Gustavo Sverzut Barbieri, Ulisses Furquim, ProFUSION embedded systems, Boris Faure, Fabiano Fidencio, Davide Andreoli, Kai Huuhko' +epub_copyright = u'2008-2014, Simon Busch, Gustavo Sverzut Barbieri, Ulisses Furquim, ProFUSION embedded systems, Boris Faure, Fabiano Fidencio, Davide Andreoli, Kai Huuhko' # The language of the text. It defaults to the language option # or en if the language is not set. diff -Nru python-efl-1.17.99~201312040125/doc/edje/class-edje.rst python-efl-1.8.2~201401231220/doc/edje/class-edje.rst --- python-efl-1.17.99~201312040125/doc/edje/class-edje.rst 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/doc/edje/class-edje.rst 2014-01-18 12:24:01.000000000 +0000 @@ -4,3 +4,4 @@ ============================== .. autoclass:: efl.edje.Edje + diff -Nru python-efl-1.17.99~201312040125/doc/edje/class-edje_edit.rst python-efl-1.8.2~201401231220/doc/edje/class-edje_edit.rst --- python-efl-1.17.99~201312040125/doc/edje/class-edje_edit.rst 1970-01-01 00:00:00.000000000 +0000 +++ python-efl-1.8.2~201401231220/doc/edje/class-edje_edit.rst 2014-01-18 12:24:01.000000000 +0000 @@ -0,0 +1,7 @@ +.. currentmodule:: efl.edje_edit + +:class:`efl.edje_edit.EdjeEdit` Class +======================================= + +.. autoclass:: efl.edje_edit.EdjeEdit + :undoc-members: diff -Nru python-efl-1.17.99~201312040125/doc/edje/edje.rst python-efl-1.8.2~201401231220/doc/edje/edje.rst --- python-efl-1.17.99~201312040125/doc/edje/edje.rst 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/doc/edje/edje.rst 2014-01-18 12:24:01.000000000 +0000 @@ -72,6 +72,7 @@ :maxdepth: 4 class-edje + class-edje_edit Inheritance diagram diff -Nru python-efl-1.17.99~201312040125/doc/efl.rst python-efl-1.8.2~201401231220/doc/efl.rst --- python-efl-1.17.99~201312040125/doc/efl.rst 1970-01-01 00:00:00.000000000 +0000 +++ python-efl-1.8.2~201401231220/doc/efl.rst 2014-01-18 12:24:01.000000000 +0000 @@ -0,0 +1,53 @@ +.. module:: efl + +:py:mod:`efl` Package +===================== + +.. versionadded:: 1.8 + +Logging +------- + +PyEFL provides `logging `_ +to loggers which are usually named after their equivalent module, +f.e. *efl.eo*. There is a root logger called *efl* which also receives +any messages coming from the underlying C libraries. + +These loggers have a NullHandler by default and are set to log messages +with level logging.WARNING and higher. The child loggers propagate +messages to *efl*, which doesn't propagate to the root Python logger, +so you need to add handlers to it to get output from it:: + + import logging + elog = logging.getLogger("efl") + elog.addHandler(logging.StreamHandler()) + +You should also set its level:: + + elog.setLevel(logging.INFO) + +And you may control the child loggers individually:: + + elm_log = logging.getLogger("efl.elementary") + elm_log.propagate = False + elm_log.addHandler(logging.StreamHandler()) + elm_log.setLevel(logging.ERROR) + +.. versionadded:: 1.8 + Loggers + +Class properties +---------------- + +All class properties have their respective _get/_set methods defined. + +These are useful when there are properties with the same name in the +inheritance tree, or when you're using a lambda. + +The properties can be applied to the instance by using keyword arguments that +are not already used by the constructor, for example like this:: + + Button(win, text="I win") + +.. versionadded:: 1.8 + Using keyword arguments to set properties diff -Nru python-efl-1.17.99~201312040125/doc/index.rst python-efl-1.8.2~201401231220/doc/index.rst --- python-efl-1.17.99~201312040125/doc/index.rst 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/doc/index.rst 2014-01-18 12:24:01.000000000 +0000 @@ -29,41 +29,11 @@ `EFL Overview `_ `EFL Documentation `_ -Logging -------- - -PyEFL provides `logging `_ -to loggers which are usually named after their equivalent module, -f.e. *efl.eo*. There is a root logger called *efl* which also receives -any messages coming from the underlying C libraries. - -These loggers have a NullHandler by default and are set to log messages -with level logging.WARNING and higher. The child loggers propagate -messages to *efl*, which doesn't propagate to the root Python logger, -so you need to add handlers to it to get output from it:: - - import logging - elog = logging.getLogger("efl") - elog.addHandler(logging.StreamHandler()) - -You should also set its level:: - - elog.setLevel(logging.INFO) - -And you may control the child loggers individually:: - - elm_log = logging.getLogger("efl.elementary") - elm_log.propagate = False - elm_log.addHandler(logging.StreamHandler()) - elm_log.setLevel(logging.ERROR) - -Class properties ----------------- -All class properties have their respective _get/_set methods defined. +EFL +--- -These are useful when there are properties with the same name in the -inheritance tree, or when you're using a lambda. +.. toctree:: efl.rst Ecore ----- diff -Nru python-efl-1.17.99~201312040125/efl/dbus_mainloop/dbus_mainloop.pyx python-efl-1.8.2~201401231220/efl/dbus_mainloop/dbus_mainloop.pyx --- python-efl-1.17.99~201312040125/efl/dbus_mainloop/dbus_mainloop.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/dbus_mainloop/dbus_mainloop.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of diff -Nru python-efl-1.17.99~201312040125/efl/dbus_mainloop/e_dbus.c python-efl-1.8.2~201401231220/efl/dbus_mainloop/e_dbus.c --- python-efl-1.17.99~201312040125/efl/dbus_mainloop/e_dbus.c 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/dbus_mainloop/e_dbus.c 2014-01-18 12:24:01.000000000 +0000 @@ -6,7 +6,7 @@ * Python-EFL is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * version 3 of the License, or (at your option) any later version. * * Python-EFL is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of diff -Nru python-efl-1.17.99~201312040125/efl/dbus_mainloop/e_dbus.h python-efl-1.8.2~201401231220/efl/dbus_mainloop/e_dbus.h --- python-efl-1.17.99~201312040125/efl/dbus_mainloop/e_dbus.h 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/dbus_mainloop/e_dbus.h 2014-01-18 12:24:01.000000000 +0000 @@ -6,7 +6,7 @@ * Python-EFL is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * version 3 of the License, or (at your option) any later version. * * Python-EFL is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of diff -Nru python-efl-1.17.99~201312040125/efl/ecore/efl.ecore.pyx python-efl-1.8.2~201401231220/efl/ecore/efl.ecore.pyx --- python-efl-1.17.99~201312040125/efl/ecore/efl.ecore.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/ecore/efl.ecore.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -200,6 +200,7 @@ """ +from libc.stdint cimport uintptr_t import traceback from efl.eo cimport Eo, PY_REFCOUNT from efl.utils.conversions cimport _ctouni diff -Nru python-efl-1.17.99~201312040125/efl/ecore/efl.ecore_animator.pxi python-efl-1.8.2~201401231220/efl/ecore/efl.ecore_animator.pxi --- python-efl-1.17.99~201312040125/efl/ecore/efl.ecore_animator.pxi 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/ecore/efl.ecore_animator.pxi 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -89,6 +89,33 @@ return ret cdef class AnimatorTimeline(Animator): + + """ + + Add an animator that runs for a limited time + + :param runtime: The time to run in seconds + :param func: The function to call when it ticks off + + This is just like a normal :py:class:`Animator` except the animator only + runs for a limited time specified in seconds by ``runtime``. Once the + runtime the animator has elapsed (animator finished) it will automatically + be deleted. The callback function ``func`` can return ECORE_CALLBACK_RENEW + to keep the animator running or ECORE_CALLBACK_CANCEL ro stop it and have it + be deleted automatically at any time. + + The ``func`` will ALSO be passed a position parameter that will be in value + from 0.0 to 1.0 to indicate where along the timeline (0.0 start, 1.0 end) + the animator run is at. If the callback wishes not to have a linear + transition it can "map" this value to one of several curves and mappings via + :py:meth:`Animator.pos_map`. + + .. note:: The default ``frametime`` value is 1/30th of a second. + + .. versionadded:: 1.8 + + """ + def __init__(self, func, double runtime, *args, **kargs): if not callable(func): raise TypeError("Parameter 'func' must be callable") diff -Nru python-efl-1.17.99~201312040125/efl/ecore/efl.ecore_events.pxi python-efl-1.8.2~201401231220/efl/ecore/efl.ecore_events.pxi --- python-efl-1.17.99~201312040125/efl/ecore/efl.ecore_events.pxi 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/ecore/efl.ecore_events.pxi 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -90,9 +90,9 @@ def __repr__(self): return ("%s(%#x, type=%d, func=%s, args=%s, kargs=%s, event_cls=%s, " "Ecore_Event_Handler=%#x, refcount=%d)") % \ - (self.__class__.__name__, self, + (self.__class__.__name__, self, self.type, self.func, self.args, self.kargs, self.event_cls, - self.obj, PY_REFCOUNT(self)) + self.obj, PY_REFCOUNT(self)) def __dealloc__(self): if self.obj != NULL: diff -Nru python-efl-1.17.99~201312040125/efl/ecore/efl.ecore_exe.pxi python-efl-1.8.2~201401231220/efl/ecore/efl.ecore_exe.pxi --- python-efl-1.17.99~201312040125/efl/ecore/efl.ecore_exe.pxi 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/ecore/efl.ecore_exe.pxi 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -330,7 +330,7 @@ Py_INCREF(self) self.exe = exe ecore_exe_callback_pre_free_set(exe, _ecore_exe_pre_free_cb) - _ecore_exe_event_mapping[exe] = self + _ecore_exe_event_mapping[exe] = self return 1 cdef int _unset_obj(self) except 0: @@ -339,25 +339,11 @@ filter.delete() self.__callbacks = None - _ecore_exe_event_mapping.pop(self.exe) + _ecore_exe_event_mapping.pop(self.exe) self.exe = NULL Py_DECREF(self) return 1 - def __str__(self): - if self.exe == NULL: - pid = None - cmd = None - flags = "" - data = None - else: - pid = self.pid - cmd = self.cmd - flags = exe_flags2str(self.flags) - data = None - return "%s(pid=%s, cmd=%r, flags=[%s], data=%r)" % \ - (self.__class__.__name__, pid, cmd, flags, data) - def __repr__(self): if self.exe == NULL: pid = None @@ -369,10 +355,10 @@ cmd = self.cmd flags = exe_flags2str(self.flags) data = None - return ("%s(%#x, Ecore_Exe=%#x, refcount=%d, pid=%s, cmd=%r, " - "flags=[%s], data=%r)") % \ - (self.__class__.__name__, self, - self.exe, PY_REFCOUNT(self), + return ("<%s(%#x, Ecore_Exe=%#x, refcount=%d, pid=%s, cmd=%r, " + "flags=[%s], data=%r)>") % \ + (self.__class__.__name__, self, + self.exe, PY_REFCOUNT(self), pid, cmd, flags, data) def delete(self): @@ -793,7 +779,7 @@ cdef int _set_obj(self, void *o) except 0: cdef Ecore_Exe_Event_Add *obj obj = o - self.exe = _ecore_exe_event_mapping.get(obj.exe) + self.exe = _ecore_exe_event_mapping.get(obj.exe) if self.exe is None: return -1 return 1 @@ -815,7 +801,7 @@ cdef int _set_obj(self, void *o) except 0: cdef Ecore_Exe_Event_Del *obj obj = o - self.exe = _ecore_exe_event_mapping.get(obj.exe) + self.exe = _ecore_exe_event_mapping.get(obj.exe) if self.exe is None: return -1 self.pid = obj.pid @@ -855,7 +841,7 @@ cdef Ecore_Exe_Event_Data *obj cdef int i obj = o - self.exe = _ecore_exe_event_mapping.get(obj.exe) + self.exe = _ecore_exe_event_mapping.get(obj.exe) if self.exe is None: return -1 self.data = PyUnicode_FromStringAndSize(obj.data, obj.size) diff -Nru python-efl-1.17.99~201312040125/efl/ecore/efl.ecore_fd_handler.pxi python-efl-1.8.2~201401231220/efl/ecore/efl.ecore_fd_handler.pxi --- python-efl-1.17.99~201312040125/efl/ecore/efl.ecore_fd_handler.pxi 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/ecore/efl.ecore_fd_handler.pxi 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -124,9 +124,9 @@ flags = flags2str(self.active_get(7)) return ("%s(%#x, func=%s, args=%s, kargs=%s, fd=%s, flags=[%s], " "Ecore_Fd_Handler=%#x, refcount=%d)") % \ - (self.__class__.__name__, self, + (self.__class__.__name__, self, self.func, self.args, self.kargs, fd, flags, - self.obj, PY_REFCOUNT(self)) + self.obj, PY_REFCOUNT(self)) def __dealloc__(self): if self.obj != NULL: diff -Nru python-efl-1.17.99~201312040125/efl/ecore/efl.ecore_file_download.pxi python-efl-1.8.2~201401231220/efl/ecore/efl.ecore_file_download.pxi --- python-efl-1.17.99~201312040125/efl/ecore/efl.ecore_file_download.pxi 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/ecore/efl.ecore_file_download.pxi 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -109,9 +109,9 @@ def __repr__(self): return ("%s(%#x, completion_cb=%s, progress_cb=%s, args=%s, kargs=%s, " "Ecore_File_Download_Job=%#x, refcount=%d)") % \ - (self.__class__.__name__, self, + (self.__class__.__name__, self, self.completion_cb, self.progress_cb, self.args, self.kargs, - self.job, PY_REFCOUNT(self)) + self.job, PY_REFCOUNT(self)) def __dealloc__(self): if self.job != NULL: diff -Nru python-efl-1.17.99~201312040125/efl/ecore/efl.ecore_file_monitor.pxi python-efl-1.8.2~201401231220/efl/ecore/efl.ecore_file_monitor.pxi --- python-efl-1.17.99~201312040125/efl/ecore/efl.ecore_file_monitor.pxi 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/ecore/efl.ecore_file_monitor.pxi 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -50,16 +50,18 @@ print("ECORE_FILE_EVENT_DELETED_DIRECTORY: '%s'" % path) elif event == ecore.ECORE_FILE_EVENT_DELETED_SELF: print("ECORE_FILE_EVENT_DELETED_SELF: '%s'" % path) - + ecore.FileMonitor("/tmp", monitor_cb) ecore.main_loop_begin() - + :param path: The complete path of the folder you want to monitor. :type path: str :param monitor_cb: A callback called when something change in `path` :type monitor_cb: callable + .. versionadded:: 1.8 + """ def __init__(self, path, monitor_cb, *args, **kargs): @@ -93,7 +95,7 @@ def __repr__(self): return ("%s(%#x, monitor_cb=%s, args=%s, kargs=%s, refcount=%d)") % \ - (self.__class__.__name__, self, + (self.__class__.__name__, self, self.monitor_cb, self.args, self.kargs, PY_REFCOUNT(self)) cdef object _exec_monitor(self, Ecore_File_Event event, const_char *path): diff -Nru python-efl-1.17.99~201312040125/efl/ecore/efl.ecore_idler.pxi python-efl-1.8.2~201401231220/efl/ecore/efl.ecore_idler.pxi --- python-efl-1.17.99~201312040125/efl/ecore/efl.ecore_idler.pxi 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/ecore/efl.ecore_idler.pxi 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of diff -Nru python-efl-1.17.99~201312040125/efl/ecore/efl.ecore_poller.pxi python-efl-1.8.2~201401231220/efl/ecore/efl.ecore_poller.pxi --- python-efl-1.17.99~201312040125/efl/ecore/efl.ecore_poller.pxi 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/ecore/efl.ecore_poller.pxi 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -26,12 +26,12 @@ ecore poller parlance) for each added poller. Ecore pollers should only be used when the poller doesn't have specific requirements on the exact times to poll. - + This architecture means that the main loop is only woken up once to handle all pollers of that type, this will save power as the CPU has more of a chance to go into a low power state the longer it is asleep for, so this should be used in situations where power usage is a concern. - + For now only 1 core poller type is supported: ECORE_POLLER_CORE, the default interval for ECORE_POLLER_CORE is 0.125(or 1/8th) second. @@ -41,19 +41,19 @@ defined. Ecore will endeavor to keep pollers synchronized and to call as many in 1 wakeup event as possible. If `interval` is not a power of two, the closest power of 2 greater than `interval` will be used. - + When the poller `func` is called, it must return a value of either ECORE_CALLBACK_RENEW(or True) or ECORE_CALLBACK_CANCEL(or False). If it returns 1, it will be called again at the next tick, or if it returns 0 it will be deleted automatically making any references/handles for it invalid. - + Example:: def poller_cb(): print("Poller") return True - + ecore.Poller(4, poller_cb) :param interval: The poll interval @@ -62,7 +62,9 @@ :type func: callable :param poll_type: The ticker type to attach the poller to. Must be ECORE_POLLER_CORE :type poll_type: Ecore_Poll_Type - + + .. versionadded:: 1.8 + """ def __init__(self, int interval, func, pol_type=0, *args, **kargs): if not callable(func): diff -Nru python-efl-1.17.99~201312040125/efl/ecore/efl.ecore_timer.pxi python-efl-1.8.2~201401231220/efl/ecore/efl.ecore_timer.pxi --- python-efl-1.17.99~201312040125/efl/ecore/efl.ecore_timer.pxi 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/ecore/efl.ecore_timer.pxi 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -82,20 +82,30 @@ ecore_timer_thaw(self.obj) def delay(self, double add): - """ Delay the execution of the timer by the given amount + """delay(float add) + + Delay the execution of the timer by the given amount :param add: seconds to add to the timer :type add: double + .. versionadded:: 1.8 + """ ecore_timer_delay(self.obj, add) def reset(self): - "Reset the counter of the timer" + """reset() + + Reset the counter of the timer + + .. versionadded:: 1.8 + + """ ecore_timer_reset(self.obj) property interval: - """ The interval (in seconds) between each call of the timer + """The interval (in seconds) between each call of the timer :type: double @@ -112,16 +122,18 @@ return ecore_timer_interval_get(self.obj) property pending: - """ The pending time for the timer to expire + """The pending time for the timer to expire :type: double + .. versionadded:: 1.8 + """ def __get__(self): return ecore_timer_pending_get(self.obj) - def ecore_timer_pending_get(self): + def pending_get(self): ecore_timer_pending_get(self.obj) diff -Nru python-efl-1.17.99~201312040125/efl/edje/efl.edje.pyx python-efl-1.8.2~201401231220/efl/edje/efl.edje.pyx --- python-efl-1.17.99~201312040125/efl/edje/efl.edje.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/edje/efl.edje.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -20,6 +20,7 @@ from cpython cimport PyMem_Malloc, PyMem_Free, PyUnicode_AsUTF8String cimport libc.stdlib +from libc.stdint cimport uintptr_t from efl.eo cimport _object_mapping_register, object_from_instance, \ _register_decorated_callbacks diff -Nru python-efl-1.17.99~201312040125/efl/edje/efl.edje_edit.pyx python-efl-1.8.2~201401231220/efl/edje/efl.edje_edit.pyx --- python-efl-1.17.99~201312040125/efl/edje/efl.edje_edit.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/edje/efl.edje_edit.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -17,6 +17,7 @@ from efl.utils.conversions cimport _touni, _ctouni, \ eina_list_strings_to_python_list +from efl.eo cimport _register_decorated_callbacks from efl.edje cimport Edje_Part_Type from efl.edje import EDJE_PART_TYPE_EXTERNAL @@ -30,9 +31,20 @@ cdef class EdjeEdit(Edje): - def __init__(self, Canvas canvas not None, **kargs): + def __init__(self, Canvas canvas not None, file=None, group=None, size=None, + geometry=None, **kwargs): + self._set_obj(edje_edit_object_add(canvas.obj)) - self._set_common_params(**kargs) + _register_decorated_callbacks(self) + + if file: + self.file_set(file, group) + + self._set_properties_from_keyword_args(kwargs) + + if not size and not geometry: + w, h = self.size_min_get() + self.size_set(w, h) # General def compiler_get(self): diff -Nru python-efl-1.17.99~201312040125/efl/edje/efl.edje_edit_group.pxi python-efl-1.8.2~201401231220/efl/edje/efl.edje_edit_group.pxi --- python-efl-1.17.99~201312040125/efl/edje/efl.edje_edit_group.pxi 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/edje/efl.edje_edit_group.pxi 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of diff -Nru python-efl-1.17.99~201312040125/efl/edje/efl.edje_edit_part.pxi python-efl-1.8.2~201401231220/efl/edje/efl.edje_edit_part.pxi --- python-efl-1.17.99~201312040125/efl/edje/efl.edje_edit_part.pxi 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/edje/efl.edje_edit_part.pxi 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of diff -Nru python-efl-1.17.99~201312040125/efl/edje/efl.edje_edit_part_state.pxi python-efl-1.8.2~201401231220/efl/edje/efl.edje_edit_part_state.pxi --- python-efl-1.17.99~201312040125/efl/edje/efl.edje_edit_part_state.pxi 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/edje/efl.edje_edit_part_state.pxi 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -525,7 +525,7 @@ lst = edje_edit_state_external_params_list_get(self.edje.obj, self.part, self.name, self.value) while lst: - p = c_edje._ExternalParam_from_ptr(lst.data) + p = c_edje._ExternalParam_from_ptr(lst.data) if p is not None: ret.append(p) lst = lst.next diff -Nru python-efl-1.17.99~201312040125/efl/edje/efl.edje_edit_program.pxi python-efl-1.8.2~201401231220/efl/edje/efl.edje_edit_program.pxi --- python-efl-1.17.99~201312040125/efl/edje/efl.edje_edit_program.pxi 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/edje/efl.edje_edit_program.pxi 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of diff -Nru python-efl-1.17.99~201312040125/efl/edje/efl.edje_external.pxi python-efl-1.8.2~201401231220/efl/edje/efl.edje_external.pxi --- python-efl-1.17.99~201312040125/efl/edje/efl.edje_external.pxi 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/edje/efl.edje_external.pxi 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -78,7 +78,7 @@ # XXX: this should be C-only, but it would require edje_edit # XXX: being able to use it. -def _ExternalParam_from_ptr(long ptr): +def _ExternalParam_from_ptr(uintptr_t ptr): return ExternalParam_from_ptr(ptr) diff -Nru python-efl-1.17.99~201312040125/efl/edje/efl.edje_message.pxi python-efl-1.8.2~201401231220/efl/edje/efl.edje_message.pxi --- python-efl-1.17.99~201312040125/efl/edje/efl.edje_message.pxi 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/edje/efl.edje_message.pxi 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of diff -Nru python-efl-1.17.99~201312040125/efl/edje/efl.edje_object.pxi python-efl-1.8.2~201401231220/efl/edje/efl.edje_object.pxi --- python-efl-1.17.99~201312040125/efl/edje/efl.edje_object.pxi 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/edje/efl.edje_object.pxi 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -127,27 +127,27 @@ def __cinit__(self, *a, **ka): self._signal_callbacks = {} - def __init__(self, Canvas canvas not None, **kargs): + def __init__(self, Canvas canvas not None, file=None, group=None, size=None, + geometry=None, **kwargs): + self._set_obj(edje_object_add(canvas.obj)) _register_decorated_callbacks(self) - self._set_common_params(**kargs) - def __free_wrapper_resources(self, ed): - self._signal_callbacks.clear() - self._text_change_cb = None - self._message_handler_cb = None - - def _set_common_params(self, file=None, group=None, size=None, pos=None, - geometry=None, color=None, name=None): if file: self.file_set(file, group) - Object._set_common_params(self, size=size, pos=pos, geometry=geometry, - color=color, name=name) + + self._set_properties_from_keyword_args(kwargs) + if not size and not geometry: w, h = self.size_min_get() self.size_set(w, h) - def __str__(self): + def __free_wrapper_resources(self, ed): + self._signal_callbacks.clear() + self._text_change_cb = None + self._message_handler_cb = None + + def __repr__(self): x, y, w, h = self.geometry_get() r, g, b, a = self.color_get() file, group = self.file_get() @@ -157,19 +157,9 @@ else: name_str = "" clip = bool(self.clip_get() is not None) - return ("%s(%sfile=%r, group=%r, geometry=(%d, %d, %d, %d), " - "color=(%d, %d, %d, %d), layer=%s, clip=%s, visible=%s)") % \ - (self.__class__.__name__, name_str, file, group, x, y, w, h, - r, g, b, a, self.layer_get(), clip, self.visible_get()) - - def __repr__(self): - x, y, w, h = self.geometry_get() - r, g, b, a = self.color_get() - file, group = self.file_get() - clip = bool(self.clip_get() is not None) - return ("%s(name=%r, file=%r, group=%r, geometry=(%d, %d, %d, %d), " - "color=(%d, %d, %d, %d), layer=%s, clip=%r, visible=%s)") % \ - (self.__class__.__name__, self.name_get(), file, group, + return ("<%s(%sfile=%r, group=%r, geometry=(%d, %d, %d, %d), " + "color=(%d, %d, %d, %d), layer=%s, clip=%r, visible=%s)>") % \ + (self.__class__.__name__, name_str, file, group, x, y, w, h, r, g, b, a, self.layer_get(), clip, self.visible_get()) @@ -193,6 +183,8 @@ returns data stored on the Edje (.edj), stored inside a *data* section inside the *group* that defines this object. + :type: string + """ if isinstance(key, unicode): key = PyUnicode_AsUTF8String(key) return _ctouni(edje_object_data_get(self.obj, @@ -201,8 +193,8 @@ def file_set(self, file, group): """Set the file (.edj) and the group to load the Edje object from. - :param file: the name of the file to load - :param group: the name of the group inside the edj to load + :param string file: the name of the file to load + :param string group: the name of the group inside the edj to load :raise EdjeLoadError: if error occurred during load. @@ -218,7 +210,7 @@ """Get the file and group used to load the object. :return: the tuple (file, group) - :rtype: tuple for str + :rtype: tuple of str """ cdef const_char *file, *group @@ -290,6 +282,8 @@ :type cancel: bool :rtype: bool + .. versionadded:: 1.8 + """ return bool(edje_object_preload(self.obj, cancel)) @@ -362,7 +356,15 @@ size) property scale: - """The scaling factor for a given Edje object.""" + """ + + The scaling factor for a given Edje object. + + :type: float + + .. versionadded:: 1.8 + + """ def __set__(self, double scale): edje_object_scale_set(self.obj, scale) @@ -375,7 +377,15 @@ return edje_object_scale_get(self.obj) property mirrored: - """The RTL orientation for this object.""" + """ + + The RTL orientation for this object. + + :type: int + + .. versionadded:: 1.8 + + """ def __set__(self, int rtl): edje_object_mirrored_set(self.obj, rtl) @@ -432,6 +442,8 @@ :warning: Be advised that invisible parts in the object obj will be taken into account in this calculation. + .. versionadded:: 1.8 + """ cdef int w, h edje_object_size_min_restricted_calc(self.obj, &w, &h, minw, minh) @@ -460,6 +472,8 @@ :type: bool + .. versionadded:: 1.8 + """ def __get__(self): return bool(edje_object_update_hints_get(self.obj)) diff -Nru python-efl-1.17.99~201312040125/efl/elementary/__init__.py python-efl-1.8.2~201401231220/efl/elementary/__init__.py --- python-efl-1.17.99~201312040125/efl/elementary/__init__.py 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/__init__.py 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -19,16 +19,6 @@ from efl.elementary.general import * from efl.elementary.need import * -# XXX: These are deprecated here! Will be removed soon. -from efl.utils.deprecated import DEPRECATED -from efl.elementary.theme import theme_overlay_add, theme_extension_add -from efl.elementary.configuration import preferred_engine_set -theme_overlay_add = DEPRECATED("1.8", "Use theme module instead.")(theme_overlay_add) -theme_extension_add = DEPRECATED("1.8", "Use theme module instead.")(theme_extension_add) -preferred_engine_set = DEPRECATED("1.8", "Use configuration module instead.")(preferred_engine_set) -ELM_WIN_BASIC = 0 -ELM_OBJECT_SELECT_MODE_ALWAYS = 1 - __all__ = ( #"access", diff -Nru python-efl-1.17.99~201312040125/efl/elementary/access.pyx python-efl-1.8.2~201401231220/efl/elementary/access.pyx --- python-efl-1.17.99~201312040125/efl/elementary/access.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/access.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of diff -Nru python-efl-1.17.99~201312040125/efl/elementary/actionslider.pyx python-efl-1.8.2~201401231220/efl/elementary/actionslider.pyx --- python-efl-1.17.99~201312040125/efl/elementary/actionslider.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/actionslider.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -42,19 +42,19 @@ magnetized" position. This widget emits the following signals, besides the ones sent from -:py:class:`efl.elementary.layout_class.LayoutClass`: +:py:class:`~efl.elementary.layout_class.LayoutClass`: -- **selected** - when user selects an enabled position (the label is +- ``selected`` - when user selects an enabled position (the label is passed as event info)". -- **pos_changed** - when the indicator reaches any of the +- ``pos_changed`` - when the indicator reaches any of the positions("left", "right" or "center"). Default text parts of the actionslider widget that you can use for are: -- **indicator** - An indicator label of the actionslider -- **left** - A left label of the actionslider -- **right** - A right label of the actionslider -- **center** - A center label of the actionslider +- ``indicator`` - An indicator label of the actionslider +- ``left`` - A left label of the actionslider +- ``right`` - A right label of the actionslider +- ``center`` - A center label of the actionslider Enumerations @@ -88,6 +88,7 @@ from cpython cimport PyUnicode_AsUTF8String from libc.string cimport const_char +from libc.stdint cimport uintptr_t from efl.eo cimport _object_mapping_register from efl.utils.conversions cimport _ctouni @@ -102,7 +103,7 @@ ELM_ACTIONSLIDER_RIGHT = enums.ELM_ACTIONSLIDER_RIGHT ELM_ACTIONSLIDER_ALL = enums.ELM_ACTIONSLIDER_ALL -def _cb_string_conv(long addr): +def _cb_string_conv(uintptr_t addr): cdef const_char *s = addr return _ctouni(s) if s is not NULL else None diff -Nru python-efl-1.17.99~201312040125/efl/elementary/background.pyx python-efl-1.8.2~201401231220/efl/elementary/background.pyx --- python-efl-1.17.99~201312040125/efl/elementary/background.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/background.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -34,7 +34,7 @@ Default content parts of the bg widget that you can use for are: -- **overlay** - overlay of the bg +- ``overlay`` - overlay of the bg Enumerations @@ -65,7 +65,7 @@ from cpython cimport PyUnicode_AsUTF8String -from efl.eo cimport _object_mapping_register +from efl.eo cimport _object_mapping_register, Eo from efl.utils.conversions cimport _ctouni from efl.evas cimport Object as evasObject from layout_class cimport LayoutClass @@ -86,6 +86,10 @@ self._set_obj(elm_bg_add(parent.obj)) self._set_properties_from_keyword_args(kwargs) + cdef int _set_properties_from_keyword_args(self, dict kwargs) except 0: + # Bypass the Evas one so that color works as expected + return Eo._set_properties_from_keyword_args(self, kwargs) + property file: """The file (image or edje collection) giving life for the background. diff -Nru python-efl-1.17.99~201312040125/efl/elementary/box.pyx python-efl-1.8.2~201401231220/efl/elementary/box.pyx --- python-efl-1.17.99~201312040125/efl/elementary/box.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/box.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of diff -Nru python-efl-1.17.99~201312040125/efl/elementary/bubble.pyx python-efl-1.8.2~201401231220/efl/elementary/bubble.pyx --- python-efl-1.17.99~201312040125/efl/elementary/bubble.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/bubble.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -40,13 +40,13 @@ The position of the arrow, icon, label and info depends on which corner is selected. The four available corners are: -- **top_left** - Default -- **top_right** -- **bottom_left** -- **bottom_right** +- ``top_left`` - Default +- ``top_right`` +- ``bottom_left`` +- ``bottom_right`` This widget emits the following signals, besides the ones sent from -:py:class:`efl.elementary.layout_class.LayoutClass`: +:py:class:`~efl.elementary.layout_class.LayoutClass`: - ``clicked`` - This is called when a user has clicked the bubble. - ``focused`` - When the bubble has received focus. (since 1.8) @@ -54,13 +54,13 @@ Default content parts of the bubble that you can use for are: -- **default** - A content of the bubble -- **icon** - An icon of the bubble +- ``default`` - A content of the bubble +- ``icon`` - An icon of the bubble Default text parts of the button widget that you can use for are: -- **default** - Label of the bubble -- **info** - info of the bubble +- ``default`` - Label of the bubble +- ``info`` - info of the bubble Enumerations @@ -142,7 +142,8 @@ def callback_focused_add(self, func, *args, **kwargs): """When the bubble has received focus. - :since: 1.8 + .. versionadded:: 1.8 + """ self._callback_add("focused", func, *args, **kwargs) @@ -152,7 +153,8 @@ def callback_unfocused_add(self, func, *args, **kwargs): """When the bubble has lost focus. - :since: 1.8 + .. versionadded:: 1.8 + """ self._callback_add("unfocused", func, *args, **kwargs) diff -Nru python-efl-1.17.99~201312040125/efl/elementary/button.pyx python-efl-1.8.2~201401231220/efl/elementary/button.pyx --- python-efl-1.17.99~201312040125/efl/elementary/button.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/button.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -39,27 +39,27 @@ Also, defined in the default theme, the button has the following styles available: -- default: a normal button. -- anchor: Like default, but the button fades away when the mouse is not +- ``default``: a normal button. +- ``anchor``: Like default, but the button fades away when the mouse is not over it, leaving only the text or icon. -- hoversel_vertical: Internally used by +- ``hoversel_vertical``: Internally used by :py:class:`~efl.elementary.hoversel.Hoversel` to give a continuous look across its options. -- hoversel_vertical_entry: Another internal for +- ``hoversel_vertical_entry``: Another internal for :py:class:`~efl.elementary.hoversel.Hoversel`. -- naviframe: Internally used by +- ``naviframe``: Internally used by :py:class:`~efl.elementary.naviframe.Naviframe` for its back button. -- colorselector: Internally used by +- ``colorselector``: Internally used by :py:class:`~efl.elementary.colorselector.Colorselector` for its left and right buttons. Default content parts of the button widget that you can use for are: -- "icon" - An icon of the button +- ``icon`` - An icon of the button Default text parts of the button widget that you can use for are: -- "default" - Label of the button +- ``default`` - Label of the button """ @@ -176,7 +176,8 @@ def callback_focused_add(self, func, *args, **kwargs): """When the button has received focus. - :since: 1.8 + .. versionadded:: 1.8 + """ self._callback_add("focused", func, *args, **kwargs) @@ -186,7 +187,8 @@ def callback_unfocused_add(self, func, *args, **kwargs): """When the button has lost focus. - :since: 1.8 + .. versionadded:: 1.8 + """ self._callback_add("unfocused", func, *args, **kwargs) diff -Nru python-efl-1.17.99~201312040125/efl/elementary/calendar_elm.pyx python-efl-1.8.2~201401231220/efl/elementary/calendar_elm.pyx --- python-efl-1.17.99~201312040125/efl/elementary/calendar_elm.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/calendar_elm.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -37,7 +37,7 @@ - setting the year and month format. This widget emits the following signals, besides the ones sent from -:py:class:`efl.elementary.layout_class.LayoutClass`: +:py:class:`~efl.elementary.layout_class.LayoutClass`: - ``changed`` - emitted when the date in the calendar is changed. - ``display,changed`` - emitted when the current month displayed in the @@ -217,18 +217,15 @@ Example:: - import time - from datetime import date + from datetime import date, timedelta cal = Calendar(win) - current_time = time.time() + 5 * 86400 - selected_time = date.fromtimestamp(current_time) - CalendarMark(cal, "holiday", selected_time, ELM_CALENDAR_ANNUALLY) - - current_time = time.time() + 1 * 86400 - selected_time = date.fromtimestamp(current_time) - CalendarMark(cal, "checked", selected_time, ELM_CALENDAR_UNIQUE) + selected_time = date.today() + timedelta(5) + cal.mark_add("holiday", selected_time, ELM_CALENDAR_ANNUALLY) + + selected_time = date.today() + timedelta(1) + cal.mark_add("checked", selected_time, ELM_CALENDAR_UNIQUE) cal.marks_draw() @@ -274,8 +271,9 @@ Delete a mark from the calendar. - If deleting all calendar marks is required, ``del`` :py:attr:`marks` - should be used instead of getting marks list and deleting each one. + If deleting all calendar marks is required, ``del`` + :py:attr:`Calendar.marks` should be used instead of getting marks list + and deleting each one. .. seealso:: :py:meth:`Calendar.mark_add` @@ -365,10 +363,14 @@ :type: datetime.date + .. versionchanged:: 1.8 + Returns None when the selected date cannot be fetched. + """ def __get__(self): cdef tm time - elm_calendar_selected_time_get(self.obj, &time) + if not elm_calendar_selected_time_get(self.obj, &time): + return None ret = date( time.tm_year + 1900, time.tm_mon + 1, time.tm_mday) @@ -523,6 +525,8 @@ :type: :ref:`Elm_Calendar_Selectable` + .. versionadded:: 1.8 + """ def __set__(self, Elm_Calendar_Selectable selectable): elm_calendar_selectable_set(self.obj, selectable) @@ -535,10 +539,13 @@ :type: datetime.date + .. versionadded:: 1.8 + """ def __get__(self): cdef tm time - elm_calendar_displayed_time_get(self.obj, &time) + if not elm_calendar_displayed_time_get(self.obj, &time): + return None ret = date( time.tm_year + 1900, time.tm_mon + 1, time.tm_mday) @@ -561,7 +568,7 @@ def callback_focused_add(self, func, *args, **kwargs): """When the calendar has received focus. - :since: 1.8 + .. versionadded:: 1.8 """ self._callback_add("focused", func, *args, **kwargs) @@ -571,7 +578,7 @@ def callback_unfocused_add(self, func, *args, **kwargs): """When the calendar has lost focus. - :since: 1.8 + .. versionadded:: 1.8 """ self._callback_add("unfocused", func, *args, **kwargs) diff -Nru python-efl-1.17.99~201312040125/efl/elementary/check.pyx python-efl-1.8.2~201401231220/efl/elementary/check.pyx --- python-efl-1.17.99~201312040125/efl/elementary/check.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/check.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -40,13 +40,13 @@ Default content parts of the check widget that you can use for are: -- "icon" - An icon of the check +- ``icon`` - An icon of the check Default text parts of the check widget that you can use for are: -- "default" - A label of the check -- "on" - On state label of the check -- "off" - Off state label of the check +- ``default`` - A label of the check +- ``on`` - On state label of the check +- ``off`` - Off state label of the check """ @@ -94,7 +94,7 @@ def callback_focused_add(self, func, *args, **kwargs): """When the check has received focus. - :since: 1.8 + .. versionadded:: 1.8 """ self._callback_add("focused", func, *args, **kwargs) @@ -104,7 +104,7 @@ def callback_unfocused_add(self, func, *args, **kwargs): """When the check has lost focus. - :since: 1.8 + .. versionadded:: 1.8 """ self._callback_add("unfocused", func, *args, **kwargs) diff -Nru python-efl-1.17.99~201312040125/efl/elementary/clock.pyx python-efl-1.8.2~201401231220/efl/elementary/clock.pyx --- python-efl-1.17.99~201312040125/efl/elementary/clock.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/clock.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -290,7 +290,7 @@ def callback_focused_add(self, func, *args, **kwargs): """When the clock has received focus. - :since: 1.8 + .. versionadded:: 1.8 """ self._callback_add("focused", func, *args, **kwargs) @@ -300,7 +300,7 @@ def callback_unfocused_add(self, func, *args, **kwargs): """When the clock has lost focus. - :since: 1.8 + .. versionadded:: 1.8 """ self._callback_add("unfocused", func, *args, **kwargs) diff -Nru python-efl-1.17.99~201312040125/efl/elementary/cnp_callbacks.pxi python-efl-1.8.2~201401231220/efl/elementary/cnp_callbacks.pxi --- python-efl-1.17.99~201312040125/efl/elementary/cnp_callbacks.pxi 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/cnp_callbacks.pxi 2014-01-18 12:24:01.000000000 +0000 @@ -100,7 +100,8 @@ """The action to perform with the data :type: :ref:`Elm_Object_Xdnd_Action` - :since: 1.8 + + .. versionadded:: 1.8 """ def __get__(self): @@ -190,7 +191,8 @@ :param yoff: A return coordinate for the Y offset at which to place the drag icon object relative to the source drag object :return: An object to fill the drag window with or NULL if not needed - :since: 1.8 + + .. versionadded:: 1.8 """ assert data != NULL, "data is NULL" @@ -233,7 +235,8 @@ :param data: Application specific data :param obj: The object where the drag started - :since: 1.8 + + .. versionadded:: 1.8 """ print("in drag_state_cb") @@ -244,7 +247,8 @@ :param data: Application specific data :param obj: The object where the drag started :param accepted: TRUE if the droppped-data is accepted on drop - :since: 1.8 + + .. versionadded:: 1.8 """ assert data != NULL, "data is NULL" @@ -265,7 +269,8 @@ :param data: Application specific data :param obj: The object where the drag started :param doaccept: A boolean as to if the target accepts the drag or not - :since: 1.8 + + .. versionadded:: 1.8 """ print("in drag_accept_cb") @@ -278,7 +283,8 @@ :param obj: The object where the drag started :param x: The X coordinate relative to the top-left of the object :param y: The Y coordinate relative to the top-left of the object - :since: 1.8 + + .. versionadded:: 1.8 """ print("in drag_pos_cb") @@ -310,7 +316,8 @@ :param xposret: Position relative to item (left (-1), middle (0), right (1) :param yposret: Position relative to item (upper (-1), middle (0), bottom (1) :param action: The drag action to be done - :since: 1.8 + + .. versionadded:: 1.8 """ print("in drag_item_container_pos") diff -Nru python-efl-1.17.99~201312040125/efl/elementary/colorselector.pyx python-efl-1.8.2~201401231220/efl/elementary/colorselector.pyx --- python-efl-1.17.99~201312040125/efl/elementary/colorselector.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/colorselector.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -18,11 +18,12 @@ """ -.. image:: /images/colorselector-preview.png - Widget description ------------------ +.. image:: /images/colorselector-preview.png + :align: left + A Colorselector is a color selection widget. It allows application to set a series of colors. It also allows to @@ -68,6 +69,7 @@ """ from cpython cimport PyUnicode_AsUTF8String, Py_DECREF +from libc.stdint cimport uintptr_t from efl.eo cimport _object_mapping_register from efl.utils.conversions cimport _ctouni @@ -81,7 +83,7 @@ ELM_COLORSELECTOR_COMPONENTS = enums.ELM_COLORSELECTOR_COMPONENTS ELM_COLORSELECTOR_BOTH = enums.ELM_COLORSELECTOR_BOTH -def _cb_object_item_conv(long addr): +def _cb_object_item_conv(uintptr_t addr): cdef Elm_Object_Item *it = addr return _object_item_to_python(it) @@ -99,13 +101,13 @@ cdef Elm_Object_Item *item item = elm_colorselector_palette_color_add( cs.obj, self.r, self.g, self.b, self.a) - if item != NULL: - self._set_obj(item) - self._set_properties_from_keyword_args(self.kwargs) - return self - else: - # FIXME: raise RuntimeError? - return None + + if item == NULL: + raise RuntimeError("The item could not be added to the widget.") + + self._set_obj(item) + self._set_properties_from_keyword_args(self.kwargs) + return self property color: """The palette items color. @@ -260,7 +262,7 @@ def callback_focused_add(self, func, *args, **kwargs): """When the check has received focus. - :since: 1.8 + .. versionadded:: 1.8 """ self._callback_add("focused", func, *args, **kwargs) @@ -270,7 +272,7 @@ def callback_unfocused_add(self, func, *args, **kwargs): """When the check has lost focus. - :since: 1.8 + .. versionadded:: 1.8 """ self._callback_add("unfocused", func, *args, **kwargs) diff -Nru python-efl-1.17.99~201312040125/efl/elementary/configuration.pyx python-efl-1.8.2~201401231220/efl/elementary/configuration.pyx --- python-efl-1.17.99~201312040125/efl/elementary/configuration.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/configuration.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -299,6 +299,8 @@ :type: int + .. versionadded:: 1.8 + """ def __get__(self): return elm_config_scroll_thumbscroll_hold_threshold_get() @@ -326,7 +328,7 @@ :type: int - :see: elm_config_thumbscroll_flick_distance_tolerance_get() + .. versionadded:: 1.8 """ def __get__(self): @@ -354,7 +356,7 @@ :type: float - :see: elm_config_thumbscroll_min_friction_get() + .. versionadded:: 1.8 """ def __get__(self): @@ -371,8 +373,6 @@ :type: float - :see: elm_config_thumbscroll_friction_standard_get() - """ def __get__(self): return elm_config_scroll_thumbscroll_friction_standard_get() @@ -388,6 +388,8 @@ :type: float + .. versionadded:: 1.8 + """ def __get__(self): return elm_config_scroll_thumbscroll_border_friction_get() @@ -416,6 +418,8 @@ :type: float + .. versionadded:: 1.8 + """ def __get__(self): return elm_config_scroll_thumbscroll_acceleration_threshold_get() @@ -427,6 +431,8 @@ :type: float + .. versionadded:: 1.8 + """ def __get__(self): return elm_config_scroll_thumbscroll_acceleration_time_limit_get() @@ -438,6 +444,8 @@ :type: float + .. versionadded:: 1.8 + """ def __get__(self): return elm_config_scroll_thumbscroll_acceleration_weight_get() @@ -465,6 +473,8 @@ :type: :ref:`Elm_Softcursor_Mode` + .. versionadded:: 1.8 + """ def __set__(self, Elm_Softcursor_Mode mode): elm_config_softcursor_mode_set(mode) @@ -678,6 +688,8 @@ :type: bool + .. versionadded:: 1.8 + """ def __get__(self): return bool(elm_config_selection_unfocused_clear_get()) @@ -857,9 +869,10 @@ Clouseau state. True if clouseau was tried to be run. - :since: 1.8 :return: True if clouseau was tried to run, False otherwise + .. versionadded:: 1.8 + """ def __get__(self): return bool(elm_config_clouseau_enabled_get()) @@ -875,6 +888,8 @@ :return: The indicator service name according to the rotation degree. + .. versionadded:: 1.8 + """ return _ctouni(elm_config_indicator_service_get(rotation)) @@ -885,6 +900,8 @@ :type: float + .. versionadded:: 1.8 + """ def __get__(self): return elm_config_glayer_long_tap_start_timeout_get() @@ -898,6 +915,8 @@ :return: Timeout for double tap event of gesture layer. + .. versionadded:: 1.8 + """ def __get__(self): return elm_config_glayer_double_tap_timeout_get() diff -Nru python-efl-1.17.99~201312040125/efl/elementary/conformant.pyx python-efl-1.8.2~201401231220/efl/elementary/conformant.pyx --- python-efl-1.17.99~201312040125/efl/elementary/conformant.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/conformant.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -31,20 +31,20 @@ shows when an entry is selected, conformant content won't change. This widget emits the following signals, besides the ones sent from -:py:class:`efl.elementary.layout_class.LayoutClass`: +:py:class:`~efl.elementary.layout_class.LayoutClass`: -- "virtualkeypad,state,on": if virtualkeypad state is switched to "on". -- "virtualkeypad,state,off": if virtualkeypad state is switched to "off". -- "clipboard,state,on": if clipboard state is switched to "on". -- "clipboard,state,off": if clipboard state is switched to "off". +- ``virtualkeypad,state,on``: if virtualkeypad state is switched to ``on``. +- ``virtualkeypad,state,off``: if virtualkeypad state is switched to ``off``. +- ``clipboard,state,on``: if clipboard state is switched to ``on``. +- ``clipboard,state,off``: if clipboard state is switched to ``off``. In all cases, the ``event`` parameter of the callback will be None. Available styles for it: - - ``"default"`` + - ``default`` Default content parts of the conformant widget that you can use for are: - - "default" - A content of the conformant + - ``default`` - A content of the conformant """ @@ -63,7 +63,9 @@ def callback_virtualkeypad_state_on_add(self, func, *args, **kwargs): """if virtualkeypad state is switched to "on". - :since: 1.8""" + .. versionadded:: 1.8 + + """ self._callback_add("virtualkeypad,state,on", func, *args, **kwargs) def callback_virtualkeypad_state_on_del(self, func): @@ -72,7 +74,9 @@ def callback_virtualkeypad_state_off_add(self, func, *args, **kwargs): """if virtualkeypad state is switched to "off". - :since: 1.8""" + .. versionadded:: 1.8 + + """ self._callback_add("virtualkeypad,state,off", func, *args, **kwargs) def callback_virtualkeypad_state_off_del(self, func): @@ -81,7 +85,9 @@ def callback_clipboard_state_on_add(self, func, *args, **kwargs): """if clipboard state is switched to "on". - :since: 1.8""" + .. versionadded:: 1.8 + + """ self._callback_add("clipboard,state,on", func, *args, **kwargs) def callback_clipboard_state_on_del(self, func): @@ -90,7 +96,9 @@ def callback_clipboard_state_off_add(self, func, *args, **kwargs): """if clipboard state is switched to "off". - :since: 1.8""" + .. versionadded:: 1.8 + + """ self._callback_add("clipboard,state,off", func, *args, **kwargs) def callback_clipboard_state_off_del(self, func): diff -Nru python-efl-1.17.99~201312040125/efl/elementary/ctxpopup.pyx python-efl-1.8.2~201401231220/efl/elementary/ctxpopup.pyx --- python-efl-1.17.99~201312040125/efl/elementary/ctxpopup.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/ctxpopup.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -44,15 +44,15 @@ Default content parts of the ctxpopup widget that you can use for are: -- "default" - A content of the ctxpopup +- ``default`` - A content of the ctxpopup Default content parts of the ctxpopup items that you can use for are: -- "icon" - An icon in the title area +- ``icon`` - An icon in the title area Default text parts of the ctxpopup items that you can use for are: -- "default" - Title label in the title area +- ``default`` - Title label in the title area .. note:: @@ -122,7 +122,7 @@ removed. :param icon: Icon to be set on new item - :type icon: :py:class:`evas.object.Object` + :type icon: :py:class:`~efl.evas.Object` :param label: The Label of the new item :type label: string :param func: Convenience function called when item selected @@ -171,17 +171,21 @@ self.icon.obj if self.icon is not None else NULL, cb, self) - if item != NULL: - self._set_obj(item) - self._set_properties_from_keyword_args(self.kwargs) - return self - else: - # FIXME: raise RuntimeError? - return None + if item == NULL: + raise RuntimeError("The item could not be added to the widget.") + + self._set_obj(item) + self._set_properties_from_keyword_args(self.kwargs) + return self cdef class Ctxpopup(LayoutClass): - """This is the class that actually implements the widget.""" + """This is the class that actually implements the widget. + + .. versionchanged:: 1.8 + Inherits from LayoutClass + + """ def __init__(self, evasObject parent, *args, **kwargs): self._set_obj(elm_ctxpopup_add(parent.obj)) @@ -329,7 +333,7 @@ def callback_focused_add(self, func, *args, **kwargs): """When the ctxpopup has received focus. - :since: 1.8 + .. versionadded:: 1.8 """ self._callback_add("focused", func, *args, **kwargs) @@ -339,7 +343,7 @@ def callback_unfocused_add(self, func, *args, **kwargs): """When the ctxpopup has lost focus. - :since: 1.8 + .. versionadded:: 1.8 """ self._callback_add("unfocused", func, *args, **kwargs) diff -Nru python-efl-1.17.99~201312040125/efl/elementary/datetime_elm.pyx python-efl-1.8.2~201401231220/efl/elementary/datetime_elm.pyx --- python-efl-1.17.99~201312040125/efl/elementary/datetime_elm.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/datetime_elm.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -393,12 +393,19 @@ Minute: default value range is from 0 to 59. + :raise RuntimeError: when the max value could not be set. + :type: datetime.datetime + .. versionchanged:: 1.8 + Returns None when the max value cannot be fetched, raise + RuntimeError when setting the max value failed. + """ def __get__(self): cdef tm time - elm_datetime_value_max_get(self.obj, &time) + if not elm_datetime_value_max_get(self.obj, &time): + return None ret = datetime( time.tm_year + 1900, time.tm_mon + 1, time.tm_mday, @@ -419,7 +426,8 @@ time.tm_wday = tmtup.tm_wday time.tm_yday = tmtup.tm_yday time.tm_isdst = tmtup.tm_isdst - elm_datetime_value_max_set(self.obj, &time) + if not elm_datetime_value_max_set(self.obj, &time): + raise RuntimeError property value_min: """The lower boundary of a field. @@ -435,12 +443,19 @@ Minute: default value range is from 0 to 59. + :raise RuntimeError: when the min value could not be set. + :type: datetime.datetime + .. versionchanged:: 1.8 + Returns None when the min value cannot be fetched, raise + RuntimeError when setting the min value failed. + """ def __get__(self): cdef tm time - elm_datetime_value_min_get(self.obj, &time) + if not elm_datetime_value_min_get(self.obj, &time): + return None ret = datetime( time.tm_year + 1900, time.tm_mon + 1, time.tm_mday, @@ -461,7 +476,8 @@ time.tm_wday = tmtup.tm_wday time.tm_yday = tmtup.tm_yday time.tm_isdst = tmtup.tm_isdst - elm_datetime_value_min_set(self.obj, &time) + if not elm_datetime_value_min_set(self.obj, &time): + raise RuntimeError def field_limit_get(self, Elm_Datetime_Field_Type fieldtype): """Get the field limits of a field. @@ -511,12 +527,19 @@ Minute: default value range is from 0 to 59. + :raise RuntimeError: when the value could not be set. + :type: datetime.datetime + .. versionchanged:: 1.8 + Returns None when the value cannot be fetched, raise RuntimeError + when setting the value failed. + """ def __get__(self): cdef tm time - elm_datetime_value_get(self.obj, &time) + if not elm_datetime_value_get(self.obj, &time): + return None ret = datetime( time.tm_year + 1900, time.tm_mon + 1, time.tm_mday, @@ -537,7 +560,8 @@ time.tm_wday = tmtup.tm_wday time.tm_yday = tmtup.tm_yday time.tm_isdst = tmtup.tm_isdst - elm_datetime_value_set(self.obj, &time) + if not elm_datetime_value_set(self.obj, &time): + raise RuntimeError def field_visible_get(self, fieldtype): """field_visible_get(int fieldtype) -> bool @@ -595,7 +619,7 @@ def callback_focused_add(self, func, *args, **kwargs): """When the datetime has received focus. - :since: 1.8 + .. versionadded:: 1.8 """ self._callback_add("focused", func, *args, **kwargs) @@ -605,7 +629,7 @@ def callback_unfocused_add(self, func, *args, **kwargs): """When the datetime has lost focus. - :since: 1.8 + .. versionadded:: 1.8 """ self._callback_add("unfocused", func, *args, **kwargs) diff -Nru python-efl-1.17.99~201312040125/efl/elementary/dayselector.pyx python-efl-1.8.2~201401231220/efl/elementary/dayselector.pyx --- python-efl-1.17.99~201312040125/efl/elementary/dayselector.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/dayselector.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -50,9 +50,9 @@ "day6" indicates the Saturday part name. Application can change individual day display string by using the API -:py:meth:`efl.elementary.object.Object.part_text_set`. +:py:meth:`~efl.elementary.object.Object.part_text_set`. -:py:meth:`efl.elementary.object.Object.part_content_set` API sets the +:py:meth:`~efl.elementary.object.Object.part_content_set` API sets the individual day object only if the passed one is a Check widget. Check object representing a day can be set/get by the application by using @@ -60,14 +60,14 @@ the different check styles for individual days. This widget emits the following signals, besides the ones sent from -:py:class:`efl.elementary.layout_class.LayoutClass`: +:py:class:`~efl.elementary.layout_class.LayoutClass`: -- ``"dayselector,changed"`` - when the user changes the state of a day. -- ``"language,changed"`` - the program's language changed +- ``dayselector,changed`` - when the user changes the state of a day. +- ``language,changed`` - the program's language changed Available styles for dayselector are: -- default +- ``default`` Enumerations @@ -213,10 +213,9 @@ dayselector.weekdays_names = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"] - :see: elm_dayselector_weekdays_name_get() - :see: elm_dayselector_weekend_start_set() + :see: :py:attr:`weekend_start` - :since: 1.8 + .. versionadded:: 1.8 """ def __set__(self, list weekdays): diff -Nru python-efl-1.17.99~201312040125/efl/elementary/diskselector.pyx python-efl-1.8.2~201401231220/efl/elementary/diskselector.pyx --- python-efl-1.17.99~201312040125/efl/elementary/diskselector.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/diskselector.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -42,17 +42,17 @@ Available styles for it: -- ``"default"`` +- ``default`` Default content parts of the diskselector items that you can use for are: -- "icon" - An icon in the diskselector item +- ``icon`` - An icon in the diskselector item Default text parts of the diskselector items that you can use for are: -- "default" - Label of the diskselector item +- ``default`` - Label of the diskselector item -.. note:: The "scroll,anim,*" and "scroll,drag,*" signals are only emitted +.. note:: The ``scroll,anim,*`` and ``scroll,drag,*`` signals are only emitted by user intervention. Scrollable Interface @@ -72,6 +72,7 @@ """ from cpython cimport PyUnicode_AsUTF8String, Py_DECREF +from libc.stdint cimport uintptr_t from efl.eo cimport _object_mapping_register from efl.utils.conversions cimport _ctouni @@ -84,7 +85,7 @@ from scroller cimport elm_scroller_policy_get, elm_scroller_policy_set, \ elm_scroller_bounce_get, elm_scroller_bounce_set, Elm_Scroller_Policy -def _cb_object_item_conv(long addr): +def _cb_object_item_conv(uintptr_t addr): cdef Elm_Object_Item *it = addr return _object_item_to_python(it) @@ -110,15 +111,13 @@ Simple example (with no function callback or data associated):: disk = Diskselector(win) - ic = Icon(win) - ic.file_set("path/to/image") - ic.resizable_set(EINA_TRUE, EINA_TRUE) + ic = Icon(win, file="path/to/image", resizable=(True, True)) disk.item_append("label", ic) .. seealso:: - :py:func:`elementary.object_item.ObjectItem.delete()` - :py:func:`clear()` - :py:class:`elementary.image.Image` + :py:meth:`~efl.elementary.object_item.ObjectItem.delete` + :py:meth:`Diskselector.clear` + :py:class:`~efl.elementary.image.Image` """ @@ -171,12 +170,12 @@ self.icon.obj if self.icon is not None else NULL, cb, self) - if item != NULL: - self._set_obj(item) - self._set_properties_from_keyword_args(self.kwargs) - return self - else: - Py_DECREF(self) + if item == NULL: + raise RuntimeError("The item could not be added to the widget.") + + self._set_obj(item) + self._set_properties_from_keyword_args(self.kwargs) + return self property selected: """The selected state of an item. @@ -472,7 +471,7 @@ def callback_focused_add(self, func, *args, **kwargs): """When the diskselector has received focus. - :since: 1.8 + .. versionadded:: 1.8 """ self._callback_add("focused", func, *args, **kwargs) @@ -482,7 +481,7 @@ def callback_unfocused_add(self, func, *args, **kwargs): """When the diskselector has lost focus. - :since: 1.8 + .. versionadded:: 1.8 """ self._callback_add("unfocused", func, *args, **kwargs) @@ -491,6 +490,12 @@ property scroller_policy: + """ + + .. deprecated:: 1.8 + You should combine with Scrollable class instead. + + """ def __get__(self): return self.scroller_policy_get() @@ -509,6 +514,12 @@ return (policy_h, policy_v) property bounce: + """ + + .. deprecated:: 1.8 + You should combine with Scrollable class instead. + + """ def __get__(self): return self.bounce_get() def __set__(self, value): diff -Nru python-efl-1.17.99~201312040125/efl/elementary/entry.pyx python-efl-1.8.2~201401231220/efl/elementary/entry.pyx --- python-efl-1.17.99~201312040125/efl/elementary/entry.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/entry.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -214,51 +214,52 @@ This widget emits the following signals: -- "changed": The text within the entry was changed. -- "changed,user": The text within the entry was changed because of user +- ``changed``: The text within the entry was changed. +- ``changed,user``: The text within the entry was changed because of user interaction. -- "activated": The enter key was pressed on a single line entry. -- "aborted": The escape key was pressed on a single line entry. (since 1.7) -- "press": A mouse button has been pressed on the entry. -- "longpressed": A mouse button has been pressed and held for a couple +- ``activated``: The enter key was pressed on a single line entry. +- ``aborted``: The escape key was pressed on a single line entry. (since 1.7) +- ``press``: A mouse button has been pressed on the entry. +- ``longpressed``: A mouse button has been pressed and held for a couple seconds. -- "clicked": The entry has been clicked (mouse press and release). -- "clicked,double": The entry has been double clicked. -- "clicked,triple": The entry has been triple clicked. -- "focused": The entry has received focus. -- "unfocused": The entry has lost focus. -- "selection,paste": A paste of the clipboard contents was requested. -- "selection,copy": A copy of the selected text into the clipboard was +- ``clicked``: The entry has been clicked (mouse press and release). +- ``clicked,double``: The entry has been double clicked. +- ``clicked,triple``: The entry has been triple clicked. +- ``focused``: The entry has received focus. +- ``unfocused``: The entry has lost focus. +- ``selection,paste``: A paste of the clipboard contents was requested. +- ``selection,copy``: A copy of the selected text into the clipboard was requested. -- "selection,cut": A cut of the selected text into the clipboard was +- ``selection,cut``: A cut of the selected text into the clipboard was requested. -- "selection,start": A selection has begun and no previous selection +- ``selection,start``: A selection has begun and no previous selection existed. -- "selection,changed": The current selection has changed. -- "selection,cleared": The current selection has been cleared. -- "cursor,changed": The cursor has changed position. -- "anchor,clicked": An anchor has been clicked. The event_info +- ``selection,changed``: The current selection has changed. +- ``selection,cleared``: The current selection has been cleared. +- ``cursor,changed``: The cursor has changed position. +- ``anchor,clicked``: An anchor has been clicked. The event_info parameter for the callback will be an :py:class:`EntryAnchorInfo`. -- "anchor,in": Mouse cursor has moved into an anchor. The event_info +- ``anchor,in``: Mouse cursor has moved into an anchor. The event_info parameter for the callback will be an :py:class:`EntryAnchorInfo`. -- "anchor,out": Mouse cursor has moved out of an anchor. The event_info +- ``anchor,out``: Mouse cursor has moved out of an anchor. The event_info parameter for the callback will be an :py:class:`EntryAnchorInfo`. -- "anchor,up": Mouse button has been unpressed on an anchor. The event_info +- ``anchor,up``: Mouse button has been unpressed on an anchor. The event_info parameter for the callback will be an :py:class:`EntryAnchorInfo`. -- "anchor,down": Mouse button has been pressed on an anchor. The event_info +- ``anchor,down``: Mouse button has been pressed on an anchor. The event_info parameter for the callback will be an :py:class:`EntryAnchorInfo`. -- "preedit,changed": The preedit string has changed. -- "language,changed": Program language changed. -- "text,set,done": Whole text has been set to the entry. +- ``preedit,changed``: The preedit string has changed. +- ``language,changed``: Program language changed. +- ``text,set,done``: Whole text has been set to the entry. Default content parts of the entry items that you can use for are: -- "icon" - An icon in the entry -- "end" - A content in the end of the entry +- ``icon`` - An icon in the entry +- ``end`` - A content in the end of the entry Default text parts of the entry that you can use for are: -- "default" - text of the entry +- ``default`` - text of the entry +- ``guide`` - placeholder of the entry Enumerations @@ -468,12 +469,14 @@ from libc.string cimport strdup from libc.stdlib cimport free +from libc.stdint cimport uintptr_t from cpython cimport PyUnicode_AsUTF8String, Py_INCREF from efl.eo cimport _object_mapping_register, object_from_instance from efl.utils.conversions cimport _touni, _ctouni from efl.evas cimport Object as evasObject from object cimport Object +from layout_class cimport LayoutClass from hover cimport Hover from efl.utils.deprecated cimport DEPRECATED @@ -544,12 +547,14 @@ @DEPRECATED("1.8", "Use markup_to_utf8() instead.") def Entry_markup_to_utf8(string): + """Entry_markup_to_utf8(string)""" if isinstance(string, unicode): string = PyUnicode_AsUTF8String(string) return _touni(elm_entry_markup_to_utf8( string if string is not None else NULL)) @DEPRECATED("1.8", "Use utf8_to_markup() instead.") def Entry_utf8_to_markup(string): + """Entry_utf8_to_markup(string)""" if isinstance(string, unicode): string = PyUnicode_AsUTF8String(string) return _touni(elm_entry_utf8_to_markup( string if string is not None else NULL)) @@ -569,7 +574,7 @@ Type of contextual item that can be added in to long press menu. - :since: 1.8 + .. versionadded:: 1.8 """ cdef Elm_Entry_Context_Menu_Item *item @@ -581,7 +586,7 @@ :type: unicode - :since: 1.8 + .. versionadded:: 1.8 """ def __get__(self): @@ -594,7 +599,7 @@ :type: (unicode **icon_file**, unicode **icon_group**, :ref:`Icon type ` **icon_type**) - :since: 1.8 + .. versionadded:: 1.8 """ def __get__(self): @@ -750,7 +755,7 @@ self.hover_top = False self.hover_bottom = False -def _entryanchor_conv(long addr): +def _entryanchor_conv(uintptr_t addr): cdef Elm_Entry_Anchor_Info *ei = addr eai = EntryAnchorInfo() eai.name = _ctouni(ei.name) @@ -761,10 +766,10 @@ eai.h = ei.h return eai -def _entryanchorhover_conv(long addr): +def _entryanchorhover_conv(uintptr_t addr): cdef Elm_Entry_Anchor_Hover_Info *ehi = addr eahi = EntryAnchorHoverInfo() - eahi.anchor_info = _entryanchor_conv(ehi.anchor_info) + eahi.anchor_info = _entryanchor_conv(ehi.anchor_info) eahi.hover = object_from_instance(ehi.hover) eahi.hover_parent = (ehi.hover_parent.x, ehi.hover_parent.y, ehi.hover_parent.w, ehi.hover_parent.h) @@ -774,9 +779,14 @@ eahi.hover_bottom = ehi.hover_bottom return eahi -cdef class Entry(Object): +cdef class Entry(LayoutClass): - """This is the class that actually implements the widget.""" + """This is the class that actually implements the widget. + + .. versionchanged:: 1.8 + Inherits from LayoutClass. + + """ def __init__(self, evasObject parent, *args, **kwargs): """By default, entries are: @@ -804,6 +814,8 @@ :param string style: The style user to push + .. versionadded:: 1.8 + """ if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style) elm_entry_text_style_user_push(self.obj, @@ -816,6 +828,8 @@ :seealso: :py:meth:`text_style_user_push` + .. versionadded:: 1.8 + """ elm_entry_text_style_user_pop(self.obj) @@ -828,6 +842,8 @@ :seealso: :py:meth:`text_style_user_push` + .. versionadded:: 1.8 + """ return _ctouni(elm_entry_text_style_user_peek(self.obj)) @@ -938,10 +954,6 @@ a string in markup format. None is returned if no selection exists or if an error occurred. - The returned value points to an internal string and should not be freed - or modified in any way. If the ``entry`` object is deleted or its - contents are changed, the returned pointer should be considered invalid. - :type: string """ @@ -1231,14 +1243,17 @@ cursor. :return: Geometry (x, y, w, h) - :rtype: tuple of Evas_Coords (int) + :rtype: tuple of Evas_Coords (int) or None + + .. versionchanged:: 1.8 + Returns None when the cursor geometry cannot be fetched. """ cdef Evas_Coord x, y, w, h - if bool(elm_entry_cursor_geometry_get(self.obj, &x, &y, &w, &h)): + if elm_entry_cursor_geometry_get(self.obj, &x, &y, &w, &h): return (x, y, w, h) else: - raise RuntimeError("Fetching cursor geometry failed") + return None property cursor_pos: """The cursor position in the entry @@ -1311,6 +1326,8 @@ :param func: The callback to execute when the item is clicked :type func: function + .. versionadded:: 1.8 + """ cdef Evas_Smart_Cb cb = NULL if func is not None: @@ -1395,17 +1412,17 @@ Append a markup filter function for text inserted in the entry Append the given callback to the list. This functions will be called - whenever any text is inserted into the entry, with the text to be inserted - as a parameter. The type of given text is always markup. - The callback function is free to alter the text in any way it wants, but - it must remember to free the given pointer and update it. - If the new text is to be discarded, the function can free it and set its - text parameter to NULL. This will also prevent any following filters from - being called. + whenever any text is inserted into the entry, with the text to be + inserted as a parameter. The type of given text is always markup. The + callback function is free to alter the text in any way it wants. If the + new text is to be discarded, the function can return None. This will + also prevent any following filters from being called. :param func: The function to use as text filter :param data: User data to pass to ``func`` + .. versionadded:: 1.8 + """ cb_data = (func, data) # TODO: This is now a ref leak. It should be stored somewhere and @@ -1420,12 +1437,14 @@ Prepend a markup filter function for text inserted in the entry - Prepend the given callback to the list. See elm_entry_markup_filter_append() - for more information + Prepend the given callback to the list. See + :py:meth:`markup_filter_append` for more information :param func: The function to use as text filter :param data: User data to pass to ``func`` + .. versionadded:: 1.8 + """ cb_data = (func, data) Py_INCREF(cb_data) @@ -1439,11 +1458,13 @@ Remove a markup filter from the list Removes the given callback from the filter list. See - elm_entry_markup_filter_append() for more information. + :py:meth:`markup_filter_append` for more information :param func: The filter function to remove :param data: The user data passed when adding the function + .. versionadded:: 1.8 + """ cb_data = (func, data) Py_INCREF(cb_data) @@ -1451,9 +1472,19 @@ py_elm_entry_filter_cb, cb_data) - markup_to_utf8 = staticmethod(DEPRECATED("1.8", "Use module level markup_to_utf8() instead.")(Entry_markup_to_utf8)) - - utf8_to_markup = staticmethod(DEPRECATED("1.8", "Use module level utf8_to_markup() instead.")(Entry_utf8_to_markup)) + @DEPRECATED("1.8", "Use the module level markup_to_utf8() method instead.") + def markup_to_utf8(self, string): + """markup_to_utf8(string)""" + if isinstance(string, unicode): string = PyUnicode_AsUTF8String(string) + return _touni(elm_entry_markup_to_utf8( + string if string is not None else NULL)) + + @DEPRECATED("1.8", "Use the module level utf8_to_markup() method instead.") + def utf8_to_markup(self, string): + """utf8_to_markup(string)""" + if isinstance(string, unicode): string = PyUnicode_AsUTF8String(string) + return _touni(elm_entry_utf8_to_markup( + string if string is not None else NULL)) property file: """The file for the text to display and then edit. @@ -1468,6 +1499,10 @@ :type: (unicode **file_name**, :ref:`Elm_Entry_Text_Format` **file_format**) :raise RuntimeError: when setting the file fails + .. versionchanged:: 1.8 + Raise RuntimeError when setting the file fails, instead of + returning a bool. + """ def __get__(self): cdef const_char *file @@ -1563,6 +1598,8 @@ :type: bool + .. versionadded:: 1.8 + """ def __set__(self, bint setting): elm_entry_end_visible_set(self.obj, setting) @@ -1592,7 +1629,7 @@ :type: int - :since: 1.8 + .. versionadded:: 1.8 """ def __set__(self, int variation): @@ -1612,6 +1649,8 @@ :type: :ref:`Elm_Entry_Autocapital_Type` + .. versionadded:: 1.8 + """ def __set__(self, Elm_Autocapital_Type autocapital_type): elm_entry_autocapital_type_set(self.obj, autocapital_type) @@ -2194,6 +2233,12 @@ property scrollbar_policy: + """ + + .. deprecated:: 1.8 + You should combine with Scrollable class instead. + + """ def __get__(self): return self.scrollbar_policy_get() @@ -2212,6 +2257,12 @@ return (policy_h, policy_v) property bounce: + """ + + .. deprecated:: 1.8 + You should combine with Scrollable class instead. + + """ def __get__(self): return self.bounce_get() def __set__(self, value): diff -Nru python-efl-1.17.99~201312040125/efl/elementary/enums.pxd python-efl-1.8.2~201401231220/efl/elementary/enums.pxd --- python-efl-1.17.99~201312040125/efl/elementary/enums.pxd 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/enums.pxd 2014-01-18 12:24:01.000000000 +0000 @@ -145,6 +145,10 @@ ctypedef enum Elm_Focus_Direction: ELM_FOCUS_PREVIOUS ELM_FOCUS_NEXT + ELM_FOCUS_UP + ELM_FOCUS_DOWN + ELM_FOCUS_RIGHT + ELM_FOCUS_LEFT ctypedef enum Elm_Genlist_Item_Type: ELM_GENLIST_ITEM_NONE @@ -341,12 +345,23 @@ ctypedef enum Elm_Policy: ELM_POLICY_QUIT + ELM_POLICY_EXIT + ELM_POLICY_THROTTLE ELM_POLICY_LAST ctypedef enum Elm_Policy_Quit: ELM_POLICY_QUIT_NONE ELM_POLICY_QUIT_LAST_WINDOW_CLOSED + ctypedef enum Elm_Policy_Exit: + ELM_POLICY_EXIT_NONE + ELM_POLICY_EXIT_WINDOWS_DEL + + ctypedef enum Elm_Policy_Throttle: + ELM_POLICY_THROTTLE_CONFIG + ELM_POLICY_THROTTLE_HIDDEN_ALWAYS + ELM_POLICY_THROTTLE_NEVER + ctypedef enum Elm_Popup_Orient: ELM_POPUP_ORIENT_TOP ELM_POPUP_ORIENT_CENTER diff -Nru python-efl-1.17.99~201312040125/efl/elementary/fileselector.pyx python-efl-1.8.2~201401231220/efl/elementary/fileselector.pyx --- python-efl-1.17.99~201312040125/efl/elementary/fileselector.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/fileselector.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -53,7 +53,7 @@ - ``activated`` - the user activated a file. This can happen by double-clicking or pressing Enter key. (**event_info** is a - pointer to the activated file path) + string with the activated file path) - ``selected`` - the user has clicked on a file (when not in folders-only mode) or directory (when in folders-only mode) - ``directory,open`` - the list has been populated with new @@ -61,6 +61,10 @@ - ``done`` - the user has clicked on the "ok" or "cancel" buttons (*event_info* is the selection's path) +For text, elm_layout_text_set() will work here on: + +- ``ok`` - OK button label if the ok button is set. (since 1.8) +- ``cancel`` - Cancel button label if the cancel button is set. (since 1.8) Enumerations ------------ @@ -81,6 +85,7 @@ """ from cpython cimport PyUnicode_AsUTF8String +from libc.stdint cimport uintptr_t from efl.eo cimport _object_mapping_register from efl.utils.conversions cimport _ctouni, eina_list_strings_to_python_list @@ -92,7 +97,7 @@ ELM_FILESELECTOR_LIST = enums.ELM_FILESELECTOR_LIST ELM_FILESELECTOR_GRID = enums.ELM_FILESELECTOR_GRID -def _cb_string_conv(long addr): +def _cb_string_conv(uintptr_t addr): cdef const_char *s = addr return _ctouni(s) if s is not NULL else None @@ -257,7 +262,8 @@ :py:attr:`selected_paths`. :type: bool - :since: 1.8 + + .. versionadded:: 1.8 """ def __set__(self, bint multi): @@ -299,7 +305,7 @@ property selected_paths: """A list of selected paths in the file selector. - It returns a list of the selected paths. This list pointer is only valid + It returns a list of the selected paths. This list is only valid so long as the selection doesn't change (no items are selected or unselected, or unselected implicitly by deletion). The list contains strings. The order of the items in this list is the order which @@ -313,7 +319,7 @@ :py:attr:`multi_select` :py:attr:`selected` - :since: 1.8 + .. versionadded:: 1.8 """ def __get__(self): @@ -338,7 +344,7 @@ :seealso: :py:func:`~efl.elementary.need.need_efreet` :seealso: :py:meth:`filters_clear` - :since: 1.8 + .. versionadded:: 1.8 """ mime_types_s = ",".join(mime_types) @@ -360,7 +366,7 @@ :seealso: :py:meth:`mime_types_filter_append` - :since: 1.8 + .. versionadded:: 1.8 """ elm_fileselector_filters_clear(self.obj) @@ -375,7 +381,7 @@ :type: bool - :since: 1.8 + .. versionadded:: 1.8 """ def __set__(self, bint visible): @@ -392,7 +398,7 @@ def callback_activated_add(self, func, *args, **kwargs): """the user activated a file. This can happen by double-clicking or pressing Enter key. (**event_info** is a - pointer to the activated file path).""" + string with the activated file path).""" self._callback_add_full("activated", _cb_string_conv, func, *args, **kwargs) @@ -430,7 +436,7 @@ def callback_done_add(self, func, *args, **kwargs): """The user has clicked on the "ok" or "cancel" buttons - (*event_info* is a pointer to the selection's path).""" + (*event_info* is a string with the selection's path).""" self._callback_add_full("done", _cb_string_conv, func, *args, **kwargs) diff -Nru python-efl-1.17.99~201312040125/efl/elementary/fileselector_button.pyx python-efl-1.8.2~201401231220/efl/elementary/fileselector_button.pyx --- python-efl-1.17.99~201312040125/efl/elementary/fileselector_button.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/fileselector_button.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -36,31 +36,33 @@ The following styles are available for this button: -- ``"default"`` -- ``"anchor"`` -- ``"hoversel_vertical"`` -- ``"hoversel_vertical_entry"`` +- ``default`` +- ``anchor`` +- ``hoversel_vertical`` +- ``hoversel_vertical_entry`` This widget emits the following signals, besides the ones sent from :py:class:`~efl.elementary.button.Button`: -- ``"file,chosen"`` - the user has selected a path which comes as the +- ``file,chosen`` - the user has selected a path which comes as the ``event_info`` data +- ``language,changed`` - the program's language changed Default text parts of the fileselector_button widget that you can use for are: -- "default" - Label of the fileselector_button +- ``default`` - Label of the fileselector_button Default content parts of the fileselector_button widget that you can use for are: -- "icon" - Icon of the fileselector_button +- ``icon`` - Icon of the fileselector_button """ from cpython cimport PyUnicode_AsUTF8String +from libc.stdint cimport uintptr_t from efl.eo cimport _object_mapping_register from efl.utils.conversions cimport _ctouni @@ -68,7 +70,7 @@ cimport enums -def _cb_string_conv(long addr): +def _cb_string_conv(uintptr_t addr): cdef const_char *s = addr return _ctouni(s) if s is not NULL else None @@ -269,5 +271,15 @@ def callback_file_chosen_del(self, func): self._callback_del_full("file,chosen", _cb_string_conv, func) + def callback_language_changed_add(self, func, *args, **kwargs): + """The program's language changed. + + .. versionadded:: 1.8.1 + + """ + self._callback_add("language,changed", func, *args, **kwargs) + + def callback_language_changed_del(self, func): + self._callback_del("language,changed", func) _object_mapping_register("Elm_Fileselector_Button", FileselectorButton) diff -Nru python-efl-1.17.99~201312040125/efl/elementary/fileselector_entry.pyx python-efl-1.8.2~201401231220/efl/elementary/fileselector_entry.pyx --- python-efl-1.17.99~201312040125/efl/elementary/fileselector_entry.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/fileselector_entry.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -26,9 +26,11 @@ This is an entry made to be filled with or display a file system path string. -Besides the entry itself, the widget has a :py:class:`FileselectorButton` -on its side, which will raise an internal :py:class:`Fileselector`, -when clicked, for path selection aided by file system navigation. +Besides the entry itself, the widget has a +:py:class:`~efl.elementary.fileselector_button.FileselectorButton` on its side, +which will raise an internal +:py:class:`~efl.elementary.fileselector.Fileselector`, when clicked, for path +selection aided by file system navigation. This file selector may appear in an Elementary window or in an inner window. When a file is chosen from it, the (inner) window @@ -41,55 +43,62 @@ Smart callbacks one can register to: -- ``"changed"`` - The text within the entry was changed -- ``"activated"`` - The entry has had editing finished and +- ``changed`` - The text within the entry was changed +- ``activated`` - The entry has had editing finished and changes are to be "committed" -- ``"press"`` - The entry has been clicked -- ``"longpressed"`` - The entry has been clicked (and held) for a +- ``press`` - The entry has been clicked +- ``longpressed`` - The entry has been clicked (and held) for a couple seconds -- ``"clicked"`` - The entry has been clicked -- ``"clicked,double"`` - The entry has been double clicked -- ``"focused"`` - The entry has received focus -- ``"unfocused"`` - The entry has lost focus -- ``"selection,paste"`` - A paste action has occurred on the +- ``clicked`` - The entry has been clicked +- ``clicked,double`` - The entry has been double clicked +- ``focused`` - The entry has received focus +- ``unfocused`` - The entry has lost focus +- ``selection,paste`` - A paste action has occurred on the entry -- ``"selection,copy"`` - A copy action has occurred on the entry -- ``"selection,cut"`` - A cut action has occurred on the entry -- ``"unpressed"`` - The file selector entry's button was released +- ``selection,copy`` - A copy action has occurred on the entry +- ``selection,cut`` - A cut action has occurred on the entry +- ``unpressed`` - The file selector entry's button was released after being pressed. -- ``"file,chosen"`` - The user has selected a path via the file +- ``file,chosen`` - The user has selected a path via the file selector entry's internal file selector, whose string comes as the ``event_info`` data. +- ``language,changed`` - the program's language changed Default text parts of the fileselector_button widget that you can use for are: -- "default" - Label of the fileselector_button +- ``default`` - Label of the fileselector_button Default content parts of the fileselector_entry widget that you can use for are: -- "button icon" - Button icon of the fileselector_entry +- ``button icon`` - Button icon of the fileselector_entry """ from cpython cimport PyUnicode_AsUTF8String +from libc.stdint cimport uintptr_t from efl.eo cimport _object_mapping_register from efl.utils.conversions cimport _ctouni from efl.evas cimport Object as evasObject -from object cimport Object +from layout_class cimport LayoutClass cimport enums -def _cb_string_conv(long addr): +def _cb_string_conv(uintptr_t addr): cdef const_char *s = addr return _ctouni(s) if s is not NULL else None -cdef class FileselectorEntry(Object): +cdef class FileselectorEntry(LayoutClass): - """This is the class that actually implements the widget.""" + """This is the class that actually implements the widget. + + .. versionchanged:: 1.8 + Inherits from LayoutClass. + + """ def __init__(self, evasObject parent, *args, **kwargs): self._set_obj(elm_fileselector_entry_add(parent.obj)) @@ -396,5 +405,15 @@ def callback_file_chosen_del(self, func): self._callback_del_full("file,chosen", _cb_string_conv, func) + def callback_language_changed_add(self, func, *args, **kwargs): + """The program's language changed. + + .. versionadded:: 1.8.1 + + """ + self._callback_add("language,changed", func, *args, **kwargs) + + def callback_language_changed_del(self, func): + self._callback_del("language,changed", func) _object_mapping_register("Elm_Fileselector_Entry", FileselectorEntry) diff -Nru python-efl-1.17.99~201312040125/efl/elementary/flip.pyx python-efl-1.8.2~201401231220/efl/elementary/flip.pyx --- python-efl-1.17.99~201312040125/efl/elementary/flip.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/flip.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -35,13 +35,13 @@ Signals that you can add callbacks for are: -- "animate,begin" - when a flip animation was started -- "animate,done" - when a flip animation is finished +- ``animate,begin`` - when a flip animation was started +- ``animate,done`` - when a flip animation is finished Default content parts of the flip widget that you can use for are: -- "front" - A front content of the flip -- "back" - A back content of the flip +- ``front`` - A front content of the flip +- ``back`` - A back content of the flip Enumerations @@ -268,6 +268,8 @@ Flips the front and back contents using the ``flip_mode`` animation. This effectively hides the currently visible content and shows the hidden one. + .. versionadded:: 1.8 + """ elm_flip_go_to(self.obj, front, flip_mode) diff -Nru python-efl-1.17.99~201312040125/efl/elementary/flipselector.pyx python-efl-1.8.2~201401231220/efl/elementary/flipselector.pyx --- python-efl-1.17.99~201312040125/efl/elementary/flipselector.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/flipselector.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -24,10 +24,10 @@ .. image:: /images/flipselector-preview.png :align: left -A flip selector is a widget to show a set of *text* items, one -at a time, with the same sheet switching style as the :py:class:`Clock` -widget, when one changes the current displaying sheet -(thus, the "flip" in the name). +A flip selector is a widget to show a set of *text* items, one at a time, with +the same sheet switching style as the :py:class:`~efl.elementary.clock.Clock` +widget, when one changes the current displaying sheet (thus, the "flip" in the +name). User clicks to flip sheets which are *held* for some time will make the flip selector to flip continuously and automatically for @@ -35,31 +35,29 @@ so that it helps the user to reach an item which is distant from the current selection. -This widget inherits from the :py:class:`Layout` one, so that all the -functions acting on it also work for flip selector objects. - This widget emits the following signals, besides the ones sent from -:py:class:`Layout`: +:py:class:`~efl.elementary.layout_class.LayoutClass`: -- ``"selected"`` - when the widget's selected text item is changed -- ``"overflowed"`` - when the widget's current selection is changed +- ``selected`` - when the widget's selected text item is changed +- ``overflowed`` - when the widget's current selection is changed from the first item in its list to the last -- ``"underflowed"`` - when the widget's current selection is changed +- ``underflowed`` - when the widget's current selection is changed from the last item in its list to the first - ``focused`` - When the flipselector has received focus. (since 1.8) - ``unfocused`` - When the flipselector has lost focus. (since 1.8) Available styles for it: -- ``"default"`` +- ``default`` Default text parts of the flipselector items that you can use for are: -- "default" - label of the flipselector item +- ``default`` - label of the flipselector item """ from cpython cimport PyUnicode_AsUTF8String +from libc.stdint cimport uintptr_t from efl.eo cimport _object_mapping_register from efl.utils.conversions cimport _ctouni @@ -68,7 +66,7 @@ from object_item cimport _object_item_to_python, _object_item_callback, \ _object_item_list_to_python, _object_item_callback2 -def _cb_object_item_conv(long addr): +def _cb_object_item_conv(uintptr_t addr): cdef Elm_Object_Item *it = addr return _object_item_to_python(it) @@ -95,7 +93,7 @@ """ The widget's list of labels to show will be appended with the - given value. If the user wishes so, a callback function pointer + given value. If the user wishes so, a callback function can be passed, which will get called when this same item is selected. @@ -142,12 +140,12 @@ self.label if self.label is not None else NULL, cb, self) - if item != NULL: - self._set_obj(item) - self._set_properties_from_keyword_args(self.kwargs) - return self - else: - return None + if item == NULL: + raise RuntimeError("The item could not be added to the widget.") + + self._set_obj(item) + self._set_properties_from_keyword_args(self.kwargs) + return self def prepend_to(self, FlipSelector flipselector not None): """prepend_to(FlipSelector flipselector) -> FlipSelectorItem @@ -171,12 +169,12 @@ self.label if self.label is not None else NULL, cb, self) - if item != NULL: - self._set_obj(item) - self._set_properties_from_keyword_args(self.kwargs) - return self - else: - return + if item == NULL: + raise RuntimeError("The item could not be added to the widget.") + + self._set_obj(item) + self._set_properties_from_keyword_args(self.kwargs) + return self property label: """The label of this item @@ -211,28 +209,26 @@ return bool(elm_flipselector_item_selected_get(self.item)) property prev: - """Gets the item before ``item`` in a flip selector widget's internal list of - items. + """Gets the item before ``item`` in a flip selector widget's internal + list of items. :type: :py:class:`FlipSelectorItem` - .. seealso:: :py:func:`item_next_get` - """ def __get__(self): - return _object_item_to_python(elm_flipselector_item_prev_get(self.item)) + return _object_item_to_python( + elm_flipselector_item_prev_get(self.item)) property next: - """Gets the item after ``item`` in a flip selector widget's - internal list of items. + """Gets the item after ``item`` in a flip selector widget's internal + list of items. :type: :py:class:`FlipSelectorItem` - .. seealso:: :py:func:`item_prev_get` - """ def __get__(self): - return _object_item_to_python(elm_flipselector_item_next_get(self.item)) + return _object_item_to_python( + elm_flipselector_item_next_get(self.item)) cdef class FlipSelector(Object): @@ -334,11 +330,9 @@ This list is *not* to be modified in any way and must not be freed. Use the list members with functions like - elm_object_item_text_set(), - elm_object_item_text_get(), - elm_object_item_del(), - elm_flipselector_item_selected_get(), - elm_flipselector_item_selected_set(). + :py:attr:`efl.elementary.object_item.ObjectItem.text`, + :py:meth:`efl.elementary.object_item.ObjectItem.delete`, + :py:attr:`FlipselectorItem.selected`. .. warning:: This list is only valid until ``obj`` object's internal items list is changed. It should be fetched again with another @@ -348,33 +342,38 @@ """ def __get__(self): - return tuple(_object_item_list_to_python(elm_flipselector_items_get(self.obj))) + return tuple(_object_item_list_to_python( + elm_flipselector_items_get(self.obj))) property first_item: """Get the first item in the given flip selector widget's list of items. - .. seealso:: :py:func:`item_append` - .. seealso:: :py:attr:`last_item` + .. seealso:: + :py:func:`item_append` + :py:attr:`last_item` :type: :py:class:`FlipSelectorItem` """ def __get__(self): - return _object_item_to_python(elm_flipselector_first_item_get(self.obj)) + return _object_item_to_python( + elm_flipselector_first_item_get(self.obj)) property last_item: """Get the last item in the given flip selector widget's list of items. - .. seealso:: :py:func:`item_prepend` - .. seealso:: :py:attr:`first_item` + .. seealso:: + :py:func:`item_prepend` + :py:attr:`first_item` :type: :py:class:`FlipSelectorItem` """ def __get__(self): - return _object_item_to_python(elm_flipselector_last_item_get(self.obj)) + return _object_item_to_python( + elm_flipselector_last_item_get(self.obj)) property selected_item: """Get the currently selected item in a flip selector widget. @@ -383,7 +382,8 @@ """ def __get__(self): - return _object_item_to_python(elm_flipselector_selected_item_get(self.obj)) + return _object_item_to_python( + elm_flipselector_selected_item_get(self.obj)) property first_interval: """The interval on time updates for a user mouse button hold on a @@ -439,7 +439,7 @@ def callback_focused_add(self, func, *args, **kwargs): """When the flipselector has received focus. - :since: 1.8 + .. versionadded:: 1.8 """ self._callback_add("focused", func, *args, **kwargs) @@ -449,7 +449,7 @@ def callback_unfocused_add(self, func, *args, **kwargs): """When the flipselector has lost focus. - :since: 1.8 + .. versionadded:: 1.8 """ self._callback_add("unfocused", func, *args, **kwargs) diff -Nru python-efl-1.17.99~201312040125/efl/elementary/frame.pyx python-efl-1.8.2~201401231220/efl/elementary/frame.pyx --- python-efl-1.17.99~201312040125/efl/elementary/frame.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/frame.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -36,20 +36,20 @@ - outdent_top - outdent_bottom -Of all this styles only default shows the title. +Out of all these styles only default shows the title. This widget emits the following signals, besides the ones sent from -:py:class:`elementary.layout.Layout`: +:py:class:`~efl.elementary.layout_class.LayoutClass`: -- ``"clicked"`` - The user has clicked the frame's label +- ``clicked`` - The user has clicked the frame's label Default content parts of the frame widget that you can use for are: -- "default" - A content of the frame +- ``default`` - A content of the frame Default text parts of the frame widget that you can use for are: -- "default" - Label of the frame +- ``default`` - Label of the frame """ diff -Nru python-efl-1.17.99~201312040125/efl/elementary/general.pxd python-efl-1.8.2~201401231220/efl/elementary/general.pxd --- python-efl-1.17.99~201312040125/efl/elementary/general.pxd 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/general.pxd 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -82,8 +82,8 @@ ctypedef Evas_Object * (*Elm_Tooltip_Item_Content_Cb) (void *data, Evas_Object *obj, Evas_Object *tooltip, void *item) # General - void elm_init(int argc, char** argv) - void elm_shutdown() + int elm_init(int argc, char** argv) + int elm_shutdown() void elm_run() nogil void elm_exit() diff -Nru python-efl-1.17.99~201312040125/efl/elementary/general.pyx python-efl-1.8.2~201401231220/efl/elementary/general.pyx --- python-efl-1.17.99~201312040125/efl/elementary/general.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/general.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -18,23 +18,59 @@ """ +.. _General: + +General +======= + +General Elementary API. Functions that don't relate to +Elementary objects specifically. + +Here are documented functions which init/shutdown the library, +that apply to generic Elementary objects, that deal with +configuration, et cetera. + + +.. _Fingers: + +Fingers +======= + +Elementary is designed to be finger-friendly for touchscreens, +and so in addition to scaling for display resolution, it can +also scale based on finger "resolution" (or size). You can then +customize the granularity of the areas meant to receive clicks +on touchscreens. + +Different profiles may have pre-set values for finger sizes. + + Enumerations ------------- +============ + .. _Elm_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 @@ -45,10 +81,47 @@ Quit when the application's last window is closed +.. _Elm_Policy_Exit: + +Exit policy types +----------------- + +Possible values for the ELM_POLICY_EXIT policy. + +.. data:: ELM_POLICY_EXIT_NONE + + Just quit the main loop on exit(). + +.. data:: ELM_POLICY_EXIT_WINDOWS_DEL + + Delete all the windows after quitting the main loop. + + +.. _Elm_Policy_Throttle: + +Throttle policy types +--------------------- + +Possible values for the #ELM_POLICY_THROTTLE policy. + +.. data:: ELM_POLICY_THROTTLE_CONFIG + + Do whatever elementary config is configured to do. + +.. data:: ELM_POLICY_THROTTLE_HIDDEN_ALWAYS + + Always throttle when all windows are no longer visible. + +.. data:: ELM_POLICY_THROTTLE_NEVER + + Never throttle when windows are all hidden, regardless of config settings. + + """ from cpython cimport PyObject, Py_INCREF, Py_DECREF, PyUnicode_AsUTF8String, \ PyMem_Malloc, PyMem_Free +from libc.stdint cimport uintptr_t from efl.evas cimport Object as evasObject @@ -67,10 +140,18 @@ cimport enums ELM_POLICY_QUIT = enums.ELM_POLICY_QUIT +ELM_POLICY_EXIT = enums.ELM_POLICY_EXIT +ELM_POLICY_THROTTLE = enums.ELM_POLICY_THROTTLE ELM_POLICY_QUIT_NONE = enums.ELM_POLICY_QUIT_NONE ELM_POLICY_QUIT_LAST_WINDOW_CLOSED = enums.ELM_POLICY_QUIT_LAST_WINDOW_CLOSED +ELM_POLICY_EXIT_NONE = enums.ELM_POLICY_EXIT_NONE +ELM_POLICY_EXIT_WINDOWS_DEL = enums.ELM_POLICY_EXIT_WINDOWS_DEL + +ELM_POLICY_THROTTLE_CONFIG = enums.ELM_POLICY_THROTTLE_CONFIG +ELM_POLICY_THROTTLE_HIDDEN_ALWAYS = enums.ELM_POLICY_THROTTLE_HIDDEN_ALWAYS +ELM_POLICY_THROTTLE_NEVER = enums.ELM_POLICY_THROTTLE_NEVER cdef class FontProperties(object): @@ -99,12 +180,21 @@ cdef int PY_EFL_ELM_LOG_DOMAIN = elm_log.eina_log_domain def init(): + """init() -> int + + Initialize Elementary + + :return int: The init counter value. - """Initialize Elementary""" + This function initializes Elementary and increments a counter of the number + of calls to it. It returns the new counter's value. + """ EINA_LOG_DOM_INFO(PY_EFL_ELM_LOG_DOMAIN, "Initializing efl.elementary", NULL) - # FIXME: Why pass the cl args to elm_init? + + # FIXME: Why are we passing the cl args to elm_init here? + cdef int argc, i, arg_len cdef char **argv, *arg @@ -118,29 +208,62 @@ argv[i] = PyMem_Malloc(arg_len + 1) memcpy(argv[i], arg, arg_len + 1) - elm_init(argc, argv) + return elm_init(argc, argv) def shutdown(): + """shutdown() -> int - """Shutdown Elementary""" + Shut down Elementary + :return int: The init counter value. + + This should be called at the end of your application, just before it ceases + to do any more processing. This will clean up any permanent resources your + application may have allocated via Elementary that would otherwise persist. + + .. note:: + + shutdown() will iterate main loop until all ecore_evas are freed. There + is a possibility to call your ecore callbacks(timer, animator, event, + job, and etc.) in shutdown() + + """ EINA_LOG_DOM_INFO(PY_EFL_ELM_LOG_DOMAIN, "Shutting down efl.elementary", NULL) - elm_shutdown() + return elm_shutdown() def run(): + """run() + + Run Elementary's main loop - """Begin main loop""" + This call should be issued just after all initialization is completed. This + function will not return until exit() is called. It will keep looping, + running the main (event/processing) loop for Elementary. + """ EINA_LOG_DOM_DBG(PY_EFL_ELM_LOG_DOMAIN, "Starting up main loop.", NULL) with nogil: elm_run() def exit(): + """exit() + Ask to exit Elementary's main loop - """Exit main loop""" + If this call is issued, it will flag the main loop to cease processing and + return back to its parent function (usually your elm_main() function). This + does not mean the main loop instantly quits. So your ecore callbacks(timer, + animator, event, job, and etc.) have chances to be called even after + exit(). + + .. note:: + + By using the appropriate #ELM_POLICY_QUIT on your Elementary + applications, you'll be able to get this function called automatically + for you. + """ EINA_LOG_DOM_DBG(PY_EFL_ELM_LOG_DOMAIN, "Ending main loop.", NULL) elm_exit() @@ -247,6 +370,8 @@ .. note:: Evas caches are flushed for every canvas associated with a window. + .. versionadded:: 1.8 + """ elm_cache_all_flush() @@ -263,6 +388,8 @@ :py:func:`font_fontconfig_name_get`, for one style only (single font instance, not family). + .. versionadded:: 1.8 + """ if isinstance(font, unicode): font = PyUnicode_AsUTF8String(font) cdef FontProperties ret = FontProperties.__new__() @@ -276,6 +403,8 @@ :param fp: the font properties struct + .. versionadded:: 1.8 + """ elm_font_properties_free(fp.efp) Py_DECREF(fp) @@ -295,6 +424,8 @@ :py:func:`font_properties_get`, for one style only (single font instance, not family). + .. versionadded:: 1.8 + """ cdef: unicode ret @@ -344,6 +475,8 @@ :param top: The root object + .. versionadded:: 1.8 + """ elm_object_tree_dump(top.obj) @@ -355,6 +488,8 @@ :param top: The root object :param path: The path of output file + .. versionadded:: 1.8 + """ if isinstance(path, unicode): path = PyUnicode_AsUTF8String(path) elm_object_tree_dot_dump(top.obj, path) diff -Nru python-efl-1.17.99~201312040125/efl/elementary/gengrid.pyx python-efl-1.8.2~201401231220/efl/elementary/gengrid.pyx --- python-efl-1.17.99~201312040125/efl/elementary/gengrid.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/gengrid.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -25,7 +25,7 @@ This widget aims to position objects in a grid layout while actually creating and rendering only the visible ones, using the same idea as the -:py:class:`efl.elementary.genlist.Genlist`: the user defines a **class** for +:py:class:`~efl.elementary.genlist.Genlist`: the user defines a **class** for each item, specifying functions that will be called at object creation, deletion, etc. When those items are selected by the user, a callback function is issued. Users may interact with a gengrid via the mouse (by @@ -40,7 +40,7 @@ If you wish to control the scolling behaviour using these functions, inherit both the widget class and the -:py:class:`Scrollable` class +:py:class:`~efl.elementary.scroller.Scrollable` class using multiple inheritance, for example:: class ScrollableGenlist(Genlist, Scrollable): @@ -83,7 +83,7 @@ A gengrid item may be at one of several styles. Elementary provides one by default - "default", but this can be extended by system or application custom themes/overlays/extensions (see -:py:class:`elementary.theme.Theme` for more details). +:py:class:`~efl.elementary.theme.Theme` for more details). Gengrid item classes ==================== @@ -108,19 +108,19 @@ the ``part`` one is the name string of one of the existing text parts in the Edje group implementing the item's theme. This function **must** return a strdup'()ed string, as the caller will free() it - when done. See #Elm_Gengrid_Item_Text_Get_Cb. + when done. See :py:meth:`GengridItem.text_get`. - ``func.content_get`` - This function is called when an item object is actually created. The ``data`` parameter will point to the same data - passed to elm_gengrid_item_append() and related item creation + passed to :py:meth:`GengridItem.append_to` and related item creation functions. The ``obj`` parameter is the gengrid object itself, while the ``part`` one is the name string of one of the existing (content) swallow parts in the Edje group implementing the item's theme. It must return ``None,`` when no content is desired, or a valid object handle, otherwise. The object will be deleted by the gengrid on its deletion - or when the item is "unrealized". See #Elm_Gengrid_Item_Content_Get_Cb. + or when the item is "unrealized". See :py:meth:`GengridItem.content_get`. - ``func.state_get`` - This function is called when an item object is actually created. The ``data`` parameter will point to the same data - passed to elm_gengrid_item_append() and related item creation + passed to :py:meth:`GengridItem.append_to` and related item creation functions. The ``obj`` parameter is the gengrid object itself, while the ``part`` one is the name string of one of the state parts in the Edje group implementing the item's theme. Return ``False`` for @@ -133,7 +133,7 @@ an item or elm_gengrid_clear() is called on the gengrid. This is intended for use when gengrid items are deleted, so any data attached to the item (e.g. its data parameter on creation) can be deleted. See - #Elm_Gengrid_Item_Del_Cb. + :py:meth:`GengridItem.delete`. Usage hints =========== @@ -191,8 +191,8 @@ has its implementing Evas object instantiated, de facto. ``event_info`` is the gengrid item that was created. The object may be deleted at any time, so it is highly advised to the - caller **not** to use the object pointer returned from - elm_gengrid_item_object_get(), because it may point to freed + caller **not** to use the object returned from + :py:attr:`GengridItem.object`, because it may point to freed objects. - ``unrealized`` - This is called when the implementing Evas object for this item is deleted. ``event_info`` is the gengrid @@ -277,9 +277,9 @@ """ include "tooltips.pxi" -include "cnp_callbacks.pxi" from libc.string cimport strdup +from libc.stdint cimport uintptr_t from cpython cimport Py_INCREF, Py_DECREF, PyUnicode_AsUTF8String from efl.eo cimport object_from_instance, _object_mapping_register, PY_REFCOUNT from efl.utils.conversions cimport _ctouni, _touni @@ -303,7 +303,7 @@ ELM_GENLIST_ITEM_SCROLLTO_TOP = enums.ELM_GENLIST_ITEM_SCROLLTO_TOP ELM_GENLIST_ITEM_SCROLLTO_MIDDLE = enums.ELM_GENLIST_ITEM_SCROLLTO_MIDDLE -def _cb_object_item_conv(long addr): +def _cb_object_item_conv(uintptr_t addr): cdef Elm_Object_Item *it = addr return _object_item_to_python(it) diff -Nru python-efl-1.17.99~201312040125/efl/elementary/gengrid_item.pxi python-efl-1.8.2~201401231220/efl/elementary/gengrid_item.pxi --- python-efl-1.17.99~201312040125/efl/elementary/gengrid_item.pxi 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/gengrid_item.pxi 2014-01-18 12:24:01.000000000 +0000 @@ -19,7 +19,7 @@ self.item = NULL def __init__(self, GengridItemClass item_class not None, item_data = None, \ - func = None, func_data = None): + func = None, func_data = None, *args, **kwargs): """ :param item_class: a valid instance that defines the @@ -48,14 +48,16 @@ self.cb_func = func self.item_data = item_data self.func_data = func_data + self.args = args + self.kwargs = kwargs def __repr__(self): return ("<%s(%#x, refcount=%d, Elm_Object_Item=%#x, " "item_class=%s, func=%s, item_data=%r)>") % \ (type(self).__name__, - self, + self, PY_REFCOUNT(self), - self.item, + self.item, type(self.item_class).__name__, self.cb_func, self.item_data) @@ -65,6 +67,8 @@ Append a new item (add as last item) to this gengrid. + .. versionadded:: 1.8 + """ cdef: Elm_Object_Item *item @@ -77,18 +81,20 @@ self.item_class.cls, self, cb, self) - if item != NULL: - self._set_obj(item) - return self - else: - Py_DECREF(self) - return None + if item == NULL: + raise RuntimeError("The item could not be added to the widget.") + + self._set_obj(item) + self._set_properties_from_keyword_args(self.kwargs) + return self def prepend_to(self, Gengrid gengrid not None): """item_prepend(Gengrid gengrid) -> GengridItem Prepend a new item (add as first item) to this gengrid. + .. versionadded:: 1.8 + """ cdef: Elm_Object_Item *item @@ -100,12 +106,12 @@ item = elm_gengrid_item_prepend(gengrid.obj, self.item_class.cls, self, cb, self) - if item != NULL: - self._set_obj(item) - return self - else: - Py_DECREF(self) - return None + if item == NULL: + raise RuntimeError("The item could not be added to the widget.") + + self._set_obj(item) + self._set_properties_from_keyword_args(self.kwargs) + return self def insert_before(self, GengridItem before not None): """insert_before(GengridItem before not None) -> GengridItem @@ -115,6 +121,8 @@ :param before: a reference item to use, the new item will be inserted before it. + .. versionadded:: 1.8 + """ cdef: Elm_Object_Item *item @@ -127,12 +135,12 @@ item = elm_gengrid_item_insert_before(gengrid.obj, self.item_class.cls, self, before.item, cb, self) - if item != NULL: - self._set_obj(item) - return self - else: - Py_DECREF(self) - return None + if item == NULL: + raise RuntimeError("The item could not be added to the widget.") + + self._set_obj(item) + self._set_properties_from_keyword_args(self.kwargs) + return self def insert_after(self, GengridItem after not None): """insert_after(GengridItem after not None) -> GengridItem @@ -142,6 +150,8 @@ :param after: a reference item to use, the new item will be inserted after it. + .. versionadded:: 1.8 + """ cdef: Elm_Object_Item *item @@ -154,12 +164,12 @@ item = elm_gengrid_item_insert_after(gengrid.obj, self.item_class.cls, self, after.item, cb, self) - if item != NULL: - self._set_obj(item) - return self - else: - Py_DECREF(self) - return None + if item == NULL: + raise RuntimeError("The item could not be added to the widget.") + + self._set_obj(item) + self._set_properties_from_keyword_args(self.kwargs) + return self def sorted_insert(self, Gengrid gengrid not None, compare_func not None): """insert_after(GengridItem after not None) -> GengridItem @@ -169,6 +179,8 @@ :param after: a reference item to use, the new item will be inserted after it. + .. versionadded:: 1.8 + """ cdef: Elm_Object_Item *item @@ -182,12 +194,12 @@ item = elm_gengrid_item_sorted_insert(gengrid.obj, self.item_class.cls, self, _gengrid_compare_cb, cb, self) - if item != NULL: - self._set_obj(item) - return self - else: - Py_DECREF(self) - return None + if item == NULL: + raise RuntimeError("The item could not be added to the widget.") + + self._set_obj(item) + self._set_properties_from_keyword_args(self.kwargs) + return self property data: """User data for the item.""" @@ -241,12 +253,10 @@ elm_gengrid_item_update(self.item) property selected: - """This sets the selected state of an item. If multi-selection is + """The selected state of an item. If multi-selection is not enabled on the containing gengrid and *selected* is ``True``, any other previously selected items will get unselected in favor of - this new one. - - .. seealso:: :py:func:`item_selected_get()` + a new one. """ def __get__(self): @@ -317,6 +327,7 @@ text if text is not None else NULL) def tooltip_text_set(self, text): + # TODO: document this if isinstance(text, unicode): text = PyUnicode_AsUTF8String(text) elm_gengrid_item_tooltip_text_set(self.item, text if text is not None else NULL) @@ -343,13 +354,19 @@ data = (func, self, args, kargs) Py_INCREF(data) + # FIXME: refleak? cbdata = data elm_gengrid_item_tooltip_content_cb_set(self.item, _tooltip_item_content_create, cbdata, _tooltip_item_data_del_cb) + @DEPRECATED("1.8", "Use tooltip_unset() instead") def item_tooltip_unset(self): + """item_tooltip_unset()""" + elm_gengrid_item_tooltip_unset(self.item) + + def tooltip_unset(self): """item_tooltip_unset() Unset tooltip from object diff -Nru python-efl-1.17.99~201312040125/efl/elementary/gengrid_item_class.pxi python-efl-1.8.2~201401231220/efl/elementary/gengrid_item_class.pxi --- python-efl-1.17.99~201312040125/efl/elementary/gengrid_item_class.pxi 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/gengrid_item_class.pxi 2014-01-18 12:24:01.000000000 +0000 @@ -119,9 +119,9 @@ "item_style=%r, text_get_func=%s, content_get_func=%s, " "state_get_func=%s, del_func=%s)>") % \ (type(self).__name__, - self, + self, PY_REFCOUNT(self), - self.cls, + self.cls, _ctouni(self.cls.item_style), self._text_get_func, self._content_get_func, @@ -129,15 +129,27 @@ self._del_func) def ref(self): - """Increase the C level reference count.""" + """Increase the C level reference count. + + .. versionadded:: 1.8 + + """ elm_gengrid_item_class_ref(self.cls) def unref(self): - """Decrease the C level reference count.""" + """Decrease the C level reference count. + + .. versionadded:: 1.8 + + """ elm_gengrid_item_class_unref(self.cls) def free(self): - """Free the C level struct.""" + """Free the C level struct. + + .. versionadded:: 1.8 + + """ elm_gengrid_item_class_free(self.cls) property item_style: diff -Nru python-efl-1.17.99~201312040125/efl/elementary/gengrid_widget.pxi python-efl-1.8.2~201401231220/efl/elementary/gengrid_widget.pxi --- python-efl-1.17.99~201312040125/efl/elementary/gengrid_widget.pxi 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/gengrid_widget.pxi 2014-01-18 12:24:01.000000000 +0000 @@ -1,3 +1,5 @@ +#include "cnp_callbacks.pxi" + cdef class Gengrid(Object): """This is the class that actually implements the widget.""" @@ -172,10 +174,10 @@ # XXX TODO elm_gengrid_item_sorted_insert() property selected_item: - """This returns the selected item in ``obj``. If multi selection is - enabled on ``obj`` (.. seealso:: :py:func:`multi_select_set()),` only - the first item in the list is selected, which might not be very - useful. For that case, see elm_gengrid_selected_items_get(). + """This returns the selected item. If multi selection is enabled + (:py:attr:`multi_select`), only the first item in the list is selected, + which might not be very useful. For that case, see + :py:attr:`selected_items`. :type: :py:class:`GengridItem` @@ -266,7 +268,7 @@ property item_size: """A gengrid, after creation, has still no information on the size to give to each of its cells. So, you most probably will end up - with squares one :ref:`Fingers` "finger" wide, the default + with squares one :ref:`finger ` wide, the default size. Use this property to force a custom size for you items, making them as big as you wish. @@ -439,7 +441,7 @@ :return: The item stored in the object at position ``nth`` or ``None``, if there's no item with that index (and on errors) - :since: 1.8 + .. versionadded:: 1.8 """ return _object_item_to_python(elm_gengrid_nth_item_get(self.obj, nth)) @@ -467,6 +469,8 @@ based if the coordinate is above or below all items respectively in the gengrid. + .. versionadded:: 1.8 + """ cdef: int xposret, yposret @@ -477,111 +481,111 @@ # - # Drag and Drop + # TODO: Drag and Drop # ============= - def drag_item_container_add(self, - double tm_to_anim, double tm_to_drag, - itemgetcb = None, - data_get = None): - """ - - Set a item container (list, genlist, grid) as source of drag - - :param tm_to_anim: Time period to wait before start animation. - :param tm_to_drag: Time period to wait before start draggind. - :param itemgetcb: Callback to get Evas_Object pointer for item at (x,y) - :param data_get: Callback to get drag info - - :raise RuntimeError: if setting drag source failed. - - :since: 1.8 - - """ - if itemgetcb is not None: - if not callable(itemgetcb): - raise TypeError("itemgetcb must be callable.") - self.data["xy_item_get_cb"] = itemgetcb - - self.data["item_container_data_get_cb"] = data_get - - if not elm_drag_item_container_add(self.obj, - tm_to_anim, - tm_to_drag, - py_elm_xy_item_get_cb if itemgetcb is not None else NULL, - py_elm_item_container_data_get_cb if data_get is not None else NULL): - raise RuntimeError - - def drag_item_container_del(self): - """ - - Deletes a item container from drag-source list - - :raise RuntimeError: if deleting drag source failed. - - :since: 1.8 - - """ - if not elm_drag_item_container_del(self.obj): - raise RuntimeError - - def drop_item_container_add(self, Elm_Sel_Format format, - itemgetcb = None, entercb = None, enterdata = None, - leavecb = None, leavedata = None, - poscb = None, posdata = None, dropcb = None, cbdata = None): - """ - - Set a item container (list, genlist, grid) as target for drop. - - :param format: The formats supported for dropping - :param itemgetcb: Callback to get Evas_Object pointer for item at (x,y) - :param entercb: The function to call when the object is entered with a drag - :param enterdata: The application data to pass to enterdata - :param leavecb: The function to call when the object is left with a drag - :param leavedata: The application data to pass to leavedata - :param poscb: The function to call when the object has a drag over it - :param posdata: The application data to pass to posdata - :param dropcb: The function to call when a drop has occurred - :param cbdata: The application data to pass to dropcb - - :raise RuntimeError: if setting drop target failed. - - :since: 1.8 - - """ - if itemgetcb is not None: - if not callable(itemgetcb): - raise TypeError("itemgetcb must be callable.") - self.data["xy_item_get_cb"] = itemgetcb - - self.data["drag_item_container_pos"] = poscb - self.data["drop_item_container_cb"] = dropcb - - if not elm_drop_item_container_add(self.obj, - format, - py_elm_xy_item_get_cb if itemgetcb is not None else NULL, - py_elm_drag_state_cb if entercb is not None else NULL, - enterdata if enterdata is not None else NULL, - py_elm_drag_state_cb if leavecb is not None else NULL, - leavedata if leavedata is not None else NULL, - py_elm_drag_item_container_pos if poscb is not None else NULL, - posdata if posdata is not None else NULL, - py_elm_drop_item_container_cb if dropcb is not None else NULL, - cbdata if cbdata is not None else NULL): - raise RuntimeError - - def drop_item_container_del(self): - """ - - Removes a container from list of drop tragets. - - :raise RuntimeError: if deleting drop target failed. - - :since: 1.8 - - """ - if not elm_drop_item_container_del(self.obj): - raise RuntimeError + # def drag_item_container_add(self, + # double tm_to_anim, double tm_to_drag, + # itemgetcb = None, + # data_get = None): + # """ + + # Set a item container (list, genlist, grid) as source of drag + + # :param tm_to_anim: Time period to wait before start animation. + # :param tm_to_drag: Time period to wait before start draggind. + # :param itemgetcb: Callback to get Evas object for item at (x,y) + # :param data_get: Callback to get drag info + + # :raise RuntimeError: if setting drag source failed. + + # :since: 1.8 + + # """ + # if itemgetcb is not None: + # if not callable(itemgetcb): + # raise TypeError("itemgetcb must be callable.") + # self.data["xy_item_get_cb"] = itemgetcb + + # self.data["item_container_data_get_cb"] = data_get + + # if not elm_drag_item_container_add(self.obj, + # tm_to_anim, + # tm_to_drag, + # py_elm_xy_item_get_cb if itemgetcb is not None else NULL, + # py_elm_item_container_data_get_cb if data_get is not None else NULL): + # raise RuntimeError + + # def drag_item_container_del(self): + # """ + + # Deletes a item container from drag-source list + + # :raise RuntimeError: if deleting drag source failed. + + # :since: 1.8 + + # """ + # if not elm_drag_item_container_del(self.obj): + # raise RuntimeError + + # def drop_item_container_add(self, Elm_Sel_Format format, + # itemgetcb = None, entercb = None, enterdata = None, + # leavecb = None, leavedata = None, + # poscb = None, posdata = None, dropcb = None, cbdata = None): + # """ + + # Set a item container (list, genlist, grid) as target for drop. + + # :param format: The formats supported for dropping + # :param itemgetcb: Callback to get Evas object for item at (x,y) + # :param entercb: The function to call when the object is entered with a drag + # :param enterdata: The application data to pass to enterdata + # :param leavecb: The function to call when the object is left with a drag + # :param leavedata: The application data to pass to leavedata + # :param poscb: The function to call when the object has a drag over it + # :param posdata: The application data to pass to posdata + # :param dropcb: The function to call when a drop has occurred + # :param cbdata: The application data to pass to dropcb + + # :raise RuntimeError: if setting drop target failed. + + # :since: 1.8 + + # """ + # if itemgetcb is not None: + # if not callable(itemgetcb): + # raise TypeError("itemgetcb must be callable.") + # self.data["xy_item_get_cb"] = itemgetcb + + # self.data["drag_item_container_pos"] = poscb + # self.data["drop_item_container_cb"] = dropcb + + # if not elm_drop_item_container_add(self.obj, + # format, + # py_elm_xy_item_get_cb if itemgetcb is not None else NULL, + # py_elm_drag_state_cb if entercb is not None else NULL, + # enterdata if enterdata is not None else NULL, + # py_elm_drag_state_cb if leavecb is not None else NULL, + # leavedata if leavedata is not None else NULL, + # py_elm_drag_item_container_pos if poscb is not None else NULL, + # posdata if posdata is not None else NULL, + # py_elm_drop_item_container_cb if dropcb is not None else NULL, + # cbdata if cbdata is not None else NULL): + # raise RuntimeError + + # def drop_item_container_del(self): + # """ + + # Removes a container from list of drop tragets. + + # :raise RuntimeError: if deleting drop target failed. + + # :since: 1.8 + + # """ + # if not elm_drop_item_container_del(self.obj): + # raise RuntimeError @@ -625,8 +629,8 @@ has its implementing Evas object instantiated, de facto. ``event_info`` is the gengrid item that was created. The object may be deleted at any time, so it is highly advised to the - caller **not** to use the object pointer returned from - elm_gengrid_item_object_get(), because it may point to freed + caller **not** to use the object returned from + :py:attr:`GengridItem.object`, because it may point to freed objects.""" self._callback_add_full("realized", _cb_object_item_conv, func, *args, **kwargs) @@ -822,7 +826,7 @@ def callback_focused_add(self, func, *args, **kwargs): """When the gengrid has received focus. - :since: 1.8 + .. versionadded:: 1.8 """ self._callback_add("focused", func, *args, **kwargs) @@ -832,7 +836,7 @@ def callback_unfocused_add(self, func, *args, **kwargs): """When the gengrid has lost focus. - :since: 1.8 + .. versionadded:: 1.8 """ self._callback_add("unfocused", func, *args, **kwargs) @@ -841,6 +845,12 @@ property scroller_policy: + """ + + .. deprecated:: 1.8 + You should combine with Scrollable class instead. + + """ def __get__(self): return self.scroller_policy_get() @@ -859,6 +869,12 @@ return (policy_h, policy_v) property bounce: + """ + + .. deprecated:: 1.8 + You should combine with Scrollable class instead. + + """ def __get__(self): return self.bounce_get() def __set__(self, value): diff -Nru python-efl-1.17.99~201312040125/efl/elementary/genlist.pyx python-efl-1.8.2~201401231220/efl/elementary/genlist.pyx --- python-efl-1.17.99~201312040125/efl/elementary/genlist.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/genlist.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -28,7 +28,7 @@ it was also made to be able to do tree structures. But the price to pay is more complexity when it comes to usage. If all you want is a simple list with icons and a single text, use the normal -:py:class:`elementary.list.List` object. +:py:class:`~efl.elementary.list.List` object. Genlist has a fairly large API, mostly because it's relatively complex, trying to be both expansive, powerful and efficient. First we will begin @@ -44,7 +44,7 @@ Genlist will call the functions in this struct (methods) when an item is "realized" (i.e., created dynamically, while the user is scrolling the grid). All objects will simply be deleted when no longer needed with -evas_object_del(). The #Elm_Genlist_Item_Class structure contains the +:py:meth:`~efl.evas.Object.delete`. :py:class:`GenlistItemClass` contains the following members: - ``item_style`` - This is a constant string and simply defines the name @@ -53,42 +53,41 @@ - ``decorate_item_style`` - This is a constant string and simply defines the name of the decorate mode item style. It is used to specify decorate mode item style. It can be used when you call - elm_genlist_item_decorate_mode_set(). + :py:attr:`GenlistItem.decorate_mode`. - ``decorate_all_item_style`` - This is a constant string and simply defines the name of the decorate all item style. It is used to specify decorate all item style. It can be used to set selection, checking and deletion mode. This is used when you call - elm_genlist_decorate_mode_set(). + :py:attr:`Genlist.decorate_mode`. - ``func`` - A struct with pointers to functions that will be called when an item is going to be actually created. All of them receive a ``data`` parameter that will point to the same data passed to - elm_genlist_item_append() and related item creation functions, and an + :py:meth:`GenlistItem.append_to` and related item creation functions, and an ``obj`` parameter that points to the genlist object itself. -The function pointers inside ``func`` are ``text_get,`` ``content_get,`` -``state_get`` and ``del.`` The 3 first functions also receive a ``part`` +The function pointers inside ``func`` are ``text_get``, ``content_get``, +``state_get`` and ``del``. The 3 first functions also receive a ``part`` parameter described below. A brief description of these functions follows: - ``text_get`` - The ``part`` parameter is the name string of one of the existing text parts in the Edje group implementing the item's theme. - This function **must** return a strdup'()ed string, as the caller will - free() it when done. See #Elm_Genlist_Item_Text_Get_Cb. + See :py:meth:`GenlistItemClass.text_get`. - ``content_get`` - The ``part`` parameter is the name string of one of the existing (content) swallow parts in the Edje group implementing the item's theme. It must return ``None``, when no content is desired, or a valid object handle, otherwise. The object will be deleted by the genlist on its deletion or when the item is "unrealized". See - #Elm_Genlist_Item_Content_Get_Cb. + :py:meth:`GenlistItemClass.content_get`. - ``func.state_get`` - The ``part`` parameter is the name string of one of the state parts in the Edje group implementing the item's theme. Return ``False`` for false/off or ``True`` for true/on. Genlists will emit a signal to its theming Edje object with ``"elm,state,xxx,active"`` and ``"elm"`` as "emission" and "source" arguments, respectively, when the state is true (the default is false), where ``xxx`` is the name of - the (state) part. See #Elm_Genlist_Item_State_Get_Cb. + the (state) part. See :py:meth:`GenlistItemClass.state_get`. - ``func.del`` - This is intended for use when genlist items are deleted, so any data attached to the item (e.g. its data parameter on creation) - can be deleted. See #Elm_Genlist_Item_Del_Cb. + can be deleted. See :py:meth:`GenlistItemClass.delete`. Available item styles: @@ -111,12 +110,12 @@ theming Edje object) and 0 or more **boolean states**, which have the behavior left to the user to define. The Edje part names for each of these properties will be looked up, in the theme file for the genlist, -under the Edje (string) data items named ``"labels",`` ``"contents"`` -and ``"states",`` respectively. For each of those properties, if more +under the Edje (string) data items named ``labels``, ``contents`` +and ``states``, respectively. For each of those properties, if more than one part is provided, they must have names listed separated by spaces in the data fields. For the default genlist item theme, we have -**one** text part (``"elm.text"),`` **two** content parts -(``"elm.swallow.icon"`` and ``"elm.swallow.end")`` and **no** state parts. +**one** text part (``elm.text``), **two** content parts +(``elm.swallow.icon`` and ``elm.swallow.end``) and **no** state parts. A genlist item may be at one of several styles. Elementary provides one by default - "default", but this can be extended by system or application @@ -141,25 +140,26 @@ data parameter will be the func_data parameter, ``obj`` be the genlist object and event_info will be the genlist item. -elm_genlist_item_append() adds an item to the end of the list, or if +:py:meth:`GenlistItem.append_to` adds an item to the end of the list, or if there is a parent, to the end of all the child items of the parent. -elm_genlist_item_prepend() is the same but adds to the beginning of -the list or children list. elm_genlist_item_insert_before() inserts at -item before another item and elm_genlist_item_insert_after() inserts after +:py:meth:`GenlistItem.prepend_to` is the same but adds to the beginning of +the list or children list. :py:meth:`GenlistItem.insert_before` inserts at +item before another item and :py:meth:`GenlistItem.insert_after` inserts after the indicated item. -The application can clear the list with elm_genlist_clear() which deletes -all the items in the list and elm_object_item_del() will delete a specific -item. elm_genlist_item_subitems_clear() will clear all items that are +The application can clear the list with :py:meth:`Genlist.clear` which deletes +all the items in the list and +:py:meth:`~efl.elementary.object_item.ObjectItem.delete` will delete a specific +item. :py:meth:`GenlistItem.subitems_clear` will clear all items that are children of the indicated parent item. To help inspect list items you can jump to the item at the top of the list -with elm_genlist_first_item_get() which will return the item pointer, and -similarly elm_genlist_last_item_get() gets the item at the end of the list. -elm_genlist_item_next_get() and elm_genlist_item_prev_get() get the next +with :py:attr:`Genlist.first_item` which will return the item pointer, and +similarly :py:attr:`Genlist.last_item` gets the item at the end of the list. +:py:attr:`GenlistItem.next` and :py:attr:`GenlistItem.prev` get the next and previous items respectively relative to the indicated item. Using these calls you can walk the entire item list/tree. Note that as a tree -the items are flattened in the list, so elm_genlist_item_parent_get() will +the items are flattened in the list, so :py:attr:`GenlistItem.parent` will let you know which item is the parent (and thus know how to skip them if wanted). @@ -167,37 +167,36 @@ =============== If the application wants multiple items to be able to be selected, -elm_genlist_multi_select_set() can enable this. If the list is -single-selection only (the default), then elm_genlist_selected_item_get() +:py:attr:`Genlist.multi_select` can enable this. If the list is +single-selection only (the default), then :py:attr:`Genlist.selected_item` will return the selected item, if any, or None if none is selected. If the -list is multi-select then elm_genlist_selected_items_get() will return a +list is multi-select then :py:attr:`Genlist.selected_items` will return a list (that is only valid as long as no items are modified (added, deleted, selected or unselected)). Usage hints =========== -There are also convenience functions. elm_object_item_widget_get() will -return the genlist object the item belongs to. elm_genlist_item_show() -will make the scroller scroll to show that specific item so its visible. -elm_object_item_data_get() returns the data pointer set by the item -creation functions. +There are also convenience functions. +:py:attr:`efl.elementary.object_item.ObjectItem.widget` will return the genlist +object the item belongs to. :py:meth:`GenlistItem.show` will make the scroller +scroll to show that specific item so its visible. +:py:attr:`efl.elementary.object_item.ObjectItem.data` returns the data pointer +set by the item creation functions. If an item changes (state of boolean changes, text or contents change), -then use elm_genlist_item_update() to have genlist update the item with +then use :py:meth:`GenlistItem.update` to have genlist update the item with the new state. Genlist will re-realize the item and thus call the functions in the _Elm_Genlist_Item_Class for that item. -To programmatically (un)select an item use elm_genlist_item_selected_set(). -To get its selected state use elm_genlist_item_selected_get(). Similarly -to expand/contract an item and get its expanded state, use -elm_genlist_item_expanded_set() and elm_genlist_item_expanded_get(). And -again to make an item disabled (unable to be selected and appear -differently) use elm_object_item_disabled_set() to set this and -elm_object_item_disabled_get() to get the disabled state. +Use :py:attr:`GenlistItem.selected` to programmatically (un)select an item or +get its selected state. Similarly to expand/contract an item and get its +expanded state, use :py:attr:`GenlistItem.expanded`. And again to make an item +disabled (unable to be selected and appear differently) use +:py:attr:`GenlistItem.disabled` to set this and get the disabled state. In general to indicate how the genlist should expand items horizontally to -fill the list area, use elm_genlist_mode_set(). Valid modes are +fill the list area, use :py:attr:`Genlist.mode`. Valid modes are ELM_LIST_LIMIT, ELM_LIST_COMPRESS and ELM_LIST_SCROLL. The default is ELM_LIST_SCROLL. This mode means that if items are too wide to fit, the scroller will scroll horizontally. Otherwise items are expanded to @@ -210,16 +209,17 @@ Items will only call their selection func and callback when first becoming selected. Any further clicks will do nothing, unless you enable always -select with elm_genlist_select_mode_set() as ELM_OBJECT_SELECT_MODE_ALWAYS. +select with :py:attr:`Genlist.select_mode` as ELM_OBJECT_SELECT_MODE_ALWAYS. This means even if selected, every click will make the selected callbacks -be called. elm_genlist_select_mode_set() as ELM_OBJECT_SELECT_MODE_NONE will +be called. :py:attr:`Genlist.select_mode` as ELM_OBJECT_SELECT_MODE_NONE will turn off the ability to select items entirely and they will neither appear selected nor call selected callback functions. -Remember that you can create new styles and add your own theme augmentation -per application with elm_theme_extension_add(). If you absolutely must -have a specific style that overrides any theme the user or system sets up -you can use elm_theme_overlay_add() to add such a file. +Remember that you can create new styles and add your own theme augmentation per +application with :py:meth:`efl.elementary.theme.Theme.extension_add`. If you +absolutely must have a specific style that overrides any theme the user or +system sets up you can use :py:meth:`efl.elementary.theme.Theme.overlay_add` to +add such a file. Scrollable Interface ==================== @@ -228,7 +228,7 @@ If you wish to control the scolling behaviour using these functions, inherit both the widget class and the -:py:class:`Scrollable` class +:py:class:`~efl.elementary.scroller.Scrollable` class using multiple inheritance, for example:: class ScrollableGenlist(Genlist, Scrollable): @@ -271,95 +271,95 @@ Signals that you can add callbacks for are: -- ``"activated"`` - The user has double-clicked or pressed +- ``activated`` - The user has double-clicked or pressed (enter|return|spacebar) on an item. The ``event_info`` parameter is the item that was activated. -- ``"clicked,double"`` - The user has double-clicked an item. The +- ``clicked,double`` - The user has double-clicked an item. The ``event_info`` parameter is the item that was double-clicked. -- ``"selected"`` - This is called when a user has made an item selected. +- ``selected`` - This is called when a user has made an item selected. The event_info parameter is the genlist item that was selected. -- ``"unselected"`` - This is called when a user has made an item +- ``unselected`` - This is called when a user has made an item unselected. The event_info parameter is the genlist item that was unselected. -- ``"expanded"`` - This is called when elm_genlist_item_expanded_set() is +- ``expanded`` - This is called when :py:attr:`GenlistItem.expanded` is called and the item is now meant to be expanded. The event_info parameter is the genlist item that was indicated to expand. It is the job of this callback to then fill in the child items. -- ``"contracted"`` - This is called when elm_genlist_item_expanded_set() is +- ``contracted`` - This is called when :py:attr:`GenlistItem.expanded` is called and the item is now meant to be contracted. The event_info parameter is the genlist item that was indicated to contract. It is the job of this callback to then delete the child items. -- ``"expand,request"`` - This is called when a user has indicated they want +- ``expand,request`` - This is called when a user has indicated they want to expand a tree branch item. The callback should decide if the item can - expand (has any children) and then call elm_genlist_item_expanded_set() + expand (has any children) and then call :py:attr:`GenlistItem.expanded` appropriately to set the state. The event_info parameter is the genlist item that was indicated to expand. -- ``"contract,request"`` - This is called when a user has indicated they +- ``contract,request`` - This is called when a user has indicated they want to contract a tree branch item. The callback should decide if the item can contract (has any children) and then call - elm_genlist_item_expanded_set() appropriately to set the state. The + :py:attr:`GenlistItem.expanded` appropriately to set the state. The event_info parameter is the genlist item that was indicated to contract. -- ``"realized"`` - This is called when the item in the list is created as a +- ``realized`` - This is called when the item in the list is created as a real evas object. event_info parameter is the genlist item that was created. -- ``"unrealized"`` - This is called just before an item is unrealized. +- ``unrealized`` - This is called just before an item is unrealized. After this call content objects provided will be deleted and the item object itself delete or be put into a floating cache. -- ``"drag,start,up"`` - This is called when the item in the list has been +- ``drag,start,up`` - This is called when the item in the list has been dragged (not scrolled) up. -- ``"drag,start,down"`` - This is called when the item in the list has been +- ``drag,start,down`` - This is called when the item in the list has been dragged (not scrolled) down. -- ``"drag,start,left"`` - This is called when the item in the list has been +- ``drag,start,left`` - This is called when the item in the list has been dragged (not scrolled) left. -- ``"drag,start,right"`` - This is called when the item in the list has +- ``drag,start,right`` - This is called when the item in the list has been dragged (not scrolled) right. -- ``"drag,stop"`` - This is called when the item in the list has stopped +- ``drag,stop`` - This is called when the item in the list has stopped being dragged. -- ``"drag"`` - This is called when the item in the list is being dragged. -- ``"longpressed"`` - This is called when the item is pressed for a certain +- ``drag`` - This is called when the item in the list is being dragged. +- ``longpressed`` - This is called when the item is pressed for a certain amount of time. By default it's 1 second. The event_info parameter is the longpressed genlist item. -- ``"scroll,anim,start"`` - This is called when scrolling animation has +- ``scroll,anim,start`` - This is called when scrolling animation has started. -- ``"scroll,anim,stop"`` - This is called when scrolling animation has +- ``scroll,anim,stop`` - This is called when scrolling animation has stopped. -- ``"scroll,drag,start"`` - This is called when dragging the content has +- ``scroll,drag,start`` - This is called when dragging the content has started. -- ``"scroll,drag,stop"`` - This is called when dragging the content has +- ``scroll,drag,stop`` - This is called when dragging the content has stopped. -- ``"edge,top"`` - This is called when the genlist is scrolled until +- ``edge,top`` - This is called when the genlist is scrolled until the top edge. -- ``"edge,bottom"`` - This is called when the genlist is scrolled +- ``edge,bottom`` - This is called when the genlist is scrolled until the bottom edge. -- ``"edge,left"`` - This is called when the genlist is scrolled +- ``edge,left`` - This is called when the genlist is scrolled until the left edge. -- ``"edge,right"`` - This is called when the genlist is scrolled +- ``edge,right`` - This is called when the genlist is scrolled until the right edge. -- ``"multi,swipe,left"`` - This is called when the genlist is multi-touch +- ``multi,swipe,left`` - This is called when the genlist is multi-touch swiped left. -- ``"multi,swipe,right"`` - This is called when the genlist is multi-touch +- ``multi,swipe,right`` - This is called when the genlist is multi-touch swiped right. -- ``"multi,swipe,up"`` - This is called when the genlist is multi-touch +- ``multi,swipe,up`` - This is called when the genlist is multi-touch swiped up. -- ``"multi,swipe,down"`` - This is called when the genlist is multi-touch +- ``multi,swipe,down`` - This is called when the genlist is multi-touch swiped down. -- ``"multi,pinch,out"`` - This is called when the genlist is multi-touch +- ``multi,pinch,out`` - This is called when the genlist is multi-touch pinched out. -- ``multi,pinch,in"`` - This is called when the genlist is multi-touch +- ``multi,pinch,in`` - This is called when the genlist is multi-touch pinched in. -- ``"swipe"`` - This is called when the genlist is swiped. -- ``"moved"`` - This is called when a genlist item is moved in reorder mode. -- ``"moved,after"`` - This is called when a genlist item is moved after +- ``swipe`` - This is called when the genlist is swiped. +- ``moved`` - This is called when a genlist item is moved in reorder mode. +- ``moved,after`` - This is called when a genlist item is moved after another item in reorder mode. The event_info parameter is the reordered - item. To get the relative previous item, use elm_genlist_item_prev_get(). + item. To get the relative previous item, use :py:attr:`GenlistItem.prev`. This signal is called along with "moved" signal. -- ``"moved,before"`` - This is called when a genlist item is moved before +- ``moved,before`` - This is called when a genlist item is moved before another item in reorder mode. The event_info parameter is the reordered - item. To get the relative previous item, use elm_genlist_item_next_get(). + item. To get the relative previous item, use :py:attr:`GenlistItem.next`. This signal is called along with "moved" signal. -- ``"language,changed"`` - This is called when the program's language is +- ``language,changed`` - This is called when the program's language is changed. -- ``"tree,effect,finished"`` - This is called when a genlist tree effect +- ``tree,effect,finished`` - This is called when a genlist tree effect is finished. - ``highlighted`` - an item in the list is highlighted. This is called when the user presses an item or keyboard selection is done so the item is @@ -507,6 +507,7 @@ include "tooltips.pxi" from cpython cimport PyUnicode_AsUTF8String, Py_DECREF, Py_INCREF +from libc.stdint cimport uintptr_t from efl.eo cimport _object_mapping_register, PY_REFCOUNT from efl.utils.conversions cimport _ctouni @@ -569,7 +570,7 @@ ELM_SEL_TYPE_XDND = enums.ELM_SEL_TYPE_XDND ELM_SEL_TYPE_CLIPBOARD = enums.ELM_SEL_TYPE_CLIPBOARD -def _cb_object_item_conv(long addr): +def _cb_object_item_conv(uintptr_t addr): cdef Elm_Object_Item *it = addr return _object_item_to_python(it) diff -Nru python-efl-1.17.99~201312040125/efl/elementary/genlist_item.pxi python-efl-1.8.2~201401231220/efl/elementary/genlist_item.pxi --- python-efl-1.17.99~201312040125/efl/elementary/genlist_item.pxi 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/genlist_item.pxi 2014-01-18 12:24:01.000000000 +0000 @@ -12,7 +12,7 @@ GenlistItemClass item_class not None, item_data=None, GenlistItem parent_item=None, Elm_Genlist_Item_Type flags=enums.ELM_GENLIST_ITEM_NONE, - func=None, func_data=None): + func=None, func_data=None, *args, **kwargs): """Create a new GenlistItem. :param item_data: Data that defines the model of this row. @@ -59,6 +59,8 @@ self.item_data = item_data self.cb_func = func self.func_data = func_data + self.args = args + self.kwargs = kwargs def __dealloc__(self): self.parent_item = NULL @@ -79,9 +81,9 @@ return ("<%s(%#x, refcount=%d, Elm_Object_Item=%#x, " "item_class=%s, func=%s, item_data=%r)>") % ( type(self).__name__, - self, + self, PY_REFCOUNT(self), - self.item, + self.item, type(self.item_class).__name__, self.cb_func, self.item_data @@ -110,12 +112,12 @@ self.flags, cb, self) - if item is not NULL: - self._set_obj(item) - return self - else: - Py_DECREF(self) - return None + if item == NULL: + raise RuntimeError("The item could not be added to the widget.") + + self._set_obj(item) + self._set_properties_from_keyword_args(self.kwargs) + return self def prepend_to(self, Genlist genlist not None): """prepend_to(Genlist genlist) -> GenlistItem @@ -140,12 +142,12 @@ self.flags, cb, self) - if item is not NULL: - self._set_obj(item) - return self - else: - Py_DECREF(self) - return None + if item == NULL: + raise RuntimeError("The item could not be added to the widget.") + + self._set_obj(item) + self._set_properties_from_keyword_args(self.kwargs) + return self def insert_before(self, GenlistItem before_item=None): """insert_before(GenlistItem before_item=None) -> GenlistItem @@ -174,12 +176,12 @@ self.flags, cb, self) - if item is not NULL: - self._set_obj(item) - return self - else: - Py_DECREF(self) - return None + if item == NULL: + raise RuntimeError("The item could not be added to the widget.") + + self._set_obj(item) + self._set_properties_from_keyword_args(self.kwargs) + return self def insert_after(self, GenlistItem after_item=None): """insert_after(GenlistItem after_item=None) -> GenlistItem @@ -208,12 +210,12 @@ self.flags, cb, self) - if item is not NULL: - self._set_obj(item) - return self - else: - Py_DECREF(self) - return None + if item == NULL: + raise RuntimeError("The item could not be added to the widget.") + + self._set_obj(item) + self._set_properties_from_keyword_args(self.kwargs) + return self def sorted_insert(self, Genlist genlist not None, comparison_func): """sorted_insert(Genlist genlist, comparison_func) -> GenlistItem @@ -258,12 +260,12 @@ _py_elm_genlist_compare_func, cb, self) - if item is not NULL: - self._set_obj(item) - return self - else: - Py_DECREF(self) - return None + if item == NULL: + raise RuntimeError("The item could not be added to the widget.") + + self._set_obj(item) + self._set_properties_from_keyword_args(self.kwargs) + return self property data: """User data for the item.""" @@ -604,7 +606,7 @@ The theme will respond to this change visually, and a signal "expanded" or "contracted" will be sent from the genlist with a - pointer to the item that has been expanded/contracted. + the item that has been expanded/contracted. Calling this function won't show or hide any child of this item (if it is a parent). You must manually delete and create them on the @@ -696,14 +698,14 @@ mode is activated on an item, any other selected item is immediately unselected. This feature provides an easy way of implementing a new kind of animation for selecting an item, without having to entirely - rewrite the item style theme. However, the elm_genlist_selected_* + rewrite the item style theme. However, the Genlist.selected_* API can't be used to get what item is activate for a mode. The current item style will still be used, but applying a genlist mode to an item will select it using a different kind of animation. - The current active item for a mode can be found by - elm_genlist_decorated_item_get(). + The current active item for a mode can be found at + :py:attr:`Genlist.decorated_item`. The characteristics of genlist mode are: @@ -724,7 +726,7 @@ :type: (unicode **decorate_it_type**, bool **decorate_it_set**) - .. seealso:: :py:attr:`mode` :py:attr:`decorated_item` + .. seealso:: :py:attr:`Genlist.mode` """ def __set__(self, value): diff -Nru python-efl-1.17.99~201312040125/efl/elementary/genlist_item_class.pxi python-efl-1.8.2~201401231220/efl/elementary/genlist_item_class.pxi --- python-efl-1.17.99~201312040125/efl/elementary/genlist_item_class.pxi 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/genlist_item_class.pxi 2014-01-18 12:24:01.000000000 +0000 @@ -132,9 +132,9 @@ "item_style=%r, text_get_func=%s, content_get_func=%s, " "state_get_func=%s, del_func=%s)>") % \ (type(self).__name__, - self, + self, PY_REFCOUNT(self), - self.cls, + self.cls, _ctouni(self.cls.item_style), self._text_get_func, self._content_get_func, @@ -142,15 +142,27 @@ self._del_func) def ref(self): - """Increase the C level reference count.""" + """Increase the C level reference count. + + .. versionadded:: 1.8 + + """ elm_genlist_item_class_ref(self.cls) def unref(self): - """Decrease the C level reference count.""" + """Decrease the C level reference count. + + .. versionadded:: 1.8 + + """ elm_genlist_item_class_unref(self.cls) def free(self): - """Free the C level struct.""" + """Free the C level struct. + + .. versionadded:: 1.8 + + """ elm_genlist_item_class_free(self.cls) property item_style: diff -Nru python-efl-1.17.99~201312040125/efl/elementary/genlist_widget.pxi python-efl-1.8.2~201401231220/efl/elementary/genlist_widget.pxi --- python-efl-1.17.99~201312040125/efl/elementary/genlist_widget.pxi 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/genlist_widget.pxi 2014-01-18 12:24:01.000000000 +0000 @@ -1,4 +1,4 @@ -include "cnp_callbacks.pxi" +#include "cnp_callbacks.pxi" cdef class Genlist(Object): @@ -322,15 +322,15 @@ return _object_item_to_python(elm_genlist_selected_item_get(self.obj)) property selected_items: - """It returns a list of the selected items. This list pointer is + """It returns a list of the selected items. This list is only valid so long as the selection doesn't change (no items are selected or unselected, or unselected implicitly by deletion). The - list contains genlist items pointers. The order of the items in this + list contains genlist items. The order of the items in this list is the order which they were selected, i.e. the first item in this list is the first item that was selected, and so on. .. note:: If not in multi-select mode, consider using function - elm_genlist_selected_item_get() instead. + :py:attr:`Genlist.selected_item` instead. .. seealso:: :py:attr:`multi_select` :py:attr:`selected_item` @@ -345,7 +345,7 @@ property realized_items: """This returns a list of the realized items in the genlist. The list - contains genlist item pointers. The list must be freed by the + contains genlist items. The list must be freed by the caller when done with eina_list_free(). The item pointers in the list are only valid so long as those items are not deleted or the genlist is not deleted. @@ -357,6 +357,8 @@ """ def __get__(self): return _object_item_list_to_python(elm_genlist_realized_items_get(self.obj)) + # XXX: Free the list? We could return a custom list-like object here + # that frees the C list in its __dealloc__ def realized_items_get(self): return _object_item_list_to_python(elm_genlist_realized_items_get(self.obj)) @@ -394,9 +396,9 @@ the original item data has changed and the changes are desired to be reflected. - To update just one item, use elm_genlist_item_update(). + To update just one item, use :py:meth:`Genlist.item_update`. - .. seealso:: :py:attr:`realized_items` :py:func:`item_update()` + .. seealso:: :py:attr:`realized_items` """ elm_genlist_realized_items_update(self.obj) @@ -643,7 +645,7 @@ :return: The item stored in the object at position ``nth`` or ``None``, if there's no item with that index (and on errors) - :since: 1.8 + .. versionadded:: 1.8 """ return _object_item_to_python(elm_genlist_nth_item_get(self.obj, nth)) @@ -662,6 +664,8 @@ key movement. Clicking on a focusable widget inside an item will couse this particular item to get focus as usual. + .. versionadded:: 1.8 + """ def __set__(self, bint enabled): elm_genlist_focus_on_selection_set(self.obj, enabled) @@ -670,111 +674,111 @@ return bool(elm_genlist_focus_on_selection_get(self.obj)) # - # Drag and Drop + # TODO: Drag and Drop # ============= - def drag_item_container_add(self, - double tm_to_anim, double tm_to_drag, - itemgetcb = None, - data_get = None): - """ - - Set a item container (list, genlist, grid) as source of drag - - :param tm_to_anim: Time period to wait before start animation. - :param tm_to_drag: Time period to wait before start draggind. - :param itemgetcb: Callback to get Evas_Object pointer for item at (x,y) - :param data_get: Callback to get drag info - - :raise RuntimeError: if setting drag source failed. - - :since: 1.8 - - """ - if itemgetcb is not None: - if not callable(itemgetcb): - raise TypeError("itemgetcb must be callable.") - self.data["xy_item_get_cb"] = itemgetcb - - self.data["item_container_data_get_cb"] = data_get - - if not elm_drag_item_container_add(self.obj, - tm_to_anim, - tm_to_drag, - py_elm_xy_item_get_cb if itemgetcb is not None else NULL, - py_elm_item_container_data_get_cb if data_get is not None else NULL): - raise RuntimeError - - def drag_item_container_del(self): - """ - - Deletes a item container from drag-source list - - :raise RuntimeError: if deleting drag source failed. - - :since: 1.8 - - """ - if not elm_drag_item_container_del(self.obj): - raise RuntimeError - - def drop_item_container_add(self, Elm_Sel_Format format, - itemgetcb = None, entercb = None, enterdata = None, - leavecb = None, leavedata = None, - poscb = None, posdata = None, dropcb = None, cbdata = None): - """ - - Set a item container (list, genlist, grid) as target for drop. - - :param format: The formats supported for dropping - :param itemgetcb: Callback to get Evas_Object pointer for item at (x,y) - :param entercb: The function to call when the object is entered with a drag - :param enterdata: The application data to pass to enterdata - :param leavecb: The function to call when the object is left with a drag - :param leavedata: The application data to pass to leavedata - :param poscb: The function to call when the object has a drag over it - :param posdata: The application data to pass to posdata - :param dropcb: The function to call when a drop has occurred - :param cbdata: The application data to pass to dropcb - - :raise RuntimeError: if setting drop target failed. - - :since: 1.8 - - """ - if itemgetcb is not None: - if not callable(itemgetcb): - raise TypeError("itemgetcb must be callable.") - self.data["xy_item_get_cb"] = itemgetcb - - self.data["drag_item_container_pos"] = poscb - self.data["drop_item_container_cb"] = dropcb - - if not elm_drop_item_container_add(self.obj, - format, - py_elm_xy_item_get_cb if itemgetcb is not None else NULL, - py_elm_drag_state_cb if entercb is not None else NULL, - enterdata if enterdata is not None else NULL, - py_elm_drag_state_cb if leavecb is not None else NULL, - leavedata if leavedata is not None else NULL, - py_elm_drag_item_container_pos if poscb is not None else NULL, - posdata if posdata is not None else NULL, - py_elm_drop_item_container_cb if dropcb is not None else NULL, - cbdata if cbdata is not None else NULL): - raise RuntimeError - - def drop_item_container_del(self): - """ - - Removes a container from list of drop tragets. - - :raise RuntimeError: if deleting drop target failed. - - :since: 1.8 - - """ - if not elm_drop_item_container_del(self.obj): - raise RuntimeError + # def drag_item_container_add(self, + # double tm_to_anim, double tm_to_drag, + # itemgetcb = None, + # data_get = None): + # """ + + # Set a item container (list, genlist, grid) as source of drag + + # :param tm_to_anim: Time period to wait before start animation. + # :param tm_to_drag: Time period to wait before start draggind. + # :param itemgetcb: Callback to get Evas object for item at (x,y) + # :param data_get: Callback to get drag info + + # :raise RuntimeError: if setting drag source failed. + + # :since: 1.8 + + # """ + # if itemgetcb is not None: + # if not callable(itemgetcb): + # raise TypeError("itemgetcb must be callable.") + # self.data["xy_item_get_cb"] = itemgetcb + + # self.data["item_container_data_get_cb"] = data_get + + # if not elm_drag_item_container_add(self.obj, + # tm_to_anim, + # tm_to_drag, + # py_elm_xy_item_get_cb if itemgetcb is not None else NULL, + # py_elm_item_container_data_get_cb if data_get is not None else NULL): + # raise RuntimeError + + # def drag_item_container_del(self): + # """ + + # Deletes a item container from drag-source list + + # :raise RuntimeError: if deleting drag source failed. + + # :since: 1.8 + + # """ + # if not elm_drag_item_container_del(self.obj): + # raise RuntimeError + + # def drop_item_container_add(self, Elm_Sel_Format format, + # itemgetcb = None, entercb = None, enterdata = None, + # leavecb = None, leavedata = None, + # poscb = None, posdata = None, dropcb = None, cbdata = None): + # """ + + # Set a item container (list, genlist, grid) as target for drop. + + # :param format: The formats supported for dropping + # :param itemgetcb: Callback to get Evas object for item at (x,y) + # :param entercb: The function to call when the object is entered with a drag + # :param enterdata: The application data to pass to enterdata + # :param leavecb: The function to call when the object is left with a drag + # :param leavedata: The application data to pass to leavedata + # :param poscb: The function to call when the object has a drag over it + # :param posdata: The application data to pass to posdata + # :param dropcb: The function to call when a drop has occurred + # :param cbdata: The application data to pass to dropcb + + # :raise RuntimeError: if setting drop target failed. + + # :since: 1.8 + + # """ + # if itemgetcb is not None: + # if not callable(itemgetcb): + # raise TypeError("itemgetcb must be callable.") + # self.data["xy_item_get_cb"] = itemgetcb + + # self.data["drag_item_container_pos"] = poscb + # self.data["drop_item_container_cb"] = dropcb + + # if not elm_drop_item_container_add(self.obj, + # format, + # py_elm_xy_item_get_cb if itemgetcb is not None else NULL, + # py_elm_drag_state_cb if entercb is not None else NULL, + # enterdata if enterdata is not None else NULL, + # py_elm_drag_state_cb if leavecb is not None else NULL, + # leavedata if leavedata is not None else NULL, + # py_elm_drag_item_container_pos if poscb is not None else NULL, + # posdata if posdata is not None else NULL, + # py_elm_drop_item_container_cb if dropcb is not None else NULL, + # cbdata if cbdata is not None else NULL): + # raise RuntimeError + + # def drop_item_container_del(self): + # """ + + # Removes a container from list of drop tragets. + + # :raise RuntimeError: if deleting drop target failed. + + # :since: 1.8 + + # """ + # if not elm_drop_item_container_del(self.obj): + # raise RuntimeError def callback_activated_add(self, func, *args, **kwargs): @@ -997,7 +1001,7 @@ def callback_focused_add(self, func, *args, **kwargs): """When the genlist has received focus. - :since: 1.8 + .. versionadded:: 1.8 """ self._callback_add("focused", func, *args, **kwargs) @@ -1007,7 +1011,7 @@ def callback_unfocused_add(self, func, *args, **kwargs): """When the genlist has lost focus. - :since: 1.8 + .. versionadded:: 1.8 """ self._callback_add("unfocused", func, *args, **kwargs) @@ -1015,6 +1019,12 @@ self._callback_del("unfocused", func) property scroller_policy: + """ + + .. deprecated:: 1.8 + You should combine with Scrollable class instead. + + """ def __get__(self): return self.scroller_policy_get() @@ -1033,6 +1043,12 @@ return (policy_h, policy_v) property bounce: + """ + + .. deprecated:: 1.8 + You should combine with Scrollable class instead. + + """ def __get__(self): return self.bounce_get() def __set__(self, value): diff -Nru python-efl-1.17.99~201312040125/efl/elementary/gesture_layer.pyx python-efl-1.8.2~201401231220/efl/elementary/gesture_layer.pyx --- python-efl-1.17.99~201312040125/efl/elementary/gesture_layer.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/gesture_layer.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -65,7 +65,7 @@ Note that we consider a flick as a line-gesture that should be completed in flick-time-limit as defined in -:py:class:`elementary.configuration.Configuration`. +:py:class:`~efl.elementary.configuration.Configuration`. ``Elm_Gesture_Zoom_Info`` is the info reported for ``ELM_GESTURE_ZOOM`` gesture. @@ -80,7 +80,7 @@ ended and starts again when fingers moved. Setting glayer_continues_enable to false in -:py:class:`elementary.configuration.Configuration` will change this +:py:class:`~efl.elementary.configuration.Configuration` will change this behavior so gesture starts when user touches (a *DOWN* event) touch-surface and ends when no fingers touches surface (a *UP* event). @@ -647,18 +647,19 @@ :param target: The target object to attach to this object. :type target: :py:class:`~efl.evas.Object` - :return: ``True``, on success, ``False`` otherwise. - :rtype: bool + .. versionchanged:: 1.8 + Raise RuntimeError on failure, instead of returning a bool """ - return bool(elm_gesture_layer_attach(self.obj, target.obj)) - + if not elm_gesture_layer_attach(self.obj, target.obj): + raise RuntimeError property line_min_length: """Gesture layer line min length of an object :type: int - :since: 1.8 + + .. versionadded:: 1.8 """ def __set__(self, int line_min_length): @@ -671,7 +672,8 @@ """Gesture layer zoom distance tolerance of an object :type: int - :since: 1.8 + + .. versionadded:: 1.8 """ def __set__(self, int zoom_distance_tolerance): @@ -684,7 +686,8 @@ """Gesture layer line distance tolerance of an object :type: int - :since: 1.8 + + .. versionadded:: 1.8 """ def __set__(self, int line_distance_tolerance): @@ -696,9 +699,10 @@ property line_angular_tolerance: """Gesture layer line angular tolerance of an object - :since: 1.8 :type: double + .. versionadded:: 1.8 + """ def __set__(self, double line_angular_tolerance): elm_gesture_layer_line_angular_tolerance_set(self.obj, line_angular_tolerance) @@ -710,7 +714,8 @@ """Gesture layer zoom wheel factor of an object :type: double - :since: 1.8 + + .. versionadded:: 1.8 """ def __set__(self, double zoom_wheel_factor): @@ -723,7 +728,8 @@ """Gesture layer zoom finger factor of an object :type: double - :since: 1.8 + + .. versionadded:: 1.8 """ def __set__(self, double zoom_finger_factor): @@ -736,7 +742,8 @@ """Gesture layer rotate angular tolerance of an object :type: double - :since: 1.8 + + .. versionadded:: 1.8 """ def __set__(self, double rotate_angular_tolerance): @@ -749,7 +756,8 @@ """Gesture layer flick time limit (in ms) of an object :type: int - :since: 1.8 + + .. versionadded:: 1.8 """ def __set__(self, unsigned int flick_time_limit_ms): @@ -762,7 +770,8 @@ """Gesture layer long tap start timeout of an object :type: double - :since: 1.8 + + .. versionadded:: 1.8 """ def __set__(self, double long_tap_start_timeout): @@ -775,7 +784,8 @@ """Gesture layer continues enable of an object :type: bool - :since: 1.8 + + .. versionadded:: 1.8 """ def __set__(self, continues_enable): @@ -788,7 +798,8 @@ """Gesture layer double tap timeout of an object :type: double - :since: 1.8 + + .. versionadded:: 1.8 """ def __set__(self, double double_tap_timeout): @@ -805,7 +816,8 @@ Set to ZERO if you want GLayer to use system finger size value (default) :type: int - :since: 1.8 + + .. versionadded:: 1.8 """ diff -Nru python-efl-1.17.99~201312040125/efl/elementary/glview.pyx python-efl-1.8.2~201401231220/efl/elementary/glview.pyx --- python-efl-1.17.99~201312040125/efl/elementary/glview.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/glview.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of diff -Nru python-efl-1.17.99~201312040125/efl/elementary/grid.pyx python-efl-1.8.2~201401231220/efl/elementary/grid.pyx --- python-efl-1.17.99~201312040125/efl/elementary/grid.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/grid.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of diff -Nru python-efl-1.17.99~201312040125/efl/elementary/hover.pyx python-efl-1.8.2~201401231220/efl/elementary/hover.pyx --- python-efl-1.17.99~201312040125/efl/elementary/hover.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/hover.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -45,25 +45,27 @@ This widget emits the following signals, besides the ones sent from :py:class:`~efl.elementary.layout_class.LayoutClass`: -- ``"clicked"`` - the user clicked the empty space in the hover to - dismiss -- ``"smart,changed"`` - a content object placed under the "smart" - policy was replaced to a new slot direction. +- ``clicked`` - the user clicked the empty space in the hover to + dismiss. +- ``dismissed`` - the user clicked the empty space in the hover to dismiss. + (since 1.8) +- ``smart,changed`` - a content object placed under the "smart" + policy was replaced to a new slot direction. - ``focused`` - When the hover has received focus. (since 1.8) - ``unfocused`` - When the hover has lost focus. (since 1.8) Default content parts of the hover widget that you can use for are: -- ``"left"`` -- ``"top-left"`` -- ``"top"`` -- ``"top-right"`` -- ``"right"`` -- ``"bottom-right"`` -- ``"bottom"`` -- ``"bottom-left"`` -- ``"middle"`` -- ``"smart"`` +- ``left`` +- ``top-left`` +- ``top`` +- ``top-right`` +- ``right`` +- ``bottom-right`` +- ``bottom`` +- ``bottom-left`` +- ``middle`` +- ``smart`` All directions may have contents at the same time, except for "smart". This is a special placement hint and its use case depends of the @@ -190,7 +192,7 @@ ELM_HOVER_AXIS_BOTH or ELM_HOVER_AXIS_NONE has the same effect and the returned position may be in either axis. - .. seealso:: :py:func:`part_content_set()` + .. seealso:: :py:meth:`~efl.elementary.object.Object.part_content_set` :param pref_axis: The preferred orientation axis for the hover object to use @@ -222,6 +224,17 @@ def callback_clicked_del(self, func): self._callback_del("clicked", func) + def callback_dismissed_add(self, func, *args, **kwargs): + """the user clicked the empty space in the hover to dismiss + + .. versionadded:: 1.8.1 + + """ + self._callback_add("dismissed", func, *args, **kwargs) + + def callback_dismissed_del(self, func): + self._callback_del("dismissed", func) + def callback_smart_changed_add(self, func, *args, **kwargs): """a content object placed under the "smart" policy was replaced to a new slot direction.""" @@ -233,7 +246,7 @@ def callback_focused_add(self, func, *args, **kwargs): """When the hover has received focus. - :since: 1.8 + .. versionadded:: 1.8 """ self._callback_add("focused", func, *args, **kwargs) @@ -243,7 +256,7 @@ def callback_unfocused_add(self, func, *args, **kwargs): """When the hover has lost focus. - :since: 1.8 + .. versionadded:: 1.8 """ self._callback_add("unfocused", func, *args, **kwargs) diff -Nru python-efl-1.17.99~201312040125/efl/elementary/hoversel.pyx python-efl-1.8.2~201401231220/efl/elementary/hoversel.pyx --- python-efl-1.17.99~201312040125/efl/elementary/hoversel.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/hoversel.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -33,21 +33,21 @@ hoversel menu (no more than 8), though is capable of many more. This widget emits the following signals, besides the ones sent from -:py:class:`elementary.button.Button`: +:py:class:`~efl.elementary.button.Button`: -- ``"clicked"`` - the user clicked the hoversel button and popped up - the sel -- ``"selected"`` - an item in the hoversel list is selected. event_info - is the item -- ``"dismissed"`` - the hover is dismissed +- ``clicked`` - the user clicked the hoversel button and popped up + the sel +- ``selected`` - an item in the hoversel list is selected. event_info + is the item +- ``dismissed`` - the hover is dismissed Default content parts of the hoversel widget that you can use for are: -- "icon" - An icon of the hoversel +- ``icon`` - An icon of the hoversel Default text parts of the hoversel widget that you can use for are: -- "default" - Label of the hoversel +- ``default`` - Label of the hoversel Enumerations @@ -73,6 +73,7 @@ """ from cpython cimport PyUnicode_AsUTF8String, Py_DECREF +from libc.stdint cimport uintptr_t from efl.eo cimport _object_mapping_register, object_from_instance from efl.utils.conversions cimport _ctouni @@ -87,7 +88,7 @@ ELM_ICON_FILE = enums.ELM_ICON_FILE ELM_ICON_STANDARD = enums.ELM_ICON_STANDARD -def _cb_object_item_conv(long addr): +def _cb_object_item_conv(uintptr_t addr): cdef Elm_Object_Item *it = addr return _object_item_to_python(it) @@ -104,9 +105,9 @@ def __init__(self, label = None, icon_file = None, icon_type = ELM_ICON_NONE, callback = None, cb_data = None, - *args, **kargs): + *args, **kwargs): """For more information on what ``icon_file`` and ``icon_type`` are, - see :py:class:`elementary.icon.Icon`. + see :py:class:`~efl.elementary.icon.Icon`. :param label: The text label to use for the item (None if not desired) :type label: string @@ -133,7 +134,7 @@ self.cb_func = callback self.cb_data = cb_data self.args = args - self.kwargs = kargs + self.kwargs = kwargs def add_to(self, Hoversel hoversel): """add_to(Hoversel hoversel) @@ -147,7 +148,7 @@ use :py:attr:`HoverselItem.icon` right after this function. :return: The item added. - :rtype: Elm_Object_Item + :rtype: HoverselItem """ cdef Evas_Smart_Cb cb = NULL @@ -160,13 +161,12 @@ self.icon_type, cb, self) - if item != NULL: - self._set_obj(item) - self._set_properties_from_keyword_args(self.kwargs) - return self - else: - # FIXME: raise RuntimeError? - return None + if item == NULL: + raise RuntimeError("The item could not be added to the widget.") + + self._set_obj(item) + self._set_properties_from_keyword_args(self.kwargs) + return self property icon: """This sets the icon for the given hoversel item. @@ -317,7 +317,7 @@ .. warning:: Should **not** be called while the hoversel is active; use :py:attr:`expanded` to check first. - .. seealso:: :py:func:`HoverselItem.delete()` + .. seealso:: :py:meth:`~efl.elementary.object_item.ObjectItem.delete` """ elm_hoversel_clear(self.obj) @@ -325,9 +325,9 @@ property items: """Get the list of items within the given hoversel. - .. seealso:: :py:func:`HoverselItem.add()` + .. seealso:: :py:func:`HoverselItem.add_to()` - :type: tuple of Elm_Object_Items + :type: tuple of :py:class:`HoverselItem`'s """ def __get__(self): diff -Nru python-efl-1.17.99~201312040125/efl/elementary/icon.pyx python-efl-1.8.2~201401231220/efl/elementary/icon.pyx --- python-efl-1.17.99~201312040125/efl/elementary/icon.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/icon.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -46,55 +46,55 @@ These are names for icons that were first intended to be used in toolbars, but can be used in many other places too: -- ``"home"`` -- ``"close"`` -- ``"apps"`` -- ``"arrow_up"`` -- ``"arrow_down"`` -- ``"arrow_left"`` -- ``"arrow_right"`` -- ``"chat"`` -- ``"clock"`` -- ``"delete"`` -- ``"edit"`` -- ``"refresh"`` -- ``"folder"`` -- ``"file"`` +- ``home`` +- ``close`` +- ``apps`` +- ``arrow_up`` +- ``arrow_down`` +- ``arrow_left`` +- ``arrow_right`` +- ``chat`` +- ``clock`` +- ``delete`` +- ``edit`` +- ``refresh`` +- ``folder`` +- ``file`` These are names for icons that were designed to be used in menus (but again, you can use them anywhere else): -- ``"menu/home"`` -- ``"menu/close"`` -- ``"menu/apps"`` -- ``"menu/arrow_up"`` -- ``"menu/arrow_down"`` -- ``"menu/arrow_left"`` -- ``"menu/arrow_right"`` -- ``"menu/chat"`` -- ``"menu/clock"`` -- ``"menu/delete"`` -- ``"menu/edit"`` -- ``"menu/refresh"`` -- ``"menu/folder"`` -- ``"menu/file"`` +- ``menu/home`` +- ``menu/close`` +- ``menu/apps`` +- ``menu/arrow_up`` +- ``menu/arrow_down`` +- ``menu/arrow_left`` +- ``menu/arrow_right`` +- ``menu/chat`` +- ``menu/clock`` +- ``menu/delete`` +- ``menu/edit`` +- ``menu/refresh`` +- ``menu/folder`` +- ``menu/file`` And these are names for some media player specific icons: -- ``"media_player/forward"`` -- ``"media_player/info"`` -- ``"media_player/next"`` -- ``"media_player/pause"`` -- ``"media_player/play"`` -- ``"media_player/prev"`` -- ``"media_player/rewind"`` -- ``"media_player/stop"`` +- ``media_player/forward`` +- ``media_player/info`` +- ``media_player/next`` +- ``media_player/pause`` +- ``media_player/play`` +- ``media_player/prev`` +- ``media_player/rewind`` +- ``media_player/stop`` This widget emits the following signals, besides the ones sent from :py:class:`~efl.elementary.image.Image`: -- ``"thumb,done"`` - Setting :py:attr:`thumb` has completed with success -- ``"thumb,error"`` - Setting :py:attr:`thumb` has failed +- ``thumb,done`` - Setting :py:attr:`~Icon.thumb` has completed with success +- ``thumb,error`` - Setting :py:attr:`~Icon.thumb` has failed Enumerations @@ -170,14 +170,12 @@ """Set the file (and edje group) that will be used, but use a generated thumbnail. - This functions like :py:attr:`elementary.image.Image.file` but + This functions like :py:attr:`~efl.elementary.image.Image.file` but requires the Ethumb library support to be enabled successfully with :py:func:`efl.elementary.need.need_ethumb`. When set the file indicated has a thumbnail generated and cached on disk for future use or will directly use an existing cached thumbnail if it is valid. - .. seealso:: :py:attr:`~efl.elementary.image.Image.file` - :type: string ``file`` or tuple(string ``file``, string ``group``) """ @@ -225,6 +223,10 @@ :return bool: For 1.7 compatibility standard_set() returns a bool value that tells whether setting the standard name was succesful or not. + .. versionchanged:: 1.8 + Raises RuntimeWarning when setting the standard name fails, + instead of returning a bool. + """ def __get__(self): return _ctouni(elm_icon_standard_get(self.obj)) diff -Nru python-efl-1.17.99~201312040125/efl/elementary/image.pyx python-efl-1.8.2~201401231220/efl/elementary/image.pyx --- python-efl-1.17.99~201312040125/efl/elementary/image.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/image.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -39,18 +39,18 @@ - aspect ratio during resizes, etc. An image object may also be made valid source and destination for drag -and drop actions by setting :py:attr:`editable`. +and drop actions by setting :py:attr:`~Image.editable`. Signals that you can add callbacks for are: -- ``"drop"`` - This is called when a user has dropped an image - typed object onto the object in question -- the - event info argument is the path to that image file -- ``"clicked"`` - This is called when a user has clicked the image -- ``"download,start"`` - remote url download has started -- ``"download,progress"`` - url download in progress -- ``"download,end"`` - remote url download has finished -- ``"download,error"`` - remote url download has finished with errors +- ``drop`` - This is called when a user has dropped an image + typed object onto the object in question -- the + event info argument is the path to that image file +- ``clicked`` - This is called when a user has clicked the image +- ``download,start`` - remote url download has started +- ``download,progress`` - url download in progress +- ``download,end`` - remote url download has finished +- ``download,error`` - remote url download has finished with errors Enumerations ------------ @@ -95,6 +95,7 @@ """ from cpython cimport PyUnicode_AsUTF8String +from libc.stdint cimport uintptr_t from efl.eo cimport _object_mapping_register, object_from_instance from efl.utils.conversions cimport _ctouni @@ -111,7 +112,7 @@ ELM_IMAGE_FLIP_TRANSPOSE = enums.ELM_IMAGE_FLIP_TRANSPOSE ELM_IMAGE_FLIP_TRANSVERSE = enums.ELM_IMAGE_FLIP_TRANSVERSE -def _cb_string_conv(long addr): +def _cb_string_conv(uintptr_t addr): cdef const_char *s = addr return _ctouni(s) if s is not NULL else None @@ -124,12 +125,14 @@ :var now: The amount of data received so far. :var total: The total amount of data to download. + .. versionadded:: 1.8 + """ def __init__(self): self.now = 0 self.total = 0 -def _image_download_progress_conv(long addr): +def _image_download_progress_conv(uintptr_t addr): cdef Elm_Image_Progress *ip = addr ipi = ImageProgressInfo() ipi.now = ip.now @@ -143,14 +146,16 @@ by Image when fail to download remote urls. :var status: The http error code (such as 401) - :var open_error: TODOC + :var open_error: TODO + + .. versionadded:: 1.8 """ def __init__(self): self.status = 0 self.open_error = False -def _image_download_error_conv(long addr): +def _image_download_error_conv(uintptr_t addr): cdef Elm_Image_Error *ie = addr iei = ImageErrorInfo() iei.status = ie.status @@ -182,6 +187,10 @@ :type: unicode **file** or (unicode **file**, unicode **group**) :raise RuntimeError: when setting the file fails + .. versionchanged:: 1.8 + Raises RuntimeError when setting the file fails, instead of + returning a bool. + """ def __set__(self, value): if isinstance(value, tuple): @@ -542,28 +551,44 @@ self._callback_del_full("drop", _cb_string_conv, func) def callback_download_start_add(self, func, *args, **kwargs): - """This is called when you set a remote url and the download start""" + """This is called when you set a remote url and the download start + + .. versionadded:: 1.8 + + """ self._callback_add("download,start", func, *args, **kwargs) def callback_download_start_del(self, func): self._callback_del("download,start", func) def callback_download_progress_add(self, func, *args, **kwargs): - """This is called while a remote image download is in progress""" + """This is called while a remote image download is in progress + + .. versionadded:: 1.8 + + """ self._callback_add_full("download,progress", _image_download_progress_conv, func, *args, **kwargs) def callback_download_progress_del(self, func): self._callback_del_full("download,progress", _image_download_progress_conv, func) def callback_download_done_add(self, func, *args, **kwargs): - """This is called when you set a remote url and the download finish""" + """This is called when you set a remote url and the download finish + + .. versionadded:: 1.8 + + """ self._callback_add("download,done", func, *args, **kwargs) def callback_download_done_del(self, func): self._callback_del("download,end", func) def callback_download_error_add(self, func, *args, **kwargs): - """This is called in case a download has errors""" + """This is called in case a download has errors + + .. versionadded:: 1.8 + + """ self._callback_add_full("download,error", _image_download_error_conv, func, *args, **kwargs) def callback_download_error_del(self, func): diff -Nru python-efl-1.17.99~201312040125/efl/elementary/index.pyx python-efl-1.8.2~201401231220/efl/elementary/index.pyx --- python-efl-1.17.99~201312040125/efl/elementary/index.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/index.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -34,42 +34,43 @@ default theme, it's an area one ``finger`` wide on the right side of the index widget's container. -When items on the index are selected, smart callbacks get -called, so that its user can make other container objects to -show a given area or child object depending on the index item -selected. You'd probably be using an index together with :py:class:`List`, -:py:class:`Genlist` or :py:class:`Gengrid`. +When items on the index are selected, smart callbacks get called, so that its +user can make other container objects to show a given area or child object +depending on the index item selected. You'd probably be using an index together +with :py:class:`~efl.elementary.list.List`, +:py:class:`~efl.elementary.genlist.Genlist` or +:py:class:`~efl.elementary.gengrid.Gengrid`. This widget emits the following signals, besides the ones sent from -:py:class:`elementary.layout.Layout`: +:py:class:`~efl.elementary.layout_class.LayoutClass`: -- ``"changed"`` - When the selected index item changes. ``event_info`` - is the selected item's data pointer. -- ``"delay,changed"`` - When the selected index item changes, but +- ``changed`` - When the selected index item changes. ``event_info`` + is the selected item's data. +- ``delay,changed`` - When the selected index item changes, but after a small idling period. ``event_info`` is the selected - item's data pointer. -- ``"selected"`` - When the user releases a mouse button and - selects an item. ``event_info`` is the selected item's data - pointer. -- ``"level,up"`` - when the user moves a finger from the first + item's data. +- ``selected`` - When the user releases a mouse button and + selects an item. ``event_info`` is the selected item's data. +- ``level,up`` - when the user moves a finger from the first level to the second level -- ``"level,down"`` - when the user moves a finger from the second +- ``level,down`` - when the user moves a finger from the second level to the first level -- ``"language,changed"`` - the program's language changed +- ``language,changed`` - the program's language changed - ``focused`` - When the index has received focus. (since 1.8) - ``unfocused`` - When the index has lost focus. (since 1.8) -The ``"delay,changed"`` event is so that it'll wait a small time -before actually reporting those events and, moreover, just the -last event happening on those time frames will actually be -reported. +The ``delay,changed`` event has a delay on change before the event is actually +reported and moreover just the last event happening on those time frames will +actually be reported. """ from cpython cimport PyUnicode_AsUTF8String, Py_DECREF +from libc.stdint cimport uintptr_t from efl.eo cimport _object_mapping_register from efl.utils.conversions cimport _ctouni +from efl.utils.deprecated cimport DEPRECATED from efl.evas cimport Object as evasObject from layout_class cimport LayoutClass from object_item cimport _object_item_callback, _object_item_to_python, \ @@ -77,7 +78,7 @@ import traceback -def _cb_object_item_conv(long addr): +def _cb_object_item_conv(uintptr_t addr): cdef Elm_Object_Item *it = addr return _object_item_to_python(it) @@ -186,13 +187,12 @@ self.letter if self.letter is not None else NULL, cb, self) - if item != NULL: - self._set_obj(item) - self._set_properties_from_keyword_args(self.kwargs) - return self - else: - # FIXME: raise RuntimeError? - return None + if item == NULL: + raise RuntimeError("The item could not be added to the widget.") + + self._set_obj(item) + self._set_properties_from_keyword_args(self.kwargs) + return self def prepend_to(self, Index index not None): """ @@ -212,13 +212,12 @@ self.letter if self.letter is not None else NULL, cb, self) - if item != NULL: - self._set_obj(item) - self._set_properties_from_keyword_args(self.kwargs) - return self - else: - # FIXME: raise RuntimeError? - return None + if item == NULL: + raise RuntimeError("The item could not be added to the widget.") + + self._set_obj(item) + self._set_properties_from_keyword_args(self.kwargs) + return self def insert_after(self, IndexItem after not None): """ @@ -239,13 +238,12 @@ self.letter if self.letter is not None else NULL, cb, self) - if item != NULL: - self._set_obj(item) - self._set_properties_from_keyword_args(self.kwargs) - return self - else: - # FIXME: raise RuntimeError? - return None + if item == NULL: + raise RuntimeError("The item could not be added to the widget.") + + self._set_obj(item) + self._set_properties_from_keyword_args(self.kwargs) + return self def insert_before(self, IndexItem before not None): """ @@ -266,13 +264,12 @@ self.letter if self.letter is not None else NULL, cb, self) - if item != NULL: - self._set_obj(item) - self._set_properties_from_keyword_args(self.kwargs) - return self - else: - # FIXME: raise RuntimeError? - return None + if item == NULL: + raise RuntimeError("The item could not be added to the widget.") + + self._set_obj(item) + self._set_properties_from_keyword_args(self.kwargs) + return self def insert_sorted(self, Index index not None, compare_func, data_compare_func = None): """ @@ -287,7 +284,7 @@ data item should be pointed to by the index item in question, ``cmp_data_func`` will be used. If ``cmp_data_func`` returns a non-negative value, the previous index item data will be - replaced by the given ``item`` pointer. If the previous data need + replaced by the given ``item``. If the previous data need to be freed, it should be done by the ``cmp_data_func`` function, because all references to it will be lost. If this function is not provided (``None`` is given), index items will @@ -307,13 +304,12 @@ cb, self, _index_compare_func, _index_data_compare_func) - if item != NULL: - self._set_obj(item) - self._set_properties_from_keyword_args(self.kwargs) - return self - else: - # FIXME: raise RuntimeError? - return None + if item == NULL: + raise RuntimeError("The item could not be added to the widget.") + + self._set_obj(item) + self._set_properties_from_keyword_args(self.kwargs) + return self property selected: """Set the selected state of an item. @@ -350,11 +346,6 @@ def letter_get(self): return _ctouni(elm_index_item_letter_get(self.item)) -cdef Elm_Object_Item *_elm_index_item_from_python(IndexItem item): - if item is None: - return NULL - else: - return item.item cdef class Index(LayoutClass): @@ -453,18 +444,20 @@ """ return IndexItem(letter, callback, *args, **kargs).insert_before(before) - #def item_sorted_insert(self, letter, callback = None, *args, **kargs): - """Insert a new item into the given index widget, using ``cmp_func`` - function to sort items (by item handles). + # TODO: + # def item_sorted_insert(self, letter, callback = None, *args, **kargs): + # """Insert a new item into the given index widget, using ``cmp_func`` + # function to sort items (by item handles). - A constructor for :py:class:`IndexItem` + # A constructor for :py:class:`IndexItem` - :see: :py:func:`IndexItem.insert_sorted` + # :see: :py:func:`IndexItem.insert_sorted` - """ - #return IndexItem(ELM_INDEX_ITEM_INSERT_SORTED, self, letter, - #None, callback, *args, **kargs) + # """ + # return IndexItem(ELM_INDEX_ITEM_INSERT_SORTED, self, letter, + # None, callback, *args, **kargs) + @DEPRECATED("1.8", "Broken, don't use.") def item_find(self, data): """item_find(data) -> IndexItem @@ -484,8 +477,9 @@ Removes **all** items from a given index widget. - If deletion callbacks are set, via :py:func:`delete_cb_set()`, - that callback function will be called for each item. + If deletion callbacks are set, via + :py:meth:`efl.elementary.object_item.ObjectItem.delete_cb_set`, that + callback function will be called for each item. """ elm_index_item_clear(self.obj) @@ -550,6 +544,8 @@ .. note:: Delay time is 0.2 sec by default. + .. versionadded:: 1.8 + """ def __set__(self, double delay_change_time): elm_index_delay_change_time_set(self.obj, delay_change_time) @@ -568,6 +564,8 @@ :type: bool + .. versionadded:: 1.8 + """ def __set__(self, bint enabled): elm_index_omit_enabled_set(self.obj, enabled) @@ -631,7 +629,7 @@ def callback_focused_add(self, func, *args, **kwargs): """When the index has received focus. - :since: 1.8 + .. versionadded:: 1.8 """ self._callback_add("focused", func, *args, **kwargs) @@ -641,7 +639,7 @@ def callback_unfocused_add(self, func, *args, **kwargs): """When the index has lost focus. - :since: 1.8 + .. versionadded:: 1.8 """ self._callback_add("unfocused", func, *args, **kwargs) diff -Nru python-efl-1.17.99~201312040125/efl/elementary/innerwindow.pyx python-efl-1.8.2~201401231220/efl/elementary/innerwindow.pyx --- python-efl-1.17.99~201312040125/efl/elementary/innerwindow.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/innerwindow.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -34,13 +34,14 @@ visibility again. There are three styles available in the default theme. These are: - - default: The inwin is sized to take over most of the window it's - placed in. - - minimal: The size of the inwin will be the minimum necessary to show - its contents. - - minimal_vertical: Horizontally, the inwin takes as much space as - possible, but it's sized vertically the most it needs to fit its - contents. + +- default: The inwin is sized to take over most of the window it's + placed in. +- minimal: The size of the inwin will be the minimum necessary to show + its contents. +- minimal_vertical: Horizontally, the inwin takes as much space as + possible, but it's sized vertically the most it needs to fit its + contents. """ @@ -62,9 +63,10 @@ Activates an inwin object, ensuring its visibility - This function will make sure that the inwin is completely visible - by calling :py:func:`show()` and :py:func:`raise_()` on it, to bring it - to the front. It also sets the keyboard focus to it, which will be passed + This function will make sure that the inwin is completely visible by + calling :py:meth:`~efl.evas.Object.show` and + :py:meth:`~efl.evas.Object.raise_` on it, to bring it to + the front. It also sets the keyboard focus to it, which will be passed onto its content. The object's theme will also receive the signal "elm,action,show" with diff -Nru python-efl-1.17.99~201312040125/efl/elementary/label.pxd python-efl-1.8.2~201401231220/efl/elementary/label.pxd --- python-efl-1.17.99~201312040125/efl/elementary/label.pxd 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/label.pxd 2014-01-18 12:24:01.000000000 +0000 @@ -11,7 +11,7 @@ Eina_Bool elm_label_ellipsis_get(Evas_Object *obj) void elm_label_slide_duration_set(Evas_Object *obj, double duration) double elm_label_slide_duration_get(Evas_Object *obj) - void elm_label_slide_area_limit_set(Evas_Object *obj, Eina_Bool limit) +# TODO: void elm_label_slide_area_limit_set(Evas_Object *obj, Eina_Bool limit) void elm_label_slide_mode_set(Evas_Object *obj, Elm_Label_Slide_Mode mode) Elm_Label_Slide_Mode elm_label_slide_mode_get(const_Evas_Object *obj) void elm_label_slide_go(Evas_Object *obj) diff -Nru python-efl-1.17.99~201312040125/efl/elementary/label.pyx python-efl-1.8.2~201401231220/efl/elementary/label.pyx --- python-efl-1.17.99~201312040125/efl/elementary/label.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/label.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -32,20 +32,20 @@ - default - No animation - marker - Centers the text in the label and makes it bold by default - slide_long - The entire text appears from the right of the screen and - slides until it disappears in the left of the screen(reappearing on - the right again). + slides until it disappears in the left of the screen(reappearing on + the right again). - slide_short - The text appears in the left of the label and slides to - the right to show the overflow. When all of the text has been shown - the position is reset. + the right to show the overflow. When all of the text has been shown + the position is reset. - slide_bounce - The text appears in the left of the label and slides to - the right to show the overflow. When all of the text has been shown - the animation reverses, moving the text to the left. + the right to show the overflow. When all of the text has been shown + the animation reverses, moving the text to the left. Custom themes can of course invent new markup tags and style them any way they like. This widget emits the following signals, besides the ones sent from -:py:class:`elementary.layout.Layout`: +:py:class:`~efl.elementary.layout_class.LayoutClass`: - ``language,changed`` - The program's language changed. - ``slide,end`` - The slide is end. @@ -201,10 +201,12 @@ @DEPRECATED("1.8", "Use :py:attr:`slide_mode` instead.") def slide_set(self, bint slide): + """slide_set(bool slide)""" elm_label_slide_mode_set(self.obj, ELM_LABEL_SLIDE_MODE_ALWAYS if slide else ELM_LABEL_SLIDE_MODE_NONE) @DEPRECATED("1.8", "Use :py:attr:`slide_mode` instead.") def slide_get(self): + """slide_get() -> bool""" return bool(elm_label_slide_mode_get(self.obj)) property slide_duration: @@ -225,20 +227,19 @@ def slide_duration_get(self): return elm_label_slide_duration_get(self.obj) - # TODO: In header but not implemented yet? + # TODO: What the heck does this do? # property slide_area_limit: # """ # Slide only if the # :type: bool + # .. versionadded:: 1.8 + # """ - # def __set__(self, bint value): + # def __set__(self, bint limit): # elm_label_slide_area_limit_set(self.obj, limit) - # def __get__(self): - # return elm_label_slide_area_limit_set(self.obj) - property slide_mode: """Change the slide mode of the label widget. @@ -246,6 +247,8 @@ :type: :ref:`Elm_Label_Slide_Mode` + .. versionadded:: 1.8 + """ def __get__(self): return elm_label_slide_mode_get(self.obj) @@ -259,7 +262,13 @@ return elm_label_slide_mode_get(self.obj) def slide_go(self): - """Start the slide effect.""" + """slide_go() + + Start the slide effect. + + .. versionadded:: 1.8 + + """ elm_label_slide_go(self.obj) def callback_language_changed_add(self, func, *args, **kwargs): diff -Nru python-efl-1.17.99~201312040125/efl/elementary/layout.pyx python-efl-1.8.2~201401231220/efl/elementary/layout.pyx --- python-efl-1.17.99~201312040125/efl/elementary/layout.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/layout.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -68,10 +68,10 @@ Box (BOX part) An Edje ``BOX`` part is very similar to the Elementary - :py:class:`elementary.box.Box` widget. It allows one to add objects to the - box and have them distributed along its area, accordingly to the specified - ``layout`` property (now by ``layout`` we mean the chosen layouting design - of the Box, not the Layout widget itself). + :py:class:`~efl.elementary.box.Box` widget. It allows one to add objects to + the box and have them distributed along its area, accordingly to the + specified ``layout`` property (now by ``layout`` we mean the chosen + layouting design of the Box, not the Layout widget itself). A similar effect for having a box with its position, size and other things controlled by the Layout theme would be to create an Elementary diff -Nru python-efl-1.17.99~201312040125/efl/elementary/layout_class.pxd python-efl-1.8.2~201401231220/efl/elementary/layout_class.pxd --- python-efl-1.17.99~201312040125/efl/elementary/layout_class.pxd 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/layout_class.pxd 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of diff -Nru python-efl-1.17.99~201312040125/efl/elementary/layout_class.pyx python-efl-1.8.2~201401231220/efl/elementary/layout_class.pyx --- python-efl-1.17.99~201312040125/efl/elementary/layout_class.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/layout_class.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -45,10 +45,10 @@ with some more logic on top. The idea is to make the creation of that widgets as easy as possible, - factorizing code on this common base. For example, a button is a - layout (that looks like push button) that happens to react on - clicks and keyboard events in a special manner, calling its user - back on those events. That's no surprise, then, that the :py:class:`Button` + factorizing code on this common base. For example, a button is a layout + (that looks like push button) that happens to react on clicks and keyboard + events in a special manner, calling its user back on those events. That's no + surprise, then, that the :py:class:`efl.elementary.button.Button` implementation relies on LayoutClass, if you go to check it. Container parts, here, map directly to Edje parts from the layout's Edje @@ -64,6 +64,7 @@ Elm_Layout_Part_Alias_Description, where it's explained in detail. """ + def content_set(self, swallow=None, evasObject content=None): """content_set(unicode swallow, Object content) @@ -83,17 +84,18 @@ :param content: The child that will be added in this layout object :type content: :py:class:`~efl.evas.Object` - :return: ``True`` on success, ``False`` otherwise - :rtype: bool + .. versionchanged:: 1.8 + Raises RuntimeError if setting the content fails. """ if content is None: content = swallow swallow = None if isinstance(swallow, unicode): swallow = PyUnicode_AsUTF8String(swallow) - elm_layout_content_set(self.obj, + if not elm_layout_content_set(self.obj, swallow if swallow is not None else NULL, - content.obj if content is not None else NULL) + content.obj if content is not None else NULL): + raise RuntimeError def content_get(self, swallow=None): """content_get(unicode swallow) -> Object @@ -136,7 +138,9 @@ :type part: string :param text: The text to set :type text: string - :return: ``True`` on success, ``False`` otherwise + + .. versionchanged:: 1.8 + Raises RuntimeError if setting the text fails """ if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) @@ -146,9 +150,10 @@ # as text text = part part = None - elm_layout_text_set(self.obj, + if not elm_layout_text_set(self.obj, part if part is not None else NULL, - text if text is not None else NULL) + text if text is not None else NULL): + raise RuntimeError def text_get(self, part=None): """text_get(unicode part) -> unicode @@ -174,6 +179,9 @@ :type: tuple of string :raise RuntimeError: when setting the file fails + .. versionchanged:: 1.8 + Raises RuntimeError if setting the file fails + """ def __set__(self, value): filename, group = value @@ -202,6 +210,8 @@ :see: :py:func:`thaw` + .. versionadded:: 1.8 + """ return elm_layout_freeze(self.obj) @@ -218,6 +228,8 @@ :see: :py:func:`freeze` + .. versionadded:: 1.8 + """ return elm_layout_thaw(self.obj) @@ -226,11 +238,14 @@ theme that will be used as layout. Note that ``style`` will be the new style too, as in setting - :py:attr:`style`. + :py:attr:`~efl.elementary.object.Object.style`. :type: tuple of strings :raise RuntimeError: when setting the theme fails + .. versionchanged:: 1.8 + Raises RuntimeError if setting the theme fails + """ def __set__(self, theme): clas, group, style = theme @@ -314,7 +329,7 @@ emitted by the undelying Edje object, with parameters *emission*, ``source`` and ``func`` matching exactly those passed to a previous call to :py:meth:`~efl.elementary.object.Object.signal_callback_add`. - The data pointer that was passed to this call will be returned. + The data that was passed to this call will be returned. :param emission: The signal's name string :type emission: string @@ -376,7 +391,10 @@ :param child: the child object to append to box. :type child: :py:class:`~efl.evas.Object` - :raise RuntimeError: when adding the box fails + :raise RuntimeError: when adding the child fails + + .. versionchanged:: 1.8 + Raises RuntimeError if adding the child fails """ if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) @@ -408,6 +426,9 @@ :raise RuntimeError: when adding to box fails + .. versionchanged:: 1.8 + Raises RuntimeError if adding the child fails + """ if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) if not elm_layout_box_prepend(self.obj, @@ -440,6 +461,9 @@ :raise RuntimeError: when inserting to box fails + .. versionchanged:: 1.8 + Raises RuntimeError if adding the child fails + """ if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) if not elm_layout_box_insert_before(self.obj, @@ -472,6 +496,9 @@ :raise RuntimeError: when inserting to box fails + .. versionchanged:: 1.8 + Raises RuntimeError if adding the child fails + """ if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) if not elm_layout_box_insert_at(self.obj, @@ -528,6 +555,9 @@ :raise RuntimeError: when removing all items fails + .. versionchanged:: 1.8 + Raises RuntimeError if removing the children fails + """ if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) if not elm_layout_box_remove_all(self.obj, @@ -543,7 +573,7 @@ Once the object is inserted, it will become child of the table. Its lifetime will be bound to the layout, and whenever the layout dies the child will be deleted automatically. One should use - :py:meth:`table_remove` to make this layout forget about the object. + :py:meth:`table_unpack` to make this layout forget about the object. If ``colspan`` or ``rowspan`` are bigger than 1, that object will occupy more space than a single cell. @@ -555,7 +585,7 @@ :param part: the box part to pack child. :type part: string :param child_obj: the child object to pack into table. - :type child_obj: :py:class:`efl.evas.Object` + :type child_obj: :py:class:`~efl.evas.Object` :param col: the column to which the child should be added. (>= 0) :type col: int :param row: the row to which the child should be added. (>= 0) @@ -568,6 +598,9 @@ :raise RuntimeError: when packing an item fails + .. versionchanged:: 1.8 + Raises RuntimeError if adding the child fails + """ if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) if not elm_layout_table_pack(self.obj, @@ -624,6 +657,9 @@ :raise RuntimeError: when clearing the table fails + .. versionchanged:: 1.8 + Raises RuntimeError if clearing the table fails + """ if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) if not elm_layout_table_clear(self.obj, @@ -729,6 +765,9 @@ :raise RuntimeError: when setting the parts cursor fails + .. versionchanged:: 1.8 + Raises RuntimeError if setting the cursor fails + """ if isinstance(part_name, unicode): part_name = PyUnicode_AsUTF8String(part_name) if isinstance(cursor, unicode): cursor = PyUnicode_AsUTF8String(cursor) @@ -763,6 +802,9 @@ :raise RuntimeError: when unsetting the part cursor fails + .. versionchanged:: 1.8 + Raises RuntimeError if unsetting the cursor fails + """ if isinstance(part_name, unicode): part_name = PyUnicode_AsUTF8String(part_name) if not elm_layout_part_cursor_unset(self.obj, @@ -781,6 +823,9 @@ :raise RuntimeError: when setting the part cursor style fails + .. versionchanged:: 1.8 + Raises RuntimeError if setting the cursor style fails + """ if isinstance(part_name, unicode): part_name = PyUnicode_AsUTF8String(part_name) if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style) @@ -829,6 +874,9 @@ :raise RuntimeError: when setting the engine_only setting fails, when part does not exist or has no cursor set. + .. versionchanged:: 1.8 + Raises RuntimeError if setting the value fails + """ if isinstance(part_name, unicode): part_name = PyUnicode_AsUTF8String(part_name) if not elm_layout_part_cursor_engine_only_set(self.obj, @@ -860,6 +908,8 @@ :raise RuntimeError: if accessibility cannot be set. + .. versionadded:: 1.8 + """ def __set__(self, can_access): if not elm_layout_edje_object_can_access_set(self.obj, can_access): diff -Nru python-efl-1.17.99~201312040125/efl/elementary/list.pyx python-efl-1.8.2~201401231220/efl/elementary/list.pyx --- python-efl-1.17.99~201312040125/efl/elementary/list.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/list.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -29,7 +29,7 @@ modes of items displaying. A list is a very simple type of list widget. For more robust -lists, :py:class:`genlist.Genlist` should probably be used. +lists, :py:class:`~efl.elementary.genlist.Genlist` should probably be used. Smart callbacks one can listen to: @@ -59,16 +59,16 @@ Available styles for it: -- ``"default"`` +- ``default`` Default content parts of the list items that you can use for are: -- "start" - A start position object in the list item -- "end" - A end position object in the list item +- ``start`` - A start position object in the list item +- ``end`` - A end position object in the list item Default text parts of the list items that you can use for are: -- "default" - label in the list item +- ``default`` - label in the list item Scrollable Interface ==================== @@ -77,7 +77,7 @@ If you wish to control the scolling behaviour using these functions, inherit both the widget class and the -:py:class:`Scrollable` class +:py:class:`~efl.elementary.scroller.Scrollable` class using multiple inheritance, for example:: class ScrollableGenlist(Genlist, Scrollable): @@ -159,6 +159,7 @@ """ from cpython cimport PyUnicode_AsUTF8String, Py_DECREF +from libc.stdint cimport uintptr_t from efl.eo cimport _object_mapping_register, object_from_instance, PY_REFCOUNT from efl.utils.conversions cimport _ctouni @@ -188,7 +189,7 @@ ELM_SCROLLER_POLICY_ON = enums.ELM_SCROLLER_POLICY_ON ELM_SCROLLER_POLICY_OFF = enums.ELM_SCROLLER_POLICY_OFF -def _cb_object_item_conv(long addr): +def _cb_object_item_conv(uintptr_t addr): cdef Elm_Object_Item *it = addr return _object_item_to_python(it) @@ -205,11 +206,12 @@ :param string label: The label of the list item. :param icon: The icon object to use for the left side of the item. An - icon can be any Evas object, but usually it is an :py:class:`Icon`. - :type icon: :py:class:`evas.object.Object` + icon can be any Evas object, but usually it is an + :py:class:`~efl.elementary.icon.Icon`. + :type icon: :py:class:`~efl.evas.Object` :param end: The icon object to use for the right side of the item. An - icon can be any Evas object. - :type end: :py:class:`evas.object.Object` + icon can be any Evas object. + :type end: :py:class:`~efl.evas.Object` :param callable callback: The function to call when the item is clicked. :param cb_data: An object associated with the callback. @@ -237,9 +239,9 @@ "callback=%r, cb_data=%r, " "args=%r, kargs=%r)>") % ( type(self).__name__, - self, + self, PY_REFCOUNT(self), - self.item, + self.item, self.text, getattr(self.part_content_get("icon"), "file", None), getattr(self.part_content_get("end"), "file", None), @@ -255,7 +257,7 @@ be set as **last** item. Items created with this method can be deleted with - :py:func:`elementary.object_item.ObjectItem.delete()`. + :py:meth:`~efl.elementary.object_item.ObjectItem.delete`. If a function is passed as argument, it will be called every time this item is selected, i.e., the user clicks over an unselected item. @@ -274,9 +276,9 @@ .. seealso:: :py:attr:`List.select_mode` - :py:func:`efl.elementary.object_item.ObjectItem.delete()` + :py:meth:`~efl.elementary.object_item.ObjectItem.delete` :py:func:`List.clear()` - :py:class:`Icon ` + :py:class:`~efl.elementary.icon.Icon` :return: The created item or ``None`` upon failure. :rtype: :py:class:`ListItem` @@ -292,13 +294,12 @@ self.icon_obj, self.end_obj, cb, self) - if item != NULL: - self._set_obj(item) - self._set_properties_from_keyword_args(self.kwargs) - return self - else: - # FIXME: raise RuntimeError? - return None + if item == NULL: + raise RuntimeError("The item could not be added to the widget.") + + self._set_obj(item) + self._set_properties_from_keyword_args(self.kwargs) + return self def prepend_to(self, List list): """prepend_to(List list) @@ -306,11 +307,11 @@ Prepend a new item to the list object. .. seealso:: - :py:func:`append_to()` + :py:meth:`append_to` :py:attr:`List.select_mode` - :py:func:`efl.elementary.object_item.ObjectItem.delete()` - :py:func:`List.clear()` - :py:class:`Icon ` + :py:meth:`efl.elementary.object_item.ObjectItem.delete` + :py:meth:`List.clear` + :py:class:`~efl.elementary.icon.Icon` :param list: The list :type list: List @@ -329,13 +330,12 @@ self.icon_obj, self.end_obj, cb, self) - if item != NULL: - self._set_obj(item) - self._set_properties_from_keyword_args(self.kwargs) - return self - else: - # FIXME: raise RuntimeError? - return None + if item == NULL: + raise RuntimeError("The item could not be added to the widget.") + + self._set_obj(item) + self._set_properties_from_keyword_args(self.kwargs) + return self def insert_before(self, ListItem before): """insert_before(ListItem before) @@ -343,11 +343,11 @@ Insert a new item into the list object before item *before*. .. seealso:: - :py:func:`append_to()` + :py:meth:`append_to` :py:attr:`List.select_mode` - :py:func:`efl.elementary.object_item.ObjectItem.delete()` - :py:func:`List.clear()` - :py:class:`Icon ` + :py:meth:`efl.elementary.object_item.ObjectItem.delete` + :py:meth:`List.clear` + :py:class:`~efl.elementary.icon.Icon` :param before: The list item to insert before. :type before: :py:class:`ListItem` @@ -368,13 +368,12 @@ self.icon_obj, self.end_obj, cb, self) - if item != NULL: - self._set_obj(item) - self._set_properties_from_keyword_args(self.kwargs) - return self - else: - # FIXME: raise RuntimeError? - return None + if item == NULL: + raise RuntimeError("The item could not be added to the widget.") + + self._set_obj(item) + self._set_properties_from_keyword_args(self.kwargs) + return self def insert_after(self, ListItem after): """insert_after(ListItem after) @@ -382,11 +381,11 @@ Insert a new item into the list object after item *after*. .. seealso:: - :py:func:`append_to()` + :py:meth:`append_to` :py:attr:`List.select_mode` - :py:func:`efl.elementary.object_item.ObjectItem.delete()` - :py:func:`List.clear()` - :py:class:`Icon ` + :py:meth:`efl.elementary.object_item.ObjectItem.delete` + :py:meth:`List.clear` + :py:class:`~efl.elementary.icon.Icon` :param after: The list item to insert after. :type after: :py:class:`ListItem` @@ -407,13 +406,12 @@ self.icon_obj, self.end_obj, cb, self) - if item != NULL: - self._set_obj(item) - self._set_properties_from_keyword_args(self.kwargs) - return self - else: - # FIXME: raise RuntimeError? - return None + if item == NULL: + raise RuntimeError("The item could not be added to the widget.") + + self._set_obj(item) + self._set_properties_from_keyword_args(self.kwargs) + return self # TODO: # def sorted_insert_to(self, List list, cmp_func=None): @@ -516,7 +514,7 @@ Show the item in the list view. It won't animate list until item is visible. If such behavior is - wanted, use :py:func:`bring_in()` instead. + wanted, use :py:meth:`bring_in` instead. """ elm_list_item_show(self.item) @@ -531,7 +529,7 @@ This may use animation to do so and take a period of time. - If animation isn't wanted, :py:func:`show()` can be used. + If animation isn't wanted, :py:meth:`show` can be used. """ elm_list_item_bring_in(self.item) @@ -544,7 +542,7 @@ behavior (like deleting the base!), but it might be used to feed Edje signals to add more features to row representation. - :type: :py:class:`edje.Edje` + :type: :py:class:`efl.edje.Edje` """ def __get__(self): @@ -559,7 +557,7 @@ .. note:: If the item is the first item, ``None`` will be returned. .. seealso:: - :py:func:`append_to()` + :py:meth:`append_to` :py:attr:`List.items` :type: :py:class:`ListItem` @@ -615,7 +613,7 @@ li.go() li.show() - .. note:: Call before running :py:func:`show() ` on the list object. + .. note:: Call before running :py:meth:`~efl.evas.Object.show` on the list object. .. warning:: If not called, it won't display the list properly. """ @@ -835,8 +833,8 @@ Remove all list's items. .. seealso:: - :py:func:`efl.elementary.object_item.ObjectItem.delete` - :py:func:`ListItem.append_to` + :py:meth:`~efl.elementary.object_item.ObjectItem.delete` + :py:meth:`ListItem.append_to` """ elm_list_clear(self.obj) @@ -845,9 +843,9 @@ """Get a list of all the list items. .. seealso:: - :py:func:`ListItem.append_to()` - :py:func:`efl.elementary.object_item.ObjectItem.delete` - :py:func:`clear()` + :py:meth:`ListItem.append_to` + :py:meth:`~efl.elementary.object_item.ObjectItem.delete` + :py:meth:`clear` :type: tuple of :py:class:`List items ` @@ -937,6 +935,7 @@ based if the coordinate is above or below all items respectively in the list. + .. versionadded:: 1.8 """ cdef: @@ -958,6 +957,8 @@ clicking an unfocusable area in an item or selecting it with a key movement. Clicking on a focusable widget inside an item will couse this particular item to get focus as usual. + .. versionadded:: 1.8 + """ def __set__(self, bint enabled): elm_list_focus_on_selection_set(self.obj, enabled) @@ -1072,7 +1073,7 @@ def callback_focused_add(self, func, *args, **kwargs): """When the list has received focus. - :since: 1.8 + .. versionadded:: 1.8 """ self._callback_add("focused", func, *args, **kwargs) @@ -1082,7 +1083,7 @@ def callback_unfocused_add(self, func, *args, **kwargs): """When the list has lost focus. - :since: 1.8 + .. versionadded:: 1.8 """ self._callback_add("unfocused", func, *args, **kwargs) @@ -1091,6 +1092,12 @@ property scroller_policy: + """ + + .. deprecated:: 1.8 + You should combine with Scrollable class instead. + + """ def __get__(self): return self.scroller_policy_get() @@ -1109,6 +1116,12 @@ return (policy_h, policy_v) property bounce: + """ + + .. deprecated:: 1.8 + You should combine with Scrollable class instead. + + """ def __get__(self): return self.bounce_get() def __set__(self, value): diff -Nru python-efl-1.17.99~201312040125/efl/elementary/map.pyx python-efl-1.8.2~201401231220/efl/elementary/map.pyx --- python-efl-1.17.99~201312040125/efl/elementary/map.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/map.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -42,31 +42,31 @@ Signals you can listen to ========================= -- "clicked" - Called when a user has clicked the map without dragging around. -- "clicked,double" - Called when a user has double-clicked the map. -- "press" - This is called when a user has pressed down on the map. -- "longpressed" - This is called when a user has pressed down on the map +- ``clicked`` - Called when a user has clicked the map without dragging around. +- ``clicked,double`` - Called when a user has double-clicked the map. +- ``press`` - This is called when a user has pressed down on the map. +- ``longpressed`` - This is called when a user has pressed down on the map for a long time without dragging around. -- "scroll" - the content has been scrolled (moved). -- "scroll,drag,start" - dragging the contents around has started. -- "scroll,drag,stop" - dragging the contents around has stopped. -- "scroll,anim,start" - scrolling animation has started. -- "scroll,anim,stop" - scrolling animation has stopped. -- "zoom,start" - Zoom animation started. -- "zoom,stop" - Zoom animation stopped. -- "zoom,change" - Zoom changed when using an auto zoom mode. -- "tile,load" - A map tile image load begins. -- "tile,loaded" - A map tile image load ends. -- "tile,loaded,fail" - A map tile image load fails. -- "route,load" - Route request begins. -- "route,loaded" - Route request ends. -- "route,loaded,fail" - Route request fails. -- "name,load" - Name request begins. -- "name,loaded" - Name request ends. -- "name,loaded,fail" - Name request fails. -- "overlay,clicked" - A overlay is clicked. -- "loaded" - when a map is finally loaded. -- "language,changed" - the program's language changed +- ``scroll`` - the content has been scrolled (moved). +- ``scroll,drag,start`` - dragging the contents around has started. +- ``scroll,drag,stop`` - dragging the contents around has stopped. +- ``scroll,anim,start`` - scrolling animation has started. +- ``scroll,anim,stop`` - scrolling animation has stopped. +- ``zoom,start`` - Zoom animation started. +- ``zoom,stop`` - Zoom animation stopped. +- ``zoom,change`` - Zoom changed when using an auto zoom mode. +- ``tile,load`` - A map tile image load begins. +- ``tile,loaded`` - A map tile image load ends. +- ``tile,loaded,fail`` - A map tile image load fails. +- ``route,load`` - Route request begins. +- ``route,loaded`` - Route request ends. +- ``route,loaded,fail`` - Route request fails. +- ``name,load`` - Name request begins. +- ``name,loaded`` - Name request ends. +- ``name,loaded,fail`` - Name request fails. +- ``overlay,clicked`` - A overlay is clicked. +- ``loaded`` - when a map is finally loaded. +- ``language,changed`` - the program's language changed - ``focused`` - When the map has received focus. (since 1.8) - ``unfocused`` - When the map has lost focus. (since 1.8) @@ -190,7 +190,7 @@ .. data:: ELM_MAP_ZOOM_MODE_MANUAL - Zoom controlled manually by :py:attr:`zoom_set` + Zoom controlled manually by :py:attr:`~Map.zoom` It's set by default. @@ -1835,7 +1835,7 @@ def callback_focused_add(self, func, *args, **kwargs): """When the map has received focus. - :since: 1.8 + .. versionadded:: 1.8 """ self._callback_add("focused", func, *args, **kwargs) @@ -1845,7 +1845,7 @@ def callback_unfocused_add(self, func, *args, **kwargs): """When the map has lost focus. - :since: 1.8 + .. versionadded:: 1.8 """ self._callback_add("unfocused", func, *args, **kwargs) @@ -1853,6 +1853,12 @@ self._callback_del("unfocused", func) property scroller_policy: + """ + + .. deprecated:: 1.8 + You should combine with Scrollable class instead. + + """ def __get__(self): return self.scroller_policy_get() @@ -1871,6 +1877,12 @@ return (policy_h, policy_v) property bounce: + """ + + .. deprecated:: 1.8 + You should combine with Scrollable class instead. + + """ def __get__(self): return self.bounce_get() def __set__(self, value): diff -Nru python-efl-1.17.99~201312040125/efl/elementary/mapbuf.pyx python-efl-1.8.2~201401231220/efl/elementary/mapbuf.pyx --- python-efl-1.17.99~201312040125/efl/elementary/mapbuf.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/mapbuf.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -30,6 +30,10 @@ need to resize or move it frequently (the content object and its children). +Default content parts of the mapbuf widget that you can use are: + +- ``default`` - The main content of the mapbuf + """ from efl.eo cimport _object_mapping_register @@ -114,6 +118,8 @@ :type: bool + .. versionadded:: 1.8 + """ def __set__(self, bint on): elm_mapbuf_auto_set(self.obj, on) diff -Nru python-efl-1.17.99~201312040125/efl/elementary/menu.pyx python-efl-1.8.2~201401231220/efl/elementary/menu.pyx --- python-efl-1.17.99~201312040125/efl/elementary/menu.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/menu.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -36,11 +36,11 @@ Default content parts of the menu items that you can use for are: -- "default" - A main content of the menu item +- ``default`` - A main content of the menu item Default text parts of the menu items that you can use for are: -- "default" - label in the menu item +- ``default`` - label in the menu item """ @@ -78,6 +78,7 @@ self.kwargs = kargs def add_to(self, Menu menu not None): + # TODO: document this cdef Elm_Object_Item *item, *parent_obj = NULL cdef Evas_Smart_Cb cb = NULL @@ -90,12 +91,12 @@ self.label if self.label is not None else NULL, cb, self) - if item != NULL: - self._set_obj(item) - self._set_properties_from_keyword_args(self.kwargs) - return self - else: - Py_DECREF(self) + if item == NULL: + raise RuntimeError("The item could not be added to the widget.") + + self._set_obj(item) + self._set_properties_from_keyword_args(self.kwargs) + return self property object: """Get the Evas_Object of an Elm_Object_Item @@ -167,6 +168,9 @@ :type: tuple of :py:class:`MenuItem` + .. versionadded:: 1.8 + Calling del on this property clears the subitems + """ def __get__(self): return _object_item_list_to_python(elm_menu_item_subitems_get(self.item)) @@ -224,11 +228,15 @@ cdef class MenuSeparatorItem(ObjectItem): + """A separator type menu item.""" + cdef MenuItem parent + def __init__(self, MenuItem parent): self.parent = parent def add_to(self, Menu menu not None): + # TODO: document this cdef Elm_Object_Item *item if self.cb_func is not None: @@ -237,17 +245,15 @@ item = elm_menu_item_separator_add(menu.obj, self.parent.item if self.parent is not None else NULL) - if item != NULL: - self._set_obj(item) - return self - else: - Py_DECREF(self) + if item == NULL: + raise RuntimeError("The item could not be added to the widget.") + + self._set_obj(item) + return self property is_separator: """Returns whether the item is a separator. - .. seealso:: :py:func:`Menu.item_separator_add()` - :type: bool """ @@ -301,7 +307,7 @@ property parent: """The parent for the given menu widget. - :type: :py:class:`Object` + :type: :py:class:`~efl.elementary.object.Object` """ def __get__(self): @@ -340,9 +346,9 @@ elm_menu_close(self.obj) property items: - """Returns a list of ``item``'s items. + """Returns a list of ``item``'s. - :type: tuple of :py:class:`Object` + :type: tuple of :py:class:`MenuItem` """ def __get__(self): @@ -358,7 +364,7 @@ Add an item at the end of the given menu widget :param parent: The parent menu item (optional) - :type parent: :py:class:`Object` + :type parent: :py:class:`~efl.elementary.object.Object` :param string icon: An icon display on the item. The icon will be destroyed by the menu. :param string label: The label of the item. @@ -401,10 +407,10 @@ Add a separator item to menu under ``parent``. - This item is a :py:class:`Separator`. + This item is a :py:class:`~efl.elementary.separator.Separator`. :param parent: The item to add the separator under - :type parent: :py:class:`Object` + :type parent: :py:class:`~efl.elementary.object.Object` :return: The created item or None on failure :rtype: :py:class:`MenuSeparatorItem` @@ -459,7 +465,7 @@ def callback_dismissed_add(self, func, *args, **kwargs): """the user clicked the empty space in the menu to dismiss - :since: 1.8 + .. versionadded:: 1.8 """ self._callback_add("dismissed", func, *args, **kwargs) diff -Nru python-efl-1.17.99~201312040125/efl/elementary/multibuttonentry.pyx python-efl-1.8.2~201401231220/efl/elementary/multibuttonentry.pyx --- python-efl-1.17.99~201312040125/efl/elementary/multibuttonentry.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/multibuttonentry.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -34,33 +34,36 @@ further actions. This widget emits the following signals, besides the ones sent from -:py:class:`LayoutClass`: +:py:class:`~efl.elementary.layout_class.LayoutClass`: - ``item,selected`` - this is called when an item is selected by - api, user interaction, and etc. this is also called when a - user press back space while cursor is on the first field of - entry. + api, user interaction, and etc. this is also called when a + user press back space while cursor is on the first field of + entry. - ``item,added`` - when a new multi-button entry item is added. - ``item,deleted`` - when a multi-button entry item is deleted. - ``item,clicked`` - this is called when an item is clicked by user - interaction. Both "item,selected" and "item,clicked" are needed. + interaction. Both "item,selected" and "item,clicked" are needed. - ``clicked`` - when multi-button entry is clicked. - ``focused`` - when multi-button entry is focused. - ``unfocused`` - when multi-button entry is unfocused. - ``expanded`` - when multi-button entry is expanded. - ``contracted`` - when multi-button entry is contracted. - ``expand,state,changed`` - when shrink mode state of - multi-button entry is changed. + multi-button entry is changed. Default text parts of the multibuttonentry widget that you can use for are: - - "default" - A label of the multibuttonentry + +- ``default`` - A label of the multibuttonentry Default text parts of the multibuttonentry items that you can use for are: - - "default" - A label of the multibuttonentry item + +- ``default`` - A label of the multibuttonentry item """ from cpython cimport PyUnicode_AsUTF8String, Py_DECREF, Py_INCREF +from libc.stdint cimport uintptr_t from efl.eo cimport _object_mapping_register, object_from_instance, PY_REFCOUNT from efl.utils.conversions cimport _ctouni @@ -110,6 +113,13 @@ self.args = args self.kwargs = kargs + def __repr__(self): + return ("<%s(%#x, refcount=%d, Elm_Object_Item=%#x, " + "label=%r, callback=%r, args=%r, kargs=%s)>") % \ + (self.__class__.__name__, self, + PY_REFCOUNT(self), self.item, + self.text_get(), self.cb_func, self.args, self.kwargs) + def append_to(self, MultiButtonEntry mbe not None): cdef Elm_Object_Item *item cdef Evas_Smart_Cb cb = NULL @@ -121,12 +131,12 @@ self.label if self.label is not None else NULL, cb, self) - if item != NULL: - self._set_obj(item) - self._set_properties_from_keyword_args(self.kwargs) - return self - else: - Py_DECREF(self) + if item == NULL: + raise RuntimeError("The item could not be added to the widget.") + + self._set_obj(item) + self._set_properties_from_keyword_args(self.kwargs) + return self def prepend_to(self, MultiButtonEntry mbe not None): cdef Elm_Object_Item *item @@ -139,12 +149,12 @@ self.label if self.label is not None else NULL, cb, self) - if item != NULL: - self._set_obj(item) - self._set_properties_from_keyword_args(self.kwargs) - return self - else: - Py_DECREF(self) + if item == NULL: + raise RuntimeError("The item could not be added to the widget.") + + self._set_obj(item) + self._set_properties_from_keyword_args(self.kwargs) + return self def insert_before(self, MultiButtonEntryItem before not None): cdef Elm_Object_Item *item @@ -159,12 +169,12 @@ self.label if self.label is not None else NULL, cb, self) - if item != NULL: - self._set_obj(item) - self._set_properties_from_keyword_args(self.kwargs) - return self - else: - Py_DECREF(self) + if item == NULL: + raise RuntimeError("The item could not be added to the widget.") + + self._set_obj(item) + self._set_properties_from_keyword_args(self.kwargs) + return self def insert_after(self, MultiButtonEntryItem after not None): cdef Elm_Object_Item *item @@ -179,23 +189,12 @@ self.label if self.label is not None else NULL, cb, self) - if item != NULL: - self._set_obj(item) - self._set_properties_from_keyword_args(self.kwargs) - return self - else: - Py_DECREF(self) - - def __str__(self): - return ("%s(label=%r, callback=%r, args=%r, kargs=%s)") % \ - (self.__class__.__name__, self.text_get(), self.cb_func, self.args, self.kwargs) + if item == NULL: + raise RuntimeError("The item could not be added to the widget.") - def __repr__(self): - return ("%s(%#x, refcount=%d, Elm_Object_Item=%#x, " - "label=%r, callback=%r, args=%r, kargs=%s)") % \ - (self.__class__.__name__, self, - PY_REFCOUNT(self), self.item, - self.text_get(), self.cb_func, self.args, self.kwargs) + self._set_obj(item) + self._set_properties_from_keyword_args(self.kwargs) + return self property selected: def __get__(self): @@ -418,6 +417,8 @@ :type: bool + .. versionadded:: 1.8 + """ def __set__(self, bint editable): elm_multibuttonentry_editable_set(self.obj, editable) diff -Nru python-efl-1.17.99~201312040125/efl/elementary/naviframe.pyx python-efl-1.8.2~201401231220/efl/elementary/naviframe.pyx --- python-efl-1.17.99~201312040125/efl/elementary/naviframe.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/naviframe.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -44,39 +44,34 @@ :py:func:`~efl.elementary.object.Object.part_content_set` on the right swallow part names expected for each, which are: -- ``"default"`` - The main content of the current page -- ``"icon"`` - An icon in the title area of the current page -- ``"prev_btn"`` - A button of the current page to go to the - previous page -- ``"next_btn"`` - A button of the current page to go to the next - page +- ``default`` - The main content of the current page +- ``icon`` - An icon in the title area of the current page +- ``prev_btn`` - A button of the current page to go to the previous page +- ``next_btn`` - A button of the current page to go to the next page For text, :py:func:`~efl.elementary.object.Object.part_text_set` will work here on: -- ``"default"`` - Title label in the title area of the current - page -- ``"subtitle"`` - Sub-title label in the title area of the - current page +- ``default`` - Title label in the title area of the current page +- ``subtitle`` - Sub-title label in the title area of the current page Most of those content objects can be passed at the time of an item -creation (see :py:meth:`~Naviframe.item_push`). +creation (see :py:meth:`~NaviframeItem.push_to`). Naviframe items can have different styles, which affect the transition between views, for example. On the default theme, two of them are supported: -- ``"basic"`` - views are switched sliding horizontally, one after - the other -- ``"overlap"`` - like the previous one, but the previous view stays - at its place and is ovelapped by the new +- ``basic`` - views are switched sliding horizontally, one after the other +- ``overlap`` - like the previous one, but the previous view stays at its place + and is ovelapped by the new This widget emits the following signals, besides the ones sent from :py:class:`~efl.elementary.layout_class.LayoutClass`: -- ``transition,finished`` - When the transition is finished in - changing the item +- ``transition,finished`` - When the transition is finished in changing the + item - ``title,clicked`` - User clicked title area - ``focused`` - When the naviframe has received focus. (since 1.8) - ``unfocused`` - When the naviframe has lost focus. (since 1.8) @@ -84,12 +79,13 @@ All the parts, for content and text, described here will also be reachable by naviframe **items** direct calls: -- :py:func:`part_text_set()` -- :py:func:`part_text_get()` -- :py:func:`part_content_set()` -- :py:func:`part_content_get()` -- :py:func:`part_content_unset()` -- :py:func:`signal_emit()` +- :py:meth:`~efl.elementary.object_item.ObjectItem.delete` +- :py:meth:`~efl.elementary.object_item.ObjectItem.part_text_set` +- :py:meth:`~efl.elementary.object_item.ObjectItem.part_text_get` +- :py:meth:`~efl.elementary.object_item.ObjectItem.part_content_set` +- :py:meth:`~efl.elementary.object_item.ObjectItem.part_content_get` +- :py:meth:`~efl.elementary.object_item.ObjectItem.part_content_unset` +- :py:meth:`~efl.elementary.object_item.ObjectItem.signal_emit` What happens is that the topmost item of a naviframe will be the widget's target layout, when accessed directly. Items lying below @@ -123,7 +119,7 @@ def __init__(self, title_label = None, evasObject prev_btn = None, evasObject next_btn = None, evasObject content = None, - item_style = None): + item_style = None, *args, **kwargs): """The following styles are available for this item: @@ -158,6 +154,9 @@ if content is not None: self.item_content = content.obj + self.args = args + self.kwargs = kwargs + def push_to(self, Naviframe naviframe): """push_to(Naviframe naviframe) @@ -183,11 +182,12 @@ self.item_content, self.item_style if self.item_style is not None else NULL) - if item != NULL: - self._set_obj(item) - return self - else: - return None + if item == NULL: + raise RuntimeError("The item could not be added to the widget.") + + self._set_obj(item) + self._set_properties_from_keyword_args(self.kwargs) + return self def insert_before(self, NaviframeItem before): """insert_before(NaviframeItem before) @@ -221,11 +221,12 @@ self.item_content, self.item_style if self.item_style is not None else NULL) - if item != NULL: - self._set_obj(item) - return self - else: - return None + if item == NULL: + raise RuntimeError("The item could not be added to the widget.") + + self._set_obj(item) + self._set_properties_from_keyword_args(self.kwargs) + return self def insert_after(self, NaviframeItem after): """insert_after(NaviframeItem after) @@ -259,11 +260,12 @@ self.item_content, self.item_style if self.item_style is not None else NULL) - if item != NULL: - self._set_obj(item) - return self - else: - return None + if item == NULL: + raise RuntimeError("The item could not be added to the widget.") + + self._set_obj(item) + self._set_properties_from_keyword_args(self.kwargs) + return self @DEPRECATED("1.8", "Use :py:func:`pop_to` instead.") def item_pop_to(self): @@ -371,7 +373,7 @@ :return: ``None`` or the content object(if :py:attr:`content_preserve_on_pop` is True). - :rtype: :py:class:`evas.object.Object` + :rtype: :py:class:`~efl.evas.Object` """ return object_from_instance(elm_naviframe_item_pop(self.obj)) @@ -453,12 +455,11 @@ If is True, the contents of the naviframe item will receives events from mouse and keyboard during view changing such as item push/pop. - .. warning:: Events will be blocked by - calling :py:func:`freeze_events_set()` internally. + .. warning:: + Events will be blocked by setting + :py:attr:`~efl.evas.Object.freeze_events` internally. So don't call the API while pushing/popping items. - .. seealso:: :py:attr:`evas.object.Object.freeze_events` - :type: bool """ @@ -517,7 +518,7 @@ def callback_focused_add(self, func, *args, **kwargs): """When the naviframe has received focus. - :since: 1.8 + .. versionadded:: 1.8 """ self._callback_add("focused", func, *args, **kwargs) @@ -527,7 +528,7 @@ def callback_unfocused_add(self, func, *args, **kwargs): """When the naviframe has lost focus. - :since: 1.8 + .. versionadded:: 1.8 """ self._callback_add("unfocused", func, *args, **kwargs) diff -Nru python-efl-1.17.99~201312040125/efl/elementary/need.pyx python-efl-1.8.2~201401231220/efl/elementary/need.pyx --- python-efl-1.17.99~201312040125/efl/elementary/need.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/need.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -44,6 +44,8 @@ :return: True if support exists and initialization succeeded. :rtype: bool + .. versionadded:: 1.8 + """ return bool(elm_need_systray()) @@ -59,6 +61,8 @@ :return: True if support exists and initialization succeeded. :rtype: bool + .. versionadded:: 1.8 + """ return bool(elm_need_sys_notify()) @@ -90,6 +94,8 @@ :return: True if support exists and initialization succeeded. :rtype: bool + .. versionadded:: 1.8 + """ return bool(elm_need_eldbus()) @@ -105,6 +111,8 @@ :return: True if support exists and initialization succeeded. :rtype: bool + .. versionadded:: 1.8 + """ return bool(elm_need_elocation()) diff -Nru python-efl-1.17.99~201312040125/efl/elementary/notify.pyx python-efl-1.8.2~201401231220/efl/elementary/notify.pyx --- python-efl-1.17.99~201312040125/efl/elementary/notify.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/notify.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -24,18 +24,18 @@ Display a container in a particular region of the parent. -A timeout can be set to automatically hide the notify. This is so that, -after an :py:func:`show()` on a notify object, if a timeout was set on it, -it will **automatically** get hidden after that time. +A timeout can be set to automatically hide the notify. This is so that, after an +:py:meth:`~efl.evas.Object.show` on a notify object, if a timeout +was set on it, it will **automatically** get hidden after that time. Signals that you can add callbacks for are: -- "timeout" - when timeout happens on notify and it's hidden -- "block,clicked" - when a click outside of the notify happens +- ``timeout`` - when timeout happens on notify and it's hidden +- ``block,clicked`` - when a click outside of the notify happens Default content parts of the notify widget that you can use are: -- ``"default"`` - The main content of the notify +- ``default`` - The main content of the notify Enumerations @@ -50,7 +50,7 @@ Use with :py:attr:`Notify.align` - :since: 1.8 + .. versionadded:: 1.8 """ @@ -95,7 +95,7 @@ Once the parent object is set, a previously set one will be disconnected and replaced. - :type: :py:class:`Object` + :type: :py:class:`~efl.elementary.object.Object` """ def __get__(self): @@ -113,11 +113,11 @@ """The time interval after which the notify window is going to be hidden. - Setting this starts the timer controlling when the - notify is hidden. Since calling :py:func:`show()` on a notify restarts - the timer controlling when the notify is hidden, setting this before the - notify is shown will in effect mean starting the timer when the notify is - shown. + Setting this starts the timer controlling when the notify is hidden. + Since calling :py:meth:`efl.evas.Object.show` on a notify restarts the + timer controlling when the notify is hidden, setting this before the + notify is shown will in effect mean starting the timer when the notify + is shown. .. note:: Set a value <= 0.0 to disable a running timer. @@ -141,8 +141,8 @@ property allow_events: """Whether events should be passed to by a click outside its area. - When True if the user clicks outside the window the events will be caught - by the others widgets, else the events are blocked. + When True if the user clicks outside the window the events will be + caught by the others widgets, else the events are blocked. .. note:: The default value is True. @@ -169,9 +169,10 @@ Sets the alignment in which the notify will appear in its parent. .. note:: To fill the notify box in the parent area, please pass - :ref:`ELM_NOTIFY_ALIGN_FILL ` to ``horizontal``, ``vertical``. + :ref:`ELM_NOTIFY_ALIGN_FILL` to + ``horizontal``, ``vertical``. - :since: 1.8 + .. versionadded:: 1.8 """ def __set__(self, value): @@ -216,9 +217,11 @@ @DEPRECATED("1.8", "Use align instead.") def orient_set(self, int orient): + """orient_set(int orient)""" elm_notify_orient_set(self.obj, orient) @DEPRECATED("1.8", "Use align instead.") def orient_get(self): + """orient_get() -> int""" return elm_notify_orient_get(self.obj) diff -Nru python-efl-1.17.99~201312040125/efl/elementary/object.pxd python-efl-1.8.2~201401231220/efl/elementary/object.pxd --- python-efl-1.17.99~201312040125/efl/elementary/object.pxd 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/object.pxd 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -148,9 +148,12 @@ void elm_object_domain_translatable_part_text_set(Evas_Object *obj, const_char *part, const_char *domain, const_char *text) void elm_object_domain_translatable_text_set(Evas_Object *obj, const_char *domain, const_char *text) void elm_object_translatable_text_set(Evas_Object *obj, const_char *text) + void elm_object_translatable_part_text_set(Evas_Object *obj, const_char *part, const_char *text) const_char * elm_object_translatable_part_text_get(const_Evas_Object *obj, const_char *part) const_char * elm_object_translatable_text_get(Evas_Object *obj) void elm_object_domain_part_text_translatable_set(Evas_Object *obj, const_char *part, const_char *domain, Eina_Bool translatable) + void elm_object_part_text_translatable_set(Evas_Object *obj, const_char *part, Eina_Bool translatable) + void elm_object_domain_text_translatable_set(Evas_Object *obj, const_char *domain, Eina_Bool translatable) # Access (elm_access.h) #TODO: Evas_Object * elm_access_object_get(const_Evas_Object *obj) diff -Nru python-efl-1.17.99~201312040125/efl/elementary/object.pyx python-efl-1.8.2~201401231220/efl/elementary/object.pyx --- python-efl-1.17.99~201312040125/efl/elementary/object.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/object.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -78,6 +78,29 @@ Focus next +.. data:: ELM_FOCUS_UP + + Focus up + + .. versionadded:: 1.8.1 + +.. data:: ELM_FOCUS_DOWN + + Focus down + + .. versionadded:: 1.8.1 + +.. data:: ELM_FOCUS_RIGHT + + Focus right + + .. versionadded:: 1.8.1 + +.. data:: ELM_FOCUS_LEFT + + Focus left + + .. versionadded:: 1.8.1 .. _Elm_Input_Event_Type: @@ -158,7 +181,7 @@ Defines the kind of action associated with the drop data if for XDND -:since: 1.8 +.. versionadded:: 1.8 .. data:: ELM_XDND_ACTION_UNKNOWN @@ -198,6 +221,7 @@ from cpython cimport PyObject, Py_INCREF, Py_DECREF, PyObject_GetAttr, \ PyObject_GetBuffer, PyBuffer_Release, PyBUF_SIMPLE, PyObject_CheckBuffer, \ PyUnicode_AsUTF8String +from libc.stdint cimport uintptr_t from efl.eo cimport _object_mapping_register from efl.utils.conversions cimport _ctouni, eina_list_objects_to_python_list @@ -220,6 +244,10 @@ ELM_FOCUS_PREVIOUS = enums.ELM_FOCUS_PREVIOUS ELM_FOCUS_NEXT = enums.ELM_FOCUS_NEXT +ELM_FOCUS_UP = enums.ELM_FOCUS_UP +ELM_FOCUS_DOWN = enums.ELM_FOCUS_DOWN +ELM_FOCUS_RIGHT = enums.ELM_FOCUS_RIGHT +ELM_FOCUS_LEFT = enums.ELM_FOCUS_LEFT EVAS_CALLBACK_KEY_DOWN = evasenums.EVAS_CALLBACK_KEY_DOWN EVAS_CALLBACK_KEY_UP = evasenums.EVAS_CALLBACK_KEY_UP @@ -263,7 +291,7 @@ if event_conv is None: func(obj, *args, **kargs) else: - ei = event_conv(event_info) + ei = event_conv(event_info) func(obj, ei, *args, **kargs) except: traceback.print_exc() @@ -753,7 +781,7 @@ - Just return ``True`` on *func*. ``False`` will mean the event was **not** processed, so the propagation will go on. - - The ``event_info`` pointer passed to ``func`` will contain the + - The ``event_info`` passed to ``func`` will contain the event's structure and, if you OR its ``event_flags`` inner value to *EVAS_EVENT_FLAG_ON_HOLD*, you're telling Elementary one has already handled it, thus killing the @@ -839,7 +867,7 @@ :type: bool - :since: 1.8 + .. versionadded:: 1.8 """ def __set__(self, bint disabled): @@ -1081,7 +1109,7 @@ :see: :py:func:`focus_next` - :since: 1.8 + .. versionadded:: 1.8 """ return object_from_instance( @@ -1103,7 +1131,7 @@ :see: :py:func:`focus_next` - :since: 1.8 + .. versionadded:: 1.8 """ elm_object_focus_next_object_set(self.obj, next.obj, direction) @@ -1113,7 +1141,7 @@ :return: Current focused or None, if there is no focused object. - :since: 1.8 + .. versionadded:: 1.8 """ def __get__(self): @@ -1172,7 +1200,7 @@ property mirrored_automatic: """The widget's mirrored mode setting. When widget in automatic mode, it follows the system mirrored mode set by - :py:attr:`efl.elementary.configuration.mirrored`. + :py:attr:`efl.elementary.configuration.Configuration.mirrored`. :type: bool @@ -1240,6 +1268,8 @@ :type: int + .. versionadded:: 1.8 + """ def __get__(self): return elm_object_scroll_hold_get(self.obj) @@ -1274,6 +1304,8 @@ :type: int + .. versionadded:: 1.8 + """ def __get__(self): return elm_object_scroll_freeze_get(self.obj) @@ -1322,7 +1354,7 @@ configuration difficult. Avoid any custom themes at all if it can be helped. - :type: :py:class:`Theme` + :type: :py:class:`~efl.elementary.theme.Theme` """ def __set__(self, Theme th): @@ -1494,7 +1526,7 @@ :param domain: The translation domain to use :param text: The original, non-translated text to set - :since: 1.8 + .. versionadded:: 1.8 """ if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) @@ -1509,13 +1541,27 @@ def domain_translatable_text_set(self, domain, text): """domain_translatable_text_set(unicode domain, unicode text) - Convenience function""" + A convenience function. + + """ if isinstance(domain, unicode): domain = PyUnicode_AsUTF8String(domain) if isinstance(text, unicode): text = PyUnicode_AsUTF8String(text) elm_object_domain_translatable_text_set(self.obj, domain if domain is not None else NULL, text if text is not None else NULL) + def translatable_part_text_set(self, part, text): + """translatable_part_text_set(part, text) + + A convenience function. + + """ + if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) + if isinstance(text, unicode): text = PyUnicode_AsUTF8String(text) + elm_object_translatable_part_text_set(self.obj, + part if part is not None else NULL, + text if text is not None else NULL) + @DEPRECATED("1.8", "Use :py:func:`translatable_part_text_get` instead.") def translatable_text_part_get(self, part): """translatable_text_part_get(part) -> unicode""" @@ -1541,7 +1587,7 @@ :see: :py:func:`translatable_part_text_set` - :since: 1.8 + .. versionadded:: 1.8 """ if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) @@ -1567,7 +1613,7 @@ :seealso: :py:func:`efl.elementary.general.policy_set` - :since: 1.8 + .. versionadded:: 1.8 """ if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) @@ -1577,8 +1623,27 @@ domain, translatable) + def part_text_translatable_set(self, part, bint translatable): + """part_text_translatable_set(part, bool translatable) + + A convenience function. + + """ + if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) + elm_object_part_text_translatable_set(self.obj, + part, translatable) + + def domain_text_translatable_set(self, domain, bint translatable): + """domain_text_translatable_set(domain, bool translatable) + + A convenience function. + + """ + if isinstance(domain, unicode): domain = PyUnicode_AsUTF8String(domain) + elm_object_domain_text_translatable_set(self.obj, domain, translatable) + property translatable_text: - # TODO: Document this + """Translatable text for the main text part of the widget.""" def __get__(self): return self.translatable_text_get() def __set__(self, text): @@ -1720,7 +1785,7 @@ :return: Address of saved Evas_Object """ - return self.obj + return self.obj # # Copy and Paste @@ -1769,7 +1834,7 @@ :param selection: Selection type for copying and pasting :param format: Selection format :param datacb: The user data callback if the target widget isn't elm_entry - :param udata: The user data pointer for ``datacb`` + :param udata: The user data for ``datacb`` :return bool: Whether getting cnp data was successful or not. @@ -1814,7 +1879,7 @@ :param selection: Selection to be notified of for loss :param func: The function to call - :param data: The data pointer passed to the function. + :param data: The data passed to the function. """ if not callable(func): diff -Nru python-efl-1.17.99~201312040125/efl/elementary/object_item.pyx python-efl-1.8.2~201401231220/efl/elementary/object_item.pyx --- python-efl-1.17.99~201312040125/efl/elementary/object_item.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/object_item.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -16,6 +16,7 @@ # along with this Python-EFL. If not, see . from cpython cimport PyUnicode_AsUTF8String, Py_DECREF, Py_INCREF +from libc.stdint cimport uintptr_t from efl.eo cimport _object_mapping_register, object_from_instance, PY_REFCOUNT from efl.utils.conversions cimport _ctouni @@ -144,13 +145,15 @@ def __repr__(self): return ("<%s object (ObjectItem) at %#x (obj=%#x, refcount=%d, widget=%s)>") % ( type(self).__name__, - self, - self.item, + self, + self.item, PY_REFCOUNT(self), repr(object_from_instance(elm_object_item_widget_get(self.item))) ) cdef int _set_properties_from_keyword_args(self, dict kwargs) except 0: + if not kwargs: + return 1 cdef list cls_list = dir(self) for k, v in kwargs.items(): assert k in cls_list, "%s has no attribute with the name %s." % (self, k) @@ -159,10 +162,12 @@ @DEPRECATED("1.8", "Use the data attribute (dict) instead.") def data_get(self): + """data_get() -> tuple""" return (self.args, self.kwargs) @DEPRECATED("1.8", "Use the data attribute (dict) instead.") def data_set(self, *args, **kwargs): + """data_set(self, *args **kwargs)""" self.args = args self.kwargs = kwargs @@ -172,7 +177,7 @@ .. note:: This returns the widget object itself that an item belongs to. .. note:: Every elm_object_item supports this API - :type: :py:class:`elementary.object.Object` + :type: :py:class:`~efl.elementary.object.Object` """ def __get__(self): @@ -212,7 +217,7 @@ content) :type part: string :return: content of the object item or None for any error - :rtype: :py:class:`evas.object.Object` + :rtype: :py:class:`~efl.evas.Object` """ if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) @@ -310,7 +315,7 @@ :param domain: The translation domain to use :param text: The original, non-translated text to set - :since: 1.8 + .. versionadded:: 1.8 """ if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) @@ -334,7 +339,7 @@ :return: The original, untranslated string - :since: 1.8 + .. versionadded:: 1.8 """ if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) @@ -359,9 +364,9 @@ :see: :py:func:`domain_translatable_part_text_set` :see: :py:func:`part_text_set` - :see: :py:func:`efl.elementary.general.policy` + :see: :py:func:`efl.elementary.general.policy_set` - :since: 1.8 + .. versionadded:: 1.8 """ if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) diff -Nru python-efl-1.17.99~201312040125/efl/elementary/panel.pyx python-efl-1.8.2~201401231220/efl/elementary/panel.pyx --- python-efl-1.17.99~201312040125/efl/elementary/panel.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/panel.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -35,13 +35,14 @@ - ELM_PANEL_ORIENT_BOTTOM This widget emits the following signals, besides the ones sent from -:py:class:`LayoutClass`: +:py:class:`~efl.elementary.layout_class.LayoutClass`: + - ``focused`` - When the panel has received focus. (since 1.8) - ``unfocused`` - When the panel has lost focus. (since 1.8) Default content parts of the panel widget that you can use for are: -- "default" - A content of the panel +- ``default`` - A content of the panel Enumerations @@ -73,6 +74,7 @@ from efl.eo cimport _object_mapping_register from efl.evas cimport Object as evasObject from object cimport Object +from layout_class cimport LayoutClass cimport enums @@ -81,9 +83,14 @@ ELM_PANEL_ORIENT_LEFT = enums.ELM_PANEL_ORIENT_LEFT ELM_PANEL_ORIENT_RIGHT = enums.ELM_PANEL_ORIENT_RIGHT -cdef class Panel(Object): +cdef class Panel(LayoutClass): + + """This is the class that actually implements the widget. + + .. versionchanged:: 1.8 + Inherits from LayoutClass. - """This is the class that actually implements the widget.""" + """ def __init__(self, evasObject parent, *args, **kwargs): self._set_obj(elm_panel_add(parent.obj)) @@ -134,7 +141,7 @@ def callback_focused_add(self, func, *args, **kwargs): """When the panel has received focus. - :since: 1.8 + .. versionadded:: 1.8 """ self._callback_add("focused", func, *args, **kwargs) @@ -144,7 +151,7 @@ def callback_unfocused_add(self, func, *args, **kwargs): """When the panel has lost focus. - :since: 1.8 + .. versionadded:: 1.8 """ self._callback_add("unfocused", func, *args, **kwargs) diff -Nru python-efl-1.17.99~201312040125/efl/elementary/panes.pyx python-efl-1.8.2~201401231220/efl/elementary/panes.pyx --- python-efl-1.17.99~201312040125/efl/elementary/panes.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/panes.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -30,21 +30,23 @@ proportion can be customized (homogeneous by default). This widget emits the following signals, besides the ones sent from -:py:class:`elementary.layout.Layout`: +:py:class:`~efl.elementary.layout_class.LayoutClass`: -- ``"press"`` - The panes has been pressed (button wasn't released yet). -- ``"unpressed"`` - The panes was released after being pressed. -- ``"clicked"`` - The panes has been clicked. -- ``"clicked,double"`` - The panes has been double clicked. +- ``press`` - The panes has been pressed (button wasn't released yet). +- ``unpressed`` - The panes was released after being pressed. +- ``clicked`` - The panes has been clicked. +- ``clicked,double`` - The panes has been double clicked. Available styles for it: -- ``"default"`` +- ``default`` Default content parts of the panes widget that you can use are: -- "left" - A leftside content of the panes -- "right" - A rightside content of the panes +- ``left`` - A leftside content of the panes +- ``right`` - A rightside content of the panes +- ``top`` - A top content of the vertical panes +- ``bottom`` - A bottom content of the vertical panes If panes are displayed vertically, left content will be displayed on top. diff -Nru python-efl-1.17.99~201312040125/efl/elementary/photo.pyx python-efl-1.8.2~201401231220/efl/elementary/photo.pyx --- python-efl-1.17.99~201312040125/efl/elementary/photo.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/photo.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -28,16 +28,16 @@ Simple, yet with a very specific purpose. It has a decorative frame around the inner image itself, on the default theme. -This widget relies on an internal :py:class:`Icon`, so that the APIs of -these two widgets are similar (drag and drop is also possible here, for -example). +This widget relies on an internal :py:class:`~efl.elementary.icon.Icon`, so +that the APIs of these two widgets are similar (drag and drop is also possible +here, for example). Signals that you can add callbacks for are: -- ``"clicked"`` - This is called when a user has clicked the photo -- ``"drag,start"`` - One has started dragging the inner image out of the - photo's frame -- ``"drag,end"`` - One has dropped the dragged image somewhere +- ``clicked`` - This is called when a user has clicked the photo +- ``drag,start`` - One has started dragging the inner image out of the photo's + frame +- ``drag,end`` - One has dropped the dragged image somewhere """ @@ -62,6 +62,9 @@ :type: string :raise RuntimeError: when setting the file fails + .. versionchanged:: 1.8 + Raises RuntimeError if setting the file fails + """ def __set__(self, filename): if isinstance(filename, unicode): filename = PyUnicode_AsUTF8String(filename) diff -Nru python-efl-1.17.99~201312040125/efl/elementary/photocam.pyx python-efl-1.8.2~201401231220/efl/elementary/photocam.pyx --- python-efl-1.17.99~201312040125/efl/elementary/photocam.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/photocam.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -29,31 +29,31 @@ Signals that you can add callbacks for are: -- "clicked" - This is called when a user has clicked the photo without - dragging around. -- "press" - This is called when a user has pressed down on the photo. -- "longpressed" - This is called when a user has pressed down on the - photo for a long time without dragging around. -- "clicked,double" - This is called when a user has double-clicked the - photo. -- "load" - Photo load begins. -- "loaded" - This is called when the image file load is complete for - the first view (low resolution blurry version). -- "load,detail" - Photo detailed data load begins. -- "loaded,detail" - This is called when the image file load is - complete for the detailed image data (full resolution needed). -- "zoom,start" - Zoom animation started. -- "zoom,stop" - Zoom animation stopped. -- "zoom,change" - Zoom changed when using an auto zoom mode. -- "scroll" - the content has been scrolled (moved) -- "scroll,anim,start" - scrolling animation has started -- "scroll,anim,stop" - scrolling animation has stopped -- "scroll,drag,start" - dragging the contents around has started -- "scroll,drag,stop" - dragging the contents around has stopped -- "download,start" - remote url download has started -- "download,progress" - url download in progress -- "download,end" - remote url download has finished -- "download,error" - remote url download has finished with errors +- ``clicked`` - This is called when a user has clicked the photo without + dragging around. +- ``press`` - This is called when a user has pressed down on the photo. +- ``longpressed`` - This is called when a user has pressed down on the + photo for a long time without dragging around. +- ``clicked,double`` - This is called when a user has double-clicked the + photo. +- ``load`` - Photo load begins. +- ``loaded`` - This is called when the image file load is complete for + the first view (low resolution blurry version). +- ``load,detail`` - Photo detailed data load begins. +- ``loaded,detail`` - This is called when the image file load is + complete for the detailed image data (full resolution needed). +- ``zoom,start`` - Zoom animation started. +- ``zoom,stop`` - Zoom animation stopped. +- ``zoom,change`` - Zoom changed when using an auto zoom mode. +- ``scroll`` - the content has been scrolled (moved) +- ``scroll,anim,start`` - scrolling animation has started +- ``scroll,anim,stop`` - scrolling animation has stopped +- ``scroll,drag,start`` - dragging the contents around has started +- ``scroll,drag,stop`` - dragging the contents around has stopped +- ``download,start`` - remote url download has started +- ``download,progress`` - url download in progress +- ``download,end`` - remote url download has finished +- ``download,error`` - remote url download has finished with errors - ``focused`` - When the photocam has received focus. (since 1.8) - ``unfocused`` - When the photocam has lost focus. (since 1.8) @@ -64,7 +64,7 @@ If you wish to control the scolling behaviour using these functions, inherit both the widget class and the -:py:class:`Scrollable` class +:py:class:`~efl.elementary.scroller.Scrollable` class using multiple inheritance, for example:: class ScrollableGenlist(Genlist, Scrollable): @@ -81,7 +81,7 @@ .. data:: ELM_PHOTOCAM_ZOOM_MODE_MANUAL - Zoom controlled normally by :py:attr:`zoom` + Zoom controlled normally by :py:attr:`~Photocam.zoom` .. data:: ELM_PHOTOCAM_ZOOM_MODE_AUTO_FIT @@ -98,6 +98,7 @@ """ from cpython cimport PyUnicode_AsUTF8String +from libc.stdint cimport uintptr_t from efl.eo cimport _object_mapping_register from efl.utils.conversions cimport _ctouni @@ -128,12 +129,14 @@ :var now: The amount of data received so far. :var total: The total amount of data to download. + .. versionadded:: 1.8 + """ def __init__(self): self.now = 0 self.total = 0 -def _photocam_download_progress_conv(long addr): +def _photocam_download_progress_conv(uintptr_t addr): cdef Elm_Photocam_Progress *pp = addr ppi = PhotocamProgressInfo() ppi.now = pp.now @@ -147,14 +150,16 @@ by Photocam when fail to download remote urls. :var status: The http error code (such as 401) - :var open_error: TODOC + :var open_error: TODO + + .. versionadded:: 1.8 """ def __init__(self): self.status = 0 self.open_error = False -def _photocam_download_error_conv(long addr): +def _photocam_download_error_conv(uintptr_t addr): cdef Elm_Photocam_Error *pe = addr pei = PhotocamErrorInfo() pei.status = pe.status @@ -184,17 +189,24 @@ :raise RuntimeError: when setting the file fails """ - def __set__(self, file): - if isinstance(file, unicode): file = PyUnicode_AsUTF8String(file) + def __set__(self, filename): + # TODO: Return EvasLoadError + if isinstance(filename, unicode): + filename = PyUnicode_AsUTF8String(filename) if elm_photocam_file_set(self.obj, - file if file is not None else NULL) != 0: + filename if filename is not None else NULL) != 0: raise RuntimeError("Could not set file") def __get__(self): return _ctouni(elm_photocam_file_get(self.obj)) - def file_set(self, file): - self.file = file + def file_set(self, filename): + # TODO: Return EvasLoadError + if isinstance(filename, unicode): + filename = PyUnicode_AsUTF8String(filename) + if elm_photocam_file_set(self.obj, + filename if filename is not None else NULL) != 0: + raise RuntimeError("Could not set file") def file_get(self): return _ctouni(elm_photocam_file_get(self.obj)) @@ -286,7 +298,7 @@ elm_photocam_image_region_get(self.obj, &x, &y, &w, &h) return (x, y, w, h) - def image_region_show(self, x, y, w, h): + def image_region_show(self, int x, int y, int w, int h): """image_region_show(int x, int y, int w, int h) Set the viewed region of the image @@ -305,7 +317,7 @@ """ elm_photocam_image_region_show(self.obj, x, y, w, h) - def image_region_bring_in(self, x, y, w, h): + def image_region_bring_in(self, int x, int y, int w, int h): """image_region_bring_in(int x, int y, int w, int h) Bring in the viewed portion of the image @@ -500,28 +512,44 @@ self._callback_del("scroll,drag,stop", func) def callback_download_start_add(self, func, *args, **kwargs): - """This is called when you set a remote url and the download start""" + """This is called when you set a remote url and the download start + + .. versionadded:: 1.8 + + """ self._callback_add("download,start", func, *args, **kwargs) def callback_download_start_del(self, func): self._callback_del("download,start", func) def callback_download_progress_add(self, func, *args, **kwargs): - """This is called while a remote image download is in progress""" + """This is called while a remote image download is in progress + + .. versionadded:: 1.8 + + """ self._callback_add_full("download,progress", _photocam_download_progress_conv, func, *args, **kwargs) def callback_download_progress_del(self, func): self._callback_del_full("download,progress", _photocam_download_progress_conv, func) def callback_download_done_add(self, func, *args, **kwargs): - """This is called when you set a remote url and the download finish""" + """This is called when you set a remote url and the download finish + + .. versionadded:: 1.8 + + """ self._callback_add("download,done", func, *args, **kwargs) def callback_download_done_del(self, func): self._callback_del("download,end", func) def callback_download_error_add(self, func, *args, **kwargs): - """This is called in case a download has errors""" + """This is called in case a download has errors + + .. versionadded:: 1.8 + + """ self._callback_add_full("download,error", _photocam_download_error_conv, func, *args, **kwargs) def callback_download_error_del(self, func): @@ -530,7 +558,7 @@ def callback_focused_add(self, func, *args, **kwargs): """When the photocam has received focus. - :since: 1.8 + .. versionadded:: 1.8 """ self._callback_add("focused", func, *args, **kwargs) @@ -540,7 +568,7 @@ def callback_unfocused_add(self, func, *args, **kwargs): """When the photocam has lost focus. - :since: 1.8 + .. versionadded:: 1.8 """ self._callback_add("unfocused", func, *args, **kwargs) @@ -548,6 +576,12 @@ self._callback_del("unfocused", func) property scroller_policy: + """ + + .. deprecated:: 1.8 + You should combine with Scrollable class instead. + + """ def __get__(self): return self.scroller_policy_get() @@ -566,6 +600,12 @@ return (policy_h, policy_v) property bounce: + """ + + .. deprecated:: 1.8 + You should combine with Scrollable class instead. + + """ def __get__(self): return self.bounce_get() def __set__(self, value): diff -Nru python-efl-1.17.99~201312040125/efl/elementary/plug.pyx python-efl-1.8.2~201401231220/efl/elementary/plug.pyx --- python-efl-1.17.99~201312040125/efl/elementary/plug.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/plug.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -25,8 +25,8 @@ - ``clicked`` - the user clicked the image (press/release). - ``image,deleted`` - the server side was deleted. -- ``image,resized`` - the server side was resized. The ``event_info`` parameter of - the callback will be ``Evas_Coord_Size`` (two integers). +- ``image,resized`` - the server side was resized. The ``event_info`` parameter + of the callback will be ``Evas_Coord_Size`` (two integers). .. note:: @@ -41,7 +41,7 @@ from cpython cimport PyUnicode_AsUTF8String -from efl.eo cimport _object_mapping_register +from efl.eo cimport _object_mapping_register, object_from_instance from efl.utils.conversions cimport _ctouni from efl.evas cimport Object as evasObject from object cimport Object @@ -74,16 +74,20 @@ (set up by socket). :type svcsys: bool - :return: (``True`` = success, ``False`` = error) - :rtype: bool + :raise RuntimeError: on failure + + .. versionchanged:: 1.8 + Raises RuntimeError if adding the child fails """ if isinstance(svcname, unicode): svcname = PyUnicode_AsUTF8String(svcname) - return bool(elm_plug_connect(self.obj, - svcname if svcname is not None else NULL, svcnum, svcsys)) + if not elm_plug_connect(self.obj, + svcname if svcname is not None else NULL, + svcnum, svcsys): + raise RuntimeError property image_object: - """Get the basic Evas_Image object from this object (widget). + """Get the basic Image object from this object (widget). This function allows one to get the underlying ``Object`` of type Image from this elementary widget. It can be useful to do things @@ -92,14 +96,11 @@ .. note:: Be careful to not manipulate it, as it is under control of elementary. - :type: :py:class:`Object` + :type: :py:class:`~efl.evas.Image` """ def __get__(self): - cdef evasImage img = evasImage() - cdef Evas_Object *obj = elm_plug_image_object_get(self.obj) - img.obj = obj - return img + return object_from_instance(elm_plug_image_object_get(self.obj)) def callback_clicked_add(self, func, *args, **kwargs): diff -Nru python-efl-1.17.99~201312040125/efl/elementary/popup.pyx python-efl-1.8.2~201401231220/efl/elementary/popup.pyx --- python-efl-1.17.99~201312040125/efl/elementary/popup.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/popup.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -23,7 +23,7 @@ Widget description ------------------ -This widget is an enhancement of :py:class:`Notify`. +This widget is an enhancement of :py:class:`~efl.elementary.notify.Notify`. In addition to Content area, there are two optional sections namely Title area and Action area. @@ -87,20 +87,28 @@ Styles available for Popup -- "default" +- ``default`` + +Default contents parts of the popup items that you can use are: + +- ``default`` -Item's icon + +Default text parts of the popup items that you can use are: + +- ``default`` - Item's label Default contents parts of the popup widget that you can use for are: -- "default" - The content of the popup -- "title,icon" - Title area's icon -- "button1" - 1st button of the action area -- "button2" - 2nd button of the action area -- "button3" - 3rd button of the action area +- ``default`` - The content of the popup +- ``title,icon`` - Title area's icon +- ``button1`` - 1st button of the action area +- ``button2`` - 2nd button of the action area +- ``button3`` - 3rd button of the action area Default text parts of the popup widget that you can use for are: -- "title,text" - This operates on Title area's label -- "default" - content-text set in the content area of the widget +- ``title,text`` - This operates on Title area's label +- ``default`` - content-text set in the content area of the widget Enumerations @@ -172,11 +180,13 @@ """ from cpython cimport PyUnicode_AsUTF8String, Py_DECREF +from libc.stdint cimport uintptr_t from efl.eo cimport _object_mapping_register, PY_REFCOUNT from efl.utils.conversions cimport _ctouni from efl.evas cimport Object as evasObject from object cimport Object +from layout_class cimport LayoutClass from object_item cimport _object_item_callback, _object_item_callback2, \ _object_item_to_python @@ -243,34 +253,31 @@ self.icon.obj if not None else NULL, cb, self) - if item != NULL: - self._set_obj(item) - self._set_properties_from_keyword_args(self.kwargs) - return self - else: - # FIXME: raise RuntimeError? - return None - + if item == NULL: + raise RuntimeError("The item could not be added to the widget.") - def __str__(self): - return "%s(func=%s, item_data=%s)" % \ - (self.__class__.__name__, - self.cb_func, - self.args) + self._set_obj(item) + self._set_properties_from_keyword_args(self.kwargs) + return self def __repr__(self): - return ("%s(%#x, refcount=%d, Elm_Object_Item=%#x, " - "item_class=%s, func=%s, item_data=%r)") % \ + return ("<%s(%#x, refcount=%d, Elm_Object_Item=%#x, " + "item_class=%s, func=%s, item_data=%r)>") % \ (self.__class__.__name__, - self, + self, PY_REFCOUNT(self), - self.item, + self.item, self.cb_func, self.args) -cdef class Popup(Object): +cdef class Popup(LayoutClass): - """This is the class that actually implements the widget.""" + """This is the class that actually implements the widget. + + .. versionchanged:: 1.8 + Inherits from LayoutClass. + + """ def __init__(self, evasObject parent, *args, **kwargs): self._set_obj(elm_popup_add(parent.obj)) @@ -287,7 +294,7 @@ :param label: The Label of the new item :type label: string :param icon: Icon to be set on new item - :type icon: :py:class:`Object` + :type icon: :py:class:`~efl.evas.Object` :param func: Convenience function called when item selected :type func: function @@ -405,7 +412,7 @@ def callback_focused_add(self, func, *args, **kwargs): """When the popup has received focus. - :since: 1.8 + .. versionadded:: 1.8 """ self._callback_add("focused", func, *args, **kwargs) @@ -415,7 +422,7 @@ def callback_unfocused_add(self, func, *args, **kwargs): """When the popup has lost focus. - :since: 1.8 + .. versionadded:: 1.8 """ self._callback_add("unfocused", func, *args, **kwargs) @@ -425,7 +432,7 @@ def callback_language_changed_add(self, func, *args, **kwargs): """the program's language changed - since: 1.8 + .. versionadded:: 1.8 """ self._callback_add("language,changed", func, *args, **kwargs) diff -Nru python-efl-1.17.99~201312040125/efl/elementary/progressbar.pyx python-efl-1.8.2~201401231220/efl/elementary/progressbar.pyx --- python-efl-1.17.99~201312040125/efl/elementary/progressbar.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/progressbar.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -39,14 +39,14 @@ inverted, i.e., high values being on the left or top and low values on the right or bottom, for horizontal and vertical modes respectively. -The **span** of the progress, as set by :py:attr:`span_size`, is its length -(horizontally or vertically), unless one puts size hints on the widget -to expand on desired directions, by any container. That length will be -scaled by the object or applications scaling factor. Applications can -query the progress bar for its value with :py:attr:`value`. +The **span** of the progress, as set by :py:attr:`~Progressbar.span_size`, is +its length (horizontally or vertically), unless one puts size hints on the +widget to expand on desired directions, by any container. That length will be +scaled by the object or applications scaling factor. Applications can query the +progress bar for its value with :py:attr:`~Progressbar.value`. This widget emits the following signals, besides the ones sent from -:py:class:`elementary.layout.Layout`: +:py:class:`~efl.elementary.layout_class.LayoutClass`: - ``changed`` - when the value is changed - ``focused`` - When the progressbar has received focus. (since 1.8) @@ -54,23 +54,23 @@ This widget has the following styles: - - ``default`` - - ``wheel`` (simple style, no text, no progression, only "pulse" - effect is available) - - ``double`` (style with two independent progress indicators) +- ``default`` +- ``wheel`` (simple style, no text, no progression, only "pulse" + effect is available) +- ``double`` (style with two independent progress indicators) Default text parts of the progressbar widget that you can use for are: - - ``default`` - Label of the progressbar +- ``default`` - Label of the progressbar Default content parts of the progressbar widget that you can use for are: - - ``icon`` - An icon of the progressbar +- ``icon`` - An icon of the progressbar Default part names for the "recording" style: - - ``elm.cur.progressbar`` - The "main" indicator bar - - ``elm.cur.progressbar1`` - The "secondary" indicator bar +- ``elm.cur.progressbar`` - The "main" indicator bar +- ``elm.cur.progressbar1`` - The "secondary" indicator bar """ @@ -153,7 +153,9 @@ return elm_progressbar_value_get(self.obj) def part_value_get(self, part not None): - """ Get the progress status (in percentage) for the given part. + """part_value_get(part) -> int + + Get the progress status (in percentage) for the given part. This can be used with a progressbar of style: "recording". The recording style have two different part that can represent two different progress @@ -161,15 +163,21 @@ The default theme provide two parts by default: "elm.cur.progressbar" and "elm.cur.progressbar1" + .. versionadded:: 1.8 + """ if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) return elm_progressbar_part_value_get(self.obj, part) - def part_value_set(self, part not None, value): - """ Set the progress status (in percentage) for the given part. + def part_value_set(self, part not None, double value): + """part_value_set(part, int value) + + Set the progress status (in percentage) for the given part. :see: :py:func:`part_value_get` for more info. + .. versionadded:: 1.8 + """ if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) elm_progressbar_part_value_set(self.obj, part, value) @@ -301,7 +309,7 @@ def callback_focused_add(self, func, *args, **kwargs): """When the progressbar has received focus. - :since: 1.8 + .. versionadded:: 1.8 """ self._callback_add("focused", func, *args, **kwargs) @@ -311,7 +319,7 @@ def callback_unfocused_add(self, func, *args, **kwargs): """When the progressbar has lost focus. - :since: 1.8 + .. versionadded:: 1.8 """ self._callback_add("unfocused", func, *args, **kwargs) diff -Nru python-efl-1.17.99~201312040125/efl/elementary/radio.pyx python-efl-1.8.2~201401231220/efl/elementary/radio.pyx --- python-efl-1.17.99~201312040125/efl/elementary/radio.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/radio.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -33,23 +33,20 @@ Radio objects are grouped in a slightly different, compared to other UI toolkits. There is no seperate group name/id to remember or manage. The members represent the group, there are the group. To make a group, use -:py:func:`group_add()` and pass existing radio object and the new radio +:py:meth:`Radio.group_add` and pass existing radio object and the new radio object. The radio object(s) will select from one of a set of integer values, so any value they are configuring needs to be mapped to a set of integers. To configure what value that radio object represents, use -elm_radio_state_value_set() to set the integer it represents. The +:py:attr:`~Radio.state_value` to set the integer it represents. The value of the whole group (which one is currently selected) is -represented by the property :py:attr:`value` on any group member. For +represented by the property :py:attr:`~Radio.value` on any group member. For convenience the radio objects are also able to directly set an -integer(int) to the value that is selected. To specify the pointer to -this integer to modify, use :py:attr:`value_pointer`. The radio objects -will modify this directly. That implies the pointer must point to valid -memory for as long as the radio objects exist. +integer(int) to the value that is selected. This widget emits the following signals, besides the ones sent from -:py:class:`elementary.layout_class.LayoutClass`: +:py:class:`~efl.elementary.layout_class.LayoutClass`: - ``changed`` - This is called whenever the user changes the state of one of the radio objects within the group of radio objects that work together. @@ -58,15 +55,16 @@ Default text parts of the radio widget that you can use for are: -- "default" - Label of the radio +- ``default`` - Label of the radio Default content parts of the radio widget that you can use for are: -- "icon" - An icon of the radio +- ``icon`` - An icon of the radio """ from efl.eo cimport _object_mapping_register, object_from_instance +from efl.utils.deprecated cimport DEPRECATED from efl.evas cimport Object as evasObject from layout_class cimport LayoutClass @@ -131,7 +129,7 @@ def value_get(self): return elm_radio_value_get(self.obj) - #TODO: Check whether this actually works + @DEPRECATED("1.8", "Don't use this, only works in C.") def value_pointer_set(self, int value): """value_pointer_set(value) @@ -177,7 +175,7 @@ def callback_focused_add(self, func, *args, **kwargs): """When the radio has received focus. - :since: 1.8 + .. versionadded:: 1.8 """ self._callback_add("focused", func, *args, **kwargs) @@ -187,7 +185,7 @@ def callback_unfocused_add(self, func, *args, **kwargs): """When the radio has lost focus. - :since: 1.8 + .. versionadded:: 1.8 """ self._callback_add("unfocused", func, *args, **kwargs) diff -Nru python-efl-1.17.99~201312040125/efl/elementary/scroller.pyx python-efl-1.8.2~201401231220/efl/elementary/scroller.pyx --- python-efl-1.17.99~201312040125/efl/elementary/scroller.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/scroller.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -31,38 +31,38 @@ a small minimum size by default as it won't be limited by the contents of the scroller. -This widget inherits from :py:class:`efl.elementary.layout_class.LayoutClass`, +This widget inherits from :py:class:`~efl.elementary.layout_class.LayoutClass`, so that all the functions acting on it also work for scroller objects. This widget emits the following signals, besides the ones sent from -:py:class:`efl.elementary.layout_class.LayoutClass` +:py:class:`~efl.elementary.layout_class.LayoutClass`: -- "edge,left" - the left edge of the content has been reached -- "edge,right" - the right edge of the content has been reached -- "edge,top" - the top edge of the content has been reached -- "edge,bottom" - the bottom edge of the content has been reached -- "scroll" - the content has been scrolled (moved) -- "scroll,left" - the content has been scrolled (moved) leftwards -- "scroll,right" - the content has been scrolled (moved) rightwards -- "scroll,up" - the content has been scrolled (moved) upwards -- "scroll,down" - the content has been scrolled (moved) downwards -- "scroll,anim,start" - scrolling animation has started -- "scroll,anim,stop" - scrolling animation has stopped -- "scroll,drag,start" - dragging the contents around has started -- "scroll,drag,stop" - dragging the contents around has stopped -- "vbar,drag" - the vertical scroll bar has been dragged -- "vbar,press" - the vertical scroll bar has been pressed -- "vbar,unpress" - the vertical scroll bar has been unpressed -- "hbar,drag" - the horizontal scroll bar has been dragged -- "hbar,press" - the horizontal scroll bar has been pressed -- "hbar,unpress" - the horizontal scroll bar has been unpressed +- ``edge,left`` - the left edge of the content has been reached +- ``edge,right`` - the right edge of the content has been reached +- ``edge,top`` - the top edge of the content has been reached +- ``edge,bottom`` - the bottom edge of the content has been reached +- ``scroll`` - the content has been scrolled (moved) +- ``scroll,left`` - the content has been scrolled (moved) leftwards +- ``scroll,right`` - the content has been scrolled (moved) rightwards +- ``scroll,up`` - the content has been scrolled (moved) upwards +- ``scroll,down`` - the content has been scrolled (moved) downwards +- ``scroll,anim,start`` - scrolling animation has started +- ``scroll,anim,stop`` - scrolling animation has stopped +- ``scroll,drag,start`` - dragging the contents around has started +- ``scroll,drag,stop`` - dragging the contents around has stopped +- ``vbar,drag`` - the vertical scroll bar has been dragged +- ``vbar,press`` - the vertical scroll bar has been pressed +- ``vbar,unpress`` - the vertical scroll bar has been unpressed +- ``hbar,drag`` - the horizontal scroll bar has been dragged +- ``hbar,press`` - the horizontal scroll bar has been pressed +- ``hbar,unpress`` - the horizontal scroll bar has been unpressed - ``scroll,page,changed`` - the visible page has changed - ``focused`` - When the scroller has received focus. (since 1.8) - ``unfocused`` - When the scroller has lost focus. (since 1.8) Default content parts of the scroller widget that you can use for are: -- "default" - A content of the scroller +- ``default`` - A content of the scroller .. note:: The "scroll,anim,*" and "scroll,drag,*" signals are only emitted by user intervention. @@ -264,7 +264,7 @@ :type: :ref:`Elm_Scroller_Single_Direction` - :since: 1.8 + .. versionadded:: 1.8 """ def __set__(self, Elm_Scroller_Single_Direction single_dir): @@ -340,7 +340,7 @@ :type: (bool **page_h_snap**, bool **page_v_snap**) - :since: 1.8 + .. versionadded:: 1.8 """ @@ -425,6 +425,9 @@ :type: (int **h_pagesize**, int **v_pagesize**) + .. versionadded:: 1.8 + Getter for this property + """ def __set__(self, value): h_pagesize, v_pagesize = value @@ -450,7 +453,7 @@ :type: (int **page_limit_h**, int **page_limit_v**) - :since: 1.8 + .. versionadded:: 1.8 """ def __set__(self, value): @@ -674,7 +677,7 @@ :type: :ref:`Elm_Scroller_Movement_Block` - :since: 1.8 + .. versionadded:: 1.8 """ @@ -828,7 +831,7 @@ def callback_focused_add(self, func, *args, **kwargs): """When the scroller has received focus. - :since: 1.8 + .. versionadded:: 1.8 """ self._callback_add("focused", func, *args, **kwargs) @@ -838,7 +841,7 @@ def callback_unfocused_add(self, func, *args, **kwargs): """When the scroller has lost focus. - :since: 1.8 + .. versionadded:: 1.8 """ self._callback_add("unfocused", func, *args, **kwargs) diff -Nru python-efl-1.17.99~201312040125/efl/elementary/segment_control.pyx python-efl-1.8.2~201401231220/efl/elementary/segment_control.pyx --- python-efl-1.17.99~201312040125/efl/elementary/segment_control.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/segment_control.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -33,27 +33,28 @@ other widget. This widget emits the following signals, besides the ones sent from -:py:class:`elementary.layout.Layout`: +:py:class:`~efl.elementary.layout_class.LayoutClass`: -- ``"changed"`` - When the user clicks on a segment item which is not +- ``changed`` - When the user clicks on a segment item which is not previously selected and get selected. The event_info parameter is the - segment item pointer. + segment item. Available styles for it: -- ``"default"`` +- ``default`` Default content parts of the segment control items that you can use for are: -- "icon" - An icon in a segment control item +- ``icon`` - An icon in a segment control item Default text parts of the segment control items that you can use for are: -- "default" - Title label in a segment control item +- ``default`` - Title label in a segment control item """ from cpython cimport PyUnicode_AsUTF8String +from libc.stdint cimport uintptr_t from efl.eo cimport _object_mapping_register, object_from_instance from efl.utils.conversions cimport _ctouni @@ -62,7 +63,7 @@ from object_item cimport _object_item_to_python -def _cb_object_item_conv(long addr): +def _cb_object_item_conv(uintptr_t addr): cdef Elm_Object_Item *it = addr return _object_item_to_python(it) @@ -70,6 +71,119 @@ """An item for :py:class:`SegmentControl`.""" + cdef: + evasObject icon + object label + + def __init__(self, evasObject icon = None, label = None, *args, **kwargs): + if isinstance(label, unicode): label = PyUnicode_AsUTF8String(label) + self.icon = icon + self.label = label + self.args = args + self.kwargs = kwargs + + def add_to(self, SegmentControl sc not None): + """item_add(self, evas.Object icon, unicode label = None) -> SegmentControlItem + + Append a new item to the segment control object. + + A new item will be created and appended to the segment control, + i.e., will be set as **last** item. + + If it should be inserted at another position, + :py:meth:`item_insert_at` should be used instead. + + Items created with this function can be deleted with function + :py:meth:`efl.elementary.object_item.ObjectItem.delete` or + :py:meth:`item_del_at`. + + Simple example:: + + sc = SegmentControl(win) + ic = Icon(win) + ic.file_set("path/to/image") + ic.resizable_set(True, True) + sc.item_add(ic, "label") + sc.show() + + .. note:: ``label`` set to ``None`` is different from empty string "". + If an item only has icon, it will be displayed bigger and + centered. If it has icon and label, even that an empty string, + icon will be smaller and positioned at left. + + :param icon: The icon object to use for the left side of the item. An + icon can be any Evas object, but usually it is an + :py:class:`~efl.elementary.icon.Icon`. + :type icon: :py:class:`~efl.evas.Object` + :param label: The label of the item. Note that, None is different + from empty string "". + :type label: string + :return: The created item or ``None`` upon failure. + :rtype: :py:class:`SegmentControlItem` + + """ + cdef Elm_Object_Item *item + + item = elm_segment_control_item_add(sc.obj, + self.icon.obj if self.icon is not None else NULL, + self.label if self.label is not None else NULL) + + if item == NULL: + raise RuntimeError("The item could not be added to the widget.") + + self._set_obj(item) + self._set_properties_from_keyword_args(self.kwargs) + return self + + def item_insert_at(self, SegmentControl sc not None, index = 0): + """item_insert_at(self, evas.Object icon, unicode label = None, int index = 0) -> SegmentControlItem + + Insert a new item to the segment control object at specified position. + + Index values must be between ``0``, when item will be prepended to + segment control, and items count, that can be get with + :py:attr:`item_count`, case when item will be appended + to segment control, just like :py:meth:`item_add`. + + Items created with this function can be deleted with function + :py:meth:`~efl.elementary.object_item.ObjectItem.delete` or + :py:meth:`item_del_at`. + + .. note:: ``label`` set to ``None`` is different from empty string "". + If an item only has icon, it will be displayed bigger and + centered. If it has icon and label, even that an empty string, + icon will be smaller and positioned at left. + + .. seealso:: + :py:meth:`item_add` + :py:attr:`item_count` + :py:meth:`efl.elementary.object_item.ObjectItem.delete` + + :param icon: The icon object to use for the left side of the item. An + icon can be any Evas object, but usually it is an + :py:class:`~efl.elementary.icon.Icon`. + :type icon: :py:class:`~efl.evas.Object` + :param label: The label of the item. + :type label: string + :param index: Item position. Value should be between 0 and items count. + :type index: int + :return: The created item or ``None`` upon failure. + :rtype: :py:class:`SegmentControlItem` + + """ + cdef Elm_Object_Item *item + + item = elm_segment_control_item_insert_at(sc.obj, + self.icon.obj if self.icon is not None else NULL, + self.label if self.label is not None else NULL, index) + + if item == NULL: + raise RuntimeError("The item could not be added to the widget.") + + self._set_obj(item) + self._set_properties_from_keyword_args(self.kwargs) + return self + property index: """Get the index of an item. @@ -128,17 +242,16 @@ i.e., will be set as **last** item. If it should be inserted at another position, - elm_segment_control_item_insert_at() should be used instead. + :py:meth:`item_insert_at` should be used instead. Items created with this function can be deleted with function - :py:func:`ObjectItem.delete()` or :py:func:`item_del_at()`. + :py:meth:`efl.elementary.object_item.ObjectItem.delete` or + :py:meth:`item_del_at`. Simple example:: sc = SegmentControl(win) - ic = Icon(win) - ic.file_set("path/to/image") - ic.resizable_set(True, True) + ic = Icon(win, file="path/to/image", resizable=(True, True)) sc.item_add(ic, "label") sc.show() @@ -147,14 +260,10 @@ centered. If it has icon and label, even that an empty string, icon will be smaller and positioned at left. - .. seealso:: - :py:func:`SegmentControl.item_insert_at()` - :py:func:`ObjectItem.delete()` - :param icon: The icon object to use for the left side of the item. An - icon can be any Evas object, but usually it is an icon created - with elm_icon_add(). - :type icon: :py:class:`Object` + icon can be any Evas object, but usually it is an + :py:class:`~efl.elementary.icon.Icon`. + :type icon: :py:class:`~efl.evas.Object` :param label: The label of the item. Note that, None is different from empty string "". :type label: string @@ -182,11 +291,12 @@ Index values must be between ``0``, when item will be prepended to segment control, and items count, that can be get with - elm_segment_control_item_count_get(), case when item will be appended - to segment control, just like elm_segment_control_item_add(). + :py:attr:`item_count`, case when item will be appended + to segment control, just like :py:meth:`item_add`. Items created with this function can be deleted with function - elm_object_item_del() or elm_segment_control_item_del_at(). + :py:meth:`~efl.elementary.object_item.ObjectItem.delete` or + :py:meth:`item_del_at`. .. note:: ``label`` set to ``None`` is different from empty string "". If an item only has icon, it will be displayed bigger and @@ -194,14 +304,14 @@ icon will be smaller and positioned at left. .. seealso:: - :py:func:`SegmentControl.item_add()` - :py:func:`SegmentControl.item_count_get()` - :py:func:`ObjectItem.delete()` + :py:meth:`item_add` + :py:attr:`item_count` + :py:meth:`efl.elementary.object_item.ObjectItem.delete` :param icon: The icon object to use for the left side of the item. An - icon can be any Evas object, but usually it is an icon created - with elm_icon_add(). - :type icon: :py:class:`Object` + icon can be any Evas object, but usually it is an + :py:class:`~efl.elementary.icon.Icon`. + :type icon: :py:class:`~efl.evas.Object` :param label: The label of the item. :type label: string :param index: Item position. Value should be between 0 and items count. @@ -229,8 +339,8 @@ Remove a segment control item at given index from its parent, deleting it. - Items can be added with elm_segment_control_item_add() or - elm_segment_control_item_insert_at(). + Items can be added with :py:meth:`item_add` or + :py:meth:`item_insert_at`. :param index: The position of the segment control item to be deleted. :type index: int @@ -257,7 +367,7 @@ Index is the position of an item in segment control widget. Its range is from ``0`` to count - 1 . Count is the number of items, that can be get with - elm_segment_control_item_count_get(). + :py:attr:`item_count`. :param index: The index of the segment item. :type index: int @@ -272,14 +382,10 @@ Get the label of item. - The return value is a pointer to the label associated to the item when - it was created, with function elm_segment_control_item_add(), or later - with function elm_object_item_text_set. If no label - was passed as argument, it will return ``None``. - - .. seealso:: - :py:func:`ObjectItem.text_set()` for more details. - :py:func:`SegmentControl.item_add()` + The return value is the label associated to the item when + it was created, with function :py:meth:`item_add`, or later with + function :py:attr:`~efl.elementary.object_item.ObjectItem.text`. If no + label was passed as argument, it will return ``None``. :param index: The index of the segment item. :type index: int @@ -294,28 +400,21 @@ Get the icon associated to the item. - The return value is a pointer to the icon associated to the item when - it was created, with function elm_segment_control_item_add(), or later - with function elm_object_item_part_content_set(). If no icon - was passed as argument, it will return ``None``. - - .. seealso:: - :py:func:`SegmentControl.item_add()` - :py:func:`ObjectItem.part_content_set()` + The return value is the icon associated to the item when it + was created, with function :py:meth:`item_add`, or later with function + :py:meth:`~efl.elementary.object_item.ObjectItem.part_content_set`. If + no icon was passed as argument, it will return ``None``. :param index: The index of the segment item. :type index: int :return: The left side icon associated to the item at ``index``. - :rtype: :py:class:`Object` + :rtype: :py:class:`~efl.evas.Object` """ return object_from_instance(elm_segment_control_item_icon_get(self.obj, index)) property item_selected: - """Get the selected item. - - The selected item can be unselected with function - elm_segment_control_item_selected_set(). + """The selected item. The selected item always will be highlighted on segment control. diff -Nru python-efl-1.17.99~201312040125/efl/elementary/separator.pyx python-efl-1.8.2~201401231220/efl/elementary/separator.pyx --- python-efl-1.17.99~201312040125/efl/elementary/separator.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/separator.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -28,7 +28,7 @@ A separator can be vertical or horizontal. This widget emits the signals coming from -:py:class:`elementary.layout_class.LayoutClass`. +:py:class:`~efl.elementary.layout_class.LayoutClass`. """ diff -Nru python-efl-1.17.99~201312040125/efl/elementary/slider.pxd python-efl-1.8.2~201401231220/efl/elementary/slider.pxd --- python-efl-1.17.99~201312040125/efl/elementary/slider.pxd 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/slider.pxd 2014-01-18 12:24:01.000000000 +0000 @@ -9,7 +9,7 @@ const_char * elm_slider_unit_format_get(const_Evas_Object *obj) void elm_slider_indicator_format_set(Evas_Object *obj, const_char *indicator) const_char * elm_slider_indicator_format_get(const_Evas_Object *obj) - void elm_slider_indicator_format_function_set(Evas_Object *obj, const_char(*func)(double val), void (*free_func)(const_char *str)) + # TODO: void elm_slider_indicator_format_function_set(Evas_Object *obj, const_char(*func)(double val), void (*free_func)(const_char *str)) # TODO: void elm_slider_units_format_function_set(Evas_Object *obj, const_char *(*func)(double val), void (*free_func)(const_char *str)) void elm_slider_horizontal_set(Evas_Object *obj, Eina_Bool horizontal) Eina_Bool elm_slider_horizontal_get(const_Evas_Object *obj) diff -Nru python-efl-1.17.99~201312040125/efl/elementary/slider.pyx python-efl-1.8.2~201401231220/efl/elementary/slider.pyx --- python-efl-1.17.99~201312040125/efl/elementary/slider.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/slider.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -44,32 +44,32 @@ slider for its value with :py:attr:`Slider.value`. This widget emits the following signals, besides the ones sent from -:py:class:`LayoutClass `: +:py:class:`~efl.elementary.layout_class.LayoutClass`: - ``changed`` - Whenever the slider value is changed by the user. - ``slider,drag,start`` - dragging the slider indicator around has - started. + started. - ``slider,drag,stop`` - dragging the slider indicator around has - stopped. + stopped. - ``delay,changed`` - A short time after the value is changed by - the user. This will be called only when the user stops dragging - for a very short period or when they release their finger/mouse, - so it avoids possibly expensive reactions to the value change. + the user. This will be called only when the user stops dragging + for a very short period or when they release their finger/mouse, + so it avoids possibly expensive reactions to the value change. - ``focused`` - When the slider has received focus. (since 1.8) - ``unfocused`` - When the slider has lost focus. (since 1.8) Available styles for it: -- ``"default"`` +- ``default`` Default content parts of the slider widget that you can use for are: -- "icon" - An icon of the slider -- "end" - A end part content of the slider +- ``icon`` - An icon of the slider +- ``end`` - A end part content of the slider Default text parts of the slider widget that you can use for are: -- "default" - Label of the slider +- ``default`` - Label of the slider """ @@ -282,8 +282,8 @@ """The value displayed in the slider. Value will be presented on the unit label following format specified - with :py:attr:`unit_format_set()` and on indicator with - :py:attr:`indicator_format_set()`. + with :py:attr:`unit_format` and on indicator with + :py:attr:`indicator_format`. .. warning:: The value must to be between min and max values. These values are set by :py:attr:`min_max`. @@ -361,7 +361,8 @@ By default step value is equal to 0.05. :type: double - :since: 1.8 + + .. versionadded:: 1.8 """ def __set__(self, double step): @@ -412,7 +413,7 @@ def callback_focused_add(self, func, *args, **kwargs): """When the slider has received focus. - :since: 1.8 + .. versionadded:: 1.8 """ self._callback_add("focused", func, *args, **kwargs) @@ -422,7 +423,7 @@ def callback_unfocused_add(self, func, *args, **kwargs): """When the slider has lost focus. - :since: 1.8 + .. versionadded:: 1.8 """ self._callback_add("unfocused", func, *args, **kwargs) diff -Nru python-efl-1.17.99~201312040125/efl/elementary/slideshow.pyx python-efl-1.8.2~201401231220/efl/elementary/slideshow.pyx --- python-efl-1.17.99~201312040125/efl/elementary/slideshow.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/slideshow.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -39,9 +39,9 @@ Slideshow items =============== -For slideshow items, just like for :py:class:`Genlist` "genlist" ones, -the user defines a **classes**, specifying functions that will be -called on the item's creation and deletion times. +For slideshow items, just like for :py:class:`~efl.elementary.genlist.Genlist` +ones, the user defines a **classes**, specifying functions that will be called +on the item's creation and deletion times. The :py:class:`SlideshowItemClass` class contains the following members: @@ -49,7 +49,7 @@ - ``get`` - When an item is displayed, this function is called, and it's where one should create the item object, de facto. For example, the object can be a pure Evas image object - or an Elementary :py:class:`Photocam` "photocam" widget. + or a :py:class:`~efl.elementary.photocam.Photocam` widget. - ``delete`` - When an item is no more displayed, this function is called, where the user must delete any data associated to @@ -67,18 +67,19 @@ item list. This widget emits the following signals, besides the ones sent from -:py:class:`elementary.layout.Layout`: +:py:class:`~efl.elementary.layout_class.LayoutClass`: -- ``"changed"`` - when the slideshow switches its view to a new item. - event_info parameter in callback contains the current visible item -- ``"transition,end"`` - when a slide transition ends. event_info - parameter in callback contains the current visible item +- ``changed`` - when the slideshow switches its view to a new item. + event_info parameter in callback contains the current visible item +- ``transition,end`` - when a slide transition ends. event_info + parameter in callback contains the current visible item - ``focused`` - When the slideshow has received focus. (since 1.8) - ``unfocused`` - When the slideshow has lost focus. (since 1.8) """ from cpython cimport PyUnicode_AsUTF8String, Py_INCREF, Py_DECREF +from libc.stdint cimport uintptr_t from efl.eo cimport _object_mapping_register, object_from_instance, PY_REFCOUNT from efl.utils.conversions cimport _ctouni @@ -90,7 +91,7 @@ import traceback from object_item cimport _object_item_to_python, _object_item_list_to_python -def _cb_object_item_conv(long addr): +def _cb_object_item_conv(uintptr_t addr): cdef Elm_Object_Item *it = addr return _object_item_to_python(it) @@ -207,19 +208,13 @@ except AttributeError: pass - def __str__(self): - return ("%s(get_func=%s, del_func=%s)") % \ - (self.__class__.__name__, - self._get_func, - self._del_func) - def __repr__(self): - return ("%s(%#x, refcount=%d, Elm_Slideshow_Item_Class=%#x, " - "get_func=%s, del_func=%s)") % \ - (self.__class__.__name__, - self, + return ("<%s(%#x, refcount=%d, Elm_Slideshow_Item_Class=%#x, " + "get_func=%s, del_func=%s)>") % \ + (type(self).__name__, + self, PY_REFCOUNT(self), - &self.obj, + &self.obj, self._get_func, self._del_func) @@ -257,6 +252,16 @@ self.args = args self.kwargs = kwargs + def __repr__(self): + return ("<%s(%#x, refcount=%d, Elm_Object_Item=%#x, " + "item_class=%s, item_data=%r)>") % \ + (type(self).__name__, + self, + PY_REFCOUNT(self), + self.obj, + type(self.cls).__name__, + self.args) + def add_to(self, Slideshow slideshow not None): """add_to(Slideshow slideshow) -> SlideshowItem @@ -271,8 +276,8 @@ .. seealso:: :py:class:`SlideshowItemClass` - :py:func:`item_sorted_insert()` - :py:attr:`efl.elementary.object_item.ObjectItem.data` + :py:meth:`sorted_insert` + :py:attr:`~efl.elementary.object_item.ObjectItem.data` :param item_class: The item class for the item :type item_class: :py:class:`SlideshowItemClass` @@ -284,11 +289,13 @@ cdef Elm_Object_Item *item item = elm_slideshow_item_add(slideshow.obj, &self.cls.obj, self) - if item != NULL: - self._set_obj(item) - return self - else: - Py_DECREF(self) + + if item == NULL: + raise RuntimeError("The item could not be added to the widget.") + + self._set_obj(item) + self._set_properties_from_keyword_args(self.kwargs) + return self def sorted_insert(self, Slideshow slideshow not None, func not None): """sorted_insert(Slideshow slideshow, func) -> SlideshowItem @@ -309,7 +316,7 @@ .. seealso:: :py:class:`SlideshowItemClass` - :py:func:`item_add()` + :py:meth:`add_to` :param itc: The item class for the item :param func: The comparing function to be used to sort slideshow @@ -330,27 +337,12 @@ item = elm_slideshow_item_sorted_insert(slideshow.obj, &self.cls.obj, \ self, compare) - if item != NULL: - self._set_obj(item) - return self - else: - Py_DECREF(self) - - def __str__(self): - return "%s(item_class=%s, item_data=%s)" % \ - (type(self).__name__, - type(self.cls).__name__, - self.args) + if item == NULL: + raise RuntimeError("The item could not be added to the widget.") - def __repr__(self): - return ("%s(%#x, refcount=%d, Elm_Object_Item=%#x, " - "item_class=%s, item_data=%r)") % \ - (type(self).__name__, - self, - PY_REFCOUNT(self), - self.obj, - type(self.cls).__name__, - self.args) + self._set_obj(item) + self._set_properties_from_keyword_args(self.kwargs) + return self property object: """Get the real Evas object created to implement the view of a given @@ -364,7 +356,7 @@ emitting custom signals or hooking lower level callbacks for events on that object. Do not delete this object under any circumstances. - .. seealso:: :py:attr:`ObjectItem.data` + .. seealso:: :py:attr:`~efl.elementary.object_item.ObjectItem.data` :type: :py:class:`Slideshow` @@ -573,7 +565,10 @@ This removes (and deletes) all items in the object, leaving it empty. - .. seealso:: :py:func:`ObjectItem.delete()`, to remove just one item. + .. seealso:: + + :py:meth:`~efl.elementary.object_item.ObjectItem.delete`, to remove + just one item. """ elm_slideshow_clear(self.obj) @@ -581,13 +576,16 @@ property items: """Get the internal list of items in a given slideshow widget. - This list is **not** to be modified in any way and must not be - freed. Use the list members with functions like - :py:func:`ObjectItem.delete()`, :py:attr:`ObjectItem.data`. - - .. warning:: This list is only valid until ``obj`` object's internal - items list is changed. It should be fetched again with another - call to this function when changes happen. + This list is **not** to be modified in any way and must not be freed. + Use the list members with functions like + :py:meth:`~efl.elementary.object_item.ObjectItem.delete`, + :py:attr:`~efl.elementary.object_item.ObjectItem.data`. + + .. warning:: + + This list is only valid until ``obj`` object's internal items list + is changed. It should be fetched again with another call to this + function when changes happen. :type: tuple of :py:class:`SlideshowItem` @@ -725,7 +723,7 @@ def callback_focused_add(self, func, *args, **kwargs): """When the slideshow has received focus. - :since: 1.8 + .. versionadded:: 1.8 """ self._callback_add("focused", func, *args, **kwargs) @@ -735,7 +733,7 @@ def callback_unfocused_add(self, func, *args, **kwargs): """When the slideshow has lost focus. - :since: 1.8 + .. versionadded:: 1.8 """ self._callback_add("unfocused", func, *args, **kwargs) diff -Nru python-efl-1.17.99~201312040125/efl/elementary/spinner.pyx python-efl-1.8.2~201401231220/efl/elementary/spinner.pyx --- python-efl-1.17.99~201312040125/efl/elementary/spinner.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/spinner.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -39,19 +39,19 @@ This widget emits the following signals, besides the ones sent from :py:class:`~efl.elementary.layout_class.LayoutClass`: -- ``"changed"`` - Whenever the spinner value is changed. -- ``"delay,changed"`` - A short time after the value is changed by - the user. This will be called only when the user stops dragging - for a very short period or when they release their finger/mouse, - so it avoids possibly expensive reactions to the value change. +- ``changed`` - Whenever the spinner value is changed. +- ``delay,changed`` - A short time after the value is changed by + the user. This will be called only when the user stops dragging + for a very short period or when they release their finger/mouse, + so it avoids possibly expensive reactions to the value change. - ``language,changed`` - the program's language changed - ``focused`` - When the spinner has received focus. (since 1.8) - ``unfocused`` - When the spinner has lost focus. (since 1.8) Available styles for it: -- ``"default"``: Default style -- ``"vertical"``: up/down buttons at the right side and text left aligned. +- ``default``: Default style +- ``vertical``: up/down buttons at the right side and text left aligned. """ @@ -282,7 +282,7 @@ :see: :py:meth:`special_value_add` for more details. - :since: 1.8 + .. versionadded:: 1.8 """ elm_spinner_special_value_del(self.obj, value) @@ -297,7 +297,7 @@ :see: :py:meth:`special_value_add` for more details. - :since: 1.8 + .. versionadded:: 1.8 """ return _ctouni(elm_spinner_special_value_get(self.obj, value)) @@ -417,7 +417,7 @@ def callback_focused_add(self, func, *args, **kwargs): """When the spinner has received focus. - :since: 1.8 + .. versionadded:: 1.8 """ self._callback_add("focused", func, *args, **kwargs) @@ -427,7 +427,7 @@ def callback_unfocused_add(self, func, *args, **kwargs): """When the spinner has lost focus. - :since: 1.8 + .. versionadded:: 1.8 """ self._callback_add("unfocused", func, *args, **kwargs) diff -Nru python-efl-1.17.99~201312040125/efl/elementary/store.pyx python-efl-1.8.2~201401231220/efl/elementary/store.pyx --- python-efl-1.17.99~201312040125/efl/elementary/store.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/store.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of diff -Nru python-efl-1.17.99~201312040125/efl/elementary/table.pyx python-efl-1.8.2~201401231220/efl/elementary/table.pyx --- python-efl-1.17.99~201312040125/efl/elementary/table.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/table.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -109,7 +109,7 @@ takes that 1 cell. :param subobj: The subobject to be added to the table - :type subobj: :py:class:`evas.object.Object` + :type subobj: :py:class:`~efl.evas.Object` :param x: Row number :type x: int :param y: Column number @@ -128,7 +128,7 @@ Remove child from table. :param subobj: The subobject - :type subobj: :py:class:`evas.object.Object` + :type subobj: :py:class:`~efl.evas.Object` """ elm_table_unpack(self.obj, subobj.obj) @@ -154,6 +154,8 @@ :return: Child of object if find if not return None. + .. versionadded:: 1.8 + """ return object_from_instance(elm_table_child_get(self.obj, col, row)) @@ -170,7 +172,7 @@ takes that 1 cell. :param subobj: The subobject to be modified in the table - :type subobj: :py:class:`evas.object.Object` + :type subobj: :py:class:`~efl.evas.Object` :param x: Row number :type x: int :param y: Column number @@ -191,7 +193,7 @@ .. seealso:: :py:func:`table_pack_set` :param subobj: The subobject to be modified in the table - :type subobj: :py:class:`evas.object.Object` + :type subobj: :py:class:`~efl.evas.Object` :return: Row number, Column number, rowspan, colspan :rtype: tuple of ints diff -Nru python-efl-1.17.99~201312040125/efl/elementary/theme.pyx python-efl-1.8.2~201401231220/efl/elementary/theme.pyx --- python-efl-1.17.99~201312040125/efl/elementary/theme.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/theme.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -86,6 +86,7 @@ """ from cpython cimport PyUnicode_AsUTF8String, Py_INCREF, Py_DECREF +from libc.stdint cimport uintptr_t from efl.eo cimport PY_REFCOUNT from efl.utils.conversions cimport _ctouni, eina_list_strings_to_python_list @@ -101,7 +102,7 @@ def __repr__(self): return "<%s object at %#x (refcount=%d, order=%s, overlay_list=%s, extension_list=%s)>" % ( type(self).__name__, - self.th, + self.th, PY_REFCOUNT(self), _ctouni(elm_theme_get(self.th)), eina_list_strings_to_python_list(elm_theme_overlay_list_get(self.th)), diff -Nru python-efl-1.17.99~201312040125/efl/elementary/thumb.pyx python-efl-1.8.2~201401231220/efl/elementary/thumb.pyx --- python-efl-1.17.99~201312040125/efl/elementary/thumb.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/thumb.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -1,20 +1,19 @@ -# Copyright 2012 Kai Huuhko +# Copyright (C) 2007-2013 various contributors (see AUTHORS) # -# This file is part of python-elementary. +# This file is part of Python-EFL. # -# python-elementary is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +# Python-EFL is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 3 of the License, or (at your option) any later version. # -# python-elementary is distributed in the hope that it will be useful, +# Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public License -# along with python-elementary. If not, see . -# +# along with this Python-EFL. If not, see . """ @@ -42,21 +41,21 @@ This widget emits the following signals: -- ``"clicked"`` - This is called when a user has clicked the - thumbnail object without dragging it around. -- ``"clicked,double"`` - This is called when a user has double-clicked - the thumbnail object. -- ``"press"`` - This is called when a user has pressed down over the - thumbnail object. -- ``"generate,start"`` - The thumbnail generation has started. -- ``"generate,stop"`` - The generation process has stopped. -- ``"generate,error"`` - The thumbnail generation failed. -- ``"load,error"`` - The thumbnail image loading failed. +- ``clicked`` - This is called when a user has clicked the + thumbnail object without dragging it around. +- ``clicked,double`` - This is called when a user has double-clicked + the thumbnail object. +- ``press`` - This is called when a user has pressed down over the + thumbnail object. +- ``generate,start`` - The thumbnail generation has started. +- ``generate,stop`` - The generation process has stopped. +- ``generate,error`` - The thumbnail generation failed. +- ``load,error`` - The thumbnail image loading failed. Available styles: -- ``"default"`` -- ``"noframe"`` +- ``default`` +- ``noframe`` Enumerations @@ -265,9 +264,10 @@ The aspect for the thumb object. - :since: 1.8 :type: :ref:`Ethumb_Thumb_Aspect` + .. versionadded:: 1.8 + """ def __set__(self, aspect): elm_thumb_aspect_set(self.obj, aspect) @@ -280,9 +280,10 @@ The FDO size for the thumb object. - :since: 1.8 :type: :ref:`Ethumb_Thumb_FDO_Size` + .. versionadded:: 1.8 + """ def __set__(self, size): elm_thumb_fdo_size_set(self.obj, size) @@ -295,9 +296,10 @@ The format for the thumb object. - :since: 1.8 :type: :ref:`Ethumb_Thumb_Format` + .. versionadded:: 1.8 + """ def __set__(self, format): elm_thumb_format_set(self.obj, format) @@ -310,9 +312,10 @@ The orientation for the thumb object. - :since: 1.8 :type: :ref:`Ethumb_Thumb_Orientation` + .. versionadded:: 1.8 + """ def __set__(self, orient): elm_thumb_orientation_set(self.obj, orient) @@ -325,9 +328,10 @@ The size for the thumb object. - :since: 1.8 :type: (int tw, int th) + .. versionadded:: 1.8 + """ def __set__(self, value): tw, th = value @@ -343,9 +347,10 @@ Set the crop alignment for the thumb object. - :since: 1.8 :type: (double cropx, double cropy) + .. versionadded:: 1.8 + """ def __set__(self, value): cropx, cropy = value @@ -361,9 +366,10 @@ Set the compression for the thumb object. - :since: 1.8 :type: int + .. versionadded:: 1.8 + """ def __set__(self, compress): elm_thumb_compress_set(self.obj, compress) @@ -377,10 +383,11 @@ """ Set the quality for the thumb object. - :since: 1.8 :type: int + .. versionadded:: 1.8 + """ def __set__(self, int quality): elm_thumb_quality_set(self.obj, quality) @@ -411,7 +418,8 @@ This must be called before the objects are created to be sure no object is visible and no generation started. - Example of usage:: + .. + Example of usage: #include #ifndef ELM_LIB_QUICKLAUNCH @@ -475,9 +483,15 @@ :type: bool + :raise RuntimeError: when cannot be set as editable + + .. versionchanged:: 1.8 + Raises RuntimeError if cannot be set as editable + """ def __set__(self, edit): - elm_thumb_editable_set(self.obj, edit) + if not elm_thumb_editable_set(self.obj, edit): + raise RuntimeError def __get__(self): return bool(elm_thumb_editable_get(self.obj)) diff -Nru python-efl-1.17.99~201312040125/efl/elementary/toolbar.pyx python-efl-1.8.2~201401231220/efl/elementary/toolbar.pyx --- python-efl-1.17.99~201312040125/efl/elementary/toolbar.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/toolbar.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -33,20 +33,20 @@ Smart callbacks one can listen to: -- "clicked" - when the user clicks on a toolbar item and becomes selected. -- "longpressed" - when the toolbar is pressed for a certain amount of time. -- "language,changed" - when the program language changes. +- ``clicked`` - when the user clicks on a toolbar item and becomes selected. +- ``longpressed`` - when the toolbar is pressed for a certain amount of time. +- ``language,changed`` - when the program language changes. - ``focused`` - When the toolbar has received focus. (since 1.8) - ``unfocused`` - When the toolbar has lost focus. (since 1.8) Available styles for it: -- ``"default"`` -- ``"transparent"`` - no background or shadow, just show the content +- ``default`` +- ``transparent`` - no background or shadow, just show the content Default text parts of the toolbar items that you can use for are: -- "default" - label of the toolbar item +- ``default`` - label of the toolbar item Scrollable Interface ==================== @@ -170,6 +170,7 @@ from efl.utils.conversions cimport _ctouni from efl.evas cimport Object as evasObject from object cimport Object +from layout_class cimport LayoutClass from object_item cimport _object_item_callback, _object_item_to_python, \ _object_item_callback2 from menu cimport Menu @@ -274,7 +275,7 @@ enough. The same should be done for ``data``. Toolbar will load icon image from fdo or current theme. This - behavior can be set by :py:attr:`icon_order_lookup` function. + behavior can be set by :py:attr:`Toolbar.icon_order_lookup` function. If an absolute path is provided it will load it direct from a file. :param icon: A string with icon name or the absolute path of an @@ -329,12 +330,12 @@ self.label if self.label is not None else NULL, cb, self) - if item != NULL: - self._set_obj(item) - self._set_properties_from_keyword_args(self.kwargs) - return self - else: - Py_DECREF(self) + if item == NULL: + raise RuntimeError("The item could not be added to the widget.") + + self._set_obj(item) + self._set_properties_from_keyword_args(self.kwargs) + return self def prepend_to(self, Toolbar toolbar): """Prepend item to the toolbar. @@ -362,12 +363,12 @@ self.label if self.label is not None else NULL, cb, self) - if item != NULL: - self._set_obj(item) - self._set_properties_from_keyword_args(self.kwargs) - return self - else: - Py_DECREF(self) + if item == NULL: + raise RuntimeError("The item could not be added to the widget.") + + self._set_obj(item) + self._set_properties_from_keyword_args(self.kwargs) + return self def insert_after(self, ToolbarItem after): """Insert a new item into the toolbar object after item ``after``. @@ -398,12 +399,12 @@ self.label if self.label is not None else NULL, cb, self) - if item != NULL: - self._set_obj(item) - self._set_properties_from_keyword_args(self.kwargs) - return self - else: - Py_DECREF(self) + if item == NULL: + raise RuntimeError("The item could not be added to the widget.") + + self._set_obj(item) + self._set_properties_from_keyword_args(self.kwargs) + return self def insert_before(self, ToolbarItem before): """Insert a new item into the toolbar object before item ``before``. @@ -434,19 +435,19 @@ self.label if self.label is not None else NULL, cb, self) - if item != NULL: - self._set_obj(item) - self._set_properties_from_keyword_args(self.kwargs) - return self - else: - Py_DECREF(self) + if item == NULL: + raise RuntimeError("The item could not be added to the widget.") + + self._set_obj(item) + self._set_properties_from_keyword_args(self.kwargs) + return self property next: """Get the item after ``item`` in toolbar. .. note:: If it is the last item, ``None`` will be returned. - .. seealso:: :py:meth:`Toolbar.item_append` + .. seealso:: :py:meth:`ToolbarItem.append_to` :type: :py:class:`ToolbarItem` @@ -462,7 +463,7 @@ .. note:: If it is the first item, ``None`` will be returned. - .. seealso:: :py:func:`Toolbar.item_prepend` + .. seealso:: :py:func:`ToolbarItem.prepend_to` :type: :py:class:`ToolbarItem` @@ -555,7 +556,7 @@ property object: """Get the object of item. - :type: :py:class:`Object` + :type: :py:class:`~efl.evas.Object` """ def __get__(self): @@ -572,7 +573,7 @@ :py:attr:`icon_file`, or :py:attr:`icon_memfile` for details. - :type: :py:class:`Icon` + :type: :py:class:`~efl.elementary.icon.Icon` """ def __get__(self): @@ -662,8 +663,8 @@ sets it to be that. Once it is set to be a menu, it can be manipulated through - :py:attr:`Toolbar.menu_parent` and the :py:class:`Menu` functions - and properties. + :py:attr:`Toolbar.menu_parent` and the + :py:class:`~efl.elementary.menu.Menu` functions and properties. So, items to be displayed in this item's menu should be added with :py:func:`efl.elementary.menu.Menu.item_add()`. @@ -741,7 +742,7 @@ :see: :py:func:`bring_in` - :since: 1.8 + .. versionadded:: 1.8 """ elm_toolbar_item_show(self.item, scrollto_type) @@ -751,17 +752,20 @@ :see: :py:func:`show` - :since: 1.8 + .. versionadded:: 1.8 """ elm_toolbar_item_bring_in(self.item, scrollto_type) -cdef class Toolbar(Object): +cdef class Toolbar(LayoutClass): """ - This is the class that actually implement the widget. + This is the class that actually implements the widget. + + .. versionchanged:: 1.8 + Inherits from LayoutClass. """ @@ -846,7 +850,7 @@ property first_item: """Get the first item in the given toolbar widget's list of items. - .. seealso:: :py:func:`item_append` :py:attr:`last_item` + .. seealso:: :py:func:`ToolbarItem.append_to` :py:attr:`last_item` :type: :py:class:`ToolbarItem` @@ -860,7 +864,7 @@ property last_item: """Get the last item in the given toolbar widget's list of items. - .. seealso:: :py:func:`item_prepend` :py:attr:`first_item` + .. seealso:: :py:func:`ToolbarItem.prepend_to` :py:attr:`first_item` :type: :py:class:`ToolbarItem` @@ -907,8 +911,9 @@ property more_item: """Get the more item. - The more item can be changed with function - :py:attr:`ObjectItem.text` and :py:attr:`ObjectItem.content`. + The more item can be changed with + :py:attr:`~efl.elementary.object_item.ObjectItem.text` and + :py:attr:`~efl.elementary.object_item.ObjectItem.content`. :type: :py:class:`ToolbarItem` @@ -951,6 +956,8 @@ transverse length of the toolbar. The default is what the transverse length of the item is set according its min value (this property is False). + .. versionadded:: 1.8 + """ def __set__(self, bint transverse_expanded): elm_toolbar_transverse_expanded_set(self.obj, transverse_expanded) @@ -989,13 +996,9 @@ Each item can be set as item menu, with :py:attr:`ToolbarItem.menu`. For more details about setting the parent for toolbar menus, see - :py:attr:`Menu.parent`. + :py:attr:`~efl.elementary.menu.Menu.parent`. - .. seealso:: - :py:attr:`Menu.parent` and - :py:attr:`ToolbarItem.menu` for details. - - :type: :py:class:`Object` + :type: :py:class:`~efl.elementary.object.Object` """ def __get__(self): @@ -1100,6 +1103,8 @@ :type: bool + .. versionadded:: 1.8 + """ def __set__(self, bint reorder_mode): elm_toolbar_reorder_mode_set(self.obj, reorder_mode) @@ -1137,7 +1142,7 @@ def callback_focused_add(self, func, *args, **kwargs): """When the toolbar has received focus. - :since: 1.8 + .. versionadded:: 1.8 """ self._callback_add("focused", func, *args, **kwargs) @@ -1147,7 +1152,7 @@ def callback_unfocused_add(self, func, *args, **kwargs): """When the toolbar has lost focus. - :since: 1.8 + .. versionadded:: 1.8 """ self._callback_add("unfocused", func, *args, **kwargs) @@ -1155,6 +1160,12 @@ self._callback_del("unfocused", func) property scroller_policy: + """ + + .. deprecated:: 1.8 + You should combine with Scrollable class instead. + + """ def __get__(self): return self.scroller_policy_get() @@ -1173,6 +1184,12 @@ return (policy_h, policy_v) property bounce: + """ + + .. deprecated:: 1.8 + You should combine with Scrollable class instead. + + """ def __get__(self): return self.bounce_get() def __set__(self, value): diff -Nru python-efl-1.17.99~201312040125/efl/elementary/transit.pyx python-efl-1.8.2~201401231220/efl/elementary/transit.pyx --- python-efl-1.17.99~201312040125/efl/elementary/transit.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/transit.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -32,12 +32,14 @@ Example:: - t = elementary.Transit() + from efl.elementary.transit import Transit, ELM_TRANSIT_TWEEN_MODE_DECELERATE + + t = Transit() t.object_add(obj) t.effect_translation_add(0, 0, 280, 280) t.duration = 1 t.auto_reverse = True - t.tween_mode = elementary.ELM_TRANSIT_TWEEN_MODE_DECELERATE + t.tween_mode = ELM_TRANSIT_TWEEN_MODE_DECELERATE t.repeat_times = 3 Some transition effects are used to change the properties of objects. They @@ -259,7 +261,7 @@ tuple del_cb_args dict del_cb_kwargs - def __init__(self): + def __init__(self, *args, **kwargs): """Create new transit. .. note:: It is not necessary to delete the transit object, it will be @@ -271,8 +273,18 @@ """ self.obj = elm_transit_add() + self._set_properties_from_keyword_args(kwargs) Py_INCREF(self) + cdef int _set_properties_from_keyword_args(self, dict kwargs) except 0: + if not kwargs: + return 1 + cdef list cls_list = dir(self) + for k, v in kwargs.items(): + assert k in cls_list, "%s has no attribute with the name %s." % (self, k) + setattr(self, k, v) + return 1 + def delete(self): """delete() @@ -438,7 +450,7 @@ .. note:: the ``transit`` object will be deleted after call ``func`` function. - :param func: Callback function pointer. This function will be called + :param func: Callback function. This function will be called before the deletion of the transit. :param data: Callback function user data. It is the ``op`` parameter. @@ -535,6 +547,8 @@ :type: (float **v1**, float **v2**) (defaults are 1.0, 0.0) + .. versionadded:: 1.8 + """ def __set__(self, value): cdef float v1, v2 @@ -652,7 +666,8 @@ :type: bool :see: :py:attr:`efl.evas.Map.smooth` - :since: 1.8 + + .. versionadded:: 1.8 """ def __set__(self, bint smooth): diff -Nru python-efl-1.17.99~201312040125/efl/elementary/video.pyx python-efl-1.8.2~201401231220/efl/elementary/video.pyx --- python-efl-1.17.99~201312040125/efl/elementary/video.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/video.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -28,7 +28,7 @@ resource management policy to remove this burden from the application. These widgets emit the following signals, besides the ones sent from -:py:class:`efl.elementary.layout_class.LayoutClass`: +:py:class:`~efl.elementary.layout_class.LayoutClass`: - ``focused`` - When the widget has received focus. (since 1.8) - ``unfocused`` - When the widget has lost focus. (since 1.8) @@ -64,6 +64,9 @@ :type: string :raise RuntimeError: when setting the file/uri fails + .. versionchanged:: 1.8 + Raises RuntimeError if setting the file/uri fails + """ def __set__(self, filename): if isinstance(filename, unicode): filename = PyUnicode_AsUTF8String(filename) @@ -237,7 +240,7 @@ def callback_focused_add(self, func, *args, **kwargs): """When the video has received focus. - :since: 1.8 + .. versionadded:: 1.8 """ self._callback_add("focused", func, *args, **kwargs) @@ -247,7 +250,7 @@ def callback_unfocused_add(self, func, *args, **kwargs): """When the video has lost focus. - :since: 1.8 + .. versionadded:: 1.8 """ self._callback_add("unfocused", func, *args, **kwargs) @@ -269,20 +272,20 @@ activates the "remember" function on the linked :py:class:`Video` object. The player widget emits the following signals, besides the ones - sent from :py:class:`elementary.layout.Layout`: + sent from :py:class:`~efl.elementary.layout_class.LayoutClass`: - - ``"forward,clicked"`` - the user clicked the forward button. - - ``"info,clicked"`` - the user clicked the info button. - - ``"next,clicked"`` - the user clicked the next button. - - ``"pause,clicked"`` - the user clicked the pause button. - - ``"play,clicked"`` - the user clicked the play button. - - ``"prev,clicked"`` - the user clicked the prev button. - - ``"rewind,clicked"`` - the user clicked the rewind button. - - ``"stop,clicked"`` - the user clicked the stop button. + - ``forward,clicked`` - the user clicked the forward button. + - ``info,clicked`` - the user clicked the info button. + - ``next,clicked`` - the user clicked the next button. + - ``pause,clicked`` - the user clicked the pause button. + - ``play,clicked`` - the user clicked the play button. + - ``prev,clicked`` - the user clicked the prev button. + - ``rewind,clicked`` - the user clicked the rewind button. + - ``stop,clicked`` - the user clicked the stop button. Default content parts of the player widget that you can use for are: - - "video" - A video of the player + - ``video`` - A video of the player """ @@ -349,7 +352,7 @@ def callback_focused_add(self, func, *args, **kwargs): """When the player has received focus. - :since: 1.8 + .. versionadded:: 1.8 """ self._callback_add("focused", func, *args, **kwargs) @@ -359,7 +362,7 @@ def callback_unfocused_add(self, func, *args, **kwargs): """When the player has lost focus. - :since: 1.8 + .. versionadded:: 1.8 """ self._callback_add("unfocused", func, *args, **kwargs) diff -Nru python-efl-1.17.99~201312040125/efl/elementary/web.pxd python-efl-1.8.2~201401231220/efl/elementary/web.pxd --- python-efl-1.17.99~201312040125/efl/elementary/web.pxd 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/web.pxd 2014-01-18 12:24:01.000000000 +0000 @@ -41,8 +41,8 @@ # TODO: void elm_web_dialog_file_selector_hook_set(Evas_Object *obj, Elm_Web_Dialog_File_Selector func, void *data) void elm_web_console_message_hook_set(Evas_Object *obj, Elm_Web_Console_Message func, void *data) - Eina_Bool elm_web_tab_propagate_get(Evas_Object *obj) - void elm_web_tab_propagate_set(Evas_Object *obj, Eina_Bool propagate) + # TODO: Eina_Bool elm_web_tab_propagate_get(Evas_Object *obj) + # TODO: void elm_web_tab_propagate_set(Evas_Object *obj, Eina_Bool propagate) Eina_Bool elm_web_url_set(Evas_Object *obj,char *url) const_char * elm_web_url_get(Evas_Object *obj) diff -Nru python-efl-1.17.99~201312040125/efl/elementary/web.pyx python-efl-1.8.2~201401231220/efl/elementary/web.pyx --- python-efl-1.17.99~201312040125/efl/elementary/web.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/web.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -24,74 +24,73 @@ Signals that you can add callbacks for are: -- "download,request": A file download has been requested. Event info is - a pointer to a Elm_Web_Download -- "editorclient,contents,changed": Editor client's contents changed -- "editorclient,selection,changed": Editor client's selection changed -- "frame,created": A new frame was created. Event info is an +- ``download,request``: A file download has been requested. Event info is + a WebDownload instance +- ``editorclient,contents,changed``: Editor client's contents changed +- ``editorclient,selection,changed``: Editor client's selection changed +- ``frame,created``: A new frame was created. Event info is an Evas_Object which can be handled with WebKit's ewk_frame API -- "icon,received": An icon was received by the main frame -- "inputmethod,changed": Input method changed. Event info is an +- ``icon,received``: An icon was received by the main frame +- ``inputmethod,changed``: Input method changed. Event info is an Eina_Bool indicating whether it's enabled or not -- "js,windowobject,clear": JS window object has been cleared -- "link,hover,in": Mouse cursor is hovering over a link. Event info +- ``js,windowobject,clear``: JS window object has been cleared +- ``link,hover,in``: Mouse cursor is hovering over a link. Event info is a tuple, where the first string contains the URL the link points to, and the second one the title of the link -- "link,hover,out": Mouse cursor left the link -- "load,document,finished": Loading of a document finished. Event info +- ``link,hover,out``: Mouse cursor left the link +- ``load,document,finished``: Loading of a document finished. Event info is the frame that finished loading -- "load,error": Load failed. Event info is a pointer to - Elm_Web_Frame_Load_Error -- "load,finished": Load finished. Event info is NULL on success, on - error it's a pointer to Elm_Web_Frame_Load_Error -- "load,newwindow,show": A new window was created and is ready to be +- ``load,error``: Load failed. Event info is a WebFrameLoadError instance +- ``load,finished``: Load finished. Event info is None on success, on + error it's a WebFrameLoadError instance +- ``load,newwindow,show``: A new window was created and is ready to be shown -- "load,progress": Overall load progress. Event info is a pointer to +- ``load,progress``: Overall load progress. Event info is a double containing a value between 0.0 and 1.0 -- "load,provisional": Started provisional load -- "load,started": Loading of a document started -- "menubar,visible,get": Queries if the menubar is visible. Event info - is a pointer to Eina_Bool where the callback should set EINA_TRUE if - the menubar is visible, or EINA_FALSE in case it's not -- "menubar,visible,set": Informs menubar visibility. Event info is - an Eina_Bool indicating the visibility -- "popup,created": A dropdown widget was activated, requesting its - popup menu to be created. Event info is a pointer to Elm_Web_Menu -- "popup,willdelete": The web object is ready to destroy the popup - object created. Event info is a pointer to Elm_Web_Menu -- "ready": Page is fully loaded -- "scrollbars,visible,get": Queries visibility of scrollbars. Event - info is a pointer to Eina_Bool where the visibility state should be set -- "scrollbars,visible,set": Informs scrollbars visibility. Event info +- ``load,provisional``: Started provisional load +- ``load,started``: Loading of a document started +- ``menubar,visible,get``: Queries if the menubar is visible. Event info + is a bool where the callback should set True if + the menubar is visible, or False in case it's not +- ``menubar,visible,set``: Informs menubar visibility. Event info is + a bool indicating the visibility +- ``popup,created``: A dropdown widget was activated, requesting its + popup menu to be created. Event info is a WebMenu instance +- ``popup,willdelete``: The web object is ready to destroy the popup + object created. Event info is a WebMenu instance +- ``ready``: Page is fully loaded +- ``scrollbars,visible,get``: Queries visibility of scrollbars. Event + info is a bool where the visibility state should be set +- ``scrollbars,visible,set``: Informs scrollbars visibility. Event info is an Eina_Bool with the visibility state set -- "statusbar,text,set": Text of the statusbar changed. Even info is +- ``statusbar,text,set``: Text of the statusbar changed. Event info is a string with the new text -- "statusbar,visible,get": Queries visibility of the status bar. - Event info is a pointer to Eina_Bool where the visibility state should be +- ``statusbar,visible,get``: Queries visibility of the status bar. + Event info is a bool where the visibility state should be set. -- "statusbar,visible,set": Informs statusbar visibility. Event info is +- ``statusbar,visible,set``: Informs statusbar visibility. Event info is an Eina_Bool with the visibility value -- "title,changed": Title of the main frame changed. Event info is a +- ``title,changed``: Title of the main frame changed. Event info is a string with the new title -- "toolbars,visible,get": Queries visibility of toolbars. Event info - is a pointer to Eina_Bool where the visibility state should be set -- "toolbars,visible,set": Informs the visibility of toolbars. Event +- ``toolbars,visible,get``: Queries visibility of toolbars. Event info + is a bool where the visibility state should be set +- ``toolbars,visible,set``: Informs the visibility of toolbars. Event info is an Eina_Bool with the visibility state -- "tooltip,text,set": Show and set text of a tooltip. Event info is +- ``tooltip,text,set``: Show and set text of a tooltip. Event info is a string with the text to show -- "uri,changed": URI of the main frame changed. Event info is a string (deprecated. use "url,changed" instead) -- "url,changed": URL of the main frame changed. Event info is a string +- ``uri,changed``: URI of the main frame changed. Event info is a string (deprecated. use ``url,changed`` instead) +- ``url,changed``: URL of the main frame changed. Event info is a string with the new URI -- "view,resized": The web object internal's view changed sized -- "windows,close,request": A JavaScript request to close the current +- ``view,resized``: The web object internal's view changed sized +- ``windows,close,request``: A JavaScript request to close the current window was requested -- "zoom,animated,end": Animated zoom finished -- "focused" : When the web has received focus. (since 1.8) -- "unfocused" : When the web has lost focus. (since 1.8) +- ``zoom,animated,end``: Animated zoom finished +- ``focused`` : When the web has received focus. (since 1.8) +- ``unfocused`` : When the web has lost focus. (since 1.8) available styles: -- default +- ``default`` Enumerations @@ -134,7 +133,7 @@ .. data:: ELM_WEB_ZOOM_MODE_MANUAL - Zoom controlled normally by :py:attr:`zoom` + Zoom controlled normally by :py:attr:`~Web.zoom` .. data:: ELM_WEB_ZOOM_MODE_AUTO_FIT @@ -147,6 +146,7 @@ """ from cpython cimport PyUnicode_AsUTF8String +from libc.stdint cimport uintptr_t from efl.eo cimport _object_mapping_register, object_from_instance from efl.utils.deprecated cimport DEPRECATED @@ -169,23 +169,23 @@ ELM_WEB_ZOOM_MODE_AUTO_FIT = enums.ELM_WEB_ZOOM_MODE_AUTO_FIT ELM_WEB_ZOOM_MODE_AUTO_FILL = enums.ELM_WEB_ZOOM_MODE_AUTO_FILL -def _cb_string_conv(long addr): +def _cb_string_conv(uintptr_t addr): cdef const_char *s = addr return _ctouni(s) if s is not NULL else None -def _cb_bool_conv(long addr): +def _cb_bool_conv(uintptr_t addr): cdef Eina_Bool *info = addr if info == NULL: return None return info[0] -def _web_double_conv(long addr): +def _web_double_conv(uintptr_t addr): cdef double *info = addr if info == NULL: return None return info[0] -def _web_load_frame_error_conv(long addr): +def _web_load_frame_error_conv(uintptr_t addr): cdef Elm_Web_Frame_Load_Error *err = addr if err == NULL: return None @@ -201,7 +201,7 @@ return ret -def _web_link_hover_in_conv(long addr): +def _web_link_hover_in_conv(uintptr_t addr): cdef char **info = addr if info == NULL: url = title = None @@ -250,9 +250,19 @@ return x, y, w, h def ref(self): + """ + + .. versionadded:: 1.8 + + """ elm_web_window_features_ref(self.wf); def unref(self): + """ + + .. versionadded:: 1.8 + + """ elm_web_window_features_unref(self.wf) cdef class Web(Object): @@ -306,11 +316,11 @@ # return the internal reference. Be careful using it as it may # interfere with elm_web behavior. - # @return The internal ewk_view object or @c NULL if it does not + # :return: The internal ewk_view object or **None** if it does not # exist. (Failure to create or Elementary compiled without # ewebkit) - # @see elm_web_add() + # :see: elm_web_add() # """ # def __get__(self): @@ -329,11 +339,11 @@ # This hook will be called when a request to create a new window is # issued from the web page loaded. # There is no default implementation for this feature, so leaving this - # unset or passing @c NULL in @p func will prevent new windows from + # unset or passing **None** in @p func will prevent new windows from # opening. - # @param func The hook function to be called when a window is requested - # @param data User data + # :param func: The hook function to be called when a window is requested + # :param data: User data # """ # elm_web_window_create_hook_set(self.obj, @@ -346,13 +356,13 @@ # Sets the function to call when an alert dialog # This hook will be called when a JavaScript alert dialog is requested. - # If no function is set or @c NULL is passed in @p func, the default + # If no function is set or **None** is passed in @p func, the default # implementation will take place. - # @param func The callback function to be used - # @param data User data + # :param func: The callback function to be used + # :param data: User data - # @see elm_web_inwin_mode_set() + # :see: elm_web_inwin_mode_set() # """ # elm_web_dialog_alert_hook_set(self.obj, @@ -365,13 +375,13 @@ # Sets the function to call when an confirm dialog # This hook will be called when a JavaScript confirm dialog is requested. - # If no function is set or @c NULL is passed in @p func, the default + # If no function is set or **None** is passed in @p func, the default # implementation will take place. - # @param func The callback function to be used - # @param data User data + # :param func: The callback function to be used + # :param data: User data - # @see elm_web_inwin_mode_set() + # :see: elm_web_inwin_mode_set() # """ # elm_web_dialog_confirm_hook_set(self.obj, @@ -384,13 +394,13 @@ # Sets the function to call when an prompt dialog # This hook will be called when a JavaScript prompt dialog is requested. - # If no function is set or @c NULL is passed in @p func, the default + # If no function is set or **None** is passed in @p func, the default # implementation will take place. - # @param func The callback function to be used - # @param data User data + # :param func: The callback function to be used + # :param data: User data - # @see elm_web_inwin_mode_set() + # :see: elm_web_inwin_mode_set() # """ # elm_web_dialog_prompt_hook_set(self.obj, @@ -404,13 +414,13 @@ # This hook will be called when a JavaScript file selector dialog is # requested. - # If no function is set or @c NULL is passed in @p func, the default + # If no function is set or **None** is passed in @p func, the default # implementation will take place. - # @param func The callback function to be used - # @param data User data + # :param func: The callback function to be used + # :param data: User data - # @see elm_web_inwin_mode_set() + # :see: elm_web_inwin_mode_set() # """ # elm_web_dialog_file_selector_hook_set(self.obj, @@ -425,8 +435,8 @@ This hook will be called when a console message is emitted from JavaScript. There is no default implementation for this feature. - @param func The callback function to be used - @param data User data + :param func: The callback function to be used + :param data: User data """ self._console_message_hook = func @@ -461,24 +471,24 @@ def useragent_get(self): return _ctouni(elm_web_useragent_get(self.obj)) + # TODO: Not implemented in ewebkit2 backend (yet?) + # property tab_propagate: + # """Whether to use tab propagation + + # If tab propagation is enabled, whenever the user presses the Tab key, + # Elementary will handle it and switch focus to the next widget. + # The default value is disabled, where WebKit will handle the Tab key to + # cycle focus though its internal objects, jumping to the next widget + # only when that cycle ends. - property tab_propagate: - """Whether to use tab propagation + # :type: bool - If tab propagation is enabled, whenever the user presses the Tab key, - Elementary will handle it and switch focus to the next widget. - The default value is disabled, where WebKit will handle the Tab key to - cycle focus though its internal objects, jumping to the next widget - only when that cycle ends. - - :type: bool - - """ - def __get__(self): - return bool(elm_web_tab_propagate_get(self.obj)) + # """ + # def __get__(self): + # return bool(elm_web_tab_propagate_get(self.obj)) - def __set__(self, bint propagate): - elm_web_tab_propagate_set(self.obj, propagate) + # def __set__(self, bint propagate): + # elm_web_tab_propagate_set(self.obj, propagate) property url: """ @@ -495,6 +505,8 @@ :raise RuntimeError: if url could not be set + .. versionadded:: 1.8 + """ def __set__(self, url): if isinstance(url, unicode): url = PyUnicode_AsUTF8String(url) @@ -513,6 +525,12 @@ return _ctouni(elm_web_url_get(self.obj)) property uri: + """ + + .. deprecated:: 1.8 + Use property "url" instead. + + """ def __get__(self): return self.uri_get() @@ -549,10 +567,10 @@ This is the color that will be used by default when the loaded page does not set it's own. Color values are pre-multiplied. - @param r Red component - @param g Green component - @param b Blue component - @param a Alpha component + :param r: Red component + :param g: Green component + :param b: Blue component + :param a: Alpha component """ def __set__(self, value): @@ -572,8 +590,8 @@ The string returned must be freed by the user when it's done with it. - @return A newly allocated string, or @c NULL if nothing is selected or an - error occurred + :return: A newly allocated string, or **None** if nothing is selected or an + error occurred """ def __get__(self): @@ -588,9 +606,9 @@ it needs to tell the web object which item was selected by calling this function with the index corresponding to the item. - @param index The index selected + :param index: The index selected - @see elm_web_popup_destroy() + :see: elm_web_popup_destroy() """ elm_web_popup_selected_set(self.obj, index) @@ -605,8 +623,8 @@ will later emit an "popup,willdelete" signal to notify the user that any memory and objects related to this popup can be freed. - @return @c EINA_TRUE if the menu was successfully destroyed, or @c EINA_FALSE - if there was no menu to destroy + :return: **True** if the menu was successfully destroyed, or **False** + if there was no menu to destroy """ return bool(elm_web_popup_destroy(self.obj)) @@ -616,13 +634,13 @@ Searches the given string in a document. - @param string String to search - @param case_sensitive If search should be case sensitive or not - @param forward If search is from cursor and on or backwards - @param wrap If search should wrap at the end + :param string: String to search + :param case_sensitive: If search should be case sensitive or not + :param forward: If search is from cursor and on or backwards + :param wrap: If search should wrap at the end - @return @c EINA_TRUE if the given string was found, @c EINA_FALSE if not - or failure + :return: **True** if the given string was found, **False** if not + or failure """ if isinstance(string, unicode): string = PyUnicode_AsUTF8String(string) @@ -635,12 +653,12 @@ Marks matches of the given string in a document. - @param string String to match - @param case_sensitive If match should be case sensitive or not - @param highlight If matches should be highlighted - @param limit Maximum amount of matches, or zero to unlimited + :param string: String to match + :param case_sensitive: If match should be case sensitive or not + :param highlight: If matches should be highlighted + :param limit: Maximum amount of matches, or zero to unlimited - @return number of matched @a string + :return: number of matched @a string """ if isinstance(string, unicode): string = PyUnicode_AsUTF8String(string) @@ -651,7 +669,7 @@ Clears all marked matches in the document - @return @c EINA_TRUE on success, @c EINA_FALSE otherwise + :return: **True** on success, **False** otherwise """ if not elm_web_text_matches_unmark_all(self.obj): @@ -680,12 +698,12 @@ Get the overall loading progress of the page - Returns the estimated loading progress of the page, with a value between - 0.0 and 1.0. This is an estimated progress accounting for all the frames - included in the page. + Returns the estimated loading progress of the page, with a value + between 0.0 and 1.0. This is an estimated progress accounting for all + the frames included in the page. - @return A value between 0.0 and 1.0 indicating the progress, or -1.0 on - failure + :return: A value between 0.0 and 1.0 indicating the progress, or -1.0 + on failure """ def __get__(self): @@ -698,9 +716,9 @@ Cancels the loading of the current page in the web object. This will cause a "load,error" signal to be emitted, with the is_cancellation - flag set to @c EINA_TRUE. + flag set to **True**. - @return @c EINA_TRUE if the cancel was successful, @c EINA_FALSE otherwise + :return: **True** if the cancel was successful, **False** otherwise """ if not elm_web_stop(self.obj): @@ -711,7 +729,7 @@ Requests a reload of the current document in the object - @return @c EINA_TRUE on success, @c EINA_FALSE otherwise + :return: **True** on success, **False** otherwise """ if not elm_web_reload(self.obj): @@ -722,7 +740,7 @@ Requests a reload of the current document, avoiding any existing caches - @return @c EINA_TRUE on success, @c EINA_FALSE otherwise + :return: **True** on success, **False** otherwise """ if not elm_web_reload_full(self.obj): @@ -735,12 +753,12 @@ This is equivalent to calling elm_web_object_navigate(obj, -1); - @return @c EINA_TRUE on success, @c EINA_FALSE otherwise + :return: **True** on success, **False** otherwise - @see elm_web_history_enabled_set() - @see elm_web_back_possible() - @see elm_web_forward() - @see elm_web_navigate() + :see: elm_web_history_enabled_set() + :see: elm_web_back_possible() + :see: elm_web_forward() + :see: elm_web_navigate() """ if not elm_web_back(self.obj): @@ -753,12 +771,12 @@ This is equivalent to calling elm_web_object_navigate(obj, 1); - @return @c EINA_TRUE on success, @c EINA_FALSE otherwise + :return: **True** on success, **False** otherwise - @see elm_web_history_enabled_set() - @see elm_web_forward_possible_get() - @see elm_web_back() - @see elm_web_navigate() + :see: elm_web_history_enabled_set() + :see: elm_web_forward_possible_get() + :see: elm_web_back() + :see: elm_web_navigate() """ if not elm_web_forward(self.obj): @@ -772,14 +790,14 @@ The @p steps value can be a negative integer to back in history, or a positive to move forward. - @param steps The number of steps to jump + :param steps: The number of steps to jump - @return @c EINA_TRUE on success, @c EINA_FALSE on error or if not enough - history exists to jump the given number of steps + :return: **True** on success, **False** on error or if not enough + history exists to jump the given number of steps - @see elm_web_history_enabled_set() - @see elm_web_back() - @see elm_web_forward() + :see: elm_web_history_enabled_set() + :see: elm_web_back() + :see: elm_web_forward() """ return bool(elm_web_navigate(self.obj, steps)) @@ -789,8 +807,8 @@ Queries whether it's possible to go back in history - @return @c EINA_TRUE if it's possible to back in history, @c EINA_FALSE - otherwise + :return: **True** if it's possible to back in history, **False** + otherwise """ def __get__(self): @@ -801,8 +819,8 @@ Queries whether it's possible to go forward in history - @return @c EINA_TRUE if it's possible to forward in history, @c EINA_FALSE - otherwise + :return: **True** if it's possible to forward in history, **False** + otherwise """ def __get__(self): @@ -815,10 +833,10 @@ The @p steps value can be a negative integer to back in history, or a positive to move forward. - @param steps The number of steps to check for + :param steps: The number of steps to check for - @return @c EINA_TRUE if enough history exists to perform the given jump, - @c EINA_FALSE otherwise + :return: **True** if enough history exists to perform the given jump, + **False** otherwise """ return bool(elm_web_navigate_possible_get(self.obj, steps)) @@ -879,10 +897,10 @@ Shows the given region in the web object - @param x The x coordinate of the region to show - @param y The y coordinate of the region to show - @param w The width of the region to show - @param h The height of the region to show + :param x: The x coordinate of the region to show + :param y: The y coordinate of the region to show + :param w: The width of the region to show + :param h: The height of the region to show """ elm_web_region_show(self.obj, x, y, w, h) @@ -895,10 +913,10 @@ Like elm_web_region_show(), but it animates the scrolling of the object to show the area - @param x The x coordinate of the region to show - @param y The y coordinate of the region to show - @param w The width of the region to show - @param h The height of the region to show + :param x: The x coordinate of the region to show + :param y: The y coordinate of the region to show + :param w: The width of the region to show + :param h: The height of the region to show """ elm_web_region_bring_in(self.obj, x, y, w, h) @@ -1005,21 +1023,20 @@ # self._callback_del("load,document,finished", func) def callback_load_error_add(self, func, *args, **kwargs): - """Load failed. Event info is a pointer to Elm_Web_Frame_Load_Error.""" + """Load failed. Event info is a WebFrameLoadError instance.""" self._callback_add_full("load,error", _web_load_frame_error_conv, func, *args, **kwargs) def callback_load_error_del(self, func): self._callback_del_full("load,error", _web_load_frame_error_conv, func) - # TODO: - # def callback_load_finished_add(self, func, *args, **kwargs): - # """Load finished. Event info is None on success, on error it's - # a pointer to Elm_Web_Frame_Load_Error.""" - # self._callback_add("load,finished", func, *args, **kwargs) + def callback_load_finished_add(self, func, *args, **kwargs): + """Load finished. Event info is None on success, on error it's + a pointer to Elm_Web_Frame_Load_Error.""" + self._callback_add_full("load,finished", _web_load_frame_error_conv, func, *args, **kwargs) - # def callback_load_finished_del(self, func): - # self._callback_del("load,finished", func) + def callback_load_finished_del(self, func): + self._callback_del_full("load,finished", _web_load_frame_error_conv, func) def callback_load_newwindow_show_add(self, func, *args, **kwargs): """A new window was created and is ready to be shown.""" @@ -1029,7 +1046,7 @@ self._callback_del("load,newwindow,show", func) def callback_load_progress_add(self, func, *args, **kwargs): - """Overall load progress. Event info is a pointer to a double containing + """Overall load progress. Event info is a double containing a value between 0.0 and 1.0.""" self._callback_add_full("load,progress", _web_double_conv, func, *args, **kwargs) @@ -1051,15 +1068,16 @@ def callback_load_started_del(self, func): self._callback_del("load,started", func) - def callback_menubar_visible_get_add(self, func, *args, **kwargs): - """Queries if the menubar is visible. Event info - is a bool where the callback should set True if - the menubar is visible, or False in case it's not.""" - self._callback_add_full("menubar,visible,get", _cb_bool_conv, func, - *args, **kwargs) + # def callback_menubar_visible_get_add(self, func, *args, **kwargs): + # """Queries if the menubar is visible. Event info + # is a bool where the callback should set True if + # the menubar is visible, or False in case it's not.""" + # # XXX: the cb for this should use the return value, not the bool passed. + # self._callback_add_full("menubar,visible,get", _cb_bool_conv, func, + # *args, **kwargs) - def callback_menubar_visible_get_del(self, func): - self._callback_del_full("menubar,visible,get", _cb_bool_conv, func) + # def callback_menubar_visible_get_del(self, func): + # self._callback_del_full("menubar,visible,get", _cb_bool_conv, func) def callback_menubar_visible_set_add(self, func, *args, **kwargs): """Informs menubar visibility. Event info is @@ -1094,14 +1112,14 @@ def callback_ready_del(self, func): self._callback_del("ready", func) - def callback_scrollbars_visible_get_add(self, func, *args, **kwargs): - """Queries visibility of scrollbars. Event info is a bool where the - visibility state should be set.""" - self._callback_add_full("scrollbars,visible,get", _cb_bool_conv, func, - *args, **kwargs) + # def callback_scrollbars_visible_get_add(self, func, *args, **kwargs): + # """Queries visibility of scrollbars. Event info is a bool where the + # visibility state should be set.""" + # self._callback_add_full("scrollbars,visible,get", _cb_bool_conv, func, + # *args, **kwargs) - def callback_scrollbars_visible_get_del(self, func): - self._callback_del_full("scrollbars,visible,get", _cb_bool_conv, func) + # def callback_scrollbars_visible_get_del(self, func): + # self._callback_del_full("scrollbars,visible,get", _cb_bool_conv, func) def callback_scrollbars_visible_set_add(self, func, *args, **kwargs): """Informs scrollbars visibility. Event info @@ -1121,15 +1139,15 @@ def callback_statusbar_text_set_del(self, func): self._callback_del_full("statusbar,text,set", _cb_string_conv, func) - def callback_statusbar_visible_get_add(self, func, *args, **kwargs): - """Queries visibility of the status bar. - Event info is a bool where the visibility state should - be set.""" - self._callback_add_full("statusbar,visible,get", _cb_bool_conv, func, - *args, **kwargs) + # def callback_statusbar_visible_get_add(self, func, *args, **kwargs): + # """Queries visibility of the status bar. + # Event info is a bool where the visibility state should + # be set.""" + # self._callback_add_full("statusbar,visible,get", _cb_bool_conv, func, + # *args, **kwargs) - def callback_statusbar_visible_get_del(self, func): - self._callback_del_full("statusbar,visible,get", _cb_bool_conv, func) + # def callback_statusbar_visible_get_del(self, func): + # self._callback_del_full("statusbar,visible,get", _cb_bool_conv, func) def callback_statusbar_visible_set_add(self, func, *args, **kwargs): """Informs statusbar visibility. Event info is @@ -1148,14 +1166,14 @@ def callback_title_changed_del(self, func): self._callback_del_full("title,changed", _cb_string_conv, func) - def callback_toolbars_visible_get_add(self, func, *args, **kwargs): - """Queries visibility of toolbars. Event info - is a bool where the visibility state should be set.""" - self._callback_add_full("toolbars,visible,get", _cb_bool_conv, func, - *args, **kwargs) + # def callback_toolbars_visible_get_add(self, func, *args, **kwargs): + # """Queries visibility of toolbars. Event info + # is a bool where the visibility state should be set.""" + # self._callback_add_full("toolbars,visible,get", _cb_bool_conv, func, + # *args, **kwargs) - def callback_toolbars_visible_get_del(self, func): - self._callback_del_full("toolbars,visible,get", _cb_bool_conv, func) + # def callback_toolbars_visible_get_del(self, func): + # self._callback_del_full("toolbars,visible,get", _cb_bool_conv, func) def callback_toolbars_visible_set_add(self, func, *args, **kwargs): """Informs the visibility of toolbars. Event @@ -1218,7 +1236,7 @@ def callback_focused_add(self, func, *args, **kwargs): """When the web has received focus. - :since: 1.8 + .. versionadded:: 1.8 """ self._callback_add("focused", func, *args, **kwargs) @@ -1229,7 +1247,7 @@ def callback_unfocused_add(self, func, *args, **kwargs): """When the web has lost focus. - :since: 1.8 + .. versionadded:: 1.8 """ self._callback_add("unfocused", func, *args, **kwargs) diff -Nru python-efl-1.17.99~201312040125/efl/elementary/window.pyx python-efl-1.8.2~201401231220/efl/elementary/window.pyx --- python-efl-1.17.99~201312040125/efl/elementary/window.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/elementary/window.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -31,33 +31,29 @@ modules actually installed at runtime) are (listed in order of best supported and most likely to be complete and work to lowest quality). -- "x11", "x", "software-x11", "software_x11" (Software rendering in - X11) -- "gl", "opengl", "opengl-x11", "opengl_x11" (OpenGL or OpenGL-ES2 - rendering in X11) -- "shot:..." (Virtual screenshot renderer - renders to output file - and exits) -- "fb", "software-fb", "software_fb" (Linux framebuffer direct - software rendering) -- "sdl", "software-sdl", "software_sdl" (SDL software rendering to - SDL buffer) -- "gl-sdl", "gl_sdl", "opengl-sdl", "opengl_sdl" (OpenGL or - OpenGL-ES2 rendering using SDL as the buffer) -- "gdi", "software-gdi", "software_gdi" (Windows WIN32 rendering via - GDI with software) +- "x11", "x", "software-x11", "software_x11" (Software rendering in X11) +- "gl", "opengl", "opengl-x11", "opengl_x11" (OpenGL or OpenGL-ES2 rendering in + X11) +- "shot:..." (Virtual screenshot renderer - renders to output file and exits) +- "fb", "software-fb", "software_fb" (Linux framebuffer direct software + rendering) +- "sdl", "software-sdl", "software_sdl" (SDL software rendering to SDL buffer) +- "gl-sdl", "gl_sdl", "opengl-sdl", "opengl_sdl" (OpenGL or OpenGL-ES2 + rendering using SDL as the buffer) +- "gdi", "software-gdi", "software_gdi" (Windows WIN32 rendering via GDI with + software) - "dfb", "directfb" (Rendering to a DirectFB window) -- "x11-8", "x8", "software-8-x11", "software_8_x11" (Rendering in - grayscale using dedicated 8bit software engine in X11) -- "x11-16", "x16", "software-16-x11", "software_16_x11" (Rendering in - X11 using 16bit software engine) +- "x11-8", "x8", "software-8-x11", "software_8_x11" (Rendering in grayscale + using dedicated 8bit software engine in X11) +- "x11-16", "x16", "software-16-x11", "software_16_x11" (Rendering in X11 using + 16bit software engine) - "wince-gdi", "software-16-wince-gdi", "software_16_wince_gdi" - (Windows CE rendering via GDI with 16bit software renderer) -- "sdl-16", "software-16-sdl", "software_16_sdl" (Rendering to SDL - buffer with 16bit software renderer) -- "ews" (rendering to EWS - Ecore + Evas Single Process Windowing - System) -- "gl-cocoa", "gl_cocoa", "opengl-cocoa", "opengl_cocoa" (OpenGL - rendering in Cocoa) + (Windows CE rendering via GDI with 16bit software renderer) +- "sdl-16", "software-16-sdl", "software_16_sdl" (Rendering to SDL buffer with + 16bit software renderer) +- "ews" (rendering to EWS - Ecore + Evas Single Process Windowing System) +- "gl-cocoa", "gl_cocoa", "opengl-cocoa", "opengl_cocoa" (OpenGL rendering in + Cocoa) - "psl1ght" (PS3 rendering using PSL1GHT) All engines use a simple string to select the engine to render, EXCEPT @@ -85,24 +81,24 @@ Signals that you can add callbacks for are: -- "delete,request": the user requested to close the window. See - :py:attr:`autodel `. -- "focus,in": window got focus -- "focus,out": window lost focus -- "moved": window that holds the canvas was moved -- "withdrawn": window is still managed normally but removed from view -- "iconified": window is minimized (perhaps into an icon or taskbar) -- "normal": window is in a normal state (not withdrawn or iconified) -- "stick": window has become sticky (shows on all desktops) -- "unstick": window has stopped being sticky -- "fullscreen": window has become fullscreen -- "unfullscreen": window has stopped being fullscreen -- "maximized": window has been maximized -- "unmaximized": window has stopped being maximized -- "ioerr": there has been a low-level I/O error with the display system -- "indicator,prop,changed": an indicator's property has been changed -- "rotation,changed": window rotation has been changed -- "profile,changed": profile of the window has been changed +- ``delete,request``: the user requested to close the window. See + :py:attr:`~Window.autodel`. +- ``focus,in``: window got focus +- ``focus,out``: window lost focus +- ``moved``: window that holds the canvas was moved +- ``withdrawn``: window is still managed normally but removed from view +- ``iconified``: window is minimized (perhaps into an icon or taskbar) +- ``normal``: window is in a normal state (not withdrawn or iconified) +- ``stick``: window has become sticky (shows on all desktops) +- ``unstick``: window has stopped being sticky +- ``fullscreen``: window has become fullscreen +- ``unfullscreen``: window has stopped being fullscreen +- ``maximized``: window has been maximized +- ``unmaximized``: window has stopped being maximized +- ``ioerr``: there has been a low-level I/O error with the display system +- ``indicator,prop,changed``: an indicator's property has been changed +- ``rotation,changed``: window rotation has been changed +- ``profile,changed``: profile of the window has been changed - ``focused`` - When the window has received focus. (since 1.8) - ``unfocused`` - When the window has lost focus. (since 1.8) @@ -156,7 +152,7 @@ The window is a dropdown menu, as when an entry in a menubar is clicked. - Typically used with :py:attr:`override`. This hint exists for + Typically used with :py:attr:`~Window.override`. This hint exists for completion only, as the EFL way of implementing a menu would not normally use a separate window for its contents. @@ -171,7 +167,7 @@ A short piece of explanatory text that typically appear after the mouse cursor hovers over an object for a while. Typically used with - :py:attr:`override` and also not very commonly used in the EFL. + :py:attr:`~Window.override` and also not very commonly used in the EFL. .. data:: ELM_WIN_NOTIFICATION @@ -189,7 +185,7 @@ Used to indicate the window is a representation of an object being dragged across different windows, or even applications. - Typically used with :py:attr:`override`. + Typically used with :py:attr:`~Window.override`. .. data:: ELM_WIN_INLINED_IMAGE @@ -452,7 +448,7 @@ For the end user to be able to resize a window by dragging the handles or borders provided by the Window Manager, or using any other similar mechanism, all of the resize objects in the window should have their - :py:attr:`size_hint_weight` set to EVAS_HINT_EXPAND. + :py:attr:`~efl.evas.Object.size_hint_weight` set to EVAS_HINT_EXPAND. Also notice that the window can get resized to the current size of the object if the EVAS_HINT_EXPAND is set **after** the call to @@ -462,7 +458,7 @@ as soon as the object is added to the window). :param subobj: The resize object to add - :type subobj: :py:class:`efl.elementary.object.Object` + :type subobj: :py:class:`~efl.elementary.object.Object` """ elm_win_resize_object_add(self.obj, subobj.obj) @@ -766,6 +762,8 @@ :type: :py:class:`efl.evas.Object` + .. versionadded:: 1.8 + """ def __get__(self): return object_from_instance(elm_win_main_menu_get(self.obj)) @@ -826,6 +824,8 @@ :type: list of strings + .. versionadded:: 1.8 + """ def __set__(self, list profiles): cdef: @@ -849,8 +849,9 @@ ret = elm_win_available_profiles_get(self.obj, &profiles, &count) if ret == 0: - raise RuntimeError("No available profiles") - return array_of_strings_to_python_list(profiles, count) + return None + else: + return array_of_strings_to_python_list(profiles, count) def available_profiles_set(self, list profiles): cdef: @@ -874,14 +875,17 @@ ret = elm_win_available_profiles_get(self.obj, &profiles, &count) if ret == 0: - raise RuntimeError("No available profiles") - return array_of_strings_to_python_list(profiles, count) + return None + else: + return array_of_strings_to_python_list(profiles, count) property profile: """The profile of a window. :type: unicode + .. versionadded:: 1.8 + """ def __set__(self, profile): if isinstance(profile, unicode): profile = PyUnicode_AsUTF8String(profile) @@ -1058,6 +1062,8 @@ :py:attr:`norender` :py:func:`render` + .. versionadded:: 1.8 + """ elm_win_norender_push(self.obj) @@ -1073,6 +1079,8 @@ :py:attr:`norender` :py:func:`render` + .. versionadded:: 1.8 + """ elm_win_norender_pop(self.obj) @@ -1086,6 +1094,8 @@ :py:func:`norender_pop` :py:func:`render` + .. versionadded:: 1.8 + """ def __get__(self): return elm_win_norender_get(self.obj) @@ -1109,6 +1119,8 @@ :py:func:`norender_pop` :py:attr:`norender` + .. versionadded:: 1.8 + """ elm_win_render(self.obj) @@ -1363,6 +1375,8 @@ :type: (int X_DPI, int Y_DPI) + .. versionadded:: 1.8 + """ def __get__(self): cdef int xdpi, ydpi @@ -1426,6 +1440,8 @@ :type: bool + .. versionadded:: 1.8 + """ def __set__(self, bint enabled): elm_win_focus_highlight_animate_set(self.obj, enabled) @@ -1527,8 +1543,12 @@ system-wide service all users can connect to, otherwise the service is private to the user id that created the service. :type svcsys: bool + :raise RuntimeError: if the socket could not be created. + .. versionchanged:: 1.8 + Raises RuntimeError if creating a socket fails + """ if isinstance(svcname, unicode): svcname = PyUnicode_AsUTF8String(svcname) if not elm_win_socket_listen(self.obj, svcname, svcnum, svcsys): @@ -1572,11 +1592,12 @@ # """ # Ecore_Wl_Window *elm_win_wl_window_get(const Evas_Object *obj) - property floating: + property floating_mode: """Floating mode of a window. :type: bool - :since: 1.8 + + .. versionadded:: 1.8 """ def __set__(self, floating): @@ -1585,9 +1606,9 @@ def __get__(self): return bool(elm_win_floating_mode_get(self.obj)) - def floating_set(self, floating): + def floating_mode_set(self, floating): elm_win_floating_mode_set(self.obj, floating) - def floating_get(self): + def floating_mode_get(self): return bool(elm_win_floating_mode_get(self.obj)) # TODO: @@ -1727,7 +1748,7 @@ def callback_focused_add(self, func, *args, **kwargs): """When the window has received focus. - :since: 1.8 + .. versionadded:: 1.8 """ self._callback_add("focused", func, *args, **kwargs) @@ -1737,7 +1758,7 @@ def callback_unfocused_add(self, func, *args, **kwargs): """When the window has lost focus. - :since: 1.8 + .. versionadded:: 1.8 """ self._callback_add("unfocused", func, *args, **kwargs) diff -Nru python-efl-1.17.99~201312040125/efl/emotion/efl.emotion.pyx python-efl-1.8.2~201401231220/efl/emotion/efl.emotion.pyx --- python-efl-1.17.99~201312040125/efl/emotion/efl.emotion.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/emotion/efl.emotion.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -16,6 +16,7 @@ # along with this Python-EFL. If not, see . from cpython cimport PyUnicode_AsUTF8String +from libc.stdint cimport uintptr_t from efl.eo cimport object_from_instance, _object_mapping_register, \ _register_decorated_callbacks @@ -131,8 +132,14 @@ def webcams_get(): - """ Get a list of active and available webcam. + """webcams_get() -> list + + Get a list of active and available webcam. + :return: the list of tuple (webcam name, webcam device) + + .. versionadded:: 1.8 + """ cdef const_Eina_List *lst, *itr cdef Emotion_Webcam *cam @@ -150,7 +157,9 @@ return ret def extension_may_play_get(filename): - """ Do we have a chance to play that file? + """extension_may_play_get(filename) -> bool + + Do we have a chance to play that file? This just actually look at the extention of the file, it doesn't check the mime-type nor if the file is actually sane. So this is just an @@ -159,6 +168,8 @@ :param filename: A filename that we want to know if Emotion can play. :type filename: str + .. versionadded:: 1.8 + """ if isinstance(filename, unicode): filename = PyUnicode_AsUTF8String(filename) return bool(emotion_object_extension_may_play_get( @@ -166,7 +177,9 @@ cdef class Emotion(evasObject): - """ The emotion object + """ + + The Emotion object :see: :py:mod:`The documentation page` @@ -180,20 +193,19 @@ :param color: (r, g, b, a) :return: The emotion object instance just created. + .. versionchanged:: 1.8 + Keyword argument module_filename was renamed to module_name. + """ def __cinit__(self, *a, **ka): self._emotion_callbacks = {} - def __init__(self, Canvas canvas not None, **kargs): + def __init__(self, Canvas canvas not None, module_name="gstreamer", + module_params=None, **kwargs): + self._set_obj(emotion_object_add(canvas.obj)) _register_decorated_callbacks(self) - self._set_common_params(**kargs) - def _set_common_params(self, module_name="gstreamer", - module_params=None, size=None, pos=None, - geometry=None, color=None, name=None): - evasObject._set_common_params(self, size=size, pos=pos, name=name, - geometry=geometry, color=color) if isinstance(module_name, unicode): module_name = PyUnicode_AsUTF8String(module_name) if emotion_object_init(self.obj, @@ -207,27 +219,15 @@ for opt, val in module_params.iteritems(): emotion_object_module_option_set(self.obj, opt, val) - def __str__(self): - x, y, w, h = self.geometry_get() - r, g, b, a = self.color_get() - name = self.name_get() - if name: - name_str = "name=%r, " - else: - name_str = "" - return ("%s(%sfile=%r, geometry=(%d, %d, %d, %d), " - "color=(%d, %d, %d, %d), layer=%s, clip=%s, visible=%s)") % \ - (self.__class__.__name__, name_str, self.file_get(), x, y, w, h, - r, g, b, a, self.layer_get(), self.clip_get(), - self.visible_get()) + self._set_properties_from_keyword_args(kwargs) def __repr__(self): x, y, w, h = self.geometry_get() r, g, b, a = self.color_get() - return ("%s(%#x, type=%r, name=%r, " + return ("<%s(%#x, type=%r, name=%r, " "file=%r, geometry=(%d, %d, %d, %d), " - "color=(%d, %d, %d, %d), layer=%s, clip=%r, visible=%s) %s") % \ - (self.__class__.__name__, self, + "color=(%d, %d, %d, %d), layer=%s, clip=%r, visible=%s) %s>") % \ + (self.__class__.__name__, self, self.type_get(), self.name_get(), self.file_get(), x, y, w, h, r, g, b, a, self.layer_get(), self.clip_get(), self.visible_get(), @@ -320,6 +320,9 @@ default, an Emotion object doesn't have any border. :type: tuple of int (l, r, t, b) + + .. versionadded:: 1.8 + """ def __get__(self): cdef int l, r, t, b @@ -348,6 +351,9 @@ The default color is (0, 0, 0, 0) :type: tuple of int (r, g, b, a) + + .. versionadded:: 1.8 + """ def __get__(self): cdef int r, g, b, a @@ -402,6 +408,9 @@ set the aspect policy to #EMOTION_ASPECT_CUSTOM. :type: Emotion_Aspect + + .. versionadded:: 1.8 + """ def __get__(self): return emotion_object_keep_aspect_get(self.obj) @@ -419,6 +428,9 @@ For supported subtitle formats consult the backend's documentation. :type: str + + .. versionadded:: 1.8 + """ def __get__(self): return _ctouni(emotion_object_video_subtitle_file_get(self.obj)) @@ -452,6 +464,9 @@ *True* means high priority. :type: bool + + .. versionadded:: 1.8 + """ def __get__(self): return bool(emotion_object_priority_get(self.obj)) @@ -482,6 +497,9 @@ or object resolution if lower :type: Emotion_Suspend + + .. versionadded:: 1.8 + """ def __get__(self): return emotion_object_suspend_get(self.obj) @@ -563,6 +581,9 @@ represents the normal speed, 2 double speed, 0.5 half speed and so on. :type: float + + .. versionadded:: 1.8 + """ def __get__(self): return emotion_object_play_speed_get(self.obj) @@ -582,7 +603,7 @@ that doesn't contain a video channel is loaded, then this size can be ignored. The value reported by this function should be consistent with the aspect - ratio returned by :py:func:`ratio_get`, but sometimes the information + ratio returned by :py:attr:`ratio`, but sometimes the information stored in the file is wrong. So use the ratio size reported by py:func:`ratio_get()`, since it is more likely going to be accurate. @@ -1024,6 +1045,8 @@ Every operation is fully asynchronous and not linked to the actual engine used to play the video. + .. versionadded:: 1.8 + """ emotion_object_last_position_load(self.obj) @@ -1032,6 +1055,8 @@ :see: :py:meth:`last_position_load` + .. versionadded:: 1.8 + """ emotion_object_last_position_save(self.obj) @@ -1040,10 +1065,14 @@ emotion object. This function is usefull when you want to get a direct access to the pixels. + + .. versionadded:: 1.8 + """ return object_from_instance(emotion_object_image_get(self.obj)) property vis: + # TODO: document this def __get__(self): return emotion_object_vis_get(self.obj) diff -Nru python-efl-1.17.99~201312040125/efl/eo/efl.eo.pyx python-efl-1.8.2~201401231220/efl/eo/efl.eo.pyx --- python-efl-1.17.99~201312040125/efl/eo/efl.eo.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/eo/efl.eo.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -18,6 +18,7 @@ from cpython cimport PyObject, Py_INCREF, Py_DECREF, PyUnicode_AsUTF8String from libc.stdlib cimport malloc, free from libc.string cimport memcpy, strdup +from libc.stdint cimport uintptr_t from efl.eina cimport Eina_Bool, const_Eina_List, eina_list_append, const_void, \ Eina_Hash, eina_hash_string_superfast_new, eina_hash_add, eina_hash_del, \ eina_hash_find, EINA_LOG_DOM_DBG, EINA_LOG_DOM_INFO @@ -122,7 +123,7 @@ if cls_name == NULL: raise ValueError( - "Eo object at %#x does not have a type!" % obj) + "Eo object at %#x does not have a type!" % obj) cls_ret = eina_hash_find(object_mapping, cls_name) @@ -130,7 +131,7 @@ # TODO: Add here a last ditch effort to import the class from a module raise ValueError( "Eo object at %#x of type %s does not have a mapping!" % ( - obj, cls_name) + obj, cls_name) ) cls = cls_ret @@ -138,7 +139,7 @@ if cls is None: raise ValueError( "Mapping for Eo object at %#x, type %s, contains None!" % ( - obj, cls_name)) + obj, cls_name)) EINA_LOG_DOM_DBG(PY_EFL_EO_LOG_DOMAIN, "Constructing a Python object from Eo of type %s.", cls_name) @@ -219,9 +220,9 @@ eo_do(self.obj, eo_parent_get(&parent)) return ("<%s object (Eo) at %#x (obj=%#x, parent=%#x, refcount=%d)>") % ( type(self).__name__, - self, - self.obj, - parent, + self, + self.obj, + parent, PY_REFCOUNT(self)) def __nonzero__(self): @@ -240,6 +241,8 @@ return 1 cdef int _set_properties_from_keyword_args(self, dict kwargs) except 0: + if not kwargs: + return 1 cdef list cls_list = dir(self) for k, v in kwargs.items(): assert k in cls_list, "%s has no attribute with the name %s." % (self, k) diff -Nru python-efl-1.17.99~201312040125/efl/evas/efl.evas.pyx python-efl-1.8.2~201401231220/efl/evas/efl.evas.pyx --- python-efl-1.17.99~201312040125/efl/evas/efl.evas.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/evas/efl.evas.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -17,6 +17,7 @@ import traceback from cpython cimport PyUnicode_AsUTF8String +from libc.stdint cimport uintptr_t #from efl.eina cimport * from efl.eo cimport Eo, object_from_instance, _object_mapping_register from efl.utils.conversions cimport _ctouni, _touni diff -Nru python-efl-1.17.99~201312040125/efl/evas/efl.evas_canvas.pxi python-efl-1.8.2~201401231220/efl/evas/efl.evas_canvas.pxi --- python-efl-1.17.99~201312040125/efl/evas/efl.evas_canvas.pxi 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/evas/efl.evas_canvas.pxi 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -81,8 +81,8 @@ a number of objects (or actors) that will be managed. Object state is monitored and redraw is optimized based on changes. - :ivar rect: :py:class:`efl.evas.Rect` describing object geometry, for - easy manipulation. Changing this :py:class:`evas.rect.Rect` will not + :ivar rect: :py:class:`~efl.evas.Rect` describing object geometry, for + easy manipulation. Changing this :py:class:`~efl.evas.Rect` will not affect current geometry, you have to set it again to have this behavior. @@ -90,7 +90,7 @@ order to be functional. So far it's impossible to do this association directly from Python, so you should create Canvas indirectly using ``efl.elementary`` classes, like - :py:class:`efl.elementary.Window`. + :py:class:`efl.elementary.window.Window`. """ def __cinit__(self, *a, **ka): @@ -154,7 +154,7 @@ def __get__(self): return self.output_method_get() - def engine_info_set(self, unsigned long ptr): + def engine_info_set(self, uintptr_t ptr): """Set the engine information pointer. Note that given value is a pointer, usually acquired with @@ -182,10 +182,10 @@ If in doubt, don't mess with it. - :return: pointer as integer (unsigned long). + :return: pointer as integer (uintptr_t). """ - return evas_engine_info_get(self.obj) + return evas_engine_info_get(self.obj) property engine_info: def __set__(self, ptr): diff -Nru python-efl-1.17.99~201312040125/efl/evas/efl.evas_canvas_callbacks.pxi python-efl-1.8.2~201401231220/efl/evas/efl.evas_canvas_callbacks.pxi --- python-efl-1.17.99~201312040125/efl/evas/efl.evas_canvas_callbacks.pxi 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/evas/efl.evas_canvas_callbacks.pxi 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of diff -Nru python-efl-1.17.99~201312040125/efl/evas/efl.evas_map.pxi python-efl-1.8.2~201401231220/efl/evas/efl.evas_map.pxi --- python-efl-1.17.99~201312040125/efl/evas/efl.evas_map.pxi 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/evas/efl.evas_map.pxi 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of diff -Nru python-efl-1.17.99~201312040125/efl/evas/efl.evas_object.pxi python-efl-1.8.2~201401231220/efl/evas/efl.evas_object.pxi --- python-efl-1.17.99~201312040125/efl/evas/efl.evas_object.pxi 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/evas/efl.evas_object.pxi 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -108,23 +108,22 @@ cdef class Object(Eo): """ Basic Graphical Object (or actor). - :py:class:`Objects ` are managed by - :py:class:`Canvas ` in a non-immediate way, that is, - all operations, like moving, resizing, changing the color, etc will - not trigger immediate repainting, instead it will save the new state - and mark both this object and its Canvas as "dirty" so can be redrawn - on :py:func:`Canvas.render() ` (usually called by the underlying system, when - you're entering idle. This means that doesn't matter how many times - you're moving an object between frame updates: just the last state - will be used, that's why you really should do animations - using :py:func:`efl.ecore.animator_add` instead of :py:func:`efl.ecore.timer_add`, since - it will call registered functions in one batch and then trigger redraw, - instead of calling one function, then redraw, then the next function, - and redraw... + Objects are managed by :py:class:`Canvas ` in a non- + immediate way, that is, all operations, like moving, resizing, changing the + color, etc will not trigger immediate repainting, instead it will save the + new state and mark both this object and its Canvas as "dirty" so can be + redrawn on :py:func:`Canvas.render() ` (usually + called by the underlying system, when you're entering idle. This means that + doesn't matter how many times you're moving an object between frame updates: + just the last state will be used, that's why you really should do animations + using :py:func:`~efl.ecore.Animator` instead of + :py:class:`~efl.ecore.Timer`, since it will call registered functions in one + batch and then trigger redraw, instead of calling one function, then redraw, + then the next function, and redraw... The most important concept for evas object is *clipping* (:py:attr:`clip`), usually done by use of - :py:class:`Rectangle ` as clipper. Clip objects will + :py:class:`~efl.evas.Rectangle` as clipper. Clip objects will affect the drawing behavior: - Limiting visibility @@ -200,18 +199,11 @@ return 1 - def _set_common_params(self, size=None, pos=None, geometry=None, - color=None, name=None): - if size is not None: - self.size_set(*size) - if pos is not None: - self.pos_set(*pos) - if geometry is not None: - self.geometry_set(*geometry) + cdef int _set_properties_from_keyword_args(self, dict kwargs) except 0: + color = kwargs.pop("color", None) if color is not None: self.color_set(*color_parse(color)) - if name is not None: - self.name_set(name) + return Eo._set_properties_from_keyword_args(self, kwargs) def delete(self): """delete() diff -Nru python-efl-1.17.99~201312040125/efl/evas/efl.evas_object_box.pxi python-efl-1.8.2~201401231220/efl/evas/efl.evas_object_box.pxi --- python-efl-1.17.99~201312040125/efl/evas/efl.evas_object_box.pxi 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/evas/efl.evas_object_box.pxi 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -42,9 +42,9 @@ :type name: string """ - def __init__(self, Canvas canvas not None, **kargs): + def __init__(self, Canvas canvas not None, **kwargs): self._set_obj(evas_object_box_add(canvas.obj)) - self._set_common_params(**kargs) + self._set_properties_from_keyword_args(kwargs) property align: """Alignment of the whole bounding box of contents diff -Nru python-efl-1.17.99~201312040125/efl/evas/efl.evas_object_callbacks.pxi python-efl-1.8.2~201401231220/efl/evas/efl.evas_object_callbacks.pxi --- python-efl-1.17.99~201312040125/efl/evas/efl.evas_object_callbacks.pxi 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/evas/efl.evas_object_callbacks.pxi 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of diff -Nru python-efl-1.17.99~201312040125/efl/evas/efl.evas_object_events.pxi python-efl-1.8.2~201401231220/efl/evas/efl.evas_object_events.pxi --- python-efl-1.17.99~201312040125/efl/evas/efl.evas_object_events.pxi 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/evas/efl.evas_object_events.pxi 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of diff -Nru python-efl-1.17.99~201312040125/efl/evas/efl.evas_object_grid.pxi python-efl-1.8.2~201401231220/efl/evas/efl.evas_object_grid.pxi --- python-efl-1.17.99~201312040125/efl/evas/efl.evas_object_grid.pxi 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/evas/efl.evas_object_grid.pxi 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -18,8 +18,9 @@ cdef class Grid(Object): - def __init__(self, Canvas canvas not None): + def __init__(self, Canvas canvas not None, **kwargs): self._set_obj(evas_object_grid_add(canvas.obj)) + self._set_properties_from_keyword_args(kwargs) @classmethod def add_to(cls, Object parent): diff -Nru python-efl-1.17.99~201312040125/efl/evas/efl.evas_object_image.pxi python-efl-1.8.2~201401231220/efl/evas/efl.evas_object_image.pxi --- python-efl-1.17.99~201312040125/efl/evas/efl.evas_object_image.pxi 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/evas/efl.evas_object_image.pxi 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -61,19 +61,20 @@ other size was set with :py:attr:`load_size`, :py:attr:`load_dpi` or :py:attr:`load_scale_down`. - Pixels will be scaled to match size specified by :py:attr:`fill` - using either sampled or smooth methods, these can be specified with + Pixels will be scaled to match size specified by :py:attr:`fill` using + either sampled or smooth methods, these can be specified with :py:attr:`smooth_scale`. The scale will consider borders as specified by - :py:attr:`border` and :py:attr:`border_center_fill`, while the former specify - the border dimensions (top and bottom will scale horizontally, while + :py:attr:`border` and :py:attr:`border_center_fill`, while the former + specify the border dimensions (top and bottom will scale horizontally, while right and left will do vertically, corners are kept unscaled), the latter says whenever the center of the image will be used (useful to create frames). Contents will be tiled using :py:attr:`fill` information in order to paint - :py:attr:`geometry`, so if you want an image to be drawn - just once, you should match every :py:attr:`geometry` = **x, y, w, h** by a call - to :py:attr:`fill` = **0, 0, w, h**. :py:class:`FilledImage` does that for you. + :py:attr:`~efl.evas.Object.geometry`, so if you want an image to be drawn + just once, you should match every :py:attr:`geometry` = **x, y, w, h** by a + call to :py:attr:`fill` = **0, 0, w, h**. :py:class:`FilledImage` does that + for you. .. rubric:: Pixel data and buffer API @@ -120,8 +121,8 @@ R = (r * a) / 32; G = (g * a) / 32; B = (b * a) / 32; .. note:: if an image is resized it will **tile** it's contents respecting - geometry set by :py:func:`fill_set()`, so if you want the contents to be - **scaled** you need to call :py:func:`fill_set()` with ``x=0, y=0, w=new_width, + geometry set by :py:attr:`fill`, so if you want the contents to be + **scaled** you need to call :py:attr:`fill` with ``x=0, y=0, w=new_width, h=new_height``, or you should use :py:class:`FilledImage` instead. :param canvas: Evas canvas for this object @@ -140,16 +141,15 @@ :type file: string """ - def __init__(self, Canvas canvas not None, **kargs): + def __init__(self, Canvas canvas not None, file=None, **kwargs): self._set_obj(evas_object_image_add(canvas.obj)) - self._set_common_params(**kargs) - def _set_common_params(self, file=None, **kargs): - if file: - if isinstance(file, str): + if file is not None: + if not isinstance(file, (list, tuple)): file = (file, None) self.file_set(*file) - Object._set_common_params(self, **kargs) + + self._set_properties_from_keyword_args(kwargs) # TODO: # def memfile_set(self, data, size=None, format=None, key=None): @@ -293,7 +293,7 @@ :type: bool - .. seealso:: :py:func:`filled_add` + .. seealso:: :py:class:`FilledImage` """ def __set__(self, setting): @@ -426,7 +426,7 @@ """Get the row stride (in pixels) being used to draw this image. While image have logical dimension of width and height set by - :py:func:`image_size_set()`, the line can be a bit larger than width to + :py:attr:`image_size`, the line can be a bit larger than width to improve memory alignment. The amount of bytes will change based on colorspace, while using @@ -435,7 +435,7 @@ data using stride in multiple of 2 bytes and after that an alpha plane with data using stride in multiple of 1 byte. - .. note:: This value can change after :py:func:`image_size_set()`. + .. note:: This value can change after setting :py:attr:`image_size`. .. note:: Unit is pixels, not bytes. :type: int @@ -497,99 +497,99 @@ PyBuffer_Release(&view) - def image_data_memoryview_get(self, bint for_writing=False, bint simple=True): - """image_data_memoryview_get(bool for_writing) -> MemoryView - - Get a MemoryView object to the raw image data of the given image object. - - :param bool for_writing: Whether the data being retrieved will be - modified or not. - :param bool simple: Whether the MemoryView is 1D or 2D - :return MemoryView: The raw image data. - - This method returns a MemoryView object to an image object's internal pixel - buffer, for reading only or read/write. If you request it for - writing, the image will be marked dirty so that it gets redrawn at - the next update. - - Each time you call this method on an image object, its data - buffer will have an internal reference counter - incremented. Decrement it back by using - :py:func:`image_data_set`. + # def image_data_memoryview_get(self, bint for_writing=False, bint simple=True): + # """image_data_memoryview_get(bool for_writing) -> MemoryView - This is best suited for when you want to modify an existing image, - without changing its dimensions. + # Get a MemoryView object to the raw image data of the given image object. - .. note:: - The contents' format returned by it depend on the color - space of the given image object. - - .. note:: - You may want to use :py:func:`image_data_update_add` to - inform data changes, if you did any. + # :param bool for_writing: Whether the data being retrieved will be + # modified or not. + # :param bool simple: Whether the MemoryView is 1D or 2D + # :return MemoryView: The raw image data. + + # This method returns a MemoryView object to an image object's internal pixel + # buffer, for reading only or read/write. If you request it for + # writing, the image will be marked dirty so that it gets redrawn at + # the next update. + + # Each time you call this method on an image object, its data + # buffer will have an internal reference counter + # incremented. Decrement it back by using + # :py:func:`image_data_set`. + + # This is best suited for when you want to modify an existing image, + # without changing its dimensions. + + # .. note:: + # The contents' format returned by it depend on the color + # space of the given image object. + + # .. note:: + # You may want to use :py:func:`image_data_update_add` to + # inform data changes, if you did any. - """ - cdef int stride, h, bpp, cspace, have_alpha, img_size - - stride = evas_object_image_stride_get(self.obj) - evas_object_image_size_get(self.obj, NULL, &h) - cspace = evas_object_image_colorspace_get(self.obj) - have_alpha = evas_object_image_alpha_get(self.obj) - - bpp = 0 - if cspace == EVAS_COLORSPACE_ARGB8888: - bpp = 4 - format = "L" - elif cspace == EVAS_COLORSPACE_RGB565_A5P: - if have_alpha == 0: - bpp = 2 - format = "H" - else: - pass #bpp = 3 - # XXX: There's no type that has three bytes. - # Is the format string actually used? - if bpp == 0: - raise ValueError("Unsupported colorspace") - - img_size = stride * h * bpp - - cdef Py_buffer *img_buf = PyMem_Malloc(sizeof(Py_buffer)) - if img_buf == NULL: - raise MemoryError - - cdef: - Py_ssize_t simple_shape[1] - Py_ssize_t shape[2] - Py_ssize_t strides[2] - Py_ssize_t suboffsets[2] + # """ + # cdef int stride, h, bpp, cspace, have_alpha, img_size - if simple: - simple_shape[0] = img_size - else: - shape[0] = stride / bpp - shape[1] = h - strides[0] = stride - strides[1] = h * bpp - suboffsets[0] = -1 - suboffsets[1] = -1 - - img_buf.buf = evas_object_image_data_get(self.obj, for_writing) - img_buf.len = img_size - img_buf.readonly = not for_writing - img_buf.format = format - if simple: - img_buf.ndim = 1 - img_buf.shape = simple_shape - img_buf.strides = NULL - img_buf.suboffsets = NULL - else: - img_buf.ndim = 2 - img_buf.shape = shape - img_buf.strides = strides - img_buf.suboffsets = suboffsets - img_buf.itemsize = bpp + # stride = evas_object_image_stride_get(self.obj) + # evas_object_image_size_get(self.obj, NULL, &h) + # cspace = evas_object_image_colorspace_get(self.obj) + # have_alpha = evas_object_image_alpha_get(self.obj) + + # bpp = 0 + # if cspace == EVAS_COLORSPACE_ARGB8888: + # bpp = 4 + # format = "L" + # elif cspace == EVAS_COLORSPACE_RGB565_A5P: + # if have_alpha == 0: + # bpp = 2 + # format = "H" + # else: + # pass #bpp = 3 + # # XXX: There's no type that has three bytes. + # # Is the format string actually used? + # if bpp == 0: + # raise ValueError("Unsupported colorspace") + + # img_size = stride * h * bpp + + # cdef Py_buffer *img_buf = PyMem_Malloc(sizeof(Py_buffer)) + # if img_buf == NULL: + # raise MemoryError + + # cdef: + # Py_ssize_t simple_shape[1] + # Py_ssize_t shape[2] + # Py_ssize_t strides[2] + # Py_ssize_t suboffsets[2] + + # if simple: + # simple_shape[0] = img_size + # else: + # shape[0] = stride / bpp + # shape[1] = h + # strides[0] = stride + # strides[1] = h * bpp + # suboffsets[0] = -1 + # suboffsets[1] = -1 + + # img_buf.buf = evas_object_image_data_get(self.obj, for_writing) + # img_buf.len = img_size + # img_buf.readonly = not for_writing + # img_buf.format = format + # if simple: + # img_buf.ndim = 1 + # img_buf.shape = simple_shape + # img_buf.strides = NULL + # img_buf.suboffsets = NULL + # else: + # img_buf.ndim = 2 + # img_buf.shape = shape + # img_buf.strides = strides + # img_buf.suboffsets = suboffsets + # img_buf.itemsize = bpp - return PyMemoryView_FromBuffer(img_buf) + # return PyMemoryView_FromBuffer(img_buf) # TODO: @@ -1105,10 +1105,11 @@ If set to False, the source object of the proxy will be invisible. - This API works differently to :py:func:`show` and :py:func:`hide`. - Once source object is hidden by :py:func:`hide` then the proxy object will - be hidden as well. Actually in this case both objects are excluded from the - Evas internal update circle. + This API works differently to :py:func:`~efl.evas.Object.show` and + :py:func:`~efl.evas.Object.hide`. Once source object is hidden by + :py:func:`~efl.evas.Object.hide` then the proxy object will be hidden as + well. Actually in this case both objects are excluded from the Evas + internal update circle. By this API, instead, one can toggle the visibility of a proxy's source object remaining the proxy visibility untouched. @@ -1120,9 +1121,9 @@ If the all of proxies are deleted, then the source visibility of the source object will be cancelled. - .. seealso:: evas_object_image_source_set() + .. seealso:: :py:attr:`source` - :since: 1.8 + .. versionadded:: 1.8 """ def __set__(self, bint visible): @@ -1153,7 +1154,7 @@ :py:attr:`source` :py:attr:`source_visible` - :since: 1.8 + .. versionadded:: 1.8 """ def __set__(self, bint source): @@ -1347,11 +1348,11 @@ Image that automatically resize it's contents to fit object size. - This :py:class:`Image` subclass already calls :py:func:`Image.fill_set` + This :py:class:`Image` subclass already calls :py:attr:`Image.fill` on resize so it will match and so be scaled to fill the whole area. :param canvas: The evas canvas for this object - :type canvas: :py:class:`Canvas` + :type canvas: :py:class:`~efl.evas.Canvas` :keyword size: Width and height :type size: tuple of ints :keyword pos: X and Y diff -Nru python-efl-1.17.99~201312040125/efl/evas/efl.evas_object_line.pxi python-efl-1.8.2~201401231220/efl/evas/efl.evas_object_line.pxi --- python-efl-1.17.99~201312040125/efl/evas/efl.evas_object_line.pxi 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/evas/efl.evas_object_line.pxi 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -39,12 +39,11 @@ :type end: tuple of ints """ - def __init__(self, Canvas canvas not None, **kargs): + def __init__(self, Canvas canvas not None, start=None, end=None, + geometry=None, size=None, pos=None, **kwargs): + self._set_obj(evas_object_line_add(canvas.obj)) - self._set_common_params(**kargs) - def _set_common_params(self, start=None, end=None, geometry=None, - size=None, pos=None, **kargs): if start and end: x1 = start[0] y1 = start[1] @@ -77,8 +76,15 @@ self.start_set(*start) elif end: self.end_set(*end) - Object._set_common_params(self, geometry=geometry, size=size, - pos=pos, **kargs) + + if geometry is not None: + kwargs["geometry"] = geometry + if size is not None: + kwargs["size"] = size + if pos is not None: + kwargs["pos"] = pos + + self._set_properties_from_keyword_args(kwargs) property xy: """Two points of the line. diff -Nru python-efl-1.17.99~201312040125/efl/evas/efl.evas_object_polygon.pxi python-efl-1.8.2~201401231220/efl/evas/efl.evas_object_polygon.pxi --- python-efl-1.17.99~201312040125/efl/evas/efl.evas_object_polygon.pxi 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/evas/efl.evas_object_polygon.pxi 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -37,12 +37,9 @@ :type points: tuple of x, y int pairs """ - def __init__(self, Canvas canvas not None, **kargs): + def __init__(self, Canvas canvas not None, points=None, **kwargs): self._set_obj(evas_object_polygon_add(canvas.obj)) - self._set_common_params(**kargs) - - def _set_common_params(self, points=None, **kargs): - Object._set_common_params(self, **kargs) + self._set_properties_from_keyword_args(kwargs) if points: for x, y in points: self.point_add(x, y) diff -Nru python-efl-1.17.99~201312040125/efl/evas/efl.evas_object_rectangle.pxi python-efl-1.8.2~201401231220/efl/evas/efl.evas_object_rectangle.pxi --- python-efl-1.17.99~201312040125/efl/evas/efl.evas_object_rectangle.pxi 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/evas/efl.evas_object_rectangle.pxi 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -135,9 +135,9 @@ :type name: string """ - def __init__(self, Canvas canvas not None, **kargs): + def __init__(self, Canvas canvas not None, **kwargs): self._set_obj(evas_object_rectangle_add(canvas.obj)) - self._set_common_params(**kargs) + self._set_properties_from_keyword_args(kwargs) _object_mapping_register("Evas_Rectangle", Rectangle) diff -Nru python-efl-1.17.99~201312040125/efl/evas/efl.evas_object_smart.pxi python-efl-1.8.2~201401231220/efl/evas/efl.evas_object_smart.pxi --- python-efl-1.17.99~201312040125/efl/evas/efl.evas_object_smart.pxi 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/evas/efl.evas_object_smart.pxi 2014-01-18 12:24:01.000000000 +0000 @@ -1,11 +1,11 @@ -# Copyright (C) 2007-2013 various contributors (see AUTHORS) +# Copyright (C) 2007-2014 various contributors (see AUTHORS) # # This file is part of Python-EFL. # # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -26,7 +26,7 @@ include "smart_object_metaclass.pxi" _install_metaclass(EvasSmartObjectMeta, SmartObject) - +_install_metaclass(EvasSmartObjectMeta, ClippedSmartObject) cdef void _smart_object_delete(Evas_Object *o) with gil: @@ -395,15 +395,15 @@ def __dealloc__(self): self._smart_callbacks = None - def __init__(self, Canvas canvas not None, **kargs): - cdef long addr + def __init__(self, Canvas canvas not None, **kwargs): + cdef uintptr_t addr if type(self) is SmartObject: raise TypeError("Must not instantiate SmartObject, but subclasses") if self.obj == NULL: addr = self.__evas_smart_class__ -# self._add_obj(evas_object_smart_class_get(), self.evas.obj) self._set_obj(evas_object_smart_add(canvas.obj, addr)) - self._set_common_params(**kargs) + + self._set_properties_from_keyword_args(kwargs) def member_add(self, Object child): """member_add(Object child) @@ -685,9 +685,9 @@ # Factory def Rectangle(self, **kargs): - """Factory of children :py:class:`evas.Rectangle`. + """Factory of children :py:class:`~efl.evas.Rectangle`. - :rtype: :py:class:`Rectangle` + :rtype: :py:class:`~efl.evas.Rectangle` """ obj = Rectangle(self.evas, **kargs) @@ -695,60 +695,67 @@ return obj def Line(self, **kargs): - """Factory of children :py:class:`evas.Line`. + """Factory of children :py:class:`~efl.evas.Line`. - :rtype: :py:class:`Line` + :rtype: :py:class:`~efl.evas.Line` """ obj = Line(self.evas, **kargs) self.member_add(obj) return obj -# def Image(self, **kargs): -# """Factory of children :py:class:`evas.Image`. -# :rtype: :py:class:`Image` -# """ -# obj = Image(self.evas, **kargs) -# self.member_add(obj) -# return obj - -# def FilledImage(self, **kargs): -# """Factory of :py:class:`evas.FilledImage` associated with this canvas. -# :rtype: :py:class:`FilledImage` -# """ -# obj = FilledImage(self.evas, **kargs) -# self.member_add(obj) -# return obj -# -# def Polygon(self, **kargs): -# """Factory of children :py:class:`evas.Polygon`. -# :rtype: :py:class:`Polygon` -# """ -# obj = Polygon(self.evas, **kargs) -# self.member_add(obj) -# return obj -# -# def Text(self, **kargs): -# """Factory of children :py:class:`evas.Text`. -# :rtype: :py:class:`Text` -# """ -# obj = Text(self.evas, **kargs) -# self.member_add(obj) -# return obj -# -# def Textblock(self, **kargs): -# """Factory of children :py:class:`evas.Textblock`. -# :rtype: :py:class:`Textblock` -# """ -# obj = Textblock(self.evas, **kargs) -# self.member_add(obj) -# return obj + def Image(self, **kargs): + """Factory of children :py:class:`evas.Image`. + + :rtype: :py:class:`Image` + + """ + obj = Image(self.evas, **kargs) + self.member_add(obj) + return obj + + def FilledImage(self, **kargs): + """Factory of :py:class:`evas.FilledImage` associated with this canvas. + + :rtype: :py:class:`FilledImage` + + """ + obj = FilledImage(self.evas, **kargs) + self.member_add(obj) + return obj + + def Polygon(self, **kargs): + """Factory of children :py:class:`evas.Polygon`. + + :rtype: :py:class:`Polygon` + + """ + obj = Polygon(self.evas, **kargs) + self.member_add(obj) + return obj + + def Text(self, **kargs): + """Factory of children :py:class:`evas.Text`. + + :rtype: :py:class:`Text` + + """ + obj = Text(self.evas, **kargs) + self.member_add(obj) + return obj + + def Textblock(self, **kargs): + """Factory of children :py:class:`evas.Textblock`. + + :rtype: :py:class:`Textblock` + + """ + obj = Textblock(self.evas, **kargs) + self.member_add(obj) + return obj _object_mapping_register("Evas_Smart", SmartObject) -# cdef extern from "Evas.h": # hack to force type to be known -# cdef PyTypeObject PyEvasSmartObject_Type # hack to install metaclass -# _install_metaclass(&PyEvasSmartObject_Type, EvasSmartObjectMeta) cdef class ClippedSmartObject(SmartObject): @@ -838,6 +845,3 @@ _object_mapping_register("Evas_Smart_Clipped", ClippedSmartObject) -# cdef extern from "Evas.h": # hack to force type to be known -# cdef PyTypeObject PyEvasClippedSmartObject_Type # hack to install metaclass -# _install_metaclass(&PyEvasClippedSmartObject_Type, EvasSmartObjectMeta) diff -Nru python-efl-1.17.99~201312040125/efl/evas/efl.evas_object_table.pxi python-efl-1.8.2~201401231220/efl/evas/efl.evas_object_table.pxi --- python-efl-1.17.99~201312040125/efl/evas/efl.evas_object_table.pxi 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/evas/efl.evas_object_table.pxi 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -34,8 +34,9 @@ cdef class Table(Object): - def __init__(self, Canvas canvas not None): + def __init__(self, Canvas canvas not None, **kwargs): self._set_obj(evas_object_table_add(canvas.obj)) + self._set_properties_from_keyword_args(kwargs) @classmethod def add_to(cls, Object parent): diff -Nru python-efl-1.17.99~201312040125/efl/evas/efl.evas_object_text.pxi python-efl-1.8.2~201401231220/efl/evas/efl.evas_object_text.pxi --- python-efl-1.17.99~201312040125/efl/evas/efl.evas_object_text.pxi 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/evas/efl.evas_object_text.pxi 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -53,24 +53,16 @@ """ - def __init__(self, Canvas canvas not None, **kargs): + def __init__(self, Canvas canvas not None, font=None, shadow_color=None, + glow_color=None, glow2_color=None, outline_color=None, **kwargs): + self._set_obj(evas_object_text_add(canvas.obj)) - self._set_common_params(**kargs) + self._set_properties_from_keyword_args(kwargs) - def _set_common_params(self, text=None, font=None, font_source=None, - style=None, shadow_color=None, glow_color=None, - glow2_color=None, outline_color=None, **kargs): - Object._set_common_params(self, **kargs) - if text is not None: - self.text_set(text) - if font_source: - self.font_source_set(font_source) if font: if not isinstance(font, (tuple, list)): font = (font,) self.font_set(*font) - if style is not None: - self.style_set(style) if shadow_color is not None: self.shadow_color_set(*color_parse(shadow_color)) if glow_color is not None: diff -Nru python-efl-1.17.99~201312040125/efl/evas/efl.evas_object_textblock.pxi python-efl-1.8.2~201401231220/efl/evas/efl.evas_object_textblock.pxi --- python-efl-1.17.99~201312040125/efl/evas/efl.evas_object_textblock.pxi 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/evas/efl.evas_object_textblock.pxi 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -39,17 +39,9 @@ """ - def __init__(self, Canvas canvas not None, **kargs): + def __init__(self, Canvas canvas not None, **kwargs): self._set_obj(evas_object_textblock_add(canvas.obj)) - self._set_common_params(**kargs) - - def _set_common_params(self, text_markup=None, style=None, **kargs): - Object._set_common_params(self, **kargs) - - if style is not None: - self.style_set(style) - if text_markup is not None: - self.text_markup_set(text_markup) + self._set_properties_from_keyword_args(kwargs) property style: """Style @@ -158,7 +150,7 @@ :type: (int **w**, int **h**) - :see: :py:attr:`size_native_get` + :see: :py:attr:`size_native` """ def __get__(self): diff -Nru python-efl-1.17.99~201312040125/efl/evas/efl.evas_object_textgrid.pxi python-efl-1.8.2~201401231220/efl/evas/efl.evas_object_textgrid.pxi --- python-efl-1.17.99~201312040125/efl/evas/efl.evas_object_textgrid.pxi 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/evas/efl.evas_object_textgrid.pxi 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -67,7 +67,13 @@ cdef class TextgridCell(object): - """The values that describe each cell.""" + """ + + The values that describe each cell. + + .. versionadded:: 1.8 + + """ cdef Evas_Textgrid_Cell *cell @@ -212,8 +218,14 @@ cdef class Textgrid(Object): - def __init__(self, Canvas canvas not None): + """ + + .. versionadded:: 1.8 + + """ + def __init__(self, Canvas canvas not None, **kwargs): self._set_obj(evas_object_textgrid_add(canvas.obj)) + self._set_properties_from_keyword_args(kwargs) property size: """The size of the textgrid object. diff -Nru python-efl-1.17.99~201312040125/efl/evas/efl.evas_rect.pxi python-efl-1.8.2~201401231220/efl/evas/efl.evas_rect.pxi --- python-efl-1.17.99~201312040125/efl/evas/efl.evas_rect.pxi 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/evas/efl.evas_rect.pxi 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of diff -Nru python-efl-1.17.99~201312040125/efl/evas/smart_object_metaclass.pxi python-efl-1.8.2~201401231220/efl/evas/smart_object_metaclass.pxi --- python-efl-1.17.99~201312040125/efl/evas/smart_object_metaclass.pxi 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/evas/smart_object_metaclass.pxi 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -16,8 +16,9 @@ # along with this Python-EFL. If not, see . from cpython cimport PyMem_Malloc +from libc.stdint cimport uintptr_t -cdef long _smart_object_class_new(name) except 0: +cdef uintptr_t _smart_object_class_new(name) except 0: cdef Evas_Smart_Class *cls_def cdef Evas_Smart *cls @@ -27,7 +28,7 @@ if isinstance(name, unicode): name = PyUnicode_AsUTF8String(name) - #_smart_classes.append(cls_def) + #_smart_classes.append(cls_def) cls_def.name = name cls_def.version = EVAS_SMART_CLASS_VERSION cls_def.add = NULL # use python constructor @@ -48,7 +49,7 @@ cls_def.data = NULL cls = evas_smart_class_new(cls_def); - return cls + return cls #class EvasSmartObjectMeta(EvasObjectMeta): class EvasSmartObjectMeta(type): @@ -61,7 +62,7 @@ if "__evas_smart_class__" in cls.__dict__: return - cdef long addr + cdef uintptr_t addr addr = _smart_object_class_new(cls.__name__) cls.__evas_smart_class__ = addr diff -Nru python-efl-1.17.99~201312040125/efl/utils/conversions.pyx python-efl-1.8.2~201401231220/efl/utils/conversions.pyx --- python-efl-1.17.99~201312040125/efl/utils/conversions.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/utils/conversions.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of diff -Nru python-efl-1.17.99~201312040125/efl/utils/deprecated.pyx python-efl-1.8.2~201401231220/efl/utils/deprecated.pyx --- python-efl-1.17.99~201312040125/efl/utils/deprecated.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/utils/deprecated.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -1,3 +1,20 @@ +# Copyright (C) 2007-2013 various contributors (see AUTHORS) +# +# This file is part of Python-EFL. +# +# Python-EFL is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 3 of the License, or (at your option) any later version. +# +# Python-EFL is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this Python-EFL. If not, see . + import traceback import types from functools import update_wrapper diff -Nru python-efl-1.17.99~201312040125/efl/utils/logger.pyx python-efl-1.8.2~201401231220/efl/utils/logger.pyx --- python-efl-1.17.99~201312040125/efl/utils/logger.pyx 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/efl/utils/logger.pyx 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -110,7 +110,9 @@ else: log.propagate = True log.setLevel(logging.WARNING) - log.addHandler(logging.NullHandler()) + + if PY_VERSION_HEX >= 0x02070000: + log.addHandler(logging.NullHandler()) logging.setLoggerClass(logging.Logger) diff -Nru python-efl-1.17.99~201312040125/examples/elementary/test.py python-efl-1.8.2~201401231220/examples/elementary/test.py --- python-efl-1.17.99~201312040125/examples/elementary/test.py 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/examples/elementary/test.py 2014-01-18 12:24:01.000000000 +0000 @@ -28,6 +28,9 @@ from efl.elementary.entry import Entry from efl.elementary.scroller import Scroller +from efl.elementary.configuration import Configuration +elm_conf = Configuration() + elog.setLevel(logging.DEBUG) EXPAND_BOTH = EVAS_HINT_EXPAND, EVAS_HINT_EXPAND @@ -39,6 +42,7 @@ ("Evas Canvas Callbacks", "test_core_evas_canvas_callbacks", "core_evas_canvas_callbacks_clicked"), ("Evas Object Callbacks", "test_core_evas_object_callbacks", "core_evas_object_callbacks_clicked"), ("Evas Textgrid", "test_evas_textgrid", "evas_textgrid_clicked"), + ("Evas Smart Object", "test_core_evas_smart", "core_evas_smart_clicked"), ]), ("3D", [ ("Evas Map 3D", "test_3d", "evas3d_clicked"), @@ -80,11 +84,11 @@ ("Panel", "test_panel", "panel_clicked"), ("Panes", "test_panes", "panes_clicked"), ]), - ("Drag & Drop", [ - ("Genlist DnD Default Anim", "test_dnd", "dnd_genlist_default_anim_clicked"), - ("Genlist DnD User Anim", "test_dnd", "dnd_genlist_user_anim_clicked"), - ("Genlist + Gengrid DnD", "test_dnd", "dnd_genlist_gengrid_clicked"), - ]), + # ("Drag & Drop", [ + # ("Genlist DnD Default Anim", "test_dnd", "dnd_genlist_default_anim_clicked"), + # ("Genlist DnD User Anim", "test_dnd", "dnd_genlist_user_anim_clicked"), + # ("Genlist + Gengrid DnD", "test_dnd", "dnd_genlist_gengrid_clicked"), + # ]), ("Edje External", [ ("Ext Button", "test_external", "edje_external_button_clicked"), ("Ext ProgressBar", "test_external", "edje_external_pbar_clicked"), @@ -111,10 +115,15 @@ ("Entry Anchor", "test_entry", "entry_anchor_clicked"), ("MultiButtonEntry", "test_multibuttonentry", "multibuttonentry_clicked"), ]), + ("Focus", [ + ("Focus", "test_focus", "focus_clicked"), + ("Focus 2", "test_focus", "focus2_clicked"), + ("Focus 3", "test_focus", "focus3_clicked"), + ("Focus 4", "test_focus", "focus4_clicked"), + ("Focus Custom", "test_focus", "focus5_clicked"), + ]), ("Geographic", [ ("Map", "test_map", "map_clicked"), - ("Map Overlay", "test_map2", "map_overlays_clicked"), - ("Map Route", "test_map3", "map_route_clicked"), ]), ("Images", [ ("Icon", "test_icon", "icon_clicked"), @@ -198,6 +207,8 @@ ]), ("Times & Dates", [ ("Calendar", "test_calendar", "calendar_clicked"), + ("Calendar 2", "test_calendar", "calendar2_clicked"), + ("Calendar 3", "test_calendar", "calendar3_clicked"), ("Clock", "test_clock", "clock_clicked"), ("Datetime", "test_datetime", "datetime_clicked"), ]), @@ -218,7 +229,7 @@ def selected_cb(o, mod, func): - exec("from {0} import {1}; {1}(o)".format(mod, func)) + exec("from {0} import {1}; {1}(o)".format(mod, func)) def menu_create(search, win): tbx.clear() @@ -247,13 +258,10 @@ frame.delete() def destroy(obj, str1, str2, str3, str4): - print("DEBUG: window destroy callback called!") - print(("DEBUG: str1='%s', str2='%s', str3='%s', str4='%s'" %(str1, str2, - str3, str4))) elementary.exit() def cb_mirroring(toggle): - elementary.Configuration().mirrored = toggle.state + elm_conf.mirrored = toggle.state def cb_filter(en, win): menu_create(en.text_get(), win) diff -Nru python-efl-1.17.99~201312040125/examples/elementary/test_calendar.py python-efl-1.8.2~201401231220/examples/elementary/test_calendar.py --- python-efl-1.17.99~201312040125/examples/elementary/test_calendar.py 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/examples/elementary/test_calendar.py 2014-01-18 12:24:01.000000000 +0000 @@ -11,15 +11,19 @@ ELM_CALENDAR_UNIQUE, ELM_CALENDAR_DAILY, ELM_CALENDAR_WEEKLY, \ ELM_CALENDAR_MONTHLY, ELM_CALENDAR_ANNUALLY, \ ELM_CALENDAR_SELECT_MODE_NONE, ELM_CALENDAR_SELECT_MODE_ONDEMAND +from efl.elementary.label import Label +from efl.elementary.frame import Frame +from efl.elementary.list import List +from efl.elementary.entry import Entry -from datetime import datetime +from datetime import datetime, timedelta EXPAND_BOTH = EVAS_HINT_EXPAND, EVAS_HINT_EXPAND FILL_BOTH = EVAS_HINT_FILL, EVAS_HINT_FILL api = { "state" : 0, # What state we are testing - "box" : None # box used in set_api_state + "cal" : None # box used in set_api_state } STATE_MARK_MONTHLY = 0 @@ -30,37 +34,32 @@ API_STATE_LAST = 5 def set_api_state(api): - items = api["box"].children - if not items: + cal = api["cal"] + if not cal: return m = None if api["state"] == STATE_MARK_MONTHLY: - cal = items[0] cal.min_max_year = (2010, 2011) the_time = datetime(2010, 12, 31) m = cal.mark_add("checked", the_time, ELM_CALENDAR_MONTHLY) cal.selected_time = the_time elif api["state"] == STATE_MARK_WEEKLY: - cal = items[0] the_time = datetime(2010, 12, 26) if m is not None: m.delete() m = cal.mark_add("checked", the_time, ELM_CALENDAR_WEEKLY) cal.selected_time = the_time elif api["state"] == STATE_SUNDAY_HIGHLIGHT: - cal = items[0] the_time = datetime(2010, 12, 25) # elm_calendar_mark_del(m) m = cal.mark_add("holiday", the_time, ELM_CALENDAR_WEEKLY) cal.selected_time = the_time elif api["state"] == STATE_SELECT_DATE_DISABLED_WITH_MARKS: - cal = items[0] the_time = datetime(2011, 1, 1) cal.select_mode = ELM_CALENDAR_SELECT_MODE_NONE cal.selected_time = the_time elif api["state"] == STATE_SELECT_DATE_DISABLED_NO_MARKS: - cal = items[0] the_time = datetime(2011, 2, 1) del cal.marks cal.select_mode = ELM_CALENDAR_SELECT_MODE_NONE @@ -79,204 +78,195 @@ bt.disabled = True # A simple test, just displaying calendar in it's default state -def calendar_clicked(obj): +def calendar_clicked(obj, item=None): win = StandardWindow("calendar", "Calendar", autodel=True) - if obj is None: - win.callback_delete_request_add(lambda x:elementary.exit()) - - bxx = Box(win, size_hint_weight=EXPAND_BOTH) - win.resize_object_add(bxx) - bxx.show() bx = Box(win, size_hint_weight=EXPAND_BOTH) - api["box"] = bx + win.resize_object_add(bx) bx.show() - bt = Button(win, text="Next API function") + bt = Button(bx, text="Next API function") bt.callback_clicked_add(api_bt_clicked, api) - bxx.pack_end(bt) + bx.pack_end(bt) if api["state"] == API_STATE_LAST: bt.disabled = True bt.show() - bxx.pack_end(bx) - the_time = datetime(2010, 12, 31) - cal = Calendar(win, first_day_of_week=ELM_DAY_MONDAY, + cal = Calendar(bx, first_day_of_week=ELM_DAY_MONDAY, size_hint_weight=EXPAND_BOTH, selected_time=the_time, min_max_year=(2010,2012)) + api["cal"] = cal bx.pack_end(cal) - cal.show() win.show() -""" -def print_cal_info(Evas_Object *cal, Evas_Object *en): - char info[1024] - double interval - int year_min, year_max - Eina_Bool sel_enabled - const char **wds - struct tm stm - - if (!elm_calendar_selected_time_get(cal, &stm)) - return - - interval = elm_calendar_interval_get(cal) - elm_calendar_min_max_year_get(cal, &year_min, &year_max) - sel_enabled = !!(elm_calendar_select_mode_get(cal) != ELM_CALENDAR_SELECT_MODE_NONE) - wds = elm_calendar_weekdays_names_get(cal) - - snprintf(info, sizeof(info), - " Day: %i, Mon: %i, Year %i, WeekDay: %i
" - " Interval: %0.2f, Year_Min: %i, Year_Max %i, Sel Enabled : %i
" - " Weekdays: %s, %s, %s, %s, %s, %s, %s
", - stm.tm_mday, stm.tm_mon, stm.tm_year + 1900, stm.tm_wday, - interval, year_min, year_max, sel_enabled, - wds[0], wds[1], wds[2], wds[3], wds[4], wds[5], wds[6]) - - elm_object_text_set(en, info) - -def _print_cal_info_cb(void *data, Evas_Object *obj, void *event_info): - _print_cal_info(obj, data) - -static char * -_format_month_year(struct tm *stm) - char buf[32] - if (!strftime(buf, sizeof(buf), "%b %y", stm)) return NULL - return strdup(buf) + +def print_cal_info(cal, en): + stm = cal.selected_time + if not stm: + return + + interval = cal.interval + year_min, year_max = cal.min_max_year + sel_enabled = True if cal.select_mode != ELM_CALENDAR_SELECT_MODE_NONE else False + wds = cal.weekdays_names + + info = ( + " Day: %i, Mon: %i, Year %i, WeekDay: %i
" + " Interval: %0.2f, Year_Min: %i, Year_Max %i, Sel Enabled : %s
" + " Weekdays: %s, %s, %s, %s, %s, %s, %s
" % ( + stm.day, stm.month, stm.year, stm.weekday(), + interval, year_min, year_max, sel_enabled, + wds[0], wds[1], wds[2], wds[3], wds[4], wds[5], wds[6] + ) + ) + + en.text = info + +def print_cal_info_cb(obj, data): + print_cal_info(obj, data) + +# def format_month_year(stm): +# return "%b %y" % stm # A test intended to cover all the calendar api and much use cases as possible -def test_calendar2(obj): - Evas_Object *win, *bx, *bxh, *cal, *cal2, *cal3, *en - Elm_Calendar_Mark *mark - struct tm selected_time - time_t current_time - const char *weekdays[] = +def calendar2_clicked(obj, item=None): + weekdays = [ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" - } + ] + + win = StandardWindow("calendar2", "Calendar 2", autodel=True) + + bx = Box(win, size_hint_weight=EXPAND_BOTH) + win.resize_object_add(bx) + bx.show() + + bxh = Box(bx, horizontal=True, size_hint_weight=EXPAND_BOTH, + size_hint_align=FILL_BOTH) + bxh.show() + bx.pack_end(bxh) + + # Wide cal + cal = Calendar(bx, size_hint_weight=EXPAND_BOTH, + size_hint_align=FILL_BOTH, weekdays_names=weekdays, + first_day_of_week=ELM_DAY_SATURDAY, interval=0.4, + min_max_year=(2010, 2020)) + cal.show() + bx.pack_end(cal) + + # Top left cal + cal2 = Calendar(bxh, size_hint_weight=EXPAND_BOTH, + size_hint_align=FILL_BOTH, select_mode=ELM_CALENDAR_SELECT_MODE_NONE) + cal2.show() + bxh.pack_end(cal2) + + # Top right cal + cal3 = Calendar(bxh, size_hint_weight=EXPAND_BOTH, + size_hint_align=FILL_BOTH) + + selected_time = datetime.now() + timedelta(34) + cal3.selected_time = selected_time + + selected_time = datetime.now() + timedelta(1) + cal3.mark_add("checked", selected_time, ELM_CALENDAR_UNIQUE) + + del(cal3.marks) + selected_time = datetime.now() + cal3.mark_add("checked", selected_time, ELM_CALENDAR_DAILY) + cal3.mark_add("holiday", selected_time, ELM_CALENDAR_DAILY) + cal3.marks_draw() + cal3.show() + bxh.pack_end(cal3) + + en = Entry(win, size_hint_weight=EXPAND_BOTH, size_hint_align=FILL_BOTH, + editable=False) + en.show() + bx.pack_end(en) + win.show() - win = elm_win_util_standard_add("calendar2", "Calendar 2") - elm_win_autodel_set(win, EINA_TRUE) + cal3.min_max_year = (-1, -1) - bx = elm_box_add(win) - evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND) - elm_win_resize_object_add(win, bx) - evas_object_show(bx) - - bxh = elm_box_add(win) - elm_box_horizontal_set(bxh, EINA_TRUE) - evas_object_size_hint_weight_set(bxh, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND) - evas_object_size_hint_align_set(bxh, EVAS_HINT_FILL, EVAS_HINT_FILL) - evas_object_show(bxh) - elm_box_pack_end(bx, bxh) - - cal = elm_calendar_add(win) - evas_object_size_hint_weight_set(cal, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND) - evas_object_size_hint_align_set(cal, EVAS_HINT_FILL, EVAS_HINT_FILL) - evas_object_show(cal) - elm_box_pack_end(bx, cal) - - cal2 = elm_calendar_add(win) - evas_object_size_hint_weight_set(cal2, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND) - evas_object_size_hint_align_set(cal2, EVAS_HINT_FILL, EVAS_HINT_FILL) - elm_calendar_select_mode_set(cal2, ELM_CALENDAR_SELECT_MODE_NONE) - evas_object_show(cal2) - elm_box_pack_end(bxh, cal2) - - cal3 = elm_calendar_add(win) - evas_object_size_hint_weight_set(cal3, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND) - evas_object_size_hint_align_set(cal3, EVAS_HINT_FILL, EVAS_HINT_FILL) - current_time = time(NULL) + 34 * 86400 - localtime_r(¤t_time, &selected_time) - elm_calendar_selected_time_set(cal3, &selected_time) - current_time = time(NULL) + 1 * 86400 - localtime_r(¤t_time, &selected_time) - elm_calendar_mark_add(cal3, "checked", &selected_time, ELM_CALENDAR_UNIQUE) - elm_calendar_marks_clear(cal3) - current_time = time(NULL) - localtime_r(¤t_time, &selected_time) - elm_calendar_mark_add(cal3, "checked", &selected_time, ELM_CALENDAR_DAILY) - elm_calendar_mark_add(cal3, "holiday", &selected_time, ELM_CALENDAR_DAILY) - elm_calendar_marks_draw(cal3) - evas_object_show(cal3) - elm_box_pack_end(bxh, cal3) - - en = elm_entry_add(win) - evas_object_size_hint_weight_set(en, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND) - evas_object_size_hint_align_set(en, EVAS_HINT_FILL, EVAS_HINT_FILL) - evas_object_show(en) - elm_box_pack_end(bx, en) - elm_entry_editable_set(en, EINA_FALSE) - evas_object_show(win) - - elm_calendar_min_max_year_set(cal3, -1, -1) - - elm_calendar_weekdays_names_set(cal, weekdays) - elm_calendar_first_day_of_week_set(cal, ELM_DAY_SATURDAY) - elm_calendar_interval_set(cal, 0.4) - elm_calendar_format_function_set(cal, _format_month_year) - elm_calendar_min_max_year_set(cal, 2010, 2020) - - current_time = time(NULL) + 4 * 86400 - localtime_r(¤t_time, &selected_time) - elm_calendar_mark_add(cal, "holiday", &selected_time, ELM_CALENDAR_ANNUALLY) - - current_time = time(NULL) + 1 * 86400 - localtime_r(¤t_time, &selected_time) - elm_calendar_mark_add(cal, "checked", &selected_time, ELM_CALENDAR_UNIQUE) - - current_time = time(NULL) - 363 * 86400 - localtime_r(¤t_time, &selected_time) - elm_calendar_mark_add(cal, "checked", &selected_time, ELM_CALENDAR_MONTHLY) - - current_time = time(NULL) - 5 * 86400 - localtime_r(¤t_time, &selected_time) - mark = elm_calendar_mark_add(cal, "holiday", &selected_time, - ELM_CALENDAR_WEEKLY) - - current_time = time(NULL) + 1 * 86400 - localtime_r(¤t_time, &selected_time) - elm_calendar_mark_add(cal, "holiday", &selected_time, ELM_CALENDAR_WEEKLY) - - elm_calendar_mark_del(mark) - elm_calendar_marks_draw(cal) - - _print_cal_info(cal, en) - evas_object_smart_callback_add(cal, "changed", _print_cal_info_cb, en) - -def test_calendar3(obj): - Evas_Object *win, *cal, *bxx - struct tm selected_time - time_t current_time - - win = elm_win_util_standard_add("calendar", "Calendar") - elm_win_autodel_set(win, EINA_TRUE) - - bxx = elm_box_add(win) - elm_win_resize_object_add(win, bxx) - evas_object_size_hint_weight_set(bxx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND) - evas_object_show(bxx) - - cal = elm_calendar_add(win) - elm_calendar_first_day_of_week_set(cal, ELM_DAY_THURSDAY) - elm_calendar_select_mode_set(cal, ELM_CALENDAR_SELECT_MODE_ONDEMAND) - current_time = time(NULL) + 34 * 86400 - localtime_r(¤t_time, &selected_time) - elm_calendar_selected_time_set(cal, &selected_time) - evas_object_size_hint_weight_set(cal, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND) - elm_box_pack_end(bxx, cal) + # TODO: cal.format_function_set(format_month_year) - evas_object_show(cal) + selected_time = datetime.now() + timedelta(4) + cal.mark_add("holiday", selected_time, ELM_CALENDAR_ANNUALLY) + + selected_time = datetime.now() + timedelta(1) + cal.mark_add("checked", selected_time, ELM_CALENDAR_UNIQUE) + + selected_time = datetime.now() - timedelta(363) + cal.mark_add("checked", selected_time, ELM_CALENDAR_MONTHLY) + + selected_time = datetime.now() - timedelta(5) + mark = cal.mark_add("holiday", selected_time, ELM_CALENDAR_WEEKLY) + + selected_time = datetime.now() + timedelta(1) + cal.mark_add("holiday", selected_time, ELM_CALENDAR_WEEKLY) + + mark.delete() + cal.marks_draw() + + print_cal_info(cal, en) + cal.callback_changed_add(print_cal_info_cb, en) + +def calendar3_clicked(obj, item=None): + win = StandardWindow("calendar", "Calendar", autodel=True) + + bxx = Box(win, size_hint_weight=EXPAND_BOTH) + win.resize_object_add(bxx) + bxx.show() + + selected_time = datetime.now() + timedelta(34) + + cal = Calendar(win, size_hint_weight=EXPAND_BOTH, + first_day_of_week=ELM_DAY_THURSDAY, + select_mode=ELM_CALENDAR_SELECT_MODE_ONDEMAND, + selected_time=selected_time) + + bxx.pack_end(cal) + + cal.show() + + win.show() - evas_object_show(win) -""" if __name__ == "__main__": elementary.init() + win = StandardWindow("test", "python-elementary test application", + size=(320,520)) + win.callback_delete_request_add(lambda o: elementary.exit()) + + box0 = Box(win, size_hint_weight=EXPAND_BOTH) + win.resize_object_add(box0) + box0.show() + + lb = Label(win) + lb.text_set("Please select a test from the list below
" + "by clicking the test button to show the
" + "test window.") + lb.show() + + fr = Frame(win, text="Information", content=lb) + box0.pack_end(fr) + fr.show() + + items = [ + ("Calendar", calendar_clicked), + ("Calendar 2", calendar2_clicked), + ("Calendar 3", calendar3_clicked) + ] + + li = List(win, size_hint_weight=EXPAND_BOTH, size_hint_align=FILL_BOTH) + box0.pack_end(li) + li.show() - calendar_clicked(None) + for item in items: + li.item_append(item[0], callback=item[1]) + li.go() + + win.show() elementary.run() elementary.shutdown() diff -Nru python-efl-1.17.99~201312040125/examples/elementary/test_clock.py python-efl-1.8.2~201401231220/examples/elementary/test_clock.py --- python-efl-1.17.99~201312040125/examples/elementary/test_clock.py 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/examples/elementary/test_clock.py 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,8 @@ from efl import elementary from efl.elementary.window import StandardWindow from efl.elementary.box import Box -from efl.elementary.clock import Clock +from efl.elementary.clock import Clock, ELM_CLOCK_EDIT_HOUR_DECIMAL, \ + ELM_CLOCK_EDIT_MIN_DECIMAL, ELM_CLOCK_EDIT_SEC_DECIMAL EXPAND_BOTH = EVAS_HINT_EXPAND, EVAS_HINT_EXPAND @@ -41,10 +42,13 @@ bx.pack_end(ck) ck.show() - ck = Clock(win, edit=True, show_seconds=True, edit_mode = \ - elementary.ELM_CLOCK_EDIT_HOUR_DECIMAL | \ - elementary.ELM_CLOCK_EDIT_MIN_DECIMAL | \ - elementary.ELM_CLOCK_EDIT_SEC_DECIMAL) + ck = Clock( + win, edit=True, show_seconds=True, edit_mode = ( + ELM_CLOCK_EDIT_HOUR_DECIMAL | + ELM_CLOCK_EDIT_MIN_DECIMAL | + ELM_CLOCK_EDIT_SEC_DECIMAL + ) + ) bx.pack_end(ck) ck.show() diff -Nru python-efl-1.17.99~201312040125/examples/elementary/test_config.py python-efl-1.8.2~201401231220/examples/elementary/test_config.py --- python-efl-1.17.99~201312040125/examples/elementary/test_config.py 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/examples/elementary/test_config.py 2014-01-18 12:24:01.000000000 +0000 @@ -55,24 +55,25 @@ lb = win.data["lb"] profile = win.profile + available_profiles = win.available_profiles + if available_profiles is not None: + available_profiles = ", ".join(available_profiles) lb.text = "Profile: {0}
Available profiles: {1}".format( profile, - ", ".join(win.available_profiles) + available_profiles ) -def bt_profile_set(obj, *args, **kwargs): - win = args[0] +def bt_profile_set(obj, win): ad = win.data["ad"] rd = ad.curr.rdg.selected_object profile = rd.text - if profile == "Nothing": + if profile != "Nothing": ad.win.profile = profile else: ad.win.profile = None - profile_update(ad.win) + profile_update(ad.win) -def bt_available_profiles_set(obj, *args, **kwargs): - win = args[0] +def bt_available_profiles_set(obj, win): ad = win.data["ad"] a_profs = [] @@ -88,20 +89,19 @@ ad.win.available_profiles = ad.curr.available_profiles profile_update(ad.win) -def bt_win_add(obj, *args, **kwargs): - win = args[0] +def bt_win_add(obj, win): ad = win.data["ad"] - rd = ad.new.rdg.selected + rd = ad.new.rdg.selected_object profile = rd.text - if profile == "Nothing": + if profile != "Nothing": ad.new.profile = profile - for o in ad.new.cks: + for i, o in enumerate(ad.new.cks): if o.state: profile = o.data["profile"] if profile: - ad.new.available_profiles[i] = profile + ad.new.available_profiles.insert(i, profile) config_clicked(None, ad.new) diff -Nru python-efl-1.17.99~201312040125/examples/elementary/test_core_evas_smart.py python-efl-1.8.2~201401231220/examples/elementary/test_core_evas_smart.py --- python-efl-1.17.99~201312040125/examples/elementary/test_core_evas_smart.py 1970-01-01 00:00:00.000000000 +0000 +++ python-efl-1.8.2~201401231220/examples/elementary/test_core_evas_smart.py 2014-01-18 12:24:01.000000000 +0000 @@ -0,0 +1,171 @@ +#!/usr/bin/env python +# encoding: utf-8 + +import os +from random import randint + +from efl.evas import SmartObject, EVAS_HINT_EXPAND, EVAS_HINT_FILL +from efl import elementary +from efl.elementary.window import StandardWindow +from efl.elementary.box import Box +from efl.elementary.button import Button + +EXPAND_BOTH = EVAS_HINT_EXPAND, EVAS_HINT_EXPAND +FILL_BOTH = EVAS_HINT_FILL, EVAS_HINT_FILL + +script_path = os.path.dirname(os.path.abspath(__file__)) +ic_file = os.path.join(script_path, "images", "logo.png") +objects = [] + + +def random_color(): + return (randint(0,255), randint(0,255), randint(0,255), 255) + +class MySmartObj(SmartObject): + def __init__(self, canvas): + SmartObject.__init__(self, canvas) + + # gray background + self.bg = self.Rectangle(color=(128,128,128,128)) + + # green dragbar to move the obj + self.dragpos = self.Rectangle(color=(0,128,0,128)) + self.dragpos.on_mouse_down_add(self.start_drag_move) + self.dragpos.on_mouse_up_add(self.stop_drag_move) + + # blue rect to resize the obj + self.dragsize = self.Rectangle(color=(0,0,128,128)) + self.dragsize.on_mouse_down_add(self.start_drag_resize) + self.dragsize.on_mouse_up_add(self.stop_drag_resize) + + # testing factories + self.obj_rect = self.Rectangle(size=(15,15), color=random_color()) + self.obj_rect.on_mouse_down_add(lambda o,e: self.hide()) + self.obj_line = self.Line(color=random_color()) + self.obj_image = self.FilledImage(file=ic_file, size=(20,20)) + self.obj_poly = self.Polygon(color=random_color()) + self.obj_text = self.Text(color=(0,0,0,255), font="Sans", + pass_events=True, text="Drag me") + + def resize(self, w, h): + print("RESIZE", w, h) + self.bg.size = w, h + self.obj_text.size = w, 15 + self.dragpos.size = w, 15 + self.dragsize.size = 15, 15 + self.dragsize.pos = self.bg.pos[0] + w - 15, self.bg.pos[1] + h - 15 + + def move(self, x, y): + print("MOVE", x, y) + self.bg.pos = x, y + self.obj_text.pos = x,y + self.dragpos.pos = x, y + self.dragsize.pos = x + self.bg.size[0] - 15, y + self.bg.size[1] - 15 + self.obj_rect.pos = x + 5, y + 20 + self.obj_line.geometry = x + 30, y + 20, 15, 15 + self.obj_image.pos = x + 30, y + 45 + + self.obj_poly.points_clear() + self.obj_poly.point_add(x + 5 + 0, y + 45 + 0) + self.obj_poly.point_add(x + 5 + 15, y + 45 + 15) + self.obj_poly.point_add(x + 5 + 0, y + 45 + 15) + + def delete(sef): + print("my delete") + + def show(self): + print("my show") + for o in self.members: + o.show() + + def hide(self): + print("my hide") + for o in self.members: + o.hide() + + def clip_set(self, o): + pass + + def clip_unset(self): + pass + + # dragpos (move obj) + def start_drag_move(self, obj, event): + self.on_mouse_move_add(self.mouse_move_cb) + + def stop_drag_move(self, obj, event): + self.on_mouse_move_del(self.mouse_move_cb) + + def mouse_move_cb(self, obj, event): + x, y = event.position.canvas + self.pos = x - self.bg.size[0] / 2, y + + # dragsize (resize obj) + def start_drag_resize(self, obj, event): + self.on_mouse_move_add(self.mouse_move_resize_cb) + + def stop_drag_resize(self, obj, event): + self.on_mouse_move_del(self.mouse_move_resize_cb) + + def mouse_move_resize_cb(self, obj, event): + x, y = event.position.canvas + self.size = x - self.bg.pos[0], y - self.bg.pos[1] + +def btn_add_cb(b): + sm = MySmartObj(b.evas) + sm.size = 100, 100 + sm.pos = 100, 100 + sm.show() + objects.append(sm) + +def btn_del_cb(b): + objects.pop().delete() + +def btn_hide_cb(b): + for o in objects: + o.hide() + +def btn_show_cb(b): + for o in objects: + o.show() + +def core_evas_smart_clicked(obj, item=None): + win = StandardWindow("evassmart", "Evas Smart Object Test", autodel=True) + if obj is None: + win.callback_delete_request_add(lambda o: elementary.exit()) + + box = Box(win, horizontal=True, + size_hint_weight=EXPAND_BOTH, size_hint_align=FILL_BOTH) + box.show() + win.resize_object_add(box) + + b = Button(win, text="Add one", size_hint_align=(0.0,0.0)) + b.callback_clicked_add(btn_add_cb) + box.pack_end(b) + b.show() + + b = Button(win, text="Del last", size_hint_align=(0.0,0.0)) + b.callback_clicked_add(btn_del_cb) + box.pack_end(b) + b.show() + + b = Button(win, text="Hide all", size_hint_align=(0.0,0.0)) + b.callback_clicked_add(btn_hide_cb) + box.pack_end(b) + b.show() + + b = Button(win, text="Show all", size_hint_align=(0.0,0.0)) + b.callback_clicked_add(btn_show_cb) + box.pack_end(b) + b.show() + + win.resize(320, 320) + win.show() + + +if __name__ == "__main__": + elementary.init() + core_evas_smart_clicked(None) + elementary.run() + elementary.shutdown() + diff -Nru python-efl-1.17.99~201312040125/examples/elementary/test_fileselector.py python-efl-1.8.2~201401231220/examples/elementary/test_fileselector.py --- python-efl-1.17.99~201312040125/examples/elementary/test_fileselector.py 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/examples/elementary/test_fileselector.py 2014-01-18 12:24:01.000000000 +0000 @@ -24,11 +24,11 @@ win.delete() def fs_cb_selected(fs, selected, win): - print(("Selected file:", selected)) - print((" or:", fs.selected_get())) + print("Selected file: " + selected) + print(" or:" + fs.selected_get()) def fs_cb_directory_open(fs, folder, win): - print(("Folder open:", folder)) + print("Folder open: " + folder) def ck_cb_is_save(bt, fs): print("Toggle is save") @@ -47,10 +47,10 @@ fs.buttons_ok_cancel = not fs.buttons_ok_cancel def bt_cb_sel_get(bt, fs): - print(("Get Selected:", fs.selected_get())) + print("Get Selected:" + fs.selected_get()) def bt_cb_path_get(bt, fs): - print(("Get Path:", fs.path_get())) + print("Get Path:" + fs.path_get()) def bt_cb_mode_cycle(bt, fs): mode = fs.mode + 1 diff -Nru python-efl-1.17.99~201312040125/examples/elementary/test_focus.py python-efl-1.8.2~201401231220/examples/elementary/test_focus.py --- python-efl-1.17.99~201312040125/examples/elementary/test_focus.py 1970-01-01 00:00:00.000000000 +0000 +++ python-efl-1.8.2~201401231220/examples/elementary/test_focus.py 2014-01-18 12:24:01.000000000 +0000 @@ -0,0 +1,596 @@ +#!/usr/bin/env python +# encoding: utf-8 + +import os + +from efl.evas import EVAS_HINT_EXPAND, EVAS_HINT_FILL +from efl import elementary +from efl import edje +from efl.elementary.window import StandardWindow +from efl.elementary.box import Box +from efl.elementary.bubble import Bubble +from efl.elementary.button import Button +from efl.elementary.label import Label +from efl.elementary.layout import Layout +from efl.elementary.list import List +from efl.elementary.frame import Frame +from efl.elementary.separator import Separator +from efl.elementary.scroller import Scroller +from efl.elementary.spinner import Spinner +from efl.elementary.check import Check +from efl.elementary.entry import Entry +from efl.elementary.table import Table +from efl.elementary.toolbar import Toolbar, ELM_TOOLBAR_SHRINK_MENU +from efl.elementary.object import ELM_FOCUS_DOWN, ELM_FOCUS_UP +from efl.elementary.configuration import Configuration +from efl.elementary.theme import theme_overlay_add + +EXPAND_BOTH = EVAS_HINT_EXPAND, EVAS_HINT_EXPAND +EXPAND_HORIZ = EVAS_HINT_EXPAND, 0.0 +FILL_BOTH = EVAS_HINT_FILL, EVAS_HINT_FILL +FILL_HORIZ = EVAS_HINT_FILL, 0.5 + +script_path = os.path.dirname(os.path.abspath(__file__)) +edj_file = os.path.join(script_path, "test.edj") +conf = Configuration() + +# Focus +def _tb_sel(tb, item): + print(item) + print(item.text) + +def focus_clicked(obj, item=None): + win = StandardWindow("focus", "Focus", autodel=True, size=(800,600)) + + win.focus_highlight_enabled = True + + tbx = Box(win, size_hint_weight=EXPAND_BOTH) + win.resize_object_add(tbx) + tbx.show() + + ### Toolbar + tbar = Toolbar(win, shrink_mode=ELM_TOOLBAR_SHRINK_MENU, + size_hint_align=(EVAS_HINT_FILL,0.0)) + + tb_it = tbar.item_append("document-print", "Hello", _tb_sel) + tb_it.disabled = True + tb_it = tbar.item_append("folder-new", "World", _tb_sel) + tb_it = tbar.item_append("object-rotate-right", "H", _tb_sel) + tb_it = tbar.item_append("mail-send", "Comes", _tb_sel) + tb_it = tbar.item_append("clock", "Elementary", _tb_sel) + + tb_it = tbar.item_append("refresh", "Menu", _tb_sel) + tb_it.menu = True + tbar.menu_parent = win + menu = tb_it.menu + + menu.item_add(None, "Shrink", "edit-cut", _tb_sel) + menu_it = menu.item_add(None, "Mode", "edit-copy", _tb_sel) + menu.item_add(menu_it, "is set to", "edit-paste", _tb_sel) + menu.item_add(menu_it, "or to", "edit-paste", _tb_sel) + menu.item_add(None, "Menu", "edit-delete", _tb_sel) + + tbx.pack_end(tbar) + tbar.show() + + + mainbx = Box(win, horizontal=True, size_hint_weight=EXPAND_BOTH) + tbx.pack_end(mainbx) + mainbx.show() + + ## First Col + bx = Box(win, size_hint_weight=EXPAND_BOTH) + mainbx.pack_end(bx) + bx.show() + + lb = Label(win, text="Use Tab or Shift+Tab
or Arrow keys
", + size_hint_align=FILL_BOTH) + bx.pack_end(lb) + lb.show() + + tg = Check(win, style="toggle") + tg.part_text_set("on", "Yes") + tg.part_text_set("off", "No") + bx.pack_end(tg) + tg.show() + + en = Entry(win, scrollable=True, single_line=True, text="This is a single line", + size_hint_weight=EXPAND_HORIZ, size_hint_align=FILL_HORIZ) + bx.pack_end(en) + en.show() + + # + bx2 = Box(win, horizontal=True, size_hint_align=FILL_BOTH) + bx.pack_end(bx2) + bx2.show() + + for i in range(2): + bt = Button(win, text="Box", size_hint_align=FILL_BOTH, disabled=(i % 2)) + bx2.pack_end(bt) + bt.show() + + sc = Scroller(win, bounce=(True,True), content_min_limit=(1,1), + size_hint_weight=EXPAND_BOTH, size_hint_align=FILL_BOTH) + bx2.pack_end(sc) + sc.show() + + bt = Button(win, text="Scroller", size_hint_align=FILL_BOTH) + sc.content = bt + bt.show() + + # + bt = Button(win, text="Box", size_hint_align=FILL_BOTH) + bx.pack_end(bt) + bt.show() + + # + bx2 = Box(win, horizontal=True, size_hint_align=FILL_BOTH) + bx.pack_end(bx2) + bx2.show() + + for i in range(2): + bx3 = Box(win, size_hint_align=FILL_BOTH) + bx2.pack_end(bx3) + bx3.show() + + for j in range(3): + bt = Button(win, text="Box", size_hint_align=FILL_BOTH) + bx3.pack_end(bt) + bt.show() + + + sc = Scroller(win, bounce=(False, True), content_min_limit=(1,0), + size_hint_align=FILL_BOTH, size_hint_weight=EXPAND_BOTH) + sc.content_min_limit=(1,1) + bx2.pack_end(sc) + sc.show() + + bx3 = Box(win, size_hint_align=FILL_BOTH) + sc.content = bx3 + bx3.show() + + for i in range(5): + bt = Button(win, text="BX Scroller", size_hint_align=FILL_BOTH) + bx3.pack_end(bt) + bt.show() + + + ## Second Col + ly = Layout(win, size_hint_weight=EXPAND_BOTH) + ly.file = edj_file, "twolines" + mainbx.pack_end(ly) + ly.show() + + bx2 = Box(win, horizontal=True, size_hint_align=FILL_BOTH) + ly.part_content_set("element1", bx2) + bx2.show() + + for i in range(3): + bt = Button(win, text="Layout", size_hint_align=FILL_BOTH) + bx2.pack_end(bt) + bt.show() + bx2.focus_custom_chain_prepend(bt) + + bx2 = Box(win, size_hint_align=FILL_BOTH) + ly.part_content_set("element2", bx2) + bx2.show() + + bt = Button(win, text="Disable", size_hint_align=FILL_BOTH) + bt.callback_clicked_add(lambda b: b.disabled_set(True)) + bx2.pack_end(bt) + bt.show() + bx2.focus_custom_chain_prepend(bt) + + bt2 = Button(win, text="Enable", size_hint_align=FILL_BOTH) + bt2.callback_clicked_add(lambda b, b1: b1.disabled_set(False), bt) + bx2.pack_end(bt2) + bt2.show() + bx2.focus_custom_chain_append(bt2) + + ## Third Col + bx = Box(win, size_hint_weight=EXPAND_BOTH) + mainbx.pack_end(bx) + bx.show() + + fr = Frame(win, text="Frame", ) + bx.pack_end(fr) + fr.show() + + tb = Table(win, size_hint_weight=EXPAND_BOTH) + fr.content = tb + tb.show() + + for j in range(1): + for i in range(2): + bt = Button(win, text="Table", size_hint_align=FILL_BOTH, size_hint_weight=EXPAND_BOTH) + tb.pack(bt, i, j, 1, 1) + bt.show() + + # + fr = Bubble(win, text="Bubble", size_hint_align=FILL_BOTH, size_hint_weight=EXPAND_BOTH) + bx.pack_end(fr) + fr.show() + + tb = Table(win, size_hint_weight=EXPAND_BOTH) + fr.content = tb + tb.show() + + for j in range(2): + for i in range(1): + bt = Button(win, text="Table", size_hint_align=FILL_BOTH, size_hint_weight=EXPAND_BOTH) + tb.pack(bt, i, j, 1, 1) + bt.show() + + + win.show() + + +# Focus 2 +def _focus_obj(bt, newfocus): + print newfocus + newfocus.focus = True + +def _focus_layout_part(bt, layout): + newfocus = layout.edje.part_object_get("sky") + print newfocus + newfocus.focus = True + + +def focus2_clicked(obj, item=None): + win = StandardWindow("focus2", "Focus 2", autodel=True, size=(400, 400)) + + win.focus_highlight_enabled = True + + bx = Box(win, size_hint_weight=EXPAND_BOTH) + win.resize_object_add(bx) + bx.show() + + PARENT = bx + + en = Entry(PARENT, scrollable=True, single_line=True, + text="Entry that should get focus", + size_hint_weight=EXPAND_HORIZ, size_hint_align=FILL_HORIZ) + bx.pack_end(en) + en.show() + + bt = Button(PARENT, text="Give focus to entry") + bt.callback_clicked_add(_focus_obj, en) + bx.pack_end(bt) + bt.show() + + ly = Layout(PARENT, size_hint_weight=EXPAND_BOTH) + ly.file = edj_file, "layout" + bx.pack_end(ly) + ly.show() + + bt1 = bt = Button(ly, text="Button 1") + ly.part_content_set("element1", bt) + + en1 = Entry(ly, scrollable=True, single_line=True, + text="Scrolled Entry that should get focus", + size_hint_weight=EXPAND_HORIZ, size_hint_align=FILL_HORIZ ) + ly.part_content_set("element2", en1) + + bt = Button(ly, text="Button 2") + ly.part_content_set("element3", bt) + + + bt = Button(PARENT, text="Give focus to layout", + size_hint_weight=EXPAND_HORIZ, size_hint_align=FILL_HORIZ) + bt.callback_clicked_add(_focus_obj, ly) + bx.pack_end(bt) + bt.show() + + bt = Button(PARENT, text="Give focus to layout part", + size_hint_weight=EXPAND_HORIZ, size_hint_align=FILL_HORIZ) + bt.callback_clicked_add(_focus_layout_part, ly) + bx.pack_end(bt) + bt.show() + + bt = Button(PARENT, text="Give focus to layout 'Button 1'", + size_hint_weight=EXPAND_HORIZ, size_hint_align=FILL_HORIZ) + bt.callback_clicked_add(_focus_obj, bt1) + bx.pack_end(bt) + bt.show() + + bt = Button(PARENT, text="Give focus to layout 'Entry'", + size_hint_weight=EXPAND_HORIZ, size_hint_align=FILL_HORIZ) + bt.callback_clicked_add(_focus_obj, en1) + bx.pack_end(bt) + bt.show() + + bt.focus_next_object_set(en, ELM_FOCUS_DOWN) + en.focus_next_object_set(bt, ELM_FOCUS_UP) + win.show() + + +# Focus 3 +focused = None +def _focused_cb(obj): + global focused + print obj + focused = obj + +def _unfocused_cb(obj): + global focused + print obj + focused = None + +def _add_cb(bt, win, bx): + en = Entry(win, scrollable=True, single_line=True, text="An entry", + size_hint_weight=EXPAND_HORIZ, size_hint_align=FILL_HORIZ) + en.callback_focused_add(_focused_cb) + en.callback_unfocused_add(_unfocused_cb) + bx.pack_start(en) + en.show() + +def _del_cb(bt, bx): + if focused: + focused.delete() + +def _hide_cb(bt): + if focused: + focused.hide() + +def focus3_clicked(obj, item=None): + win = StandardWindow("focus3", "Focus 3", autodel=True, size=(320, 480)) + + win.focus_highlight_enabled = True + + bx = Box(win, size_hint_weight=EXPAND_BOTH) + win.resize_object_add(bx) + bx.show() + + en = Entry(win, scrollable=True, single_line=True, text="An entry", + size_hint_weight=EXPAND_HORIZ, size_hint_align=FILL_HORIZ) + en.callback_focused_add(_focused_cb) + en.callback_unfocused_add(_unfocused_cb) + bx.pack_end(en) + en.show() + + bt = Button(win, text="Add", focus_allow=False, + size_hint_weight=EXPAND_HORIZ, size_hint_align=FILL_HORIZ) + bt.callback_clicked_add(_add_cb, win, bx) + bx.pack_end(bt) + bt.show() + + bt = Button(win, text="Del", focus_allow=False, + size_hint_weight=EXPAND_HORIZ, size_hint_align=FILL_HORIZ) + bt.callback_clicked_add(_del_cb, bx) + bx.pack_end(bt) + bt.show() + + bt = Button(win, text="hide", focus_allow=False, + size_hint_weight=EXPAND_HORIZ, size_hint_align=FILL_HORIZ) + bt.callback_clicked_add(_hide_cb) + bx.pack_end(bt) + bt.show() + + win.show() + + +# Focus 4 +def _highlight_enabled_cb(chk, win): + conf.focus_highlight_enabled = chk.state + +def _highlight_animate_cb(chk, win): + conf.focus_highlight_animate = chk.state + +def _win_highlight_enabled_cb(chk, win): + win.focus_highlight_enabled = chk.state + +def _win_highlight_animate_cb(chk, win): + win.focus_highlight_animate = chk.state + +def _custom_chain_cb(chk, bx): + print chk.state + if chk.state is True: + i = 0 + custom_chain = [] + for child in bx.children: + print child + if i == 0: + c = child + custom_chain.append(child) + bx.focus_custom_chain_set(custom_chain) + elif i == 1: + bx.focus_custom_chain_prepend(child, c) + elif i == 2: + bx.focus_custom_chain_append(child, c) + c = child + elif i == 3: + bx.focus_custom_chain_prepend(child, c); + i += 1 + + else: + bx.focus_custom_chain_unset() + +def focus4_clicked(obj, item=None): + win = StandardWindow("focus4", "Focus 4", autodel=True, size=(320, 320)) + + win.focus_highlight_enabled = True + win.focus_highlight_animate = True + + fr = Frame(win, style="pad_large", + size_hint_weight=EXPAND_BOTH); + win.resize_object_add(fr) + fr.show() + + # First Example - Using Focus Highlight + bx = Box(fr) + fr.content = bx + bx.show() + + tg = Check(bx, text="Focus Highlight Enabled (Config)", state=True, + size_hint_weight=EXPAND_HORIZ, size_hint_align=FILL_BOTH) + tg.callback_changed_add(_highlight_enabled_cb, win) + + bx.pack_end(tg) + tg.show() + + tg = Check(bx, text="Focus Highlight Animate (Config)", state=True, + size_hint_weight=EXPAND_HORIZ, size_hint_align=FILL_BOTH) + tg.callback_changed_add(_highlight_animate_cb, win) + bx.pack_end(tg) + tg.show() + + tg = Check(bx, text="Focus Highlight Enabled (Win)", state=True, + size_hint_weight=EXPAND_HORIZ, size_hint_align=FILL_BOTH) + tg.callback_changed_add(_win_highlight_enabled_cb, win) + bx.pack_end(tg) + tg.show() + + tg = Check(bx, text="Focus Highlight Animate (Win)", state=True, + size_hint_weight=EXPAND_HORIZ, size_hint_align=FILL_BOTH) + tg.callback_changed_add(_win_highlight_animate_cb, win) + bx.pack_end(tg) + tg.show() + + sp = Separator(win, horizontal=True, + size_hint_weight=EXPAND_HORIZ, size_hint_align=FILL_BOTH) + bx.pack_end(sp) + sp.show() + + # Second Example - Using Custom Chain + lb = Label(bx, text="Custom Chain: Please use tab key to check", + size_hint_weight=EXPAND_HORIZ, size_hint_align=FILL_BOTH) + bx.pack_end(lb) + lb.show() + + bx2 = Box(bx, horizontal=True, + size_hint_weight=EXPAND_BOTH, size_hint_align=FILL_BOTH) + bx.pack_end(bx2) + bx2.show() + + bt1 = Button(bx2, text="Button 1", + size_hint_weight=EXPAND_BOTH, size_hint_align=FILL_BOTH) + bx2.pack_end(bt1) + bt1.show() + + bt2 = Button(bx2, text="Button 2", + size_hint_weight=EXPAND_BOTH, size_hint_align=FILL_BOTH) + bx2.pack_end(bt2) + bt2.show() + + bt3 = Button(bx2, text="Button 3", + size_hint_weight=EXPAND_BOTH, size_hint_align=FILL_BOTH) + bx2.pack_end(bt3) + bt3.show() + + bt4 = Button(bx2, text="Button 4", + size_hint_weight=EXPAND_BOTH, size_hint_align=FILL_BOTH) + bx2.pack_end(bt4) + bt4.show() + + bx2.focus_custom_chain = [bt2, bt1, bt4, bt3] + + tg = Check(bx, text="Custom Chain", state=False, + size_hint_weight=EXPAND_HORIZ, size_hint_align=FILL_BOTH) + tg.callback_changed_add(_custom_chain_cb, bx) + bx.pack_end(tg) + tg.show() + + + win.show() + + +# Focus 5 (custom) +def _glow_effect_on_cb(btn, win, chk): + if chk.state: + win.focus_highlight_style = "glow_effect" + +def _glow_effect_off_cb(btn, win, chk): + if chk.state: + win.focus_highlight_style = "glow" + +def focus5_clicked(obj, item=None): + + theme_overlay_add(os.path.join(script_path, "test_focus_custom.edj")) + + win = StandardWindow("focus5", "Focus Custom", autodel=True, size=(320, 320)) + win.focus_highlight_enabled = True + win.focus_highlight_animate = True + win.focus_highlight_style = "glow" + + fr = Frame(win, style="pad_large", + size_hint_weight=EXPAND_BOTH); + win.resize_object_add(fr) + fr.show() + + bx = Box(fr) + fr.content = bx + bx.show() + + chk = Check(bx, text='Enable glow effect on "Glow" Button', state=True, + size_hint_weight=EXPAND_HORIZ, size_hint_align=FILL_BOTH) + bx.pack_end(chk) + chk.show() + + spinner = Spinner(bx, size_hint_weight=EXPAND_HORIZ, size_hint_align=FILL_BOTH) + bx.pack_end(spinner) + spinner.show() + + bt = Button(bx, text="Glow Button", + size_hint_weight=EXPAND_HORIZ, size_hint_align=FILL_BOTH) + bt.callback_focused_add(_glow_effect_on_cb, win, chk) + bt.callback_unfocused_add(_glow_effect_off_cb, win, chk) + bx.pack_end(bt) + bt.show() + + sp = Separator(bx, horizontal=True, + size_hint_weight=EXPAND_HORIZ, size_hint_align=FILL_BOTH) + bx.pack_end(sp) + sp.show() + + bx2 = Box(bx, horizontal=True, + size_hint_weight=EXPAND_BOTH, size_hint_align=FILL_BOTH) + bx.pack_end(bx2) + bx2.show() + + for i in range (1, 5): + bt = Button(bx2, text="Button %d" % i, + size_hint_weight=EXPAND_BOTH, size_hint_align=FILL_BOTH) + bx2.pack_end(bt) + bt.show() + + win.show() + + +if __name__ == "__main__": + elementary.init() + win = StandardWindow("test", "python-elementary test application", + size=(320,520)) + win.callback_delete_request_add(lambda o: elementary.exit()) + + box0 = Box(win, size_hint_weight=EXPAND_BOTH) + win.resize_object_add(box0) + box0.show() + + lb = Label(win) + lb.text_set("Please select a test from the list below
" + "by clicking the test button to show the
" + "test window.") + lb.show() + + fr = Frame(win, text="Information", content=lb) + box0.pack_end(fr) + fr.show() + + items = [("Focus", focus_clicked), + ("Focus 2", focus2_clicked), + ("Focus 3", focus3_clicked), + ("Focus 4", focus4_clicked), + ("Focus Custom", focus5_clicked)] + + li = List(win, size_hint_weight=EXPAND_BOTH, size_hint_align=FILL_BOTH) + box0.pack_end(li) + li.show() + + for item in items: + li.item_append(item[0], callback=item[1]) + + li.go() + + win.show() + elementary.run() + elementary.shutdown() diff -Nru python-efl-1.17.99~201312040125/examples/elementary/test_focus_custom.edc python-efl-1.8.2~201401231220/examples/elementary/test_focus_custom.edc --- python-efl-1.17.99~201312040125/examples/elementary/test_focus_custom.edc 1970-01-01 00:00:00.000000000 +0000 +++ python-efl-1.8.2~201401231220/examples/elementary/test_focus_custom.edc 2014-01-18 12:24:01.000000000 +0000 @@ -0,0 +1,389 @@ +// c1 - c4 +// |base| +// | | +// c3 - c2 +#define OUTER_BASE_PARTS(w, h) \ + part { name: "base"; type: SPACER; \ + description { \ + state: "default" 0.0; } } \ + part { name: "c1"; type: SPACER; \ + description { state: "default" 0.0; \ + rel1.to: "base"; \ + rel2.to: "base"; \ + rel2.relative: 0 0; \ + align: 1 1; \ + min: w h; \ + max: w h; } } \ + part { name: "c3"; type: SPACER; \ + description { state: "default" 0.0; \ + rel1.to: "base"; \ + rel2.to: "base"; \ + rel1.relative: 0 1; \ + rel2.relative: 0 1; \ + align: 1 0; \ + min: w h; \ + max: w h; } } \ + part { name: "c4"; type: SPACER; \ + description { state: "default" 0.0; \ + rel1.to: "base"; \ + rel2.to: "base"; \ + rel1.relative: 1 0; \ + rel2.relative: 1 0; \ + min: w h; \ + max: w h; } } \ + part { name: "c2"; type: SPACER; \ + mouse_events: 0; \ + description { state: "default" 0.0; \ + rel1.to: "base"; \ + rel1.relative: 1 1; \ + rel2.to: "base"; \ + rel2.relative: 1 1; \ + align: 0 0; \ + min: w h; \ + max: w h; } } + +collections { + group { name: "elm/focus_highlight/top/glow"; + images { + image: "border6.png" COMP; + } + data.item: "animate" "on"; + + script { + public src_x, src_y, src_w, src_h; + public diffx, diffy, diffw, diffh; + public anim_highlight(val, Float:pos) { + new x, y, w, h, dx, dy, dw, dh; + + dx = round(float_mul(float(get_int(diffx)), pos)); + x = get_int(src_x) + dx; + dy = round(float_mul(float(get_int(diffy)), pos)); + y = get_int(src_y) + dy; + dw = round(float_mul(float(get_int(diffw)), pos)); + w = get_int(src_w) + dw; + dh = round(float_mul(float(get_int(diffh)), pos)); + h = get_int(src_h) + dh; + + update_offset(x, y, w, h); + + if(pos >= 1.0) { + emit("elm,action,focus,anim,end", ""); + set_state(PART:"highlight", "default", 0.0); + } + } + public update_offset(x, y, w, h) { + set_state_val(PART:"base", STATE_REL1_OFFSET, x, y); + set_state_val(PART:"base", STATE_REL2_OFFSET, x + w, y + h); + } + public message(Msg_Type:type, id, ...) { + if((type == MSG_INT_SET) && (id == 1)) { + new x1, y1, w1, h1, x2, y2, w2, h2; + + x1 = getarg(2); + y1 = getarg(3); + w1 = getarg(4); + h1 = getarg(5); + x2 = getarg(6); + y2 = getarg(7); + w2 = getarg(8); + h2 = getarg(9); + + set_int(src_x, x1); + set_int(src_y, y1); + set_int(src_w, w1); + set_int(src_h, h1); + set_int(diffx, x2 - x1); + set_int(diffy, y2 - y1); + set_int(diffw, w2 - w1); + set_int(diffh, h2 - h1); + + custom_state(PART:"base", "default", 0.0); + set_state_val(PART:"base", STATE_REL1, 0.0, 0.0); + set_state_val(PART:"base", STATE_REL2, 0.0, 0.0); + update_offset(x1, y1, w1, h1); + set_state(PART:"base", "custom", 0.0); + anim(0.2, "anim_highlight", 0); + } + } + } //script ends + parts { + OUTER_BASE_PARTS(12, 12); + part { name: "highlight"; type: IMAGE; + mouse_events: 0; + description { state: "default" 0.0; + image.normal: "border6.png"; + image.border: 20 20 20 20; + rel1.to: "c1"; + rel2.to: "c2"; + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + } + description { state: "invisible" 0.0; + inherit: "default" 0.0; + visible: 0; + } + } + } //parts ends + programs { + program { name: "show"; + signal: "elm,action,focus,show"; + source: "elm"; + action: ACTION_STOP; + target: "hide"; + target: "hide_start"; + target: "hide_end"; + after: "show_start"; + } + program { name: "show_start"; + action: STATE_SET "visible" 0.0; + transition: SIN 0.2; + target: "highlight"; + after: "show_end"; + } + program { name: "show_end"; + action: SIGNAL_EMIT "elm,action,focus,show,end" ""; + } + program { name: "hide"; + signal: "elm,action,focus,hide"; + source: "elm"; + action: ACTION_STOP; + target: "show"; + target: "show_start"; + target: "show_end"; + after: "hide_start"; + } + program { name: "hide_start"; + action: STATE_SET "invisible" 0.0; + transition: SIN 0.2; + target: "highlight"; + after: "hide_end"; + } + program { name: "hide_end"; + action: SIGNAL_EMIT "elm,action,focus,hide,end" ""; + } + } //programs ends + } //group ends + + group { name: "elm/focus_highlight/top/glow_effect"; + inherit: "elm/focus_highlight/top/glow"; + images { + image: "border.png" COMP; + image: "border2.png" COMP; + image: "border3.png" COMP; + image: "border4.png" COMP; + image: "border5.png" COMP; + image: "border6.png" COMP; + } + data.item: "animate" "on"; + + script { + public src_x, src_y, src_w, src_h; + public diffx, diffy, diffw, diffh; + public anim_highlight(val, Float:pos) { + new x, y, w, h, dx, dy, dw, dh, Float:p; + p = 1.0 - ((1.0 - pos) * (1.0 - pos) * (1.0 - pos)); + + dx = round(float_mul(float(get_int(diffx)), p)); + x = get_int(src_x) + dx; + dy = round(float_mul(float(get_int(diffy)), p)); + y = get_int(src_y) + dy; + dw = round(float_mul(float(get_int(diffw)), p)); + w = get_int(src_w) + dw; + dh = round(float_mul(float(get_int(diffh)), p)); + h = get_int(src_h) + dh; + + update_offset(x, y, w, h); + + if(pos >= 1.0) { + emit("elm,action,focus,anim,end", ""); + set_state(PART:"highlight", "default", 0.0); + emit("dim", ""); + } + } + public update_offset(x, y, w, h) { + set_state_val(PART:"base", STATE_REL1_OFFSET, x, y); + set_state_val(PART:"base", STATE_REL2_OFFSET, x + w, y + h); + } + public message(Msg_Type:type, id, ...) { + if((type == MSG_INT_SET) && (id == 1)) { + new x1, y1, w1, h1, x2, y2, w2, h2; + + x1 = getarg(2); + y1 = getarg(3); + w1 = getarg(4); + h1 = getarg(5); + x2 = getarg(6); + y2 = getarg(7); + w2 = getarg(8); + h2 = getarg(9); + + set_int(src_x, x1); + set_int(src_y, y1); + set_int(src_w, w1); + set_int(src_h, h1); + set_int(diffx, x2 - x1); + set_int(diffy, y2 - y1); + set_int(diffw, w2 - w1); + set_int(diffh, h2 - h1); + + custom_state(PART:"base", "default", 0.0); + set_state_val(PART:"base", STATE_REL1, 0.0, 0.0); + set_state_val(PART:"base", STATE_REL2, 0.0, 0.0); + update_offset(x1, y1, w1, h1); + set_state(PART:"base", "custom", 0.0); + anim(0.2, "anim_highlight", 0); + } + } + } //script ends + parts { + part { name: "highlight"; type: IMAGE; + mouse_events: 0; + description { state: "default" 0.0; + image.normal: "border6.png"; + image.border: 16 16 16 16; + rel1.to: "c1"; + rel2.to: "c2"; + visible: 1; + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + } + description { state: "visible" 0.1; + inherit: "visible" 0.0; + image.normal: "border2.png"; + image.border: 18 18 18 18; + } + description { state: "visible" 0.2; + inherit: "visible" 0.0; + image.normal: "border3.png"; + image.border: 19 19 19 19; + } + description { state: "visible" 0.3; + inherit: "visible" 0.0; + image.normal: "border4.png"; + image.border: 20 20 20 20; + } + description { state: "visible" 0.4; + inherit: "visible" 0.0; + image.normal: "border5.png"; + image.border: 21 21 21 21; + } + description { state: "visible" 0.5; + inherit: "visible" 0.0; + image.normal: "border6.png"; + image.border: 25 25 25 25; + } + description { state: "invisible" 0.0; + inherit: "default" 0.0; + visible: 0; + } + } + }//parts ends + programs { + program { name: "show"; + signal: "elm,action,focus,show"; + source: "elm"; + action: ACTION_STOP; + target: "hide"; + target: "hide_start"; + target: "hide_end"; + after: "show_start"; + } + program { name: "show_start"; + action: SIGNAL_EMIT "dim" ""; + after: "show_end"; + } + program { name: "dim_start"; + signal: "dim"; + in: 2 0.4; + source: ""; + action: STATE_SET "visible" 0.4; + transition: SINUSOIDAL 0.2; + target: "highlight"; + after: "dim1"; + } + program { name: "dim1"; + action: STATE_SET "visible" 0.3; + transition: SINUSOIDAL 0.2; + target: "highlight"; + after: "dim2"; + } + program { name: "dim2"; + action: STATE_SET "visible" 0.2; + transition: SINUSOIDAL 0.2; + target: "highlight"; + after: "dim3"; + } + program { name: "dim3"; + action: STATE_SET "visible" 0.1; + transition: SINUSOIDAL 0.2; + target: "highlight"; + after: "dim_end"; + } + program { name: "dim_end"; + action: SIGNAL_EMIT "glow" ""; + } + program { name: "glow_start"; + signal: "glow"; + source: ""; + in: 1 0.4; + action: STATE_SET "visible" 0.0; + transition: SINUSOIDAL 0.2; + target: "highlight"; + after: "glow1"; + } + program { name: "glow1"; + action: STATE_SET "visible" 0.1; + transition: SINUSOIDAL 0.2; + target: "highlight"; + after: "glow2"; + } + program { name: "glow2"; + action: STATE_SET "visible" 0.2; + transition: SINUSOIDAL 0.2; + target: "highlight"; + after: "glow3"; + } + program { name: "glow3"; + action: STATE_SET "visible" 0.3; + transition: SINUSOIDAL 0.2; + target: "highlight"; + after: "glow4"; + } + program { name: "glow4"; + action: STATE_SET "visible" 0.4; + transition: SINUSOIDAL 0.2; + target: "highlight"; + after: "glow5"; + } + program { name: "glow5"; + action: STATE_SET "visible" 0.5; + transition: SINUSOIDAL 0.2; + target: "highlight"; + after: "glow1"; + } + program { name: "show_end"; + action: SIGNAL_EMIT "elm,action,focus,show,end" ""; + } + program { name: "hide"; + signal: "elm,action,focus,hide"; + source: "elm"; + action: ACTION_STOP; + target: "show"; + target: "show_start"; + target: "show_end"; + after: "hide_start"; + } + program { name: "hide_start"; + action: STATE_SET "invisible" 0.0; + transition: LIN 0.2; + target: "highlight"; + after: "hide_end"; + } + program { name: "hide_end"; + action: SIGNAL_EMIT "elm,action,focus,hide,end" ""; + } + } //programs ends + } //group ends +} Binary files /tmp/xZsG_rDF9U/python-efl-1.17.99~201312040125/examples/elementary/test_focus_custom.edj and /tmp/miB49i9k7M/python-efl-1.8.2~201401231220/examples/elementary/test_focus_custom.edj differ diff -Nru python-efl-1.17.99~201312040125/examples/elementary/test_map.py python-efl-1.8.2~201401231220/examples/elementary/test_map.py --- python-efl-1.17.99~201312040125/examples/elementary/test_map.py 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/examples/elementary/test_map.py 2014-01-18 12:24:01.000000000 +0000 @@ -1,14 +1,24 @@ #!/usr/bin/env python # encoding: utf-8 -from efl.evas import EVAS_HINT_EXPAND, EVAS_HINT_FILL +import os +from random import randint + +from efl.evas import EVAS_HINT_EXPAND, EVAS_HINT_FILL, EVAS_CALLBACK_MOUSE_DOWN from efl import elementary from efl.elementary.window import StandardWindow from efl.elementary.box import Box from efl.elementary.button import Button from efl.elementary.check import Check +from efl.elementary.entry import Entry from efl.elementary.hoversel import Hoversel -from efl.elementary.map import Map, ELM_MAP_SOURCE_TYPE_TILE +from efl.elementary.icon import Icon +from efl.elementary.label import Label +from efl.elementary.separator import Separator +from efl.elementary.map import Map, MapOverlayClass, ELM_MAP_OVERLAY_TYPE_CLASS, \ + ELM_MAP_SOURCE_TYPE_TILE, ELM_MAP_ROUTE_TYPE_MOTOCAR, ELM_MAP_ROUTE_METHOD_FASTEST, \ + ELM_MAP_SOURCE_TYPE_ROUTE, ELM_MAP_SOURCE_TYPE_NAME +from efl.elementary.menu import Menu from efl.elementary.slider import Slider EXPAND_BOTH = EVAS_HINT_EXPAND, EVAS_HINT_EXPAND @@ -18,6 +28,12 @@ elementary.need_efreet() +script_path = os.path.dirname(os.path.abspath(__file__)) +img_path = os.path.join(script_path, "images") + +route_start_point = None +route_end_point = None + def print_map_info(Map): print("---Map info---") # print("user_agent: %s" % (Map.user_agent)) @@ -36,11 +52,11 @@ Map.zoom += zoom print_map_info(Map) -def cb_btn_show(bt, Map, lon, lat): +def cb_menu_show(menu, item, Map, lon, lat): Map.region_show(lon, lat) print_map_info(Map) -def cb_btn_bringin(bt, Map, lon, lat): +def cb_menu_bringin(menu, item, Map, lon, lat): Map.region_bring_in(lon, lat) print_map_info(Map) @@ -49,31 +65,256 @@ Map.rotate_set(sl.value, cx, cy) print("New rotate: %f %d %d" % Map.rotate) -def cb_hovsel_selected(hov, item, Map, src_type): +def cb_hovsel_selected(hov, item, Map, src_type, name): Map.source_set(src_type, item.text) - hov.text = "Tiles: %s" % (item.text) + hov.text = "%s: %s" % (name, item.text) + +def cb_chk_overlays_hidden(ck, Map): + for ov in Map.overlays: + ov.hide = ck.state + +def cb_chk_overlays_paused(ck, m): + for ov in m.overlays: + ov.paused = ck.state + + +def cb_menu_overlay_normal(menu, item, Map, lon, lat): + ov = Map.overlay_add(lon, lat) + ov.callback_clicked_set(lambda m,o: o.delete()) + +def cb_menu_overlay_icon(menu, item, Map, lon, lat): + ov = Map.overlay_add(lon, lat) + ov.icon = Icon(Map, file=os.path.join(img_path, "logo.png")) + +def cb_menu_overlay_custom(menu, item, Map, lon, lat): + ov = Map.overlay_add(lon, lat) + cont = Icon(Map, file=os.path.join(img_path, "sky_01.jpg")) + cont.size_hint_min = 50, 50 + ov.content = cont + +def cb_menu_overlay_random_color(menu, item, Map, lon, lat): + ov = Map.overlay_add(lon, lat) + ov.color = (randint(0, 255), randint(0, 255), randint(0, 255), 255) + ov.callback_clicked_set(lambda m,o: o.delete()) + +def cb_menu_overlay_min_zoom(menu, item, Map, lon, lat): + ov = Map.overlay_add(lon, lat) + ov.displayed_zoom_min = 4 + ov.callback_clicked_set(lambda m,o: o.delete()) + +def cb_menu_overlay_grouped(menu, item, Map, lon, lat): + cls = Map.overlay_class_add() + for x in range(4): + for y in range(4): + ov = Map.overlay_add(lon + x, lat + y) + ov.callback_clicked_set(lambda m,o: o.delete()) + cls.append(ov) + +def cb_menu_overlay_bubble(menu, item, Map, lon, lat): + ov = Map.overlay_add(lon, lat) + bub = Map.overlay_bubble_add() + bub.follow(ov) + + lb = Label(Map, text="You can push contents here") + bub.content_append(lb) + lb.show() + + ic = Icon(Map, file=os.path.join(img_path, "sky_01.jpg")) + ic.size_hint_min = 50, 50 + bub.content_append(ic) + ic.show() + + bt = Button(Map, text="clear me") + bt.callback_clicked_add(lambda bt:bub.content_clear()) + bub.content_append(bt) + bt.show() + +def cb_menu_overlay_line(menu, item, Map, lon, lat): + line = Map.overlay_line_add(lon, lat, lon + 1, lat + 1) + +def cb_menu_overlay_poly(menu, item, Map, lon, lat): + poly = Map.overlay_polygon_add() + poly.region_add(lon, lat) + poly.region_add(lon + 1, lat + 1) + poly.region_add(lon + 1, lat - 1) + poly.region_add(lon - 1, lat) + +def cb_menu_overlay_circle(menu, item, Map, lon, lat): + cir = Map.overlay_circle_add(lon, lat, 10) + +def cb_menu_overlay_scale(menu, item, Map, x, y): + Map.overlay_scale_add(x, y) + +def cb_menu_overlays_clear(menu, item, Map): + for ov in Map.overlays: + if ov.type != ELM_MAP_OVERLAY_TYPE_CLASS: + ov.delete() + +def cb_menu_overlays_show(menu, item, Map): + l = [ov for ov in Map.overlays if not isinstance(ov, MapOverlayClass)] + Map.overlays_show(l) # TODO FIXME + +def cb_menu_overlays_ungroup(menu, item, Map): + for ov in Map.overlays: + print("DEL1: " + str(ov)) + if isinstance(ov, MapOverlayClass): + # TODO ungroup instead + print ("****") + for ov2 in ov.members: + print("DEL2: " + str(ov2)) + ov2.delete() # TODO FIXME + +def cb_menu_route_start(menu, item, Map, lon, lat): + global route_start_point + route_start_point = Map.overlay_add(lon, lat) + route_start_point.color = (255, 0, 0, 255) + +def cb_menu_route_end(menu, item, Map, lon, lat): + global route_end_point + route_end_point = Map.overlay_add(lon, lat) + route_end_point.color = (0, 0, 255, 255) + +def cb_btn_calc_route(btn, Map): + lb = Map.data["lb_distance"] + if not (route_start_point and route_end_point): + lb.text = "You must first place Start and End point" + return + (flon, flat) = route_start_point.region + (tlon, tlat) = route_end_point.region + Map.route_add(ELM_MAP_ROUTE_TYPE_MOTOCAR, + ELM_MAP_ROUTE_METHOD_FASTEST, + flon, flat, tlon, tlat, cb_route_done) + + lb = Map.data["lb_distance"] + lb.text = "requesting route..." + +def cb_route_done(Map, route): + nodes = route.node.count('\n') + lb = Map.data["lb_distance"] + lb.text = "distance: %.2f Km nodes:%d" % (route.distance, nodes) + + ov = Map.overlay_route_add(route) + + print("Nodes:\n %s" % (route.node)) + print("Waypoints:\n %s" % (route.waypoint)) + +def cb_map_mouse_down(Map, evtinfo): + (x,y) = evtinfo.position.canvas + (lon, lat) = Map.canvas_to_region_convert(x, y) + if evtinfo.button == 3: + m = Menu(Map) + mi = m.item_add(None, "Lat: %f" % lat) + mi.disabled = True + mi = m.item_add(None, "Lon: %f" % lon) + mi.disabled = True + + mi = m.item_add(None, "Move") + m.item_add(mi, "Show Sydney", None, cb_menu_show, Map, 151.175274, -33.859126) + m.item_add(mi, "Show Paris", None, cb_menu_show, Map, 2.342913, 48.853701) + m.item_add(mi, "Bringin Sydney", None, cb_menu_bringin, Map, 151.175274, -33.859126) + m.item_add(mi, "Bringin Paris", None, cb_menu_bringin, Map, 2.342913, 48.853701) + + mi = m.item_add(None, "Add overlay") + m.item_add(mi, "Normal", None, cb_menu_overlay_normal, Map, lon, lat) + m.item_add(mi, "Icon", None, cb_menu_overlay_icon, Map, lon, lat) + m.item_add(mi, "Custom content", None, cb_menu_overlay_custom, Map, lon, lat) + m.item_add(mi, "Random color", None, cb_menu_overlay_random_color, Map, lon, lat) + m.item_add(mi, "Min zoom 4", None, cb_menu_overlay_min_zoom, Map, lon, lat) + m.item_add(mi, "16 grouped", None, cb_menu_overlay_grouped, Map, lon, lat) + m.item_add(mi, "Bubble attached", None, cb_menu_overlay_bubble, Map, lon, lat) + m.item_add(mi, "Line", None, cb_menu_overlay_line, Map, lon, lat) + m.item_add(mi, "Polygon", None, cb_menu_overlay_poly, Map, lon, lat) + m.item_add(mi, "Circle", None, cb_menu_overlay_circle, Map, lon, lat) + m.item_add(mi, "Scale", None, cb_menu_overlay_scale, Map, x, y) + + mi = m.item_add(None, "Overlays") + m.item_add(mi, "Clear", None, cb_menu_overlays_clear, Map) + m.item_add(mi, "Show (BROKEN)", None, cb_menu_overlays_show, Map) + m.item_add(mi, "ungroup (BROKEN)", None, cb_menu_overlays_ungroup, Map) + + mi = m.item_add(None, "Route") + m.item_add(mi, "Set start point", None, cb_menu_route_start, Map, lon, lat) + m.item_add(mi, "Set end point", None, cb_menu_route_end, Map, lon, lat) + + m.move(x, y) + m.show() + +def cb_map_load(m): + lb = m.data["lb_load_status"] + status = m.tile_load_status + lb.text = "tile_load_status: %d / %d" % (status[1], status[0]) + +def cb_btn_search_name(bt, Map, en): + Map.name_add(en.text, 0, 0, cb_search_name_done, en) + en.text = "searching..." + +def cb_search_name_done(Map, name, en): + global route_start_point + + en.text = name.address + (lon, lat) = name.region + Map.region_show(lon, lat) + Map.zoom = 12 + + if route_start_point is None: + route_start_point = Map.overlay_add(lon, lat) + route_start_point.color = (255, 0, 0, 255) + else: + route_start_point.region = (lon, lat) + +def cb_btn_search_region(bt, Map, en): + if route_start_point is None: + en.text = "You must first place the start point" + else: + (lon, lat) = route_start_point.region + Map.name_add(None, lon, lat, cb_search_region_done, en) + en.text = "searching..." + +def cb_search_region_done(Map, name, en): + en.text = name.address + +def cb_btn_goto(btn, Map): + Map.zoom = 12 + Map.region_show(9.204, 45.446) def map_clicked(obj): win = StandardWindow("map", "Map test", autodel=True, size=(600, 600)) if obj is None: win.callback_delete_request_add(lambda o: elementary.exit()) - vbox = Box(win, size_hint_weight=EXPAND_BOTH, size_hint_align=FILL_BOTH) + vbox = Box(win) + vbox.size_hint_weight = EXPAND_BOTH + vbox.size_hint_align = FILL_BOTH win.resize_object_add(vbox) vbox.show() - map_obj = Map(win, zoom=2, size_hint_weight=EXPAND_BOTH, - size_hint_align=FILL_BOTH) - # map_obj.callback_clicked_add(cb_map_clicked) + map_obj = Map(win, zoom=2) + map_obj.size_hint_weight = EXPAND_BOTH + map_obj.size_hint_align = FILL_BOTH + map_obj.callback_tile_load_add(cb_map_load) + map_obj.callback_tile_loaded_add(cb_map_load) + map_obj.event_callback_add(EVAS_CALLBACK_MOUSE_DOWN, cb_map_mouse_down) vbox.pack_end(map_obj) map_obj.show() - # view - hbox = Box(win, horizontal=True, size_hint_weight=EXPAND_HORIZ, - size_hint_align=FILL_HORIZ) + ### + lb = Label(win, text="load_status: 0 / 0") + vbox.pack_end(lb) + lb.show() + map_obj.data["lb_load_status"] = lb + + ### + hbox = Box(win, horizontal=True) + hbox.size_hint_weight = EXPAND_HORIZ + hbox.size_hint_align = FILL_HORIZ vbox.pack_end(hbox) hbox.show() + bt = Button(win, text="Goto") + bt.callback_clicked_add(cb_btn_goto, map_obj) + hbox.pack_end(bt) + bt.show() + bt = Button(win, text="Zoom +") bt.callback_clicked_add(cb_btn_zoom, map_obj, 1) hbox.pack_end(bt) @@ -91,59 +332,110 @@ sl.show() src_type = ELM_MAP_SOURCE_TYPE_TILE - ho = Hoversel(win, hover_parent=win, - text="Tiles: %s" % (map_obj.source_get(src_type))) + text="Tiles: %s" % (map_obj.source_get(src_type))) for src in map_obj.sources_get(src_type): ho.item_add(src) - ho.callback_selected_add(cb_hovsel_selected, map_obj, src_type) + ho.callback_selected_add(cb_hovsel_selected, map_obj, src_type, "Tiles") hbox.pack_end(ho) ho.show() - # show / bring in - hbox = Box(win, horizontal=True, size_hint_weight=EXPAND_HORIZ, - size_hint_align=FILL_HORIZ) + ### + hbox = Box(win, horizontal=True) + hbox.size_hint_weight = EXPAND_HORIZ + hbox.size_hint_align = FILL_HORIZ vbox.pack_end(hbox) hbox.show() - bt = Button(win, text="Show Sydney") - bt.callback_clicked_add(cb_btn_show, map_obj, 151.175274, -33.859126) - hbox.pack_end(bt) - bt.show() + ck = Check(win, text="wheel_disabled") + ck.callback_changed_add(lambda bt: map_obj.wheel_disabled_set(bt.state)) + hbox.pack_end(ck) + ck.show() - bt = Button(win, text="Show Paris") - bt.callback_clicked_add(cb_btn_show, map_obj, 2.342913, 48.853701) - hbox.pack_end(bt) - bt.show() + ck = Check(win, text="paused") + ck.callback_changed_add(lambda bt: map_obj.paused_set(bt.state)) + hbox.pack_end(ck) + ck.show() - bt = Button(win, text="BringIn Sydney") - bt.callback_clicked_add(cb_btn_bringin, map_obj, 151.175274, -33.859126) - hbox.pack_end(bt) - bt.show() + ck = Check(win, text="hide overlays") + ck.callback_changed_add(cb_chk_overlays_hidden, map_obj) + hbox.pack_end(ck) + ck.show() - bt = Button(win, text="BringIn Paris") - bt.callback_clicked_add(cb_btn_bringin, map_obj, 2.342913, 48.853701) + ck = Check(win, text="pause overlays") + ck.callback_changed_add(cb_chk_overlays_paused, map_obj) + hbox.pack_end(ck) + ck.show() + + ### + sp = Separator(win, horizontal=True) + sp.show() + vbox.pack_end(sp) + + hbox = Box(win, horizontal=True) + hbox.size_hint_weight = EXPAND_HORIZ + hbox.size_hint_align = FILL_HORIZ + vbox.pack_end(hbox) + hbox.show() + + src_type = ELM_MAP_SOURCE_TYPE_ROUTE + ho = Hoversel(win, hover_parent=win, + text="Routes: %s" % (map_obj.source_get(src_type))) + for src in map_obj.sources_get(src_type): + ho.item_add(src) + ho.callback_selected_add(cb_hovsel_selected, map_obj, src_type, "Routes") + hbox.pack_end(ho) + ho.show() + + lb = Label(win, text="Set Start and End point to calculate route") + hbox.pack_end(lb) + lb.show() + map_obj.data["lb_distance"] = lb + + bt = Button(win, text="Calc route") + bt.callback_clicked_add(cb_btn_calc_route, map_obj) hbox.pack_end(bt) bt.show() - hbox = Box(win, horizontal=True, size_hint_weight=EXPAND_HORIZ, - size_hint_align=FILL_HORIZ) + ### + sp = Separator(win, horizontal=True) + sp.show() + vbox.pack_end(sp) + + hbox = Box(win, horizontal=True) + hbox.size_hint_weight = EXPAND_HORIZ + hbox.size_hint_align = FILL_HORIZ vbox.pack_end(hbox) hbox.show() + + src_type = ELM_MAP_SOURCE_TYPE_NAME + ho = Hoversel(win, hover_parent=win, + text="Names: %s" % (map_obj.source_get(src_type))) + for src in map_obj.sources_get(src_type): + ho.item_add(src) + ho.callback_selected_add(cb_hovsel_selected, map_obj, src_type, "Names") + hbox.pack_end(ho) + ho.show() - # options - ck = Check(win, text="wheel_disabled") - ck.callback_changed_add(lambda bt: map_obj.wheel_disabled_set(bt.state)) - hbox.pack_end(ck) - ck.show() + en = Entry(win, scrollable=True, text="type an address here") + en.size_hint_weight = EXPAND_BOTH + en.size_hint_align = FILL_BOTH + en.single_line = True + hbox.pack_end(en) + en.show() - ck = Check(win, text="paused") - ck.callback_changed_add(lambda bt: map_obj.paused_set(bt.state)) - hbox.pack_end(ck) - ck.show() + bt = Button(win, text="Search address") + bt.callback_clicked_add(cb_btn_search_name, map_obj, en) + hbox.pack_end(bt) + bt.show() - print_map_info(map_obj) + bt = Button(win, text="Search start point") + bt.callback_clicked_add(cb_btn_search_region, map_obj, en) + hbox.pack_end(bt) + bt.show() + + print_map_info(map_obj) win.show() diff -Nru python-efl-1.17.99~201312040125/examples/elementary/test_map2.py python-efl-1.8.2~201401231220/examples/elementary/test_map2.py --- python-efl-1.17.99~201312040125/examples/elementary/test_map2.py 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/examples/elementary/test_map2.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,215 +0,0 @@ -#!/usr/bin/env python -# encoding: utf-8 - -import random -import os - -from efl.evas import EVAS_HINT_EXPAND, EVAS_HINT_FILL -from efl import elementary -from efl.elementary.window import StandardWindow -from efl.elementary.box import Box -from efl.elementary.button import Button -from efl.elementary.check import Check -from efl.elementary.ctxpopup import Ctxpopup -from efl.elementary.icon import Icon -from efl.elementary.map import Map, MapOverlayClass, ELM_MAP_OVERLAY_TYPE_CLASS - -EXPAND_BOTH = EVAS_HINT_EXPAND, EVAS_HINT_EXPAND -EXPAND_HORIZ = EVAS_HINT_EXPAND, 0.0 -FILL_BOTH = EVAS_HINT_FILL, EVAS_HINT_FILL -FILL_HORIZ = EVAS_HINT_FILL, 0.5 - -script_path = os.path.dirname(os.path.abspath(__file__)) -img_path = os.path.join(script_path, "images") - -# Initialize efreet so that elm_map can find a proper path for its cache dir -elementary.need_efreet() - -def cb_btn_clear_overlays(bt, m): - for ov in m.overlays: - print(ov, ov.type) - if (ov.type != ELM_MAP_OVERLAY_TYPE_CLASS): - ov.delete() - -def cb_btn_ungroup_overlays(bt, m): - for ov in m.overlays: - if isinstance(ov, MapOverlayClass): - print(ov) - # TODO ungroup instead - for ov2 in ov.members: - print("deleting ov") - ov2.delete() - -def cb_btn_show_overlays(bt, m): - m.overlays_show(m.overlays) - -def cb_chk_overlays_hidden(ck, m): - for ov in m.overlays: - ov.hide = ck.state - -def cb_chk_overlays_paused(ck, m): - for ov in m.overlays: - ov.paused = ck.state - -def cb_overlay_clicked(m, ov): - ov.delete() - -def cb_ctx_overlay_add(li, item, m, lon, lat, min_zoom = 0, icon = None): - item.widget.dismiss() - ov = m.overlay_add(lon, lat) - if min_zoom > 0: - ov.displayed_zoom_min = min_zoom - if icon: - ov.icon = icon - - ov.callback_clicked_set(cb_overlay_clicked) - -def cb_ctx_overlay_add_custom(li, item, m, lon, lat): - item.widget.dismiss() - cont = Icon(m, file=os.path.join(img_path, "sky_01.jpg"), - size_hint_min=(50, 50)) - cont.show() - ov = m.overlay_add(lon, lat) - ov.content = cont - -def cb_ctx_overlay_add_random_color(li, item, m, lon, lat): - item.widget.dismiss() - ov = m.overlay_add(lon, lat) - ov.color = (random.randint(0, 255), random.randint(0, 255), - random.randint(0, 255), 200) - -def cb_ctx_overlay_grouped(li, item, m, lon, lat, sx, sy): - item.widget.dismiss() - cls = m.overlay_class_add() - for x in range(4): - for y in range(4): - (lon, lat) = m.canvas_to_region_convert(sx + x * 10, sy + y * 10) - ov = m.overlay_add(lon, lat) - cls.append(ov) - -def cb_ctx_overlay_bubble(li, item, m, lon, lat): - item.widget.dismiss() - - ov = m.overlay_add(lon, lat) - bub = m.overlay_bubble_add() - bub.follow(ov) - - lb = Label(m, text="You can push contents here") - bub.content_append(lb) - lb.show() - - ic = Icon(m, file=os.path.join(img_path, "sky_01.jpg"), - size_hint_min=(50, 50)) - bub.content_append(ic) - ic.show() - - bt = Button(m, text="clear me") - bt.callback_clicked_add(lambda bt:bub.content_clear()) - bub.content_append(bt) - bt.show() - -def cb_ctx_overlay_line(li, item, m, lon, lat): - item.widget.dismiss() - line = m.overlay_line_add(lon, lat, lon + 1, lat + 1) - -def cb_ctx_overlay_polygon(li, item, m, lon, lat): - item.widget.dismiss() - poly = m.overlay_polygon_add() - poly.region_add(lon, lat) - poly.region_add(lon + 1, lat + 1) - poly.region_add(lon + 1, lat - 1) - poly.region_add(lon - 1, lat) - -def cb_ctx_overlay_circle(li, item, m, lon, lat, radius): - item.widget.dismiss() - m.overlay_circle_add(lon, lat, radius) - -def cb_ctx_overlay_scale(li, item, m, x, y): - item.widget.dismiss() - m.overlay_scale_add(x, y) - -def test(li, item, m, lon, lat): - print(li) - print(item) - print(m) - # ctx.dismiss() - ov = m.overlay_add(lon, lat) - -def cb_map_clicked(m): - (x, y) = m.evas.pointer_canvas_xy_get() - (lon, lat) = m.canvas_to_region_convert(x, y) - cp = Ctxpopup(m) - cp.item_append("%f %f" % (lon, lat), None, None).disabled = True - cp.item_append("Add Overlay here", None, cb_ctx_overlay_add, m, lon, lat) - ic = Icon(m, file=os.path.join(img_path, "logo.png")) - cp.item_append("Add Overlay with icon", None, cb_ctx_overlay_add, m, lon, lat, 0, ic) - cp.item_append("Add Overlay custom content", None, cb_ctx_overlay_add_custom, m, lon, lat) - cp.item_append("Add Overlay random color", None, cb_ctx_overlay_add_random_color, m, lon, lat) - cp.item_append("Add Overlay (min zoom 4)", None, cb_ctx_overlay_add, m, lon, lat, 4) - cp.item_append("Add 16 Grouped Overlays", None, cb_ctx_overlay_grouped, m, lon, lat, x, y) - cp.item_append("Add one with a bubble attached", None, cb_ctx_overlay_bubble, m, lon, lat) - cp.item_append("Add an Overlay Line", None, cb_ctx_overlay_line, m, lon, lat) - cp.item_append("Add an Overlay Polygon", None, cb_ctx_overlay_polygon, m, lon, lat) - cp.item_append("Add an Overlay Circle", None, cb_ctx_overlay_circle, m, lon, lat, 10) - cp.item_append("Add an Overlay Scale", None, cb_ctx_overlay_scale, m, x, y) - cp.move(x, y) - cp.show() - -def map_overlays_clicked(obj): - win = StandardWindow("map2", "Map Overlay test", autodel=True, - size=(600, 600)) - if obj is None: - win.callback_delete_request_add(lambda o: elementary.exit()) - - vbox = Box(win, size_hint_weight=EXPAND_BOTH, size_hint_align=FILL_BOTH) - win.resize_object_add(vbox) - vbox.show() - - map_obj = Map(win, zoom=2, size_hint_weight=EXPAND_BOTH, - size_hint_align=FILL_BOTH) - map_obj.callback_clicked_add(cb_map_clicked) - vbox.pack_end(map_obj) - map_obj.show() - - # overlays - hbox = Box(win, horizontal=True, size_hint_weight=EXPAND_HORIZ, - size_hint_align=FILL_HORIZ) - vbox.pack_end(hbox) - hbox.show() - - ck = Check(win, text="overlays hidden") - ck.callback_changed_add(cb_chk_overlays_hidden, map_obj) - hbox.pack_end(ck) - ck.show() - - ck = Check(win, text="overlays paused") - ck.callback_changed_add(cb_chk_overlays_paused, map_obj) - hbox.pack_end(ck) - ck.show() - - bt = Button(win, text="clear overlays") - bt.callback_clicked_add(cb_btn_clear_overlays, map_obj) - hbox.pack_end(bt) - bt.show() - - bt = Button(win, text="ungroup (BROKEN)") - bt.callback_clicked_add(cb_btn_ungroup_overlays, map_obj) - hbox.pack_end(bt) - bt.show() - - bt = Button(win, text="overlays_show()") - bt.callback_clicked_add(cb_btn_show_overlays, map_obj) - hbox.pack_end(bt) - bt.show() - - win.resize(600, 600) - win.show() - - -if __name__ == "__main__": - elementary.init() - - map_overlays_clicked(None) - - elementary.run() - elementary.shutdown() diff -Nru python-efl-1.17.99~201312040125/examples/elementary/test_map3.py python-efl-1.8.2~201401231220/examples/elementary/test_map3.py --- python-efl-1.17.99~201312040125/examples/elementary/test_map3.py 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/examples/elementary/test_map3.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,248 +0,0 @@ -#!/usr/bin/env python -# encoding: utf-8 - -from efl.evas import EVAS_HINT_EXPAND, EVAS_HINT_FILL -from efl import elementary -from efl.elementary.window import StandardWindow -from efl.elementary.box import Box -from efl.elementary.button import Button -from efl.elementary.ctxpopup import Ctxpopup -from efl.elementary.entry import Entry -from efl.elementary.hoversel import Hoversel -from efl.elementary.label import Label -from efl.elementary.map import Map, ELM_MAP_ROUTE_TYPE_MOTOCAR, \ - ELM_MAP_ROUTE_METHOD_FASTEST, ELM_MAP_SOURCE_TYPE_ROUTE, \ - ELM_MAP_SOURCE_TYPE_NAME -from efl.elementary.separator import Separator - -EXPAND_BOTH = EVAS_HINT_EXPAND, EVAS_HINT_EXPAND -EXPAND_HORIZ = EVAS_HINT_EXPAND, 0.0 -FILL_BOTH = EVAS_HINT_FILL, EVAS_HINT_FILL -FILL_HORIZ = EVAS_HINT_FILL, 0.5 - -_from = None -_to = None - -# Initialize efreet so that elm_map can find a proper path for its cache dir -elementary.need_efreet() - -def cb_btn_goto(bt, m): - m.zoom = 12 - m.region_show(9.204, 45.446) - -def cb_ctx_set_from(ctx, item, m, lon, lat): - global _from - - ctx.dismiss() - if _from is None: - _from = m.overlay_add(lon, lat) - _from.color = (150, 0, 0, 150) - else: - _from.region = (lon, lat) - -def cb_ctx_set_to(ctx, item, m, lon, lat): - global _to - - ctx.dismiss() - if _to is None: - _to = m.overlay_add(lon, lat) - _to.color = (0, 0, 150, 150) - else: - _to.region = (lon, lat) - -def cb_btn_calc_route(bt, m): - if not (_from and _to): - return - - (flon, flat) = _from.region - (tlon, tlat) = _to.region - m.route_add(ELM_MAP_ROUTE_TYPE_MOTOCAR, - ELM_MAP_ROUTE_METHOD_FASTEST, - flon, flat, tlon, tlat, cb_route) - - lb = m.data["lb_distance"] - lb.text = "requesting route..." - -def cb_btn_search_name(bt, m, en): - m.name_add(en.text, 0, 0, cb_search_name, en) - en.text = "searching..." - -def cb_search_name(m, name, en): - global _from - - en.text = name.address - (lon, lat) = name.region - m.zoom = 12 - m.region_show(lon, lat) - - if _from is None: - _from = m.overlay_add(lon, lat) - _from.color = (150, 0, 0, 150) - else: - _from.region = (lon, lat) - -def cb_btn_search_region(bt, m, en): - if _from is None: - return - (lon, lat) = _from.region - m.name_add(None, lon, lat, cb_search_region, en) - en.text = "searching..." - -def cb_search_region(m, name, en): - global _name - - en.text = name.address - -def cb_route(m, route): - nodes = route.node.count('\n') - lb = m.data["lb_distance"] - lb.text = "distance: %.2f Km nodes:%d" % (route.distance, nodes) - - ov = m.overlay_route_add(route) - - print("Node: %s" % (route.node)) - print("Waypoint %s" % (route.waypoint)) - -def cb_btn_clear_overlays(btn, m): - for ov in m.overlays: - if ov != _from and ov != _to: - ov.delete() - -def cb_map_clicked(m): - (x, y) = m.evas.pointer_canvas_xy_get() - (lon, lat) = m.canvas_to_region_convert(x, y) - cp = Ctxpopup(m) - cp.item_append("%f %f" % (lon, lat)).disabled = True - cp.item_append("Set start point", None, cb_ctx_set_from, m, lon, lat) - cp.item_append("Set end point", None, cb_ctx_set_to, m, lon, lat) - cp.move(x, y) - cp.show() - -def cb_map_load(m): - lb = m.data["lb_load_status"] - status = m.tile_load_status - lb.text = "tile_load_status: %d / %d" % (status[1], status[0]) - -def cb_hovsel_selected(hov, item, m, type, name): - m.source_set(type, item.text) - hov.text = "%s: %s" % (name, item.text) - -def map_route_clicked(obj): - win = StandardWindow("maproute", "Map Route test", autodel=True, - size=(600, 600)) - if obj is None: - win.callback_delete_request_add(lambda o: elementary.exit()) - - vbox = Box(win, size_hint_weight=EXPAND_BOTH, size_hint_align=FILL_BOTH) - win.resize_object_add(vbox) - vbox.show() - - map_obj = Map(win, zoom=2, size_hint_weight=EXPAND_BOTH, - size_hint_align=FILL_BOTH) - map_obj.callback_clicked_add(cb_map_clicked) - map_obj.callback_tile_load_add(cb_map_load) - map_obj.callback_tile_loaded_add(cb_map_load) - vbox.pack_end(map_obj) - map_obj.show() - - lb = Label(win, text="load_status: 0 / 0") - vbox.pack_end(lb) - lb.show() - map_obj.data["lb_load_status"] = lb - - lb = Label(win) - lb.text = "First set Start and End point and then click 'Calc Route !'" - vbox.pack_end(lb) - lb.show() - map_obj.data["lb_distance"] = lb - - # info - hbox = Box(win, horizontal=True, size_hint_weight=EXPAND_HORIZ, - size_hint_align=FILL_HORIZ) - vbox.pack_end(hbox) - hbox.show() - - # route - src_type = ELM_MAP_SOURCE_TYPE_ROUTE - - ho = Hoversel(win, hover_parent=win, - text="Routes: %s" % (map_obj.source_get(src_type))) - for src in map_obj.sources_get(src_type): - ho.item_add(src) - ho.callback_selected_add(cb_hovsel_selected, map_obj, src_type, "Routes") - hbox.pack_end(ho) - ho.show() - - sep = Separator(win) - sep.show() - hbox.pack_end(sep) - - bt = Button(win, text="GOTO") - bt.callback_clicked_add(cb_btn_goto, map_obj) - hbox.pack_end(bt) - bt.show() - - bt = Button(win, text="Calc Route !") - bt.callback_clicked_add(cb_btn_calc_route, map_obj) - hbox.pack_end(bt) - bt.show() - - bt = Button(win, text="clear route overlays") - bt.callback_clicked_add(cb_btn_clear_overlays, map_obj) - hbox.pack_end(bt) - bt.show() - - # names - hbox = Box(win, horizontal=True, size_hint_weight=EXPAND_HORIZ, - size_hint_align=FILL_HORIZ) - vbox.pack_end(hbox) - hbox.show() - - src_type = ELM_MAP_SOURCE_TYPE_NAME - - ho = Hoversel(win, hover_parent=win, - text="Names: %s" % (map_obj.source_get(src_type))) - for src in map_obj.sources_get(src_type): - ho.item_add(src) - ho.callback_selected_add(cb_hovsel_selected, map_obj, src_type, "Names") - hbox.pack_end(ho) - ho.show() - - en = Entry(win, scrollable=True, text="type an address here", - size_hint_weight=EXPAND_BOTH, size_hint_align=FILL_BOTH) - # en.single_line = True - hbox.pack_end(en) - en.show() - - bt = Button(win, text="Search Address !") - bt.callback_clicked_add(cb_btn_search_name, map_obj, en) - hbox.pack_end(bt) - bt.show() - - hbox = Box(win, horizontal=True, size_hint_weight=EXPAND_HORIZ, - size_hint_align=FILL_HORIZ) - vbox.pack_end(hbox) - hbox.show() - - en = Entry(win, scrollable=True, disabled=True, - text="place the start point and press the button", - size_hint_weight=EXPAND_BOTH, size_hint_align=FILL_BOTH) - # en.single_line = True - hbox.pack_end(en) - en.show() - - bt = Button(win, text="Search start point Region") - bt.callback_clicked_add(cb_btn_search_region, map_obj, en) - hbox.pack_start(bt) - bt.show() - - win.show() - - -if __name__ == "__main__": - elementary.init() - - map_route_clicked(None) - - elementary.run() - elementary.shutdown() diff -Nru python-efl-1.17.99~201312040125/examples/elementary/test_naviframe.py python-efl-1.8.2~201401231220/examples/elementary/test_naviframe.py --- python-efl-1.17.99~201312040125/examples/elementary/test_naviframe.py 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/examples/elementary/test_naviframe.py 2014-01-18 12:24:01.000000000 +0000 @@ -21,9 +21,6 @@ def navi_pop(bt, nf): nf.item_pop() -def navi_promote(bt, nf, item): - item.item_promote() - def title_visible(obj, item): item.title_visible = not item.title_visible @@ -81,7 +78,7 @@ fill_inside=True, style="shadow") item = nf.item_insert_after(nf.top_item_get(), "Page 5", bt, bt2, content, "basic") - item.part_text_set("subtitle", "This page is inserted without transition (TODO)") + item.part_text_set("subtitle", "This page is inserted without transition") def page6(bt, nf): bt = Button(nf, text="Page 5") @@ -101,7 +98,7 @@ bt.callback_clicked_add(navi_pop, nf) bt2 = Button(nf, text="Page 1") - bt2.callback_clicked_add(navi_promote, nf, nf.data["page1"]) + bt2.callback_clicked_add(lambda x: nf.data["page1"].promote()) content = Photo(nf, file=os.path.join(img_path, "sky_02.jpg"), fill_inside=True, style="shadow") @@ -112,7 +109,8 @@ def naviframe_clicked(obj): win = StandardWindow("naviframe", "Naviframe test", autodel=True, - size=(400, 600)) + size=(400, 400)) + win.focus_highlight_enabled = True if obj is None: win.callback_delete_request_add(lambda o: elementary.exit()) diff -Nru python-efl-1.17.99~201312040125/examples/elementary/test_notify.py python-efl-1.8.2~201401231220/examples/elementary/test_notify.py --- python-efl-1.17.99~201312040125/examples/elementary/test_notify.py 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/examples/elementary/test_notify.py 2014-01-18 12:24:01.000000000 +0000 @@ -1,98 +1,324 @@ #!/usr/bin/env python # encoding: utf-8 +from __future__ import print_function + from efl.evas import EVAS_HINT_EXPAND, EVAS_HINT_FILL from efl import elementary from efl.elementary.window import StandardWindow from efl.elementary.box import Box from efl.elementary.button import Button from efl.elementary.label import Label -from efl.elementary.notify import Notify, ELM_NOTIFY_ORIENT_TOP, \ - ELM_NOTIFY_ORIENT_CENTER, ELM_NOTIFY_ORIENT_BOTTOM, \ - ELM_NOTIFY_ORIENT_LEFT, ELM_NOTIFY_ORIENT_RIGHT, \ - ELM_NOTIFY_ORIENT_TOP_LEFT, ELM_NOTIFY_ORIENT_TOP_RIGHT, \ - ELM_NOTIFY_ORIENT_BOTTOM_LEFT, ELM_NOTIFY_ORIENT_BOTTOM_RIGHT +from efl.elementary.notify import Notify, ELM_NOTIFY_ALIGN_FILL from efl.elementary.table import Table EXPAND_BOTH = EVAS_HINT_EXPAND, EVAS_HINT_EXPAND FILL_BOTH = EVAS_HINT_FILL, EVAS_HINT_FILL -def notify_close(bt, notify): - notify.hide() +def notify_clicked(obj=None): + win = StandardWindow("notify", "Notify", autodel=True, size=(400,400)) + if obj is None: + win.callback_delete_request_add(lambda x: elementary.exit()) + win.show() -def notify_show(bt, win, orient): - notify = Notify(win, repeat_events=False, timeout=5, orient=orient) + tb = Table(win, size_hint_weight=EXPAND_BOTH) + win.resize_object_add(tb) + tb.show() - bx = Box(win, size_hint_weight=EXPAND_BOTH, horizontal=True) - notify.content_set(bx) + # Notify top + bx = Box(win, horizontal=True) bx.show() - lb = Label(win, text="Text notification") + notify = Notify(win, size_hint_weight=EXPAND_BOTH, align=(0.5, 0.0), + content=bx) + + lb = Label(win, text="This position is the default.") bx.pack_end(lb) lb.show() bt = Button(win, text="Close") - bt.callback_clicked_add(notify_close, notify) + bt.callback_clicked_add(lambda x, y=notify: y.hide()) bx.pack_end(bt) bt.show() - notify.show() -def notify_clicked(obj): - win = StandardWindow("notify", "Notify test", autodel=True, size=(320, 320), - size_hint_min=(160, 160), size_hint_max=(320, 320)) - if obj is None: - win.callback_delete_request_add(lambda o: elementary.exit()) + bt = Button(win, size_hint_align=FILL_BOTH, text="Top") + bt.callback_clicked_add(lambda x, y=notify: y.show()) + tb.pack(bt, 2, 1, 1, 1) + bt.show() - tb = Table(win, size_hint_weight=EXPAND_BOTH) - win.resize_object_add(tb) - tb.show() + # Notify bottom + bx = Box(win, horizontal=True) + bx.show() + + notify = Notify(win, allow_events=False, size_hint_weight=EXPAND_BOTH, + align=(0.5, 1.0), timeout=(5.0), content=bx) + + notify.callback_timeout_add(lambda x: setattr(x, "timeout", 2.0)) + notify.callback_block_clicked_add( + lambda x: print("Notify block area clicked!!")) + + lb = Label(win) + lb.text = ( + "Bottom position. This notify uses a timeout of 5 sec.
" + "The events outside the window are blocked." + ) + bx.pack_end(lb) + lb.show() - bt = Button(win, text="Top") - bt.callback_clicked_add(notify_show, win, ELM_NOTIFY_ORIENT_TOP) - tb.pack(bt, 1, 0, 1, 1) + bt = Button(win, text="Close") + bt.callback_clicked_add(lambda x, y=notify: y.hide()) + bx.pack_end(bt) bt.show() - bt = Button(win, text="Center") - bt.callback_clicked_add(notify_show, win, ELM_NOTIFY_ORIENT_CENTER) - tb.pack(bt, 1, 1, 1, 1) + bt = Button(win, size_hint_align=FILL_BOTH, text="Bottom") + bt.callback_clicked_add(lambda x, y=notify: y.show()) + tb.pack(bt, 2, 3, 1, 1) + bt.show() + + # Notify left + bx = Box(win, horizontal=True) + bx.show() + + notify = Notify(win, size_hint_weight=EXPAND_BOTH, align=(0.0, 0.5), + timeout=10.0, content=bx) + notify.callback_timeout_add(lambda x: print("Notify timed out!")) + + lb = Label(win) + lb.text = "Left position. This notify uses a timeout of 10 sec." + bx.pack_end(lb) + lb.show() + + bt = Button(win, text="Close") + bt.callback_clicked_add(lambda x, y=notify: y.hide()) + bx.pack_end(bt) bt.show() - bt = Button(win, text="Bottom") - bt.callback_clicked_add(notify_show, win, ELM_NOTIFY_ORIENT_BOTTOM) + bt = Button(win, size_hint_align=FILL_BOTH, text="Left") + bt.callback_clicked_add(lambda x, y=notify: y.show()) tb.pack(bt, 1, 2, 1, 1) bt.show() - bt = Button(win, text="Left") - bt.callback_clicked_add(notify_show, win, ELM_NOTIFY_ORIENT_LEFT) - tb.pack(bt, 0, 1, 1, 1) + # Notify center + bx = Box(win, horizontal=True) + bx.show() + + notify = Notify(win, size_hint_weight=EXPAND_BOTH, align=(0.5, 0.5), + timeout=10.0, content=bx) + notify.callback_timeout_add(lambda x: print("Notify timed out!")) + + lb = Label(win) + lb.text = "Center position. This notify uses a timeout of 10 sec." + bx.pack_end(lb) + lb.show() + + bt = Button(win, text="Close") + bt.callback_clicked_add(lambda x, y=notify: y.hide()) + bx.pack_end(bt) + bt.show() + + bt = Button(win, size_hint_align=FILL_BOTH, text="Center") + bt.callback_clicked_add(lambda x, y=notify: y.show()) + tb.pack(bt, 2, 2, 1, 1) bt.show() - bt = Button(win, text="Top Left") - bt.callback_clicked_add(notify_show, win, ELM_NOTIFY_ORIENT_TOP_LEFT) - tb.pack(bt, 0, 0, 1, 1) + # Notify right + bx = Box(win, horizontal=True) + bx.show() + + notify = Notify(win, size_hint_weight=EXPAND_BOTH, align=(1.0, 0.5), + content=bx) + + lb = Label(win, text="Right position.") + bx.pack_end(lb) + lb.show() + + bt = Button(win, text="Close") + bt.callback_clicked_add(lambda x, y=notify: y.hide()) + bx.pack_end(bt) bt.show() - bt = Button(win, text="Bottom Left") - bt.callback_clicked_add(notify_show, win, ELM_NOTIFY_ORIENT_BOTTOM_LEFT) - tb.pack(bt, 0, 2, 1, 1) + bt = Button(win, size_hint_align=FILL_BOTH, text="Right") + bt.callback_clicked_add(lambda x, y=notify: y.show()) + tb.pack(bt, 3, 2, 1, 1) bt.show() - bt = Button(win, text="Right") - bt.callback_clicked_add(notify_show, win, ELM_NOTIFY_ORIENT_RIGHT) - tb.pack(bt, 2, 1, 1, 1) + # Notify top left + bx = Box(win, horizontal=True) + bx.show() + + notify = Notify(win, size_hint_weight=EXPAND_BOTH, align=(0.0, 0.0), + content=bx) + + lb = Label(win, text="Top Left position.") + bx.pack_end(lb) + lb.show() + + bt = Button(win, text="Close") + bt.callback_clicked_add(lambda x, y=notify: y.hide()) + bx.pack_end(bt) bt.show() - bt = Button(win, text="Top Right") - bt.callback_clicked_add(notify_show, win, ELM_NOTIFY_ORIENT_TOP_RIGHT) - tb.pack(bt, 2, 0, 1, 1) + bt = Button(win, size_hint_align=FILL_BOTH, text="Top Left") + bt.callback_clicked_add(lambda x, y=notify: y.show()) + tb.pack(bt, 1, 1, 1, 1) bt.show() - bt = Button(win, text="Bottom Right") - bt.callback_clicked_add(notify_show, win, ELM_NOTIFY_ORIENT_BOTTOM_RIGHT) - tb.pack(bt, 2, 2, 1, 1) + # Notify top right + bx = Box(win, horizontal=True) + bx.show() + + notify = Notify(win, size_hint_weight=EXPAND_BOTH, align=(1.0, 0.0), + content=bx) + + lb = Label(win, text="Top Right position.") + bx.pack_end(lb) + lb.show() + + bt = Button(win, text="Close") + bt.callback_clicked_add(lambda x, y=notify: y.hide()) + bx.pack_end(bt) + bt.show() + + bt = Button(win, size_hint_align=FILL_BOTH, text="Top Right") + bt.callback_clicked_add(lambda x, y=notify: y.show()) + tb.pack(bt, 3, 1, 1, 1) + bt.show() + + # Notify bottom left + bx = Box(win, horizontal=True) + bx.show() + + notify = Notify(win, size_hint_weight=EXPAND_BOTH, align=(0.0, 1.0), + content=bx) + + lb = Label(win, text="Bottom Left position.") + bx.pack_end(lb) + lb.show() + + bt = Button(win, text="Close") + bt.callback_clicked_add(lambda x, y=notify: y.hide()) + bx.pack_end(bt) + bt.show() + + bt = Button(win, size_hint_align=FILL_BOTH, text="Bottom Left") + bt.callback_clicked_add(lambda x, y=notify: y.show()) + tb.pack(bt, 1, 3, 1, 1) + bt.show() + + # Notify bottom right + bx = Box(win, horizontal=True) + bx.show() + + notify = Notify(win, size_hint_weight=EXPAND_BOTH, align=(1.0, 1.0), + content=bx) + + lb = Label(win, text="Bottom Right position.") + bx.pack_end(lb) + lb.show() + + bt = Button(win, text="Close in 2s") + bt.callback_clicked_add(lambda x, y=notify: setattr(y, "timeout", 2.0)) + bx.pack_end(bt) + bt.show() + + bt = Button(win, size_hint_align=FILL_BOTH, text="Bottom Right") + bt.callback_clicked_add(lambda x, y=notify: y.show()) + tb.pack(bt, 3, 3, 1, 1) + bt.show() + + # Notify top fill + bx = Box(win, horizontal=True) + bx.show() + + notify = Notify(win, size_hint_weight=EXPAND_BOTH, + align=(ELM_NOTIFY_ALIGN_FILL, 0.0), timeout=5.0, content=bx) + + lb = Label(win) + lb.text = ( + "Fill top. This notify fills horizontal area.
" + "notify.align = (ELM_NOTIFY_ALIGN_FILL, 0.0)" + ) + bx.pack_end(lb) + lb.show() + + bt = Button(win, text="Close") + bt.callback_clicked_add(lambda x, y=notify: y.hide()) + bx.pack_end(bt) + bt.show() + + bt = Button(win, size_hint_align=(EVAS_HINT_FILL, 0.5), text="Top fill") + bt.callback_clicked_add(lambda x, y=notify: y.show()) + tb.pack(bt, 1, 0, 3, 1) + bt.show() + + # Notify bottom fill + bx = Box(win, horizontal=True) + bx.show() + + notify = Notify(win, size_hint_weight=EXPAND_BOTH, + align=(ELM_NOTIFY_ALIGN_FILL, 1.0), timeout=5.0, content=bx) + + lb = Label(win, size_hint_weight=EXPAND_BOTH, size_hint_align=(0.0, 0.5)) + lb.text = ( + "Fill Bottom. This notify fills horizontal area.
" + "notify.align = (ELM_NOTIFY_ALIGN_FILL, 1.0)" + ) + bx.pack_end(lb) + lb.show() + + bt = Button(win, text="Close") + bt.callback_clicked_add(lambda x, y=notify: y.hide()) + bx.pack_end(bt) + bt.show() + + bt = Button(win, size_hint_align=(EVAS_HINT_FILL, 0.5), text="Bottom fill") + bt.callback_clicked_add(lambda x, y=notify: y.show()) + tb.pack(bt, 1, 4, 3, 1) + bt.show() + + # Notify left fill + bx = Box(win) + bx.show() + + notify = Notify(win, size_hint_weight=EXPAND_BOTH, + align=(0.0, ELM_NOTIFY_ALIGN_FILL), timeout=5.0, content=bx) + + lb = Label(win, text="Left fill.") + bx.pack_end(lb) + lb.show() + + bt = Button(win, text="Close") + bt.callback_clicked_add(lambda x, y=notify: y.hide()) + bx.pack_end(bt) + bt.show() + + bt = Button(win, size_hint_align=(0.5, EVAS_HINT_FILL), text="Left fill") + bt.callback_clicked_add(lambda x, y=notify: y.show()) + tb.pack(bt, 0, 1, 1, 3) + bt.show() + + # Notify right fill + bx = Box(win) + bx.show() + + notify = Notify(win, size_hint_weight=EXPAND_BOTH, + align=(1.0, ELM_NOTIFY_ALIGN_FILL), timeout=5.0, content=bx) + + lb = Label(win) + lb.text = "Right fill." + bx.pack_end(lb) + lb.show() + + bt = Button(win, text="Close") + bt.callback_clicked_add(lambda x, y=notify: y.hide()) + bx.pack_end(bt) + bt.show() + + bt = Button(win, size_hint_align=(0.5, EVAS_HINT_FILL), text="Right fill") + bt.callback_clicked_add(lambda x, y=notify: y.show()) + tb.pack(bt, 4, 1, 1, 3) bt.show() - win.show() if __name__ == "__main__": diff -Nru python-efl-1.17.99~201312040125/examples/elementary/test_slideshow.py python-efl-1.8.2~201401231220/examples/elementary/test_slideshow.py --- python-efl-1.17.99~201312040125/examples/elementary/test_slideshow.py 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/examples/elementary/test_slideshow.py 2014-01-18 12:24:01.000000000 +0000 @@ -109,7 +109,7 @@ bx = Box(win, horizontal=True) bx.show() - no = Notify(win, orient=ELM_NOTIFY_ORIENT_BOTTOM, + no = Notify(win, align=(0.5, 1.0), size_hint_weight=EXPAND_BOTH, timeout=3.0, content=bx) win.resize_object_add(no) diff -Nru python-efl-1.17.99~201312040125/examples/elementary/test_tooltip.py python-efl-1.8.2~201401231220/examples/elementary/test_tooltip.py --- python-efl-1.17.99~201312040125/examples/elementary/test_tooltip.py 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/examples/elementary/test_tooltip.py 2014-01-18 12:24:01.000000000 +0000 @@ -4,7 +4,7 @@ import os from efl.evas import EVAS_HINT_EXPAND, EVAS_HINT_FILL -from efl.ecore import Timer +from efl.ecore import Timer, timer_add from efl import elementary from efl.elementary.window import StandardWindow from efl.elementary.box import Box @@ -126,8 +126,7 @@ del data["timer"] obj.text_set("Icon tooltip, click to start changed timed") return - data["timer"] = ecore.timer_add(1.5, _tt_icon_replace_timer_cb, obj, - data) + data["timer"] = timer_add(1.5, _tt_icon_replace_timer_cb, obj, data) obj.text_set("Icon tooltip, click to stop changed timed") bt = Button(win, text="Icon tooltip, click to start changed timed") @@ -160,8 +159,7 @@ del data["timer"] obj.text_set("Icon tooltip style, click to start changed timed") return - data["timer"] = ecore.timer_add(1.5, _tt_style_replace_timer_cb, obj, - data) + data["timer"] = timer_add(1.5, _tt_style_replace_timer_cb, obj, data) obj.text_set("Icon tooltip, click to stop changed timed") bt = Button(win, text="Icon tooltip style, click to start changed timed") diff -Nru python-efl-1.17.99~201312040125/examples/emotion/test_emotion.py python-efl-1.8.2~201401231220/examples/emotion/test_emotion.py --- python-efl-1.17.99~201312040125/examples/emotion/test_emotion.py 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/examples/emotion/test_emotion.py 2014-01-18 12:24:01.000000000 +0000 @@ -1,5 +1,6 @@ #!/usr/bin/env python +import os import optparse import subprocess @@ -8,17 +9,11 @@ from efl import emotion from efl.emotion import Emotion from efl import elementary -from efl.elementary.window import Window +from efl.elementary.window import Window, ELM_WIN_BASIC -def pkgconfig_variable(pkg, var): - output = subprocess.check_output(["pkg-config", "--variable=" + var, pkg]) - return output.decode("utf-8").strip() - - -prefix_dir = pkgconfig_variable("emotion", "prefix") -data_dir = prefix_dir + "/share/emotion/data" -theme_file = data_dir + "/theme.edj" +script_path = os.path.dirname(os.path.abspath(__file__)) +theme_file = os.path.join(script_path, "theme.edj") class MyDecoratedEmotion(Emotion): @@ -201,7 +196,7 @@ print("spu button num: %d" % vid.spu_button_count) def vid_button_change_cb(self, vid): - print ("spu button: %s" % vid.spu_button) + print("spu button: %s" % vid.spu_button) class AppKeyboardEvents(object): @@ -237,6 +232,11 @@ print("\tspu channels: %d" % mw.vid.spu_channel_count()) print("\tseekable: %s" % mw.vid.seekable) + def toggle_pause(win): + for mw in win.data["movie_windows"]: + mw.vid.play = not mw.vid.play + print("play is now %s" % mw.vid.play) + def fullscreen_change(win): win.fullscreen = not win.fullscreen print("fullscreen is now %s" % win.fullscreen) @@ -288,6 +288,7 @@ "s": (shaped_change,), "b": (bordless_change,), "q": (main_delete_request,), + "p": (toggle_pause,), } def __call__(self, win, info): try: @@ -338,12 +339,11 @@ elementary.init() # elementary window - win = Window("test-emotion", elementary.ELM_WIN_BASIC) + win = Window("test-emotion", ELM_WIN_BASIC) win.title_set("python-emotion test application") win.callback_delete_request_add(lambda o: elementary.exit()) win.on_key_down_add(AppKeyboardEvents()) - # edje main scene object scene = edje.Edje(win.evas, file=theme_file, group="background") win.resize_object_add(scene) Binary files /tmp/xZsG_rDF9U/python-efl-1.17.99~201312040125/examples/emotion/theme.edj and /tmp/miB49i9k7M/python-efl-1.8.2~201401231220/examples/emotion/theme.edj differ diff -Nru python-efl-1.17.99~201312040125/include/efl.c_eo.pxd python-efl-1.8.2~201401231220/include/efl.c_eo.pxd --- python-efl-1.17.99~201312040125/include/efl.c_eo.pxd 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/include/efl.c_eo.pxd 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of diff -Nru python-efl-1.17.99~201312040125/include/efl.ecore.enums.pxd python-efl-1.8.2~201401231220/include/efl.ecore.enums.pxd --- python-efl-1.17.99~201312040125/include/efl.ecore.enums.pxd 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/include/efl.ecore.enums.pxd 2014-01-18 12:24:01.000000000 +0000 @@ -1,3 +1,20 @@ +# Copyright (C) 2007-2013 various contributors (see AUTHORS) +# +# This file is part of Python-EFL. +# +# Python-EFL is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 3 of the License, or (at your option) any later version. +# +# Python-EFL is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this Python-EFL. If not, see . + cdef extern from "Ecore.h": enum: ECORE_EVENT_SIGNAL_USER diff -Nru python-efl-1.17.99~201312040125/include/efl.ecore.pxd python-efl-1.8.2~201401231220/include/efl.ecore.pxd --- python-efl-1.17.99~201312040125/include/efl.ecore.pxd 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/include/efl.ecore.pxd 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of diff -Nru python-efl-1.17.99~201312040125/include/efl.edje.pxd python-efl-1.8.2~201401231220/include/efl.edje.pxd --- python-efl-1.17.99~201312040125/include/efl.edje.pxd 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/include/efl.edje.pxd 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of diff -Nru python-efl-1.17.99~201312040125/include/efl.edje_edit.pxd python-efl-1.8.2~201401231220/include/efl.edje_edit.pxd --- python-efl-1.17.99~201312040125/include/efl.edje_edit.pxd 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/include/efl.edje_edit.pxd 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -52,18 +52,18 @@ void edje_edit_print_internal_status(Evas_Object *obj) # group - Eina_Bool edje_edit_group_add(Evas_Object *obj, char *name) - Eina_Bool edje_edit_group_del(Evas_Object *obj, char *group_name) - Eina_Bool edje_edit_group_exist(Evas_Object *obj, char *group) + Eina_Bool edje_edit_group_add(Evas_Object *obj, const_char *name) + Eina_Bool edje_edit_group_del(Evas_Object *obj, const_char *group_name) + Eina_Bool edje_edit_group_exist(Evas_Object *obj, const_char *group) Eina_Bool edje_edit_group_name_set(Evas_Object *obj, char *new_name) int edje_edit_group_min_w_get(Evas_Object *obj) - void edje_edit_group_min_w_set(Evas_Object *obj, int w) + Eina_Bool edje_edit_group_min_w_set(Evas_Object *obj, int w) int edje_edit_group_min_h_get(Evas_Object *obj) - void edje_edit_group_min_h_set(Evas_Object *obj, int h) + Eina_Bool edje_edit_group_min_h_set(Evas_Object *obj, int h) int edje_edit_group_max_w_get(Evas_Object *obj) - void edje_edit_group_max_w_set(Evas_Object *obj, int w) + Eina_Bool edje_edit_group_max_w_set(Evas_Object *obj, int w) int edje_edit_group_max_h_get(Evas_Object *obj) - void edje_edit_group_max_h_set(Evas_Object *obj, int h) + Eina_Bool edje_edit_group_max_h_set(Evas_Object *obj, int h) # data Eina_List *edje_edit_data_list_get(Evas_Object *obj) @@ -83,13 +83,13 @@ # text styles Eina_List *edje_edit_styles_list_get(Evas_Object *obj) Eina_Bool edje_edit_style_add(Evas_Object *obj, const_char *style) - void edje_edit_style_del(Evas_Object *obj, const_char *style) + Eina_Bool edje_edit_style_del(Evas_Object *obj, const_char *style) Eina_List *edje_edit_style_tags_list_get(Evas_Object *obj, const_char *style) const_char *edje_edit_style_tag_value_get(Evas_Object *obj, const_char *style, const_char *tag) - void edje_edit_style_tag_value_set(Evas_Object *obj, const_char *style, const_char *tag, const_char *new_value) - void edje_edit_style_tag_name_set(Evas_Object *obj, const_char *style, const_char *tag, const_char *new_name) + Eina_Bool edje_edit_style_tag_value_set(Evas_Object *obj, const_char *style, const_char *tag, const_char *new_value) + Eina_Bool edje_edit_style_tag_name_set(Evas_Object *obj, const_char *style, const_char *tag, const_char *new_name) Eina_Bool edje_edit_style_tag_add(Evas_Object *obj, const_char *style, const_char *tag_name) - void edje_edit_style_tag_del(Evas_Object *obj, const_char *style, const_char *tag) + Eina_Bool edje_edit_style_tag_del(Evas_Object *obj, const_char *style, const_char *tag) # fonts Eina_List *edje_edit_fonts_list_get(Evas_Object *obj) @@ -115,14 +115,14 @@ Eina_Bool edje_edit_image_del(Evas_Object *obj, const_char *name) Eina_Bool edje_edit_image_data_add(Evas_Object *obj, const_char *name, int id) const_char *edje_edit_state_image_get(Evas_Object *obj, const_char *part, const_char *state, double value) - void edje_edit_state_image_set(Evas_Object *obj, const_char *part, const_char *state, double value, const_char *image) + Eina_Bool edje_edit_state_image_set(Evas_Object *obj, const_char *part, const_char *state, double value, const_char *image) int edje_edit_image_id_get(Evas_Object *obj, const_char *image_name) Edje_Edit_Image_Comp edje_edit_image_compression_type_get(Evas_Object *obj, const_char *image) int edje_edit_image_compression_rate_get(Evas_Object *obj, const_char *image) void edje_edit_state_image_border_get(Evas_Object *obj, const_char *part, const_char *state, double value, int *l, int *r, int *t, int *b) - void edje_edit_state_image_border_set(Evas_Object *obj, const_char *part, const_char *state, double value, int l, int r, int t, int b) + Eina_Bool edje_edit_state_image_border_set(Evas_Object *obj, const_char *part, const_char *state, double value, int l, int r, int t, int b) unsigned char edje_edit_state_image_border_fill_get(Evas_Object *obj, const_char *part, const_char *state, double value) - void edje_edit_state_image_border_fill_set(Evas_Object *obj, const_char *part, const_char *state, double value, unsigned char fill) + Eina_Bool edje_edit_state_image_border_fill_set(Evas_Object *obj, const_char *part, const_char *state, double value, unsigned char fill) Eina_List *edje_edit_state_tweens_list_get(Evas_Object *obj, const_char *part, const_char *state, double value) Eina_Bool edje_edit_state_tween_add(Evas_Object *obj, const_char *part, const_char *state, double value, const_char *tween) Eina_Bool edje_edit_state_tween_del(Evas_Object *obj, const_char *part, const_char *state, double value, const_char *tween) @@ -144,33 +144,33 @@ const_char *edje_edit_part_source_get(Evas_Object *obj, const_char *part) Eina_Bool edje_edit_part_source_set(Evas_Object *obj, const_char *part, const_char *source) Edje_Text_Effect edje_edit_part_effect_get(Evas_Object *obj, const_char *part) - void edje_edit_part_effect_set(Evas_Object *obj, const_char *part, Edje_Text_Effect effect) + Eina_Bool edje_edit_part_effect_set(Evas_Object *obj, const_char *part, Edje_Text_Effect effect) const_char *edje_edit_part_selected_state_get(Evas_Object *obj, const_char *part, double *value) Eina_Bool edje_edit_part_selected_state_set(Evas_Object *obj, const_char *part, const_char *state, double value) Eina_Bool edje_edit_part_mouse_events_get(Evas_Object *obj, const_char *part) - void edje_edit_part_mouse_events_set(Evas_Object *obj, const_char *part, Eina_Bool mouse_events) + Eina_Bool edje_edit_part_mouse_events_set(Evas_Object *obj, const_char *part, Eina_Bool mouse_events) Eina_Bool edje_edit_part_repeat_events_get(Evas_Object *obj, const_char *part) - void edje_edit_part_repeat_events_set(Evas_Object *obj, const_char *part, Eina_Bool repeat_events) + Eina_Bool edje_edit_part_repeat_events_set(Evas_Object *obj, const_char *part, Eina_Bool repeat_events) Evas_Event_Flags edje_edit_part_ignore_flags_get(Evas_Object *obj, const_char *part) - void edje_edit_part_ignore_flags_set(Evas_Object *obj, const_char *part, Evas_Event_Flags ignore_flags) - void edje_edit_part_scale_set(Evas_Object *obj, const_char *part, Eina_Bool scale) + Eina_Bool edje_edit_part_ignore_flags_set(Evas_Object *obj, const_char *part, Evas_Event_Flags ignore_flags) + Eina_Bool edje_edit_part_scale_set(Evas_Object *obj, const_char *part, Eina_Bool scale) Eina_Bool edje_edit_part_scale_get(Evas_Object *obju, const_char *part) int edje_edit_part_drag_x_get(Evas_Object *obj, const_char *part) - void edje_edit_part_drag_x_set(Evas_Object *obj, const_char *part, int drag) + Eina_Bool edje_edit_part_drag_x_set(Evas_Object *obj, const_char *part, int drag) int edje_edit_part_drag_y_get(Evas_Object *obj, const_char *part) - void edje_edit_part_drag_y_set(Evas_Object *obj, const_char *part, int drag) + Eina_Bool edje_edit_part_drag_y_set(Evas_Object *obj, const_char *part, int drag) int edje_edit_part_drag_step_x_get(Evas_Object *obj, const_char *part) - void edje_edit_part_drag_step_x_set(Evas_Object *obj, const_char *part, int step) + Eina_Bool edje_edit_part_drag_step_x_set(Evas_Object *obj, const_char *part, int step) int edje_edit_part_drag_step_y_get(Evas_Object *obj, const_char *part) - void edje_edit_part_drag_step_y_set(Evas_Object *obj, const_char *part, int step) + Eina_Bool edje_edit_part_drag_step_y_set(Evas_Object *obj, const_char *part, int step) int edje_edit_part_drag_count_x_get(Evas_Object *obj, const_char *part) - void edje_edit_part_drag_count_x_set(Evas_Object *obj, const_char *part, int count) + Eina_Bool edje_edit_part_drag_count_x_set(Evas_Object *obj, const_char *part, int count) int edje_edit_part_drag_count_y_get(Evas_Object *obj, const_char *part) - void edje_edit_part_drag_count_y_set(Evas_Object *obj, const_char *part, int count) + Eina_Bool edje_edit_part_drag_count_y_set(Evas_Object *obj, const_char *part, int count) const_char *edje_edit_part_drag_confine_get(Evas_Object *obj, const_char *part) - void edje_edit_part_drag_confine_set(Evas_Object *obj, const_char *part, const_char *confine) + Eina_Bool edje_edit_part_drag_confine_set(Evas_Object *obj, const_char *part, const_char *confine) const_char *edje_edit_part_drag_event_get(Evas_Object *obj, const_char *part) - void edje_edit_part_drag_event_set(Evas_Object *obj, const_char *part, const_char *event) + Eina_Bool edje_edit_part_drag_event_set(Evas_Object *obj, const_char *part, const_char *event) const_char *edje_edit_part_api_name_get(Evas_Object *obj, const_char *part) const_char *edje_edit_part_api_description_get(Evas_Object *obj, const_char *part) Eina_Bool edje_edit_part_api_name_set(Evas_Object *obj, const_char *part, const_char *name) @@ -191,70 +191,70 @@ double edje_edit_state_rel1_relative_y_get(Evas_Object *obj, char *part, char *state, double value) double edje_edit_state_rel2_relative_x_get(Evas_Object *obj, char *part, char *state, double value) double edje_edit_state_rel2_relative_y_get(Evas_Object *obj, char *part, char *state, double value) - void edje_edit_state_rel1_relative_x_set(Evas_Object *obj, char *part, char *state, double value, double x) - void edje_edit_state_rel1_relative_y_set(Evas_Object *obj, char *part, char *state, double value, double y) - void edje_edit_state_rel2_relative_x_set(Evas_Object *obj, char *part, char *state, double value, double x) - void edje_edit_state_rel2_relative_y_set(Evas_Object *obj, char *part, char *state, double value, double y) + Eina_Bool edje_edit_state_rel1_relative_x_set(Evas_Object *obj, char *part, char *state, double value, double x) + Eina_Bool edje_edit_state_rel1_relative_y_set(Evas_Object *obj, char *part, char *state, double value, double y) + Eina_Bool edje_edit_state_rel2_relative_x_set(Evas_Object *obj, char *part, char *state, double value, double x) + Eina_Bool edje_edit_state_rel2_relative_y_set(Evas_Object *obj, char *part, char *state, double value, double y) int edje_edit_state_rel1_offset_x_get(Evas_Object *obj, char *part, char *state, double value) int edje_edit_state_rel1_offset_y_get(Evas_Object *obj, char *part, char *state, double value) int edje_edit_state_rel2_offset_x_get(Evas_Object *obj, char *part, char *state, double value) int edje_edit_state_rel2_offset_y_get(Evas_Object *obj, char *part, char *state, double value) - void edje_edit_state_rel1_offset_x_set(Evas_Object *obj, char *part, char *state, double value, double x) - void edje_edit_state_rel1_offset_y_set(Evas_Object *obj, char *part, char *state, double value, double y) - void edje_edit_state_rel2_offset_x_set(Evas_Object *obj, char *part, char *state, double value, double x) - void edje_edit_state_rel2_offset_y_set(Evas_Object *obj, char *part, char *state, double value, double y) + Eina_Bool edje_edit_state_rel1_offset_x_set(Evas_Object *obj, char *part, char *state, double value, double x) + Eina_Bool edje_edit_state_rel1_offset_y_set(Evas_Object *obj, char *part, char *state, double value, double y) + Eina_Bool edje_edit_state_rel2_offset_x_set(Evas_Object *obj, char *part, char *state, double value, double x) + Eina_Bool edje_edit_state_rel2_offset_y_set(Evas_Object *obj, char *part, char *state, double value, double y) char *edje_edit_state_rel1_to_x_get(Evas_Object *obj, char *part, char *state, double value) char *edje_edit_state_rel1_to_y_get(Evas_Object *obj, char *part, char *state, double value) char *edje_edit_state_rel2_to_x_get(Evas_Object *obj, char *part, char *state, double value) char *edje_edit_state_rel2_to_y_get(Evas_Object *obj, char *part, char *state, double value) - void edje_edit_state_rel1_to_x_set(Evas_Object *obj, char *part, char *state, double value, char *rel_to) - void edje_edit_state_rel1_to_y_set(Evas_Object *obj, char *part, char *state, double value, char *rel_to) - void edje_edit_state_rel2_to_x_set(Evas_Object *obj, char *part, char *state, double value, char *rel_to) - void edje_edit_state_rel2_to_y_set(Evas_Object *obj, char *part, char *state, double value, char *rel_to) + Eina_Bool edje_edit_state_rel1_to_x_set(Evas_Object *obj, char *part, char *state, double value, char *rel_to) + Eina_Bool edje_edit_state_rel1_to_y_set(Evas_Object *obj, char *part, char *state, double value, char *rel_to) + Eina_Bool edje_edit_state_rel2_to_x_set(Evas_Object *obj, char *part, char *state, double value, char *rel_to) + Eina_Bool edje_edit_state_rel2_to_y_set(Evas_Object *obj, char *part, char *state, double value, char *rel_to) void edje_edit_state_color_get(Evas_Object *obj, char *part, char *state, double value, int *r, int *g, int *b, int *a) void edje_edit_state_color2_get(Evas_Object *obj, char *part, char *state, double value, int *r, int *g, int *b, int *a) void edje_edit_state_color3_get(Evas_Object *obj, char *part, char *state, double value, int *r, int *g, int *b, int *a) - void edje_edit_state_color_set(Evas_Object *obj, char *part, char *state, double value, int r, int g, int b, int a) - void edje_edit_state_color2_set(Evas_Object *obj, char *part, char *state, double value, int r, int g, int b, int a) - void edje_edit_state_color3_set(Evas_Object *obj, char *part, char *state, double value, int r, int g, int b, int a) + Eina_Bool edje_edit_state_color_set(Evas_Object *obj, char *part, char *state, double value, int r, int g, int b, int a) + Eina_Bool edje_edit_state_color2_set(Evas_Object *obj, char *part, char *state, double value, int r, int g, int b, int a) + Eina_Bool edje_edit_state_color3_set(Evas_Object *obj, char *part, char *state, double value, int r, int g, int b, int a) double edje_edit_state_align_x_get(Evas_Object *obj, char *part, char *state, double value) double edje_edit_state_align_y_get(Evas_Object *obj, char *part, char *state, double value) - void edje_edit_state_align_x_set(Evas_Object *obj, char *part, char *state, double value, double align) - void edje_edit_state_align_y_set(Evas_Object *obj, char *part, char *state, double value, double align) + Eina_Bool edje_edit_state_align_x_set(Evas_Object *obj, char *part, char *state, double value, double align) + Eina_Bool edje_edit_state_align_y_set(Evas_Object *obj, char *part, char *state, double value, double align) int edje_edit_state_min_w_get(Evas_Object *obj, char *part, char *state, double value) - void edje_edit_state_min_w_set(Evas_Object *obj, char *part, char *state, double value, int min_w) + Eina_Bool edje_edit_state_min_w_set(Evas_Object *obj, char *part, char *state, double value, int min_w) int edje_edit_state_min_h_get(Evas_Object *obj, char *part, char *state, double value) - void edje_edit_state_min_h_set(Evas_Object *obj, char *part, char *state, double value, int min_h) + Eina_Bool edje_edit_state_min_h_set(Evas_Object *obj, char *part, char *state, double value, int min_h) int edje_edit_state_max_w_get(Evas_Object *obj, char *part, char *state, double value) - void edje_edit_state_max_w_set(Evas_Object *obj, char *part, char *state, double value, int max_w) + Eina_Bool edje_edit_state_max_w_set(Evas_Object *obj, char *part, char *state, double value, int max_w) int edje_edit_state_max_h_get(Evas_Object *obj, char *part, char *state, double value) - void edje_edit_state_max_h_set(Evas_Object *obj, char *part, char *state, double value, int max_h) + Eina_Bool edje_edit_state_max_h_set(Evas_Object *obj, char *part, char *state, double value, int max_h) double edje_edit_state_aspect_min_get(Evas_Object *obj, char *part, char *state, double value) double edje_edit_state_aspect_max_get(Evas_Object *obj, char *part, char *state, double value) - void edje_edit_state_aspect_min_set(Evas_Object *obj, char *part, char *state, double value, double aspect) - void edje_edit_state_aspect_max_set(Evas_Object *obj, char *part, char *state, double value, double aspect) + Eina_Bool edje_edit_state_aspect_min_set(Evas_Object *obj, char *part, char *state, double value, double aspect) + Eina_Bool edje_edit_state_aspect_max_set(Evas_Object *obj, char *part, char *state, double value, double aspect) unsigned char edje_edit_state_aspect_pref_get(Evas_Object *obj, char *part, char *state, double value) - void edje_edit_state_aspect_pref_set(Evas_Object *obj, char *part, char *state, double value, unsigned char pref) + Eina_Bool edje_edit_state_aspect_pref_set(Evas_Object *obj, char *part, char *state, double value, unsigned char pref) double edje_edit_state_fill_origin_relative_x_get(Evas_Object *obj, char *part, char *state, double value) double edje_edit_state_fill_origin_relative_y_get(Evas_Object *obj, char *part, char *state, double value) int edje_edit_state_fill_origin_offset_x_get(Evas_Object *obj, char *part, char *state, double value) int edje_edit_state_fill_origin_offset_y_get(Evas_Object *obj, char *part, char *state, double value) - void edje_edit_state_fill_origin_relative_x_set(Evas_Object *obj, char *part, char *state, double value, double x) - void edje_edit_state_fill_origin_relative_y_set(Evas_Object *obj, char *part, char *state, double value, double x) - void edje_edit_state_fill_origin_offset_x_set(Evas_Object *obj, char *part, char *state, double value, double x) - void edje_edit_state_fill_origin_offset_y_set(Evas_Object *obj, char *part, char *state, double value, double y) + Eina_Bool edje_edit_state_fill_origin_relative_x_set(Evas_Object *obj, char *part, char *state, double value, double x) + Eina_Bool edje_edit_state_fill_origin_relative_y_set(Evas_Object *obj, char *part, char *state, double value, double x) + Eina_Bool edje_edit_state_fill_origin_offset_x_set(Evas_Object *obj, char *part, char *state, double value, double x) + Eina_Bool edje_edit_state_fill_origin_offset_y_set(Evas_Object *obj, char *part, char *state, double value, double y) double edje_edit_state_fill_size_relative_x_get(Evas_Object *obj, char *part, char *state, double value) double edje_edit_state_fill_size_relative_y_get(Evas_Object *obj, char *part, char *state, double value) int edje_edit_state_fill_size_offset_x_get(Evas_Object *obj, char *part, char *state, double value) int edje_edit_state_fill_size_offset_y_get(Evas_Object *obj, char *part, char *state, double value) - void edje_edit_state_fill_size_relative_x_set(Evas_Object *obj, char *part, char *state, double value, double x) - void edje_edit_state_fill_size_relative_y_set(Evas_Object *obj, char *part, char *state, double value, double x) - void edje_edit_state_fill_size_offset_x_set(Evas_Object *obj, char *part, char *state, double value, double x) - void edje_edit_state_fill_size_offset_y_set(Evas_Object *obj, char *part, char *state, double value, double y) + Eina_Bool edje_edit_state_fill_size_relative_x_set(Evas_Object *obj, char *part, char *state, double value, double x) + Eina_Bool edje_edit_state_fill_size_relative_y_set(Evas_Object *obj, char *part, char *state, double value, double x) + Eina_Bool edje_edit_state_fill_size_offset_x_set(Evas_Object *obj, char *part, char *state, double value, double x) + Eina_Bool edje_edit_state_fill_size_offset_y_set(Evas_Object *obj, char *part, char *state, double value, double y) Eina_Bool edje_edit_state_visible_get(Evas_Object *obj, char *part, char *state, double value) - void edje_edit_state_visible_set(Evas_Object *obj, char *part, char *state, double value, Eina_Bool visible) + Eina_Bool edje_edit_state_visible_set(Evas_Object *obj, char *part, char *state, double value, Eina_Bool visible) char *edje_edit_state_color_class_get(Evas_Object *obj, char *part, char *state, double value) - void edje_edit_state_color_class_set(Evas_Object *obj, char *part, char *state, double value, char *color_class) + Eina_Bool edje_edit_state_color_class_set(Evas_Object *obj, char *part, char *state, double value, char *color_class) # Eina_List * edje_edit_state_external_params_list_get(Evas_Object *obj, char *part, char *state, double value) # Eina_Bool edje_edit_state_external_param_get(Evas_Object *obj, char *part, char *state, double value, char *param, edje.c_edje.Edje_External_Param_Type *type, void **val) @@ -313,9 +313,9 @@ # scripts char* edje_edit_script_get(Evas_Object *obj) - void edje_edit_script_set(Evas_Object *obj, const_char *code) + Eina_Bool edje_edit_script_set(Evas_Object *obj, const_char *code) char* edje_edit_script_program_get(Evas_Object *obj, const_char *prog) - void edje_edit_script_program_set(Evas_Object *obj, const_char *prog, const_char *code) + Eina_Bool edje_edit_script_program_set(Evas_Object *obj, const_char *prog, const_char *code) Eina_Bool edje_edit_script_compile(Evas_Object *obj) const_Eina_List *edje_edit_script_error_list_get(Evas_Object *obj) diff -Nru python-efl-1.17.99~201312040125/include/efl.eina.pxd python-efl-1.8.2~201401231220/include/efl.eina.pxd --- python-efl-1.17.99~201312040125/include/efl.eina.pxd 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/include/efl.eina.pxd 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of diff -Nru python-efl-1.17.99~201312040125/include/efl.emotion.pxd python-efl-1.8.2~201401231220/include/efl.emotion.pxd --- python-efl-1.17.99~201312040125/include/efl.emotion.pxd 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/include/efl.emotion.pxd 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of diff -Nru python-efl-1.17.99~201312040125/include/efl.eo.enums.pxd python-efl-1.8.2~201401231220/include/efl.eo.enums.pxd --- python-efl-1.17.99~201312040125/include/efl.eo.enums.pxd 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/include/efl.eo.enums.pxd 2014-01-18 12:24:01.000000000 +0000 @@ -1,3 +1,19 @@ +# Copyright (C) 2007-2013 various contributors (see AUTHORS) +# +# This file is part of Python-EFL. +# +# Python-EFL is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 3 of the License, or (at your option) any later version. +# +# Python-EFL is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this Python-EFL. If not, see . cdef extern from "Eo.h": enum: diff -Nru python-efl-1.17.99~201312040125/include/efl.eo.pxd python-efl-1.8.2~201401231220/include/efl.eo.pxd --- python-efl-1.17.99~201312040125/include/efl.eo.pxd 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/include/efl.eo.pxd 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of diff -Nru python-efl-1.17.99~201312040125/include/efl.evas.enums.pxd python-efl-1.8.2~201401231220/include/efl.evas.enums.pxd --- python-efl-1.17.99~201312040125/include/efl.evas.enums.pxd 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/include/efl.evas.enums.pxd 2014-01-18 12:24:01.000000000 +0000 @@ -1,3 +1,20 @@ +# Copyright (C) 2007-2013 various contributors (see AUTHORS) +# +# This file is part of Python-EFL. +# +# Python-EFL is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 3 of the License, or (at your option) any later version. +# +# Python-EFL is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this Python-EFL. If not, see . + cdef extern from "Evas.h": ctypedef enum: EVAS_LAYER_MIN # bottom-most layer number diff -Nru python-efl-1.17.99~201312040125/include/efl.evas.pxd python-efl-1.8.2~201401231220/include/efl.evas.pxd --- python-efl-1.17.99~201312040125/include/efl.evas.pxd 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/include/efl.evas.pxd 2014-01-18 12:24:01.000000000 +0000 @@ -5,7 +5,7 @@ # Python-EFL is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# version 3 of the License, or (at your option) any later version. # # Python-EFL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -882,7 +882,7 @@ cdef class Object(Eo): cdef list _event_callbacks - + cdef int _set_properties_from_keyword_args(self, dict) except 0 cdef class Rectangle(Object): pass diff -Nru python-efl-1.17.99~201312040125/include/efl.utils.conversions.pxd python-efl-1.8.2~201401231220/include/efl.utils.conversions.pxd --- python-efl-1.17.99~201312040125/include/efl.utils.conversions.pxd 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/include/efl.utils.conversions.pxd 2014-01-18 12:24:01.000000000 +0000 @@ -1,3 +1,20 @@ +# Copyright (C) 2007-2013 various contributors (see AUTHORS) +# +# This file is part of Python-EFL. +# +# Python-EFL is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 3 of the License, or (at your option) any later version. +# +# Python-EFL is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this Python-EFL. If not, see . + from libc.string cimport const_char from efl.eina cimport Eina_List, const_Eina_List diff -Nru python-efl-1.17.99~201312040125/include/efl.utils.deprecated.pxd python-efl-1.8.2~201401231220/include/efl.utils.deprecated.pxd --- python-efl-1.17.99~201312040125/include/efl.utils.deprecated.pxd 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/include/efl.utils.deprecated.pxd 2014-01-18 12:24:01.000000000 +0000 @@ -1,3 +1,20 @@ +# Copyright (C) 2007-2013 various contributors (see AUTHORS) +# +# This file is part of Python-EFL. +# +# Python-EFL is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 3 of the License, or (at your option) any later version. +# +# Python-EFL is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this Python-EFL. If not, see . + cdef: class DEPRECATED(object): cdef: diff -Nru python-efl-1.17.99~201312040125/include/efl.utils.logger.pxd python-efl-1.8.2~201401231220/include/efl.utils.logger.pxd --- python-efl-1.17.99~201312040125/include/efl.utils.logger.pxd 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/include/efl.utils.logger.pxd 2014-01-18 12:24:01.000000000 +0000 @@ -1,3 +1,20 @@ +# Copyright (C) 2007-2013 various contributors (see AUTHORS) +# +# This file is part of Python-EFL. +# +# Python-EFL is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 3 of the License, or (at your option) any later version. +# +# Python-EFL is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this Python-EFL. If not, see . + cdef: object add_logger(object name) int PY_EFL_LOG_DOMAIN diff -Nru python-efl-1.17.99~201312040125/setup.py python-efl-1.8.2~201401231220/setup.py --- python-efl-1.17.99~201312040125/setup.py 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/setup.py 2014-01-18 12:24:01.000000000 +0000 @@ -12,6 +12,11 @@ script_path = os.path.dirname(os.path.abspath(__file__)) +# XXX: Force default visibility. See phab T504 +if os.getenv("CFLAGS") is not None and "-fvisibility=" in os.environ["CFLAGS"]: + os.environ["CFLAGS"] += " -fvisibility=default" + + # === Sphinx === try: from sphinx.setup_command import BuildDoc @@ -28,18 +33,34 @@ def pkg_config(name, require, min_vers=None): try: sys.stdout.write("Checking for " + name + ": ") - ver = subprocess.check_output(["pkg-config", "--modversion", require]).decode("utf-8").strip() + + call = subprocess.Popen( + ["pkg-config", "--modversion", require], stdout=subprocess.PIPE) + out, err = call.communicate() + ver = out.decode("utf-8").strip() + if min_vers is not None: - assert 0 == subprocess.call(["pkg-config", "--atleast-version", min_vers, require]) - cflags = subprocess.check_output(["pkg-config", "--cflags", require]).decode("utf-8").split() - libs = subprocess.check_output(["pkg-config", "--libs", require]).decode("utf-8").split() + assert 0 == subprocess.call( + ["pkg-config", "--atleast-version", min_vers, require]) + + call = subprocess.Popen( + ["pkg-config", "--cflags", require], stdout=subprocess.PIPE) + out, err = call.communicate() + cflags = out.decode("utf-8").split() + + call = subprocess.Popen( + ["pkg-config", "--libs", require], stdout=subprocess.PIPE) + out, err = call.communicate() + libs = out.decode("utf-8").split() + sys.stdout.write("OK, found " + ver + "\n") + return (cflags, libs) except (OSError, subprocess.CalledProcessError): print("Did not find " + name + " with 'pkg-config'.") return None except (AssertionError): - print(name + " version mismatch. Found: " + ver + " Needed: " + min_vers) + print(name+" version mismatch. Found: "+ver+" Needed: "+min_vers) return None @@ -189,13 +210,13 @@ packages.append("edje") package_dirs["edje"] = "compat/edje" - # === Edje_Edit === - # edje_edit_ext = Extension("edje_edit", ["efl/edje/efl.edje_edit"+module_suffix], - # define_macros = [('EDJE_EDIT_IS_UNSTABLE_AND_I_KNOW_ABOUT_IT', None)], - # include_dirs = ['include/'], - # extra_compile_args = edje_cflags, - # extra_link_args = edje_libs + eina_libs + evas_libs) - # modules.append(edje_edit_ext) + # --- Edje_Edit --- + edje_edit_ext = Extension("edje_edit", ["efl/edje/efl.edje_edit"+module_suffix], + define_macros = [('EDJE_EDIT_IS_UNSTABLE_AND_I_KNOW_ABOUT_IT', None)], + include_dirs = ['include/'], + extra_compile_args = edje_cflags, + extra_link_args = edje_libs + eina_libs + evas_libs) + modules.append(edje_edit_ext) # Emotion @@ -338,7 +359,7 @@ name = "python-efl", fullname = "Python bindings for Enlightenment Foundation Libraries", description = "Python bindings for Enlightenment Foundation Libraries", - version = "1.7.99", + version = "1.8.1", author = "Gustavo Sverzut Barbieri, Simon Busch, Boris 'billiob' Faure, Davide 'davemds' Andreoli, Fabiano Fidêncio, Bruno Dilly, Tiago Falcão, Joost Albers, Kai Huuhko, Ulisses Furquim", author_email = "dave@gurumeditation.it, kai.huuhko@gmail.com", maintainer = "Kai Huuhko, Davide Andreoli", diff -Nru python-efl-1.17.99~201312040125/tests/00_run_all_tests.py python-efl-1.8.2~201401231220/tests/00_run_all_tests.py --- python-efl-1.17.99~201312040125/tests/00_run_all_tests.py 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/tests/00_run_all_tests.py 2014-01-18 12:24:01.000000000 +0000 @@ -5,5 +5,5 @@ loader = unittest.TestLoader() suite = loader.discover('.') -runner = unittest.TextTestRunner(verbosity=2) +runner = unittest.TextTestRunner(verbosity=1, buffer=True) result = runner.run(suite) diff -Nru python-efl-1.17.99~201312040125/tests/edje/disabled_test_04_edit.py python-efl-1.8.2~201401231220/tests/edje/disabled_test_04_edit.py --- python-efl-1.17.99~201312040125/tests/edje/disabled_test_04_edit.py 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/tests/edje/disabled_test_04_edit.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,491 +0,0 @@ -#!/usr/bin/env python - -from efl import evas -from efl import ecore -from efl import edje -from efl.edje import EDJE_PART_TYPE_RECTANGLE -from efl.edje_edit import EdjeEdit, Text_Style, Text_Style_Tag, Color_Class, \ - Part, Program -import os, unittest, shutil - - -theme_path = os.path.dirname(os.path.abspath(__file__)) -orig_theme_file = os.path.join(theme_path, "theme.edj") -theme_file = os.path.join(theme_path, "theme_working.edj") - - -class TestEdjeEditBase(unittest.TestCase): - def setUp(self): - # copy the edje file to a temp one as we are going to edit it - shutil.copy(orig_theme_file, theme_file) - - self.canvas = evas.Canvas(method="buffer", - size=(400, 500), - viewport=(0, 0, 400, 500)) - self.canvas.engine_info_set(self.canvas.engine_info_get()) - - def tearDown(self): - self.canvas.delete() - os.remove(theme_file) - - - def testConstructor(self): - o = EdjeEdit(self.canvas, file=theme_file, group="main") - self.assertIsInstance(o, EdjeEdit) - o.delete() - self.assertTrue(o.is_deleted()) - - -class TestEdjeEditGeneral(unittest.TestCase): - def setUp(self): - shutil.copy(orig_theme_file, theme_file) - self.canvas = evas.Canvas(method="buffer", - size=(400, 500), - viewport=(0, 0, 400, 500)) - self.canvas.engine_info_set(self.canvas.engine_info_get()) - self.o = EdjeEdit(self.canvas, file=theme_file, group="main") - - def tearDown(self): - self.o.delete() - self.canvas.delete() - os.remove(theme_file) - - def testGeneral(self): - self.assertEqual(self.o.compiler_get(), "edje_cc") - self.assertEqual(self.o.file_get(), (unicode(theme_file), u"main")) - # self.o.print_internal_status() # FIXME this crash badly - - def testGroup(self): - g = self.o.current_group - - self.assertEqual((g.w_min, g.w_max), (200, 400)) - self.assertEqual((g.h_min, g.h_max), (200, 400)) - - g.w_min = g.h_min = 201 - g.w_max = g.h_max = 401 - - self.assertEqual((g.w_min, g.w_max), (201, 401)) - self.assertEqual((g.h_min, g.h_max), (201, 401)) - - # TODO test g.rename - - def testGroupAdd(self): - self.assertFalse(self.o.group_exist("test_new_group")) - self.o.group_add("test_new_group") - self.assertTrue(self.o.group_exist("test_new_group")) - - @unittest.skip("crash badly") # TODO FIXME - def testGroupDel(self): - self.o.group_add("test_new_group2") - self.o.group_del("test_new_group2") - self.assertFalse(o.group_exist("test_new_group2")) - - def testData(self): - self.assertIn("key1", self.o.data) - self.assertIn("key2", self.o.data) - - self.assertEqual(self.o.data_get("key1"), "value1") - self.assertEqual(self.o.data_get("key2"), "value2") - - self.o.data_set("key1", "new_value1") - self.o.data_set("key2", "new_value2") - self.assertEqual(self.o.data_get("key1"), "new_value1") - self.assertEqual(self.o.data_get("key2"), "new_value2") - - self.o.data_add("key5", "value5") - self.assertEqual(self.o.data_get("key5"), "value5") - - self.o.data_rename("key5", "key55") - self.assertEqual(self.o.data_get("key55"), "value5") - - # self.o.data_del("key44") # FIXME this crash badly - # self.assertNotIn("key44", self.o.data) - - def testGroupData(self): - self.assertIn("key3", self.o.group_data) - self.assertIn("key4", self.o.group_data) - - self.assertEqual(self.o.group_data_get("key3"), "value3") - self.assertEqual(self.o.group_data_get("key4"), "value4") - - self.o.group_data_set("key3", "new_value3") - self.o.group_data_set("key4", "new_value4") - self.assertEqual(self.o.group_data_get("key3"), "new_value3") - self.assertEqual(self.o.group_data_get("key4"), "new_value4") - - self.o.group_data_add("key6", "value6") - self.assertEqual(self.o.group_data_get("key6"), "value6") - - self.o.group_data_del("key6") - self.assertNotIn("key6", self.o.group_data) - - def testTextStyles(self): - self.assertIn("style1", self.o.text_styles) - self.assertIn("style2", self.o.text_styles) - self.assertNotIn("styleNOTEXISTS", self.o.text_styles) - - style = self.o.text_style_get("style1") - self.assertIsInstance(style, Text_Style) - self.assertIn("DEFAULT", style.tags) - self.assertIn("br", style.tags) - self.assertIn("tab", style.tags) - self.assertNotIn("b", style.tags) - - tag = style.tag_get("DEFAULT") - self.assertIsInstance(tag, Text_Style_Tag) - - # TODO more test for tags add/del - - def testColorClasses(self): - self.assertIn("colorclass1", self.o.color_classes) - self.assertIn("colorclass2", self.o.color_classes) - self.assertNotIn("colorclassNOTEXISTS", self.o.color_classes) - - cc1 = self.o.color_class_get("colorclass1") - cc2 = self.o.color_class_get("colorclass2") - self.assertIsInstance(cc1, Color_Class) - self.assertIsInstance(cc2, Color_Class) - - self.assertEqual(cc1.name, "colorclass1") - self.assertEqual(cc2.name, "colorclass2") - - cc1.name = "colorclass1_new" - self.assertEqual(cc1.name, "colorclass1_new") - - self.assertEqual(cc1.colors_get(), ((1,2,3,4),(5,6,7,8),(9,10,11,12))) - self.assertEqual(cc2.colors_get(), ((13,14,15,16),(17,18,19,20),(21,22,23,24))) - - cc1.colors_set(50,51,52,53, 54,55,56,57, 58,59,60,61) - cc2.colors_set(70,71,72,73, 74,75,76,77, 78,79,80,81) - self.assertEqual(cc1.colors_get(), ((50,51,52,53),(54,55,56,57),(58,59,60,61))) - self.assertEqual(cc2.colors_get(), ((70,71,72,73),(74,75,76,77),(78,79,80,81))) - - self.o.color_class_add("colorclass3") - self.assertIn("colorclass3", self.o.color_classes) - cc3 = self.o.color_class_get("colorclass3") - self.assertIsInstance(cc3, Color_Class) - - cc3.colors_set(85,86,87,88, 89,90,91,92, 93,94,95,96) - self.assertEqual(cc3.colors_get(), ((85,86,87,88),(89,90,91,92),(93,94,95,96))) - - self.o.color_class_del("colorclass3") - self.assertNotIn("colorclass3", self.o.color_classes) - - @unittest.skip("need to fix external_del to not leave a NULL element") # TODO FIXME - def testExternal(self): - self.assertEqual(self.o.externals, ['elm']) - self.o.external_add('emotion') - self.assertEqual(self.o.externals, ['elm', 'emotion']) - self.o.external_del('emotion') - self.assertEqual(self.o.externals, ['elm']) - - # TODO test for images, image_id_get, image_del - - def testScript(self): - self.assertEqual(len(self.o.script), 104) - # TODO test setting .script, compile and .script_errors - - -class TestEdjeEditParts(unittest.TestCase): - def setUp(self): - shutil.copy(orig_theme_file, theme_file) - self.canvas = evas.Canvas(method="buffer", - size=(400, 500), - viewport=(0, 0, 400, 500)) - self.canvas.engine_info_set(self.canvas.engine_info_get()) - self.o = EdjeEdit(self.canvas, file=theme_file, group="main") - - def tearDown(self): - self.o.delete() - self.canvas.delete() - os.remove(theme_file) - - def testPart(self): - self.assertEqual(len(self.o.parts), 42) - self.assertTrue(self.o.part_exist("bg")) - self.assertTrue(self.o.part_exist("rect")) - self.assertFalse(self.o.part_exist("NOTEXIST")) - - p = self.o.part_get("rect") - self.assertIsInstance(p, Part) - self.assertEqual(p.type, EDJE_PART_TYPE_RECTANGLE) - - def testPartRename(self): - p = self.o.part_get("rect") - self.assertEqual(p.name, "rect") - p.name = "rect_new_name" - self.assertEqual(p.name, "rect_new_name") - p.rename("rect") - self.assertEqual(p.name, "rect") - - @unittest.skip("segfault") # FIXME - def testPartAdd(self): - self.o.part_add("new_part", EDJE_PART_TYPE_RECTANGLE) - self.assertTrue(self.o.part_exist("new_part")) - self.assertEqual(len(self.o.parts), 43) - - p = self.o.part_get("new_part") - self.assertIsInstance(p, Part) - - @unittest.skip("part_del() crash") # TODO FIXME - def testPartDel(self): - self.assertTrue(self.o.part_exist("rect")) - self.o.part_del("rect") - self.assertFalse(self.o.part_exist("rect")) - - @unittest.skip("cause segfault") # TODO FIXME - def testPartStacking(self): - # print(self.o.parts) - p = self.o.part_get("rect") - self.assertEqual(p.below_get(), "bg") - self.assertEqual(p.above_get(), "label") - - p.restack_below() - p.restack_above() - self.assertEqual(p.below_get(), "bg") - self.assertEqual(p.above_get(), "label") - - @unittest.skip("cause segfault") # TODO FIXME - def testPartClip(self): - p = self.o.part_get("edit_test") - self.assertEqual(p.clip_to, "test_clip") - p.clip_to = "bg" - self.assertEqual(p.clip_to, "bg") - - def testPartSource(self): - p = self.o.part_get("edit_test") - self.assertEqual(p.source, None) - - def testPartMouseEvents(self): - p = self.o.part_get("edit_test") - self.assertEqual(p.mouse_events, False) - p.mouse_events = True - self.assertEqual(p.mouse_events, True) - - def testPartRepeatEvents(self): - p = self.o.part_get("edit_test") - self.assertEqual(p.repeat_events, False) - p.repeat_events = True - self.assertEqual(p.repeat_events, True) - - def testPartEffect(self): - p = self.o.part_get("edit_test") - self.assertEqual(p.effect, 18) - p.effect = 2 - self.assertEqual(p.effect, 2) - - def testPartIgnoreFlags(self): - p = self.o.part_get("edit_test") - self.assertEqual(p.ignore_flags, 1) - p.ignore_flags = 0 - self.assertEqual(p.ignore_flags, 0) - - def testPartScale(self): - p = self.o.part_get("edit_test") - self.assertEqual(p.scale, True) - p.scale = False - self.assertEqual(p.scale, False) - - def testPartDrag(self): - p = self.o.part_get("edit_test") - self.assertEqual(p.drag, (1,1)) - p.drag = (0,0) - self.assertEqual(p.drag, (0,0)) - - def testPartDragStep(self): - p = self.o.part_get("edit_test") - self.assertEqual(p.drag_step, (6,7)) - p.drag_step = (16,17) - self.assertEqual(p.drag_step, (16,17)) - - def testPartDragCount(self): - p = self.o.part_get("edit_test") - self.assertEqual(p.drag_count, (8,9)) - p.drag_count = (18,19) - self.assertEqual(p.drag_count, (18,19)) - - def testPartDragConfine(self): - p = self.o.part_get("edit_test") - self.assertEqual(p.drag_confine, "label") - p.drag_confine = "bg" - self.assertEqual(p.drag_confine, "bg") - - def testPartDragEvent(self): - p = self.o.part_get("edit_test") - self.assertEqual(p.drag_event, "edit_test_drag_event") - p.drag_event = "edit_test_drag_event" - self.assertEqual(p.drag_event, "edit_test_drag_event") - - def testPartApi(self): - p = self.o.part_get("edit_test") - self.assertEqual(p.api, ("api_name", "api_description")) - p.api = ("new_api_name", "new_api_desc") - self.assertEqual(p.api, ("new_api_name", "new_api_desc")) - - -class TestEdjeEditPrograms(unittest.TestCase): - def setUp(self): - shutil.copy(orig_theme_file, theme_file) - self.canvas = evas.Canvas(method="buffer", - size=(400, 500), - viewport=(0, 0, 400, 500)) - self.canvas.engine_info_set(self.canvas.engine_info_get()) - self.o = EdjeEdit(self.canvas, file=theme_file, group="main") - - def tearDown(self): - self.o.delete() - self.canvas.delete() - os.remove(theme_file) - - def testProgram(self): - o = self.o - self.assertIn("prog1", o.programs) - self.assertIn("prog2", o.programs) - self.assertIn("prog3", o.programs) - self.assertNotIn("progNOTIN", o.programs) - - pr1 = o.program_get("prog1") - self.assertIsInstance(pr1, Program) - self.assertEqual(pr1.edje_get(), self.o) - - o.program_add("prog5") - pr5 = o.program_get("prog5") - self.assertIsInstance(pr5, Program) - self.assertTrue(o.program_exist("prog5")) - - pr5.name = "prog10" - self.assertTrue(o.program_exist("prog10")) - self.assertFalse(o.program_exist("prog5")) - - pr5.rename("prog5") - o.program_del("prog5") - self.assertFalse(o.program_exist("prog5")) - self.assertNotIn("prog5", o.programs) - - # TODO test Program.run() - - def testProgramSource(self): - p = self.o.program_get("prog1") - self.assertEqual(p.source_get(), "edit_test") - p.source_set("edit_*") - self.assertEqual(p.source_get(), "edit_*") - - def testProgramSignal(self): - p = self.o.program_get("prog1") - self.assertEqual(p.signal_get(), "mouse,down,1") - p.signal_set("mouse,down,2") - self.assertEqual(p.signal_get(), "mouse,down,2") - - def testProgramIn(self): - p = self.o.program_get("prog1") - self.assertEqual(p.in_from_get(), 1.1) - self.assertEqual(p.in_range_get(), 2.2) - p.in_from_set(3.3) - p.in_range_set(4.4) - self.assertEqual(p.in_from_get(), 3.3) - self.assertEqual(p.in_range_get(), 4.4) - - def testProgramAction(self): - p = self.o.program_get("prog1") - self.assertEqual(p.action_get(), 1) - p.action_set(2) - self.assertEqual(p.action_get(), 2) - # restore the original to not mess stuff - p.action_set(1) - - def testProgramTargets(self): - p = self.o.program_get("prog1") - self.assertEqual(p.targets_get(), ["edit_test", "test_clip"]) - p.target_del("test_clip") - self.assertEqual(p.targets_get(), ["edit_test"]) - p.target_add("test_clip") - self.assertEqual(p.targets_get(), ["edit_test", "test_clip"]) - p.targets_clear() - self.assertEqual(p.targets_get(), []) - - @unittest.skip("Program.after_add() does not work") - def testProgramAfters(self): - p = self.o.program_get("prog1") - self.assertEqual(p.afters_get(), ["prog2", "prog3"]) - p.after_del("prog2") - self.assertEqual(p.afters_get(), ["prog3"]) - p.after_add("prog4") - self.assertEqual(p.afters_get(), ["prog3", "prog4"]) - p.afters_clear() - self.assertEqual(p.afters_get(), []) - - def testProgramState(self): - p = self.o.program_get("prog1") - self.assertEqual(p.state_get(), "state2") - self.assertEqual(p.value_get(), 0.1) - p.state_set("state1") - p.value_set(0.0) - self.assertEqual(p.state_get(), "state1") - self.assertEqual(p.value_get(), 0.0) - - def testProgramApi(self): - p = self.o.program_get("prog1") - self.assertEqual(p.api, ("p_api_name", "p_api_desc")) - p.api = ("new_name", "new_desc") - self.assertEqual(p.api, ("new_name", "new_desc")) - - @unittest.skip("Program.script does not work") - def testProgramScript(self): - p = self.o.program_get("emit_back_message") - print(p.script) - - -class TestEdjeEditPartStates(unittest.TestCase): - def setUp(self): - shutil.copy(orig_theme_file, theme_file) - self.canvas = evas.Canvas(method="buffer", - size=(400, 500), - viewport=(0, 0, 400, 500)) - self.canvas.engine_info_set(self.canvas.engine_info_get()) - self.o = EdjeEdit(self.canvas, file=theme_file, group="main") - - def tearDown(self): - self.o.delete() - self.canvas.delete() - os.remove(theme_file) - - @unittest.skip("segfault") # FIXME - def testPartStates(self): - p = self.o.part_get("edit_test") - self.assertEqual(p.states, ["default 0.00","state1 0.00","state2 0.00","state2 0.10"]) - - # state_add() - p.state_add("state9", 0.1) - self.assertEqual(p.states, ["default 0.00","state1 0.00","state2 0.00","state2 0.10","state9 0.10"]) - - # state_selected TODO FIXME state_selected_set does not work - # self.assertEqual(p.state_selected_get(), ("default", 0.0)) - # p.state_selected_set("state2", 0.1) - # self.assertEqual(p.state_selected_get(), ("state2", 0.1)) - - # state del() TODO FIXME state_del does not work - # p.state_del("state9", 0.1) - # self.assertEqual(p.states, ["default 0.00","state1 0.00","state2 0.00","state2 0.10"]) - - # TODO test state_copy - - @unittest.skip("state_exist does not work") # TODO FIXME - def testPartStateExist(self): - p = self.o.part_get("edit_test") - self.assertFalse(p.state_exist("stateNOTEXISTS", 0.1)) - self.assertTrue(p.state_exist("state1", 0.0)) - self.assertTrue(p.state_exist("state2", 0.1)) - - @unittest.skip("PartState does not work") # TODO FIXME - def testPartStateProps(self): - p = self.o.part_get("edit_test") - s = p.state_get("state1", 0.0) - print(s) - print(s.rel1_to_get()) - -if __name__ == '__main__': - unittest.main(verbosity=2) - edje.shutdown() - ecore.shutdown() - evas.shutdown() - diff -Nru python-efl-1.17.99~201312040125/tests/edje/test_04_edit.py python-efl-1.8.2~201401231220/tests/edje/test_04_edit.py --- python-efl-1.17.99~201312040125/tests/edje/test_04_edit.py 1970-01-01 00:00:00.000000000 +0000 +++ python-efl-1.8.2~201401231220/tests/edje/test_04_edit.py 2014-01-18 12:24:01.000000000 +0000 @@ -0,0 +1,488 @@ +#!/usr/bin/env python + +from efl import evas +from efl import ecore +from efl import edje +from efl.edje import EDJE_PART_TYPE_RECTANGLE +from efl.edje_edit import EdjeEdit, Text_Style, Text_Style_Tag, Color_Class, \ + Part, Program +import os, unittest, shutil + + +theme_path = os.path.dirname(os.path.abspath(__file__)) +orig_theme_file = os.path.join(theme_path, "theme.edj") +theme_file = os.path.join(theme_path, "theme_working.edj") + + +class TestEdjeEditBase(unittest.TestCase): + def setUp(self): + # copy the edje file to a temp one as we are going to edit it + shutil.copy(orig_theme_file, theme_file) + + self.canvas = evas.Canvas(method="buffer", + size=(400, 500), + viewport=(0, 0, 400, 500)) + self.canvas.engine_info_set(self.canvas.engine_info_get()) + + def tearDown(self): + self.canvas.delete() + os.remove(theme_file) + + + def testConstructor(self): + o = EdjeEdit(self.canvas, file=theme_file, group="main") + self.assertIsInstance(o, EdjeEdit) + o.delete() + self.assertTrue(o.is_deleted()) + + +class TestEdjeEditGeneral(unittest.TestCase): + def setUp(self): + shutil.copy(orig_theme_file, theme_file) + self.canvas = evas.Canvas(method="buffer", + size=(400, 500), + viewport=(0, 0, 400, 500)) + self.canvas.engine_info_set(self.canvas.engine_info_get()) + self.o = EdjeEdit(self.canvas, file=theme_file, group="main") + + def tearDown(self): + self.o.delete() + self.canvas.delete() + os.remove(theme_file) + + def testGeneral(self): + self.assertEqual(self.o.compiler_get(), "edje_cc") + self.assertEqual(self.o.file_get(), (unicode(theme_file), u"main")) + # self.o.print_internal_status() # FIXME this crash badly + + def testGroup(self): + g = self.o.current_group + + self.assertEqual((g.w_min, g.w_max), (200, 400)) + self.assertEqual((g.h_min, g.h_max), (200, 400)) + + g.w_min = g.h_min = 201 + g.w_max = g.h_max = 401 + + self.assertEqual((g.w_min, g.w_max), (201, 401)) + self.assertEqual((g.h_min, g.h_max), (201, 401)) + + # TODO test g.rename + + def testGroupAdd(self): + self.assertFalse(self.o.group_exist("test_new_group")) + self.o.group_add("test_new_group") + self.assertTrue(self.o.group_exist("test_new_group")) + + @unittest.skip("crash badly") # TODO FIXME + def testGroupDel(self): + self.o.group_add("test_new_group2") + self.o.group_del("test_new_group2") + self.assertFalse(self.o.group_exist("test_new_group2")) + + def testData(self): + self.assertIn("key1", self.o.data) + self.assertIn("key2", self.o.data) + + self.assertEqual(self.o.data_get("key1"), "value1") + self.assertEqual(self.o.data_get("key2"), "value2") + + self.o.data_set("key1", "new_value1") + self.o.data_set("key2", "new_value2") + self.assertEqual(self.o.data_get("key1"), "new_value1") + self.assertEqual(self.o.data_get("key2"), "new_value2") + + self.o.data_add("key5", "value5") + self.assertEqual(self.o.data_get("key5"), "value5") + + self.o.data_rename("key5", "key55") + self.assertEqual(self.o.data_get("key55"), "value5") + + self.o.data_del("key44") # FIXME this crash badly + self.assertNotIn("key44", self.o.data) + + def testGroupData(self): + self.assertIn("key3", self.o.group_data) + self.assertIn("key4", self.o.group_data) + + self.assertEqual(self.o.group_data_get("key3"), "value3") + self.assertEqual(self.o.group_data_get("key4"), "value4") + + self.o.group_data_set("key3", "new_value3") + self.o.group_data_set("key4", "new_value4") + self.assertEqual(self.o.group_data_get("key3"), "new_value3") + self.assertEqual(self.o.group_data_get("key4"), "new_value4") + + self.o.group_data_add("key6", "value6") + self.assertEqual(self.o.group_data_get("key6"), "value6") + + self.o.group_data_del("key6") + self.assertNotIn("key6", self.o.group_data) + + def testTextStyles(self): + self.assertIn("style1", self.o.text_styles) + self.assertIn("style2", self.o.text_styles) + self.assertNotIn("styleNOTEXISTS", self.o.text_styles) + + style = self.o.text_style_get("style1") + self.assertIsInstance(style, Text_Style) + self.assertIn("DEFAULT", style.tags) + self.assertIn("br", style.tags) + self.assertIn("tab", style.tags) + self.assertNotIn("b", style.tags) + + tag = style.tag_get("DEFAULT") + self.assertIsInstance(tag, Text_Style_Tag) + + # TODO more test for tags add/del + + def testColorClasses(self): + self.assertIn("colorclass1", self.o.color_classes) + self.assertIn("colorclass2", self.o.color_classes) + self.assertNotIn("colorclassNOTEXISTS", self.o.color_classes) + + cc1 = self.o.color_class_get("colorclass1") + cc2 = self.o.color_class_get("colorclass2") + self.assertIsInstance(cc1, Color_Class) + self.assertIsInstance(cc2, Color_Class) + + self.assertEqual(cc1.name, "colorclass1") + self.assertEqual(cc2.name, "colorclass2") + + cc1.name = "colorclass1_new" + self.assertEqual(cc1.name, "colorclass1_new") + + self.assertEqual(cc1.colors_get(), ((1,2,3,4),(5,6,7,8),(9,10,11,12))) + self.assertEqual(cc2.colors_get(), ((13,14,15,16),(17,18,19,20),(21,22,23,24))) + + cc1.colors_set(50,51,52,53, 54,55,56,57, 58,59,60,61) + cc2.colors_set(70,71,72,73, 74,75,76,77, 78,79,80,81) + self.assertEqual(cc1.colors_get(), ((50,51,52,53),(54,55,56,57),(58,59,60,61))) + self.assertEqual(cc2.colors_get(), ((70,71,72,73),(74,75,76,77),(78,79,80,81))) + + self.o.color_class_add("colorclass3") + self.assertIn("colorclass3", self.o.color_classes) + cc3 = self.o.color_class_get("colorclass3") + self.assertIsInstance(cc3, Color_Class) + + cc3.colors_set(85,86,87,88, 89,90,91,92, 93,94,95,96) + self.assertEqual(cc3.colors_get(), ((85,86,87,88),(89,90,91,92),(93,94,95,96))) + + self.o.color_class_del("colorclass3") + self.assertNotIn("colorclass3", self.o.color_classes) + + @unittest.skip("need to fix external_del to not leave a NULL element") # TODO FIXME + def testExternal(self): + self.assertEqual(self.o.externals, ['elm']) + self.o.external_add('emotion') + self.assertEqual(self.o.externals, ['elm', 'emotion']) + self.o.external_del('emotion') + self.assertEqual(self.o.externals, ['elm']) + + # TODO test for images, image_id_get, image_del + + def testScript(self): + self.assertEqual(len(self.o.script), 104) + # TODO test setting .script, compile and .script_errors + + +class TestEdjeEditParts(unittest.TestCase): + def setUp(self): + shutil.copy(orig_theme_file, theme_file) + self.canvas = evas.Canvas(method="buffer", + size=(400, 500), + viewport=(0, 0, 400, 500)) + self.canvas.engine_info_set(self.canvas.engine_info_get()) + self.o = EdjeEdit(self.canvas, file=theme_file, group="main") + + def tearDown(self): + self.o.delete() + self.canvas.delete() + os.remove(theme_file) + + def testPart(self): + self.assertEqual(len(self.o.parts), 42) + self.assertTrue(self.o.part_exist("bg")) + self.assertTrue(self.o.part_exist("rect")) + self.assertFalse(self.o.part_exist("NOTEXIST")) + + p = self.o.part_get("rect") + self.assertIsInstance(p, Part) + self.assertEqual(p.type, EDJE_PART_TYPE_RECTANGLE) + + def testPartRename(self): + p = self.o.part_get("rect") + self.assertEqual(p.name, "rect") + p.name = "rect_new_name" + self.assertEqual(p.name, "rect_new_name") + p.rename("rect") + self.assertEqual(p.name, "rect") + + def testPartAdd(self): + self.o.part_add("new_part", EDJE_PART_TYPE_RECTANGLE) + self.assertTrue(self.o.part_exist("new_part")) + self.assertEqual(len(self.o.parts), 43) + + p = self.o.part_get("new_part") + self.assertIsInstance(p, Part) + + def testPartDel(self): + self.assertTrue(self.o.part_exist("rect")) + self.o.part_del("rect") + self.assertFalse(self.o.part_exist("rect")) + + def testPartStacking(self): + # print(self.o.parts) + p = self.o.part_get("rect") + self.assertEqual(p.below_get(), "bg") + self.assertEqual(p.above_get(), "label") + + p.restack_below() + p.restack_above() + self.assertEqual(p.below_get(), "bg") + self.assertEqual(p.above_get(), "label") + + def testPartClip(self): + p = self.o.part_get("edit_test") + self.assertEqual(p.clip_to, "test_clip") + p.clip_to = "bg" + self.assertEqual(p.clip_to, "bg") + + def testPartSource(self): + p = self.o.part_get("edit_test") + self.assertEqual(p.source, None) + + def testPartMouseEvents(self): + p = self.o.part_get("edit_test") + self.assertEqual(p.mouse_events, False) + p.mouse_events = True + self.assertEqual(p.mouse_events, True) + + def testPartRepeatEvents(self): + p = self.o.part_get("edit_test") + self.assertEqual(p.repeat_events, False) + p.repeat_events = True + self.assertEqual(p.repeat_events, True) + + @unittest.expectedFailure + def testPartEffect(self): + p = self.o.part_get("edit_test") + self.assertEqual(p.effect, 18) + p.effect = 2 + self.assertEqual(p.effect, 2) + + def testPartIgnoreFlags(self): + p = self.o.part_get("edit_test") + self.assertEqual(p.ignore_flags, 1) + p.ignore_flags = 0 + self.assertEqual(p.ignore_flags, 0) + + def testPartScale(self): + p = self.o.part_get("edit_test") + self.assertEqual(p.scale, True) + p.scale = False + self.assertEqual(p.scale, False) + + def testPartDrag(self): + p = self.o.part_get("edit_test") + self.assertEqual(p.drag, (1,1)) + p.drag = (0,0) + self.assertEqual(p.drag, (0,0)) + + def testPartDragStep(self): + p = self.o.part_get("edit_test") + self.assertEqual(p.drag_step, (6,7)) + p.drag_step = (16,17) + self.assertEqual(p.drag_step, (16,17)) + + def testPartDragCount(self): + p = self.o.part_get("edit_test") + self.assertEqual(p.drag_count, (8,9)) + p.drag_count = (18,19) + self.assertEqual(p.drag_count, (18,19)) + + def testPartDragConfine(self): + p = self.o.part_get("edit_test") + self.assertEqual(p.drag_confine, "label") + p.drag_confine = "bg" + self.assertEqual(p.drag_confine, "bg") + + def testPartDragEvent(self): + p = self.o.part_get("edit_test") + self.assertEqual(p.drag_event, "edit_test_drag_event") + p.drag_event = "edit_test_drag_event" + self.assertEqual(p.drag_event, "edit_test_drag_event") + + def testPartApi(self): + p = self.o.part_get("edit_test") + self.assertEqual(p.api, ("api_name", "api_description")) + p.api = ("new_api_name", "new_api_desc") + self.assertEqual(p.api, ("new_api_name", "new_api_desc")) + + +class TestEdjeEditPrograms(unittest.TestCase): + def setUp(self): + shutil.copy(orig_theme_file, theme_file) + self.canvas = evas.Canvas(method="buffer", + size=(400, 500), + viewport=(0, 0, 400, 500)) + self.canvas.engine_info_set(self.canvas.engine_info_get()) + self.o = EdjeEdit(self.canvas, file=theme_file, group="main") + + def tearDown(self): + self.o.delete() + self.canvas.delete() + os.remove(theme_file) + + def testProgram(self): + o = self.o + self.assertIn("prog1", o.programs) + self.assertIn("prog2", o.programs) + self.assertIn("prog3", o.programs) + self.assertNotIn("progNOTIN", o.programs) + + pr1 = o.program_get("prog1") + self.assertIsInstance(pr1, Program) + self.assertEqual(pr1.edje_get(), self.o) + + o.program_add("prog5") + pr5 = o.program_get("prog5") + self.assertIsInstance(pr5, Program) + self.assertTrue(o.program_exist("prog5")) + + pr5.name = "prog10" + self.assertTrue(o.program_exist("prog10")) + self.assertFalse(o.program_exist("prog5")) + + pr5.rename("prog5") + o.program_del("prog5") + self.assertFalse(o.program_exist("prog5")) + self.assertNotIn("prog5", o.programs) + + # TODO test Program.run() + + def testProgramSource(self): + p = self.o.program_get("prog1") + self.assertEqual(p.source_get(), "edit_test") + p.source_set("edit_*") + self.assertEqual(p.source_get(), "edit_*") + + def testProgramSignal(self): + p = self.o.program_get("prog1") + self.assertEqual(p.signal_get(), "mouse,down,1") + p.signal_set("mouse,down,2") + self.assertEqual(p.signal_get(), "mouse,down,2") + + def testProgramIn(self): + p = self.o.program_get("prog1") + self.assertEqual(p.in_from_get(), 1.1) + self.assertEqual(p.in_range_get(), 2.2) + p.in_from_set(3.3) + p.in_range_set(4.4) + self.assertEqual(p.in_from_get(), 3.3) + self.assertEqual(p.in_range_get(), 4.4) + + def testProgramAction(self): + p = self.o.program_get("prog1") + self.assertEqual(p.action_get(), 1) + p.action_set(2) + self.assertEqual(p.action_get(), 2) + # restore the original to not mess stuff + p.action_set(1) + + def testProgramTargets(self): + p = self.o.program_get("prog1") + self.assertEqual(p.targets_get(), ["edit_test", "test_clip"]) + p.target_del("test_clip") + self.assertEqual(p.targets_get(), ["edit_test"]) + p.target_add("test_clip") + self.assertEqual(p.targets_get(), ["edit_test", "test_clip"]) + p.targets_clear() + self.assertEqual(p.targets_get(), []) + + #@unittest.skip("Program.after_add() does not work") + def testProgramAfters(self): + p = self.o.program_get("prog1") + self.assertEqual(p.afters_get(), ["prog2", "prog3"]) + p.after_del("prog2") + self.assertEqual(p.afters_get(), ["prog3"]) + p.after_add("prog4") + self.assertEqual(p.afters_get(), ["prog3", "prog4"]) + p.afters_clear() + self.assertEqual(p.afters_get(), []) + + def testProgramState(self): + p = self.o.program_get("prog1") + self.assertEqual(p.state_get(), "state2") + self.assertEqual(p.value_get(), 0.1) + p.state_set("state1") + p.value_set(0.0) + self.assertEqual(p.state_get(), "state1") + self.assertEqual(p.value_get(), 0.0) + + def testProgramApi(self): + p = self.o.program_get("prog1") + self.assertEqual(p.api, ("p_api_name", "p_api_desc")) + p.api = ("new_name", "new_desc") + self.assertEqual(p.api, ("new_name", "new_desc")) + + #@unittest.skip("Program.script does not work") + def testProgramScript(self): + p = self.o.program_get("emit_back_message") + print(p.script) + + +class TestEdjeEditPartStates(unittest.TestCase): + def setUp(self): + shutil.copy(orig_theme_file, theme_file) + self.canvas = evas.Canvas(method="buffer", + size=(400, 500), + viewport=(0, 0, 400, 500)) + self.canvas.engine_info_set(self.canvas.engine_info_get()) + self.o = EdjeEdit(self.canvas, file=theme_file, group="main") + + def tearDown(self): + self.o.delete() + self.canvas.delete() + os.remove(theme_file) + + #@unittest.skip("segfault") # FIXME + def testPartStates(self): + p = self.o.part_get("edit_test") + self.assertEqual(p.states, ["default 0.00","state1 0.00","state2 0.00","state2 0.10"]) + + # state_add() + p.state_add("state9", 0.1) + self.assertEqual(p.states, ["default 0.00","state1 0.00","state2 0.00","state2 0.10","state9 0.10"]) + + # state_selected TODO FIXME state_selected_set does not work + self.assertEqual(p.state_selected_get(), ("default", 0.0)) + p.state_selected_set("state2", 0.1) + self.assertEqual(p.state_selected_get(), ("state2", 0.1)) + + # state del() TODO FIXME state_del does not work + p.state_del("state9", 0.1) + self.assertEqual(p.states, ["default 0.00","state1 0.00","state2 0.00","state2 0.10"]) + + # TODO test state_copy + + #@unittest.skip("state_exist does not work") # TODO FIXME + def testPartStateExist(self): + p = self.o.part_get("edit_test") + self.assertFalse(p.state_exist("stateNOTEXISTS", 0.1)) + self.assertTrue(p.state_exist("state1", 0.0)) + self.assertTrue(p.state_exist("state2", 0.1)) + + #@unittest.skip("PartState does not work") # TODO FIXME + def testPartStateProps(self): + p = self.o.part_get("edit_test") + s = p.state_get("state1", 0.0) + print(s) + print(s.rel1_to_get()) + +if __name__ == '__main__': + unittest.main(verbosity=2) + edje.shutdown() + ecore.shutdown() + evas.shutdown() + diff -Nru python-efl-1.17.99~201312040125/tests/edje/test_05_decorators.py python-efl-1.8.2~201401231220/tests/edje/test_05_decorators.py --- python-efl-1.17.99~201312040125/tests/edje/test_05_decorators.py 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/tests/edje/test_05_decorators.py 2014-01-18 12:24:01.000000000 +0000 @@ -43,7 +43,6 @@ expected_text_parts.remove(part) -@unittest.expectedFailure # TODO XXX "zoom,stop" remains class TestEdjeDecoratedCallbacks(unittest.TestCase): def setUp(self): self.canvas = evas.Canvas(method="buffer", diff -Nru python-efl-1.17.99~201312040125/tests/elementary/00_run_all_tests.py python-efl-1.8.2~201401231220/tests/elementary/00_run_all_tests.py --- python-efl-1.17.99~201312040125/tests/elementary/00_run_all_tests.py 1970-01-01 00:00:00.000000000 +0000 +++ python-efl-1.8.2~201401231220/tests/elementary/00_run_all_tests.py 2014-01-18 12:24:01.000000000 +0000 @@ -0,0 +1,9 @@ +#!/usr/bin/env python + +import unittest + + +loader = unittest.TestLoader() +suite = loader.discover('.') +runner = unittest.TextTestRunner(verbosity=2) +result = runner.run(suite) Binary files /tmp/xZsG_rDF9U/python-efl-1.17.99~201312040125/tests/elementary/icon.png and /tmp/miB49i9k7M/python-efl-1.8.2~201401231220/tests/elementary/icon.png differ diff -Nru python-efl-1.17.99~201312040125/tests/elementary/test_01_basics.py python-efl-1.8.2~201401231220/tests/elementary/test_01_basics.py --- python-efl-1.17.99~201312040125/tests/elementary/test_01_basics.py 1970-01-01 00:00:00.000000000 +0000 +++ python-efl-1.8.2~201401231220/tests/elementary/test_01_basics.py 2014-01-18 12:24:01.000000000 +0000 @@ -0,0 +1,30 @@ +#!/usr/bin/env python + +import unittest + +from efl.eo import Eo +from efl import elementary +from efl.elementary.window import Window, ELM_WIN_BASIC +from efl.elementary.button import Button + +elementary.init() + +class TestElmBasics(unittest.TestCase): + + def setUp(self): + self.o = Window("t", ELM_WIN_BASIC) + + def tearDown(self): + self.o.delete() + + def testParentGet1(self): + self.assertIsNone(self.o.parent_get()) + + def testParentGet2(self): + o = Button(self.o) + self.assertEqual(Eo.parent_get(o), self.o) + o.delete() + +if __name__ == '__main__': + unittest.main(verbosity=2) + elementary.shutdown() diff -Nru python-efl-1.17.99~201312040125/tests/elementary/test_02_image_icon.py python-efl-1.8.2~201401231220/tests/elementary/test_02_image_icon.py --- python-efl-1.17.99~201312040125/tests/elementary/test_02_image_icon.py 1970-01-01 00:00:00.000000000 +0000 +++ python-efl-1.8.2~201401231220/tests/elementary/test_02_image_icon.py 2014-01-18 12:24:01.000000000 +0000 @@ -0,0 +1,98 @@ +#!/usr/bin/env python + +import os +import unittest + +from efl.eo import Eo +from efl.evas import Image as evasImage +from efl import elementary +from efl.elementary.window import Window, ELM_WIN_BASIC +from efl.elementary.image import Image +from efl.elementary.icon import Icon + +script_path = os.path.dirname(os.path.abspath(__file__)) +img_path = os.path.join(script_path, "images") + +elementary.init() + +class TestElmImage(unittest.TestCase): + + def setUp(self): + self.w = Window("t", ELM_WIN_BASIC) + self.o = Image(self.w) + + def tearDown(self): + self.o.delete() + self.w.delete() + + def testImageConstructor(self): + self.assertIsNotNone(self.o) + self.assertEqual(Eo.parent_get(self.o), self.w) + + def testImageFile(self): + self.o.file = os.path.join(script_path, u"icon.png") + self.assertEqual( + self.o.file[0], os.path.join(script_path, u"icon.png")) + self.assertEqual(self.o.object_size, (48, 48)) + + def testImageFileException(self): + self.assertRaises( + RuntimeError, setattr, self.o, "file", u"this_fails.png") + + def testImageEvas(self): + self.assertIsInstance(self.o.object, evasImage) + + def testImageBooleans(self): + self.assertTrue(self.o.aspect_fixed) + self.o.aspect_fixed = False + self.assertFalse(self.o.aspect_fixed) + + self.assertFalse(self.o.editable) + self.o.editable = True + self.assertTrue(self.o.editable) + + self.assertFalse(self.o.fill_outside) + self.o.fill_outside = True + self.assertTrue(self.o.fill_outside) + + self.assertFalse(self.o.no_scale) + self.o.no_scale = True + self.assertTrue(self.o.no_scale) + + # Write-only value + self.o.preload_disabled = True + self.assertRaises(AttributeError, getattr, self.o, "preload_disabled") + + self.assertEqual(self.o.resizable, (True, True)) + self.o.resizable = False, False + self.assertEqual(self.o.resizable, (False, False)) + + self.assertTrue(self.o.smooth) + self.o.smooth = False + self.assertFalse(self.o.smooth) + +class TestElmIcon(unittest.TestCase): + + def setUp(self): + self.w = Window("t", ELM_WIN_BASIC) + self.o = Icon(self.w) + + def tearDown(self): + self.o.delete() + self.w.delete() + + def testIconConstructor(self): + self.assertIsNotNone(self.o) + self.assertEqual(Eo.parent_get(self.o), self.w) + + def testIconStandard(self): + self.o.standard = u"elementary" + self.assertEqual(u"elementary", self.o.standard) + + def testIconStandardException(self): + self.assertRaises( + RuntimeWarning, setattr, self.o, "standard", u"this_fails") + +if __name__ == '__main__': + unittest.main(verbosity=2) + elementary.shutdown() diff -Nru python-efl-1.17.99~201312040125/tests/eo/00_run_all_tests.py python-efl-1.8.2~201401231220/tests/eo/00_run_all_tests.py --- python-efl-1.17.99~201312040125/tests/eo/00_run_all_tests.py 1970-01-01 00:00:00.000000000 +0000 +++ python-efl-1.8.2~201401231220/tests/eo/00_run_all_tests.py 2014-01-18 12:24:01.000000000 +0000 @@ -0,0 +1,9 @@ +#!/usr/bin/env python + +import unittest + + +loader = unittest.TestLoader() +suite = loader.discover('.') +runner = unittest.TextTestRunner(verbosity=2) +result = runner.run(suite) diff -Nru python-efl-1.17.99~201312040125/tests/eo/test_01_basics.py python-efl-1.8.2~201401231220/tests/eo/test_01_basics.py --- python-efl-1.17.99~201312040125/tests/eo/test_01_basics.py 2013-12-03 19:56:47.000000000 +0000 +++ python-efl-1.8.2~201401231220/tests/eo/test_01_basics.py 2014-01-18 12:24:01.000000000 +0000 @@ -3,16 +3,10 @@ from efl import eo from efl.eo import Eo -from efl import elementary -from efl.elementary.window import Window, ELM_WIN_BASIC -from efl.elementary.button import Button - eo.init() -elementary.init() import os, unittest - class TestBasics(unittest.TestCase): def setUp(self): @@ -30,23 +24,7 @@ def testParentGet(self): self.assertIsNone(self.o.parent_get()) -class TestElmBasics(unittest.TestCase): - - def setUp(self): - self.o = Window("t", ELM_WIN_BASIC) - - def tearDown(self): - self.o.delete() - - def testParentGet1(self): - self.assertIsNone(self.o.parent_get()) - - def testParentGet2(self): - o = Button(self.o) - self.assertEqual(Eo.parent_get(o), self.o) - o.delete() if __name__ == '__main__': unittest.main(verbosity=2) - elementary.shutdown() eo.shutdown()