pax_global_header00006660000000000000000000000064152640461540014521gustar00rootroot0000000000000052 comment=80d2f107f915576f43a019abe26f13a9db21703c libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/000077500000000000000000000000001526404615400236565ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/CONTRIBUTING000066400000000000000000000074371526404615400255230ustar00rootroot00000000000000How to contribute to libgedit-gtksourceview =========================================== Git commit messages ------------------- Convention: the first line (a short description) should contain at most 72 characters. C code conventions ------------------ See https://gitlab.gnome.org/World/gedit/gedit/-/tree/master/docs/guidelines/ In the tools/ directory there is an uncrustify config file with a script to apply the coding style to a certain *.c file. The script has not (yet) been run on all the libgedit-gtksourceview source code, but it can serve as a guideline. Programming best-practices -------------------------- libgedit-gtksourceview is a sizeable piece of software, developed over the years by different people and GNOME technologies. Some parts of the code may be a little old. So when editing the code, we should try to make it better, not worse. Here are some general advices: - Simplicity: the simpler code the better. Any trick that seem smart when you write it is going to bite your ass later when reading the code. In fact, a code is read far more often than it is written: for fixing a bug, adding a feature, or simply see how it is implemented. So making the code harder to read is a net loss. - Avoid code duplication, make an effort to refactor common code into utility functions. - Write self-documented code when possible: instead of writing comments, it is often possible to make the code self-documented by choosing good names for the variables, functions and types. Please avoid lots of one-letter variable names, it makes the code hard to understand. Don't be afraid to write long variable names. Also, a variable should be used for only one purpose. A good function name is one that explain clearly all what its code really does. There shouldn't be hidden features. If you can not find easily a good function name, you should probably split the function in smaller pieces. A function should do only one thing, but do it well. - About comments: Do not write comments to state the obvious, for example avoid: i = 0; /* assign 0 to i */ Of course, write GTK-Doc comments to document the public API, especially the class descriptions. The class descriptions gives a nice overview when someone discovers the library. For a private class, it is useful to write a comment at the top describing in a few lines what the class does. Document well the data structures: the invariants (what is or should be always true about certain data fields); for a list, what is the element type; for a hash table, what are the key and value types; etc. It is more important to document the data structures than the functions, because when understanding well the data structures, the functions implementation should be for the most part obvious. When it isn't obvious, it is more important to explain *why* something is implemented in this way, not the *how*. You can deduce the *how* from the code, but not the *why*. If a non-trivial feature was previously implemented in a different way, it's useful to write a comment to describe in a few lines the previous implementation(s), and why it has been changed (for example to fix some problems). It permits to avoid repeating history, otherwise a new developer might wonder why a certain feature is implemented in "this complicated way" and not in "that simpler obvious way". For such things, a comment in the code has more chances to be read than an old commit message (especially if the code has been copied from one repository to another). - Ideally, contribute below on the stack. Fix a problem at the right place, instead of writing hacks or heuristics to work around a bug or a lack of feature in an underlying library. libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/LICENSES/000077500000000000000000000000001526404615400250635ustar00rootroot00000000000000LGPL-2.1-or-later.txt000066400000000000000000000626211526404615400303330ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/LICENSESGNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, 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 this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. 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 not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), 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 distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the 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 specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "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 LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY 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 LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. one line to give the library's name and an idea of what it does. Copyright (C) year name of author This library 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. This library 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 library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. signature of Ty Coon, 1 April 1990 Ty Coon, President of Vice That's all there is to it! libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/NEWS000066400000000000000000001361461526404615400243700ustar00rootroot00000000000000News in 299.8.0, 2026-10-15 --------------------------- * Translation updates. News in 299.8.alpha, 2026-08-22 ------------------------------- * GtkSourceFileLoader: code refactorings. * Words completion provider: code refactorings. * Use GflsEncoding, remove GtkSourceEncoding. * Don't annotate get_type() functions with G_GNUC_CONST. * Translation updates. News in 299.7.0, 2026-03-27 --------------------------- Completion framework: * Cherry-pick a few commits from GtkSourceView 4 to no longer use deprecated API and use gdk_window_move_to_rect(). * Move GtkSourceCompletionContainer to libgedit-amtk as AmtkTreeViewScrolledWindowSizing. * Some code refactorings. File loading and saving: * Move some code to libgedit-gfls and depend on it: - GtkSourceIconv -> GflsIconv - GtkSourceInputStream -> GflsInputStream - Use gfls_encoding_try_convert() Syntax highlighting: * Improvements to the syntax highlighting of: markdown and yaml. Other: * A new public function in GtkSourceBuffer. * Avoid some code duplication. * Translation updates. News in 299.6.0, 2026-01-03 --------------------------- Completion framework: * The GtkSourceCompletion class no longer implements the GtkBuildable interface. * GtkSourceCompletionProposal: various improvements. * GtkSourceCompletionItem: - Various improvements. - Remove all the properties. Microsoft Windows: * Fix compilation warnings. * Fix unit tests failures. Various gardening tasks: * Move back almost all typedefs from gtksourcetypes.h to the corresponding headers, with the goal to keep in gtksourcetypes.h only what is strictly necessary. * Convert #include guards to #pragma once with the guardonce utility: https://github.com/cgmb/guardonce * Add missing G_BEGIN_DECLS/G_END_DECLS pairs. * Add missing G_GNUC_CONST annotation for get_type() functions. * Have a LICENSES directory, to better follow the REUSE way of applying licenses: https://reuse.software/ (FSFE initiative) * Reduce the padding for future expansion in public Class structs, the API/ABI is anyway no longer guaranteed to be stable. Other: * Translation updates. News in 299.6.alpha2, 2025-11-17 -------------------------------- File loading and saving: * Small bug fix in GtkSourceFile. * GtkSourceBufferOutputStream private class: - Start to refactor it. - Extract the try_convert() function out of the class and re-implement it with GtkSourceIconv. * GtkSourceIconv: - Add the feed_discard_output() function. - Write unit tests. * GtkSourceFileLoader: - Add max-size property. - Improve the unit tests. GtkSourceView class: * Improve the API documentation. * Remove GtkBuildable interface implementation. Other: * Translation updates. * Docs: improve the CSS for the docs that is manually written in HTML. News in 299.6.alpha1, 2025-09-05 -------------------------------- GtkSourceIter: - Make some gtk_source_iter_*() functions public. - Move the single tepl_iter_*() function as a public gtk_source_iter_*(). - Write more unit tests. File loading and saving: - GtkSourceEncoding, GtkSourceFile, GtkSourceFileLoader and GtkSourceFileSaver are maintained again. Remove the warnings in the docs about using the corresponding classes from libgedit-tepl. (It is planned to improve the file loading and saving feature in this module instead, and have in libgedit-tepl a higher-level API). - Create the "Low-Level File Loading and Saving" category in the API docs, and add GtkSourceIconv and GtkSourceInputStream (new classes). - Rework GtkSourceEncoding. - Start to rework GtkSourceFile. - Rework GtkSourceFileLoader (modernize the code and use GtkSourceInputStream internally). - Code organization: create the file-loading-and-saving/ subdir. GtkSourceView class: - Small improvements to both the API docs and the implementation. Tools: - Some small changes/improvements to the 'list-langs' and 'uncrustify' tools. Other: - Improve the documentation for contributors. Start to write a list of possible tasks in the “docs/possible-tasks/” directory. - Build system: tune the CFLAGS in order to run code-coverage tools conveniently. - Get rid of HAVE_CONFIG_H (Autotoolism). - Move some typedefs to their corresponding classes. - License headers for *.c and *h files: follow REUSE way of applying licenses. https://reuse.software/ - Remove modelines. - For translations: fix issue reported by GNOME Damned Lies. - Translations updates. News in 299.5.0, 2025-03-08 --------------------------- - language-specs: files reorganization and simplify the scripts. - Translation updates. News in 299.4.0, 2024-12-07 --------------------------- - Remove the background-pattern (with the grid) feature. - Fix some crashes. - Fix GI annotation warnings. - Translation updates. News in 299.3.0, 2024-08-31 (stable version) -------------------------------------------- Style schemes: - Remove GtkSourceStyleSchemeChooser interface. - Add light-only and dark-only kinds. - Mark classic and tango as light-only kind (so they are unsupported with dark theme variants). Syntax highlighting: - New *.lang file: Nix. For packagers: - Build: add the 'tests' option. Misc: - Documentation updates and improvements. News in 299.2.1, 2024-04-27 (stable version) -------------------------------------------- * Bump soversion (something that was forgotten for the 299.2.0 version). News in 299.2.0, 2024-04-27 (stable version) -------------------------------------------- * Nothing new. News in 299.1.0, 2024-02-15 (pre-release) ----------------------------------------- * Continue to rework GtkSourceStyle* classes. This includes a switch from the libxml2 to GMarkupParser. (the libxml2 is still used for *.lang files though). * Style schemes XML file format: - Simplify it. - Better document it. - Extend it with the "kind" attribute, for light/dark schemes. - Remove the *.rng file. * Unit tests: - Don't rely on environment variables to be set to run the tests. - Have good code coverage for what has been modified or added. News in 299.0.5, 2023-12-07 --------------------------- * Fix a bug: Alt+Down (moving line(s) down) or Alt+Up (moving line(s) up) wrt. the undo/redo history and cursor positioning. News in 299.0.4, 2023-07-29 --------------------------- * Tools: list-langs, to generate a listing of *.lang files. * Utils: add a function. * Some small maintenance tasks. * Translation updates. News in 299.0.3, 2023-06-23 --------------------------- * Build system: switch from Autotools to Meson. News in 299.0.2, 2023-05-27 --------------------------- * Continue to rework GtkSourceStyle* classes. * Code maintenance: don't use g_slice_*() (deprecated). * Remove support for installed tests. * Translations: use Weblate. News in 299.0.1, 2023-04-26 --------------------------- * Style schemes (classic and tango): more visible line-numbers background color. * Code refactorings and a few bug fixes in GtkSourceStyle, GtkSourceStyleScheme and GtkSourceStyleSchemeManager. * API changes for GtkSourceStyleSchemeManager. * Files reorganization in the tests/ directory. * Documentation: start to migrate/rewrite some pages to the docs/html/ directory. News in 299.0.0, 2023-04-18 --------------------------- This is a development/unstable version. * Rename the project to libgedit-gtksourceview. * Bump API version to 300. The "3" means that it targets GTK 3. * The Visual Studio (win32) project files are no longer generated. * Build system: some updates and simplifications. * Unit tests: properly test GtkSourceLanguage. * Style schemes: rely less on the provided colors by the GTK theme, fix some regressions in classic and tango. * Some features have been removed, see the porting guide. * Use G_MODULE_EXPORT instead of custom macros. * Some files reorganization in the data/ directory. * Some code refactorings, write more unit tests. News in 4.0.2, 2018-06-17 ------------------------- * GtkSourceView has moved to the GNOME GitLab instance. The bugzilla tickets have not yet been migrated to the GitLab issues, so before filing a new issue on GitLab, please search the bugzilla first. All links are available as usual on: https://wiki.gnome.org/Projects/GtkSourceView * Fix new compilation warnings (-Wcast-function-type). * New syntax highlighting definition file for: SCSS and Less. * Improvements to the syntax highlighting of: CSS and Rust. News in 4.0.1, 2018-05-05 ------------------------- * New syntax highlighting definition file for: TOML. * Improvements to the syntax highlighting of: CSS and XML. * Translation updates. News in 4.0.0, 2018-03-10 ------------------------- * GtkSourceView class: respect the GtkTextView:accepts-tab property. * New syntax highlighting definition file for: Groovy and Tera templates. * Improvements to the syntax highlighting of: Erlang and Fortran. * Provide an Uncrustify configuration file for the GtkSourceView C coding style. * Various other improvements and small fixes. * Translation updates. News in 3.99.7, 2017-12-09 -------------------------- * Rename gtk_source_completion_show() to gtk_source_completion_start(). * Drop gconstructor.h, add gtk_source_init() and gtk_source_finalize(). * Improve documentation. * New syntax highlighting definition file for: logcat. * Improvements to the syntax highlighting of: Python, reStructuredText and CMake. * Improvements to the Visual Studio builds. * Translation updates. News in 3.99.6, 2017-10-15 -------------------------- * Reduce a lot the number of translatable strings (especially in *.lang files), to translate only what makes sense. 630 -> 93 translatable strings! * Build: remove ENABLE_NLS option, always support gettext translation, to simplify the code. * Fix bug in gtk_source_view_indent_lines(). * Fix bug to read GtkSourceView 4 *.lang and style scheme files, not those from GtkSourceView 3. * Code refactorings to prepare for the namespace change. * Improvements to the syntax highlighting of: Vala. * Improvements to the Visual Studio builds. * Various other small improvements. * Translation updates. News in 3.99.5, 2017-09-06 -------------------------- * Avoid type redefinitions. * Fix bug when GtkSourceView:indent-width and :tab-width are equal. * New syntax highlighting definition file for: Swift, Maxima and Kotlin. * Improvements to the syntax highlighting of: sparql, CSS, bibtex and LaTeX. * jade.lang: add *.pug to globs. * Various other small improvements. * Translation updates. News in 3.99.4 -------------- * The API of the GtkSourceView::move-lines keybinding signal has been simplified: the copy parameter has been removed; and the count parameter has been replaced by the down boolean. * Force visual word movements for RTL text with Ctrl+left/right. * Improvements to the Visual Studio builds and add support for Visual Studio 2017. * Improvements to the syntax highlighting of: Rust and LaTeX. * Add mimetype to python3.lang. * Misc bug fixes. * Various other small improvements. * Translation updates. News in 3.99.3 -------------- This is an intermediate version towards GtkSourceView 4.0. GtkSourceView 4.0 will still depend on GTK+ 3, but the release date is not yet determined. See the roadmap for more details: https://wiki.gnome.org/Projects/GtkSourceView/RoadMap * Bug fix in GtkSourceGutterRendererPixbuf. * Fixes for bugs found by Coverity. * Build fixes on MS Windows. * New syntax highlighting definition files for: ABNF, HAXE and Django template. * Improvements to the syntax highlighting of: Meson, CSS, ini, Rust and JavaScript. * Improvements to the build system. * Translation updates. News in 3.99.2 -------------- This is an intermediate version towards GtkSourceView 4.0. GtkSourceView 4.0 will still depend on GTK+ 3, but the release date is not yet determined. * gtk_source_completion_item_new2() has been renamed to gtk_source_completion_item_new(). * gtk_source_search_context_forward2() has been renamed to gtk_source_search_context_forward(). * gtk_source_search_context_forward_finish2() has been renamed to gtk_source_search_context_forward_finish(). * gtk_source_search_context_backward2() has been renamed to gtk_source_search_context_backward(). * gtk_source_search_context_backward_finish2() has been renamed to gtk_source_search_context_backward_finish(). * gtk_source_search_context_replace2() has been renamed to gtk_source_search_context_replace(). * The GtkSourceSearchContext:settings property is now construct-only. News in 3.99.1 -------------- This is an intermediate version towards GtkSourceView 4.0. GtkSourceView 4.0 will still depend on GTK+ 3, but the release date is not yet determined. * All the deprecated APIs have been removed. * Only can be included directly. There were already warnings about it in GtkSourceView 3. The warnings have been changed to errors. * Only the version 2 of the GtkSourceView language definition file format is supported (for *.lang files, used for syntax highlighting). The support for the version 1 has been dropped. * Add padding for future expansion in the Class structures. * Docs: add an intro with the pkg-config name. * Docs: write the first steps of the GtkSourceView 3 -> 4 porting guide. * Build fixes on Windows. * Improvements to the syntax highlighting of: JavaScript and PHP * Translation updates News in 3.24.1 -------------- * Deprecate the 'copy' parameter of the GtkSourceView::move-lines signal. * Force visual word movements for RTL text with Ctrl+left/right. * Misc bug fixes. * Translation update. News in 3.24.0 -------------- * Translation update News in 3.23.91 --------------- * Improvements to the Visual Studio builds and add support for Visual Studio 2017. * Bug fix in Rust syntax highlighting * Add mimetype to python3.lang * Translation updates News in 3.23.90 --------------- * Bug fix in GtkSourceGutterRendererPixbuf * Fixes for bugs found by Coverity * New syntax highlighting definition file for: Django template * Improvements to the syntax highlighting of: CSS and JavaScript * Translation updates News in 3.23.2 -------------- This version still uses GTK+ 3. A GtkSourceView 3.24 version is planned (still depending on GTK+ 3), which will be released at the same time as GNOME 3.24 in March 2017. * Docs: add an introduction with the pkg-config name and which GTK+ version is used. * Build fixes on MS Windows. * New syntax highlighting definition files for: ABNF and HAXE. * Improvements to the syntax highlighting of: JavaScript, PHP, Meson, CSS, ini and Rust. * Translation updates. News in 3.23.1 -------------- This version still uses GTK+ 3. A GtkSourceView 3.24 version is planned (still depending on GTK+ 3), but the release date is not yet determined. * New class: GtkSourceSpaceDrawer with a matrix property to combine space types vs locations. The old white space drawing API has been deprecated. * gtk_source_search_context_set_settings() has been deprecated, the "settings" property will become construct-only. * GtkSourceCompletionItem: add a new API and deprecate the old constructors. * GtkSourceGutter: add get_view() and get_window_type() public functions. * Build system: do not hardcode the API version (currently 3.0) at as many places as possible (use a variable instead). * Bug fixes * Documentation improvements * Translation updates News in 3.22.0 -------------- * Translation updates News in 3.21.6 -------------- * Improvements to the syntax highlighting of: CSS and Rust * Translation updates News in 3.21.5 -------------- * Fix an infinite loop in whitespace drawing * Translation updates News in 3.21.4 -------------- * GtkSourceRegion: add functions to add/subtract/intersect two GtkSourceRegions * GtkSourceRegion: rename functions to add/subtract/intersect a subregion * GtkSourceRegion: real unit tests * Whitespace drawing: draw a final newline if the GtkSourceBuffer:implicit-trailing-newline property is TRUE. * Whitespace drawing: refactor the code, move the code to a private SpaceDrawer class. * Use gconstructor.h to have a DSO constructor that inits i18n, and a destructor to unref the singletons. * Use the AX_VALGRIND_CHECK Autotools macro * SearchContext: send a private signal to the views so that the views can ask the SearchContext to highlight in priority the visible areas of the buffer (works only for normal search, not regex search). * Improvements to the syntax highlighting of: LaTeX * Various other code improvements * Translation updates News in 3.21.3 -------------- * Warn when a secondary public header is #included in external code. Only should be #included directly. * Remove the --disable-completion-providers configure option, to always build the completion providers. There is currently only one completion provider: GtkSourceCompletionWords, which is not a lot of code and doesn't pull up additional dependencies. * Add back the gtksourceview-typebuiltins.h public header, for backward compatibility. * Fixes/improvements to the Visual Studio builds * Improvements to the syntax highlighting of: rpmspec * Fix a bug in GtkSourceSearchContext * Various small code and documentation improvements * Translation updates News in 3.21.2 -------------- * Make gtk_source_style_apply() public * GtkSourceSearchContext: add "version 2" of some functions to improve the API, and deprecate the v1's. * Fix a critical message when showing a completion window * Fix a drawing issue with syntax highlighting * Improvements to the syntax highlighting of: Meson, JavaScript * Various code improvements and bug fixes * Documentation improvements * Build fixes on ARM News in 3.21.1 -------------- * Export SourceRegion in the public API * Translation updates News in 3.20.2 -------------- * Drawing optimizations * Translation updates News in 3.20.1 -------------- * Improvements to style schemes * Export missing public methods * Translation updates News in 3.20.0 -------------- * Improvements to the syntax highlighting of: CSS, JavaScript, protobuf, Vala, imagej, Python 3 and BibTeX * Adapt code to use GTK_TEXT_VIEW_LAYER_BELOW_TEXT and GTK_TEXT_VIEW_LAYER_ABOVE_TEXT * Add a "sourceview" CSS class to all GtkSourceView's * Fixes to the MSVC build system * Various other small fixes and improvements * Translation updates News in 3.19.4 -------------- * CSS fixes to track GTK+ changes * Fix completion popup on Wayland * MSVC build projects * Misc bug fixes * Translation updates News in 3.19.3 -------------- * Many fixes to track GTK+ changes * Rework symbol visibility handling * Other small improvements * Translation updates News in 3.19.2 -------------- * Some CSS adjustments to track GTK+ changes * Add API to get the GtkSourceView version * Other small improvements * Translation update News in 3.19.1 -------------- * New class: GtkSourceTag with a draw-spaces property * Drop build dependency on intltool, use upstream gettext and ITS Tool instead * Completion windows: don't add space for scrollbars * Do not show undo/redo in context menu if undo/redo is disabled * Bracket matching: several bug fixes, unit tests written, code simplified * Other small code improvements * Translation updates News in 3.18.1 -------------- * Misc bug fixes * Translation updates News in 3.18.0 -------------- * Minor improvement to the CSS syntax highlighting * Translation updates News in 3.17.7 -------------- * Handle creating pixbufs for HiDPI resolutions * Improvements to the Octave and Matlab syntax highlighting * Other various code improvements * Translation updates News in 3.17.6 -------------- * Search and replace: fix bug with regular expressions containing look-ahead assertions. * Add some missing GI annotations * A few adjustments to the build system * Translation updates News in 3.17.5 -------------- * Support symbolic icons in the completion API * New lang or improved lang files: Rust, Meson, C, protobuf * Revamped build system (drop gnome-common dependency) * Misc bug fixes * Translation updates News in 3.17.4 -------------- * Add .rej files as another version of diff file * Improvements to lang files: Apache Pig, rpmspec * Misc bug fixes * Translation updates News in 3.17.3 -------------- * Add a few more functions to GtkSourceFile * Add the "smart-backspace" property * Misc bug fixes * Translation updates News in 3.17.2 -------------- * New widget: GtkSourceMap * Set a GtkTextTag name for context classes (no-spell-check, etc) * Add gtk_source_buffer_sort_lines() * Style schemes: * Support "single", "double" etc for the underline attribute * Support underline-color * Improvements to lang files: Ocaml, C++ header and Shell * Translation updates News in 3.17.1 -------------- * New public function: gtk_source_encoding_get_default_candidates() * Add g_autoptr autocleanup support * Add lang files for (basic) CSV and jade template * Improvements to lang files: C, CMake, GDB log, JavaScript, C#, F#, VB.net and CSS * Translation updates News in 3.16.1 -------------- * Update CMake language spec * Add a "path" class for contexts with a file name * Performance improvements for groups of text insertions/deletions * Fix bug with symbolic icons and dark GTK+ theme * Translation updates News in 3.16.0 -------------- * A few bug fixes and various other improvements * Translation updates News in 3.15.91 --------------- * Fix a crash when destroying the widget during a search * Add some signals to bind keyboard actions * Various other improvements * Translation updates News in 3.15.90 --------------- * Provide a way to draw background patterns (a grid) * Support incrementing and decrementing numbers * Various other improvements News in 3.15.3 -------------- * Better word boundaries for word selection (double-click) and word movements (ctrl+arrow, shift+ctrl+arrow, ctrl+backspace, etc). * Add style scheme chooser widgets: GtkSourceStyleSchemeChooser (interface), GtkSourceStyleSchemeChooserButton and GtkSourceStyleSchemeChooserWidget. * Add gtk_source_view_indent_lines() and gtk_source_view_unindent_lines(). * Add the GtkSourceView::move-to-matching-bracket action signal. * Add gtk_source_buffer_join_lines(). * Gutter: use current line background color for current line. * Add syntax highlighting support for Apache Thrift. * Various other improvements and bug fixes * Translation updates News in 3.15.2 -------------- * Undo/Redo: restore selection * Documentation improvements * Some GtkSourceGutter code refactoring * Syntax highlighting for Apache Pig 0.12 News in 3.15.1 -------------- * Search: allow caller to choose a style for text matches * gtk_source_completion_context_get_iter() now returns a gboolean to tell if the GtkTextIter is correctly set. For a more robust code, it is recommended to use the return value. * Improvements to the Lua and Yacc syntax highlighting * Translation updates News in 3.14.1 -------------- * Fix UndoManager with a new implementation * Various other improvements * Translation updates News in 3.14.0 -------------- * Translation updates News in 3.13.91 --------------- * Improved Mac OS X support * Gutter improvements * Various other improvements and code clean-up * Translation updates News in 3.13.90 --------------- * Adjustments to the file loading and saving API: - Make gtk_source_encoding_get_default_candidates() private - Replace gtk_source_encoding_foreach() by gtk_source_encoding_get_all() The file loading and saving API can be considered stable now. * Add Vala bindings * Various other improvements * Translation updates News in 3.13.3 -------------- * Extend the api to obtain candidate encodings * Rework drawing of spaces and margins (requires new Gtk+) * Various other improvements and bugfixes * Translation updates News in 3.13.2 -------------- * New feature: file loading and saving * Split testfiles.sh to tests/syntax-highlighting/ * GtkSourceView is now fully relicensed to LGPL * Various other improvements and bugfixes * Translation updates News in 3.13.1 -------------- * Improvements to the words completion provider * Completion window sizing fixes * Improvements to some lang files * Various other improvements and bugfixes * Updated translations News in 3.12.1 -------------- * Renovate test-widget * Various improvements and bugfixes * Updated translations News in 3.12.0 -------------- * Small improvements to the documentation * Updated translations News in 3.11.91 --------------- * Updated translations News in 3.11.90 --------------- * Add syntax highlighting for LLVM IR and Sweave * Improvements to some lang files * Updated translations News in 3.11.4 -------------- * Add the popular Solarized style schemes * Improvements to some lang files and a new lang file for lex * Optimize the draw-spaces code * Various fixes to the completion framework * Misc bugfixes * Updated translations News in 3.11.3 -------------- * Font scaling support for headings/titles in LaTeX and HTML * Add Change Case submenu to the right click context menu * Add ANS Forth 94 syntax highlighting * Misc bugfixes * Updated translations News in 3.11.2 -------------- * Add API to change text case * Add reStructuredText and yaml syntax highlighting * Improve LaTeX, m4 and D syntax highlighting * Documentation improvements (including best practices for language definition files) * Installed tests * Misc bugfixes * Updated translations News in 3.11.1 -------------- * Deprecate the Gutter:xpad and Gutter:ypad properties * Deprecate gtk_source_gutter_get_window() * Better implementation of GtkSourceMarks (private class GtkSourceMarksSequence) * Style schemes: more visible right margin * Documentation improvements * Misc bugfixes * Updated translations News in 3.10.0 -------------- * Small bugfix * Updated translations News in 3.9.92 -------------- * SearchSettings: change default value of wrap-around to FALSE * Misc bugfixes * Updated translations News in 3.9.91 -------------- * Improvements to the completion * API break for the search and replace * Deprecate the GtkSourceMarkAttributes:stock-id property * Misc bugfixes * Updated translations News in 3.9.90 -------------- * Modify the search and replace API: SearchContext and SearchSettings classes * Regular expression search * Misc bugfixes * Updated translations News in 3.9.4 ------------- * Warning: the search and replace API is unstable * Misc bugfixes * Updated translations News in 3.9.3 ------------- * Add a higher-level asynchronous search and replace API * Deprecate gtk_source_completion_item_new_from_stock() * Deprecate the GtkSourceGutterRendererPixbuf:stock-id property * Updated translations News in 3.9.2 ------------- * Add syntax highlighting for the Julia, mediawiki and Scala languages * Improvements to the word completion provider * Add the GtkSourceCompletionWords:activation property * More compact completion popup window * Misc bugfixes * Updated translations News in 3.9.1 ------------- * Deprecate the GtkSourceCompletionInfo::before-show signal * Hide CompletionInfo when focus-out-event on the attached-to widget * Improvements to the main completion window * Some code improvements to the words completion provider * Improvements to the C++ and Perl language specs * Documentation improvements * Misc bugfixes * Updated translations News in 3.8.1 ------------- * Improvements to the LaTeX and Perl language specs * Update to gtk-mac-integration 2.0 API * More unit tests * Misc bugfixes * Updated translations News in 3.8.0 ------------- * Add Libtool versioning. There was an ABI break during this development cycle, because some private functions were accidentally exported. So the Libtool's -version-info is bumped from 0:0:0 to 1:0:0. On GNU/Linux, this results in a version bump of the soname. * Updated translations News in 3.7.92 -------------- * New style id for warnings * Improvements to the completion code and documentation * Misc bugfixes * Updated translations News in 3.7.91 -------------- * Simplify code for the completion * Improvements of the Perl, R and Ruby language specs * Misc bugfixes * Updated translations News in 3.7.90 -------------- * Improvements in completion * Add Modelica language spec * Misc bugfixes * Updated translations News in 3.7.3 ------------- * Deprecate gtk_source_completion_move_window() * Deprecate gtk_source_completion_info_get_widget() * Deprecate gtk_source_completion_info_set_widget() * CompletionInfo: always a natural size * Simplify internal code for the completion (new CompletionModel) * Fixes for the style schemes and GtkSourceMark * Other misc bugfixes * Updated translations News in 3.7.2 ------------- * Improved unit tests and code coverage support * Misc bugfixes * Updated translations News in 3.7.1 ------------- * Add Bluespec SystemVerilog syntax highlighter * Improvements in completion * Add language spec for IDL * Lots of fixes in gtk doc * Misc bugfixes * Updated translations News in 3.6.0 ------------- * Updated translations News in 3.5.4 ------------- * Misc bugfixes * Updated translations News in 3.5.3 ------------- * New ActionScript, mxml and J languages * Misc bugfixes * Updated translations News in 3.5.2 ------------- * Misc bugfixes News in 3.5.1 ------------- * New Puppet language * Improvements in Go Language * Misc bugfixes * Updated translations News in 3.4.2 ------------- * Improvements to completion code * Misc bugfixes * Updated translations News in 3.4.1 ------------- * Fix problems with the completion popup when headers are hidden * Misc bugfixes * Updated translations News in 3.4.0 ------------- * Updated translations News in 3.3.5 ------------- * Misc bugfixes * Updated translations News in 3.3.4 ------------- * Misc bugfixes * Updated translations News in 3.3.3 ------------- * Python3 lang file * Win32 build fixes * Misc bugfixes * Updated translations News in 3.3.2 ------------- * Introduce gtk_source_language_get_style_fallback * Refactoring and clenaup * Misc bugfixes * Updated translations News in 3.3.1 ------------- * Change IgeMacIntegration to GtkOSXApplication * Allow for multiple GDK backends * Sort schemes alphabetically * Sort the languages alphabetically * Misc bugfixes * Updated translations News in 3.2.2 ------------- * Misc bugfixes News in 3.2.1 ------------- * New JavaScript Object Notation lang file * Improvements to some of the lang files * Misc bugfixes * Updated translations News in 3.2.0 ------------- * Updated translations News in 3.1.6 ------------- * New Automake lang file * New protobuf lang file * Misc bugfixes * Updated translations News in 3.1.5 ------------- * Misc bugfixes * Updated translations News in 3.1.4 ------------- * Improvements to some of the lang files * Misc bugfixes * Updated translations News in 3.1.3 ------------- * New Markdown lang file * New Standard ML lang file * Misc bugfixes * Updated translations News in 3.1.2 ------------- * Misc bugfixes * Updated translations News in 3.1.1 ------------- * Improvements to some of the lang files * Misc bugfixes * Updated translations News in 3.0.2 ------------- * Improvements to some of the lang files * Misc bugfixes * Updated translations News in 3.0.1 ------------- * Improvements to some of the lang files * Misc bugfixes * Updated translations News in 3.0.0 ------------- * Updated translations News in 2.91.9 ------------- * Use the GTK_SOURCE_ prefix also for all the macros * Updated translations News in 2.91.8 ------------- * Misc bugfixes News in 2.91.7 ------------- * Misc bugfixes News in 2.91.6 ------------- * Misc bugfixes * Updated translations News in 2.91.5 ------------- * Improvements to some of the lang files * Misc bugfixes * Updated translations News in 2.91.4 ------------- * Highlight C standard streams and signals * GtkSourceView is not a factory of categories now * Fix style problems * Improvements to some of the lang files * Misc bugfixes * Updated translations News in 2.91.3 ------------- * Improvements to some of the lang files * Misc bugfixes * Updated translations News in 2.91.2 ------------- * Improved Gutter support * New languages: Cobol, GO, Scilab * Misc bugfixes * Updated translations News in 2.91.1 ------------- * Removed SourceIter, caseless search is now in gtk * Adapt to latest gtk changes * Misc bugfixes * Updated translations News in 2.91.0 ------------- * Added SystemVerilog language * Improvements to some of the lang files * Misc bugfixes * Updated translations News in 2.90.4 ------------- * Improvements to some of the lang files * Misc bugfixes * Updated translations News in 2.90.3 ------------- * Bump version to 2.90: we are now targeting gtk3. This release is parallel installable with GtkSourveView 2 * Misc bugfixes * Updated translations News in 2.11.2 ------------- * Misc bugfixes * Updated translations News in 2.11.1 ------------- * Added introspection support * Misc bugfixes * Updated translations News in 2.10.1 ------------- * Improvements to some of the lang files * Misc bugfixes * Updated translations News in 2.10.0 ------------- * Misc bugfixes * Updated translations News in 2.9.9 ------------- * Distribute a catalog for glade3 * Misc bugfixes * Updated translations News in 2.9.8 ------------- * Bugfixes in the "words" completion provider * Misc bugfixes * Updated translations News in 2.9.7 ------------- * Remove a leftover in the UndoManager API News in 2.9.6 ------------- * Changes to the completion API to allow better language bindings * Add API to set a custom UndoManager on the buffer * Misc bugfixes * Updated translations News in 2.9.5 ------------- * Misc bugfixes * Updated translations News in 2.9.4 ------------- * Implement context classes and use them to mark strings, comments, keywords and regions where spell-check is disabled * More work on completion * Improvements to some of the lang files * Misc bugfixes * Updated translations News in 2.9.3 ------------- * Crasher bugfixes in word completion provider * Misc bugfixes for win32 * Smarter autoindentation * New language: SPARQL * Misc bugfixes * Updated translations News in 2.9.2 ------------- * Improvements to some of the lang files * Misc bugfixes * Updated translations News in 2.9.1 ------------- * Added draw spaces for leading, text and trailing spaces * Merged GtkSourceCompletion branch * Updated translations News in 2.8.1 ------------- * Misc bugfixes in gutter tooltip rendering * Updated translations News in 2.8.0 ------------- * Misc bugfixes * Updated translations News in 2.7.5 ------------- * Improvements to some of the lang files * Misc bugfixes * Updated translations News in 2.7.4 ------------- * Improvements to some of the lang files * Misc bugfixes * Updated translations News in 2.7.3 ------------- * Misc bugfixes News in 2.7.2 ------------- * Add GtkSourceGutter api to customize gutter drawing * Improvements to some of the lang files * Misc bugfixes * Updated translations News in 2.7.1 ------------- * Add tooltips to GtkSourceMarks * Improvements to some of the lang files * Misc bugfixes * Updated translations News in 2.6.2 ------------- * Improvements to some of the lang files * Misc bugfixes * Updated translations News in 2.6.1 ------------- * Improvements to some of the lang files * Updated translations News in 2.6.0 ------------- * Improvements to some of the lang files * Updated translations News in 2.5.6 ------------- * Misc bugfixes * Updated translations News in 2.5.5 ------------- * New "cobalt" style scheme * Misc bugfixes * Updated translations News in 2.5.4 ------------- * Improvements to some of the lang files * Updated translations News in 2.5.3 ------------- * Improvements to some of the lang files * Updated translations News in 2.5.2 ------------- * Misc bugfixes * Improvements to some of the lang files * Updated translations News in 2.5.1 ------------- * Misc bugfixes * Improvements to some of the lang files * Updated translations News in 2.4.1 ------------- * Fix a crash when inserting images in the buffer * Improvements to some of the lang files * Updated translations News in 2.4.0 ------------- * Updated translations News in 2.3.3 ------------- * Improvements to some of the lang files * Updated translations News in 2.3.2 ------------- * Misc bugfixes * Improvements to some of the lang files * Updated translations News in 2.3.1 ------------- * Misc bugfixes * Updated translations News in 2.3.0 ------------- * Add function to guess the language for a given filename and mime type (bump glib dependency to 2.14 that includes gio, remove gnome-vfs dep) * Allow to set background color of paragraphs with marks * Support drawing white spaces * Improvements to some of the lang files * Misc bugfixes * Updated translations News in 2.2.2 ------------- * Improvements to some of the lang files * Misc bugfixes * Updated translations News in 2.2.1 ------------- * Improve keybindings * Misc bugfixes * Updated translations News in 2.2.0 ------------- * Misc bugfixes * Updated translations News in 2.1.3 ------------- * Misc bugfixes * Updated translations News in 2.1.2 ------------- * Fix a GtkSourceMark API issue * Updated translations News in 2.1.1 ------------- * Misc bugfixes * Updated translations News in 2.1.0 ------------- * New gtk-print based printing API * New GtkTextMark-based GtkSourceMark API * Misc bugfixes * Updated translations News in 2.0.0 ------------- * Updated translations News in 1.90.4 -------------- * Many improvements to all the lang files * Many minor API tweaks * Misc bugfixes * Updated translations News in 1.90.3 -------------- * New default set of styles used to define a style scheme * Many improvements to all the lang files, ruby and perl lang files in particular. * Some API tweaks * Misc bugfixes News in 1.90.2 -------------- * Library is now LGPL (some lang files aren't yet) * Support replacing contexts * Support symbolic colors in schemes * Add tango style scheme * Some API tweaks * Many lang file updates * Misc bugfixes News in 1.90.1 -------------- * GtkSourceStyle is now a gobject * Be more careful about Language and LanguageManager lifecycles: add gtk_source_[language|style_scheme]_manager_get_default to obtain managers object owned by gtksourceview * Most of the files are now officially licensed under LGPL, still waiting for a few approval before completely switching the license. * Port to GRegex * Misc lang file updates * Misc bugfixes News in 1.90.0 -------------- This marks the road to GtkSourceView 2.0, and breaks the API. It is still considererd API-unstable. * API update/break * New highlighting and theming engines (Yevgen Muntyan, Marco Barisione) * GnomePrint-based print API removal News in 1.8.6 ------------- * Mark Undo/Redo insensitive when the view is not editable (Carlos Garnacho) * Fix current line highlightging drawing artifacts (Yevgen Muntyan) * Updated translations News in 1.8.5 ------------- * Updated translations News in 1.8.4 ------------- * RPM highlighting (Konstantin Ryabitsev) * Fix a problem with search in accented words (Yevgen Muntyan) * Misc lang file fixes * Updated translations News in 1.8.3 ------------- * Added docbook lang file (Joachim Noreiko) * Added OCaml lang file (Eric Cooper) * Cleanup some mime types in lang files (Paolo Maggi) * Updated translations News in 1.8.2 ------------- * Fixed bug #360495 – Errors in Java/Verilog syntax files (Jeff Walden) * Fixed bug #380996 – language.dtd needs more comments (Leonardo Ferreira Fontenelle and Paolo Maggi) * Added a RNG schema for the .lang file format (Paolo Maggi) * Fixes bug #375515 – allow fullstop in xml tag highlighting (Carey O'Shea) * Updated translations News in 1.8.1 ------------- * Fixed #357447 – Missing break in gtk_source_tag_set_property() (Kouhei Sutou) * Fixed #357746 – "Insert spaces instead of tabs" doesn't work (Paolo Borelli) * Updated translations News in 1.8.0 ------------- * Added text/x-gettext-translation-template to the list of mime-types in po.lang * Updated translations News in 1.7.2 ------------- * add an 'indent-on-tab' property to indent the selected text using the tab key * highlight fortran operators * Updated translations News in 1.7.1 ------------- * New Lang files (D, boo) * Updated translations News in 1.6.1 ------------- * Updated Lang files (php, ruby, perl, xml, .desktop) * Consume all button press events on the line numbers margin * Updated translations News in 1.6.0 ------------- * Updated translations News in 1.5.7 ------------- * Updated translations News in 1.5.6 ------------- * fix .lang files lookup from xdg directories. News in 1.5.5 ------------- * Requires gtk+ 2.8.x * Fixed bug #309663 – gcc 4.01 compiler treats pointer target warnings as errors (Marco Barisione) * Added scheme.lang (Paolo Borelli) * Allow to specify both 'u' and 'r' modifiers to python strings at the same time (Steve Frécinaux) * Add iterators to text region and use them (Paolo Borelli and Paolo Maggi) * Use cairo to draw the right margin (Jeroen Zwartepoorte) * Fixed bug #321252 - Clicking gedit line numbers should jump to line (Paolo Borelli and Paolo Maggi) * Fixed bug 312241 – .lang files in homedir take priority over $prefix (Guillaume Desmottes and Paolo Borelli) * Fixed bug #318577 – win32 port (Tor Lillqvist, Paolo Borelli and Paolo Maggi) * Updated translations News in 1.5.4 ------------- * Fixed bug #170604 – syntax for GNU Octave News in 1.5.3 ------------- * Fixed bug #321898 - fix for division by zero bug (not checking g_timer_elapsed() return value) * Fixed bug #323999 - perl inline pod not properly highlighted * Fixed bug #323750 - CSS highlighting missing "font" property * Fixed bug #316612 - Ruby coloration problems * Fixed bug #316587 - PHP syntax file should be in the "Scripting" section instead of "Sources") * Fixed bug #316330 - Ada Syntax highlighting is incorrect * Fixed bug #168090 - Recognise fortran line comments better * Added a --disable-gnomeprint configuration option * Fixed i18n problem introduced in 1.5.2 * Added changelog.lang * Updated translations News in 1.5.2 ------------- * Fix an off by one error in Lang directory lookup News in 1.5.1 ------------- * Lang files are now loaded from the locations specified in XDG_DATA_DIRS * Bug Fixes * New and updated translations. News in 1.4.2 ------------- * New and updated translations. News in 1.4.1 ------------- * Include the html documentation in the tarball. * Updated translations. News in 1.4.0 ------------- * Bug fixes (Paolo Maggi and Paolo Borelli) * New and updated translations. News in 1.3.93 -------------- * Bug fixes (Paolo Maggi and Paolo Borelli) * New and updated translations. News in 1.3.92 -------------- * New and updated translations. News in 1.3.91 -------------- * use G_NORMALIZE_NFD in caseless search, part of bug #303239 (Paolo Maggi) * allow GtkSourceView derivatives to override the key press (Paolo Borelli) * Makefile.lang (Ricardo Lenz, Paolo Borelli) * Updates to SQL, C#, javascript and XML language specifications. * New and updated translations. News in 1.2.1 ------------- * Plug small memory leaks (Yevgen Muntyan) * Fix unitialized variable (Marco Barisione) * Use the proper mime type for ruby files (Paolo Maggi) * Small improvements to sql.lang and fortran.lang * New and updated translations. News in 1.2.0 ------------- * Updated translations. News in 1.1.93 -------------- * Partially fixed bug bug #168247 (wrong selection of characters when searching for single characters) * Fixed bug #164066 (Highlight Current Line Bug with Pixmap Based Themes) * Fixed bug #168229 (disconnect tag table signal handlers in destructor) * Rewritten idl.lang * Added some missing items to php.lang * Updated translations. News in 1.1.92 -------------- * Bug fixes and update translations. News in 1.1.91 -------------- * Undoing/Redoing to a non-modified state unset the modified flag. * Added some missing documentation and improved existing one. * Bug fixes and update translations. News in 1.1.90 -------------- * Current line highlighting * New languages specs for TCL, Nemerle, VHDL, sh, .ini, gtkrc. * Support for Undo key in Sun keyboards * Bug fixes and updated translations. News in 1.1.1 ------------- * New languages specs for fortran, css, javascript and pascal. * Bug fixes and updated translations. News in 1.1.0 ------------- * Use Pango for printing. * New languages specs for Ruby, LUA, Perl's POD, VB.NET, Haskell and Texinfo. * Bug fixes and updated translations. News in 1.0.0 ------------- * Bug fixes and updated translations. News in 0.9.2 ------------- * Bug fixes and updated translations. News in 0.9.1 ------------- * Bug fixes. * XML and HTML .lang files now highlight strings using simple patterns. * Beginning of line and end of line are now correctly matched, even if the slice of text doesn't include the newlines. * "Others" style is now deprecated. News in 0.9.0 ------------- * Miscellaneous Bugfixes News in 0.8.0 ------------- * Highlighting spec files for PHP, Verilog, MSIL, C# and SQL. * Migrated test application to Gtk 2.3 (UI and file selector). News in 0.7.0 ------------- * A bunch of small bugfixes * Replaced deprecated calls for glib 2.3 * Multiline backward search works now * patterns are now limited to 250 elements (more cause trouble with GNU regex) News 0.4.0 -> 0.5.0 ------------------- * Removed hack for bug #81893 since it's now fixed in Gtk+ * Added "style_changed" signal to GtkSourceStyleScheme to signal the buffer that a style has changed News 0.3.0 -> 0.4.0 ------------------- * Added get_style_names method to the GtkSourceStyleScheme interface * New method gtk_source_language_get_id * Added the id arg to all constructors of gtksourcetag.[ch] * Added ID and tag_style properties to GtkSourceTag * Fixed the .pc.in file * Fixes to the printing code News 0.2.1 -> 0.3.0 ------------------- * Printing support * Caseless search functions gtk_source_iter_search_forward/backward * API reference documentation building infrastructure * Added support for translation of user visible strings in language spec files * gtk_source_buffer_find_bracket_match has been renamed to gtk_source_iter_find_matching_bracket News 0.2.0 -> 0.2.1 ------------------- * Dropped strict libgnome dependency (some Gnome libraries are still needed to build the tests, but those are now optional) * Regular expression syntax changed to Extended POSIX + GNU operators * Generate enums and flags for introspection and language bindings * Copy of GNU regular expression library included for platforms which aren't based on the GNU C library (bug #112517) * grab_focus no longer scrolls the widget to the cursor (workaround Gtk+ bug #81893) News 0.1.0 -> 0.2.0 ------------------- * src directory renamed to gtksourceview for proper header namespacing News 0.0.3 -> 0.1.0 ------------------- * API has been completely revised * New language and manager objects to set regular expressions for syntax highlighting from XML files * New improved highlighting engine * Rewritten test application which demonstrates most important features * Markers API have been redesigned * Text style schemes for highlighted elements * The view can draw a vertical line indicating a right margin * Smart HOME/END keys move to the first/last character in the line before moving to the real begin/end * Auto indentation News 0.0.2 -> 0.0.3 ---------------- * Undo support using begin/end_user_action in GtkTextBuffer. * Implemented gtk_source_buffer_convert_to_html the name says what it does :-) * more auto indent support/bugfixes: On an keypress it will automatic inserting whitespaces before/after on operator characters like [=<>!], comma [,] and begin parantes[(]. This is hardcoded values and will probadly only work correcly on C/C++/Java/python or similar programing languages syntax * bugfixes. News 0.0.1 -> 0.0.2 ---------------- * Auto indent support * bugfixes News 0.0.1 -------- * Syntax/Pattern highlighting * Bracket matching support * Show line numbers in margin libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/README.md000066400000000000000000000013521526404615400251360ustar00rootroot00000000000000libgedit-gtksourceview ====================== Short description ----------------- Gedit Technology - Source code editing widget Longer description ------------------ libgedit-gtksourceview is part of [Gedit Technology](https://gedit-text-editor.org/technology.html). libgedit-gtksourceview is a library that extends GtkTextView, the standard GTK widget for multiline text editing. This library adds support for syntax highlighting, undo/redo, file loading and saving, search and replace, a completion system, printing, displaying line numbers, and other features typical of a source code editor. Dependencies ------------ - GTK 3 - libxml2 - libgedit-amtk - libgedit-gfls How to contribute ----------------- See the `CONTRIBUTING` file. libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/build/000077500000000000000000000000001526404615400247555ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/build/.gitignore000066400000000000000000000000021526404615400267350ustar00rootroot00000000000000* libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/data/000077500000000000000000000000001526404615400245675ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/data/GtkSourceView-logo.png000066400000000000000000000524171526404615400310050ustar00rootroot00000000000000‰PNG  IHDRTdٟȬsRGB®ÎébKGDÿÿÿ ½§“ pHYs Ÿ Ÿ™ƒÖttIMEØ  äš IDATxÚì�wœ�U�ÿßç)·ßé-ÉdR'™4Ò IH ¡EDDQqŲêªX~îºvvu±¬«î®u•EE‘ÞL Hï™d&™^o¿O9¿?Î3-dúÀ"Î÷õz^ÀpïsÏsžs>ç[>ßïW0v¢>À˜ޥy—ÀõþéY ؀ä¯Sr�σ|V›�O—q—7œ£ü~˜”%À`"P A`…žI Ā:à$P´ Þß:ÿŠv"°&ZP–Sü'ðc 5Èí €�[†øli üå×—q—qyÕ5¬¾lø«‹&Í0_òNf.وéŒÉ„Ð0ýAL�pn¦1sé.z×gāmåî|øW¹­uÕ×O/áyr‹Êg7Üðy 'Nï÷ƒuÇ÷ðÀ|δ2©èø2—q—WPs�w !>•[4©ræÒ ,»ü&B9¯ÍÀ|*—l öàNZ몇å{Ô4�@8J0ڿÕïFÆßþ¸Œ˸¼&€nÕ4ýceÓæ•-¹ì¦/\×o{\Æe\Æe\Î ¨¸UÓõO•Ï^VxþշP6mºaŽꇤ”1ä—q—¿-@½Fñé’)s ×_ÿ)Š&ÍDhC6¹®C[]5'¸J¾#%ßwŒË P£Àe¹ÅåESæŸß LÌÑ]›ÙóÔÝl:q¯§Iµ�ñ¸¤Ð[¼«_ çR>{é°täpâô³©@±R±¶×ê}”?ó‡"—/Xÿ6V\ù~áœ~?k­gËï¿OíÁ à·À?{‡ѐ§8_¾çÏіÌXïgͭaÊæ™d“’ƃÏÝçàës2R’DùÂm…wò…E`Ú¿¾èú SWûˆ”(æFÁ4�ëýlüB”ƒ¥ͻÞßV$%yã`:.oD@Í.*ž\IAٔA¿�ìl¡zÏs$:šk€ïxæú¸Œ^fÿì †/=ï·±üò÷ ¦m §xî�ÿÎáí~ὋဩÖ �ŸåO1¦,_ˆE× äj´³ÙþË$ûþœ²ã�îiTõ¯ݨ²ƒ5(?rÚ[?aT€±2›�ó=š^pì©̌e7…|«>&w’Þ׷sÚÁ;,OŒ¿òqy#êÝ0çLœÞoù¹nµQJšOãäþ\ào£�F'˜ |Q7}o^´á:}Ùå7çöû…Æê<ÿs쥧À�GՒެ¾žW¡W\ü…(•—ø1ü‚ºÝÏü[œƒ§;�{€?AEëÓ(s�%vV^¿ýɛì¬ô_ôÙ(¡‚ŽqÝ« P«Ç_ý¸¼u±?œãÏ/™Œ¦\+ű²4Tï'ÑÞԀ ,´ŽOá¨e6ðÿ Óÿ¦ŗ¼3¸lSÿ`*¥¤þø¶þù§Ôܞqç›ÀŒà=TŸ4bɆÏFÅìËh:´V;æP¾D£î¥,®-Ө„{|û�ËP'›þÁhþ vì,‰Žæ. c(𑏸(ʿ6iAE±7£ìÕÀ¯¤t[¥ãvўŽcͯ=°}ÚüµoPc­ œÜÿ<ŽmíA‘ÎÓÄö¢|‰c!ó€ FóÖ,¾øzm|G¿`êØ'÷þ…Çõ 7ÞÖxø&*�b$`ªKtS¬Xxm€H©òmº6Ôí¶h>j§�_¡2ÛF+6p(Ýá’lUjÝ^$iu\Æå ¨ùºabúCƒ~8›Œ#]×BEy‡b æB9çOª\Œ€¨õ@ok¤îØËd’ñ Àsžö”ö´´»z}´ø†Òþ†,¿þ•×.ÿ| ðn3ڸlӍœwáµýRÕìlšÃÛc۽?%Þָå׼¿—–>\É–ä–ëáIK|˜A¥�¦Ú]Ù8YyÉ íÑZ­4X µTêöXHõîƛŽËPCšn �H':ºLߡ¦_ @‹”±ä²(œ0mDƒ¬9¸�öÆ2ɸþW>ß9ÀM†/�·òÊ÷› 7\×o+�dÿ_îgÇÿ¢³ùÌ!à¨L²р]°¢tŽчΔ‰¹t*:ÓÆ&A£ûýgb.{ÿœ¢~¿ÅÉmY�ÄPýÂÆe\ހ€*„¡iú�j•ZÙ ž&7, IÓuüÁH¿—ÁÄ£‰7Dy?¿á󗭺ê ¦™${¶ÜÃö~F²³u�”òÃÀVFŒs gDK{æÓNKRí.ž'=FÏê�٤”GžȈc›3Ø ªÖ@b ç´X ¬ôþ½UÀ%‹êš[çiÄOx@>^ k�íŠêd|™皚„*„ÓU‡£8 ¼„â&7�`]�¥ÀTѝbTzŸçnêôÞÛnTۣÃcä†:—訢?yÏ[â�'äýfŠéò2ÊÝX7�un eʱ­�tÝAk’úCPå÷Ækë GMἊ&Í་®eÞڷ`úƒçül*ÖÆÎGþ‡��ü:ãØÖfàP>ÇÑò}PjE^¤DC÷õ B~�·qÌ1zl¸ÉsNV†œž¿å}ƒÞ&¼¸N3Xà ‰€/¬¡™ ¡«Ùrmp,‰•’dbÒq,yÕåö×À©!jûšØßG±2†r�< |–�©aïGùÃõ!ÎåçP ýI1ðOÀ[é)4Ø8 |Éû÷ oN?¨ûDU Wèªnƒ@Ó@Jpp-‰•‘X ‰•–Žtù€wŸ�֧Ùe7 Á:# ò}�éh&hºª Ạ‰cyéË)‰�‘qé² ¸Õ[î”v#U0¢¨Dšë�7릘á ÝVcÑuH\[âd!“p±2í:¼„jú w¸ȳMþ„ëØ!ÛÊô»ɻ$ |}>oã�ËP‘LӨ˜³Œ·~ê‡#yýŸIt4³ýÁ_òÒãw&]×yøªBÓXi}!A §ïÁÈÕȟ¢sêxÉÆ&a#ë-þ±•±IÞÈÓfÍ4(œ®3a�IÙ<3¤3$ÐM¨É6—¦Ã6µ;²zãA{nÃûŸҝîH¾<ÎàÁU¸&�«-,�kÌí_é�RRý\–L\V0pÖ|óB_dՇ"~¨þK†ïL’lsÑ}‚܉:“Wø˜¼Ôìæ,K:jҮݠ ààs¡|mႷÍyo P:Ç$Ýá²õ' N<›¡í¤CªÝm—.uÞ|€Ã/J#%šoÒb«?¬Æ>á™aÏUд³ÎÉJ‡¨Œ?(ó…Eiá C›{e€Åï 1q¡Iá ƒ Lñð?vΉÕ9_@é7®Í$ãÄÛ)®˜=0 š~J¦TÑTsx²çO PcBˆ£‰Ž–Ôþ­÷Å9K�§qå-ßT;~£K´ ”e›nâ‰_}=b[ُ¢2ÑvŒáO¸À©LÜÍv68>זhFÏ!–;Iç¢ÏEÑL‘³珩·;Y¹Ì;yæ¹þ/²âr�¯ �릯óG×*ÂÄE&Ž»~“dëOÄꝤcñ€çÝïi 0\‡‰­'ì[;N;ïè8ãj)ʄ&“–øØø…(vZN8õBöSÞ÷íç] 6ÞäF?–îq;›Â4ƒ¢ Öﳐ.I/ˆ2Ð|µ­Õvnku·×Ð ¡­ü»p7 ¦:\bu®Mg–¹ž›¦¶v§õ”%€€„g^ägÂa¨ôóŒC6)fO_çKÞb×oÔì°ÈtJì´ı%BC>!¹KÞdÍÇ"~Aºå㌃cuwg8[n¾’3A¯¸ð³æ\ ըÛcqß?tÐ|Զ¬”Ü彳çPÕêlO«5íŒ,o¯q®ï<“º¹ã´c^ò¥(«”k$\¨QRe’M¸®÷ۃ«Š�ïh›æ\ ­ýXX}?îò—ÅÙù?IRmn³ëðK¿»Á‹|ل\X·ÇúÇÖjgA&!Ys«z?³7ù±3Qýá/w.Nµ¹ôökµ<›ŒµÊֺêAÝf¦?ȤÊEhº1ËóE ƵJH)¿#]·ʱ²sìlº÷u‘�MoIt4#åßB}9àsê†ɼµoæ’÷}Y Dò֢ v_Èè3ÌzõÒá¥ú=6§ݳ¬ț¬ó–Ëå†; Œ©kü•ábíïuSlG•Pü¤§Y3@ýØ1”|à?|aqóʛÃÑk~˜Çäå>œ,<ûƒ�üc,Ó^ã<æX\ ¼Ó Xó|¶5žÛâ9àf'+?vü™LËöŸ'I4»šlø|”âÙÆ$%­¿Üëª3„¿×õ&Ý$›?¥¯]\»ÓÕf÷ ϶¨ìu¿|àƒyÊMэºÕ‰fà…AhÒs]LóLÛ"ïy¾j†¹“t4£ÇÚvÒF˜´Ä¥sM~ÿ¡v{ï=階ZçéN÷½vVΐ.×&?›”—vÖ9�<õ�¸uôIåá‹5¸´Ÿr@µ;Jœ壼E¾9a¾9ù¦» Y|}3(8üxš»nn£n�uÒJɏ£¢êÿŽb T{Zý)ï> |Øuxwí®lûs?ŠÓQÛCÎ8³;‹cÑê}ÖÄÌÿe0_»fý'£¡«þ5—²y&™N—nëä™;â‰D³{§ëpðÏzÂ[?§P¬�»‘\œét½ýç ûÀƒi\[Õ®º<ÀÊ÷‡ Íà*àÀЀýV:ÙÖÖp’lj`6‹¦”L�KáÄéa`Ó£žopϺŽz‹ïoLc­ ݵ™Ž¦Óë¬嗰öš[‰”.Ce†­CPm=¹-›=±¥›Æô ™ºÚǻ~•ÏU·ç²ðíAÿ¤ÅæêP�ö]O{@ÿ!/Ð0�¡E”G¦_6⺅׆XóÑ¡BU¸ú¥»R<÷ƒxÆuä}È?ÇÀT¨p7p÷�ÒvãA›®韰Àdöe̠Øèmð¡ú�ë>¡•T} Í+ü’ðÖ÷p¤(-�cö±:jœ.Ó|×µûéy:�ܞ{ÚµΫÐñ…5¶þ$žu²òaàfT·†_¢RË3žéûðu z÷T6r¢١³ÎEGë2·À[…à&,0ËÞô/¹¢`šŽt¡æ…,›¿££Ö9| ø1CKm¾ÉOëv۲fG¶û½Õïî.°S=ˆfúMD\ºô†+>ÂX)ɶÿJ°÷žTÁ/Qì‰Áªæ5?ÊÄäþÏdˆ7)eÄL»ÀGñ,3ˆb j@«”rksíQÚ/§™[<‰© ֠éÆÀzƎfó†×u9}øEýïdëŸBgsÿAtÝðQµêr–_þ^‘S8a­ªËÇh(�À½é÷Åç–�ǟéY¤¯°FBʜ½üë9\õ¯¹\ü¥(Ëo —/5¯ ähßñ\wxNù+QÑܱp„À;€«®è|"Ü]¨úäÖ [—®#w_eè ˆà‰t§ÛP½5ƒcÉî 1ëb?Ó ¸q8€jøÑJf÷,ýt§¤í¤-�zÏüŽLJKæôίi¯uºøÁ/2|ÖE0#ŠA 3!R¢³àš ŕ&µ;³¸wy ÷ý™ÍÇÚkšÛÄ\×sm$ééúñ±’9挋n‹R¶@ÍM{�Ãö_&i؟ì¾ÛxÀ>úø×:yéÎ$Ž5º¥sM¿3ĆÏG¹ò۹¼ù»¹ÆڏE¦L^æ»Êð‹ۀïy��Ïy¦ìh²0–ï+˜ªç_øéÑ ʬN¶ºlÿy’Î3N •‚»g˜÷ݯy>‹Ó+-¥tžI~…ެdhtÀP.ֵhY�ÉßrÌÆJJé�k¸ÙlJC­êÑP­”¤㴃•”ži;@�ž?¥¯†ê�|!¡ƛ’Ïxs97ØœŽZ›?¢�í?Ob%»™ 6Š…ñ�P�¶lé A¦žïCӕ6|ts†c›3׿gÀ½ÃôÅK IºTwÔ:¤;]œ¬¤ñ�-QIý�ájà†²ùfÎڏ†»ë񶝴Ùù«$©v·É;�Oc,À¡d›ï¨u�ÞSø£‚¢JDËæjީô|&?\½w‰ÎÁhy‚ҩsY°þ¹…óPŽË_OðÅPBàɴ1Ҭ†" +“ª;ôü#™-ø>Rö¿¶ü¡(ó׽•e›Þ#|ÁÈJÏÔ‹Ã+í-ìÏ6±�>ñ�÷®ƒ†ýö [6�£Q6Ϥêò|"µ?Íã=¿+0–Þš-Õ.¾ü ¸�‘q•‹€uŸX´þSQ-j�ºvts†Ú]Y\‡»PÕáLÐÔ^ë �ž¯úB‚’*#(rP4ŸÁd�W:×èöK4²°3Òõ´Éájäåf@Lïñu&[T@JJŽ2ü,!k“óÊuü‘žó-Vï²ï¾m'íf$_chuicÀ³ ùdõÖìsÍGígP‰]ϺQèÜ8ó"¿1çÊ`7 Öà²ûî$™¸Üá¹]FÒ184¤;\씤õ„C&&³ž[â\Ñý‰ÀM¾�˜wá?DD´Tï†æf8ó²�tù!ªØÑpc�@{{/@(˜¢Ê«4ïƒ{@ÞstדÖéûpÑRuÃdÁº«Y|É;E(§`Šæs‰ç·ù¿Ìµ€”meq݁BÃôu¥Â ÒÌ^ Iÿl[™ßìÝrOzóÿ|›L¢ÿ½búƒ,½ìֿ㓊®~ŽÊ61ÆTïA²&ÑâÞõҝɆŸ¿¥پûÃíۜQšQª¼š2—s&(J͛nÏåÖ-%âêïçE+Vøæù"âë¶ Xëùֆ"p¾Ðx˒B¾ÊKüÝ\ʎÓûïK«wÏ·3²zí@,Þärö9V2ÇÀ§ ÅÌÂ}΢“—õu×íµ±3¸ ¿Ib0³p†¡ó{_ƒC› ü¼ÌðSuýÀy‘ÝÈ-׻çQºP³=ËÁ‡ҎëðSo¬CÑ]à€�¨¬±õ¨¤“&﷾\:Ç ¯ø@�{ÆuàÐÃijwX�¨èùˌ,YÄRõ{mÿFŒ‡¾ÜÑå§>/WÖ �·¬¸9lL]ãïV•ÛyšÎòËßËùWß"òJ&ÏBüÒS£/õ̾�@Êô´‘Ы¨ +“ÄȎEÕÈ)œ°•�óZù‚[�/H×ýÓþ­¸/<ø ’ƒXó¨f IDAT׽••oºY„s Wx‚eŒM ªÑó5}0—¿Ûûçԡ;ojËüáCí<ÿÓGŸÌÐ|ÄV›A–Ÿ?*Xøö oÿÏ|.øx„ÂiÆBT͵C|ÏyÀ%ÑR}âì‹ý}2’ê÷ZÔï³@5"¬á³JÀuÏÅfPë�¡Œs6žx^Ïr±3’Ö6®%;~jm!0µ`šŽ?Òc(%š”†êùî’#ÔùÑR�n Hw¸&C&&O ²ÄÆ"?~£áó§¬ò1qAß9Ù{O ÏÏý$#¯¡Ð<ÛYçìØ_ú¥Ïd_B¥Ÿþ¥ çòü =¿rƒ¿{>]jwd©ßgۨ ÛHŸ[œ˚Õ ѵ~|½7åà�uÇ÷Nññ;s×^ûqtÃTÏ[ ‘¼qdçjö¿ðÑx{ã[¤”û=ŸU-*’ŸðtÐ3 ='öœP4,Iý 3“ŒI;›ð¦á¼b¦Ì[ECõ�µV&ùU‰½�si@åîŽUCÂàóÙT"¼wË=o2}má†ëFóúñNλèíH¤þ⣿½(ÞÞôOÀ=“˃9»EåYæXrUíÎìù§_Ì. h%%s J瘔ÎUÄꢙ:ºÙÿÔFJ4V$BQ¥!6ß›ÚxÀþ¼7¯ °©0]®šºÚGÉ£{Ùf’3»-buN»gꏴðµðùÃâ[„*Q> €þ¨äOëªÎÓ*/%û~ö`0¥`šÑmš»6tֻ$ÛÝ4=÷aj¤TïS'Ñârìé (zÐX”P z¾SmÁ5AUCÁ“æ#6u{­¬§IÅotz–ÙSôÐõêÎáÿ@•иdÚZ?E•=Жjs9½Ë"Ýážžaä€B@À}0KèÝه¦q–¯âH¹l߳÷¾©`Â4}þº«ƒTyšÎôEë˜0}> 'ˆº£»+êN쭨?±ï²L¢³«niÆT0L ¯´Â(™RŜó¯À0njyc V:™ˆµ5F\×AÓô~4ÔsV_‰дà‘�_ÜZwòb+“´èŊî¥ٜñÀàwc¨©ž¾œŠµé/mþ݆? λðmýV òB,Xw ҕú®Ç~³1ÙÑâCїŽŒÑxÚP‘ާ� é2+Ñì.:±%»®ú¹ìŠP�–ŸW¡S2ÛdÚS×øˆ”êçtWk:̺$€t�~¥³ªý”ó^OSéÏ_§„ ´)SVûˆ”è}LßÚí®ÃNÕÎÅæø¢â•cî1ßsWMʊ* Í ôܤí¤ÓÕæe¸™e(Ñ Qž_¡ã ïqi«¶‘§½Ãw¸Ï•ÑR­›×*¥¹ŽÓNÜ3¿Ç`ÍÌ–L^îeóû*_Jã*®èӌ>E½}¾iØ-Õ˦žï#ث1dç‡Ú]Ù.W×&FΚY äEËtú�ÅWA­¾”NÆæ¾ðÀÏ+M�ªU›�Ù!å2uÁjÊg/%›J�IÅE2ÖJÇ;BéxRJ|Á0ÁH�H�p.>_(‚ÐƬ̩ꤔ Í5‡#3_ˆ6@VNa‹/~'sV]�•McgSf6“2{›· 'öòô]ÿV LcÓ_zŽñ¯$;ZB/<ð³‹|Áó/xK¿‡@ œâ ×á:–±ó‘ÿY—IÆ~ ¼kfp~¢£¨Èòfàçҥ,Ñì^�hvßV·ÛZ}葴� Qµ)ÀÒC}ÌÊޠ:}�Ÿo jÏþ ~™tù­§U¸ým†Ür]”Í5û,ÖD³Ký~«˂ÍsæÑH‰ޥ�öÑÜ[‚¢< $S€¢ óÍ>÷h;å�î4=´_�7T$ü‘Òn·™¸¤帍7_-#xÖ*_X„ò&ëÝUŤ 'ŸÏ"]ê=ít,2ßÎr+7úÑÏ2f�oÉt¹·þÂk#>`C^…Né\³ϡ™‰©ì0`&ðéQ<»?\¨r'õÔLÌíât·œË·)ßÚÑT{÷Ówý[e*֮Í]ó&¯tß`Àªaúƒ˜þ á¼" &Låÿ@öû¿ðèô…®§´Šîñö'Ž•~5ÇêہO§ã·?ùëo\¨kºQuþåèƹµv_0Ìʫ>€éêÏß÷ßë҉Žß·Œá&é ø)ïªó4„¸6ÉV÷íÉV÷ê†}ñª­?Næ_ô¹ˆvÞ5AEOéµDüÁ´µ~öߟŽ´³עj’vœS£\X0ՠh–Ñkî¡é�M²ÅíðÞklÏSWö�Î+ ÆÅQb°Â×3€Òò%= /h9n“îp³ ?U8,Ì+×éMÁÊtJšÛ]ãI‘šóƒyE3{Tº’Ïdº”¦}c`çë¦șyQߵÚZmÓ~Êq=S¿æ5Ú÷%BgUÑtƒÂé}_pùR“›î.$Öàøe"Játƒ¼Š¾÷�7¹dãàx&Îà–D{Ó_¶ÝûÓì üŒ–3'›ŠnÃ×uȦ“8ƒ™Î2¥·t4Ÿé8ôü#H÷¯¢1ë‹À?¹Ž³í™ßÝáÞþv6=àÁµø’w±ô²´@8w%*򽐡ÕÖ-ȞDµŒ¹ød6á>þÄ7b™Ǿ£½ö•.Òh©F^¹*ðן�r…‘’*_¨WVOZùO½ß<9Ú LÕ_QI©³ÎÁVÜԁ(DPaøE~Ñ,£P“m.±z×áØ|ì!`Nν'åTB¢եóŒc{ÏÜ>‚g]¦*%õl|+!i9 a,,ši@EÙ|C ô�Ð3/YØ頊¢¿V².ՌÒù&Z/mYºŠÜMH|amÔW¬Á¥f{–“Ûz®Ó/Z¤c º¿H±‹j·ñéT¼ý“;ýÍ�'æœwáۨ˜»²ßHc½w›k�R{x'^~–dgkW1g›þ>`ӮÇ~saÁ„©úÔk °½ä9à‹©DǶÞó“ó•K7`˜çN›×4�%—¾é:æ‹OüïÆT¬Ý¾ì¹^‹S¤UÜâY;-?sà�Ô͹“4ßêGº}�¾ˆÀŸ#ºLîþ±?¢Q<»ïrt²’¦ƒv—VU;бjÀd¡QR8Óè“ޙ‰I:j\K¶2p’| "w²nóúқb .޼×W•9uÂ=t£æ#ŽE=Äùሉ`A0_#orÏt7²±32í¹rƢìæ pÒß+|ҍm ‡׶ZÙŽxÅJwº<ùí5ۭWMLÇ\2�n'pd ê�í™0_pmkçÉ}Û>ÖZ_]Q>{)•K72¹j)þPÎc¨$k£¡z5vP{xí §Üt¢ó*}/¯ �K·':Zf>ó»;¦4Õ¦jå&rKÊ ²ýˤülGÓé¾pßÍ4LÓ­Gï§ߗé²hãõHð¿øø�›Òñ•ßþZöl:|'“•'¶d/®ÚdÓ;@¡iM]^>£if@ñZûº[$m§l¼ƒ´ycŒ3#%z(¯¼¯ÿ«å˜M§"Ðoc`A10¹h†ŽÙK‹Ž7ºÄ Ž$Â?Ë99“tt¿Gñ±¥J²PšäH‘©º! z¹`Tuš�HÁTýoµµÚƱ¤ÃkیQ­¡²¾û;Õî²ï޴k§åVUìU!¨‚—ã2ºކùðH¬¥þ¶CÏ?òö“{·šy¥L�>3_HñäY£L¼­‘S·srïVšN$o'“Œa[Ù=¨”ÆÇ<í!>D¿ƒ6#å»ÛNýxûC¿œ`ÛCLœ±€‰3R2uá¼bÁ(†Ï¯ŸZ¬xRJ÷3­uÕß{î�?ª„r(¯ZÚïAˆä²øâëqlËÿÒw]–MÅŒªEÙŵÓ顛¸ÞAi�ñ¸Ï�µVÛwžqúª•–]¥âZøÝi†Â%}Ÿ1Ý!I4»¶¦£ñŸ–³‹g"�×÷7ÙÄê<ÿ®ÄePQ4ÓÀê¹G¼Þ%ÖàtêpîX*PEŒ»T®q„þÇEº­¸ªïÖö5Éè(L}܉@$w²ÞO³ I¼ÁE:´1¼jú£•©F@)îû~;ϸØi™A¥p¿:W*ÒÿPÉáITŽò�®c#ÙÙú¾dgë%g޼Tö—{~œÉ+ö—T̢`â r‹&-(#ÍÅôÑ4ǶȦdSqÒÉɎfZëNÒZWMkÝ ҉Î,Ȥ]\±‡<3x¤Šº<'¥\k¥“׵ÕU_ßVW=s߳÷…<ߕÞëC¸W¼Ÿ¿'=ÿ°{èù‡‡¢ú¦œGi÷IéÊÖ3ǿõûÛ?X9 ߨ‰ÊfùðwÀD!¸ÁuB`zí% ÊÕ=6†ë) ÔeòV©v—¤*Awj nŠDÏT/g:Á �ц\S…`ѤEfw^7€•”ÔíΒhv(ò¹à…NEñl³[󳒒¶+%›P �á¸Z4à²è�Ò9½ñ)IÃ>[z ÄHu•áú„^${×V~MÏ;V…ˋDóÊûj¨ñ&‡¬j~˜׮†nPJ¹ÿYí}š�Xx¸r‚±mٯ£}8âz'ñgP9³+‘rm¼­qv¼­±èøËÏ案ûaO+2„š”8 -oãe½“¼Å}lóÎ~zǩ1|ÆTªٝ¨,—*T&W®7Î0ƒgIU£ˆýgK-ªqZ;ƒG%*øôÂÆìxм™á7E|Òûç\)Y2ñ<Ó,žeÐxȦn·•ƒ"“�¥h@H7ZoҿTÀö[z¦fª_‹Iãt&O³µ~¦PŸÍ,heÎ3ñ÷2ƒÚÔ’'8P¦„ 5¤¸½)!é¬ë>,†›}3E3¨*˜¢÷qu4¶°”Fu‚áÐu`�Zob{Û)‡t‡”ŒqÉL!xE€ÏN+?0c—3Tˮ˵ÔGªÔ^úµ�1Š8 üU #ÅӜ€rÞç{ à“RêަH{WÊ{©�Þ"®{-Nï7wޱ£<�ÊSþë0ެ7·Å=&eËn 1ÿê [¾§n·•`ì[ò�™¡­O@+-i>b“hq[PA›þ"îÚ*]Ñ Š>æ£w¸Œ&ˆRl*�k*‘è[Í YÙqoŽÛy¾òH±ާž•”ļ½0\—Ä;üQ͘¶Æ߇ÆuF™æ1F–°QLʝ¤‹p/M|…[’Œt±¬TßbãvFâªâ3£î‚Mð3(Οuq€Š=šàÉmYžù^Üv²ò~TYºÁÀPÂF@ôWFâ^Ò<3öý…3ŒœU ÷y m'mâM®ã|ëÖË|!ˆ–/éÔx“KÇi×áól‡+û€ÓǟN÷ =… ´®äŒi#TآÀ­ºO̺è³V¼_u=Í&$H¶xkéœk(Ùærú¥¾k¨h¦‚TÍ摮ùùBðùоȲ›BÌ}S)¡£ÖI÷£‚èã€ú:—"à6?ü >¸®˜ï(€ox;{�RL+œfà�jh:”Î3kÀÊQj=Z°à“fPœ_yq€òej#K<˜æä¶l  Ìoýl6.³u{¬>,�p±FþÃ癲‡©™®Fp[Ù|“E×»gªù¨Í߈I'#� ۝"X鈾 ;Ý'ºê` Aë×QÖþÁs*7ú_Áˆh8`ãÚÒ¡ë,¨h¾.+ ý¤Mjd…[“#¨.«ÒkӢ|#¹ùS 4ƒ OcŽ€·›f\è÷Wn �jqÙswІ}V ŠBÙ_mƒ§ҝҩÛmád{æµp†A¨@ËAeŽ$[|>\¬Í=ïÚ %U&�lžùn¼K㿳· mP_¿rpåzˆ~•ëù-àz¹ªêÍú4(3ü¢4¯BïNç̙¨Syq¡qð&†^üù\2Uhâã³.ñ³ì¦P·ïêij¶Üw¥ËTMÔÁ¢ô5Ž%Ÿ«ݕí£a˜!Áôu~¼Ͱ|ˆZªŽ*‚ü•@Ž(_÷‰HwnwÓa›'¿£~Ÿó¥§‡ø¬�rҲO»˜`® @•ñ[ìidÚÚòÀ×̐¸4�§é‡Jsü™ÌY€jáڌP'ťóÌ>‘wU kD…[“6à¹D‹Û}w�ûXh0c½3(ºút 5Eчjüø‰ҹFŚ�„Ñ 8ðPšý÷¥³®ÃQT¿þ|Ýí´|éÔóYôğÂE3.ô `•w ÇҙÜæ ‰k¼5Hզ�uO7FG­Ýü$cP_ÿ2Yƒ©W¡ڞV¢z_ԣª döû�Ùá"͌–öd…ò5λ6HÙoÄ Î&àk�\±zý§£ÆôõþnÍtËqŽ>‘±]›ï¢jl5ò›N'ZÜ.Ÿ©Ô�©kü„‹´é¨ú´—җâô¬�/ß hWN3VRÒ^뼢—WãǒÖٛtˆ2(*›wŽJXx.¨#/ޙ¤åXÏTθÐOÙ|Óގjà8ˆ©ƌ‚oæWè‹V$"&.29¶9ó?ˆËd›»øo®~ÔxÐÎz8M&î5bŒh̻*@´LŸ|ØӚ3ýuïÿ¶ÐøàÜ7µU cg$ùQœc›3Òuø/TÃAyöÇåõ'°ÖW]ï©>Ý&œ簩S~¶û8wÄ>xoÉlcþ¼7»Ëë á+™lÐtÈ.H4»+�+B~…�kÃáÇ2<ñÍu{­¬tøoÁ …Ü-�v×aFÛ)g^^¹�ª %êX)©�ÞeMq–z›ê\A¤y¨&�·󴪋>5_B÷ êv[<öÕG7g;#ÿ •ø0^¢,tmVN]ëïf hºêyo§ÑXӜ,{Zٻ€÷nJç“ç\Ðڪm:N; á¢ÏF»‹¢¤Ú\¶ÿ"Ig�«K¼û¼ǻ–�öڼk<ƒåý>s50}ùûBFéU¾ÎJIöý9Ý回…×M¶×õvÏ:Ҍ¦Nå/—W¦;\Q±҇˜AA~…ÁþûÓ9ŽÅo=å•Lem} ¸µ`š1uÃç£ZÕåNmËòà;i¯qNx‡ÿ`íÂ] ݵ™×vҙY8MU�Ò ˆ–ê8´3/ZS]›µžúØ9ša~¸Mh¬]~S(¸áóQ¤ [¾g÷ïSd“òP\;εPþÚE 2Ÿ" Íéܛë ᤠx×PM—´LÎ(žÉþsü¨Ñs úxÞ0[A²Í%ÑäÈÓÐMå÷«Üèg“—îJæîþCjE²Õ]a%¥Ç!T]¼çˆ ˆè†0�€Ò#¥:•ý,º.DþT;­rÏwþ:Áî»Sv&&£è%sη'šÝ҇¾Թ0ª.à� VßÁŸ«ùwþ*¹¶£ֹßÎÈZTHŠóTۏþNçRÏï5ßS †à"‘(¾åS޽όð¹Là9ð/ÿé©#]ò²g[¾¤øx׏2ß;õßÌ×J*Vøô™üÏ2ˆ–jDJ<¿ª€x£CÍv‹¦#6í5٘ı9[3ºOöòÍKª &-QZH¼ɡý”Cí.‹í¿HÈöSN“÷ÌßG¶Gx8^|ÕÕV.¿)dÌ}s€¢JÝœ~1ËÁ‡34ìSÁ+ǒè¦҈ŠfL_çcÒŸj›òR–}÷§9ôP&í:r«7®‡y’Àdà«þqýº¿�ú½#Ø'�µ÷ °½ ˆÐ^ëpèá Ïý0n%ÛܮþJWN¿À?ûÆßõ�‘¸¶$›ìÑCÛkl¸­ƒڝÖNÏuà Èå?œºÚwÑ[îÈë“HaúYùz®£4UyÖÑöÌ1vü"‰•–k=ío4R|Ëð‹ë¦]à�.~g�)«|ó5:j=’¦f{–D³Ûˆ3ü‚@®ªÙ:sƒŸ¼r�º=/ÿ>Åñ-™”•’Ï#ù"Ã/P­—_ æi‹W~ lT] pºŽá4ì·9òdšڝY21‰j¸š!æiäOՙ²ÂGq•AªÕåðcivþ6å¤ZÝã^Pìç P£ö¯P/¾Só«èS±_‰yGÒh‘ðmϱœ>‡òï�ÏM‚ü²!ª¿]hzÚhÿÁÈÒhðþýë`^ç!¬‹ªðð5õßõ°5ÝϢšä+€BgQ^¹,œ¡L¡‚©ª¨q¤D#\¬Ì�n\GâؠiŠOjg$©—X½j×^ãÐpÀ¢n�Mû);î:löÌûGQQóѐ¨»‚JïÕ ®�0ߌL[ç§l®Añ,“p‘†�UÁR‰ hšWöz½œ¥f»å¦:ܽ޸þÄȻnö~'+�¯r´uó®Ó/ðS\i�3QUvšJ—M¶¸´×8ÔîÌrrk–ê­YËNˇÊOÞåùâ–Á"_Xr5Èr4̐âXj†Ò¤'#qmUF/›”ÝfbºCZvFBUhz•Òx‚±-†1Ñ 0ݤ›, êᜉ�¨« €Ù)IºÃU�íZܔcÉ}ÞÜ<®”ù1« ¡£ï:ꡜ :¡�ÒÐ}�épÉÄ%‰f—öZǶ’r»¼yØ[—ßCÑކ"M¨Ž ò–Ø:ïû‹Fù,Šƒ{ #oZw®µ¶ x‚+¹ZYîD�P�Ž_XÃð«”b;-IwJ-.±zGfr/ª^Æ#(Š×X¤G—£Ø,ïÑM±0\¬…r&hø£Š+ÛU†ÑJ)wWª]†‰fÇÍÄå)$O£øßÏ2ĢǛš|{üݝ(ÏP¥øð´ê™ôQ^Y�gðkaý3¼Ê$­^´à·jQÜÂðÛbôöƒ¾øŒ€E.8Žòýøëæ.œXÀ_3 šÀm¾°Ë='êbzúl¸ž׹weâïí=VV�Пá•dáànÜÆjoô–™ÞÂsž@Uÿئ<èn£25?ãùkÇâYs½Ŗz æVó6™|¿Ñ ^/¢ñڕ¬ûk�ÑlÇz ‰ñwÖ#sQíÀ©2�?Y²äa�ùjÃYô” ¬÷ÌÀÿßޙGWYŸyüso’ÈF  $a‘PVAעUGœêxZkå8gƙ:�¶ãҞÖã8팧VÛQ{¦µcéXwë‚ A6� P¶°��€Ą²Üwþø>—{ Yî �JòûžsÏɹ¹ï{ßå¾ßßó|Ÿm§Ç{šb¢ MŠm›P˜j x¥}Ç~ð€7 ‚>­f›P:Óõ¸´4‡.… =mj ÊQŒ,‡Ç?„ÌiæÓúͯ]'Óý%3é�#]s­�ÕXeŸɳ݄<ÿiÀ×[©a…ôw�σ_¡ÀL‰i.�î'æààõBÂѐÓÓ7Â[ͼL@³@ÖI�܎j·c1ï+ìµ"B�)ôCüÍöÆ!\ªÕMé9Î~:ç…à²õµE&Ã֮æD6 ßFǏZqpp„zžPü¹n-†ÄBc¿ñÀ@Hß'Ž}ƒö熂£GABhŠÖ&3“=Eõ+Úqý‡¢±%ƒ۸žÉ kP±ÔÑó|}£Æ—£ C²oèåžWU‹˜…(0³1rM@} ®6ânM篑sÀz­›1-–qúi0Ñîkj+ßåٽ}ÉEuŽ::;¡6Åõ°¬®ºÊ ¸|ÏÁåžR^Ú;Ÿ(¸Òßi.Ԫ»T‰/ۨŽxà‡ñðãTðG² Áµªöy�VŒ;¡höhà›qðõtHICEãÃQ¨¹7ªx¨#2Þ CÎç0µ©Sôý—v¹Z[túøà' pw$´չ8ˆB畺ù�Eyoã€Ùqð?I�žLÛb·Íìy°öàiÎn,‹ƒ#Ô ¥ÀÅ0u;$æ˜Ù1xQÝðrÚ7A3˜0ÒÆÛû€�ôçR菅¨S}p÷0ðߍ²ÚJU†r¥>PªNæ9$TŸY‰÷$ÀœlȉŠþ/Em•Œ3Sz VÃU{ar¼ ü U©5w­ò=˜1 n'œEÑɕ¢ʌíp—§}GS£ŸܒésPåC[æéà7Øנ–mŽP:=¡žÖÔÀ®EpÉ”t9u›x_œðûvjPx¥Yd æêoÓs½„Ö;á4‡>˜‡ºZDS啃ÄÜ”v®î�ÏÜíïõ‚©3!îZ#�”&î@•™›G�H�‰DÕJDœ‰7ÈWNzîü\Núg4vÉ^�j£9ÁB¤µ쀀§CŒ†Pý@¯ly/D3}€™×åø$9êpè „Š=¿ŸAÞ߃?ÅLËB‘QA�*9v›ޖ Œï MBâa%ªC«U°k±׈õ`ë¸äYs¡›ëPœ…Ê=ÎcþÕ5À¿÷‡‘÷¡Þk™–Z)E· · » (y·'&g#a2 ¹—؊ôL«ïơ*”Èûp86úž42Îk²Znµ êlÛ6wCÜ­<´{Y;Æ~#cÚ&e„d…õ(åÃ&ÜUÐñ3¹¾´ðs}pøáˆ\ÑWÀ&Nx�3µ…‹�—ƒ·Ìö·¼4=o¿5‰qÀ\?T¥€×¼~ͼò!¸ľsx÷êö!=¸£1XÝ^ogÄõÛÞ#à /<¿�T*øksƒ7ø *¼ðþ ¼ÍûØ ÞóàeÈÀ_Žb†‘è<µ©à�ïÈídûíoצxI:–jà–ÎÓLòÁ¦n–«ÜÏö›Þ}v¾ûÁ{ÓÞK/Nöw�…êÐÕð`E.KìÁ(ï6ðâõ0çÇH|s¡ñ!ðöØþŒØö£šú³A/Tð}àGM^ïµóΡe€÷B‰íï%ð.Ï V£&é-ì'Á Ûå>¨ ދàí�Øß3¶€orz»×Ù M‚†‡"Žå1[#êjõÔst²-hí©úKA˝¶¿?Ń77â>ߩã<„ª•3¹ð 98´ �àÄóä¯ÃòÏb|è^½Ĭܱ]ÎéÏ9‡çðPy5øAw¨~ØŸýF‚¯�W(+°Ԏ§o Å}°g*x ÁÛgûÝÞ?€×M^ü=4/!ðñ™àí°íŠÀË¡¾LÛq±dó,.C±´Œ(Èð_û‚÷‹«|ˆîójÚ7�ȡ‹¡3�@yµ¾x“pä$3}|²3£ÜÏÀ8˜>Üt@P/€ F­¤õñÈŠD2 ¸m,$Ï4=ÄCzå“@1 *-éI¢ïî~xڃ§VAùo'Φ!¡6_±¬ûŒ욢4ëö!‘TI0P¿Ù|$-·„þ¨éÍ/M’y¥TµšÕ'â>å"ð5œÿ¼_G¨_*aí#P aš|øl„Ž7¦Cú8””D¹?ž*‚¢iŸ÷eG¸, ®‹`©jԐ`m1ý�Ø+Ÿª€yõðÊ;pbá\©aæ«')=ë«-lÿf§‚A$˜¹i.þ¸¶‰Gr¬û`èµ0.îE£Iz´dQûal6áÎeˁZ�óG]�Pë€ÊQ4>„›Ä Éá?[Eð·}Qâ'¨žÒ&¨}ʹ|v¾‘ L ñ£"|ï ͯ“^ù íK5Ã,Ú×k`ïûMX|¬LS?J hïWÂñÍ(ü꿆ôÛ -ls10;z? Üo:ÅeJ¢øgj¶!Lî)#ÑkPêF�QËU8tuBx«JV $x^©@ÓHTFÙnÀ i(•&hV[… ­gè%ˆ~¸bJ°Äγ(�}"C�ìv¾²¤�PVÄéÙðcQX±šû-–¡hK„Û?B÷¢Ґ³›‘/FøàÒ;Àª�ÍCOŸpùlb3ÛÍNŸYÀ|‚"Žž֕*GÑ ¾“ŸßI`^ <²ÖÜYp³¬¯ìz5-^Ú1€›“!ñZ{ãê|Bñ~'¹F©�:”p.PJ/�:Â-aÃð¬0¬ ¼¿€o¬½‘f„ɍrã›æ‘ŠöÀõ;À?ÊXw*0O·3ßÈ:ÒÚ.è ½ó›°fªF+WÃãÿâô¼áÀ¸>àn²Dqø`Þv4áàUhæ—Ãܵ�9ݞœQÀ0èþ©t¸Áh‚fSäc†C\�½ñ1jŎZv–ÒË’9=tL/Y‚õE‰œ*ÏÐ÷ùuGš‘m>©„C[ «ÊHx ðGÈöt�ֱ3�±¡>;QeÙõæaäêŽn�e9b£Ègîþ1ûATkÖÒǎ&¡ °»¯…9%¨*&ՠ~*²ŭš֖ÏúßD¸ÊZY8UœŠKu ô QEþ(î!¶ÁõÑþØú´üo_ ÷o?°nd•قx±t„”ʝ�´lûù`L�-OÙÊו÷Ž�gÒý¨<“ÈEt"�Òvsª1Ãrb3ãÐÅáïçxX°j7¡šÁŠhôWà2áJÃú{CZÈ×݅jZ¤ÙՉ®Of€3çf%‹´:ôÕ4+¾ŒSMSi9ýì3`ÍfðBãT{£µ«á(.$ьN‡>yf /C©+m»1œÊϺ>bÿIÀ˜n�*Û* {"EœŸ‘3ÎB½`Ь­‡ÕóaÚ äï ¦ƒï�0ËÓ8”а2Ÿ‘ì¥__º‘ðz`“\З‰¾füB@u§ ŠõÀ�iÿ¸ÖÖ´ýW X­ ­gh9ðS ¬?»?„ÜPúÚDY›AI£Ì[¿.|Ãä}P¦›ÜþݒyÈaŽŠˆ÷™á:h øC=6Ê,=`î¾ë}êൠv+ÖÁ¤�ÈBZÞ8àÈ9¦œÿuf�¤Òà¢fö|†´¸z=§é\Í1*ê«Eê+ÀqxÛ;˜T¼^ýu@|®�m¶[—Cî\³t‡ȭOûLÙï¡l… ¹(“ãO@�Õ'‚á12½ X ‰µšoÿ[#Ôì)¶’2262-sáàõLÔ+k`ï»0tʷ,�Ïè[©TšŒPs�ÉcÁŸcïÑÓª!ßÕɮMy-§ë¥ñfͭӹ>ÒÁçDײÎ5š™ðû�M;`ÆnHÌ4M&O‹Ý8S&¦@¯KP$m£v\üg9<»f¡&ŠP§#‰ux ô*4¦? ¤‘S’¹ƒƒ#Ôæð1°y þ.øûš%3ZÄqéIÕ{—#`ä$¬Ö!-—Õt|¬母­_¨ˆ/ˆDuøº„¤՝åc¬3Ùæðb0>‚P—B¡§X×u½QÇA4ثA–íғ°}䗛ԓ qŸH� q™&{lÔ .C]kE8Ä:× àƒ ¨\do$r*8•ˆÊӁ™ƒ i„ýÿ§7){�ìºì: »KÏ&ñ£Õe ù’çààB»ÝQ´¿—ԛ)>˜‘i^Ƕ°i¹Ĭà;‘`ϩjŽL”c›Wˆ:à·Óv±³ÞkG¨†P/Ô}ˆ0=&š{ëW¾ÿT?Ü0ŽpƒŒ"¹üUf¨îê„×å  h‡\]<ûQŒk�¹Ó֝Žú­¤¡¤ü<4L¡7ѵÄÛ |¼ê6ØùÀ@ýù`úL2¢µ€T#j`ý°´êwšÖp­ˆ5¸­äŒ5B- K;Åhꉃƒ#ÔV°X²VÙÝÑÈѤ�õ†…(’ܼ¦�u¦ʨ¦¨U„k泀¹b»qög¿³øŸyéW¡‚Í\ü¹ßÑ`Q#T‡<Œ*~èÝ |“QK¨]rß÷)6%õ°ãSÓkȺMÒƒ?ÛðCmW޲N:zpp„Ú6æÕ@í»„[']ôÕ3•—ƒjÌ1‹mCØbÙØI¯GðQ=|0ßÈ3¹ãJàkàO’kü}$­ÆÒ`9^†.<ü.þù*˜ü-H¿úõPÒ‰r+‚P¾ e%¤˜•šlþ{bѽúìjÂÉ €â F¸ÂÍn†®3¢>H¸Á•ƒCLˆï‚ç\\ë‹aêsíû¡¶~¥H;`|8!õ :6@‡â#)m|.‹æÇIÌen‹ÜjŒcÚ*“ݼQ~}rÍBï܆ä÷áޓj³÷ÊJ²Þ!͢›É×! 7/úÌÿ,»¾f-î{Í2oË*¬ð`ÅÈیæ§L4swºkió„zøt'ܼƒPùꟍ„3B0k–p/G¨m øß0u9a­ô^”€:Û.J…¹€õzÖÞí ïNæ «l@×?ÕÝ#܉x±hoO®rkù°¡|ÏÃF‚OÑrÕO=ðN#Ly¾1î· •,’øL(•Qø$9î6*•: ¢“􌃌\èv£Y»í„°+Ìô{‰>·÷�c𭏌P Р½žvr%À1¢› çÏÖ[jáàZșd۾hd�òŒOXz.ºïà5&¼U ;?„!W³õCÓ×BL´ ®üŽÓiœ�¼rƒ~š}#Ê [ÅH³NB ={@ÜgÒ$[E¥´ŠA{a|ƒd‹Ö%—ÕBúp}#Ä߅B轁[�kUY–¶Ò*`h-\VgLofsÀ¬Û¨Ëó¥M~d (ì¾ u­ޮÃ|’èu‡Ck¡ßçF¤¡†Х’hðt®M-è�À¶"ÈùŠŒ…¶ ڊé©n¡£G¨±¡ ø¿�ðàjð7õ«Ë9•os u”u:¦ôý9J0oϴ·�hfH´X„fì—ûÝVçùÀÍàÿo¸zî2+>É\ê{€oÛ<„ªÈ£t€þfš¦sº8ïÉjd°ɮíj¨?¦<ÑçѰ¾hQÌ/…onæT@f©u<Ùd‡‰R`ûV¸â "›Á´í}}¶³4ZÒT‡’9‹ízÚ8šÚF}ÇJ“"V[D=¼{îX c‘`Û k—CJTØʙ Àêz¸å èÿƒˆ¬x>ÒQ¡ƀÐ º·—Á?þü_µóJ^,“Ëø"—>S ¬ý<Þæ̶ñ�“fr–é|ǰéàGõ°jܾ._É_AQñ|Ô`¦‡½<³RËíuØ^‡‰*á@PSbç›A¸Û ×X“çƒÀúX³&Ï0yás´ú5ÊÊÜ؂„°Øú&ô»|ƒíJөFq*‡v ”þVêÓÁë ^*xqŠIýÓ90"S�¿AýT+�LÎåë¨yؘ'+�¼|3ðª*»�—^xÁËo�Æj{}í¦€ϧ8Ñ”ÇZ€äظ¸Ž`nԎï&ð†ƒ/ëô?lmléžßå‡ãÃÁ› Þh�³ö€_uaáI¥«#`žëp3+9m¤�CQêÔX3R{Û+ތÑR$•î3Ãt?ç®ý]/$çÞn‹E%ÒbŸ¦õ¦&>[,¿mÄ[� Åu—rppèâA/S"Rbܮ'Ê ëé ‡VðÿSMÎ ¿s2AIEND®B`‚libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/data/language-specs/000077500000000000000000000000001526404615400274655ustar00rootroot00000000000000check-all-languages.sh000077500000000000000000000001601526404615400335310ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/data/language-specs#!/bin/sh for lang_file in default-language-specs/*.lang do ./check-language.sh "${lang_file}" || exit 1 done check-language.sh000077500000000000000000000001531526404615400326020ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/data/language-specs#!/bin/sh lang_file="$1" xmllint --relaxng 'default-language-specs/language2.rng' --noout "${lang_file}" default-language-specs/000077500000000000000000000000001526404615400337265ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/data/language-specsR.lang000066400000000000000000002330441526404615400350000ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/data/language-specs/default-language-specs text/x-R *.R;*.Rout;*.r;*.Rhistory;*.Rt;*.Rout.save;*.Rout.fail # . Name: / .*$/ Name: / / / / Name: / / / / Name: / / / / Name: \b \b Name: / / language-specs.its000066400000000000000000000004351526404615400330270ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/data/language-specs language-specs.pot000066400000000000000000000404731526404615400330400ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/data/language-specsmsgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "POT-Creation-Date: 2025-01-25 16:04+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. (itstool) path: default-language-specs/abnf.lang/language@_section #. (itstool) path: default-language-specs/actionscript.lang/language@_section #. (itstool) path: default-language-specs/ada.lang/language@_section #. (itstool) path: default-language-specs/ansforth94.lang/language@_section #. (itstool) path: default-language-specs/asp.lang/language@_section #. (itstool) path: default-language-specs/automake.lang/language@_section #. (itstool) path: default-language-specs/bennugd.lang/language@_section #. (itstool) path: default-language-specs/bluespec.lang/language@_section #. (itstool) path: default-language-specs/boo.lang/language@_section #. (itstool) path: default-language-specs/cg.lang/language@_section #. (itstool) path: default-language-specs/chdr.lang/language@_section #. (itstool) path: default-language-specs/c.lang/language@_section #. (itstool) path: default-language-specs/cobol.lang/language@_section #. (itstool) path: default-language-specs/cpphdr.lang/language@_section #. (itstool) path: default-language-specs/cpp.lang/language@_section #. (itstool) path: default-language-specs/csharp.lang/language@_section #. (itstool) path: default-language-specs/cuda.lang/language@_section #. (itstool) path: default-language-specs/d.lang/language@_section #. (itstool) path: default-language-specs/eiffel.lang/language@_section #. (itstool) path: default-language-specs/erlang.lang/language@_section #. (itstool) path: default-language-specs/forth.lang/language@_section #. (itstool) path: default-language-specs/fortran.lang/language@_section #. (itstool) path: default-language-specs/fsharp.lang/language@_section #. (itstool) path: default-language-specs/genie.lang/language@_section #. (itstool) path: default-language-specs/glsl.lang/language@_section #. (itstool) path: default-language-specs/go.lang/language@_section #. (itstool) path: default-language-specs/groovy.lang/language@_section #. (itstool) path: default-language-specs/haskell.lang/language@_section #. (itstool) path: default-language-specs/haskell-literate.lang/language@_section #. (itstool) path: default-language-specs/haxe.lang/language@_section #. (itstool) path: default-language-specs/idl.lang/language@_section #. (itstool) path: default-language-specs/java.lang/language@_section #. (itstool) path: default-language-specs/j.lang/language@_section #. (itstool) path: default-language-specs/kotlin.lang/language@_section #. (itstool) path: default-language-specs/lex.lang/language@_section #. (itstool) path: default-language-specs/llvm.lang/language@_section #. (itstool) path: default-language-specs/makefile.lang/language@_section #. (itstool) path: default-language-specs/meson.lang/language@_section #. (itstool) path: default-language-specs/nemerle.lang/language@_section #. (itstool) path: default-language-specs/netrexx.lang/language@_section #. (itstool) path: default-language-specs/objc.lang/language@_section #. (itstool) path: default-language-specs/objj.lang/language@_section #. (itstool) path: default-language-specs/ocaml.lang/language@_section #. (itstool) path: default-language-specs/ooc.lang/language@_section #. (itstool) path: default-language-specs/opal.lang/language@_section #. (itstool) path: default-language-specs/opencl.lang/language@_section #. (itstool) path: default-language-specs/pascal.lang/language@_section #. (itstool) path: default-language-specs/pig.lang/language@_section #. (itstool) path: default-language-specs/prolog.lang/language@_section #. (itstool) path: default-language-specs/rust.lang/language@_section #. (itstool) path: default-language-specs/scala.lang/language@_section #. (itstool) path: default-language-specs/scheme.lang/language@_section #. (itstool) path: default-language-specs/sml.lang/language@_section #. (itstool) path: default-language-specs/sparql.lang/language@_section #. (itstool) path: default-language-specs/sql.lang/language@_section #. (itstool) path: default-language-specs/swift.lang/language@_section #. (itstool) path: default-language-specs/systemverilog.lang/language@_section #. (itstool) path: default-language-specs/thrift.lang/language@_section #. (itstool) path: default-language-specs/vala.lang/language@_section #. (itstool) path: default-language-specs/vbnet.lang/language@_section #. (itstool) path: default-language-specs/verilog.lang/language@_section #. (itstool) path: default-language-specs/vhdl.lang/language@_section #: default-language-specs/abnf.lang:30 #: default-language-specs/actionscript.lang:24 #: default-language-specs/ada.lang:25 #: default-language-specs/ansforth94.lang:24 #: default-language-specs/asp.lang:23 #: default-language-specs/automake.lang:23 #: default-language-specs/bennugd.lang:22 #: default-language-specs/bluespec.lang:21 #: default-language-specs/boo.lang:23 #: default-language-specs/cg.lang:23 #: default-language-specs/chdr.lang:24 #: default-language-specs/c.lang:24 #: default-language-specs/cobol.lang:26 #: default-language-specs/cpphdr.lang:24 #: default-language-specs/cpp.lang:24 #: default-language-specs/csharp.lang:26 #: default-language-specs/cuda.lang:22 #: default-language-specs/d.lang:29 #: default-language-specs/eiffel.lang:23 #: default-language-specs/erlang.lang:23 #: default-language-specs/forth.lang:23 #: default-language-specs/fortran.lang:24 #: default-language-specs/fsharp.lang:24 #: default-language-specs/genie.lang:23 #: default-language-specs/glsl.lang:30 #: default-language-specs/go.lang:24 #: default-language-specs/groovy.lang:24 #: default-language-specs/haskell.lang:24 #: default-language-specs/haskell-literate.lang:23 #: default-language-specs/haxe.lang:34 #: default-language-specs/idl.lang:23 #: default-language-specs/java.lang:24 #: default-language-specs/j.lang:23 #: default-language-specs/kotlin.lang:24 #: default-language-specs/lex.lang:24 #: default-language-specs/llvm.lang:22 #: default-language-specs/makefile.lang:22 #: default-language-specs/meson.lang:23 #: default-language-specs/nemerle.lang:23 #: default-language-specs/netrexx.lang:23 #: default-language-specs/objc.lang:23 #: default-language-specs/objj.lang:25 #: default-language-specs/ocaml.lang:26 #: default-language-specs/ooc.lang:23 #: default-language-specs/opal.lang:23 #: default-language-specs/opencl.lang:23 #: default-language-specs/pascal.lang:24 #: default-language-specs/pig.lang:26 #: default-language-specs/prolog.lang:23 #: default-language-specs/rust.lang:35 #: default-language-specs/scala.lang:24 #: default-language-specs/scheme.lang:23 #: default-language-specs/sml.lang:23 #: default-language-specs/sparql.lang:23 #: default-language-specs/sql.lang:23 #: default-language-specs/swift.lang:24 #: default-language-specs/systemverilog.lang:21 #: default-language-specs/thrift.lang:20 #: default-language-specs/vala.lang:27 #: default-language-specs/vbnet.lang:23 #: default-language-specs/verilog.lang:23 #: default-language-specs/vhdl.lang:23 msgid "Source" msgstr "" #. (itstool) path: default-language-specs/awk.lang/language@_section #. (itstool) path: default-language-specs/dosbatch.lang/language@_section #. (itstool) path: default-language-specs/javascript.lang/language@_section #. (itstool) path: default-language-specs/lua.lang/language@_section #. (itstool) path: default-language-specs/m4.lang/language@_section #. (itstool) path: default-language-specs/perl.lang/language@_section #. (itstool) path: default-language-specs/php.lang/language@_section #. (itstool) path: default-language-specs/python3.lang/language@_section #. (itstool) path: default-language-specs/python.lang/language@_section #. (itstool) path: default-language-specs/ruby.lang/language@_section #. (itstool) path: default-language-specs/sh.lang/language@_section #. (itstool) path: default-language-specs/tcl.lang/language@_section #: default-language-specs/awk.lang:23 #: default-language-specs/dosbatch.lang:23 #: default-language-specs/javascript.lang:26 #: default-language-specs/lua.lang:23 #: default-language-specs/m4.lang:23 #: default-language-specs/perl.lang:25 #: default-language-specs/php.lang:28 #: default-language-specs/python3.lang:23 #: default-language-specs/python.lang:27 #: default-language-specs/ruby.lang:26 #: default-language-specs/sh.lang:24 #: default-language-specs/tcl.lang:23 msgid "Script" msgstr "" #. (itstool) path: default-language-specs/bibtex.lang/language@_section #. (itstool) path: default-language-specs/docbook.lang/language@_section #. (itstool) path: default-language-specs/dtd.lang/language@_section #. (itstool) path: default-language-specs/dtl.lang/language@_section #. (itstool) path: default-language-specs/gtk-doc.lang/language@_section #. (itstool) path: default-language-specs/haddock.lang/language@_section #. (itstool) path: default-language-specs/html.lang/language@_section #. (itstool) path: default-language-specs/jade.lang/language@_section #. (itstool) path: default-language-specs/latex.lang/language@_section #. (itstool) path: default-language-specs/mallard.lang/language@_section #. (itstool) path: default-language-specs/markdown.lang/language@_section #. (itstool) path: default-language-specs/mediawiki.lang/language@_section #. (itstool) path: default-language-specs/mxml.lang/language@_section #. (itstool) path: default-language-specs/rst.lang/language@_section #. (itstool) path: default-language-specs/sweave.lang/language@_section #. (itstool) path: default-language-specs/t2t.lang/language@_section #. (itstool) path: default-language-specs/tera.lang/language@_section #. (itstool) path: default-language-specs/texinfo.lang/language@_section #. (itstool) path: default-language-specs/xml.lang/language@_section #. (itstool) path: default-language-specs/xslt.lang/language@_section #: default-language-specs/bibtex.lang:23 #: default-language-specs/docbook.lang:23 #: default-language-specs/dtd.lang:23 #: default-language-specs/dtl.lang:25 #: default-language-specs/gtk-doc.lang:24 #: default-language-specs/haddock.lang:23 #: default-language-specs/html.lang:24 #: default-language-specs/jade.lang:24 #: default-language-specs/latex.lang:24 #: default-language-specs/mallard.lang:22 #: default-language-specs/markdown.lang:25 #: default-language-specs/mediawiki.lang:22 #: default-language-specs/mxml.lang:23 #: default-language-specs/rst.lang:22 #: default-language-specs/sweave.lang:24 #: default-language-specs/t2t.lang:23 #: default-language-specs/tera.lang:23 #: default-language-specs/texinfo.lang:24 #: default-language-specs/xml.lang:25 #: default-language-specs/xslt.lang:23 msgid "Markup" msgstr "" #. (itstool) path: default-language-specs/cg.lang/language@_name #: default-language-specs/cg.lang:23 msgid "CG Shader Language" msgstr "" #. (itstool) path: default-language-specs/changelog.lang/language@_section #. (itstool) path: default-language-specs/cmake.lang/language@_section #. (itstool) path: default-language-specs/css.lang/language@_section #. (itstool) path: default-language-specs/csv.lang/language@_section #. (itstool) path: default-language-specs/desktop.lang/language@_section #. (itstool) path: default-language-specs/diff.lang/language@_section #. (itstool) path: default-language-specs/dot.lang/language@_section #. (itstool) path: default-language-specs/dpatch.lang/language@_section #. (itstool) path: default-language-specs/gdb-log.lang/language@_section #. (itstool) path: default-language-specs/gtkrc.lang/language@_section #. (itstool) path: default-language-specs/ini.lang/language@_section #. (itstool) path: default-language-specs/json.lang/language@_section #. (itstool) path: default-language-specs/less.lang/language@_section #. (itstool) path: default-language-specs/libtool.lang/language@_section #. (itstool) path: default-language-specs/logcat.lang/language@_section #. (itstool) path: default-language-specs/nix.lang/language@_section #. (itstool) path: default-language-specs/nsis.lang/language@_section #. (itstool) path: default-language-specs/ocl.lang/language@_section #. (itstool) path: default-language-specs/pkgconfig.lang/language@_section #. (itstool) path: default-language-specs/po.lang/language@_section #. (itstool) path: default-language-specs/protobuf.lang/language@_section #. (itstool) path: default-language-specs/puppet.lang/language@_section #. (itstool) path: default-language-specs/rpmspec.lang/language@_section #. (itstool) path: default-language-specs/scss.lang/language@_section #. (itstool) path: default-language-specs/toml.lang/language@_section #. (itstool) path: default-language-specs/yacc.lang/language@_section #. (itstool) path: default-language-specs/yaml.lang/language@_section #: default-language-specs/changelog.lang:24 #: default-language-specs/cmake.lang:23 #: default-language-specs/css.lang:26 #: default-language-specs/csv.lang:23 #: default-language-specs/desktop.lang:24 #: default-language-specs/diff.lang:23 #: default-language-specs/dot.lang:23 #: default-language-specs/dpatch.lang:23 #: default-language-specs/gdb-log.lang:18 #: default-language-specs/gtkrc.lang:24 #: default-language-specs/ini.lang:22 #: default-language-specs/json.lang:29 #: default-language-specs/less.lang:23 #: default-language-specs/libtool.lang:23 #: default-language-specs/logcat.lang:23 #: default-language-specs/nix.lang:23 #: default-language-specs/nsis.lang:23 #: default-language-specs/ocl.lang:32 #: default-language-specs/pkgconfig.lang:23 #: default-language-specs/po.lang:23 #: default-language-specs/protobuf.lang:21 #: default-language-specs/puppet.lang:23 #: default-language-specs/rpmspec.lang:24 #: default-language-specs/scss.lang:23 #: default-language-specs/toml.lang:23 #: default-language-specs/yacc.lang:23 #: default-language-specs/yaml.lang:21 msgid "Other" msgstr "" #. (itstool) path: default-language-specs/chdr.lang/language@_name #: default-language-specs/chdr.lang:24 msgid "C/ObjC Header" msgstr "" #. (itstool) path: default-language-specs/cpphdr.lang/language@_name #: default-language-specs/cpphdr.lang:24 msgid "C++ Header" msgstr "" #. (itstool) path: default-language-specs/dosbatch.lang/language@_name #: default-language-specs/dosbatch.lang:23 msgid "DOS Batch" msgstr "" #. (itstool) path: default-language-specs/dtl.lang/language@_name #: default-language-specs/dtl.lang:25 msgid "Django Template" msgstr "" #. (itstool) path: default-language-specs/fcl.lang/language@_section #. (itstool) path: default-language-specs/gap.lang/language@_section #. (itstool) path: default-language-specs/idl-exelis.lang/language@_section #. (itstool) path: default-language-specs/imagej.lang/language@_section #. (itstool) path: default-language-specs/julia.lang/language@_section #. (itstool) path: default-language-specs/matlab.lang/language@_section #. (itstool) path: default-language-specs/maxima.lang/language@_section #. (itstool) path: default-language-specs/modelica.lang/language@_section #. (itstool) path: default-language-specs/octave.lang/language@_section #. (itstool) path: default-language-specs/R.lang/language@_section #. (itstool) path: default-language-specs/scilab.lang/language@_section #: default-language-specs/fcl.lang:23 #: default-language-specs/gap.lang:23 #: default-language-specs/idl-exelis.lang:20 #: default-language-specs/imagej.lang:23 #: default-language-specs/julia.lang:23 #: default-language-specs/matlab.lang:25 #: default-language-specs/maxima.lang:24 #: default-language-specs/modelica.lang:25 #: default-language-specs/octave.lang:25 #: default-language-specs/R.lang:25 #: default-language-specs/scilab.lang:23 msgid "Scientific" msgstr "" #. (itstool) path: default-language-specs/gdb-log.lang/language@_name #: default-language-specs/gdb-log.lang:18 msgid "GDB Log" msgstr "" #. (itstool) path: default-language-specs/glsl.lang/language@_name #: default-language-specs/glsl.lang:30 msgid "OpenGL Shading Language" msgstr "" #. (itstool) path: default-language-specs/llvm.lang/language@_name #: default-language-specs/llvm.lang:22 msgid "LLVM IR" msgstr "" #. (itstool) path: default-language-specs/po.lang/language@_name #: default-language-specs/po.lang:23 msgid "gettext translation" msgstr "" #. (itstool) path: default-language-specs/rpmspec.lang/language@_name #: default-language-specs/rpmspec.lang:24 msgid "RPM spec" msgstr "" #. (itstool) path: default-language-specs/tera.lang/language@_name #: default-language-specs/tera.lang:23 msgid "Tera Template" msgstr "" language.dtd000066400000000000000000000044501526404615400316710ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/data/language-specs language.rng000066400000000000000000000254351526404615400317120ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/data/language-specs true false TRUE FALSE 0 1 1\.0 meson.build000066400000000000000000000005501526404615400315500ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/data/language-specslanguage_specs_install_dir = join_paths(get_option('datadir'), 'libgedit-gtksourceview-' + LIBGEDIT_GTKSOURCEVIEW_API_VERSION, 'language-specs') install_subdir( 'default-language-specs', install_dir: language_specs_install_dir, strip_directory: true, ) install_data( 'language.dtd', 'language.rng', install_dir: language_specs_install_dir, ) ue2gsv.pl000066400000000000000000000125771526404615400311720ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/data/language-specs#!/usr/bin/perl -w # Convert from UltraEdit syntax definition file format to GtkSourceView's .lang use strict; my $language_name = ""; my $string_chars = ""; my $escape_char = ""; my $case_sensitive = 1; my @line_comments = (); my $block_comment_on = ""; my $block_comment_off = ""; my %classes; my $l_seen = 0; my $this_class_name = ""; my @this_class_keywords = (); ###################################################################### # Parsing while (<>) { my $line = $_; if ($line =~ /^\/L[0-9]+\"([^\"]+)\"/) { $l_seen = 1; $language_name = $1; &parse_language_line ($line); next; } die "Not a proper UltraEdit syntax file\n" if (!$l_seen); # Chop trailing whitespace $line =~ s/\s+$//; # Skip unhandled control lines and empty lines # FIXME: handle "Function String" at the very least and generate pattern items next if ($line =~ /^\/(Delimiters|Function String|Indent String|Unindent String)/); next if ($line eq ""); if ($line =~ /^\/C([0-9]+)\s*(.*)/) { my $new_class_number = $1; my $new_class_name = $2; # Save old class first if ($this_class_name ne "") { # We need to copy the array, since we're going to store a reference to it my @keywords_copy = @this_class_keywords; $classes{$this_class_name} = \@keywords_copy; } $this_class_name = $new_class_name eq "" ? $new_class_number : $new_class_name; # Strip quotes from class name $this_class_name =~ s/^\"?(.+)\"$/$1/; @this_class_keywords = (); next; } if ($this_class_name eq "") { print "I don't have a class to add the keywords to, at line $.\n"; next; } # Add keywords to the current class my @keys = split /\s+/, $line; push @this_class_keywords, @keys; } ###################################################################### # Output &xml_reset; &xml_print ("\n"); &xml_print ("\n"); # FIXME: what to do with the mime types? &xml_print ("\n"); &xml_enter; # Line comments foreach my $line_comment (@line_comments) { &xml_print ("\n"); &xml_enter; &xml_print ("", ®ex_xml_quote ($line_comment), "\n"); &xml_leave; &xml_print ("/\n"); } # Block comments if ($block_comment_on ne "") { &xml_print ("\n"); &xml_enter; &xml_print ("", ®ex_xml_quote ($block_comment_on), "\n"); &xml_print ("", ®ex_xml_quote ($block_comment_off), "\n"); &xml_leave; &xml_print ("/\n"); } # Strings foreach my $string_delimiter (split / */, $string_chars) { &xml_print ("\n"); &xml_enter; &xml_print ("", ®ex_xml_quote ($string_delimiter), "\n"); &xml_print ("", ®ex_xml_quote ($string_delimiter), "\n"); &xml_leave; &xml_print ("\n"); } # Keyword classes foreach my $class (keys %classes) { &xml_print ("\n"); &xml_enter; foreach my $key (@{$classes{$class}}) { &xml_print ("", &xml_quote ($key), "\n"); } &xml_leave; &xml_print ("\n"); } # Remaining pattern items # FIXME: this is intended to output pattern items with elements from # classes which can't be expressed as keywords &xml_leave; &xml_print ("\n"); ###################################################################### # Auxiliary functions sub parse_language_line { my $line = shift; my @parts = split / /, $line; while (@parts) { my $part = shift @parts; # Handle single words first if ($part eq "Nocase") { $case_sensitive = 0; next; } # Handle argument extended phrases elsif ($part =~ /Line|Block|File|Escape|String/) { # Eat up @parts until the equal sign while (@parts) { my $next_part = shift @parts; if ($next_part eq "=") { last; } $part .= " $next_part"; } } else { next; } last if ($part eq "File Extensions"); # Get the argument my $argument = shift @parts; if ($part =~ /Line Comment|Line Comment Alt/) { push @line_comments, $argument; } elsif ($part eq "Block Comment On") { $block_comment_on = $argument; } elsif ($part eq "Block Comment Off") { $block_comment_off = $argument; } elsif ($part eq "Escape Char") { # Not yet supported in GtkSourceView $escape_char = $argument; } elsif ($part eq "String Chars") { $string_chars = $argument; } else { print "Unknown phrase $part\n"; } } } my $xml_indent_level; sub xml_reset { $xml_indent_level = 0; } sub xml_enter { $xml_indent_level += 1; } sub xml_leave { $xml_indent_level -= 1; } sub xml_indent { print "\t" x $xml_indent_level; } sub xml_print { &xml_indent; print @_; } sub xml_quote { $_ = $_[0]; s/\&/\&/g; s/\/\>/g; s/\"/\"/g; return $_; } sub regex_quote { $_ = $_[0]; s/\*/\\*/g; return $_; } sub regex_xml_quote { return &xml_quote (®ex_quote ($_[0])); } update-pot.sh000077500000000000000000000001401526404615400320220ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/data/language-specs#!/bin/sh itstool -i language-specs.its -o language-specs.pot \ default-language-specs/*.lang libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/data/meson.build000066400000000000000000000000611526404615400267260ustar00rootroot00000000000000subdir('language-specs') subdir('style-schemes') libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/data/style-schemes/000077500000000000000000000000001526404615400273545ustar00rootroot00000000000000default-style-schemes/000077500000000000000000000000001526404615400335045ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/data/style-schemesclassic.xml000066400000000000000000000121231526404615400356460ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/data/style-schemes/default-style-schemes <_description>Classic color scheme Hi there! file.hx000066400000000000000000000005031526404615400356650ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/tests/interactive-tests/syntax-highlighting/* Multi line comment * ================== * line 1 * line 2 * */ package; import flash.display.Sprite; class Main extends Sprite { var foo:Int = 400; // single line comment public static function main():Void { @metadata("argument") @:buildMacro var boolean:Bool = false; } } file.ijm000066400000000000000000000003251526404615400360270ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/tests/interactive-tests/syntax-highlighting// line comment var variable = "string\n with \t escaped\"characters"; macro "new macro" { NotGlobalVar = 5 +6; result = getPixel(0, 0); run("8-bit"); } function NewFunction() { /* multiline comment*/ } file.impl000066400000000000000000000004151526404615400362110ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/tests/interactive-tests/syntax-highlighting-- Opal test IMPLEMENTATION LeapYear IMPORT Nat COMPLETELY DEF leapYear(year) == IF (year % ("400"!) = 0) THEN true IF (year % ("400"!) |= 0) and (year % 100 = 0) THEN false IF (year % 100 |= 0) and (year % 4 = 0) THEN true IF (year % 4 |= 0) THEN false FI file.ini000066400000000000000000000002671526404615400360340ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/tests/interactive-tests/syntax-highlighting[module] type=Python file=simple.py version=1.0 [plugin] id=APlugin _name=A Plugin _description=A plugin author=Some Guy ; this is a plugin version, can be anything version=3.1415926 file.js000066400000000000000000000013041526404615400356620ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/tests/interactive-tests/syntax-highlighting// Regular expressions: /abc/ x = /abc/; function_with_regex_arg(/abc/); [ /abc/, /def/]; { regex: /abc/ }; (1 === 0) ? /abc/ : /def/; /abc/ /* Comment */ /abc/ // Comment var matches = /abc/.exec('Alphabet ... that should contain abc, right?'); // No regex here: a = [thing / thing, thing / thing]; x = a /b/ c / d; // Template strings // ---------------- // Template strings are delimited by back-ticks (grave accent) and // can span multiple lines. They allow for expressions that inside // of a dollar-sign plus curly-bracket construct (${...}). console.log(`The sum of 2 and 2 is ${2 + 2}`); let y = 8; let my_string = `This is a multiline string that also contains a template ${y + (4.1 - 2.2)}`; file.json000066400000000000000000000001611526404615400362170ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/tests/interactive-tests/syntax-highlighting{ "hi": -1.1e1, "b": 2, "abc": "hi", "dce": [ 1.2, 2e10, -3, 1, 2, "string" ], "fgh": { "a": 1 } } file.la000066400000000000000000000041541526404615400356500ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/tests/interactive-tests/syntax-highlighting# moo.la - a libtool library file # Generated by ltmain.sh - GNU libtool 1.5.22 Debian 1.5.22-4 (1.1220.2.365 2005/12/18 22:14:06) # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='moo.so' # Names of this library. library_names='moo.so moo.so moo.so' # The name of the static archive. old_library='' # Libraries that this one depends upon. dependency_libs=' -L/usr/local/gtk/lib /home/muntyan/projects/gtk/build/moo/moo/libmoo.la -lutil /usr/local/gtk/lib/libgtk-x11-2.0.la -lXext -lXinerama -lXrandr -lXcursor -lXfixes /usr/local/gtk/lib/libgdk-x11-2.0.la -latk-1.0 /usr/local/gtk/lib/libgdk_pixbuf-2.0.la /usr/local/gtk/lib/libpangocairo-1.0.la /usr/local/gtk/lib/libpangoft2-1.0.la /usr/local/gtk/lib/libpango-1.0.la /usr/local/gtk/lib/libcairo.la -lfreetype -lz -lfontconfig -lpng12 -lXrender -lX11 -lm /usr/local/gtk/lib/libgobject-2.0.la /usr/local/gtk/lib/libgmodule-2.0.la -ldl /usr/local/gtk/lib/libgthread-2.0.la -lpthread /usr/local/gtk/lib/libglib-2.0.la -lrt -lpcre /usr/lib/gcc/i486-linux-gnu/4.1.2/../../..//libfam.la -lrpcsvc /usr/lib/gcc/i486-linux-gnu/4.1.2/../../..//libxml2.la -L/usr/lib/python2.4 -lpython2.4 ' # Version information for moo. current=0 age=0 revision=0 # Is this an already installed library? installed=no # Should we warn about portability when linking against -modules? shouldnotlink=yes # Files to dlopen/dlpreopen dlopen='' dlpreopen='' # Directory that this library needs to be installed in: libdir='/usr/local/gtk/lib/python2.4/site-packages' relink_command="(cd /home/muntyan/projects/gtk/build/moo/moo; /bin/sh ../libtool --tag=CC --mode=relink gcc -g -L/usr/local/gtk/lib -o moo.la -rpath /usr/local/gtk/lib/python2.4/site-packages -no-undefined -module -avoid-version -export-symbols-regex initmoo moopython/libmoomod.la libmoo.la -lutil -L/usr/local/gtk/lib -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 -pthread -L/usr/local/gtk/lib -lgthread-2.0 -lglib-2.0 -lpcre -lfam -lxml2 -L/usr/lib/python2.4 -lpython2.4 @inst_prefix_dir@)" file.less000066400000000000000000000322371526404615400362250ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/tests/interactive-tests/syntax-highlighting/* * nesting */ #header { width: 300px; .navigation { font-size: 12px; } @media (min-width: 768px) { width: 600px; @media (min-resolution: 192dpi) { background-image: url(/img/retina2x.png); } } } /* * parent selector */ .component { &:hover { text-decoration: underline; } // compound selector &__element, &--modifier { border: 1px; } // multiple & & + & { color: red; } // changing selector order body.firefox & { font-weight: normal; } } /* * variables, data types */ // assignment @number: 5em; @double-quoted-string: "foo"; @single-quoted-string: 'bar'; @double-quoted-escape-string: ~"foo"; @single-quoted-escape-string: ~'bar'; @not-quoted-string: baz; @spaces-list: 1px 2px 3px 4px; @commas-list: arial, some-other-arial, sans-serif; @color: #fe57a1; @detached-ruleset: { color: red; div { color: blue; } }; #main { // property value width: @width; // variable reference color: @@color-variable-name; // property variable background-color: $color; // use detached ruleset @detached-ruleset(); // parentheses required } // media type, feature test @import "foo" @type and @feature-test, (@feature-test-content); @media @type and @feature-test, (@feature-test-content) { width: 700px; } // font feature value @font-feature-values Font One { @styleset { nice-style: @value; } } // @keyframes name @keyframes @myanim { from { width: 0; } to { width: 100%; } } /* * cases where Less doesn't currently accept variables (as of Less 3.0.0) * but may be still be incidentally highlighted */ // font feature values font name @font-feature-values @fontname { @styleset { nice-style: 12; } } // @namespace name @namespace @name url('http://www.w3.org/2000/svg'); // @page custom name, pseudo-page @page @name { margin: 0; @left-top { content: ''; } } /* * variable interpolation */ // selector @{hash-id}, #@{id}, #i@{d}, @{whole-class}, .part-@{class}-fragment, @{div}, d@{i}v, [@{attr}=@{value}], [@{attr-selector-content}], @{attr-selector}, @{selection}, ::se@{lect}ion, @{hover}, :ho@{v}er, @{lang-fr}, :la@{ng}(fr), :lang(@{fr}), :nth-child(@{expr}), :not(@{div}) { // property name @{font}: serif; background-@{image}: none; border-@{bottom}-width: 0; // inside strings content: "@{var}"; content: '@{var}'; // nested interpolations content: "@{@{nested}-variable}"; } // font feature type, custom name @font-feature-values Font One { @{type} { @{name}: 12; } } // inside @import url() @import url("http://fonts.googleapis.com/css?family=@{family}"); // inside @import string @import "http://fonts.googleapis.com/css?family=@{family}"; // @keyframes selectors @keyframes myanim { @{from} { width: 0; } @{to} { width: 100%; } } // @page margin box type @page toc, :first { margin: 0; @{margin-box-type} { content: ''; } } /* * operations */ body { width: (1px + (2em - 3rem)) * (4 / 5vh); // unary negation z-index: -@z-index; margin-bottom: -(@base * 2); } /* * functions */ body { // Less string format function content: %("1 plus 2 is %d", 1 + 2); // single line comments not parsed inside url() background: url(http://example.com/styles.css); // semicolons separators color: hsl(90; 100%; 50%); } /* * extend */ // attached to selector #main:extend(.card-style), .sidebar :extend(div pre) { color: blue; } #main { // inside ruleset &:extend(#board:nth-child(2n+3)); // all keyword &:extend(div ~ .inline[name="foo"] all); } /* * property merge */ code { // with comma box-shadow+: 0 0 20px black; // with space transform+_: scale(2); } /* * mixins */ // mixin definition .black() { color: black; } // with parameters .box(@margin, @padding) { // comma separated margin: @margin; padding: @padding; } .box(@margin; @padding) { // semicolon separated margin: @margin; padding: @padding; } .box(@margin: 10px; @padding: 10px) { // default parameters margin: @margin; padding: @padding; } // @arguments .box-shadow(@x: 0; @y: 0; @blur: 1px; @color: #000) { box-shadow: @arguments; } // variable arguments .mixin(...) {} // 0 or more arguments .mixin(@a; ...) {} // at least 1 argument .mixin(@a; @rest...) {} // remaining arguments bound to variable // with pattern .mixin(dark; 5px) {} .mixin(light; #000) {} // mixin call #main { // existing styles #header; .card-style; // existing styles with parentheses (optional), // or mixins with parentheses and no required parameters #header(); .card-style(); // namespaced styles #outer > .inner; #outer .inner; #outer.inner; // important modifier #header !important; .card-style() !important; #outer > .inner !important; // with parameters .box(20px, 10px); // comma separated .box(20px; 10px); // semicolon separated .box(@padding: 10px; @margin: 20px); // named parameters .box(@list...); // expands values in @list as arguments .mixin({ // detached ruleset color: red; div { color: blue; } }); // with pattern .mixin(dark; 5px); .mixin(light; #000); } /* * guards */ // regular styles button when (@my-option = true) { color: white; } & when (@my-option = true) { button { color: white; } a { color: blue; } } // namespace #namespace when (@mode = huge) { .mixin() {} } #namespace { .mixin() when (@mode = huge) {} } // mixin .mixin (@a) when (lightness(@a) >= 50%) { background-color: black; } .mixin (@a) when (lightness(@a) < 50%) { background-color: white; } // comparison operators, logical operators .mixin (@a) when (@a >= 0) and (@a =< 0) {} .mixin (@a) when (@a < 0) or (@a > 0) {} .mixin (@a) when (@a < 0), (@a > 0) {} .mixin (@a) when not (@a = 0) {} // true keyword .mixin (@a) when (@a) {} .mixin (@a) when (@a = true) {} /* * at-rules */ // @import @import "@{themes}/tidal-wave.less"; @import (optional, reference) "foo.less" screen and (orientation: landscape), print; // import options // @plugin @plugin 'my-plugin'; @plugin (options) 'my-plugin'; // plugin options // @plugin function call my-plugin(); div { my-plugin(red; 10px); } /* * test cases */ .declarations-or-selectors { // declarations display:block; font-family:arial; @{property}:block; // selectors input:focus { opacity: 0.5; } div:nth-child(2n+1) { background-color: gray; } @{selector}:focus { color: blue; } a:@{state} { color: blue; } } // from file.css /* * general */ /* whitespace */ #main { color:aqua; float: left!important; margin : 0 ; width : 100% ! important ; } /* case insensitivity */ Body { FONT: 12Px/16pX iTaLiC sans-SERIF; } /* * selectors */ /* simple selectors */ #testID, /* id */ .someclass, /* class */ div, /* type */ *, /* universal */ [lang|="zh"] { /* attribute */ color: black; } /* combinators */ header + main, /* adjacent sibling */ li ~ li, /* general sibling */ ul > li, /* child */ ul ul { /* descendant */ color: blue; } /* pseudo-elements */ :after, ::after, ::placeholder, ::selection { color: green; } /* pseudo-classes */ :hover, :required, :lang(fr), :not(div#sidebar.fancy), :nth-child(n+1), :nth-last-child(-2n - 30), :nth-of-type(5), :nth-last-of-type(even) { color: yellow; } /* pseudo-classes with invalid arguments */ :not(div:before), /* pseudo-element */ :not(input::placeholder), /* pseudo-element */ :not(p:not(:lang(en))), /* nested :not */ :nth-child(1.2n), /* non-integer */ :nth-child(.5), /* non-integer */ :nth-child(n+-1) { /* number sign */ color: red; } /* namespace qualified */ a, /* type in default namespace */ svg|a, /* type in specified namespace */ |a, /* type in no namespace */ *|a, /* type in all namespaces (including no namespace) */ svg|*, /* universal */ svg|[fill] { /* attribute */ color: white; } /* * basic data types */ #main { /* angle */ transform: rotate(+33.333e+3deg); /* color */ color: #f00; color: #f00f; /* #rgba */ color: #ff0000; color: #ff0000ff; /* #rrggbbaa */ color: red; color: lightgoldenrodyellow; color: rebeccapurple; color: currentColor; /* freqency (not currently used for any property) */ content: 44.1kHz; /* integer */ z-index: +255; z-index: -1; /* length */ width: 10px; width: 10.5rem; width: -10e-2vw; /* number */ opacity: .5; opacity: 0.3333; opacity: 1; opacity: 2e-34; /* percentage */ width: 100%; /* string */ content: "double quoted"; content: 'single quoted'; /* time */ transition-duration: .4s; transition-duration: 400ms; /* unicode range */ unicode-range: U+0025-00FF; unicode-range: U+4??; /* wildcard range */ } /* ratio */ @media (min-aspect-ratio: 16/9) {} /* resolution */ @media (min-resolution: +2.54dpcm) {} /* * identifiers */ /* leading hyphens */ #-here.-there, #-- .--everywhere { /* two hyphens: https://stackoverflow.com/a/30822662 */ color: blue; } /* non-ASCII */ #español, #你好, .❤♫ { color: green; } /* invalid identifiers */ #1id, /* starts with digit */ .-2class { /* starts with hyphen digit */ color: maroon; } /* * escaping */ /* selectors */ #\..\+\ space\@\>, /* special character escape */ #\E9 dition .\0000E9dition .motion_\e9motion, /* Unicode character escape */ .\e33 div, /* trailing space terminates Unicode character escape */ .\e33 div, /* extra space to denote separate tokens */ .\31 23 { /* escape leading digit of identifier */ /* property value */ content: "\E9 dition \ \"\0000E9dition\" \ \e9motion"; /* function name */ background: \u\72\l(image.png); } /* * functions */ #main { /* url */ background: url("image.svg"); /* function argument keywords */ background-image: linear-gradient(to left top, #fff, blue); grid-template-columns: repeat(2, minmax(max-content, 300px) 1fr) 100px; } /* * style properties */ #main { /* svg */ fill: url(#pattern); text-rendering: optimizeLegibility; /* css3 */ font-variant-east-asian: jis04; size: letter; transition-timing-function: ease-in; /* animatable */ transition-property: height, font-size, visibility; } /* * modifiers */ body { background: pink !important; } /* * media queries */ @media screen, (orientation: portrait) {} @media not (print and (min-monochrome: 16) and (color)) {} @media only screen {} @media not print {} /* * at-rules */ /* @font-face */ @font-face { font-family: MyHelvetica; src: local("Helvetica Neue"), local("HelveticaNeue"), url(MgOpenModerna.ttf); } /* @font-feature-values */ @font-feature-values Font One { @styleset { nice-style: 12; } } .nice-look { font-variant-alternates: styleset(nice-style); } /* @import */ @import URL("fineprint.css"); @import 'custom.css'; @import url('landscape.css') screen and (orientation: landscape), print; /* @keyframes */ @keyframes myanim { from { opacity: 0.0; } 50% { opacity: 0.5; } to { opacity: 1.0; } } /* @media */ @media all { body { background: gray; } @media screen, (orientation: portrait) { body { background: grey; } } } /* @namespace */ @namespace "http://www.w3.org/1999/xhtml"; @namespace svg url(http://www.w3.org/2000/svg); /* @page */ @page { bleed: 1cm; } @page toc, :blank { margin: 2cm; marks: crop cross; } @page index:left { size: A4; @top-right { content: "Page " counter(page); } } /* @supports */ @supports (animation-name: test) { @keyframes 'my-complicated-animation' { 0% { width: 0; } 100% { width: 100%; } } } /* * vendor-specific extensions */ /* pseudo-elements */ input[type="number"]::-webkit-outer-spin-button, input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; } input[type="number"] { -moz-appearance: textfield; } /* pseudo-classes */ #page:-moz-full-screen, #page:-ms-fullscreen, #page:-webkit-full-screen { background: silver; } /* functions */ .footer { background-image: -webkit-linear-gradient(to left top, #fff, blue); } /* style properties */ #sidebar { -ms-overflow-style: -ms-autohiding-scrollbar; } @supports not ((text-align-last: justify) or (-moz-text-align-last: justify)) { body { text-align: justify; } } /* at-rules */ @-webkit-keyframes myanim { from { opacity: 0.0; } 50% { opacity: 0.5; } to { opacity: 1.0; } } file.ll000066400000000000000000000010421526404615400356540ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/tests/interactive-tests/syntax-highlighting; LLVM intermediate representation ; Run with: llc file.ll && gcc file.s && ./a.out @str = internal constant [4 x i8] c"%d\0A\00" declare i32 @printf(i8*, ...) define i32 @main() { ; Print a secret number on the screen %1 = select i1 true, float 0x402ABD70A0000000, float 0xC0FFEE0000000000 %2 = fpext float %1 to double %3 = fmul double %2, 1.000000e+02 %4 = fptoui double %3 to i32 %5 = add i32 %4, 1 ; Call printf call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([4 x i8]* @str, i32 0, i32 0), i32 %5) ret i32 0 } file.logcat000066400000000000000000000036611526404615400365270ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/tests/interactive-tests/syntax-highlighting--------- beginning of /dev/log/system V/test ( 145): The quick brown fox jumps over the lazy dog D/test ( 141): The quick brown fox jumps over the lazy dog I/test ( 141): The quick brown fox jumps over the lazy dog W/test ( 141): The quick brown fox jumps over the lazy dog E/test ( 141): The quick brown fox jumps over the lazy dog F/test ( 141): The quick brown fox jumps over the lazy dog --------- beginning of /dev/log/system V(test ( 145): The quick brown fox jumps over the lazy dog D(test ( 141): The quick brown fox jumps over the lazy dog I(test ( 141): The quick brown fox jumps over the lazy dog W(test ( 141): The quick brown fox jumps over the lazy dog E(test ( 141): The quick brown fox jumps over the lazy dog F(test ( 141): The quick brown fox jumps over the lazy dog --------- beginning of /dev/log/main 01-28 12:36:22.826 8 8 V TEST : "The quick brown fox jumps over the lazy dog" 01-28 12:36:22.826 98 98 D TEST : "The quick brown fox jumps over the lazy dog" 01-28 12:36:22.826 398 398 I TEST : "The quick brown fox jumps over the lazy dog" 01-28 12:36:22.826 3398 3398 W TEST : "The quick brown fox jumps over the lazy dog" 01-28 12:36:22.827 3398 3398 E TEST : "The quick brown fox jumps over the lazy dog" 01-28 12:36:22.827 3398 3398 F TEST : "The quick brown fox jumps over the lazy dog" 2017-01-28 12:36:22.826 8 8 V TEST : "The quick brown fox jumps over the lazy dog" 2017-01-28 12:36:22.826 98 98 D TEST : "The quick brown fox jumps over the lazy dog" 2017-01-28 12:36:22.826 398 398 I TEST : "The quick brown fox jumps over the lazy dog" 2017-01-28 12:36:22.826 3398 3398 W TEST : "The quick brown fox jumps over the lazy dog" 2017-01-28 12:36:22.827 3398 3398 E TEST : "The quick brown fox jumps over the lazy dog" 2017-01-28 12:36:22.827 3398 3398 F TEST : "The quick brown fox jumps over the lazy dog" file.m000066400000000000000000000004471526404615400355110ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/tests/interactive-tests/syntax-highlighting#import #import @interface Lalala : Object - (BOOL) sayHello; @end @implementation Lalala : Object - (BOOL) sayHello { printf ("Hello there!\n"); return YES; } @end int main (void) { Lalala *obj = [[Lalala alloc] init]; [obj sayHello]; [obj free]; return 0; } file.m4000066400000000000000000000001411526404615400355640ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/tests/interactive-tests/syntax-highlightingdnl an m4 file AC_DEFINE([foo],[echo "Hi there!"]) AC_CHECK_FUNC([foo],[yes=yes],[yes=no]) foo() file.md000066400000000000000000000001361526404615400356500ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/tests/interactive-tests/syntax-highlightingA minimal C program with just the `main()` function: ```c int main (void) { return 0; } ``` file.ml000066400000000000000000000002371526404615400356620ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/tests/interactive-tests/syntax-highlightingopen List (*comment (** comment in comment *) *) let id = fun x -> x (**) (*<- empty comment*) (**ocamldoc (*and comment*) *) let _ = print_string "ok\n" file.nix000066400000000000000000000020371526404615400360500ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/tests/interactive-tests/syntax-highlighting{ pkgs, lib, config, inputs, ... }: let /* Modify the package for GNU Hello. Update to latest version and apply a custom patch. */ hello = pkgs.hello.overrideAttrs (attrs: rec { version = "2.12.1"; src = fetchurl { url = "mirror://gnu/hello/hello-${version}.tar.gz"; hash = "sha256-jZkUKv2SV28wsM18tCqNxoCZmLxdYH2Idh9RLibH2yA="; }; patches = attrs.patches or [] ++ [ # Cherry pick a crash fix. ../pkgs/hello/fix-crash.patch ]; }); in { environment.systemPackages = with pkgs; [ firefox hello ]; home-manager.users.jtojnar = { lib, ... }: { dconf.settings = { "org/gnome/desktop/input-sources" = { sources = [ (lib.hm.gvariant.mkTuple [ "xkb" "${config.services.xserver.layout}${lib.optionalString (config.services.xserver.xkbVariant != "") "+" + config.services.xserver.xkbVariant}" ]) ]; }; }; home.file.".config/npm/npmrc".text = '' prefix=''${XDG_DATA_HOME}/npm ''; }; } file.octave000066400000000000000000000001021526404615400365220ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/tests/interactive-tests/syntax-highlighting% gtk-source-lang: octave % -*- octave -*- No idea what syntax is file.ooc000066400000000000000000000004041526404615400360260ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/tests/interactive-tests/syntax-highlightingimport structs/[ArrayList, LinkedList], io/FileReader include stdarg, memory, string use sdl, gtk pi := const 3.14 Int: cover from int { toString: func -> String { "%d" format() } } Dog: class extends Animal { barf: func { ("woof! " * 2) println() } } file.pc000066400000000000000000000004271526404615400356550ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/tests/interactive-tests/syntax-highlighting# A comment prefix=/usr exec_prefix= libdir=/lib includedir=/include Name: cairo Description: Multi-platform 2D graphics library Version: 1.4.10 Requires.private: freetype2 >= 8.0.2 fontconfig libpng12 xrender >= 0.6 x11 Libs: -L -lcairo Libs.private: -lz -lm Cflags: -I/cairo file.pig000066400000000000000000000004531526404615400360310ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/tests/interactive-tests/syntax-highlighting/* * This file tests Apache Pig 0.12 Syntax Highlighting */ fake = LOAD 'fakeData' USING PigStorage() AS (name:chararray, age:int); fake = limit fake 5; -- operations can be case insensitive fake = FOREACH fake GENERATE TRIM(name) AS name, null as nullField, false AS booleanConst; DUMP fake; file.pl000066400000000000000000000050631526404615400356670ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/tests/interactive-tests/syntax-highlighting#!/usr/bin/perl -- # -*- Perl -*- # # : collateindex.pl,v 1.10 2004/10/24 17:05:41 petere78 Exp $ print OUT "\n\n" if ; = {}; # the last indexterm we processed = 1; # this is the first one = ""; # we're not in a group yet = ""; # we've not put anything out yet @seealsos = (); # See also stack. # Termcount is > 0 iff some entries were skipped. || print STDERR " entries ignored...\n"; &end_entry(); print OUT "\n" if ; print OUT "\n"; close (OUT); || print STDERR "Done.\n"; sub same { my() = shift; my() = shift; my() = ->{'psortas'} || ->{'primary'}; my() = ->{'ssortas'} || ->{'secondary'}; my() = ->{'tsortas'} || ->{'tertiary'}; my() = ->{'psortas'} || ->{'primary'}; my() = ->{'ssortas'} || ->{'secondary'}; my() = ->{'tsortas'} || ->{'tertiary'}; my(); =~ s/^\s*//; =~ s/\s*$//; = uc(); =~ s/^\s*//; =~ s/\s*$//; = uc(); =~ s/^\s*//; =~ s/\s*$//; = uc(); =~ s/^\s*//; =~ s/\s*$//; = uc(); =~ s/^\s*//; =~ s/\s*$//; = uc(); =~ s/^\s*//; =~ s/\s*$//; = uc(); # print "[]=[]\n"; # print "[]=[]\n"; # print "[]=[]\n"; # Two index terms are the same if: # 1. the primary, secondary, and tertiary entries are the same # (or have the same SORTAS) # AND # 2. They occur in the same titled section # AND # 3. They point to the same place # # Notes: Scope is used to suppress some entries, but can't be used # for comparing duplicates. # Interpretation of "the same place" depends on whether or # not is true. = (( eq ) && ( eq ) && ( eq ) && (->{'title'} eq ->{'title'}) && (->{'href'} eq ->{'href'})); # If we're linking to points, they're only the same if they link # to exactly the same spot. = && (->{'hrefpoint'} eq ->{'hrefpoint'}) if ; if () { warn ": duplicated index entry found: \n"; } ; } sub tsame { # Unlike same(), tsame only compares a single term my() = shift; my() = shift; my() = shift; my() = substr(, 0, 1) . "sortas"; my(, ); = ->{} || ->{}; = ->{} || ->{}; =~ s/^\s*//; =~ s/\s*$//; = uc(); =~ s/^\s*//; =~ s/\s*$//; = uc(); return eq ; } =head1 EXAMPLE B B<-o> F F =head1 EXIT STATUS =over 5 =item B<0> Success =item B<1> Failure =back =head1 AUTHOR Norm Walsh Endw@nwalsh.comE Minor updates by Adam Di Carlo Eadam@onshore.comE and Peter Eisentraut Epeter_e@gmx.netE =cut file.po000066400000000000000000000012501526404615400356640ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/tests/interactive-tests/syntax-highlighting# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2006-12-17 09:49-0600\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" #: ../medit/medit.desktop.in.h:1 msgid "Text editor" msgstr "" #: ../medit/medit.desktop.in.h:2 msgid "medit" msgstr "" file.prg000066400000000000000000000007561526404615400360500ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/tests/interactive-tests/syntax-highlightingimport "mod_say" import "mod_rand" import "mod_screen" import "mod_video" import "mod_map" import "mod_key" // Bouncing box example process main() private int vx=5, vy=5; begin set_mode(640, 480, 16, MODE_WINDOW); graph = map_new(20, 20, 16); map_clear(0, graph, rgb(255, 0, 0)); x = 320; y = 240; while(! key(_esc)) if(x > 630 || x < 10) vx = -vx; end; if(y > 470 || y < 10) vy = -vy; end; x += vx; y += vy; // Move the box frame; end; end; file.prolog000066400000000000000000000001171526404615400365510ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/tests/interactive-tests/syntax-highlightingconc([],X,X). conc([Car|Cdr], X, [Car|ConcatCdr]):- conc(Cdr, X, ConcatCdr). file.py000066400000000000000000000004311526404615400356760ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/tests/interactive-tests/syntax-highlightingimport sys from sys import * class Hello(object): def __init__(self): object.__init__(self) def hello(self): print >> sys.stderr, "Hi there!" None, True, False r'raw \' \ string' r"""raw multiline \""" string""" Hello().hello() file.rq000066400000000000000000000006041526404615400356720ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/tests/interactive-tests/syntax-highlighting# Positive test: product of type promotion within the xsd:decimal type tree. PREFIX t: PREFIX rdf: PREFIX xsd: ASK WHERE { t:double1 rdf:value ?l . t:float1 rdf:value ?r . FILTER ( datatype(?l + ?r) = xsd:double ) } file.rs000066400000000000000000000016211526404615400356740ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/tests/interactive-tests/syntax-highlighting// Comment enum Animal { Dog, Cat } struct Point { x: i32, y: i32 } union MyUnion { f1: u32, f2: f32, } macro_rules! hello_world_macro { () => ( println!("Hello World!"); ) } fn main() { let _i8: i8 = 1i8; let _i16: i16 = 1i16; let _i32: i32 = 1i32; let _i64: i64 = 1i64; let _isize: isize = 1isize; let _u8: u8 = 1u8; let _u16: u16 = 1u16; let _u32: u32 = 1u32; let _u64: u64 = 1u64; let _usize: usize = 1usize; let _f32: f32 = 3.14f32; let _f64: f64 = 3.14f64; let valid_binary = 0b0_10; let invalid_binary= 0b0_13; let valid_octal = 0o3_45; let invalid_octal = 0o3_49; let valid_hexadecimal = 0x9_AF; let invalid_hexadecimal = 0x9_AZ; let valid_char: char = 'a'; let invalid_char = 'ab'; let valid_byte: u8 = b'a'; let invalid_byte = b'ab'; hello_world_macro!(); } file.rst000066400000000000000000000013561526404615400360650ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/tests/interactive-tests/syntax-highlightingHeading ======= These are some addresses: http://www.gnome.org/ and https://www.gnome.org/ and git://git.gnome.org/gtksourceview and ssh://USERNAME@git.gnome.org/git/gtksourceview and gnome-list@gnome.org is the last one. Subheading ---------- - First ``literal`` Item - Second **bold** Item - Subitem `interpreted` - Third *emphasis* Item This is a sentence with a `http-link `_, a `https-link `_, and a footnote [#]_. .. image:: images/example.png :height: 100px :width: 100 px | A line block > A quote block .. This is a block that will be shown. .. This is a comment and will not be shown. .. math:: \lambda = \lambda_{0} + \arctan \left[ \frac{x}{-y} \right] file.sci000066400000000000000000000004431526404615400360270ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/tests/interactive-tests/syntax-highlighting// A comment with whites and tabulations // Scilab editor: http://www.scilab.org/ function [a, b] = myfunction(d, e, f) a = 2.71828 + %pi + f($, :); b = cos(a) + cosh(a); if d == e then b = 10 - e.field; else b = " test " + home return end myvar = 1.23e-45; endfunction file.scss000066400000000000000000000351151526404615400362300ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/tests/interactive-tests/syntax-highlighting/* * css extensions */ div { color: #00ff00; // nested rules #inner.element { color: #000000; } // parent selector &:hover { text-decoration: underline; } body.firefox & { font-weight: normal; } &__element, // compound selector &--modifier { border: 1px; } // nested properties font: { family: fantasy; size: 30em; weight: bold; } font: 20px/24px fantasy { weight: bold; } } /* * variables, data types */ // assignment $number: 5em; $double-quoted-string: "foo"; $single-quoted-string: 'bar'; $not-quoted-string: baz; $true: true; $false: false; $null: null; $parens-spaces-list: (left top); $parens-commas-list: (1px, 2px, 3px, 4px); $no-parens-spaces-list: 1px 2px 3px 4px; $no-parens-commas-list: arial, some-other-arial, sans-serif; $trailing-comma: (1 2 3,); // a comma-separated list containing a space-separated list $bracketed-list: [5rem 6rem 7rem]; // comma or space separated $map: (medium: 640, 'large': 960, "x-large": 1280, (xx-large,): 1600); // must have parentheses, be comma separated $color: #fe57a1; $function-reference: get-function($function-name); // assign if not already assigned to $var: 1 !default; #main { // global variable defined in block $width: 5em !global; // list of parent selectors $selectors: &; // property value width: $width; } // media feature test @import "foo" ($orientation: $landscape); @media ($orientation-landscape) { width: 700px; } // font feature value @font-feature-values Font One { @styleset { nice-style: $value; } } // @supports test @supports ($animation-name: $test) { body { animation-name: test; } } @supports ($animation-name-test) { body { animation-name: test; } } // @at-root query @at-root ($type: $value) { .top-level { background: pink; } } @at-root ($query) { .top-level { background: pink; } } /* * operations */ body { // arithmetic operators width: (1px + (2em - 3rem)) * (4 / 5vh) % 6cm; // plain css font: 10px/8px; font: (italic bold 10px/8px); font: #{$font-size}/#{$line-height}; // division width: $width/2; width: round(1.5)/2; width: (500px/2); width: 5px + 8px/2px; // minus sign animation-name: a-1; // identifier margin: (5px - 3px) 5px-3px 3-2 (1 -$var); // subtraction margin: 1 -3em; // negative number margin: -$var -(1); // unary negation // string concatenation content: "Foo " + Bar; // "Foo Bar" font-family: sans- + "serif"; // sans-serif } // string concatenation in string-only context @keyframes ('foo' + bar) {} @keyframes (foo + "bar") {} // comparison operators, logical operators $a: (1 < 2 and 1 > 2) or (1 <= 2) and 1 >= 2; $b: not (1 == 2) and 1 != 2; /* * interpolation */ // selector #{'#id'}, #i#{'d'}, #{'.whole-class'}, .part-#{'class'}-fragment, #{'div'}, d#{'i'}v, [#{'attr'}=#{'value'}], [#{'attr="value"'}], #{'[attr="value"]'}, #{'::selection'}, ::se#{'lect'}ion, #{':hover'}, :ho#{'v'}er, #{':lang(fr)'}, :la#{'ng(f'}r), :lang(#{'fr'}), :nth-child(#{'2n+1'}), :not(#{'div'}), #{'%placeholder'}, %pla#{'ceho'}lder { // property name #{'font'}: serif; background-#{'image'}: none; border-#{'bottom'}-width: 0; // property value font-size: #{$font-size}; font-family: #{'arial, sans'}-serif; width: #{5 * (3 - 1)}px; // function name background: #{'url'}('image.png'); background: u#{'r'}l('image.png'); // !important (exclamation mark needs to be inside) width: 0 #{'!important'}; width: 0 #{'!import'}ant; // inside strings content: "#{$var}"; content: '#{$var}'; // inside comments /* multi-line: #{$yes} */ // single line: #{$no} } // media type, feature test @import "foo" #{'screen'} and (#{'orientation'}: #{'landscape'}); @media #{'screen'} and (#{'orientation: landscape'}) { width: 700px; } // font name, font feature custom name, font feature value @font-feature-values #{'Font One'} { @styleset { // interpolation not accepted here? #{'nice-style'}: #{12}; } } // inside @import url() @import url("http://fonts.googleapis.com/css?family=#{$family}"); // @keyframes name, selector @keyframes #{'myanim'} { #{'from'} { width: 0; } #{'to'} { width: 100%; } } // @namespace name @namespace #{'svg'} url('http://www.w3.org/2000/svg'); // @page custom name, pseudo-page @page #{'toc'}, #{':first'} { margin: 0; @left-top { // interpolation not accepted here? content: ''; } } // @supports test @supports (#{'animation-name'}: #{'test'}) { body { animation-name: test; } } @supports (#{'animation-name: test'}) { body { animation-name: test; } } // @at-root query @at-root (#{'without'}: #{'media'}) { .top-level { background: pink; } } @at-root (#{'without: media'}) { .top-level { background: pink; } } /* * functions */ body { // single line comments not parsed inside url() background: url(http://example.com/styles.css); // keyword arguments color: hsl($hue: 0, $saturation: 100%, $lightness: 50%); } /* * at-rules */ // @import @import "rounded-corners", "text-shadow"; // multiple files #main { // nested @import @import "example"; // but not inside mixins or control directives } // nested @media @media screen { .sidebar { @media (orientation: landscape) { width: 500px; } } } // @extend #main { @extend #hello; // no error if not found @extend .from[the="other-side"] !optional; // placeholder selector @extend div%placeholder; } // @at-root #main { @at-root .child { color: red; } } @media screen { @supports (font-variant-alternates: styleset(nice-style)) { @at-root (without: media supports) { // with query .absolutely-top-level { background: pink; } } } } // @if/@else if/@else, @debug/@warn/@error @if $num-errors == 0 { @debug "$num-errors is 0"; } @else if $num-errors > 0 { @warn "oops there are #{$num-errors} errors"; } @else { @error "negative errors?!?"; } // @for @for $i from 1 through 3 { .item-#{$i} { width: 2em * $i; } } // @each @each $animal in puma, sea-slug, egret, salamander { .#{$animal}-icon { background-image: url('/images/#{$animal}.png'); } } @each $header, $size in (h1: 2em, h2: 1.5em, h3: 1.2em) { #{$header} { font-size: $size; } } // @while $i: 6; @while $i > 0 { .item-#{$i} { width: 2em * $i; } $i: $i - 2; } // @mixin @mixin large-text { font-size: 128px; } @mixin sexy-border($color, $width: 1in) { // with arguments, default value border: { color: $color; width: $width; } } @mixin box-shadow($shadows...) { // variable arguments box-shadow: $shadows; } @mixin apply-to-ie6-only { // accepts content block * html { @content; } } // @include .page-title { @include large-text; } p { @include sexy-border(blue); // with arguments } div { @include sexy-border($color: blue, $width: 10cm); // keyword arguments } .primary { @include box-shadow($shadows...); // expand list into arguments } @include apply-to-ie6-only { // passing content block display: block; #main { background: black; } } // @function @function grid-width($n) { @return $n * $grid-width + ($n - 1) * $gutter-width; } #sidebar { width: grid-width(5); } /* * test cases */ .declarations-or-selectors { // declarations display:block; font-family:arial; font: { family: fantasy; weight: bold; } font: fantasy { size: 20px; style: italic; } #{$property}:block; #{$property}: { color: red; } color:#000; width:#{$width}; // selectors input:focus { opacity: 0.5; } div:nth-child(2n+1) { background-color: gray; } div:-moz-full-screen { display: block; } a:#{$state} { color: blue; } #{$selector}:focus { color: blue; } } // from file.css /* * general */ /* whitespace */ #main { color:aqua; float: left!important; margin : 0 ; width : 100% ! important ; } /* case insensitivity */ Body { FONT: 12Px/16pX iTaLiC sans-SERIF; } /* * selectors */ /* simple selectors */ #testID, /* id */ .someclass, /* class */ div, /* type */ *, /* universal */ [lang|="zh"] { /* attribute */ color: black; } /* combinators */ header + main, /* adjacent sibling */ li ~ li, /* general sibling */ ul > li, /* child */ ul ul { /* descendant */ color: blue; } /* pseudo-elements */ :after, ::after, ::placeholder, ::selection { color: green; } /* pseudo-classes */ :hover, :required, :lang(fr), :not(div#sidebar.fancy), :nth-child(n+1), :nth-last-child(-2n - 30), :nth-of-type(5), :nth-last-of-type(even) { color: yellow; } /* pseudo-classes with invalid arguments */ :not(div:before), /* pseudo-element */ :not(input::placeholder), /* pseudo-element */ :not(p:not(:lang(en))), /* nested :not */ :nth-child(1.2n), /* non-integer */ :nth-child(.5), /* non-integer */ :nth-child(n+-1) { /* number sign */ color: red; } /* namespace qualified */ a, /* type in default namespace */ svg|a, /* type in specified namespace */ |a, /* type in no namespace */ *|a, /* type in all namespaces (including no namespace) */ svg|*, /* universal */ svg|[fill] { /* attribute */ color: white; } /* * basic data types */ #main { /* angle */ transform: rotate(+33.333e+3deg); /* color */ color: #f00; color: #f00f; /* #rgba */ color: #ff0000; color: #ff0000ff; /* #rrggbbaa */ color: red; color: lightgoldenrodyellow; color: rebeccapurple; color: currentColor; /* freqency (not currently used for any property) */ content: 44.1kHz; /* integer */ z-index: +255; z-index: -1; /* length */ width: 10px; width: 10.5rem; width: -10e-2vw; /* number */ opacity: .5; opacity: 0.3333; opacity: 1; opacity: 2e-34; /* percentage */ width: 100%; /* string */ content: "double quoted"; content: 'single quoted'; /* time */ transition-duration: .4s; transition-duration: 400ms; /* unicode range */ unicode-range: U+0025-00FF; unicode-range: U+4??; /* wildcard range */ } /* ratio */ @media (min-aspect-ratio: 16/9) {} /* resolution */ @media (min-resolution: +2.54dpcm) {} /* * identifiers */ /* leading hyphens */ #-here.-there, #-- .--everywhere { /* two hyphens: https://stackoverflow.com/a/30822662 */ color: blue; } /* non-ASCII */ #español, #你好, .❤♫ { color: green; } /* invalid identifiers */ #1id, /* starts with digit */ .-2class { /* starts with hyphen digit */ color: maroon; } /* * escaping */ /* selectors */ #\..\+\ space\@\>, /* special character escape */ #\E9 dition .\0000E9dition .motion_\e9motion, /* Unicode character escape */ .\e33 div, /* trailing space terminates Unicode character escape */ .\e33 div, /* extra space to denote separate tokens */ .\31 23 { /* escape leading digit of identifier */ /* property value */ content: "\E9 dition \ \"\0000E9dition\" \ \e9motion"; /* function name */ background: \u\72\l(image.png); } /* * functions */ #main { /* url */ background: url("image.svg"); /* function argument keywords */ background-image: linear-gradient(to left top, #fff, blue); grid-template-columns: repeat(2, minmax(max-content, 300px) 1fr) 100px; } /* * style properties */ #main { /* svg */ fill: url(#pattern); text-rendering: optimizeLegibility; /* css3 */ font-variant-east-asian: jis04; size: letter; transition-timing-function: ease-in; /* animatable */ transition-property: height, font-size, visibility; } /* * modifiers */ body { background: pink !important; } /* * media queries */ @media screen, (orientation: portrait) {} @media not (print and (min-monochrome: 16) and (color)) {} @media only screen {} @media not print {} /* * at-rules */ /* @font-face */ @font-face { font-family: MyHelvetica; src: local("Helvetica Neue"), local("HelveticaNeue"), url(MgOpenModerna.ttf); } /* @font-feature-values */ @font-feature-values Font One { @styleset { nice-style: 12; } } .nice-look { font-variant-alternates: styleset(nice-style); } /* @import */ @import URL("fineprint.css"); @import 'custom.css'; @import url('landscape.css') screen and (orientation: landscape), print; /* @keyframes */ @keyframes myanim { from { opacity: 0.0; } 50% { opacity: 0.5; } to { opacity: 1.0; } } /* @media */ @media all { body { background: gray; } @media screen, (orientation: portrait) { body { background: grey; } } } /* @namespace */ @namespace "http://www.w3.org/1999/xhtml"; @namespace svg url(http://www.w3.org/2000/svg); /* @page */ @page { bleed: 1cm; } @page toc, :blank { margin: 2cm; marks: crop cross; } @page index:left { size: A4; @top-right { content: "Page " counter(page); } } /* @supports */ @supports (animation-name: test) { @keyframes 'my-complicated-animation' { 0% { width: 0; } 100% { width: 100%; } } } /* * vendor-specific extensions */ /* pseudo-elements */ input[type="number"]::-webkit-outer-spin-button, input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; } input[type="number"] { -moz-appearance: textfield; } /* pseudo-classes */ #page:-moz-full-screen, #page:-ms-fullscreen, #page:-webkit-full-screen { background: silver; } /* functions */ .footer { background-image: -webkit-linear-gradient(to left top, #fff, blue); } /* style properties */ #sidebar { -ms-overflow-style: -ms-autohiding-scrollbar; } @supports not ((text-align-last: justify) or (-moz-text-align-last: justify)) { body { text-align: justify; } } /* at-rules */ @-webkit-keyframes myanim { from { opacity: 0.0; } 50% { opacity: 0.5; } to { opacity: 1.0; } } file.sh000066400000000000000000000016501526404615400356640ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/tests/interactive-tests/syntax-highlighting#!/bin/bash echo "Hi there!" # Parameter Expansion xxx${xxx}xxx # parameter in braces xxx${"{"}xxx xxx${"}"}xxx # brace in quoted string xxx$0000 # one digit parameter xxx${parameter:-word}xxx${parameter-word}xxx # Use Default Values xxx${parameter:=word}xxx${parameter=word}xxx # Assign Default Values xxx${parameter:?word}xxx${parameter?word}xxx # Indicate Error if Null or Unset xxx${parameter:?}xxx${parameter?}xxx # Indicate Error if Null or Unset xxx${parameter:+word}xxx${parameter+word}xxx # Use Alternative Value xxx${#parameter}xxx # String Length xxx${parameter%word}xxx # Remove Smallest Suffix Pattern xxx${parameter%%word}xxx # Remove Largest Suffix Pattern xxx${parameter#word}xxx # Remove Smallest Prefix Pattern xxx${parameter##word}xxx # Remove Largest Prefix Pattern xxx${x:-$(ls)}xxx xxx${posix:?}xxx xxx${3:+posix}xxx xxx${#HOME}xxx xxx${x%.c}.oxxx xxx${x#$HOME}xxx xxx${x##*/}xxx xxx${x#*}xxx xxx${x#"*"}xxx file.spec000066400000000000000000000053611526404615400362070ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/tests/interactive-tests/syntax-highlighting# # gtksourceview.spec # %define api_version 1.0 %define lib_major 0 %define lib_name %mklibname %{name}- %{api_version} %{lib_major} Summary: Source code viewing library Name: gtksourceview Version: 1.7.2 Release: %mkrel 1 License: GPL Group: Editors URL: http://people.ecsc.co.uk/~matt/downloads/rpms/gtksourceview/ Source0: https://download.gnome.org/sources/%{name}/%{name}-%{version}.tar.xz BuildRoot: %{_tmppath}/%{name}-%{version} BuildRequires: libgtk+2-devel >= 2.3.0 BuildRequires: libgnome-vfs2-devel >= 2.2.0 BuildRequires: libgnomeprintui-devel >= 2.7.0 BuildRequires: perl-XML-Parser Conflicts: gtksourceview-sharp <= 0.5-3mdk %description GtkSourceview is a library that adds syntax highlighting, line numbers, and other programming-editor features. GtkSourceView specializes these features for a code editor. %package -n %{lib_name} Summary: Source code viewing library Group: Editors Requires: %{name} >= %{version}-%{release} Provides: lib%{name} = %{version}-%{release} Provides: libgtksourceview0 = %{version}-%{release} Obsoletes: libgtksourceview0 Provides: libgtksourceview1.0 = %{version}-%{release} Obsoletes: libgtksourceview1.0 %description -n %{lib_name} GtkSourceview is a library that adds syntax highlighting, line numbers, and other programming-editor features. GtkSourceView specializes these features for a code editor. %package -n %{lib_name}-devel Summary: Libraries and include files for GtkSourceView Group: Development/GNOME and GTK+ Requires: %{lib_name} = %{version} Provides: %{name}-devel = %{version}-%{release} Provides: lib%{name}-devel = %{version}-%{release} Provides: lib%{name}-%{api_version}-devel = %{version}-%{release} Provides: libgtksourceview0-devel = %{version}-%{release} Obsoletes: libgtksourceview0-devel Provides: libgtksourceview1.0-devel = %{version}-%{release} Obsoletes: libgtksourceview1.0-devel %description -n %{lib_name}-devel GtkSourceView development files %prep %setup -q %build %configure2_5x %make %install rm -rf %{buildroot} %makeinstall_std %{find_lang} %{name}-%{api_version} %post -n %{lib_name} -p /sbin/ldconfig %postun -n %{lib_name} -p /sbin/ldconfig %clean rm -rf %{buildroot} %files -f %{name}-%{api_version}.lang %defattr(-,root,root) %doc AUTHORS ChangeLog NEWS README TODO %{_datadir}/gtksourceview-%{api_version} %files -n %{lib_name} %defattr(-,root,root) %{_libdir}/*.so.* %files -n %{lib_name}-devel %defattr(-,root,root) %doc %{_datadir}/gtk-doc/html/gtksourceview %{_libdir}/*.so %attr(644,root,root) %{_libdir}/*.la %{_includedir}/* %{_libdir}/pkgconfig/* %changelog * Tue Aug 08 2006 Götz Waschk 1.7.2-1mdv2007.0 - New release 1.7.2 * Tue Jul 25 2006 Götz Waschk 1.7.1-1mdk - New release 1.7.1 file.svh000066400000000000000000000021011526404615400360420ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/tests/interactive-tests/syntax-highlightingclass my_class extends some_class; // This is a comment. /* This is also a comment, but it containts keywords: bit string, etc */ // Some types. string my_string = "This is a string"; bit [3:0] my_bits = 4'b0z1x; integer my_integer = 32'h0z2ab43x; real my_real = 1.2124155e-123; shortreal my_shortreal = -0.1111e1; int my_int = 53152462; extern function bit my_function( int unsigned something); endclass : my_class function bit my_class::my_function( int unsigned something); /* Display a string. * * This is a slightly awkward string as it has * special characters and line continuations. */ ("Display a string that continues over multiple lines and contains special characters: \n \t \" \'"); // Use a system task. my_int = (my_bits); // (); // Commenting a system task. // my_function(); // Commenting a function. endfunction my_function program test(); my_class c; c = new(); c.my_function(3); endprogram : test file.t2t000066400000000000000000000001511526404615400357560ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/tests/interactive-tests/syntax-highlighting! gtk-source-lang: t2t %!include ``something`` % Comment ``verbatim`` //italic// ``` verbatim block ``` file.tera000066400000000000000000000004551526404615400362070ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/tests/interactive-tests/syntax-highlighting{% extends "master" %} {% set_global number = 1.2 + 4 %} {% import "macros.tera" as macros %} {# Comment #} {{ macros::input(label="Name", type="text") }} {% set result = call_function() %} {{ type|first }}

{{ value|join(sep=",") }}

file.tex000066400000000000000000000001021526404615400360410ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/tests/interactive-tests/syntax-highlighting\documentclass{article} \begin{document} Hi there! \end{document} file.texi000066400000000000000000000012741526404615400362250ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/tests/interactive-tests/syntax-highlighting\input texinfo @setfilename manual @settitle manual @titlepage @title manual @c The following two commands start the copyright page. @page @vskip 0pt plus 1filll @insertcopying @end titlepage @c Output the table of contents at the beginning. @contents @ifnottex @node Top @top manual @insertcopying @end ifnottex @menu * MooScript:: MooScript - builtin scripting language. * Index:: Index. @end menu @node MooScript @chapter MooScript @cindex chapter, first This is the first chapter. @cindex index entry, another Here is a numbered list. @enumerate @item This is the first item. @item This is the second item. @end enumerate @node Index @unnumbered Index @printindex cp @bye file.toml000066400000000000000000000015361526404615400362300ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/tests/interactive-tests/syntax-highlighting# comment [table] key = "value - #" # " comment " lines = ''' multi lines ''' [tabel] #comment date = 1979-05-27T00:32:00.999999-07:00 #date int = 1_000 float = 6.626e-34 hex = 0xDEADBEEF oct = 0o012345 bin = 0b11010110 inf = inf # positive infinity [[more.complex."array#"]] "key" = "text" multi_line_array = [ "]", # ] commmet ] ="no key name" #not allowed [...fasd...] # INVALID [a.] # INVALID [a..b] # INVALID [.b] # INVALID [.] # INVALID [error] if you didn't catch this, your parser is broken key = # INVALID string = "after value error" like this array = [ "This might most likely happen in multiline arrays", Like here, "or here, and here" ] End of array comment, forgot the # number = 3.14 pi <--again forgot the #file.xml000066400000000000000000000001561526404615400360520ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/tests/interactive-tests/syntax-highlighting momomomo file.y000066400000000000000000000017711526404615400355260ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/tests/interactive-tests/syntax-highlighting%{ #include #define FOO_BAR(x,y) printf ("x, y") %} %name-prefix="foolala" %error-verbose %lex-param {FooLaLa *lala} %parse-param {FooLaLa *lala} /* %expect 1 */ %union { int ival; const char *str; } %token ATOKEN %token ATOKEN2 %type program stmt %type if_stmt %token IF THEN ELSE ELIF FI %token WHILE DO OD FOR IN %token CONTINUE BREAK RETURN %token EQ NEQ LE GE %token AND OR NOT %token UMINUS %token TWODOTS %left '-' '+' %left '*' '/' %left '%' %left EQ NEQ '<' '>' GE LE %left OR %left AND %left NOT %left '#' %left UMINUS %% script: program { _ms_parser_set_top_node (parser, $1); } ; program: stmt_or_error { $$ = node_list_add (parser, NULL, $1234); } | program stmt_or_error { $$ = node_list_add (parser, MS_NODE_LIST ($1), $2); } ; stmt_or_error: error ';' { $$ = NULL; } | stmt ';' { $$ = ; } ; variable: IDENTIFIER { $$ = node_var (parser, $1); } ; %% file.yml000066400000000000000000000000641526404615400360510ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/tests/interactive-tests/syntax-highlightingfoo: bar foo: # comment # fixme: also a comment gtkrc000066400000000000000000000003661526404615400354510ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/tests/interactive-tests/syntax-highlighting# -- THEME AUTO-WRITTEN DO NOT EDIT include "/usr/share/themes/Clearlooks/gtk-2.0/gtkrc" style "user-font" { font_name="Tahoma 11" } widget_class "*" style "user-font" include "/home/muntyan/.gtkrc-2.0.mine" # -- THEME AUTO-WRITTEN DO NOT EDIT meson.build000066400000000000000000000002161526404615400365500ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/tests/interactive-tests/syntax-highlightingproject('gtksourceview', 'c') glib = dependency('glib-2.0') executable( 'hello', sources : [ 'hello.c', ], dependencies : glib, ) test-completion.c000066400000000000000000000316001526404615400337100ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/tests/interactive-tests/* SPDX-FileCopyrightText: 2007 - Jesús Barbero Rodríguez * SPDX-FileCopyrightText: 2013 - Sébastien Wilmet * SPDX-License-Identifier: LGPL-2.1-or-later */ #include #include typedef struct _TestProvider TestProvider; typedef struct _TestProviderClass TestProviderClass; static GtkSourceCompletionWords *word_provider; static TestProvider *fixed_provider; static TestProvider *random_provider; struct _TestProvider { GObject parent; GList *proposals; gint priority; gchar *name; GdkPixbuf *provider_icon; GdkPixbuf *item_icon; GIcon *item_gicon; /* If it's a random provider, a subset of 'proposals' are choosen on * each populate. Otherwise, all the proposals are shown. */ guint is_random : 1; }; struct _TestProviderClass { GObjectClass parent_class; }; static void test_provider_iface_init (GtkSourceCompletionProviderIface *iface); GType test_provider_get_type (void); G_DEFINE_TYPE_WITH_CODE (TestProvider, test_provider, G_TYPE_OBJECT, G_IMPLEMENT_INTERFACE (GTK_SOURCE_TYPE_COMPLETION_PROVIDER, test_provider_iface_init)) static gchar * test_provider_get_name (GtkSourceCompletionProvider *provider) { return g_strdup (((TestProvider *)provider)->name); } static gint test_provider_get_priority (GtkSourceCompletionProvider *provider) { return ((TestProvider *)provider)->priority; } static GList * select_random_proposals (GList *all_proposals) { GList *selection = NULL; GList *prop; for (prop = all_proposals; prop != NULL; prop = g_list_next (prop)) { if (g_random_boolean ()) { selection = g_list_prepend (selection, prop->data); } } return selection; } static void test_provider_populate (GtkSourceCompletionProvider *completion_provider, GtkSourceCompletionContext *context) { TestProvider *provider = (TestProvider *)completion_provider; GList *proposals; if (provider->is_random) { proposals = select_random_proposals (provider->proposals); } else { proposals = provider->proposals; } gtk_source_completion_context_add_proposals (context, completion_provider, proposals, TRUE); } static GdkPixbuf * test_provider_get_icon (GtkSourceCompletionProvider *provider) { TestProvider *tp = (TestProvider *)provider; return tp->is_random ? NULL : tp->provider_icon; } static void test_provider_iface_init (GtkSourceCompletionProviderIface *iface) { iface->get_name = test_provider_get_name; iface->populate = test_provider_populate; iface->get_priority = test_provider_get_priority; iface->get_icon = test_provider_get_icon; } static void test_provider_dispose (GObject *gobject) { TestProvider *self = (TestProvider *)gobject; g_list_free_full (self->proposals, g_object_unref); self->proposals = NULL; g_clear_object (&self->provider_icon); g_clear_object (&self->item_icon); g_clear_object (&self->item_gicon); G_OBJECT_CLASS (test_provider_parent_class)->dispose (gobject); } static void test_provider_finalize (GObject *gobject) { TestProvider *self = (TestProvider *)gobject; g_free (self->name); self->name = NULL; G_OBJECT_CLASS (test_provider_parent_class)->finalize (gobject); } static void test_provider_class_init (TestProviderClass *klass) { GObjectClass *gobject_class = G_OBJECT_CLASS (klass); gobject_class->dispose = test_provider_dispose; gobject_class->finalize = test_provider_finalize; } static void test_provider_init (TestProvider *self) { GtkIconTheme *theme; GIcon *icon; GIcon *emblem_icon; GEmblem *emblem; theme = gtk_icon_theme_get_default (); self->provider_icon = gtk_icon_theme_load_icon (theme, "dialog-information", 16, 0, NULL); self->item_icon = gtk_icon_theme_load_icon (theme, "trophy-gold", 16, 0, NULL); icon = g_themed_icon_new ("trophy-silver"); emblem_icon = g_themed_icon_new ("emblem-urgent"); emblem = g_emblem_new (emblem_icon); self->item_gicon = g_emblemed_icon_new (icon, emblem); g_object_unref (icon); g_object_unref (emblem_icon); g_object_unref (emblem); } static void test_provider_set_fixed (TestProvider *provider, gint nb_proposals) { GtkSourceCompletionItem *item; GList *proposals = NULL; gint i; g_list_free_full (provider->proposals, g_object_unref); item = gtk_source_completion_item_new (); gtk_source_completion_item_set_markup (item, "A very long proposal. I repeat, a very long proposal!"); gtk_source_completion_item_set_text (item, "A very long proposal. I repeat, a very long proposal!"); gtk_source_completion_item_set_icon (item, provider->item_icon); gtk_source_completion_item_set_info (item, "To test the horizontal scrollbar and the markup."); proposals = g_list_prepend (proposals, item); item = gtk_source_completion_item_new (); gtk_source_completion_item_set_markup (item, "A proposal with a symbolic icon"); gtk_source_completion_item_set_text (item, "Test setting the icon-name property"); gtk_source_completion_item_set_icon_name (item, "face-cool-symbolic"); proposals = g_list_prepend (proposals, item); item = gtk_source_completion_item_new (); gtk_source_completion_item_set_markup (item, "A proposal with an emblem GIcon"); gtk_source_completion_item_set_text (item, "Test setting the GIcon property"); gtk_source_completion_item_set_gicon (item, provider->item_gicon); proposals = g_list_prepend (proposals, item); for (i = nb_proposals - 1; i > 0; i--) { gchar *name = g_strdup_printf ("Proposal %d", i); item = gtk_source_completion_item_new (); gtk_source_completion_item_set_label (item, name); gtk_source_completion_item_set_text (item, name); gtk_source_completion_item_set_icon (item, provider->item_icon); gtk_source_completion_item_set_info (item, "The extra info of the proposal.\nA second line."); proposals = g_list_prepend (proposals, item); g_free (name); } provider->proposals = proposals; provider->is_random = 0; } static void test_provider_set_random (TestProvider *provider, gint nb_proposals) { GList *proposals = NULL; gint i; g_list_free_full (provider->proposals, g_object_unref); for (i = 0; i < nb_proposals; i++) { GtkSourceCompletionItem *item; gchar *padding = g_strnfill ((i * 3) % 10, 'o'); gchar *name = g_strdup_printf ("Propo%ssal %d", padding, i); item = gtk_source_completion_item_new (); gtk_source_completion_item_set_label (item, name); gtk_source_completion_item_set_text (item, name); gtk_source_completion_item_set_icon (item, provider->item_icon); proposals = g_list_prepend (proposals, item); g_free (padding); g_free (name); } provider->proposals = proposals; provider->is_random = 1; } static void add_remove_provider (GtkToggleButton *button, GtkSourceCompletion *completion, GtkSourceCompletionProvider *provider) { g_return_if_fail (provider != NULL); if (gtk_toggle_button_get_active (button)) { gtk_source_completion_add_provider (completion, provider, NULL); } else { gtk_source_completion_remove_provider (completion, provider, NULL); } } static void enable_word_provider_toggled_cb (GtkToggleButton *button, GtkSourceCompletion *completion) { add_remove_provider (button, completion, GTK_SOURCE_COMPLETION_PROVIDER (word_provider)); } static void enable_fixed_provider_toggled_cb (GtkToggleButton *button, GtkSourceCompletion *completion) { add_remove_provider (button, completion, GTK_SOURCE_COMPLETION_PROVIDER (fixed_provider)); } static void enable_random_provider_toggled_cb (GtkToggleButton *button, GtkSourceCompletion *completion) { add_remove_provider (button, completion, GTK_SOURCE_COMPLETION_PROVIDER (random_provider)); } static void nb_proposals_changed_cb (GtkSpinButton *spin_button, TestProvider *provider) { gint nb_proposals = gtk_spin_button_get_value_as_int (spin_button); if (provider->is_random) { test_provider_set_random (provider, nb_proposals); } else { test_provider_set_fixed (provider, nb_proposals); } } static void create_completion (GtkSourceView *source_view, GtkSourceCompletion *completion) { /* Words completion provider */ word_provider = gtk_source_completion_words_new (NULL, NULL); gtk_source_completion_words_register (word_provider, gtk_text_view_get_buffer (GTK_TEXT_VIEW (source_view))); gtk_source_completion_add_provider (completion, GTK_SOURCE_COMPLETION_PROVIDER (word_provider), NULL); g_object_set (word_provider, "priority", 10, NULL); /* Fixed provider: the proposals don't change */ fixed_provider = g_object_new (test_provider_get_type (), NULL); test_provider_set_fixed (fixed_provider, 3); fixed_provider->priority = 5; fixed_provider->name = g_strdup ("Fixed Provider"); gtk_source_completion_add_provider (completion, GTK_SOURCE_COMPLETION_PROVIDER (fixed_provider), NULL); /* Random provider: the proposals vary on each populate */ random_provider = g_object_new (test_provider_get_type (), NULL); test_provider_set_random (random_provider, 10); random_provider->priority = 1; random_provider->name = g_strdup ("Random Provider"); gtk_source_completion_add_provider (completion, GTK_SOURCE_COMPLETION_PROVIDER (random_provider), NULL); } static void create_window (void) { GtkBuilder *builder; GError *error = NULL; GtkWindow *window; GtkSourceView *source_view; GtkSourceCompletion *completion; GtkCheckButton *remember_info_visibility; GtkCheckButton *select_on_show; GtkCheckButton *show_headers; GtkCheckButton *show_icons; GtkCheckButton *enable_word_provider; GtkCheckButton *enable_fixed_provider; GtkCheckButton *enable_random_provider; GtkSpinButton *nb_fixed_proposals; GtkSpinButton *nb_random_proposals; builder = gtk_builder_new (); gtk_builder_add_from_resource (builder, "/org/gnome/gtksourceview/tests/ui/test-completion.ui", &error); if (error != NULL) { g_error ("Impossible to load test-completion.ui: %s", error->message); } window = GTK_WINDOW (gtk_builder_get_object (builder, "window")); source_view = GTK_SOURCE_VIEW (gtk_builder_get_object (builder, "source_view")); remember_info_visibility = GTK_CHECK_BUTTON (gtk_builder_get_object (builder, "checkbutton_remember_info_visibility")); select_on_show = GTK_CHECK_BUTTON (gtk_builder_get_object (builder, "checkbutton_select_on_show")); show_headers = GTK_CHECK_BUTTON (gtk_builder_get_object (builder, "checkbutton_show_headers")); show_icons = GTK_CHECK_BUTTON (gtk_builder_get_object (builder, "checkbutton_show_icons")); enable_word_provider = GTK_CHECK_BUTTON (gtk_builder_get_object (builder, "checkbutton_word_provider")); enable_fixed_provider = GTK_CHECK_BUTTON (gtk_builder_get_object (builder, "checkbutton_fixed_provider")); enable_random_provider = GTK_CHECK_BUTTON (gtk_builder_get_object (builder, "checkbutton_random_provider")); nb_fixed_proposals = GTK_SPIN_BUTTON (gtk_builder_get_object (builder, "spinbutton_nb_fixed_proposals")); nb_random_proposals = GTK_SPIN_BUTTON (gtk_builder_get_object (builder, "spinbutton_nb_random_proposals")); completion = gtk_source_view_get_completion (source_view); g_signal_connect (window, "destroy", G_CALLBACK (gtk_main_quit), NULL); g_object_bind_property (completion, "remember-info-visibility", remember_info_visibility, "active", G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL); g_object_bind_property (completion, "select-on-show", select_on_show, "active", G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL); g_object_bind_property (completion, "show-headers", show_headers, "active", G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL); g_object_bind_property (completion, "show-icons", show_icons, "active", G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL); create_completion (source_view, completion); g_signal_connect (enable_word_provider, "toggled", G_CALLBACK (enable_word_provider_toggled_cb), completion); g_signal_connect (enable_fixed_provider, "toggled", G_CALLBACK (enable_fixed_provider_toggled_cb), completion); g_signal_connect (enable_random_provider, "toggled", G_CALLBACK (enable_random_provider_toggled_cb), completion); g_signal_connect (nb_fixed_proposals, "value-changed", G_CALLBACK (nb_proposals_changed_cb), fixed_provider); g_signal_connect (nb_random_proposals, "value-changed", G_CALLBACK (nb_proposals_changed_cb), random_provider); g_object_unref (builder); } int main (int argc, char *argv[]) { gtk_init (&argc, &argv); create_window (); gtk_main (); /* Not really useful, except for debugging memory leaks. */ g_object_unref (word_provider); g_object_unref (fixed_provider); g_object_unref (random_provider); return 0; } test-completion.gresource.xml000066400000000000000000000003131526404615400362600ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/tests/interactive-tests test-completion.ui test-completion.ui000066400000000000000000000414651526404615400341150ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/tests/interactive-tests 100000 3 1 10 100000 10 1 10 True False True False 6 10 True False 5 True False 10 Remember info visibility True True False True 0 0 1 1 Select first on show True True False True 0 1 1 1 Show headers True True False True 0 2 1 1 Show icons True True False True 0 3 1 1 0 1 1 1 True False start Providers 0 2 1 1 True False start General options 0 0 1 1 True False 10 Word provider True True False True True 0 0 1 1 Fixed provider True True False True True 0 1 1 1 Random provider True True False True True 0 2 1 1 0 3 1 1 True False start Fixed provider proposals 0 4 1 1 True False 10 True False 5 True False Number of proposals: 0 0 1 1 True True 3 adjustment1 3 1 0 1 1 0 0 1 1 0 5 1 1 True False start Random provider proposals 0 6 1 1 True False 10 5 True False Max number of proposals: 0 0 1 1 True True adjustment2 10 1 0 1 1 0 7 1 1 0 0 1 1 600 True True in True True True True 2 2 True True 1 0 1 1 test-search-performances.c000066400000000000000000000170431526404615400354730ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/tests/interactive-tests/* SPDX-FileCopyrightText: 2013 - Sébastien Wilmet * SPDX-License-Identifier: LGPL-2.1-or-later */ #include #include /* This measures the execution times for: * - basic search: with gtk_text_iter_forward_search(); * - "smart" search: the first search with gtk_text_iter_forward_search(), later * searches with gtk_text_iter_forward_to_tag_toggle(); * - regex search. * * For the "smart" search, only the first search is measured. Later searches * are really fast (going to the previous/next occurrence is done in O(log n)). * Different search flags are also tested. We can see a big difference between * the case sensitive search and case insensitive. */ #define NB_LINES 100000 static void on_notify_search_occurrences_count_cb (GtkSourceSearchContext *search_context, GParamSpec *spec, GTimer *timer) { g_print ("smart asynchronous search, case sensitive: %lf seconds.\n", g_timer_elapsed (timer, NULL)); gtk_main_quit (); } int main (int argc, char *argv[]) { GtkSourceBuffer *buffer; GtkSourceSearchContext *search_context; GtkSourceSearchSettings *search_settings; GtkTextIter iter; GtkTextIter match_end; GTimer *timer; gint i; GtkTextSearchFlags flags; gchar *regex_pattern; gtk_init (&argc, &argv); buffer = gtk_source_buffer_new (NULL); gtk_text_buffer_get_start_iter (GTK_TEXT_BUFFER (buffer), &iter); for (i = 0; i < NB_LINES; i++) { gtk_text_buffer_insert (GTK_TEXT_BUFFER (buffer), &iter, "A line of text to fill the text buffer. Is it long enough?\n", -1); } gtk_text_buffer_insert (GTK_TEXT_BUFFER (buffer), &iter, "foo\n", -1); /* Basic search, no flags */ timer = g_timer_new (); gtk_text_buffer_get_start_iter (GTK_TEXT_BUFFER (buffer), &iter); flags = 0; while (gtk_text_iter_forward_search (&iter, "foo", flags, NULL, &match_end, NULL)) { iter = match_end; } g_timer_stop (timer); g_print ("basic forward search, no flags: %lf seconds.\n", g_timer_elapsed (timer, NULL)); /* Basic search, with flags always enabled by gsv */ g_timer_start (timer); gtk_text_buffer_get_start_iter (GTK_TEXT_BUFFER (buffer), &iter); flags = GTK_TEXT_SEARCH_VISIBLE_ONLY | GTK_TEXT_SEARCH_TEXT_ONLY; while (gtk_text_iter_forward_search (&iter, "foo", flags, NULL, &match_end, NULL)) { iter = match_end; } g_timer_stop (timer); g_print ("basic forward search, visible and text only flags: %lf seconds.\n", g_timer_elapsed (timer, NULL)); /* Basic search, with default flags in gsv */ g_timer_start (timer); gtk_text_buffer_get_start_iter (GTK_TEXT_BUFFER (buffer), &iter); flags = GTK_TEXT_SEARCH_VISIBLE_ONLY | GTK_TEXT_SEARCH_TEXT_ONLY | GTK_TEXT_SEARCH_CASE_INSENSITIVE; while (gtk_text_iter_forward_search (&iter, "foo", flags, NULL, &match_end, NULL)) { iter = match_end; } g_timer_stop (timer); g_print ("basic forward search, all flags: %lf seconds.\n", g_timer_elapsed (timer, NULL)); /* Smart forward search, with default flags in gsv */ search_settings = gtk_source_search_settings_new (); search_context = gtk_source_search_context_new (buffer, search_settings); g_timer_start (timer); gtk_source_search_settings_set_search_text (search_settings, "foo"); gtk_text_buffer_get_start_iter (GTK_TEXT_BUFFER (buffer), &iter); while (gtk_source_search_context_forward (search_context, &iter, NULL, &match_end, NULL)) { iter = match_end; } g_timer_stop (timer); g_print ("smart synchronous forward search, case insensitive: %lf seconds.\n", g_timer_elapsed (timer, NULL)); /* Smart forward search, case sensitive */ g_timer_start (timer); gtk_source_search_settings_set_search_text (search_settings, NULL); gtk_source_search_settings_set_case_sensitive (search_settings, TRUE); gtk_source_search_settings_set_search_text (search_settings, "foo"); gtk_text_buffer_get_start_iter (GTK_TEXT_BUFFER (buffer), &iter); while (gtk_source_search_context_forward (search_context, &iter, NULL, &match_end, NULL)) { iter = match_end; } g_timer_stop (timer); g_print ("smart synchronous forward search, case sensitive: %lf seconds.\n", g_timer_elapsed (timer, NULL)); /* Regex search: search "foo" */ g_timer_start (timer); gtk_source_search_settings_set_search_text (search_settings, NULL); gtk_source_search_settings_set_regex_enabled (search_settings, TRUE); gtk_source_search_settings_set_search_text (search_settings, "foo"); gtk_text_buffer_get_start_iter (GTK_TEXT_BUFFER (buffer), &iter); while (gtk_source_search_context_forward (search_context, &iter, NULL, &match_end, NULL)) { iter = match_end; } g_timer_stop (timer); g_print ("regex search: 'foo' (no partial matches): %lf seconds.\n", g_timer_elapsed (timer, NULL)); /* Regex search: search "fill" */ g_timer_start (timer); gtk_source_search_settings_set_search_text (search_settings, "fill"); gtk_text_buffer_get_start_iter (GTK_TEXT_BUFFER (buffer), &iter); while (gtk_source_search_context_forward (search_context, &iter, NULL, &match_end, NULL)) { iter = match_end; } g_timer_stop (timer); g_print ("regex search: 'fill' (no partial matches): %lf seconds.\n", g_timer_elapsed (timer, NULL)); /* Regex search: search single lines */ g_timer_start (timer); gtk_source_search_settings_set_search_text (search_settings, ".*"); gtk_text_buffer_get_start_iter (GTK_TEXT_BUFFER (buffer), &iter); while (gtk_source_search_context_forward (search_context, &iter, NULL, &match_end, NULL)) { iter = match_end; } g_timer_stop (timer); g_print ("regex search: match single lines (no partial matches): %lf seconds.\n", g_timer_elapsed (timer, NULL)); /* Regex search: search matches of 3 lines */ g_timer_start (timer); /* The space at the beginning of the pattern permits to not have contiguous * matches. There is a performance issue with contiguous matches. */ gtk_source_search_settings_set_search_text (search_settings, " (.*\n){3}"); gtk_text_buffer_get_start_iter (GTK_TEXT_BUFFER (buffer), &iter); while (gtk_source_search_context_forward (search_context, &iter, NULL, &match_end, NULL)) { iter = match_end; } g_timer_stop (timer); g_print ("regex search: matches of 3 lines (small partial matches): %lf seconds.\n", g_timer_elapsed (timer, NULL)); /* Regex search: search matches of really big chunks */ g_timer_start (timer); regex_pattern = g_strdup_printf (" (.*\n){%d}", NB_LINES / 10); gtk_source_search_settings_set_search_text (search_settings, regex_pattern); g_free (regex_pattern); gtk_text_buffer_get_start_iter (GTK_TEXT_BUFFER (buffer), &iter); while (gtk_source_search_context_forward (search_context, &iter, NULL, &match_end, NULL)) { iter = match_end; } g_timer_stop (timer); g_print ("regex search: 10 matches of %d lines (big partial matches): %lf seconds.\n", NB_LINES / 10, g_timer_elapsed (timer, NULL)); /* Smart search, case sensitive, asynchronous */ /* The asynchronous overhead doesn't depend on the search flags, it * depends on the maximum number of lines to scan in one batch, and * (obviously), on the buffer size. * You can tune SCAN_BATCH_SIZE in gtksourcesearchcontext.c to see a * difference in the overhead. */ g_signal_connect (search_context, "notify::occurrences-count", G_CALLBACK (on_notify_search_occurrences_count_cb), timer); g_timer_start (timer); gtk_source_search_settings_set_search_text (search_settings, NULL); gtk_source_search_settings_set_regex_enabled (search_settings, FALSE); gtk_source_search_settings_set_search_text (search_settings, "foo"); gtk_main (); return 0; } test-search.c000066400000000000000000000316571526404615400330200ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/tests/interactive-tests/* SPDX-FileCopyrightText: 2013 - Sébastien Wilmet * SPDX-License-Identifier: LGPL-2.1-or-later */ #include #include #define TEST_TYPE_SEARCH (test_search_get_type ()) #define TEST_SEARCH(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TEST_TYPE_SEARCH, TestSearch)) #define TEST_SEARCH_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TEST_TYPE_SEARCH, TestSearchClass)) #define TEST_IS_SEARCH(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TEST_TYPE_SEARCH)) #define TEST_IS_SEARCH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TEST_TYPE_SEARCH)) #define TEST_SEARCH_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TEST_TYPE_SEARCH, TestSearchClass)) typedef struct _TestSearch TestSearch; typedef struct _TestSearchClass TestSearchClass; typedef struct _TestSearchPrivate TestSearchPrivate; struct _TestSearch { GtkGrid parent; TestSearchPrivate *priv; }; struct _TestSearchClass { GtkGridClass parent_class; }; struct _TestSearchPrivate { GtkSourceView *source_view; GtkSourceBuffer *source_buffer; GtkSourceSearchContext *search_context; GtkSourceSearchSettings *search_settings; GtkEntry *replace_entry; GtkLabel *label_occurrences; GtkLabel *label_regex_error; guint idle_update_label_id; }; GType test_search_get_type (void); G_DEFINE_TYPE_WITH_PRIVATE (TestSearch, test_search, GTK_TYPE_GRID) static void open_file (TestSearch *search, const gchar *filename) { gchar *contents; GError *error = NULL; GtkSourceLanguageManager *language_manager; GtkSourceLanguage *language; GtkTextIter iter; /* In a realistic application you would use GtkSourceFile of course. */ if (!g_file_get_contents (filename, &contents, NULL, &error)) { g_error ("Impossible to load file: %s", error->message); } gtk_text_buffer_set_text (GTK_TEXT_BUFFER (search->priv->source_buffer), contents, -1); language_manager = gtk_source_language_manager_get_default (); language = gtk_source_language_manager_get_language (language_manager, "c"); gtk_source_buffer_set_language (search->priv->source_buffer, language); gtk_text_buffer_get_start_iter (GTK_TEXT_BUFFER (search->priv->source_buffer), &iter); gtk_text_buffer_select_range (GTK_TEXT_BUFFER (search->priv->source_buffer), &iter, &iter); g_free (contents); } static void update_label_occurrences (TestSearch *search) { gint occurrences_count; GtkTextIter select_start; GtkTextIter select_end; gint occurrence_pos; gchar *text; occurrences_count = gtk_source_search_context_get_occurrences_count (search->priv->search_context); gtk_text_buffer_get_selection_bounds (GTK_TEXT_BUFFER (search->priv->source_buffer), &select_start, &select_end); occurrence_pos = gtk_source_search_context_get_occurrence_position (search->priv->search_context, &select_start, &select_end); if (occurrences_count == -1) { text = g_strdup (""); } else if (occurrence_pos == -1) { text = g_strdup_printf ("%u occurrences", occurrences_count); } else { text = g_strdup_printf ("%d of %u", occurrence_pos, occurrences_count); } gtk_label_set_text (search->priv->label_occurrences, text); g_free (text); } static void update_label_regex_error (TestSearch *search) { GError *error; error = gtk_source_search_context_get_regex_error (search->priv->search_context); if (error == NULL) { gtk_label_set_text (search->priv->label_regex_error, ""); gtk_widget_hide (GTK_WIDGET (search->priv->label_regex_error)); } else { gtk_label_set_text (search->priv->label_regex_error, error->message); gtk_widget_show (GTK_WIDGET (search->priv->label_regex_error)); g_clear_error (&error); } } static void search_entry_changed_cb (TestSearch *search, GtkEntry *entry) { const gchar *text = gtk_entry_get_text (entry); gchar *unescaped_text = gtk_source_utils_unescape_search_text (text); gtk_source_search_settings_set_search_text (search->priv->search_settings, unescaped_text); g_free (unescaped_text); } static void select_search_occurrence (TestSearch *search, const GtkTextIter *match_start, const GtkTextIter *match_end) { GtkTextMark *insert; gtk_text_buffer_select_range (GTK_TEXT_BUFFER (search->priv->source_buffer), match_start, match_end); insert = gtk_text_buffer_get_insert (GTK_TEXT_BUFFER (search->priv->source_buffer)); gtk_text_view_scroll_mark_onscreen (GTK_TEXT_VIEW (search->priv->source_view), insert); } static void backward_search_finished (GtkSourceSearchContext *search_context, GAsyncResult *result, TestSearch *search) { GtkTextIter match_start; GtkTextIter match_end; if (gtk_source_search_context_backward_finish (search_context, result, &match_start, &match_end, NULL, NULL)) { select_search_occurrence (search, &match_start, &match_end); } } static void button_previous_clicked_cb (TestSearch *search, GtkButton *button) { GtkTextIter start_at; gtk_text_buffer_get_selection_bounds (GTK_TEXT_BUFFER (search->priv->source_buffer), &start_at, NULL); gtk_source_search_context_backward_async (search->priv->search_context, &start_at, NULL, (GAsyncReadyCallback)backward_search_finished, search); } static void forward_search_finished (GtkSourceSearchContext *search_context, GAsyncResult *result, TestSearch *search) { GtkTextIter match_start; GtkTextIter match_end; if (gtk_source_search_context_forward_finish (search_context, result, &match_start, &match_end, NULL, NULL)) { select_search_occurrence (search, &match_start, &match_end); } } static void button_next_clicked_cb (TestSearch *search, GtkButton *button) { GtkTextIter start_at; gtk_text_buffer_get_selection_bounds (GTK_TEXT_BUFFER (search->priv->source_buffer), NULL, &start_at); gtk_source_search_context_forward_async (search->priv->search_context, &start_at, NULL, (GAsyncReadyCallback)forward_search_finished, search); } static void button_replace_clicked_cb (TestSearch *search, GtkButton *button) { GtkTextIter match_start; GtkTextIter match_end; GtkTextIter iter; GtkEntryBuffer *entry_buffer; gint replace_length; gtk_text_buffer_get_selection_bounds (GTK_TEXT_BUFFER (search->priv->source_buffer), &match_start, &match_end); entry_buffer = gtk_entry_get_buffer (search->priv->replace_entry); replace_length = gtk_entry_buffer_get_bytes (entry_buffer); gtk_source_search_context_replace (search->priv->search_context, &match_start, &match_end, gtk_entry_get_text (search->priv->replace_entry), replace_length, NULL); gtk_text_buffer_get_selection_bounds (GTK_TEXT_BUFFER (search->priv->source_buffer), NULL, &iter); gtk_source_search_context_forward_async (search->priv->search_context, &iter, NULL, (GAsyncReadyCallback)forward_search_finished, search); } static void button_replace_all_clicked_cb (TestSearch *search, GtkButton *button) { GtkEntryBuffer *entry_buffer = gtk_entry_get_buffer (search->priv->replace_entry); gint replace_length = gtk_entry_buffer_get_bytes (entry_buffer); gtk_source_search_context_replace_all (search->priv->search_context, gtk_entry_get_text (search->priv->replace_entry), replace_length, NULL); } static gboolean update_label_idle_cb (TestSearch *search) { search->priv->idle_update_label_id = 0; update_label_occurrences (search); return G_SOURCE_REMOVE; } static void mark_set_cb (GtkTextBuffer *buffer, GtkTextIter *location, GtkTextMark *mark, TestSearch *search) { GtkTextMark *insert; GtkTextMark *selection_bound; insert = gtk_text_buffer_get_insert (buffer); selection_bound = gtk_text_buffer_get_selection_bound (buffer); if ((mark == insert || mark == selection_bound) && search->priv->idle_update_label_id == 0) { search->priv->idle_update_label_id = g_idle_add ((GSourceFunc)update_label_idle_cb, search); } } static void highlight_toggled_cb (TestSearch *search, GtkToggleButton *button) { gtk_source_search_context_set_highlight (search->priv->search_context, gtk_toggle_button_get_active (button)); } static void match_case_toggled_cb (TestSearch *search, GtkToggleButton *button) { gtk_source_search_settings_set_case_sensitive (search->priv->search_settings, gtk_toggle_button_get_active (button)); } static void at_word_boundaries_toggled_cb (TestSearch *search, GtkToggleButton *button) { gtk_source_search_settings_set_at_word_boundaries (search->priv->search_settings, gtk_toggle_button_get_active (button)); } static void wrap_around_toggled_cb (TestSearch *search, GtkToggleButton *button) { gtk_source_search_settings_set_wrap_around (search->priv->search_settings, gtk_toggle_button_get_active (button)); } static void regex_toggled_cb (TestSearch *search, GtkToggleButton *button) { gtk_source_search_settings_set_regex_enabled (search->priv->search_settings, gtk_toggle_button_get_active (button)); } static void test_search_dispose (GObject *object) { TestSearch *search = TEST_SEARCH (object); g_clear_object (&search->priv->source_buffer); g_clear_object (&search->priv->search_context); g_clear_object (&search->priv->search_settings); G_OBJECT_CLASS (test_search_parent_class)->dispose (object); } static void test_search_class_init (TestSearchClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass); object_class->dispose = test_search_dispose; gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/gtksourceview/tests/ui/test-search.ui"); gtk_widget_class_bind_template_child_private (widget_class, TestSearch, source_view); gtk_widget_class_bind_template_child_private (widget_class, TestSearch, replace_entry); gtk_widget_class_bind_template_child_private (widget_class, TestSearch, label_occurrences); gtk_widget_class_bind_template_child_private (widget_class, TestSearch, label_regex_error); gtk_widget_class_bind_template_callback (widget_class, search_entry_changed_cb); gtk_widget_class_bind_template_callback (widget_class, button_previous_clicked_cb); gtk_widget_class_bind_template_callback (widget_class, button_next_clicked_cb); gtk_widget_class_bind_template_callback (widget_class, button_replace_clicked_cb); gtk_widget_class_bind_template_callback (widget_class, button_replace_all_clicked_cb); /* It is also possible to bind the properties with * g_object_bind_property(), between the check buttons and the source * buffer. But GtkBuilder and Glade don't support that yet. */ gtk_widget_class_bind_template_callback (widget_class, highlight_toggled_cb); gtk_widget_class_bind_template_callback (widget_class, match_case_toggled_cb); gtk_widget_class_bind_template_callback (widget_class, at_word_boundaries_toggled_cb); gtk_widget_class_bind_template_callback (widget_class, wrap_around_toggled_cb); gtk_widget_class_bind_template_callback (widget_class, regex_toggled_cb); } static void test_search_init (TestSearch *search) { search->priv = test_search_get_instance_private (search); gtk_widget_init_template (GTK_WIDGET (search)); search->priv->source_buffer = GTK_SOURCE_BUFFER ( gtk_text_view_get_buffer (GTK_TEXT_VIEW (search->priv->source_view))); g_object_ref (search->priv->source_buffer); open_file (search, TOP_SRCDIR "/gtksourceview/gtksourcesearchcontext.c"); search->priv->search_settings = gtk_source_search_settings_new (); search->priv->search_context = gtk_source_search_context_new (search->priv->source_buffer, search->priv->search_settings); g_signal_connect_swapped (search->priv->search_context, "notify::occurrences-count", G_CALLBACK (update_label_occurrences), search); g_signal_connect (search->priv->source_buffer, "mark-set", G_CALLBACK (mark_set_cb), search); g_signal_connect_swapped (search->priv->search_context, "notify::regex-error", G_CALLBACK (update_label_regex_error), search); update_label_regex_error (search); } static TestSearch * test_search_new (void) { return g_object_new (test_search_get_type (), NULL); } int main (int argc, char **argv) { GtkWidget *window; TestSearch *search; gtk_init (&argc, &argv); gtk_source_init (); window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_window_set_default_size (GTK_WINDOW (window), 700, 500); g_signal_connect (window, "destroy", G_CALLBACK (gtk_main_quit), NULL); search = test_search_new (); gtk_container_add (GTK_CONTAINER (window), GTK_WIDGET (search)); gtk_widget_show (window); gtk_main (); gtk_source_finalize (); return 0; } test-search.gresource.xml000066400000000000000000000003071526404615400353570ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/tests/interactive-tests test-search.ui test-search.ui000066400000000000000000000347311526404615400332070ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/tests/interactive-tests True False go-up 1 True False go-down 1 True False edit-find-replace 1 True False edit-find-replace 1 test-space-drawing.c000066400000000000000000000105571526404615400342730ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/tests/interactive-tests/* SPDX-FileCopyrightText: 2015 - Université Catholique de Louvain * SPDX-License-Identifier: LGPL-2.1-or-later * * Author: Sébastien Wilmet */ #include static void fill_buffer (GtkTextBuffer *buffer, GtkTextTag *tag) { GtkTextIter iter; gtk_text_buffer_set_text (buffer, "", 0); gtk_text_buffer_get_start_iter (buffer, &iter); gtk_text_buffer_insert (buffer, &iter, "---\n" "\tText without draw-spaces tag.\n" "\tNon-breaking whitespace: .\n" "\tTrailing spaces.\t  \n" "---\n\n", -1); gtk_text_buffer_insert_with_tags (buffer, &iter, "---\n" "\tText with draw-spaces tag.\n" "\tNon-breaking whitespace: .\n" "\tTrailing spaces.\t  \n" "---", -1, tag, NULL); } static void create_window (void) { GtkWidget *window; GtkWidget *hgrid; GtkWidget *panel_grid; GtkWidget *scrolled_window; GtkWidget *matrix_checkbutton; GtkWidget *tag_set_checkbutton; GtkWidget *tag_checkbutton; GtkWidget *implicit_trailing_newline_checkbutton; GtkSourceView *view; GtkSourceBuffer *buffer; GtkTextTag *tag; GtkSourceSpaceDrawer *space_drawer; window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_window_set_default_size (GTK_WINDOW (window), 800, 600); g_signal_connect (window, "destroy", gtk_main_quit, NULL); hgrid = gtk_grid_new (); gtk_orientable_set_orientation (GTK_ORIENTABLE (hgrid), GTK_ORIENTATION_HORIZONTAL); view = GTK_SOURCE_VIEW (gtk_source_view_new ()); g_object_set (view, "expand", TRUE, NULL); gtk_text_view_set_monospace (GTK_TEXT_VIEW (view), TRUE); buffer = GTK_SOURCE_BUFFER (gtk_text_view_get_buffer (GTK_TEXT_VIEW (view))); tag = gtk_source_buffer_create_source_tag (buffer, NULL, "draw-spaces", FALSE, NULL); fill_buffer (GTK_TEXT_BUFFER (buffer), tag); space_drawer = gtk_source_view_get_space_drawer (view); gtk_source_space_drawer_set_types_for_locations (space_drawer, GTK_SOURCE_SPACE_LOCATION_ALL, GTK_SOURCE_SPACE_TYPE_NBSP); gtk_source_space_drawer_set_types_for_locations (space_drawer, GTK_SOURCE_SPACE_LOCATION_TRAILING, GTK_SOURCE_SPACE_TYPE_ALL); panel_grid = gtk_grid_new (); gtk_orientable_set_orientation (GTK_ORIENTABLE (panel_grid), GTK_ORIENTATION_VERTICAL); gtk_container_add (GTK_CONTAINER (hgrid), panel_grid); gtk_grid_set_row_spacing (GTK_GRID (panel_grid), 6); g_object_set (panel_grid, "margin", 6, NULL); matrix_checkbutton = gtk_check_button_new_with_label ("GtkSourceSpaceDrawer enable-matrix"); gtk_container_add (GTK_CONTAINER (panel_grid), matrix_checkbutton); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (matrix_checkbutton), TRUE); g_object_bind_property (matrix_checkbutton, "active", space_drawer, "enable-matrix", G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE); tag_set_checkbutton = gtk_check_button_new_with_label ("GtkSourceTag draw-spaces-set"); gtk_container_add (GTK_CONTAINER (panel_grid), tag_set_checkbutton); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (tag_set_checkbutton), TRUE); g_object_bind_property (tag_set_checkbutton, "active", tag, "draw-spaces-set", G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE); tag_checkbutton = gtk_check_button_new_with_label ("GtkSourceTag draw-spaces"); gtk_container_add (GTK_CONTAINER (panel_grid), tag_checkbutton); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (tag_checkbutton), FALSE); g_object_bind_property (tag_checkbutton, "active", tag, "draw-spaces", G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE); implicit_trailing_newline_checkbutton = gtk_check_button_new_with_label ("Implicit trailing newline"); gtk_widget_set_margin_top (implicit_trailing_newline_checkbutton, 12); gtk_container_add (GTK_CONTAINER (panel_grid), implicit_trailing_newline_checkbutton); g_object_bind_property (buffer, "implicit-trailing-newline", implicit_trailing_newline_checkbutton, "active", G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE); scrolled_window = gtk_scrolled_window_new (NULL, NULL); gtk_container_add (GTK_CONTAINER (scrolled_window), GTK_WIDGET (view)); gtk_container_add (GTK_CONTAINER (hgrid), scrolled_window); gtk_container_add (GTK_CONTAINER (window), hgrid); gtk_widget_show_all (window); } gint main (gint argc, gchar **argv) { gtk_init (&argc, &argv); create_window (); gtk_main (); return 0; } test-undo-manager-performances.c000066400000000000000000000033601526404615400366000ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/tests/interactive-tests/* SPDX-FileCopyrightText: 2014 - Sébastien Wilmet * SPDX-License-Identifier: LGPL-2.1-or-later */ #include #define NB_LINES 100000 /* Returns the number of undo's. */ static gint test_undo_redo (GtkSourceBuffer *buffer, gint max_actions) { gint nb_actions; gint i; for (nb_actions = 0; nb_actions < max_actions; nb_actions++) { if (gtk_source_buffer_can_undo (buffer)) { gtk_source_buffer_undo (buffer); } else { break; } } for (i = 0; i < nb_actions; i++) { g_assert (gtk_source_buffer_can_redo (buffer)); gtk_source_buffer_redo (buffer); } return nb_actions; } gint main (gint argc, gchar **argv) { GtkSourceBuffer *source_buffer; GtkTextBuffer *text_buffer; GtkTextIter iter; GTimer *timer; gint nb_actions; gint i; gtk_init (&argc, &argv); source_buffer = gtk_source_buffer_new (NULL); text_buffer = GTK_TEXT_BUFFER (source_buffer); gtk_text_buffer_get_start_iter (text_buffer, &iter); for (i = 0; i < NB_LINES; i++) { gtk_text_buffer_begin_user_action (text_buffer); gtk_text_buffer_insert (text_buffer, &iter, "A line of text to fill the text buffer. Is it long enough?\n", -1); gtk_text_buffer_end_user_action (text_buffer); } timer = g_timer_new (); nb_actions = test_undo_redo (source_buffer, NB_LINES / 10); g_timer_stop (timer); g_print ("Undo/Redo %d actions: %lf seconds.\n", nb_actions, g_timer_elapsed (timer, NULL)); g_timer_start (timer); nb_actions = test_undo_redo (source_buffer, NB_LINES); g_timer_stop (timer); g_print ("Undo/Redo %d actions: %lf seconds.\n", nb_actions, g_timer_elapsed (timer, NULL)); g_object_unref (source_buffer); g_timer_destroy (timer); return 0; } test-widget.c000066400000000000000000000672621526404615400330370ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/tests/interactive-tests/* SPDX-FileCopyrightText: 2001 - Mikael Hermansson * SPDX-FileCopyrightText: 2003 - Gustavo Giráldez * SPDX-FileCopyrightText: 2014 - Sébastien Wilmet * SPDX-License-Identifier: LGPL-2.1-or-later */ #include #include #define TEST_TYPE_WIDGET (test_widget_get_type ()) #define TEST_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TEST_TYPE_WIDGET, TestWidget)) #define TEST_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TEST_TYPE_WIDGET, TestWidgetClass)) #define TEST_IS_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TEST_TYPE_WIDGET)) #define TEST_IS_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TEST_TYPE_WIDGET)) #define TEST_WIDGET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TEST_TYPE_WIDGET, TestWidgetClass)) typedef struct _TestWidget TestWidget; typedef struct _TestWidgetClass TestWidgetClass; typedef struct _TestWidgetPrivate TestWidgetPrivate; struct _TestWidget { GtkGrid parent; TestWidgetPrivate *priv; }; struct _TestWidgetClass { GtkGridClass parent_class; }; struct _TestWidgetPrivate { GtkSourceView *view; GtkSourceBuffer *buffer; GtkSourceFile *file; GtkCheckButton *show_top_border_window_checkbutton; GtkCheckButton *draw_spaces_checkbutton; GtkCheckButton *smart_backspace_checkbutton; GtkCheckButton *indent_width_checkbutton; GtkSpinButton *indent_width_spinbutton; GtkLabel *cursor_position_info; }; GType test_widget_get_type (void); G_DEFINE_TYPE_WITH_PRIVATE (TestWidget, test_widget, GTK_TYPE_GRID) #define MARK_TYPE_1 "one" #define MARK_TYPE_2 "two" static void remove_all_marks (GtkSourceBuffer *buffer) { GtkTextIter start; GtkTextIter end; gtk_text_buffer_get_bounds (GTK_TEXT_BUFFER (buffer), &start, &end); gtk_source_buffer_remove_source_marks (buffer, &start, &end, NULL); } static GtkSourceLanguage * get_language_for_file (GtkTextBuffer *buffer, const gchar *filename) { GtkSourceLanguageManager *manager; GtkSourceLanguage *language; GtkTextIter start; GtkTextIter end; gchar *text; gchar *content_type; gboolean result_uncertain; gtk_text_buffer_get_start_iter (buffer, &start); gtk_text_buffer_get_iter_at_offset (buffer, &end, 1024); text = gtk_text_buffer_get_slice (buffer, &start, &end, TRUE); content_type = g_content_type_guess (filename, (guchar*) text, strlen (text), &result_uncertain); if (result_uncertain) { g_free (content_type); content_type = NULL; } manager = gtk_source_language_manager_get_default (); language = gtk_source_language_manager_guess_language (manager, filename, content_type); g_message ("Detected '%s' mime type for file %s, chose language %s", content_type != NULL ? content_type : "(null)", filename, language != NULL ? gtk_source_language_get_id (language) : "(none)"); g_free (content_type); g_free (text); return language; } static GtkSourceLanguage * get_language_by_id (const gchar *id) { GtkSourceLanguageManager *manager; manager = gtk_source_language_manager_get_default (); return gtk_source_language_manager_get_language (manager, id); } static GtkSourceLanguage * get_language (GtkTextBuffer *buffer, GFile *location) { GtkSourceLanguage *language = NULL; GtkTextIter start; GtkTextIter end; gchar *text; gchar *lang_string; gtk_text_buffer_get_start_iter (buffer, &start); end = start; gtk_text_iter_forward_line (&end); #define LANG_STRING "gtk-source-lang:" text = gtk_text_iter_get_slice (&start, &end); lang_string = strstr (text, LANG_STRING); if (lang_string != NULL) { gchar **tokens; lang_string += strlen (LANG_STRING); g_strchug (lang_string); tokens = g_strsplit_set (lang_string, " \t\n", 2); if (tokens != NULL && tokens[0] != NULL) { language = get_language_by_id (tokens[0]); } g_strfreev (tokens); } if (language == NULL) { gchar *filename = g_file_get_path (location); language = get_language_for_file (buffer, filename); g_free (filename); } g_free (text); return language; } static void print_language_style_ids (GtkSourceLanguage *language) { gchar **styles; g_assert (language != NULL); styles = gtk_source_language_get_style_ids (language); if (styles == NULL) { g_print ("No styles in language '%s'\n", gtk_source_language_get_name (language)); } else { gchar **ids; g_print ("Styles in language '%s':\n", gtk_source_language_get_name (language)); for (ids = styles; *ids != NULL; ids++) { const gchar *name = gtk_source_language_get_style_name (language, *ids); g_print ("- %s (name: '%s')\n", *ids, name); } g_strfreev (styles); } g_print ("\n"); } static void load_cb (GtkSourceFileLoader *loader, GAsyncResult *result, TestWidget *self) { GtkTextIter iter; GFile *location; GtkSourceLanguage *language = NULL; GError *error = NULL; gtk_source_file_loader_load_finish (loader, result, &error); if (error != NULL) { g_warning ("Error while loading the file: %s", error->message); g_clear_error (&error); g_clear_object (&self->priv->file); goto end; } /* move cursor to the beginning */ gtk_text_buffer_get_start_iter (GTK_TEXT_BUFFER (self->priv->buffer), &iter); gtk_text_buffer_place_cursor (GTK_TEXT_BUFFER (self->priv->buffer), &iter); gtk_widget_grab_focus (GTK_WIDGET (self->priv->view)); location = gtk_source_file_loader_get_location (loader); language = get_language (GTK_TEXT_BUFFER (self->priv->buffer), location); gtk_source_buffer_set_language (self->priv->buffer, language); if (language != NULL) { print_language_style_ids (language); } else { gchar *path = g_file_get_path (location); g_print ("No language found for file '%s'\n", path); g_free (path); } end: g_object_unref (loader); } static void open_file (TestWidget *self, const gchar *filename) { GFile *location; GtkSourceFileLoader *loader; g_clear_object (&self->priv->file); self->priv->file = gtk_source_file_new (); location = g_file_new_for_path (filename); gtk_source_file_set_location (self->priv->file, location); g_object_unref (location); loader = gtk_source_file_loader_new (self->priv->buffer, self->priv->file); remove_all_marks (self->priv->buffer); gtk_source_file_loader_load_async (loader, G_PRIORITY_DEFAULT, NULL, NULL, NULL, NULL, (GAsyncReadyCallback) load_cb, self); } static void show_line_numbers_toggled_cb (TestWidget *self, GtkCheckButton *button) { gboolean enabled = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button)); gtk_source_view_set_show_line_numbers (self->priv->view, enabled); } static void show_line_marks_toggled_cb (TestWidget *self, GtkCheckButton *button) { gboolean enabled = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button)); gtk_source_view_set_show_line_marks (self->priv->view, enabled); } static void show_right_margin_toggled_cb (TestWidget *self, GtkCheckButton *button) { gboolean enabled = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button)); gtk_source_view_set_show_right_margin (self->priv->view, enabled); } static void right_margin_position_value_changed_cb (TestWidget *self, GtkSpinButton *button) { gint position = gtk_spin_button_get_value_as_int (button); gtk_source_view_set_right_margin_position (self->priv->view, position); } static void highlight_syntax_toggled_cb (TestWidget *self, GtkCheckButton *button) { gboolean enabled = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button)); gtk_source_buffer_set_highlight_syntax (self->priv->buffer, enabled); } static void highlight_matching_bracket_toggled_cb (TestWidget *self, GtkCheckButton *button) { gboolean enabled = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button)); gtk_source_buffer_set_highlight_matching_brackets (self->priv->buffer, enabled); } static void highlight_current_line_toggled_cb (TestWidget *self, GtkCheckButton *button) { gboolean enabled = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button)); gtk_source_view_set_highlight_current_line (self->priv->view, enabled); } static void wrap_lines_toggled_cb (TestWidget *self, GtkCheckButton *button) { gboolean enabled = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button)); gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (self->priv->view), enabled ? GTK_WRAP_WORD : GTK_WRAP_NONE); } static void auto_indent_toggled_cb (TestWidget *self, GtkCheckButton *button) { gboolean enabled = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button)); gtk_source_view_set_auto_indent (self->priv->view, enabled); } static void indent_spaces_toggled_cb (TestWidget *self, GtkCheckButton *button) { gboolean enabled = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button)); gtk_source_view_set_insert_spaces_instead_of_tabs (self->priv->view, enabled); } static void tab_width_value_changed_cb (TestWidget *self, GtkSpinButton *button) { gint tab_width = gtk_spin_button_get_value_as_int (button); gtk_source_view_set_tab_width (self->priv->view, tab_width); } static void update_indent_width (TestWidget *self) { gint indent_width = -1; if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (self->priv->indent_width_checkbutton))) { indent_width = gtk_spin_button_get_value_as_int (self->priv->indent_width_spinbutton); } gtk_source_view_set_indent_width (self->priv->view, indent_width); } static void smart_home_end_changed_cb (TestWidget *self, GtkComboBox *combo) { GtkSourceSmartHomeEndType type; gint active = gtk_combo_box_get_active (combo); switch (active) { case 0: type = GTK_SOURCE_SMART_HOME_END_DISABLED; break; case 1: type = GTK_SOURCE_SMART_HOME_END_BEFORE; break; case 2: type = GTK_SOURCE_SMART_HOME_END_AFTER; break; case 3: type = GTK_SOURCE_SMART_HOME_END_ALWAYS; break; default: type = GTK_SOURCE_SMART_HOME_END_DISABLED; break; } gtk_source_view_set_smart_home_end (self->priv->view, type); } static void backward_string_clicked_cb (TestWidget *self) { GtkTextIter iter; GtkTextMark *insert; insert = gtk_text_buffer_get_insert (GTK_TEXT_BUFFER (self->priv->buffer)); gtk_text_buffer_get_iter_at_mark (GTK_TEXT_BUFFER (self->priv->buffer), &iter, insert); if (gtk_source_buffer_iter_backward_to_context_class_toggle (self->priv->buffer, &iter, "string")) { gtk_text_buffer_place_cursor (GTK_TEXT_BUFFER (self->priv->buffer), &iter); gtk_text_view_scroll_mark_onscreen (GTK_TEXT_VIEW (self->priv->view), insert); } gtk_widget_grab_focus (GTK_WIDGET (self->priv->view)); } static void forward_string_clicked_cb (TestWidget *self) { GtkTextIter iter; GtkTextMark *insert; insert = gtk_text_buffer_get_insert (GTK_TEXT_BUFFER (self->priv->buffer)); gtk_text_buffer_get_iter_at_mark (GTK_TEXT_BUFFER (self->priv->buffer), &iter, insert); if (gtk_source_buffer_iter_forward_to_context_class_toggle (self->priv->buffer, &iter, "string")) { gtk_text_buffer_place_cursor (GTK_TEXT_BUFFER (self->priv->buffer), &iter); gtk_text_view_scroll_mark_onscreen (GTK_TEXT_VIEW (self->priv->view), insert); } gtk_widget_grab_focus (GTK_WIDGET (self->priv->view)); } static void open_button_clicked_cb (TestWidget *self) { GtkWidget *main_window; GtkWidget *chooser; gint response; static gchar *last_dir; main_window = gtk_widget_get_toplevel (GTK_WIDGET (self->priv->view)); chooser = gtk_file_chooser_dialog_new ("Open file...", GTK_WINDOW (main_window), GTK_FILE_CHOOSER_ACTION_OPEN, "Cancel", GTK_RESPONSE_CANCEL, "Open", GTK_RESPONSE_OK, NULL); if (last_dir == NULL) { last_dir = g_strdup (TOP_SRCDIR "/gtksourceview"); } if (last_dir != NULL && g_path_is_absolute (last_dir)) { gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (chooser), last_dir); } response = gtk_dialog_run (GTK_DIALOG (chooser)); if (response == GTK_RESPONSE_OK) { gchar *filename; filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (chooser)); if (filename != NULL) { g_free (last_dir); last_dir = gtk_file_chooser_get_current_folder (GTK_FILE_CHOOSER (chooser)); open_file (self, filename); g_free (filename); } } gtk_widget_destroy (chooser); } #define NON_BLOCKING_PAGINATION #ifndef NON_BLOCKING_PAGINATION static void begin_print (GtkPrintOperation *operation, GtkPrintContext *context, GtkSourcePrintCompositor *compositor) { gint n_pages; while (!gtk_source_print_compositor_paginate (compositor, context)) ; n_pages = gtk_source_print_compositor_get_n_pages (compositor); gtk_print_operation_set_n_pages (operation, n_pages); } #else static gboolean paginate (GtkPrintOperation *operation, GtkPrintContext *context, GtkSourcePrintCompositor *compositor) { g_print ("Pagination progress: %.2f %%\n", gtk_source_print_compositor_get_pagination_progress (compositor) * 100.0); if (gtk_source_print_compositor_paginate (compositor, context)) { gint n_pages; g_assert (gtk_source_print_compositor_get_pagination_progress (compositor) == 1.0); g_print ("Pagination progress: %.2f %%\n", gtk_source_print_compositor_get_pagination_progress (compositor) * 100.0); n_pages = gtk_source_print_compositor_get_n_pages (compositor); gtk_print_operation_set_n_pages (operation, n_pages); return TRUE; } return FALSE; } #endif #define ENABLE_CUSTOM_OVERLAY static void draw_page (GtkPrintOperation *operation, GtkPrintContext *context, gint page_nr, GtkSourcePrintCompositor *compositor) { #ifdef ENABLE_CUSTOM_OVERLAY /* This part of the code shows how to add a custom overlay to the printed text generated by GtkSourcePrintCompositor */ cairo_t *cr; PangoLayout *layout; PangoFontDescription *desc; PangoRectangle rect; cr = gtk_print_context_get_cairo_context (context); cairo_save (cr); layout = gtk_print_context_create_pango_layout (context); pango_layout_set_text (layout, "Draft", -1); desc = pango_font_description_from_string ("Sans Bold 120"); pango_layout_set_font_description (layout, desc); pango_font_description_free (desc); pango_layout_get_extents (layout, NULL, &rect); cairo_move_to (cr, (gtk_print_context_get_width (context) - ((double) rect.width / (double) PANGO_SCALE)) / 2, (gtk_print_context_get_height (context) - ((double) rect.height / (double) PANGO_SCALE)) / 2); pango_cairo_layout_path (cr, layout); /* Font Outline */ cairo_set_source_rgba (cr, 0.85, 0.85, 0.85, 0.80); cairo_set_line_width (cr, 0.5); cairo_stroke_preserve (cr); /* Font Fill */ cairo_set_source_rgba (cr, 0.8, 0.8, 0.8, 0.60); cairo_fill (cr); g_object_unref (layout); cairo_restore (cr); #endif /* To print page_nr you only need to call the following function */ gtk_source_print_compositor_draw_page (compositor, context, page_nr); } static void end_print (GtkPrintOperation *operation, GtkPrintContext *context, GtkSourcePrintCompositor *compositor) { g_object_unref (compositor); } #define LINE_NUMBERS_FONT_NAME "Sans 8" #define HEADER_FONT_NAME "Sans 11" #define FOOTER_FONT_NAME "Sans 11" #define BODY_FONT_NAME "Monospace 9" /* #define SETUP_FROM_VIEW */ #undef SETUP_FROM_VIEW static void print_button_clicked_cb (TestWidget *self) { gchar *basename = NULL; GtkSourcePrintCompositor *compositor; GtkPrintOperation *operation; if (self->priv->file != NULL) { GFile *location; location = gtk_source_file_get_location (self->priv->file); if (location != NULL) { basename = g_file_get_basename (location); } } #ifdef SETUP_FROM_VIEW compositor = gtk_source_print_compositor_new_from_view (self->priv->view); #else compositor = gtk_source_print_compositor_new (self->priv->buffer); gtk_source_print_compositor_set_tab_width (compositor, gtk_source_view_get_tab_width (self->priv->view)); gtk_source_print_compositor_set_wrap_mode (compositor, gtk_text_view_get_wrap_mode (GTK_TEXT_VIEW (self->priv->view))); gtk_source_print_compositor_set_print_line_numbers (compositor, 1); gtk_source_print_compositor_set_body_font_name (compositor, BODY_FONT_NAME); /* To test line numbers font != text font */ gtk_source_print_compositor_set_line_numbers_font_name (compositor, LINE_NUMBERS_FONT_NAME); gtk_source_print_compositor_set_header_format (compositor, TRUE, "Printed on %A", "test-widget", "%F"); gtk_source_print_compositor_set_footer_format (compositor, TRUE, "%T", basename, "Page %N/%Q"); gtk_source_print_compositor_set_print_header (compositor, TRUE); gtk_source_print_compositor_set_print_footer (compositor, TRUE); gtk_source_print_compositor_set_header_font_name (compositor, HEADER_FONT_NAME); gtk_source_print_compositor_set_footer_font_name (compositor, FOOTER_FONT_NAME); #endif operation = gtk_print_operation_new (); gtk_print_operation_set_job_name (operation, basename); gtk_print_operation_set_show_progress (operation, TRUE); #ifndef NON_BLOCKING_PAGINATION g_signal_connect (G_OBJECT (operation), "begin-print", G_CALLBACK (begin_print), compositor); #else g_signal_connect (G_OBJECT (operation), "paginate", G_CALLBACK (paginate), compositor); #endif g_signal_connect (G_OBJECT (operation), "draw-page", G_CALLBACK (draw_page), compositor); g_signal_connect (G_OBJECT (operation), "end-print", G_CALLBACK (end_print), compositor); gtk_print_operation_run (operation, GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG, NULL, NULL); g_object_unref (operation); g_free (basename); } static void update_cursor_position_info (TestWidget *self) { gchar *msg; gint offset; gint line; guint column; GtkTextIter iter; gchar **classes; gchar **classes_ptr; GString *classes_str; gtk_text_buffer_get_iter_at_mark (GTK_TEXT_BUFFER (self->priv->buffer), &iter, gtk_text_buffer_get_insert (GTK_TEXT_BUFFER (self->priv->buffer))); offset = gtk_text_iter_get_offset (&iter); line = gtk_text_iter_get_line (&iter) + 1; column = gtk_source_view_get_visual_column (self->priv->view, &iter) + 1; classes = gtk_source_buffer_get_context_classes_at_iter (self->priv->buffer, &iter); classes_str = g_string_new (""); for (classes_ptr = classes; classes_ptr != NULL && *classes_ptr != NULL; classes_ptr++) { if (classes_ptr != classes) { g_string_append (classes_str, ", "); } g_string_append_printf (classes_str, "%s", *classes_ptr); } g_strfreev (classes); msg = g_strdup_printf ("offset: %d, line: %d, column: %u, classes: %s", offset, line, column, classes_str->str); gtk_label_set_text (self->priv->cursor_position_info, msg); g_free (msg); g_string_free (classes_str, TRUE); } static void mark_set_cb (GtkTextBuffer *buffer, GtkTextIter *iter, GtkTextMark *mark, TestWidget *self) { if (mark == gtk_text_buffer_get_insert (buffer)) { update_cursor_position_info (self); } } static void line_mark_activated_cb (GtkSourceGutter *gutter, GtkTextIter *iter, GdkEventButton *event, TestWidget *self) { GSList *mark_list; const gchar *mark_type; mark_type = event->button == 1 ? MARK_TYPE_1 : MARK_TYPE_2; /* get the marks already in the line */ mark_list = gtk_source_buffer_get_source_marks_at_line (self->priv->buffer, gtk_text_iter_get_line (iter), mark_type); if (mark_list != NULL) { /* just take the first and delete it */ gtk_text_buffer_delete_mark (GTK_TEXT_BUFFER (self->priv->buffer), GTK_TEXT_MARK (mark_list->data)); } else { /* no mark found: create one */ gtk_source_buffer_create_source_mark (self->priv->buffer, NULL, mark_type, iter); } g_slist_free (mark_list); } static void bracket_matched_cb (GtkSourceBuffer *buffer, GtkTextIter *iter, GtkSourceBracketMatchType state) { GEnumClass *eclass; GEnumValue *evalue; eclass = G_ENUM_CLASS (g_type_class_ref (GTK_SOURCE_TYPE_BRACKET_MATCH_TYPE)); evalue = g_enum_get_value (eclass, state); g_print ("Bracket match state: '%s'\n", evalue->value_nick); g_type_class_unref (eclass); if (state == GTK_SOURCE_BRACKET_MATCH_FOUND) { g_return_if_fail (iter != NULL); g_print ("Matched bracket: '%c' at row: %"G_GINT32_FORMAT", col: %"G_GINT32_FORMAT"\n", gtk_text_iter_get_char (iter), gtk_text_iter_get_line (iter) + 1, gtk_text_iter_get_line_offset (iter) + 1); } } static gchar * mark_tooltip_func (GtkSourceMarkAttributes *attrs, GtkSourceMark *mark, GtkSourceView *view) { GtkTextBuffer *buffer; GtkTextIter iter; gint line; gint column; buffer = gtk_text_mark_get_buffer (GTK_TEXT_MARK (mark)); gtk_text_buffer_get_iter_at_mark (buffer, &iter, GTK_TEXT_MARK (mark)); line = gtk_text_iter_get_line (&iter) + 1; column = gtk_text_iter_get_line_offset (&iter); if (g_strcmp0 (gtk_source_mark_get_category (mark), MARK_TYPE_1) == 0) { return g_strdup_printf ("Line: %d, Column: %d", line, column); } else { return g_strdup_printf ("Line: %d\nColumn: %d", line, column); } } static void add_source_mark_attributes (GtkSourceView *view) { GdkRGBA color; GtkSourceMarkAttributes *attrs; attrs = gtk_source_mark_attributes_new (); gdk_rgba_parse (&color, "lightgreen"); gtk_source_mark_attributes_set_background (attrs, &color); gtk_source_mark_attributes_set_icon_name (attrs, "list-add"); g_signal_connect_object (attrs, "query-tooltip-markup", G_CALLBACK (mark_tooltip_func), view, 0); gtk_source_view_set_mark_attributes (view, MARK_TYPE_1, attrs, 1); g_object_unref (attrs); attrs = gtk_source_mark_attributes_new (); gdk_rgba_parse (&color, "pink"); gtk_source_mark_attributes_set_background (attrs, &color); gtk_source_mark_attributes_set_icon_name (attrs, "list-remove"); g_signal_connect_object (attrs, "query-tooltip-markup", G_CALLBACK (mark_tooltip_func), view, 0); gtk_source_view_set_mark_attributes (view, MARK_TYPE_2, attrs, 2); g_object_unref (attrs); } static void test_widget_dispose (GObject *object) { TestWidget *self = TEST_WIDGET (object); g_clear_object (&self->priv->buffer); g_clear_object (&self->priv->file); G_OBJECT_CLASS (test_widget_parent_class)->dispose (object); } static void test_widget_class_init (TestWidgetClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass); object_class->dispose = test_widget_dispose; gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/gtksourceview/tests/ui/test-widget.ui"); gtk_widget_class_bind_template_callback (widget_class, open_button_clicked_cb); gtk_widget_class_bind_template_callback (widget_class, print_button_clicked_cb); gtk_widget_class_bind_template_callback (widget_class, highlight_syntax_toggled_cb); gtk_widget_class_bind_template_callback (widget_class, highlight_matching_bracket_toggled_cb); gtk_widget_class_bind_template_callback (widget_class, show_line_numbers_toggled_cb); gtk_widget_class_bind_template_callback (widget_class, show_line_marks_toggled_cb); gtk_widget_class_bind_template_callback (widget_class, show_right_margin_toggled_cb); gtk_widget_class_bind_template_callback (widget_class, right_margin_position_value_changed_cb); gtk_widget_class_bind_template_callback (widget_class, highlight_current_line_toggled_cb); gtk_widget_class_bind_template_callback (widget_class, wrap_lines_toggled_cb); gtk_widget_class_bind_template_callback (widget_class, auto_indent_toggled_cb); gtk_widget_class_bind_template_callback (widget_class, indent_spaces_toggled_cb); gtk_widget_class_bind_template_callback (widget_class, tab_width_value_changed_cb); gtk_widget_class_bind_template_callback (widget_class, backward_string_clicked_cb); gtk_widget_class_bind_template_callback (widget_class, forward_string_clicked_cb); gtk_widget_class_bind_template_callback (widget_class, smart_home_end_changed_cb); gtk_widget_class_bind_template_child_private (widget_class, TestWidget, view); gtk_widget_class_bind_template_child_private (widget_class, TestWidget, show_top_border_window_checkbutton); gtk_widget_class_bind_template_child_private (widget_class, TestWidget, draw_spaces_checkbutton); gtk_widget_class_bind_template_child_private (widget_class, TestWidget, smart_backspace_checkbutton); gtk_widget_class_bind_template_child_private (widget_class, TestWidget, indent_width_checkbutton); gtk_widget_class_bind_template_child_private (widget_class, TestWidget, indent_width_spinbutton); gtk_widget_class_bind_template_child_private (widget_class, TestWidget, cursor_position_info); } static void show_top_border_window_toggled_cb (GtkToggleButton *checkbutton, TestWidget *self) { gint size; size = gtk_toggle_button_get_active (checkbutton) ? 20 : 0; gtk_text_view_set_border_window_size (GTK_TEXT_VIEW (self->priv->view), GTK_TEXT_WINDOW_TOP, size); } static void test_widget_init (TestWidget *self) { GtkSourceSpaceDrawer *space_drawer; self->priv = test_widget_get_instance_private (self); gtk_widget_init_template (GTK_WIDGET (self)); self->priv->buffer = GTK_SOURCE_BUFFER ( gtk_text_view_get_buffer (GTK_TEXT_VIEW (self->priv->view))); g_object_ref (self->priv->buffer); g_signal_connect (self->priv->show_top_border_window_checkbutton, "toggled", G_CALLBACK (show_top_border_window_toggled_cb), self); g_signal_connect_swapped (self->priv->indent_width_checkbutton, "toggled", G_CALLBACK (update_indent_width), self); g_signal_connect_swapped (self->priv->indent_width_spinbutton, "value-changed", G_CALLBACK (update_indent_width), self); g_signal_connect (self->priv->buffer, "mark-set", G_CALLBACK (mark_set_cb), self); g_signal_connect_swapped (self->priv->buffer, "changed", G_CALLBACK (update_cursor_position_info), self); g_signal_connect (self->priv->buffer, "bracket-matched", G_CALLBACK (bracket_matched_cb), NULL); add_source_mark_attributes (self->priv->view); g_signal_connect (self->priv->view, "line-mark-activated", G_CALLBACK (line_mark_activated_cb), self); g_object_bind_property (self->priv->smart_backspace_checkbutton, "active", self->priv->view, "smart-backspace", G_BINDING_SYNC_CREATE); space_drawer = gtk_source_view_get_space_drawer (self->priv->view); g_object_bind_property (self->priv->draw_spaces_checkbutton, "active", space_drawer, "enable-matrix", G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE); open_file (self, TOP_SRCDIR "/gtksourceview/gtksourcebuffer.c"); } static TestWidget * test_widget_new (void) { return g_object_new (test_widget_get_type (), NULL); } int main (int argc, char *argv[]) { GtkWidget *window; TestWidget *test_widget; gtk_init (&argc, &argv); gtk_source_init (); window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_window_set_default_size (GTK_WINDOW (window), 900, 600); g_signal_connect (window, "destroy", gtk_main_quit, NULL); test_widget = test_widget_new (); gtk_container_add (GTK_CONTAINER (window), GTK_WIDGET (test_widget)); gtk_widget_show (window); gtk_main (); gtk_source_finalize (); return 0; } test-widget.gresource.xml000066400000000000000000000003071526404615400353750ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/tests/interactive-tests test-widget.ui test-widget.ui000066400000000000000000000603731526404615400332260ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/tests/interactive-tests 1 16 1 10 1 100 80 1 10 1 16 8 1 10 libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/tests/meson.build000066400000000000000000000000611526404615400271570ustar00rootroot00000000000000subdir('interactive-tests') subdir('unit-tests') libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/tests/unit-tests/000077500000000000000000000000001526404615400271375ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/tests/unit-tests/datasets/000077500000000000000000000000001526404615400307475ustar00rootroot00000000000000language-specs/000077500000000000000000000000001526404615400335665ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/tests/unit-tests/datasetstest-empty.lang000066400000000000000000000002741526404615400365470ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/tests/unit-tests/datasets/language-specs test-full.lang000066400000000000000000000017111526404615400363500ustar00rootroot00000000000000libgedit-gtksourceview-299.8.0-80d2f107f915576f43a019abe26f13a9db21703c/tests/unit-tests/datasets/language-specs text/x-test;application/x-test *.test;*.tst extra