Merge ~sylvain-pineau/plainbox:adios_textland into plainbox:master

Proposed by Sylvain Pineau
Status: Merged
Approved by: Sylvain Pineau
Approved revision: 6dfec422576b9c6de60189037e4bc2d18e7ec4fb
Merged at revision: 72abf3607641bbae6f44accee11181672d6d47b7
Proposed branch: ~sylvain-pineau/plainbox:adios_textland
Merge into: plainbox:master
Diff against target: 2152 lines (+0/-33)
3 files modified
MANIFEST.in (+0/-1)
dev/null (+0/-24)
po/POTFILES.in (+0/-8)
Reviewer Review Type Date Requested Status
Maciej Kisielewski Approve
Review via email: mp+326544@code.launchpad.net

Description of the change

Remove the now useless textland files from plainbox

To post a comment you must log in.
Revision history for this message
Maciej Kisielewski (kissiel) wrote :

plainbox diet continues!
+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/MANIFEST.in b/MANIFEST.in
2index 9a93a4f..7318b78 100644
3--- a/MANIFEST.in
4+++ b/MANIFEST.in
5@@ -45,7 +45,6 @@ include plainbox/data/plainbox-qml-modules/Plainbox/qmldir
6 include plainbox/data/plainbox-qml-modules/Plainbox/QmlJob.qml
7
8 recursive-exclude daily-package-testing *
9-recursive-exclude plainbox/vendor/textland-project COPYING README.md
10 recursive-include contrib *.policy
11 recursive-include docs *.rst *.py *.html *.conf
12 recursive-include plainbox/data *.rng
13diff --git a/docs/ref/plainbox.vendor.textland.rst b/docs/ref/plainbox.vendor.textland.rst
14deleted file mode 100644
15index 0e9b040..0000000
16--- a/docs/ref/plainbox.vendor.textland.rst
17+++ /dev/null
18@@ -1,15 +0,0 @@
19-.. currentmodule:: plainbox.vendor.textland
20-
21-:mod:`plainbox.vendor.textland` -- TextLand
22-===========================================
23-
24-This package contains a bundled copy of the upstream TextLand project. Over
25-time it will be updated with subsequent releases. Eventually it will be
26-replaced by a dependency on API-stable TextLand release.
27-
28-.. seealso::
29- TextLand upstream project: https://github.com/zyga/textland/
30-
31-.. automodule:: plainbox.vendor.textland
32- :members:
33- :undoc-members:
34diff --git a/plainbox/vendor/textland b/plainbox/vendor/textland
35deleted file mode 120000
36index 3fe86a1..0000000
37--- a/plainbox/vendor/textland
38+++ /dev/null
39@@ -1 +0,0 @@
40-textland-project/textland
41\ No newline at end of file
42diff --git a/plainbox/vendor/textland-project/.gitignore b/plainbox/vendor/textland-project/.gitignore
43deleted file mode 100644
44index 84e77d7..0000000
45--- a/plainbox/vendor/textland-project/.gitignore
46+++ /dev/null
47@@ -1,5 +0,0 @@
48-*.egg-info
49-*.pyc
50-__pycache__
51-build
52-dist
53diff --git a/plainbox/vendor/textland-project/COPYING b/plainbox/vendor/textland-project/COPYING
54deleted file mode 100644
55index 94a9ed0..0000000
56--- a/plainbox/vendor/textland-project/COPYING
57+++ /dev/null
58@@ -1,674 +0,0 @@
59- GNU GENERAL PUBLIC LICENSE
60- Version 3, 29 June 2007
61-
62- Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
63- Everyone is permitted to copy and distribute verbatim copies
64- of this license document, but changing it is not allowed.
65-
66- Preamble
67-
68- The GNU General Public License is a free, copyleft license for
69-software and other kinds of works.
70-
71- The licenses for most software and other practical works are designed
72-to take away your freedom to share and change the works. By contrast,
73-the GNU General Public License is intended to guarantee your freedom to
74-share and change all versions of a program--to make sure it remains free
75-software for all its users. We, the Free Software Foundation, use the
76-GNU General Public License for most of our software; it applies also to
77-any other work released this way by its authors. You can apply it to
78-your programs, too.
79-
80- When we speak of free software, we are referring to freedom, not
81-price. Our General Public Licenses are designed to make sure that you
82-have the freedom to distribute copies of free software (and charge for
83-them if you wish), that you receive source code or can get it if you
84-want it, that you can change the software or use pieces of it in new
85-free programs, and that you know you can do these things.
86-
87- To protect your rights, we need to prevent others from denying you
88-these rights or asking you to surrender the rights. Therefore, you have
89-certain responsibilities if you distribute copies of the software, or if
90-you modify it: responsibilities to respect the freedom of others.
91-
92- For example, if you distribute copies of such a program, whether
93-gratis or for a fee, you must pass on to the recipients the same
94-freedoms that you received. You must make sure that they, too, receive
95-or can get the source code. And you must show them these terms so they
96-know their rights.
97-
98- Developers that use the GNU GPL protect your rights with two steps:
99-(1) assert copyright on the software, and (2) offer you this License
100-giving you legal permission to copy, distribute and/or modify it.
101-
102- For the developers' and authors' protection, the GPL clearly explains
103-that there is no warranty for this free software. For both users' and
104-authors' sake, the GPL requires that modified versions be marked as
105-changed, so that their problems will not be attributed erroneously to
106-authors of previous versions.
107-
108- Some devices are designed to deny users access to install or run
109-modified versions of the software inside them, although the manufacturer
110-can do so. This is fundamentally incompatible with the aim of
111-protecting users' freedom to change the software. The systematic
112-pattern of such abuse occurs in the area of products for individuals to
113-use, which is precisely where it is most unacceptable. Therefore, we
114-have designed this version of the GPL to prohibit the practice for those
115-products. If such problems arise substantially in other domains, we
116-stand ready to extend this provision to those domains in future versions
117-of the GPL, as needed to protect the freedom of users.
118-
119- Finally, every program is threatened constantly by software patents.
120-States should not allow patents to restrict development and use of
121-software on general-purpose computers, but in those that do, we wish to
122-avoid the special danger that patents applied to a free program could
123-make it effectively proprietary. To prevent this, the GPL assures that
124-patents cannot be used to render the program non-free.
125-
126- The precise terms and conditions for copying, distribution and
127-modification follow.
128-
129- TERMS AND CONDITIONS
130-
131- 0. Definitions.
132-
133- "This License" refers to version 3 of the GNU General Public License.
134-
135- "Copyright" also means copyright-like laws that apply to other kinds of
136-works, such as semiconductor masks.
137-
138- "The Program" refers to any copyrightable work licensed under this
139-License. Each licensee is addressed as "you". "Licensees" and
140-"recipients" may be individuals or organizations.
141-
142- To "modify" a work means to copy from or adapt all or part of the work
143-in a fashion requiring copyright permission, other than the making of an
144-exact copy. The resulting work is called a "modified version" of the
145-earlier work or a work "based on" the earlier work.
146-
147- A "covered work" means either the unmodified Program or a work based
148-on the Program.
149-
150- To "propagate" a work means to do anything with it that, without
151-permission, would make you directly or secondarily liable for
152-infringement under applicable copyright law, except executing it on a
153-computer or modifying a private copy. Propagation includes copying,
154-distribution (with or without modification), making available to the
155-public, and in some countries other activities as well.
156-
157- To "convey" a work means any kind of propagation that enables other
158-parties to make or receive copies. Mere interaction with a user through
159-a computer network, with no transfer of a copy, is not conveying.
160-
161- An interactive user interface displays "Appropriate Legal Notices"
162-to the extent that it includes a convenient and prominently visible
163-feature that (1) displays an appropriate copyright notice, and (2)
164-tells the user that there is no warranty for the work (except to the
165-extent that warranties are provided), that licensees may convey the
166-work under this License, and how to view a copy of this License. If
167-the interface presents a list of user commands or options, such as a
168-menu, a prominent item in the list meets this criterion.
169-
170- 1. Source Code.
171-
172- The "source code" for a work means the preferred form of the work
173-for making modifications to it. "Object code" means any non-source
174-form of a work.
175-
176- A "Standard Interface" means an interface that either is an official
177-standard defined by a recognized standards body, or, in the case of
178-interfaces specified for a particular programming language, one that
179-is widely used among developers working in that language.
180-
181- The "System Libraries" of an executable work include anything, other
182-than the work as a whole, that (a) is included in the normal form of
183-packaging a Major Component, but which is not part of that Major
184-Component, and (b) serves only to enable use of the work with that
185-Major Component, or to implement a Standard Interface for which an
186-implementation is available to the public in source code form. A
187-"Major Component", in this context, means a major essential component
188-(kernel, window system, and so on) of the specific operating system
189-(if any) on which the executable work runs, or a compiler used to
190-produce the work, or an object code interpreter used to run it.
191-
192- The "Corresponding Source" for a work in object code form means all
193-the source code needed to generate, install, and (for an executable
194-work) run the object code and to modify the work, including scripts to
195-control those activities. However, it does not include the work's
196-System Libraries, or general-purpose tools or generally available free
197-programs which are used unmodified in performing those activities but
198-which are not part of the work. For example, Corresponding Source
199-includes interface definition files associated with source files for
200-the work, and the source code for shared libraries and dynamically
201-linked subprograms that the work is specifically designed to require,
202-such as by intimate data communication or control flow between those
203-subprograms and other parts of the work.
204-
205- The Corresponding Source need not include anything that users
206-can regenerate automatically from other parts of the Corresponding
207-Source.
208-
209- The Corresponding Source for a work in source code form is that
210-same work.
211-
212- 2. Basic Permissions.
213-
214- All rights granted under this License are granted for the term of
215-copyright on the Program, and are irrevocable provided the stated
216-conditions are met. This License explicitly affirms your unlimited
217-permission to run the unmodified Program. The output from running a
218-covered work is covered by this License only if the output, given its
219-content, constitutes a covered work. This License acknowledges your
220-rights of fair use or other equivalent, as provided by copyright law.
221-
222- You may make, run and propagate covered works that you do not
223-convey, without conditions so long as your license otherwise remains
224-in force. You may convey covered works to others for the sole purpose
225-of having them make modifications exclusively for you, or provide you
226-with facilities for running those works, provided that you comply with
227-the terms of this License in conveying all material for which you do
228-not control copyright. Those thus making or running the covered works
229-for you must do so exclusively on your behalf, under your direction
230-and control, on terms that prohibit them from making any copies of
231-your copyrighted material outside their relationship with you.
232-
233- Conveying under any other circumstances is permitted solely under
234-the conditions stated below. Sublicensing is not allowed; section 10
235-makes it unnecessary.
236-
237- 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
238-
239- No covered work shall be deemed part of an effective technological
240-measure under any applicable law fulfilling obligations under article
241-11 of the WIPO copyright treaty adopted on 20 December 1996, or
242-similar laws prohibiting or restricting circumvention of such
243-measures.
244-
245- When you convey a covered work, you waive any legal power to forbid
246-circumvention of technological measures to the extent such circumvention
247-is effected by exercising rights under this License with respect to
248-the covered work, and you disclaim any intention to limit operation or
249-modification of the work as a means of enforcing, against the work's
250-users, your or third parties' legal rights to forbid circumvention of
251-technological measures.
252-
253- 4. Conveying Verbatim Copies.
254-
255- You may convey verbatim copies of the Program's source code as you
256-receive it, in any medium, provided that you conspicuously and
257-appropriately publish on each copy an appropriate copyright notice;
258-keep intact all notices stating that this License and any
259-non-permissive terms added in accord with section 7 apply to the code;
260-keep intact all notices of the absence of any warranty; and give all
261-recipients a copy of this License along with the Program.
262-
263- You may charge any price or no price for each copy that you convey,
264-and you may offer support or warranty protection for a fee.
265-
266- 5. Conveying Modified Source Versions.
267-
268- You may convey a work based on the Program, or the modifications to
269-produce it from the Program, in the form of source code under the
270-terms of section 4, provided that you also meet all of these conditions:
271-
272- a) The work must carry prominent notices stating that you modified
273- it, and giving a relevant date.
274-
275- b) The work must carry prominent notices stating that it is
276- released under this License and any conditions added under section
277- 7. This requirement modifies the requirement in section 4 to
278- "keep intact all notices".
279-
280- c) You must license the entire work, as a whole, under this
281- License to anyone who comes into possession of a copy. This
282- License will therefore apply, along with any applicable section 7
283- additional terms, to the whole of the work, and all its parts,
284- regardless of how they are packaged. This License gives no
285- permission to license the work in any other way, but it does not
286- invalidate such permission if you have separately received it.
287-
288- d) If the work has interactive user interfaces, each must display
289- Appropriate Legal Notices; however, if the Program has interactive
290- interfaces that do not display Appropriate Legal Notices, your
291- work need not make them do so.
292-
293- A compilation of a covered work with other separate and independent
294-works, which are not by their nature extensions of the covered work,
295-and which are not combined with it such as to form a larger program,
296-in or on a volume of a storage or distribution medium, is called an
297-"aggregate" if the compilation and its resulting copyright are not
298-used to limit the access or legal rights of the compilation's users
299-beyond what the individual works permit. Inclusion of a covered work
300-in an aggregate does not cause this License to apply to the other
301-parts of the aggregate.
302-
303- 6. Conveying Non-Source Forms.
304-
305- You may convey a covered work in object code form under the terms
306-of sections 4 and 5, provided that you also convey the
307-machine-readable Corresponding Source under the terms of this License,
308-in one of these ways:
309-
310- a) Convey the object code in, or embodied in, a physical product
311- (including a physical distribution medium), accompanied by the
312- Corresponding Source fixed on a durable physical medium
313- customarily used for software interchange.
314-
315- b) Convey the object code in, or embodied in, a physical product
316- (including a physical distribution medium), accompanied by a
317- written offer, valid for at least three years and valid for as
318- long as you offer spare parts or customer support for that product
319- model, to give anyone who possesses the object code either (1) a
320- copy of the Corresponding Source for all the software in the
321- product that is covered by this License, on a durable physical
322- medium customarily used for software interchange, for a price no
323- more than your reasonable cost of physically performing this
324- conveying of source, or (2) access to copy the
325- Corresponding Source from a network server at no charge.
326-
327- c) Convey individual copies of the object code with a copy of the
328- written offer to provide the Corresponding Source. This
329- alternative is allowed only occasionally and noncommercially, and
330- only if you received the object code with such an offer, in accord
331- with subsection 6b.
332-
333- d) Convey the object code by offering access from a designated
334- place (gratis or for a charge), and offer equivalent access to the
335- Corresponding Source in the same way through the same place at no
336- further charge. You need not require recipients to copy the
337- Corresponding Source along with the object code. If the place to
338- copy the object code is a network server, the Corresponding Source
339- may be on a different server (operated by you or a third party)
340- that supports equivalent copying facilities, provided you maintain
341- clear directions next to the object code saying where to find the
342- Corresponding Source. Regardless of what server hosts the
343- Corresponding Source, you remain obligated to ensure that it is
344- available for as long as needed to satisfy these requirements.
345-
346- e) Convey the object code using peer-to-peer transmission, provided
347- you inform other peers where the object code and Corresponding
348- Source of the work are being offered to the general public at no
349- charge under subsection 6d.
350-
351- A separable portion of the object code, whose source code is excluded
352-from the Corresponding Source as a System Library, need not be
353-included in conveying the object code work.
354-
355- A "User Product" is either (1) a "consumer product", which means any
356-tangible personal property which is normally used for personal, family,
357-or household purposes, or (2) anything designed or sold for incorporation
358-into a dwelling. In determining whether a product is a consumer product,
359-doubtful cases shall be resolved in favor of coverage. For a particular
360-product received by a particular user, "normally used" refers to a
361-typical or common use of that class of product, regardless of the status
362-of the particular user or of the way in which the particular user
363-actually uses, or expects or is expected to use, the product. A product
364-is a consumer product regardless of whether the product has substantial
365-commercial, industrial or non-consumer uses, unless such uses represent
366-the only significant mode of use of the product.
367-
368- "Installation Information" for a User Product means any methods,
369-procedures, authorization keys, or other information required to install
370-and execute modified versions of a covered work in that User Product from
371-a modified version of its Corresponding Source. The information must
372-suffice to ensure that the continued functioning of the modified object
373-code is in no case prevented or interfered with solely because
374-modification has been made.
375-
376- If you convey an object code work under this section in, or with, or
377-specifically for use in, a User Product, and the conveying occurs as
378-part of a transaction in which the right of possession and use of the
379-User Product is transferred to the recipient in perpetuity or for a
380-fixed term (regardless of how the transaction is characterized), the
381-Corresponding Source conveyed under this section must be accompanied
382-by the Installation Information. But this requirement does not apply
383-if neither you nor any third party retains the ability to install
384-modified object code on the User Product (for example, the work has
385-been installed in ROM).
386-
387- The requirement to provide Installation Information does not include a
388-requirement to continue to provide support service, warranty, or updates
389-for a work that has been modified or installed by the recipient, or for
390-the User Product in which it has been modified or installed. Access to a
391-network may be denied when the modification itself materially and
392-adversely affects the operation of the network or violates the rules and
393-protocols for communication across the network.
394-
395- Corresponding Source conveyed, and Installation Information provided,
396-in accord with this section must be in a format that is publicly
397-documented (and with an implementation available to the public in
398-source code form), and must require no special password or key for
399-unpacking, reading or copying.
400-
401- 7. Additional Terms.
402-
403- "Additional permissions" are terms that supplement the terms of this
404-License by making exceptions from one or more of its conditions.
405-Additional permissions that are applicable to the entire Program shall
406-be treated as though they were included in this License, to the extent
407-that they are valid under applicable law. If additional permissions
408-apply only to part of the Program, that part may be used separately
409-under those permissions, but the entire Program remains governed by
410-this License without regard to the additional permissions.
411-
412- When you convey a copy of a covered work, you may at your option
413-remove any additional permissions from that copy, or from any part of
414-it. (Additional permissions may be written to require their own
415-removal in certain cases when you modify the work.) You may place
416-additional permissions on material, added by you to a covered work,
417-for which you have or can give appropriate copyright permission.
418-
419- Notwithstanding any other provision of this License, for material you
420-add to a covered work, you may (if authorized by the copyright holders of
421-that material) supplement the terms of this License with terms:
422-
423- a) Disclaiming warranty or limiting liability differently from the
424- terms of sections 15 and 16 of this License; or
425-
426- b) Requiring preservation of specified reasonable legal notices or
427- author attributions in that material or in the Appropriate Legal
428- Notices displayed by works containing it; or
429-
430- c) Prohibiting misrepresentation of the origin of that material, or
431- requiring that modified versions of such material be marked in
432- reasonable ways as different from the original version; or
433-
434- d) Limiting the use for publicity purposes of names of licensors or
435- authors of the material; or
436-
437- e) Declining to grant rights under trademark law for use of some
438- trade names, trademarks, or service marks; or
439-
440- f) Requiring indemnification of licensors and authors of that
441- material by anyone who conveys the material (or modified versions of
442- it) with contractual assumptions of liability to the recipient, for
443- any liability that these contractual assumptions directly impose on
444- those licensors and authors.
445-
446- All other non-permissive additional terms are considered "further
447-restrictions" within the meaning of section 10. If the Program as you
448-received it, or any part of it, contains a notice stating that it is
449-governed by this License along with a term that is a further
450-restriction, you may remove that term. If a license document contains
451-a further restriction but permits relicensing or conveying under this
452-License, you may add to a covered work material governed by the terms
453-of that license document, provided that the further restriction does
454-not survive such relicensing or conveying.
455-
456- If you add terms to a covered work in accord with this section, you
457-must place, in the relevant source files, a statement of the
458-additional terms that apply to those files, or a notice indicating
459-where to find the applicable terms.
460-
461- Additional terms, permissive or non-permissive, may be stated in the
462-form of a separately written license, or stated as exceptions;
463-the above requirements apply either way.
464-
465- 8. Termination.
466-
467- You may not propagate or modify a covered work except as expressly
468-provided under this License. Any attempt otherwise to propagate or
469-modify it is void, and will automatically terminate your rights under
470-this License (including any patent licenses granted under the third
471-paragraph of section 11).
472-
473- However, if you cease all violation of this License, then your
474-license from a particular copyright holder is reinstated (a)
475-provisionally, unless and until the copyright holder explicitly and
476-finally terminates your license, and (b) permanently, if the copyright
477-holder fails to notify you of the violation by some reasonable means
478-prior to 60 days after the cessation.
479-
480- Moreover, your license from a particular copyright holder is
481-reinstated permanently if the copyright holder notifies you of the
482-violation by some reasonable means, this is the first time you have
483-received notice of violation of this License (for any work) from that
484-copyright holder, and you cure the violation prior to 30 days after
485-your receipt of the notice.
486-
487- Termination of your rights under this section does not terminate the
488-licenses of parties who have received copies or rights from you under
489-this License. If your rights have been terminated and not permanently
490-reinstated, you do not qualify to receive new licenses for the same
491-material under section 10.
492-
493- 9. Acceptance Not Required for Having Copies.
494-
495- You are not required to accept this License in order to receive or
496-run a copy of the Program. Ancillary propagation of a covered work
497-occurring solely as a consequence of using peer-to-peer transmission
498-to receive a copy likewise does not require acceptance. However,
499-nothing other than this License grants you permission to propagate or
500-modify any covered work. These actions infringe copyright if you do
501-not accept this License. Therefore, by modifying or propagating a
502-covered work, you indicate your acceptance of this License to do so.
503-
504- 10. Automatic Licensing of Downstream Recipients.
505-
506- Each time you convey a covered work, the recipient automatically
507-receives a license from the original licensors, to run, modify and
508-propagate that work, subject to this License. You are not responsible
509-for enforcing compliance by third parties with this License.
510-
511- An "entity transaction" is a transaction transferring control of an
512-organization, or substantially all assets of one, or subdividing an
513-organization, or merging organizations. If propagation of a covered
514-work results from an entity transaction, each party to that
515-transaction who receives a copy of the work also receives whatever
516-licenses to the work the party's predecessor in interest had or could
517-give under the previous paragraph, plus a right to possession of the
518-Corresponding Source of the work from the predecessor in interest, if
519-the predecessor has it or can get it with reasonable efforts.
520-
521- You may not impose any further restrictions on the exercise of the
522-rights granted or affirmed under this License. For example, you may
523-not impose a license fee, royalty, or other charge for exercise of
524-rights granted under this License, and you may not initiate litigation
525-(including a cross-claim or counterclaim in a lawsuit) alleging that
526-any patent claim is infringed by making, using, selling, offering for
527-sale, or importing the Program or any portion of it.
528-
529- 11. Patents.
530-
531- A "contributor" is a copyright holder who authorizes use under this
532-License of the Program or a work on which the Program is based. The
533-work thus licensed is called the contributor's "contributor version".
534-
535- A contributor's "essential patent claims" are all patent claims
536-owned or controlled by the contributor, whether already acquired or
537-hereafter acquired, that would be infringed by some manner, permitted
538-by this License, of making, using, or selling its contributor version,
539-but do not include claims that would be infringed only as a
540-consequence of further modification of the contributor version. For
541-purposes of this definition, "control" includes the right to grant
542-patent sublicenses in a manner consistent with the requirements of
543-this License.
544-
545- Each contributor grants you a non-exclusive, worldwide, royalty-free
546-patent license under the contributor's essential patent claims, to
547-make, use, sell, offer for sale, import and otherwise run, modify and
548-propagate the contents of its contributor version.
549-
550- In the following three paragraphs, a "patent license" is any express
551-agreement or commitment, however denominated, not to enforce a patent
552-(such as an express permission to practice a patent or covenant not to
553-sue for patent infringement). To "grant" such a patent license to a
554-party means to make such an agreement or commitment not to enforce a
555-patent against the party.
556-
557- If you convey a covered work, knowingly relying on a patent license,
558-and the Corresponding Source of the work is not available for anyone
559-to copy, free of charge and under the terms of this License, through a
560-publicly available network server or other readily accessible means,
561-then you must either (1) cause the Corresponding Source to be so
562-available, or (2) arrange to deprive yourself of the benefit of the
563-patent license for this particular work, or (3) arrange, in a manner
564-consistent with the requirements of this License, to extend the patent
565-license to downstream recipients. "Knowingly relying" means you have
566-actual knowledge that, but for the patent license, your conveying the
567-covered work in a country, or your recipient's use of the covered work
568-in a country, would infringe one or more identifiable patents in that
569-country that you have reason to believe are valid.
570-
571- If, pursuant to or in connection with a single transaction or
572-arrangement, you convey, or propagate by procuring conveyance of, a
573-covered work, and grant a patent license to some of the parties
574-receiving the covered work authorizing them to use, propagate, modify
575-or convey a specific copy of the covered work, then the patent license
576-you grant is automatically extended to all recipients of the covered
577-work and works based on it.
578-
579- A patent license is "discriminatory" if it does not include within
580-the scope of its coverage, prohibits the exercise of, or is
581-conditioned on the non-exercise of one or more of the rights that are
582-specifically granted under this License. You may not convey a covered
583-work if you are a party to an arrangement with a third party that is
584-in the business of distributing software, under which you make payment
585-to the third party based on the extent of your activity of conveying
586-the work, and under which the third party grants, to any of the
587-parties who would receive the covered work from you, a discriminatory
588-patent license (a) in connection with copies of the covered work
589-conveyed by you (or copies made from those copies), or (b) primarily
590-for and in connection with specific products or compilations that
591-contain the covered work, unless you entered into that arrangement,
592-or that patent license was granted, prior to 28 March 2007.
593-
594- Nothing in this License shall be construed as excluding or limiting
595-any implied license or other defenses to infringement that may
596-otherwise be available to you under applicable patent law.
597-
598- 12. No Surrender of Others' Freedom.
599-
600- If conditions are imposed on you (whether by court order, agreement or
601-otherwise) that contradict the conditions of this License, they do not
602-excuse you from the conditions of this License. If you cannot convey a
603-covered work so as to satisfy simultaneously your obligations under this
604-License and any other pertinent obligations, then as a consequence you may
605-not convey it at all. For example, if you agree to terms that obligate you
606-to collect a royalty for further conveying from those to whom you convey
607-the Program, the only way you could satisfy both those terms and this
608-License would be to refrain entirely from conveying the Program.
609-
610- 13. Use with the GNU Affero General Public License.
611-
612- Notwithstanding any other provision of this License, you have
613-permission to link or combine any covered work with a work licensed
614-under version 3 of the GNU Affero General Public License into a single
615-combined work, and to convey the resulting work. The terms of this
616-License will continue to apply to the part which is the covered work,
617-but the special requirements of the GNU Affero General Public License,
618-section 13, concerning interaction through a network will apply to the
619-combination as such.
620-
621- 14. Revised Versions of this License.
622-
623- The Free Software Foundation may publish revised and/or new versions of
624-the GNU General Public License from time to time. Such new versions will
625-be similar in spirit to the present version, but may differ in detail to
626-address new problems or concerns.
627-
628- Each version is given a distinguishing version number. If the
629-Program specifies that a certain numbered version of the GNU General
630-Public License "or any later version" applies to it, you have the
631-option of following the terms and conditions either of that numbered
632-version or of any later version published by the Free Software
633-Foundation. If the Program does not specify a version number of the
634-GNU General Public License, you may choose any version ever published
635-by the Free Software Foundation.
636-
637- If the Program specifies that a proxy can decide which future
638-versions of the GNU General Public License can be used, that proxy's
639-public statement of acceptance of a version permanently authorizes you
640-to choose that version for the Program.
641-
642- Later license versions may give you additional or different
643-permissions. However, no additional obligations are imposed on any
644-author or copyright holder as a result of your choosing to follow a
645-later version.
646-
647- 15. Disclaimer of Warranty.
648-
649- THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
650-APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
651-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
652-OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
653-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
654-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
655-IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
656-ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
657-
658- 16. Limitation of Liability.
659-
660- IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
661-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
662-THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
663-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
664-USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
665-DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
666-PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
667-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
668-SUCH DAMAGES.
669-
670- 17. Interpretation of Sections 15 and 16.
671-
672- If the disclaimer of warranty and limitation of liability provided
673-above cannot be given local legal effect according to their terms,
674-reviewing courts shall apply local law that most closely approximates
675-an absolute waiver of all civil liability in connection with the
676-Program, unless a warranty or assumption of liability accompanies a
677-copy of the Program in return for a fee.
678-
679- END OF TERMS AND CONDITIONS
680-
681- How to Apply These Terms to Your New Programs
682-
683- If you develop a new program, and you want it to be of the greatest
684-possible use to the public, the best way to achieve this is to make it
685-free software which everyone can redistribute and change under these terms.
686-
687- To do so, attach the following notices to the program. It is safest
688-to attach them to the start of each source file to most effectively
689-state the exclusion of warranty; and each file should have at least
690-the "copyright" line and a pointer to where the full notice is found.
691-
692- <one line to give the program's name and a brief idea of what it does.>
693- Copyright (C) <year> <name of author>
694-
695- This program is free software: you can redistribute it and/or modify
696- it under the terms of the GNU General Public License as published by
697- the Free Software Foundation, either version 3 of the License, or
698- (at your option) any later version.
699-
700- This program is distributed in the hope that it will be useful,
701- but WITHOUT ANY WARRANTY; without even the implied warranty of
702- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
703- GNU General Public License for more details.
704-
705- You should have received a copy of the GNU General Public License
706- along with this program. If not, see <http://www.gnu.org/licenses/>.
707-
708-Also add information on how to contact you by electronic and paper mail.
709-
710- If the program does terminal interaction, make it output a short
711-notice like this when it starts in an interactive mode:
712-
713- <program> Copyright (C) <year> <name of author>
714- This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
715- This is free software, and you are welcome to redistribute it
716- under certain conditions; type `show c' for details.
717-
718-The hypothetical commands `show w' and `show c' should show the appropriate
719-parts of the General Public License. Of course, your program's commands
720-might be different; for a GUI interface, you would use an "about box".
721-
722- You should also get your employer (if you work as a programmer) or school,
723-if any, to sign a "copyright disclaimer" for the program, if necessary.
724-For more information on this, and how to apply and follow the GNU GPL, see
725-<http://www.gnu.org/licenses/>.
726-
727- The GNU General Public License does not permit incorporating your program
728-into proprietary programs. If your program is a subroutine library, you
729-may consider it more useful to permit linking proprietary applications with
730-the library. If this is what you want to do, use the GNU Lesser General
731-Public License instead of this License. But first, please read
732-<http://www.gnu.org/philosophy/why-not-lgpl.html>.
733diff --git a/plainbox/vendor/textland-project/README.md b/plainbox/vendor/textland-project/README.md
734deleted file mode 100644
735index 47c9f32..0000000
736--- a/plainbox/vendor/textland-project/README.md
737+++ /dev/null
738@@ -1,40 +0,0 @@
739-TextLand
740-========
741-
742-TextLand is a portable console textual frame-buffer-like display system. It
743-offers portable character-attribute matrix and input event system. TextLand is
744-not a widget library, it doesn't have concepts of windows, buttons or labels.
745-Any widget library that can render to TextLand buffers can be used to build
746-classical text widget applications.
747-
748-Example
749-=======
750-
751-See demos in the top-level directory
752-
753-Environment
754-===========
755-
756-TEXTLAND_DISPLAY can be set to one of the following strings:
757-
758- * ``curses`` (default): to use the ncurses interface
759- * ``print``: to use portable printer 80x25 "display"
760- * ``test``: to use a off-screen display that replays injected test events and
761- records all the screens that were "displayed"
762-
763-Supported Platforms
764-===================
765-
766-Linux:
767- Keyboard events, display resize events, no mouse events yet. Bold,
768- underline and reverse video character attributes. Standard 16+8 colors
769- available (foreground+background).
770-
771-Windows:
772- Port is in the works, text display and console attributes work. Mouse
773- events and resize events are in the works.
774-
775-OSX:
776- Same as Linux with the exception of the display resize event which is not
777- supported in the same way on the OSX curses library. Should be fixed later
778- on but there is no active OSX developer yet.
779diff --git a/plainbox/vendor/textland-project/demo1.py b/plainbox/vendor/textland-project/demo1.py
780deleted file mode 100755
781index 2ae719c..0000000
782--- a/plainbox/vendor/textland-project/demo1.py
783+++ /dev/null
784@@ -1,94 +0,0 @@
785-#!/usr/bin/env python3
786-# This file is part of textland.
787-#
788-# Copyright 2014 Canonical Ltd.
789-# Written by:
790-# Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
791-#
792-# Textland is free software: you can redistribute it and/or modify
793-# it under the terms of the GNU General Public License version 3,
794-# as published by the Free Software Foundation.
795-#
796-# Textland is distributed in the hope that it will be useful,
797-# but WITHOUT ANY WARRANTY; without even the implied warranty of
798-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
799-# GNU General Public License for more details.
800-#
801-# You should have received a copy of the GNU General Public License
802-# along with Textland. If not, see <http://www.gnu.org/licenses/>.
803-import argparse
804-
805-from textland import DrawingContext
806-from textland import EVENT_KEYBOARD
807-from textland import EVENT_RESIZE
808-from textland import Event
809-from textland import IApplication
810-from textland import KeyboardData
811-from textland import Size
812-from textland import TextImage
813-from textland import get_display
814-
815-
816-class DemoApp(IApplication):
817-
818- def __init__(self):
819- self.image = TextImage(Size(0, 0))
820-
821- def consume_event(self, event: Event):
822- if event.kind == EVENT_RESIZE:
823- self.image = TextImage(event.data) # data is the new size
824- elif event.kind == EVENT_KEYBOARD and event.data.key == 'q':
825- raise StopIteration
826- self.repaint(event)
827- return self.image
828-
829- def repaint(self, event: Event):
830- # Draw something on the image
831- ctx = DrawingContext(self.image)
832- ctx.fill('.')
833- title = "TextLand Demo Application"
834- ctx.move_to((self.image.size.width - len(title)) // 2, 0)
835- ctx.print(title)
836- ctx.print('=' * len(title))
837- ctx.move_to(0, 3)
838- ctx.print("Type 'q' to quit")
839- ctx.move_to(10, 10)
840- ctx.print("Event: {}".format(event))
841-
842-
843-def main():
844- parser = argparse.ArgumentParser()
845- parser.set_defaults(display=None)
846- parser.add_argument(
847- '--curses',
848- help="Use curses for display",
849- action="store_const",
850- const="curses",
851- dest="display")
852- parser.add_argument(
853- '--print',
854- help="Use simple line printer for display",
855- action="store_const",
856- const="print",
857- dest="display")
858- parser.add_argument(
859- "--test",
860- help="Use test display (just for testing)",
861- action="store_const",
862- const="test",
863- dest="display")
864- ns = parser.parse_args()
865- display = get_display(ns.display)
866- if ns.display == 'test':
867- display.inject_event(Event(EVENT_KEYBOARD, KeyboardData('x')))
868- display.inject_event(Event(EVENT_KEYBOARD, KeyboardData('y')))
869- display.inject_event(Event(EVENT_KEYBOARD, KeyboardData('q')))
870- display.run(DemoApp())
871- if ns.display == 'test':
872- for frame, image in enumerate(display.screen_log, 1):
873- print("Frame {}:".format(frame))
874- image.print_frame()
875-
876-
877-if __name__ == "__main__":
878- main()
879diff --git a/plainbox/vendor/textland-project/demo2.py b/plainbox/vendor/textland-project/demo2.py
880deleted file mode 100755
881index cb3d932..0000000
882--- a/plainbox/vendor/textland-project/demo2.py
883+++ /dev/null
884@@ -1,58 +0,0 @@
885-#!/usr/bin/env python3
886-# This file is part of textland.
887-#
888-# Copyright 2014 Canonical Ltd.
889-# Written by:
890-# Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
891-#
892-# Textland is free software: you can redistribute it and/or modify
893-# it under the terms of the GNU General Public License version 3,
894-# as published by the Free Software Foundation.
895-#
896-# Textland is distributed in the hope that it will be useful,
897-# but WITHOUT ANY WARRANTY; without even the implied warranty of
898-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
899-# GNU General Public License for more details.
900-#
901-# You should have received a copy of the GNU General Public License
902-# along with Textland. If not, see <http://www.gnu.org/licenses/>.
903-from textland import DrawingContext
904-from textland import EVENT_KEYBOARD
905-from textland import EVENT_RESIZE
906-from textland import Event
907-from textland import IApplication
908-from textland import Size
909-from textland import TextImage
910-from textland import get_display
911-
912-
913-class DemoApp(IApplication):
914-
915- def __init__(self):
916- self.image = TextImage(Size(0, 0))
917-
918- def consume_event(self, event: Event):
919- if event.kind == EVENT_RESIZE:
920- self.image = TextImage(event.data) # data is the new size
921- elif event.kind == EVENT_KEYBOARD and event.data.key == 'q':
922- raise StopIteration
923- self.repaint(event)
924- return self.image
925-
926- def repaint(self, event: Event):
927- # Draw something on the image
928- ctx = DrawingContext(self.image)
929- ctx.fill('#')
930- text = "1234567890"
931- for i in range(min(self.image.size.width, self.image.size.height)):
932- ctx.fill(text[i % len(text)])
933- ctx.clip_by(1, 1, -1, -1)
934-
935-
936-def main():
937- display = get_display()
938- display.run(DemoApp())
939-
940-
941-if __name__ == "__main__":
942- main()
943diff --git a/plainbox/vendor/textland-project/demo3.py b/plainbox/vendor/textland-project/demo3.py
944deleted file mode 100755
945index cae9998..0000000
946--- a/plainbox/vendor/textland-project/demo3.py
947+++ /dev/null
948@@ -1,69 +0,0 @@
949-#!/usr/bin/env python3
950-# This file is part of textland.
951-#
952-# Copyright 2014 Canonical Ltd.
953-# Written by:
954-# Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
955-#
956-# Textland is free software: you can redistribute it and/or modify
957-# it under the terms of the GNU General Public License version 3,
958-# as published by the Free Software Foundation.
959-#
960-# Textland is distributed in the hope that it will be useful,
961-# but WITHOUT ANY WARRANTY; without even the implied warranty of
962-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
963-# GNU General Public License for more details.
964-#
965-# You should have received a copy of the GNU General Public License
966-# along with Textland. If not, see <http://www.gnu.org/licenses/>.
967-
968-from textland import DrawingContext
969-from textland import EVENT_KEYBOARD
970-from textland import EVENT_RESIZE
971-from textland import Event
972-from textland import IApplication
973-from textland import Size
974-from textland import TextImage
975-from textland import get_display
976-
977-
978-class DemoApp(IApplication):
979-
980- def __init__(self):
981- self.image = TextImage(Size(0, 0))
982-
983- def consume_event(self, event: Event):
984- if event.kind == EVENT_RESIZE:
985- self.image = TextImage(event.data) # data is the new size
986- elif event.kind == EVENT_KEYBOARD and event.data.key == 'q':
987- raise StopIteration
988- self.repaint(event)
989- return self.image
990-
991- def repaint(self, event: Event):
992- # Draw something on the image
993- ctx = DrawingContext(self.image)
994- ctx.fill(' ')
995- for y in range(self.image.size.height):
996- ctx.move_to(0, y)
997- if y % 10 == 0:
998- ctx.print('---')
999- if y > 0:
1000- ctx.move_to(4, y)
1001- ctx.print("{:-2d}".format(y))
1002- else:
1003- ctx.print('-')
1004- text = "TextLand Ruler"
1005- ctx.move_to(
1006- (self.image.size.width - len(text)) // 2,
1007- self.image.size.height // 2)
1008- ctx.print(text)
1009-
1010-
1011-def main():
1012- display = get_display()
1013- display.run(DemoApp())
1014-
1015-
1016-if __name__ == "__main__":
1017- main()
1018diff --git a/plainbox/vendor/textland-project/demo4.py b/plainbox/vendor/textland-project/demo4.py
1019deleted file mode 100755
1020index 76b8f1b..0000000
1021--- a/plainbox/vendor/textland-project/demo4.py
1022+++ /dev/null
1023@@ -1,75 +0,0 @@
1024-#!/usr/bin/env python3
1025-# This file is part of textland.
1026-#
1027-# Copyright 2014 Canonical Ltd.
1028-# Written by:
1029-# Sylvain Pineau <sylvain.pineau@canonical.com>
1030-#
1031-# Textland is free software: you can redistribute it and/or modify
1032-# it under the terms of the GNU General Public License version 3,
1033-# as published by the Free Software Foundation.
1034-#
1035-# Textland is distributed in the hope that it will be useful,
1036-# but WITHOUT ANY WARRANTY; without even the implied warranty of
1037-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1038-# GNU General Public License for more details.
1039-#
1040-# You should have received a copy of the GNU General Public License
1041-# along with Textland. If not, see <http://www.gnu.org/licenses/>.
1042-from textland import DrawingContext
1043-from textland import BRIGHT_GREEN
1044-from textland import EVENT_KEYBOARD
1045-from textland import EVENT_RESIZE
1046-from textland import Event
1047-from textland import IApplication
1048-from textland import RED
1049-from textland import REVERSE
1050-from textland import Size
1051-from textland import TextImage
1052-from textland import UNDERLINE
1053-from textland import get_display
1054-
1055-
1056-class DemoApp(IApplication):
1057-
1058- def __init__(self):
1059- self.image = TextImage(Size(0, 0))
1060-
1061- def consume_event(self, event: Event):
1062- if event.kind == EVENT_RESIZE:
1063- self.image = TextImage(event.data) # data is the new size
1064- elif event.kind == EVENT_KEYBOARD and event.data.key == 'q':
1065- raise StopIteration
1066- self.repaint(event)
1067- return self.image
1068-
1069- def repaint(self, event: Event):
1070- # Draw something on the image
1071- ctx = DrawingContext(self.image)
1072- title = "TextLand Cell Character Attribute and Colors Demo Application"
1073- ctx.move_to((self.image.size.width - len(title)) // 2, 0)
1074- ctx.print(title)
1075- ctx.print('=' * len(title))
1076- ctx.move_to(0, 3)
1077- ctx.attributes.fg = BRIGHT_GREEN
1078- ctx.attributes.bg = RED
1079- ctx.print("Type 'q' to quit")
1080- ctx.attributes.reset()
1081- ctx.move_to(10, 6)
1082- ctx.attributes.style = REVERSE
1083- ctx.print("REVERSE")
1084- ctx.move_to(10, 7)
1085- ctx.attributes.style = UNDERLINE
1086- ctx.print("UNDERLINE")
1087- ctx.move_to(10, 8)
1088- ctx.attributes.style = UNDERLINE | REVERSE
1089- ctx.print("BOTH")
1090-
1091-
1092-def main():
1093- display = get_display()
1094- display.run(DemoApp())
1095-
1096-
1097-if __name__ == "__main__":
1098- main()
1099diff --git a/plainbox/vendor/textland-project/demo5.py b/plainbox/vendor/textland-project/demo5.py
1100deleted file mode 100755
1101index 0e04343..0000000
1102--- a/plainbox/vendor/textland-project/demo5.py
1103+++ /dev/null
1104@@ -1,53 +0,0 @@
1105-#!/usr/bin/env python3
1106-# This file is part of textland.
1107-#
1108-# Copyright 2014 Canonical Ltd.
1109-# Written by:
1110-# Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
1111-#
1112-# Textland is free software: you can redistribute it and/or modify
1113-# it under the terms of the GNU General Public License version 3,
1114-# as published by the Free Software Foundation.
1115-#
1116-# Textland is distributed in the hope that it will be useful,
1117-# but WITHOUT ANY WARRANTY; without even the implied warranty of
1118-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1119-# GNU General Public License for more details.
1120-#
1121-# You should have received a copy of the GNU General Public License
1122-# along with Textland. If not, see <http://www.gnu.org/licenses/>.
1123-from textland import DrawingContext
1124-from textland import EVENT_KEYBOARD
1125-from textland import EVENT_RESIZE
1126-from textland import Event
1127-from textland import IApplication
1128-from textland import Size
1129-from textland import TextImage
1130-from textland import get_display
1131-
1132-
1133-class DemoApp(IApplication):
1134-
1135- def __init__(self):
1136- self.image = TextImage(Size(0, 0))
1137-
1138- def consume_event(self, event: Event):
1139- if event.kind == EVENT_RESIZE:
1140- self.image = TextImage(event.data) # data is the new size
1141- elif event.kind == EVENT_KEYBOARD and event.data.key == 'q':
1142- raise StopIteration
1143- self.repaint(event)
1144- return self.image
1145-
1146- def repaint(self, event: Event):
1147- ctx = DrawingContext(self.image)
1148- ctx.border()
1149-
1150-
1151-def main():
1152- display = get_display()
1153- display.run(DemoApp())
1154-
1155-
1156-if __name__ == "__main__":
1157- main()
1158diff --git a/plainbox/vendor/textland-project/demo6.py b/plainbox/vendor/textland-project/demo6.py
1159deleted file mode 100755
1160index 6610c98..0000000
1161--- a/plainbox/vendor/textland-project/demo6.py
1162+++ /dev/null
1163@@ -1,77 +0,0 @@
1164-#!/usr/bin/env python3
1165-# This file is part of textland.
1166-#
1167-# Copyright 2014 Canonical Ltd.
1168-# Written by:
1169-# Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
1170-#
1171-# Textland is free software: you can redistribute it and/or modify
1172-# it under the terms of the GNU General Public License version 3,
1173-# as published by the Free Software Foundation.
1174-#
1175-# Textland is distributed in the hope that it will be useful,
1176-# but WITHOUT ANY WARRANTY; without even the implied warranty of
1177-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1178-# GNU General Public License for more details.
1179-#
1180-# You should have received a copy of the GNU General Public License
1181-# along with Textland. If not, see <http://www.gnu.org/licenses/>.
1182-from textland import DrawingContext
1183-from textland import EVENT_KEYBOARD
1184-from textland import EVENT_RESIZE
1185-from textland import Event
1186-from textland import IApplication
1187-from textland import Size
1188-from textland import TextImage
1189-from textland import get_display
1190-
1191-
1192-class DemoApp(IApplication):
1193-
1194- def __init__(self):
1195- self.image = TextImage(Size(0, 0))
1196-
1197- def consume_event(self, event: Event):
1198- if event.kind == EVENT_RESIZE:
1199- self.image = TextImage(event.data) # data is the new size
1200- elif event.kind == EVENT_KEYBOARD and event.data.key == 'q':
1201- raise StopIteration
1202- self.repaint(event)
1203- return self.image
1204-
1205- def repaint(self, event: Event) -> None:
1206- ctx = DrawingContext(self.image)
1207- if self.image.size.width < 65 or self.image.size.height < 18:
1208- self._paint_resize_msg(ctx)
1209- else:
1210- self._paint_color_table(ctx)
1211-
1212- def _paint_color_table(self, ctx: DrawingContext) -> None:
1213- CELL_WIDTH = 4
1214- NUM_COLORS = 16
1215- for fg in range(NUM_COLORS):
1216- for bg in range(NUM_COLORS):
1217- ctx.attributes.reset()
1218- ctx.border(
1219- 0, self.image.size.width - (NUM_COLORS * CELL_WIDTH) - 1,
1220- 0, self.image.size.height - NUM_COLORS - 2)
1221- ctx.move_to(1 + fg * CELL_WIDTH, 1 + bg)
1222- ctx.attributes.fg = fg
1223- ctx.attributes.bg = bg
1224- ctx.print("{:X}+{:X}".format(fg, bg))
1225-
1226- def _paint_resize_msg(self, ctx: DrawingContext) -> None:
1227- text = "Please enlarge this window"
1228- ctx.move_to(
1229- (self.image.size.width - len(text)) // 2,
1230- self.image.size.height // 2)
1231- ctx.print(text)
1232-
1233-
1234-def main():
1235- display = get_display()
1236- display.run(DemoApp())
1237-
1238-
1239-if __name__ == "__main__":
1240- main()
1241diff --git a/plainbox/vendor/textland-project/setup.py b/plainbox/vendor/textland-project/setup.py
1242deleted file mode 100755
1243index d1b81c3..0000000
1244--- a/plainbox/vendor/textland-project/setup.py
1245+++ /dev/null
1246@@ -1,40 +0,0 @@
1247-#!/usr/bin/env python3
1248-# This file is part of textland.
1249-#
1250-# Copyright 2014 Canonical Ltd.
1251-# Written by:
1252-# Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
1253-#
1254-# Textland is free software: you can redistribute it and/or modify
1255-# it under the terms of the GNU General Public License version 3,
1256-# as published by the Free Software Foundation.
1257-#
1258-# Textland is distributed in the hope that it will be useful,
1259-# but WITHOUT ANY WARRANTY; without even the implied warranty of
1260-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1261-# GNU General Public License for more details.
1262-#
1263-# You should have received a copy of the GNU General Public License
1264-# along with Textland. If not, see <http://www.gnu.org/licenses/>.
1265-
1266-import os
1267-
1268-from setuptools import setup, find_packages
1269-
1270-base_dir = os.path.dirname(__file__)
1271-
1272-# Load the README.rst file relative to the setup file
1273-with open(os.path.join(base_dir, "README.md"), encoding="UTF-8") as stream:
1274- long_description = stream.read()
1275-
1276-
1277-setup(
1278- name="textland",
1279- version="0.1",
1280- url="https://github.com/zyga/textland",
1281- packages=find_packages(),
1282- author="Zygmunt Krynicki",
1283- author_email="zygmunt.krynicki@canonical.com",
1284- license="GPLv3",
1285- description="Like wayland, for text apps",
1286- long_description=long_description)
1287diff --git a/plainbox/vendor/textland-project/textland/__init__.py b/plainbox/vendor/textland-project/textland/__init__.py
1288deleted file mode 100644
1289index 6a69bf4..0000000
1290--- a/plainbox/vendor/textland-project/textland/__init__.py
1291+++ /dev/null
1292@@ -1,99 +0,0 @@
1293-# This file is part of textland.
1294-#
1295-# Copyright 2014 Canonical Ltd.
1296-# Written by:
1297-# Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
1298-#
1299-# Textland is free software: you can redistribute it and/or modify
1300-# it under the terms of the GNU General Public License version 3,
1301-# as published by the Free Software Foundation.
1302-#
1303-# Textland is distributed in the hope that it will be useful,
1304-# but WITHOUT ANY WARRANTY; without even the implied warranty of
1305-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1306-# GNU General Public License for more details.
1307-#
1308-# You should have received a copy of the GNU General Public License
1309-# along with Textland. If not, see <http://www.gnu.org/licenses/>.
1310-
1311-"""
1312-Text Land
1313-=========
1314-"""
1315-
1316-__version__ = (0, 1, 0, "final", 0)
1317-
1318-__all__ = [
1319- 'BLACK',
1320- 'BLUE',
1321- 'BRIGHT_BLACK',
1322- 'BRIGHT_BLUE',
1323- 'BRIGHT_CYAN',
1324- 'BRIGHT_GREEN',
1325- 'BRIGHT_MAGENTA',
1326- 'BRIGHT_RED',
1327- 'BRIGHT_WHITE',
1328- 'BRIGHT_YELLOW',
1329- 'CYAN',
1330- 'Cell',
1331- 'DrawingContext',
1332- 'EVENT_KEYBOARD',
1333- 'EVENT_MOUSE',
1334- 'EVENT_RESIZE',
1335- 'Event',
1336- 'GREEN',
1337- 'IApplication',
1338- 'IDisplay',
1339- 'KeyboardData',
1340- 'MAGENTA',
1341- 'MouseData',
1342- 'NORMAL',
1343- 'RED',
1344- 'REVERSE',
1345- 'Rect',
1346- 'Size',
1347- 'TestDisplay',
1348- 'TextAttributes',
1349- 'TextImage',
1350- 'UNDERLINE',
1351- 'WHITE',
1352- 'YELLOW',
1353- '__version__',
1354- 'get_display',
1355-]
1356-
1357-from .abc import IApplication
1358-from .abc import IDisplay
1359-from .bits import Cell
1360-from .bits import Rect
1361-from .bits import Size
1362-from .display import TestDisplay
1363-from .display import get_display
1364-from .drawing import DrawingContext
1365-from .events import EVENT_KEYBOARD
1366-from .events import EVENT_MOUSE
1367-from .events import EVENT_RESIZE
1368-from .events import Event
1369-from .events import KeyboardData
1370-from .events import MouseData
1371-from .image import BLACK
1372-from .image import BLUE
1373-from .image import BRIGHT_BLACK
1374-from .image import BRIGHT_BLUE
1375-from .image import BRIGHT_CYAN
1376-from .image import BRIGHT_GREEN
1377-from .image import BRIGHT_MAGENTA
1378-from .image import BRIGHT_RED
1379-from .image import BRIGHT_WHITE
1380-from .image import BRIGHT_YELLOW
1381-from .image import CYAN
1382-from .image import GREEN
1383-from .image import MAGENTA
1384-from .image import NORMAL
1385-from .image import RED
1386-from .image import REVERSE
1387-from .image import TextAttributes
1388-from .image import TextImage
1389-from .image import UNDERLINE
1390-from .image import WHITE
1391-from .image import YELLOW
1392diff --git a/plainbox/vendor/textland-project/textland/abc.py b/plainbox/vendor/textland-project/textland/abc.py
1393deleted file mode 100644
1394index 97e92d7..0000000
1395--- a/plainbox/vendor/textland-project/textland/abc.py
1396+++ /dev/null
1397@@ -1,71 +0,0 @@
1398-# This file is part of textland.
1399-#
1400-# Copyright 2014 Canonical Ltd.
1401-# Written by:
1402-# Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
1403-#
1404-# Textland is free software: you can redistribute it and/or modify
1405-# it under the terms of the GNU General Public License version 3,
1406-# as published by the Free Software Foundation.
1407-#
1408-# Textland is distributed in the hope that it will be useful,
1409-# but WITHOUT ANY WARRANTY; without even the implied warranty of
1410-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1411-# GNU General Public License for more details.
1412-#
1413-# You should have received a copy of the GNU General Public License
1414-# along with Textland. If not, see <http://www.gnu.org/licenses/>.
1415-
1416-from abc import abstractmethod, ABCMeta
1417-
1418-from .bits import Size
1419-from .events import Event
1420-from .image import TextImage
1421-
1422-
1423-class IApplication(metaclass=ABCMeta):
1424- """
1425- Interface for all applications.
1426-
1427- Applications are simple objects that react to events by repainting
1428- their buffer. Each application has exactly one full-screen buffer.
1429- """
1430-
1431- @abstractmethod
1432- def consume_event(self, event: Event) -> TextImage:
1433- """
1434- Send an event to the controller.
1435-
1436- :param event:
1437- Event that the controller should handle
1438-
1439- This method is called whenever the application should react to an
1440- event. The application may raise StopIteration to ask the display to
1441- exit.
1442- """
1443-
1444-
1445-# TODO: this is mis-named, rename it
1446-class IDisplay(metaclass=ABCMeta):
1447- """
1448- Abstract display system.
1449- """
1450-
1451- @abstractmethod
1452- def run(self, app: IApplication) -> None:
1453- """
1454- Run forever, feeding events to the controller
1455- the controller can raise StopIteration to "quit"
1456- """
1457-
1458-
1459-class IView(metaclass=ABCMeta):
1460- """
1461- Work-in-progress on views that applications can use
1462- """
1463-
1464- @abstractmethod
1465- def render(self, size: Size) -> TextImage:
1466- """
1467- Render this view to a new image of the specified size
1468- """
1469diff --git a/plainbox/vendor/textland-project/textland/bits.py b/plainbox/vendor/textland-project/textland/bits.py
1470deleted file mode 100644
1471index 878fc7a..0000000
1472--- a/plainbox/vendor/textland-project/textland/bits.py
1473+++ /dev/null
1474@@ -1,25 +0,0 @@
1475-# This file is part of textland.
1476-#
1477-# Copyright 2014 Canonical Ltd.
1478-# Written by:
1479-# Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
1480-#
1481-# Textland is free software: you can redistribute it and/or modify
1482-# it under the terms of the GNU General Public License version 3,
1483-# as published by the Free Software Foundation.
1484-#
1485-# Textland is distributed in the hope that it will be useful,
1486-# but WITHOUT ANY WARRANTY; without even the implied warranty of
1487-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1488-# GNU General Public License for more details.
1489-#
1490-# You should have received a copy of the GNU General Public License
1491-# along with Textland. If not, see <http://www.gnu.org/licenses/>.
1492-
1493-from collections import namedtuple
1494-
1495-# Various sizing structs
1496-Cell = namedtuple('Cell', ['char', 'attributes'])
1497-Size = namedtuple('Size', ['width', 'height'])
1498-Offset = namedtuple('Offset', ['x', 'y'])
1499-Rect = namedtuple('Rect', ['x1', 'y1', 'x2', 'y2'])
1500diff --git a/plainbox/vendor/textland-project/textland/display.py b/plainbox/vendor/textland-project/textland/display.py
1501deleted file mode 100644
1502index 6eef333..0000000
1503--- a/plainbox/vendor/textland-project/textland/display.py
1504+++ /dev/null
1505@@ -1,317 +0,0 @@
1506-# This file is part of textland.
1507-#
1508-# Copyright 2014 Canonical Ltd.
1509-# Written by:
1510-# Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
1511-#
1512-# Textland is free software: you can redistribute it and/or modify
1513-# it under the terms of the GNU General Public License version 3,
1514-# as published by the Free Software Foundation.
1515-#
1516-# Textland is distributed in the hope that it will be useful,
1517-# but WITHOUT ANY WARRANTY; without even the implied warranty of
1518-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1519-# GNU General Public License for more details.
1520-#
1521-# You should have received a copy of the GNU General Public License
1522-# along with Textland. If not, see <http://www.gnu.org/licenses/>.
1523-
1524-from abc import abstractmethod
1525-from collections import deque
1526-from copy import deepcopy
1527-from os import getenv
1528-
1529-from . import keys
1530-from .abc import IApplication
1531-from .abc import IDisplay
1532-from .bits import Size
1533-from .events import EVENT_KEYBOARD, EVENT_RESIZE
1534-from .events import Event, KeyboardData
1535-from .image import BLACK
1536-from .image import REVERSE
1537-from .image import TextAttributes
1538-from .image import TextImage
1539-from .image import UNDERLINE
1540-from .image import WHITE
1541-
1542-
1543-class AbstractDisplay(IDisplay):
1544- """
1545- Abstract display class.
1546- """
1547-
1548- def run(self, app: IApplication) -> None:
1549- """
1550- Run forever, feeding events to the controller
1551- the controller can raise StopIteration to "quit"
1552- """
1553- # Tell the app abount the initial size
1554- size = self.get_display_size()
1555- try:
1556- image = app.consume_event(Event(EVENT_RESIZE, size))
1557- self.display_image(image)
1558- except StopIteration:
1559- return
1560- # Then keep on running until the app raises StopIteration
1561- while True:
1562- try:
1563- # XXX: TestDisplay.wait_for_event() can raise StopIteration
1564- # but this is a hack that is not really applicable for curses
1565- event = self.wait_for_event()
1566- image = app.consume_event(event)
1567- except StopIteration as exc:
1568- if exc.args:
1569- return exc.args[0]
1570- else:
1571- break
1572- else:
1573- self.display_image(image)
1574-
1575- @abstractmethod
1576- def display_image(self, image: TextImage) -> None:
1577- """
1578- Display the contents of the image on the screen
1579- """
1580-
1581- @abstractmethod
1582- def get_display_size(self) -> Size:
1583- """
1584- Get the current size of the display
1585- """
1586-
1587- @abstractmethod
1588- def wait_for_event(self) -> Event:
1589- """
1590- Get the next event, waiting for it to occur
1591- """
1592-
1593-
1594-class PrintDisplay(AbstractDisplay):
1595- """
1596- A display that uses regular print() and input()
1597- """
1598-
1599- def __init__(self, size=Size(80, 25)):
1600- self.screen = TextImage(size)
1601-
1602- def display_image(self, image: TextImage) -> None:
1603- text_buffer = image.text_buffer
1604- width = self.screen.size.width
1605- height = self.screen.size.height
1606- print("/{}\\".format('=' * width))
1607- for y in range(height):
1608- line = text_buffer[y * width: (y + 1) * width].tounicode()
1609- print("|{}|".format(line))
1610- print("\\{}/".format('=' * width))
1611-
1612- def get_display_size(self) -> Size:
1613- return self.screen.size
1614-
1615- _commands = {
1616- 'up': Event(EVENT_KEYBOARD, KeyboardData(keys.KEY_UP)),
1617- 'down': Event(EVENT_KEYBOARD, KeyboardData(keys.KEY_DOWN)),
1618- 'left': Event(EVENT_KEYBOARD, KeyboardData(keys.KEY_LEFT)),
1619- 'right': Event(EVENT_KEYBOARD, KeyboardData(keys.KEY_RIGHT)),
1620- '': Event(EVENT_KEYBOARD, KeyboardData(keys.KEY_ENTER)),
1621- }
1622-
1623- def wait_for_event(self) -> Event:
1624- while True:
1625- text = input("TextLand> ")
1626- try:
1627- return self._commands[text]
1628- except KeyError:
1629- if len(text) == 1:
1630- return Event(EVENT_KEYBOARD, KeyboardData(text[0]))
1631- else:
1632- print("Type command name or exactly one letter")
1633-
1634-
1635-class CursesDisplay(AbstractDisplay):
1636- """
1637- A display using python curses module
1638- """
1639-
1640- def __init__(self):
1641- import curses
1642- self._curses = curses
1643- self._screen = None
1644- self._curses_attr = [0] * 0xffff
1645-
1646- def _pa_to_curses(self, pa: int) -> int:
1647- """
1648- Translate cell attributes into supported curses attributes
1649-
1650- Bright mode is well explained in the ncurses FAQ (see: The standard
1651- and VT100 documentation refer to "Bold".):
1652- http://invisible-island.net/ncurses/ncurses.faq.html#problems_coloring
1653-
1654- Check urwid documentation for general terminal supports:
1655- http://urwid.org/manual/displayattributes.html#foreground-and-background-settings
1656-
1657- As curses only supports A_BOLD, bright backgrounds are not supported.
1658- Only ANSI escape codes ANSI supports backgound intensity, see:
1659- http://en.wikipedia.org/wiki/ANSI_escape_code
1660-
1661- Urwid documentation explains why bright background are bad:
1662- "Terminal support for bright background colors is spotty, and they
1663- generally should be avoided. If you are in a high-color mode you
1664- might have better luck using the high-color versions", see:
1665- http://urwid.org/manual/displayattributes.html#bright-background-colors
1666- """
1667- fg, bg, style = TextAttributes.unpack(pa)
1668- curses_attr = 0
1669- if style == 0:
1670- curses_attr = self._curses.A_NORMAL
1671- if style & REVERSE:
1672- curses_attr |= self._curses.A_REVERSE
1673- if style & UNDERLINE:
1674- curses_attr |= self._curses.A_UNDERLINE
1675- if fg > 7:
1676- curses_attr |= self._curses.A_BOLD # Bright foreground colors
1677- fg -= 8
1678- if bg > 7:
1679- bg -= 8 # Bright backgrounds are not supported
1680- curses_attr |= self._curses.color_pair(self._pair_index(fg, bg))
1681- return curses_attr
1682-
1683- def _pair_index(self, fg: int, bg: int) -> int:
1684- # XXX: Support the default colors (-1)
1685- #return (bg + 2) * 9 - fg - 2
1686- return bg * 8 + 7 - fg
1687-
1688- def run(self, app: IApplication) -> None:
1689- try:
1690- self._init_curses()
1691- return super().run(app)
1692- finally:
1693- self._fini_curses()
1694-
1695- def _init_curses(self):
1696- self._screen = self._curses.initscr()
1697- if self._curses.has_colors():
1698- try:
1699- self._curses.start_color()
1700- self._setup_color_pairs()
1701- except self._curses.error:
1702- pass
1703- self._curses.noecho()
1704- self._curses.cbreak()
1705- self._screen.keypad(1)
1706-
1707- def _setup_color_pairs(self):
1708- """
1709- Initialize all the color pairs based on the _pair_index() formula.
1710- To select the right color combination, we just need to use the right
1711- color pair number.
1712- """
1713- # XXX: hardcode 8, since curses.COLORS could be larger than the
1714- # portable set of 64 color pairs
1715- for fg in range(8):
1716- for bg in range(8):
1717- if fg == WHITE and bg == BLACK:
1718- continue
1719- self._curses.init_pair(self._pair_index(fg, bg), fg, bg)
1720- self._curses_attr = [self._pa_to_curses(i) for i in range(0xffff)]
1721-
1722- def _fini_curses(self):
1723- if self._screen is not None:
1724- self._screen.keypad(0)
1725- self._curses.echo()
1726- self._curses.nocbreak()
1727- self._curses.endwin()
1728-
1729- def display_image(self, image: TextImage) -> None:
1730- width = image.size.width
1731- height = image.size.height
1732- for y in range(height - 1):
1733- for x in range(width):
1734- cell = image.get(x, y)
1735- self._screen.addstr(
1736- y, x, cell.char, self._curses_attr[cell.attributes])
1737- y += 1
1738- for x in range(1, width):
1739- cell = image.get(x, y)
1740- self._screen.addstr(
1741- y, x - 1, cell.char, self._curses_attr[cell.attributes])
1742- cell = image.get(0, y)
1743- self._screen.insstr(
1744- y, 0, cell.char, self._curses_attr[cell.attributes])
1745- self._screen.refresh()
1746-
1747- def get_display_size(self) -> Size:
1748- y, x = self._screen.getmaxyx()
1749- return Size(x, y)
1750-
1751- def wait_for_event(self) -> Event:
1752- key_code = self._screen.getch()
1753- # throw away all typeaheads
1754- self._curses.flushinp()
1755- # XXX -1 is for OSX
1756- if key_code == self._curses.KEY_RESIZE or key_code == -1:
1757- return Event(EVENT_RESIZE, self.get_display_size())
1758- elif key_code == self._curses.KEY_UP:
1759- return Event(EVENT_KEYBOARD, KeyboardData(keys.KEY_UP))
1760- elif key_code == self._curses.KEY_DOWN:
1761- return Event(EVENT_KEYBOARD, KeyboardData(keys.KEY_DOWN))
1762- elif key_code == self._curses.KEY_LEFT:
1763- return Event(EVENT_KEYBOARD, KeyboardData(keys.KEY_LEFT))
1764- elif key_code == self._curses.KEY_RIGHT:
1765- return Event(EVENT_KEYBOARD, KeyboardData(keys.KEY_RIGHT))
1766- elif key_code == ord(' '):
1767- return Event(EVENT_KEYBOARD, KeyboardData(keys.KEY_SPACE))
1768- elif key_code == ord('\n'):
1769- return Event(EVENT_KEYBOARD, KeyboardData(keys.KEY_ENTER))
1770- else:
1771- return Event(EVENT_KEYBOARD, KeyboardData(chr(key_code)))
1772-
1773-
1774-class TestDisplay(AbstractDisplay):
1775- """
1776- A display that records all images and replays pre-recorded events
1777- """
1778-
1779- def __init__(self, size=Size(80, 25)):
1780- self.screen_log = []
1781- self.size = size
1782- self.events = deque()
1783-
1784- def display_image(self, image: TextImage) -> None:
1785- self.screen_log.append(deepcopy(image))
1786-
1787- def get_display_size(self) -> Size:
1788- return self.size
1789-
1790- def wait_for_event(self) -> Event:
1791- try:
1792- return self.events.popleft()
1793- except IndexError:
1794- raise StopIteration
1795-
1796- def inject_event(self, event: Event) -> None:
1797- """
1798- Inject an event.
1799-
1800- Events are served in FIFO mode.
1801- """
1802- self.events.append(event)
1803-
1804-
1805-def get_display(display=None) -> IDisplay:
1806- """
1807- Get a ITextDisplay according to TEXTLAND_DISPLAY environment variable
1808- """
1809- if display is None:
1810- display = getenv("TEXTLAND_DISPLAY", "curses")
1811- if display == "curses":
1812- try:
1813- return CursesDisplay()
1814- except ImportError:
1815- # Sized like that to fit 80x25 without any overflow
1816- return PrintDisplay(Size(77, 22))
1817- elif display == "print":
1818- return PrintDisplay()
1819- elif display == "test":
1820- return TestDisplay()
1821- else:
1822- raise ValueError("Unsupported TEXTLAND_DISPLAY type")
1823diff --git a/plainbox/vendor/textland-project/textland/drawing.py b/plainbox/vendor/textland-project/textland/drawing.py
1824deleted file mode 100644
1825index bbc517c..0000000
1826--- a/plainbox/vendor/textland-project/textland/drawing.py
1827+++ /dev/null
1828@@ -1,112 +0,0 @@
1829-# This file is part of textland.
1830-#
1831-# Copyright 2014 Canonical Ltd.
1832-# Written by:
1833-# Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
1834-#
1835-# Textland is free software: you can redistribute it and/or modify
1836-# it under the terms of the GNU General Public License version 3,
1837-# as published by the Free Software Foundation.
1838-#
1839-# Textland is distributed in the hope that it will be useful,
1840-# but WITHOUT ANY WARRANTY; without even the implied warranty of
1841-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1842-# GNU General Public License for more details.
1843-#
1844-# You should have received a copy of the GNU General Public License
1845-# along with Textland. If not, see <http://www.gnu.org/licenses/>.
1846-
1847-from .bits import Offset, Rect
1848-from .image import TextImage, TextAttributes
1849-
1850-
1851-class DrawingContext:
1852- """
1853- Context for simple text drawing
1854- """
1855-
1856- def __init__(self, image: TextImage):
1857- self.image = image
1858- self.offset = Offset(0, 0)
1859- self.clip = Rect(0, 0, image.size.width, image.size.height)
1860- self.attributes = TextAttributes()
1861-
1862- def fill(self, c: str) -> None:
1863- packed_attr = self.attributes.packed
1864- for x in range(self.clip.x1, self.clip.x2):
1865- for y in range(self.clip.y1, self.clip.y2):
1866- self.image.put(x, y, c, packed_attr)
1867-
1868- def clip_to(self, x1: int, y1: int, x2: int, y2: int) -> None:
1869- self.clip = Rect(x1, y1, x2, y2)
1870-
1871- def clip_by(self, dx1: int, dy1: int, dx2: int, dy2: int) -> None:
1872- x1 = self.clip.x1 + dx1
1873- y1 = self.clip.y1 + dy1
1874- x2 = self.clip.x2 + dx2
1875- y2 = self.clip.y2 + dy2
1876- self.clip = Rect(x1, y1, x2, y2)
1877-
1878- def move_to(self, x: int, y: int) -> None:
1879- """
1880- Move paint offset to the specified spot
1881- """
1882- self.offset = Offset(x, y)
1883-
1884- def move_by(self, dx: int, dy: int) -> None:
1885- """
1886- Move paint offset by the specified delta
1887- """
1888- self.offset = Offset(self.offset.x + dx, self.offset.y + dy)
1889-
1890- def print(self, text: str) -> None:
1891- """
1892- Print the specified text
1893-
1894- Multi-line strings are supported. The offset and clipping area
1895- is respected. Painting beyond the clipping area is ignored
1896-
1897- The offset is automatically adjusted to point
1898- to the end of the string.
1899- """
1900- pa = self.attributes.packed
1901- for line in text.splitlines():
1902- self._put_line(line, pa)
1903- self.move_by(0, 1)
1904-
1905- def border(self, lm=0, rm=0, tm=0, bm=0) -> None:
1906- """
1907- Draw a border around the edges of the current cli. Each parameter
1908- specifies the margin to use for a specific side of the border.
1909- """
1910- pa = self.attributes.packed
1911- self._put_x_y_c_pa(self.clip.x1 + lm, self.clip.y1 + tm, '┌', pa)
1912- self._put_x_y_c_pa(self.clip.x1 + lm, self.clip.y2 - 1 - bm, '└', pa)
1913- self._put_x_y_c_pa(self.clip.x2 - rm - 1, self.clip.y1 + tm, '┐', pa)
1914- self._put_x_y_c_pa(
1915- self.clip.x2 - rm - 1, self.clip.y2 - 1 - bm, '┘', pa)
1916- for x in range(self.clip.x1 + 1 + lm, self.clip.x2 - 1 - rm):
1917- self._put_x_y_c_pa(x, self.clip.y1 + tm, '─', pa)
1918- self._put_x_y_c_pa(x, self.clip.y2 - 1 - bm, '─', pa)
1919- for y in range(self.clip.y1 + 1 + tm, self.clip.y2 - 1 - bm):
1920- self._put_x_y_c_pa(self.clip.x1 + lm, y, '│', pa)
1921- self._put_x_y_c_pa(self.clip.x2 - rm - 1, y, '│', pa)
1922-
1923- def _put_line(self, text: str, pa: int) -> None:
1924- """
1925- Print one line, respecting clipping and offset
1926- """
1927- if "\n" in text:
1928- raise ValueError("should be without any newlines")
1929- for dx, c in enumerate(text):
1930- self._put_dx_dy_c_pa(dx, 0, c, pa)
1931-
1932- def _put_dx_dy_c_pa(self, dx: int, dy: int, c: str, pa: int) -> None:
1933- x = self.offset.x + dx
1934- y = self.offset.y + dy
1935- self._put_x_y_c_pa(x, y, c, pa)
1936-
1937- def _put_x_y_c_pa(self, x: int, y: int, c: str, pa: int) -> None:
1938- if (self.clip.x1 <= x < self.clip.x2
1939- and self.clip.y1 <= y < self.clip.y2):
1940- self.image.put(x, y, c, pa)
1941diff --git a/plainbox/vendor/textland-project/textland/events.py b/plainbox/vendor/textland-project/textland/events.py
1942deleted file mode 100644
1943index 537c409..0000000
1944--- a/plainbox/vendor/textland-project/textland/events.py
1945+++ /dev/null
1946@@ -1,31 +0,0 @@
1947-# This file is part of textland.
1948-#
1949-# Copyright 2014 Canonical Ltd.
1950-# Written by:
1951-# Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
1952-#
1953-# Textland is free software: you can redistribute it and/or modify
1954-# it under the terms of the GNU General Public License version 3,
1955-# as published by the Free Software Foundation.
1956-#
1957-# Textland is distributed in the hope that it will be useful,
1958-# but WITHOUT ANY WARRANTY; without even the implied warranty of
1959-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1960-# GNU General Public License for more details.
1961-#
1962-# You should have received a copy of the GNU General Public License
1963-# along with Textland. If not, see <http://www.gnu.org/licenses/>.
1964-
1965-from collections import namedtuple
1966-
1967-# Input event
1968-Event = namedtuple('Event', ['kind', 'data'])
1969-
1970-# Data for Event.data
1971-KeyboardData = namedtuple('KeyboardData', ['key'])
1972-MouseData = namedtuple('MouseData', ['x', 'y', 'buttons'])
1973-
1974-# Constants for Event.kind
1975-EVENT_KEYBOARD = "keyboard"
1976-EVENT_MOUSE = "mouse"
1977-EVENT_RESIZE = "resize"
1978diff --git a/plainbox/vendor/textland-project/textland/image.py b/plainbox/vendor/textland-project/textland/image.py
1979deleted file mode 100644
1980index def00d1..0000000
1981--- a/plainbox/vendor/textland-project/textland/image.py
1982+++ /dev/null
1983@@ -1,122 +0,0 @@
1984-# This file is part of textland.
1985-#
1986-# Copyright 2014 Canonical Ltd.
1987-# Written by:
1988-# Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
1989-# Sylvain Pineau <sylvain.pineau@canonical.com>
1990-#
1991-# Textland is free software: you can redistribute it and/or modify
1992-# it under the terms of the GNU General Public License version 3,
1993-# as published by the Free Software Foundation.
1994-#
1995-# Textland is distributed in the hope that it will be useful,
1996-# but WITHOUT ANY WARRANTY; without even the implied warranty of
1997-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1998-# GNU General Public License for more details.
1999-#
2000-# You should have received a copy of the GNU General Public License
2001-# along with Textland. If not, see <http://www.gnu.org/licenses/>.
2002-
2003-from array import array
2004-
2005-from .bits import Cell, Size
2006-
2007-# ANSI color index
2008-(
2009- BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE,
2010- BRIGHT_BLACK, BRIGHT_RED, BRIGHT_GREEN, BRIGHT_YELLOW, BRIGHT_BLUE,
2011- BRIGHT_MAGENTA, BRIGHT_CYAN, BRIGHT_WHITE
2012-) = range(16)
2013-
2014-# Supported text styles.
2015-NORMAL = 0 # Normal (default style)
2016-REVERSE = 1 << 0 # Reverse background and foreground colors
2017-UNDERLINE = 1 << 1 # Underline mode
2018-
2019-
2020-class TextImage:
2021- """
2022- A rectangular, mutable text image.
2023-
2024- The image supports NORMAL, REVERSE and UNDERLINE as per-cell attributes,
2025- the 8 colors described in the ANSI standard and the BOLD video attribute
2026- to render the foreground colors as bright (aka light or intensified).
2027- """
2028-
2029- def __init__(self, size: Size):
2030- self.size = size
2031- self.width = self.size.width
2032- self.text_buffer = array('u')
2033- self.text_buffer.extend(' ' * size.width * size.height)
2034- self.attribute_buffer = array('H') # Unsigned short
2035- self.attribute_buffer.extend([0] * size.width * size.height)
2036-
2037- def put(self, x: int, y: int, c: str, pa: int) -> None:
2038- """
2039- Put character *c* with attributes *pa* into cell at (*x*, *y*)
2040-
2041- :param x:
2042- X coordinate
2043- :param y:
2044- Y coordinate
2045- :param c:
2046- One character string
2047- :param pa:
2048- Packed attribute (up to uint16_t)
2049- """
2050- assert 0 <= x < self.size.width
2051- assert 0 <= y < self.size.height
2052- offset = x + y * self.width
2053- self.text_buffer[offset] = c
2054- self.attribute_buffer[offset] = pa
2055-
2056- def get(self, x: int, y: int) -> Cell:
2057- """
2058- Get a cell from (*x*, *y*)
2059-
2060- :param x:
2061- X coordinate
2062- :param y:
2063- Y coordinate
2064- :returns:
2065- Cell(c, pa)
2066- """
2067- offset = x + y * self.width
2068- return Cell(self.text_buffer[offset], self.attribute_buffer[offset])
2069-
2070- def print_frame(self) -> None:
2071- text_buffer = self.text_buffer
2072- width = self.size.width
2073- height = self.size.height
2074- print("/{}\\".format('=' * width))
2075- for y in range(height):
2076- line = text_buffer[y * width: (y + 1) * width].tounicode()
2077- print("|{}|".format(line))
2078- print("\\{}/".format('=' * width))
2079-
2080-
2081-class TextAttributes:
2082-
2083- def __init__(self):
2084- self.fg = WHITE
2085- self.bg = BLACK
2086- self.style = NORMAL
2087-
2088- def reset(self):
2089- self.fg = WHITE
2090- self.bg = BLACK
2091- self.style = NORMAL
2092-
2093- @property
2094- def packed(self):
2095- return ((self.fg & 15) << 8) + ((self.bg & 15) << 4) + (self.style & 3)
2096-
2097- @staticmethod
2098- def unpack(pa: int) -> (int, int, int):
2099- """
2100- Unpack packed attributes into (fg, bg, style)
2101- """
2102- fg = (pa >> 8) & 15
2103- bg = (pa >> 4) & 15
2104- style = pa & 3
2105- return fg, bg, style
2106diff --git a/plainbox/vendor/textland-project/textland/keys.py b/plainbox/vendor/textland-project/textland/keys.py
2107deleted file mode 100644
2108index 53caeb2..0000000
2109--- a/plainbox/vendor/textland-project/textland/keys.py
2110+++ /dev/null
2111@@ -1,24 +0,0 @@
2112-# This file is part of textland.
2113-#
2114-# Copyright 2014 Canonical Ltd.
2115-# Written by:
2116-# Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
2117-#
2118-# Textland is free software: you can redistribute it and/or modify
2119-# it under the terms of the GNU General Public License version 3,
2120-# as published by the Free Software Foundation.
2121-#
2122-# Textland is distributed in the hope that it will be useful,
2123-# but WITHOUT ANY WARRANTY; without even the implied warranty of
2124-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2125-# GNU General Public License for more details.
2126-#
2127-# You should have received a copy of the GNU General Public License
2128-# along with Textland. If not, see <http://www.gnu.org/licenses/>.
2129-
2130-KEY_UP = "up"
2131-KEY_DOWN = "down"
2132-KEY_LEFT = "left"
2133-KEY_RIGHT = "right"
2134-KEY_ENTER = "enter"
2135-KEY_SPACE = "space"
2136diff --git a/po/POTFILES.in b/po/POTFILES.in
2137index b01795f..200800c 100644
2138--- a/po/POTFILES.in
2139+++ b/po/POTFILES.in
2140@@ -188,12 +188,4 @@
2141 ./plainbox/vendor/sphinxarg/__init__.py
2142 ./plainbox/vendor/sphinxarg/ext.py
2143 ./plainbox/vendor/sphinxarg/parser.py
2144-./plainbox/vendor/textland/__init__.py
2145-./plainbox/vendor/textland/abc.py
2146-./plainbox/vendor/textland/bits.py
2147-./plainbox/vendor/textland/display.py
2148-./plainbox/vendor/textland/drawing.py
2149-./plainbox/vendor/textland/events.py
2150-./plainbox/vendor/textland/image.py
2151-./plainbox/vendor/textland/keys.py
2152 ./setup.py

Subscribers

People subscribed via source and target branches