--- /dev/null
+authors
+
+Alan Knowles <alan@roojs.com>
--- /dev/null
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ <program> Copyright (C) <year> <name of author>
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<http://www.gnu.org/licenses/>.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
--- /dev/null
+Installation Instructions
+*************************
+
+Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation,
+Inc.
+
+ Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved. This file is offered as-is,
+without warranty of any kind.
+
+Basic Installation
+==================
+
+ Briefly, the shell command `./configure && make && make install'
+should configure, build, and install this package. The following
+more-detailed instructions are generic; see the `README' file for
+instructions specific to this package. Some packages provide this
+`INSTALL' file but do not implement all of the features documented
+below. The lack of an optional feature in a given package is not
+necessarily a bug. More recommendations for GNU packages can be found
+in *note Makefile Conventions: (standards)Makefile Conventions.
+
+ The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation. It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions. Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, and a
+file `config.log' containing compiler output (useful mainly for
+debugging `configure').
+
+ It can also use an optional file (typically called `config.cache'
+and enabled with `--cache-file=config.cache' or simply `-C') that saves
+the results of its tests to speed up reconfiguring. Caching is
+disabled by default to prevent problems with accidental use of stale
+cache files.
+
+ If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release. If you are using the cache, and at
+some point `config.cache' contains results you don't want to keep, you
+may remove or edit it.
+
+ The file `configure.ac' (or `configure.in') is used to create
+`configure' by a program called `autoconf'. You need `configure.ac' if
+you want to change it or regenerate `configure' using a newer version
+of `autoconf'.
+
+ The simplest way to compile this package is:
+
+ 1. `cd' to the directory containing the package's source code and type
+ `./configure' to configure the package for your system.
+
+ Running `configure' might take a while. While running, it prints
+ some messages telling which features it is checking for.
+
+ 2. Type `make' to compile the package.
+
+ 3. Optionally, type `make check' to run any self-tests that come with
+ the package, generally using the just-built uninstalled binaries.
+
+ 4. Type `make install' to install the programs and any data files and
+ documentation. When installing into a prefix owned by root, it is
+ recommended that the package be configured and built as a regular
+ user, and only the `make install' phase executed with root
+ privileges.
+
+ 5. Optionally, type `make installcheck' to repeat any self-tests, but
+ this time using the binaries in their final installed location.
+ This target does not install anything. Running this target as a
+ regular user, particularly if the prior `make install' required
+ root privileges, verifies that the installation completed
+ correctly.
+
+ 6. You can remove the program binaries and object files from the
+ source code directory by typing `make clean'. To also remove the
+ files that `configure' created (so you can compile the package for
+ a different kind of computer), type `make distclean'. There is
+ also a `make maintainer-clean' target, but that is intended mainly
+ for the package's developers. If you use it, you may have to get
+ all sorts of other programs in order to regenerate files that came
+ with the distribution.
+
+ 7. Often, you can also type `make uninstall' to remove the installed
+ files again. In practice, not all packages have tested that
+ uninstallation works correctly, even though it is required by the
+ GNU Coding Standards.
+
+ 8. Some packages, particularly those that use Automake, provide `make
+ distcheck', which can by used by developers to test that all other
+ targets like `make install' and `make uninstall' work correctly.
+ This target is generally not run by end users.
+
+Compilers and Options
+=====================
+
+ Some systems require unusual options for compilation or linking that
+the `configure' script does not know about. Run `./configure --help'
+for details on some of the pertinent environment variables.
+
+ You can give `configure' initial values for configuration parameters
+by setting variables in the command line or in the environment. Here
+is an example:
+
+ ./configure CC=c99 CFLAGS=-g LIBS=-lposix
+
+ *Note Defining Variables::, for more details.
+
+Compiling For Multiple Architectures
+====================================
+
+ You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory. To do this, you can use GNU `make'. `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script. `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'. This
+is known as a "VPATH" build.
+
+ With a non-GNU `make', it is safer to compile the package for one
+architecture at a time in the source code directory. After you have
+installed the package for one architecture, use `make distclean' before
+reconfiguring for another architecture.
+
+ On MacOS X 10.5 and later systems, you can create libraries and
+executables that work on multiple system types--known as "fat" or
+"universal" binaries--by specifying multiple `-arch' options to the
+compiler but only a single `-arch' option to the preprocessor. Like
+this:
+
+ ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+ CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+ CPP="gcc -E" CXXCPP="g++ -E"
+
+ This is not guaranteed to produce working output in all cases, you
+may have to build one architecture at a time and combine the results
+using the `lipo' tool if you have problems.
+
+Installation Names
+==================
+
+ By default, `make install' installs the package's commands under
+`/usr/local/bin', include files under `/usr/local/include', etc. You
+can specify an installation prefix other than `/usr/local' by giving
+`configure' the option `--prefix=PREFIX', where PREFIX must be an
+absolute file name.
+
+ You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files. If you
+pass the option `--exec-prefix=PREFIX' to `configure', the package uses
+PREFIX as the prefix for installing programs and libraries.
+Documentation and other data files still use the regular prefix.
+
+ In addition, if you use an unusual directory layout you can give
+options like `--bindir=DIR' to specify different values for particular
+kinds of files. Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them. In general, the
+default for these options is expressed in terms of `${prefix}', so that
+specifying just `--prefix' will affect all of the other directory
+specifications that were not explicitly provided.
+
+ The most portable way to affect installation locations is to pass the
+correct locations to `configure'; however, many packages provide one or
+both of the following shortcuts of passing variable assignments to the
+`make install' command line to change installation locations without
+having to reconfigure or recompile.
+
+ The first method involves providing an override variable for each
+affected directory. For example, `make install
+prefix=/alternate/directory' will choose an alternate location for all
+directory configuration variables that were expressed in terms of
+`${prefix}'. Any directories that were specified during `configure',
+but not in terms of `${prefix}', must each be overridden at install
+time for the entire installation to be relocated. The approach of
+makefile variable overrides for each directory variable is required by
+the GNU Coding Standards, and ideally causes no recompilation.
+However, some platforms have known limitations with the semantics of
+shared libraries that end up requiring recompilation when using this
+method, particularly noticeable in packages that use GNU Libtool.
+
+ The second method involves providing the `DESTDIR' variable. For
+example, `make install DESTDIR=/alternate/directory' will prepend
+`/alternate/directory' before all installation names. The approach of
+`DESTDIR' overrides is not required by the GNU Coding Standards, and
+does not work on platforms that have drive letters. On the other hand,
+it does better at avoiding recompilation issues, and works well even
+when some directory options were not specified in terms of `${prefix}'
+at `configure' time.
+
+Optional Features
+=================
+
+ If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+ Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System). The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+ For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+ Some packages offer the ability to configure how verbose the
+execution of `make' will be. For these packages, running `./configure
+--enable-silent-rules' sets the default to minimal output, which can be
+overridden with `make V=1'; while running `./configure
+--disable-silent-rules' sets the default to verbose, which can be
+overridden with `make V=0'.
+
+Particular systems
+==================
+
+ On HP-UX, the default C compiler is not ANSI C compatible. If GNU
+CC is not installed, it is recommended to use the following options in
+order to use an ANSI C compiler:
+
+ ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
+
+and if that doesn't work, install pre-built binaries of GCC for HP-UX.
+
+ HP-UX `make' updates targets which have the same time stamps as
+their prerequisites, which makes it generally unusable when shipped
+generated files such as `configure' are involved. Use GNU `make'
+instead.
+
+ On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
+parse its `<wchar.h>' header file. The option `-nodtk' can be used as
+a workaround. If GNU CC is not installed, it is therefore recommended
+to try
+
+ ./configure CC="cc"
+
+and if that doesn't work, try
+
+ ./configure CC="cc -nodtk"
+
+ On Solaris, don't put `/usr/ucb' early in your `PATH'. This
+directory contains several dysfunctional programs; working variants of
+these programs are available in `/usr/bin'. So, if you need `/usr/ucb'
+in your `PATH', put it _after_ `/usr/bin'.
+
+ On Haiku, software installed for all users goes in `/boot/common',
+not `/usr/local'. It is recommended to use the following options:
+
+ ./configure --prefix=/boot/common
+
+Specifying the System Type
+==========================
+
+ There may be some features `configure' cannot figure out
+automatically, but needs to determine by the type of machine the package
+will run on. Usually, assuming the package is built to be run on the
+_same_ architectures, `configure' can figure that out, but if it prints
+a message saying it cannot guess the machine type, give it the
+`--build=TYPE' option. TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name which has the form:
+
+ CPU-COMPANY-SYSTEM
+
+where SYSTEM can have one of these forms:
+
+ OS
+ KERNEL-OS
+
+ See the file `config.sub' for the possible values of each field. If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the machine type.
+
+ If you are _building_ compiler tools for cross-compiling, you should
+use the option `--target=TYPE' to select the type of system they will
+produce code for.
+
+ If you want to _use_ a cross compiler, that generates code for a
+platform different from the build platform, you should specify the
+"host" platform (i.e., that on which the generated programs will
+eventually be run) with `--host=TYPE'.
+
+Sharing Defaults
+================
+
+ If you want to set default values for `configure' scripts to share,
+you can create a site shell script called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists. Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Defining Variables
+==================
+
+ Variables not defined in a site shell script can be set in the
+environment passed to `configure'. However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost. In order to avoid this problem, you should set
+them in the `configure' command line, using `VAR=value'. For example:
+
+ ./configure CC=/usr/local2/bin/gcc
+
+causes the specified `gcc' to be used as the C compiler (unless it is
+overridden in the site shell script).
+
+Unfortunately, this technique does not work for `CONFIG_SHELL' due to
+an Autoconf limitation. Until the limitation is lifted, you can use
+this workaround:
+
+ CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
+
+`configure' Invocation
+======================
+
+ `configure' recognizes the following options to control how it
+operates.
+
+`--help'
+`-h'
+ Print a summary of all of the options to `configure', and exit.
+
+`--help=short'
+`--help=recursive'
+ Print a summary of the options unique to this package's
+ `configure', and exit. The `short' variant lists options used
+ only in the top level, while the `recursive' variant lists options
+ also present in any nested packages.
+
+`--version'
+`-V'
+ Print the version of Autoconf used to generate the `configure'
+ script, and exit.
+
+`--cache-file=FILE'
+ Enable the cache: use and save the results of the tests in FILE,
+ traditionally `config.cache'. FILE defaults to `/dev/null' to
+ disable caching.
+
+`--config-cache'
+`-C'
+ Alias for `--cache-file=config.cache'.
+
+`--quiet'
+`--silent'
+`-q'
+ Do not print messages saying which checks are being made. To
+ suppress all normal output, redirect it to `/dev/null' (any error
+ messages will still be shown).
+
+`--srcdir=DIR'
+ Look for the package's source code in directory DIR. Usually
+ `configure' can determine that directory automatically.
+
+`--prefix=DIR'
+ Use DIR as the installation prefix. *note Installation Names::
+ for more details, including other options available for fine-tuning
+ the installation locations.
+
+`--no-create'
+`-n'
+ Run the configure checks, but stop before creating any output
+ files.
+
+`configure' also accepts some other, not widely useful, options. Run
+`configure --help' for more details.
--- /dev/null
+
+
+apt-cache search '^valac-[0-9.]+$' | sort -n -r | head -n 1 | awk ' { print "sudo apt-get install -y " $1 }' | sh
+apt-cache search '^valac-[0-9.]+-vapi$' | sort -n -r | head -n 1 | awk ' { print "sudo apt-get install -y " $1 }' | sh
+apt-cache search '^libvala-[0-9.]+-dev$' | sort -n -r | head -n1 | awk ' { print "sudo apt-get install -y " $1 }' | sh
+
+
+apt-cache search '^libvte-[0-9.]+-dev$' | sort -n -r | head -n1 | awk ' { print "sudo apt-get install -y " $1 }' | sh
+
+
+sudo apt-get install libgtk-3-dev libgtksourceview-3.0-dev libxml2-dev libjson-glib-dev libgee-dev \
+ libgirepository1.0-dev
+
+# not sure why we are not using 4 yet?
+
+sudo apt-get install libwebkit2gtk-3.0-dev
+sudo apt-get install libwebkit2gtk-4.0-dev
+sudo apt-get install libclutter-gtk-1.0-dev libgladeui-dev libsoup2.4-dev \
+ libjavascriptcoregtk-3.0-dev
+
+// test
+
+
+
\ No newline at end of file
-SUBDIRS = src
\ No newline at end of file
+SUBDIRS = src pixmaps
+
+desktopdir = $(datadir)/applications
+desktop_DATA =roobuilder.desktop
--- /dev/null
+App Builder
+
+This is a Seed based application builder.. - currently basically a prototype..
+
+
+The idea is that it can build applications both web based (using roojs) and Desktop based using Gtk
+and the gobject introspection bindings.
+
+It's kind of like Glade on steroids..
+
+----------------------------------------------------
+Usage:
+
+seed gtkrun.js Builder
+
+-> create a project
+-> add a folder to the project
+-> add a file to the project..
+Files are JSON data files at present..
+
+-----------------------------------------------------
+Where it is..
+
+* basic builder app runs - you can build a tree of elements making up a interface for roo and gtk.
+* listeners are created correctly.
+* listeners with gtk prototypes
+* Gtk properties that are enums - now show a combo selector..
+* application is used to write itself...
+* Projects can be created and deleted (basically a directory)
+* sourceview to uses spaces rather than tabs. (and autoindents..)
+* Help view - load docs..
+* highlight in gtk preview - works but is klunky..
+* Support for extra code in Roo HTML is done by "Set extra HTML in rendere"
+
+
+-----------------------------------------------------
+INSTALL
+GTK3
+
+git clone git://github.com/roojs/app.Builder.js.git
+cd app.Builder.js
+git clone git://github.com/roojs/gir-1.2-gtk-3.4.git gir-1.2
+cd gir-1.2
+sh install-girs.sh
+** This file may need running as root if sudo fails..
+cd ..
+
+seed gtkrun.js Builder3
+
+
+
+-----------------------------------------------------
+
+TODO (Gtk)
+* Tables are not rendering first time round..
+* Dialog buttons - need special rendering on preview.
+* Icon-size (should be an enum...??)
+* (Image|....??? ).stock - should be a list of stock icons..
+* fix pulldowns for types.. - it's a bit hap hazard with the delayed / loading of settings.
+* packing - gather from methods to find out which match.. (including false)
+* adding a file does not display on project tree straight awya..
+* templates for elements... - eg. defaults for classic elements.
+* sort out add heirachy for Gtk..
+* Project Tree needs to work perhaps like a left hand popout.
+* make heirachy editor...
+* new file = should specify type (eg. gtk window etc..)
+* Help view - next/back.. url?
+-----------------------------------------------------
+
+TODO (Roo)
+* file properties - title, parent etc..
+
+-----------------------------------------------------
+
+Thoughts...
+* Widget definition files.. (to replace our 'Usage.txt' files)
+-> defaults { ... }
+-> onAdd(name_of_parent, cfg) { modifies defaults.. }
+-> validParents : [ .... ]
+-> validChildren???: [ .... ]
+
+* how to handle stuff like GtkTable.. -
+ - needs cols,rows in constructor.
+ - child properties do not appear to work? -- investigate?
+
+* XObject - Use Buildable interface???
+
+* Preview area - use glade widgets?
+
+-----------------------------------------------------
+Concepts
+
+Basically both Roo and JS are built using a tree of elements (tagged with xtype/xns)
+sub elements always go in the items array..
+we have some special properties of elements, eg.
+
+*prop (a property of the parent)
+xtype (element type) eg. Window / Button etc..
+|xns (namespace) = eg. Gtk/Roo etc.
+
+|**** anything starting with a pipe is raw data field rather than quoted..
+
+
+each element can have a property listeners which is where the listeners go...
+
+
--- /dev/null
+#!/bin/sh
+# Run this to generate all the initial makefiles, etc.
+
+srcdir=`dirname $0`
+test -z "$srcdir" && srcdir=.
+
+DIE=0
+
+(test -f $srcdir/configure.ac) || {
+ echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
+ echo " top-level package directory"
+ exit 1
+}
+
+(autoconf --version) < /dev/null > /dev/null 2>&1 || {
+ echo
+ echo "**Error**: You must have \`autoconf' installed."
+ echo "Download the appropriate package for your distribution,"
+ echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
+ DIE=1
+}
+
+#?? needed??
+(grep "^IT_PROG_INTLTOOL" $srcdir/configure.ac >/dev/null) && {
+ (intltoolize --version) < /dev/null > /dev/null 2>&1 || {
+ echo
+ echo "**Error**: You must have \`intltool' installed."
+ echo "You can get it from:"
+ echo " ftp://ftp.gnome.org/pub/GNOME/"
+ DIE=1
+ }
+}
+
+
+(grep "^LT_INIT" $srcdir/configure.ac >/dev/null) && {
+ (libtool --version) < /dev/null > /dev/null 2>&1 || {
+ echo
+ echo "**Error**: You must have \`libtool' installed."
+ echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/"
+ DIE=1
+ }
+}
+
+(automake --version) < /dev/null > /dev/null 2>&1 || {
+ echo
+ echo "**Error**: You must have \`automake' installed."
+ echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/"
+ DIE=1
+ NO_AUTOMAKE=yes
+}
+
+
+# if no automake, don't bother testing for aclocal
+test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
+ echo
+ echo "**Error**: Missing \`aclocal'. The version of \`automake'"
+ echo "installed doesn't appear recent enough."
+ echo "You can get automake from ftp://ftp.gnu.org/pub/gnu/"
+ DIE=1
+}
+
+if test "$DIE" -eq 1; then
+ exit 1
+fi
+
+if test -z "$*"; then
+ echo "**Warning**: I am going to run \`configure' with no arguments."
+ echo "If you wish to pass any to it, please specify them on the"
+ echo \`$0\'" command line."
+ echo
+fi
+
+case $CC in
+xlc )
+ am_opt=--include-deps;;
+esac
+
+
+dr=$srcdir
+if test -f $dr/NO-AUTO-GEN; then
+ echo skipping $dr -- flagged as no auto-gen
+else
+ echo processing $dr
+ ( cd $dr
+
+ aclocalinclude="$ACLOCAL_FLAGS"
+
+ if grep "^AM_GLIB_GNU_GETTEXT" configure.ac >/dev/null; then
+ echo "Creating $dr/aclocal.m4 ..."
+ test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
+
+ echo "Making $dr/aclocal.m4 writable ..."
+ test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
+ fi
+
+ # if grep "^IT_PROG_INTLTOOL" configure.ac >/dev/null; then
+ # echo "Running intltoolize..."
+ #intltoolize --copy --force --automake
+ # fi
+ #
+ if grep "^LT_INIT" configure.ac >/dev/null; then
+ if test -z "$NO_LIBTOOLIZE" ; then
+ echo "Running libtoolize..."
+ libtoolize --force --copy
+ fi
+ fi
+ echo "Running aclocal $aclocalinclude ..."
+ aclocal $aclocalinclude
+ if grep "^A[CM]_CONFIG_HEADER" configure.ac >/dev/null; then
+ echo "Running autoheader..."
+ autoheader
+ fi
+ echo "Running automake $am_opt ..."
+ automake --add-missing --copy $am_opt
+ echo "Running autoconf ..."
+ autoconf
+ )
+fi
+
+
+if test x$NOCONFIGURE = x; then
+ echo Running $srcdir/configure "$@" ...
+ $srcdir/configure "$@" \
+ && echo Now type \`make\' to compile. || exit 1
+else
+ echo Skipping configure process.
+fi
\ No newline at end of file
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ([2.68])
-AC_INIT([builder], [4.0.0])
+AC_INIT([roobuilder], [4.0.0])
AC_CONFIG_HEADERS([config.h])
dnl we need to check these exist, then it will generate a compile string for them.
-PKG_CHECK_MODULES(BUILDER, [
+PKG_CHECK_MODULES(ROOBUILDER, [
clutter-gtk-1.0
glib-2.0 >= 2.24.1
gobject-2.0 >= 2.24.1
json-glib-1.0
gee-1.0
libxml-2.0
- libsoup-2.4
+ libsoup-2.4,
+ roojspacker-1.0
])
dnl --- libvala -- needs to find matching really..
-
-PKG_CHECK_MODULES(LIBVALA30, [libvala-0.30],
- [vala_3_0_enabled=yes],
- [vala_3_0_enabled=no])
-if test $vala_3_0_enabled = yes; then
- AC_DEFINE(HAVE_LIBVALA30,1,[libvala 0.30 support])
-else
- PKG_CHECK_MODULES(LIBVALA28, [libvala-0.28],
- [vala_2_8_enabled=yes],
- [vala_2_8_enabled=no])
- if test $vala_2_8_enabled = yes; then
- AC_DEFINE(HAVE_LIBVALA28,1,[libvala 0.28 support])
- else
- PKG_CHECK_MODULES(LIBVALA26, [libvala-0.26],
- [vala_2_6_enabled=yes],
- [vala_2_6_enabled=no])
-
- if test $vala_2_6_enabled = yes; then
- AC_DEFINE(HAVE_LIBVALA26,1,[libvala 0.26 support])
- else
- PKG_CHECK_MODULES(LIBVALA24, [libvala-0.24],
- [vala_2_4_enabled=yes],
- [vala_2_4_enabled=no])
-
- if test $vala_2_4_enabled = yes; then
- AC_DEFINE(HAVE_LIBVALA24,1,[libvala 0.24 support])
- else
- PKG_CHECK_MODULES(LIBVALA22, [libvala-0.22],
- [vala_2_2_enabled=yes] )
-
- AC_DEFINE(HAVE_LIBVALA22,1,[libvala 0.22 support])
- fi
- fi
+PKG_CHECK_MODULES(LIBVALA, [libvala-0.32],
+ [vala_3_2_enabled=yes],
+ [vala_3_2_enabled=no])
+if test $vala_3_2_enabled = yes; then
+ AC_DEFINE(HAVE_LIBVALA32,1,[libvala 0.32 support])
+else
+ PKG_CHECK_MODULES(LIBVALA, [libvala-0.30],
+ [vala_3_0_enabled=yes],
+ [vala_3_0_enabled=no])
+ if test $vala_3_0_enabled = yes; then
+ AC_DEFINE(HAVE_LIBVALA30,1,[libvala 0.30 support])
+ else
+ PKG_CHECK_MODULES(LIBVALA, [libvala-0.28],
+ [vala_2_8_enabled=yes],
+ [vala_2_8_enabled=no])
+ if test $vala_2_8_enabled = yes; then
+ AC_DEFINE(HAVE_LIBVALA28,1,[libvala 0.28 support])
+ else
+ PKG_CHECK_MODULES(LIBVALA, [libvala-0.26],
+ [vala_2_6_enabled=yes],
+ [vala_2_6_enabled=no])
+
+ if test $vala_2_6_enabled = yes; then
+ AC_DEFINE(HAVE_LIBVALA26,1,[libvala 0.26 support])
+ else
+ PKG_CHECK_MODULES(LIBVALA, [libvala-0.24],
+ [vala_2_4_enabled=yes],
+ [vala_2_4_enabled=no])
+
+ if test $vala_2_4_enabled = yes; then
+ AC_DEFINE(HAVE_LIBVALA24,1,[libvala 0.24 support])
+ else
+ PKG_CHECK_MODULES(LIBVALA, [libvala-0.22],
+ [vala_2_2_enabled=yes] )
+
+ AC_DEFINE(HAVE_LIBVALA22,1,[libvala 0.22 support])
+ fi
+ fi
+ fi
fi
-
fi
+AM_CONDITIONAL(HAVE_LIBVALA32, test "$vala_3_2_enabled" = "yes")
AM_CONDITIONAL(HAVE_LIBVALA30, test "$vala_3_0_enabled" = "yes")
AM_CONDITIONAL(HAVE_LIBVALA28, test "$vala_2_8_enabled" = "yes")
AM_CONDITIONAL(HAVE_LIBVALA26, test "$vala_2_6_enabled" = "yes")
AC_CONFIG_FILES([
Makefile
src/Makefile
+ pixmaps/Makefile
])
-AC_SUBST(BUILDER_CFLAGS)
-AC_SUBST(BUILDER_LIBS)
+AC_SUBST(ROOBUILDER_CFLAGS)
+AC_SUBST(ROOBUILDER_LIBS)
AC_OUTPUT
--- /dev/null
+public_icons_themes = hicolor
+
+iconsdir = $(datadir)/icons/hicolor
+
+public_icon_dirs = \
+ 16x16/apps \
+ 22x22/apps \
+ 24x24/apps \
+ 32x32/apps \
+ 48x48/apps
+
+public_icons = \
+ 16x16/apps/roobuilder.png \
+ 22x22/apps/roobuilder.png \
+ 24x24/apps/roobuilder.png \
+ 32x32/apps/roobuilder.png \
+ 48x48/apps/roobuilder.png
+
+gtk_update_icon_cache = gtk-update-icon-cache -f -t
+
+EXTRA_DIST = \
+ $(public_icons)
+
+install-data-hook: update-icon-cache
+uninstall-hook: update-icon-cache
+
+
+
+update-icon-cache:
+ @-if test -z "$(DESTDIR)"; then \
+ echo "Updating Gtk icon cache."; \
+ for theme in $(public_icons_themes); do \
+ $(gtk_update_icon_cache) $(datadir)/icons/$$theme; \
+ done; \
+ else \
+ echo "*** Icon cache not updated. After (un)install, run this:"; \
+ for theme in $(public_icons_themes); do \
+ echo "*** $(gtk_update_icon_cache) $(datadir)/icons/$$theme"; \
+ done; \
+ fi
+
+install-icons:
+ for icon in $(public_icon_dirs); do \
+ mkdir -p $(DESTDIR)$(datadir)/icons/hicolor/$$icon; \
+ $(INSTALL_DATA) $(srcdir)/$$icon/roobuilder.png $(DESTDIR)$(datadir)/icons/hicolor/$$icon/roobuilder.png; \
+ done;
+
+uninstall-icons:
+ -for icon in $(public_icons_dirs); do \
+ rm -f $(DESTDIR)$(datadir)/icons/hicolor/$$icon/roobuilder.png; \
+ done;
+
+
+install-data-local: install-icons update-icon-cache
+
+uninstall-local: uninstall-icons update-icon-cache
+
+
--- /dev/null
+{
+ "name" : "Editor.Roo.GridPanel",
+ "parent" : "",
+ "title" : "",
+ "path" : "/home/edward/gitlive/app.Builder.js/resources/Editors/Editor.Roo.GridPanel.bjs",
+ "permname" : "",
+ "modOrder" : "001",
+ "strings" : {
+ "4ce58cbe362a5d7b156992a496d55bf3" : "Database Column",
+ "b78a3223503896721cca1303f776159b" : "Title",
+ "2f616612593df62aeed112de4f03110e" : "Edit a Grid",
+ "0ccc2bf3fb98387c23b6ca5500244d6e" : "Use ",
+ "c671c787b49f50a3ace9fdc5bd597825" : "core_enum",
+ "32954654ac8fe66a1d09be19001de2d4" : "Width",
+ "a1fa27779242b4902f7ae3bdd5c6d508" : "Type",
+ "6e7376dca68a2386a8737944196ab491" : "Create / Edit Grid"
+ },
+ "items" : [
+ {
+ "listeners" : {
+ "|activate" : "function() {\n _this.panel = this;\n if (_this.grid) {\n _this.grid.footer.onClick('first');\n }\n}"
+ },
+ "| function loadData" : "function(data) { \n\n alert(\"IPC:TEST:\" + JSON.stringify(data,null,4));\n var ar = [];\n for (var k in data) { \n var r = data[k];\n var has_s = typeof(r.relates_to_schema) != 'undefined'\n ar.push([ !has_s , r.Field, r.Type, r.Field, 100] );\n if (!has_s) {\n continue;\n }\n for (var kk in r.relates_to_schema) { \n var rr = r.relates_to_schema[kk];\n if (rr.Field == r.relates_to_col) {\n continue;\n }\n ar.push([ false, r.Field + '_'+ rr.Field, rr.Type, rr.Field, 100] );\n }\n }\n \n alert(\"IPC:TEST:\" + JSON.stringify(ar));\n this.grid.dataSource.loadData(ar);\n}",
+ "| function toBJS" : "function() { \n\n// convert the selected cells into a BJS data ready to send back to the UI..\n \n this.table = \"XXX\";\n this.firstTxtCol = \"XXX\";\n \n \n var jreader = {};\n var colmodel = [];\n this.grid.dataSource.each(function(rec) {\n if (!rec.data.active) {\n return;\n }\n \n \n \n colmodel.push({\n \"xtype\": \"ColumnModel\",\n \"header\": rec.data.title,\n \"width\": rec.data.width * 1,\n \"dataIndex\": rec.data.dataIndex,\n \"|renderer\": !rec.data.type.match(/date/i) ? \n \"function(v) { return String.format('{0}', v); }\" :\n \"function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }\" , // special for date\n \"|xns\": \"Roo.grid\",\n \"*prop\": \"cm[]\"\n });\n });\n \n \n \n\n alert(\"IPC:OUT:\" + JSON.stringify({\n '|xns' : 'Roo',\n xtype : \"GridPanel\",\n \"title\": this.table,\n \"fitToframe\": true,\n \"fitContainer\": true,\n \"tableName\": this.table,\n \"background\": true,\n \"region\" : 'center',\n \"listeners\": {\n \"|activate\": \"function() {\\n _this.panel = this;\\n if (_this.grid) {\\n _this.grid.footer.onClick('first');\\n }\\n}\"\n },\n \"items\": [\n {\n \"*prop\": \"grid\",\n \"xtype\": \"Grid\",\n \"autoExpandColumn\": this.firstTxtCol,\n \"loadMask\": true,\n \"listeners\": {\n \"|render\": \"function() \\n\" +\n \"{\\n\" +\n \" _this.grid = this; \\n\" +\n \" //_this.dialog = Pman.Dialog.FILL_IN\\n\" +\n \" if (_this.panel.active) {\\n\" +\n \" this.footer.onClick('first');\\n\" +\n \" }\\n\" +\n \"}\",\n \"|rowdblclick\": \"function (_self, rowIndex, e)\\n\" + \n \"{\\n\" + \n \" if (!_this.dialog) return;\\n\" + \n \" _this.dialog.show( this.getDataSource().getAt(rowIndex).data, function() {\\n\" + \n \" _this.grid.footer.onClick('first');\\n\" + \n \" }); \\n\" + \n \"}\\n\"\n },\n \"|xns\": \"Roo.grid\",\n\n \"items\": [\n {\n \"*prop\": \"dataSource\",\n \"xtype\": \"Store\",\n remoteSort : true,\n '|sortInfo' : \"{ field : '\" + this.firstTxtCol + \"', direction: 'ASC' }\", \n \"|xns\": \"Roo.data\",\n \"items\": [\n \n {\n \"*prop\": \"proxy\",\n \"xtype\": \"HttpProxy\",\n \"method\": \"GET\",\n \"|url\": \"baseURL + '/Roo/\" + this.table + \".php'\",\n \"|xns\": \"Roo.data\"\n },\n {\n '*prop' : 'reader',\n 'xtype' : 'JsonReader',\n '|xns' : 'Roo.data',\n 'id' : 'id',\n 'root' : 'data',\n 'totalProperty' : 'total'\n }\n ]\n },\n {\n \"*prop\": \"footer\",\n \"xtype\": \"PagingToolbar\",\n \"pageSize\": 25,\n \"displayInfo\": true,\n \"displayMsg\": \"Displaying \" + this.table + \"{0} - {1} of {2}\",\n \"emptyMsg\": \"No \" + this.table + \" found\",\n \"|xns\": \"Roo\"\n },\n {\n \"*prop\": \"toolbar\",\n \"xtype\": \"Toolbar\",\n \"|xns\": \"Roo\",\n \"items\": [\n {\n \"text\": \"Add\",\n \"xtype\": \"Button\",\n \"cls\": \"x-btn-text-icon\",\n \"|icon\": \"Roo.rootURL + 'images/default/dd/drop-add.gif'\",\n \"listeners\": {\n \"|click\": \"function()\\n\"+\n \"{\\n\"+\n \" if (!_this.dialog) return;\\n\" +\n \" _this.dialog.show( { id : 0 } , function() {\\n\"+\n \" _this.grid.footer.onClick('first');\\n\"+\n \" }); \\n\"+\n \"}\\n\"\n },\n \"|xns\": \"Roo.Toolbar\"\n },\n // fill ????\n {\n \"text\": \"Delete\",\n \"cls\": \"x-btn-text-icon\",\n \"|icon\": \"rootURL + '/Pman/templates/images/trash.gif'\",\n \"xtype\": \"Button\",\n \"listeners\": {\n \"|click\": \"function()\\n\"+\n \"{\\n\"+\n \" Pman.genericDelete(_this, '\" + this.table + \"'); \\n\"+\n \"}\\n\"+\n \" \"\n },\n \"|xns\": \"Roo.Toolbar\"\n }\n ]\n }, // end toolbar\n ].concat( colmodel)\n }\n ]\n \n \n }, null, 4));\n\n}",
+ "fitToframe" : true,
+ "background" : false,
+ "region" : "center",
+ "title" : "core_enum",
+ "xtype" : "GridPanel",
+ "$ xns" : "Roo",
+ "fitContainer" : true,
+ "String title" : "Create / Edit Grid",
+ "tableName" : "core_enum",
+ "items" : [
+ {
+ "listeners" : {
+ "|rowdblclick" : "function (_self, rowIndex, e)\n{\n if (!_this.dialog) return;\n \n}\n",
+ "cellclick" : "function (_self, rowIndex, columnIndex, e)\n{\n\n var di = this.colModel.getDataIndex(columnIndex);\n if (di != 'active') {\n return;\n }\n \n var rec = _this.grid.ds.getAt(rowIndex);\n \n rec.set('active', rec.data.active * 1 ? 0 : 1);\n rec.commit();\n \n \n}",
+ "|render" : "function() \n{\n _this.grid = this; \n //_this.dialog = Pman.Dialog.FILL_IN\n\n}"
+ },
+ "Number clicksToEdit" : 1,
+ "autoExpandColumn" : "title",
+ "xtype" : "EditorGrid",
+ "loadMask" : true,
+ "$ xns" : "Roo.grid",
+ "* prop" : "grid",
+ "items" : [
+ {
+ "$ Array fields" : "[ 'active', 'dataIndex', 'type','title', 'width' ]",
+ "$ Array data" : "[\n [ 1, 'test', 'test', 110 ]\n \n\n]",
+ "Number id" : "'dataIndex'",
+ "xtype" : "SimpleStore",
+ "$ xns" : "Roo.data",
+ "* prop" : "ds"
+ },
+ {
+ "xtype" : "Toolbar",
+ "$ xns" : "Roo",
+ "* prop" : "toolbar",
+ "items" : [
+ {
+ "string text" : "Edit a Grid",
+ "xtype" : "TextItem",
+ "$ xns" : "Roo.Toolbar"
+ }
+ ]
+ },
+ {
+ "xtype" : "ColumnModel",
+ "header" : "Use ",
+ "width" : 75,
+ "$ renderer" : "function(v) { \n var state = v *1 > 0 ? '-checked' : '';\n\n return '<img class=\"x-grid-check-icon' + state + '\" src=\"' + Roo.BLANK_IMAGE_URL + '\"/>';\n \n }",
+ "$ xns" : "Roo.grid",
+ "* prop" : "cm[]",
+ "dataIndex" : "active"
+ },
+ {
+ "xtype" : "ColumnModel",
+ "width" : 150,
+ "header" : "Database Column",
+ "$ renderer" : "function(v) { return String.format('{0}', v); }",
+ "$ xns" : "Roo.grid",
+ "* prop" : "cm[]",
+ "dataIndex" : "dataIndex"
+ },
+ {
+ "xtype" : "ColumnModel",
+ "header" : "Type",
+ "width" : 100,
+ "$ renderer" : "function(v) { return String.format('{0}', v); }",
+ "$ xns" : "Roo.grid",
+ "* prop" : "cm[]",
+ "dataIndex" : "type"
+ },
+ {
+ "xtype" : "ColumnModel",
+ "width" : 75,
+ "header" : "Title",
+ "$ renderer" : "function(v) { return String.format('{0}', v); }",
+ "$ xns" : "Roo.grid",
+ "* prop" : "cm[]",
+ "dataIndex" : "title",
+ "items" : [
+ {
+ "xtype" : "GridEditor",
+ "$ xns" : "Roo.grid",
+ "* prop" : "editor",
+ "items" : [
+ {
+ "xtype" : "TextField",
+ "$ xns" : "Roo.form",
+ "* prop" : "field"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "xtype" : "ColumnModel",
+ "header" : "Width",
+ "width" : 75,
+ "$ renderer" : "function(v) { return String.format('{0}', v); }",
+ "$ xns" : "Roo.grid",
+ "* prop" : "cm[]",
+ "dataIndex" : "width",
+ "items" : [
+ {
+ "xtype" : "GridEditor",
+ "$ xns" : "Roo.grid",
+ "* prop" : "editor",
+ "items" : [
+ {
+ "xtype" : "NumberField",
+ "Number decimalPrecision" : 0,
+ "$ xns" : "Roo.form",
+ "* prop" : "field"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file
--- /dev/null
+//<script type="text/javascript">
+
+// Auto generated file - created by app.Builder.js- do not edit directly (at present!)
+
+Roo.namespace('Editor.Roo');
+
+Editor.Roo.GridPanel = new Roo.XComponent({
+
+ _strings : {
+ '4ce58cbe362a5d7b156992a496d55bf3' :"Database Column",
+ 'b78a3223503896721cca1303f776159b' :"Title",
+ '2f616612593df62aeed112de4f03110e' :"Edit a Grid",
+ '0ccc2bf3fb98387c23b6ca5500244d6e' :"Use ",
+ 'c671c787b49f50a3ace9fdc5bd597825' :"core_enum",
+ '32954654ac8fe66a1d09be19001de2d4' :"Width",
+ 'a1fa27779242b4902f7ae3bdd5c6d508' :"Type",
+ '6e7376dca68a2386a8737944196ab491' :"Create / Edit Grid"
+ },
+
+ part : ["Editors", "GridPanel" ],
+ order : '001-Editor.Roo.GridPanel',
+ region : 'center',
+ parent : false,
+ name : "unnamed module",
+ disabled : false,
+ permname : '',
+ _tree : function()
+ {
+ var _this = this;
+ var MODULE = this;
+ return {
+ grid : {
+ ds : {
+ '|xns' : 'Roo.data',
+ data : [
+ [ 1, 'test', 'test', 110 ]
+
+
+ ],
+ fields : [ 'active', 'dataIndex', 'type','title', 'width' ],
+ id : 'dataindex',
+ xns : Roo.data,
+ xtype : 'SimpleStore'
+ },
+ toolbar : {
+ '|xns' : 'Roo',
+ xns : Roo,
+ xtype : 'Toolbar',
+ items : [
+ {
+ '|xns' : 'Roo.Toolbar',
+ text : _this._strings['2f616612593df62aeed112de4f03110e'],
+ xns : Roo.Toolbar,
+ xtype : 'TextItem'
+ }
+ ]
+
+ },
+ '|xns' : 'Roo.grid',
+ autoExpandColumn : 'title',
+ clicksToEdit : 1,
+ loadMask : true,
+ xns : Roo.grid,
+ xtype : 'EditorGrid',
+ cm : [
+ {
+ '|xns' : 'Roo.grid',
+ dataIndex : 'active',
+ header : _this._strings['0ccc2bf3fb98387c23b6ca5500244d6e'],
+ renderer : function(v) {
+ var state = v *1 > 0 ? '-checked' : '';
+
+ return '<img class="x-grid-check-icon' + state + '" src="' + Roo.BLANK_IMAGE_URL + '"/>';
+
+ },
+ width : 75,
+ xns : Roo.grid,
+ xtype : 'ColumnModel'
+ },
+{
+ '|xns' : 'Roo.grid',
+ dataIndex : 'dataIndex',
+ header : _this._strings['4ce58cbe362a5d7b156992a496d55bf3'],
+ renderer : function(v) { return String.format('{0}', v); },
+ width : 150,
+ xns : Roo.grid,
+ xtype : 'ColumnModel'
+ },
+{
+ '|xns' : 'Roo.grid',
+ dataIndex : 'type',
+ header : _this._strings['a1fa27779242b4902f7ae3bdd5c6d508'],
+ renderer : function(v) { return String.format('{0}', v); },
+ width : 100,
+ xns : Roo.grid,
+ xtype : 'ColumnModel'
+ },
+{
+ editor : {
+ field : {
+ '|xns' : 'Roo.form',
+ xns : Roo.form,
+ xtype : 'TextField'
+ },
+ '|xns' : 'Roo.grid',
+ xns : Roo.grid,
+ xtype : 'GridEditor',
+ items : [
+
+ ]
+
+ },
+ '|xns' : 'Roo.grid',
+ dataIndex : 'title',
+ header : _this._strings['b78a3223503896721cca1303f776159b'],
+ renderer : function(v) { return String.format('{0}', v); },
+ width : 75,
+ xns : Roo.grid,
+ xtype : 'ColumnModel',
+ items : [
+
+ ]
+
+ },
+{
+ editor : {
+ field : {
+ '|xns' : 'Roo.form',
+ decimalPrecision : 0,
+ xns : Roo.form,
+ xtype : 'NumberField'
+ },
+ '|xns' : 'Roo.grid',
+ xns : Roo.grid,
+ xtype : 'GridEditor',
+ items : [
+
+ ]
+
+ },
+ '|xns' : 'Roo.grid',
+ dataIndex : 'width',
+ header : _this._strings['32954654ac8fe66a1d09be19001de2d4'],
+ renderer : function(v) { return String.format('{0}', v); },
+ width : 75,
+ xns : Roo.grid,
+ xtype : 'ColumnModel',
+ items : [
+
+ ]
+
+ }
+ ],
+ listeners : {
+ cellclick : function (_self, rowIndex, columnIndex, e)
+ {
+
+ var di = this.colModel.getDataIndex(columnIndex);
+ if (di != 'active') {
+ return;
+ }
+
+ var rec = _this.grid.ds.getAt(rowIndex);
+
+ rec.set('active', rec.data.active * 1 ? 0 : 1);
+ rec.commit();
+
+
+ },
+ render : function()
+ {
+ _this.grid = this;
+ //_this.dialog = Pman.Dialog.FILL_IN
+
+ },
+ rowdblclick : function (_self, rowIndex, e)
+ {
+ if (!_this.dialog) return;
+
+ }
+ },
+ items : [
+
+ ]
+
+ },
+ '|xns' : 'Roo',
+ background : false,
+ fitContainer : true,
+ fitToframe : true,
+ loadData : function(data) {
+
+ alert("IPC:TEST:" + JSON.stringify(data,null,4));
+ var ar = [];
+ for (var k in data) {
+ var r = data[k];
+ var has_s = typeof(r.relates_to_schema) != 'undefined'
+ ar.push([ !has_s , r.Field, r.Type, r.Field, 100] );
+ if (!has_s) {
+ continue;
+ }
+ for (var kk in r.relates_to_schema) {
+ var rr = r.relates_to_schema[kk];
+ if (rr.Field == r.relates_to_col) {
+ continue;
+ }
+ ar.push([ false, r.Field + '_'+ rr.Field, rr.Type, rr.Field, 100] );
+ }
+ }
+
+ alert("IPC:TEST:" + JSON.stringify(ar));
+ this.grid.dataSource.loadData(ar);
+ },
+ region : 'center',
+ tableName : 'core_enum',
+ title : _this._strings['c671c787b49f50a3ace9fdc5bd597825'],
+ title : _this._strings['c671c787b49f50a3ace9fdc5bd597825'],
+ toBJS : function() {
+
+ // convert the selected cells into a BJS data ready to send back to the UI..
+
+ this.table = "XXX";
+ this.firstTxtCol = "XXX";
+
+
+ var jreader = {};
+ var colmodel = [];
+ this.grid.dataSource.each(function(rec) {
+ if (!rec.data.active) {
+ return;
+ }
+
+
+
+ colmodel.push({
+ "xtype": "ColumnModel",
+ "header": rec.data.title,
+ "width": rec.data.width * 1,
+ "dataIndex": rec.data.dataIndex,
+ "|renderer": !rec.data.type.match(/date/i) ?
+ "function(v) { return String.format('{0}', v); }" :
+ "function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }" , // special for date
+ "|xns": "Roo.grid",
+ "*prop": "cm[]"
+ });
+ });
+
+
+
+
+ alert("IPC:OUT:" + JSON.stringify({
+ '|xns' : 'Roo',
+ xtype : "GridPanel",
+ "title": this.table,
+ "fitToframe": true,
+ "fitContainer": true,
+ "tableName": this.table,
+ "background": true,
+ "region" : 'center',
+ "listeners": {
+ "|activate": "function() {\n _this.panel = this;\n if (_this.grid) {\n _this.grid.footer.onClick('first');\n }\n}"
+ },
+ "items": [
+ {
+ "*prop": "grid",
+ "xtype": "Grid",
+ "autoExpandColumn": this.firstTxtCol,
+ "loadMask": true,
+ "listeners": {
+ "|render": "function() \n" +
+ "{\n" +
+ " _this.grid = this; \n" +
+ " //_this.dialog = Pman.Dialog.FILL_IN\n" +
+ " if (_this.panel.active) {\n" +
+ " this.footer.onClick('first');\n" +
+ " }\n" +
+ "}",
+ "|rowdblclick": "function (_self, rowIndex, e)\n" +
+ "{\n" +
+ " if (!_this.dialog) return;\n" +
+ " _this.dialog.show( this.getDataSource().getAt(rowIndex).data, function() {\n" +
+ " _this.grid.footer.onClick('first');\n" +
+ " }); \n" +
+ "}\n"
+ },
+ "|xns": "Roo.grid",
+
+ "items": [
+ {
+ "*prop": "dataSource",
+ "xtype": "Store",
+ remoteSort : true,
+ '|sortInfo' : "{ field : '" + this.firstTxtCol + "', direction: 'ASC' }",
+ "|xns": "Roo.data",
+ "items": [
+
+ {
+ "*prop": "proxy",
+ "xtype": "HttpProxy",
+ "method": "GET",
+ "|url": "baseURL + '/Roo/" + this.table + ".php'",
+ "|xns": "Roo.data"
+ },
+ {
+ '*prop' : 'reader',
+ 'xtype' : 'JsonReader',
+ '|xns' : 'Roo.data',
+ 'id' : 'id',
+ 'root' : 'data',
+ 'totalProperty' : 'total'
+ }
+ ]
+ },
+ {
+ "*prop": "footer",
+ "xtype": "PagingToolbar",
+ "pageSize": 25,
+ "displayInfo": true,
+ "displayMsg": "Displaying " + this.table + "{0} - {1} of {2}",
+ "emptyMsg": "No " + this.table + " found",
+ "|xns": "Roo"
+ },
+ {
+ "*prop": "toolbar",
+ "xtype": "Toolbar",
+ "|xns": "Roo",
+ "items": [
+ {
+ "text": "Add",
+ "xtype": "Button",
+ "cls": "x-btn-text-icon",
+ "|icon": "Roo.rootURL + 'images/default/dd/drop-add.gif'",
+ "listeners": {
+ "|click": "function()\n"+
+ "{\n"+
+ " if (!_this.dialog) return;\n" +
+ " _this.dialog.show( { id : 0 } , function() {\n"+
+ " _this.grid.footer.onClick('first');\n"+
+ " }); \n"+
+ "}\n"
+ },
+ "|xns": "Roo.Toolbar"
+ },
+ // fill ????
+ {
+ "text": "Delete",
+ "cls": "x-btn-text-icon",
+ "|icon": "rootURL + '/Pman/templates/images/trash.gif'",
+ "xtype": "Button",
+ "listeners": {
+ "|click": "function()\n"+
+ "{\n"+
+ " Pman.genericDelete(_this, '" + this.table + "'); \n"+
+ "}\n"+
+ " "
+ },
+ "|xns": "Roo.Toolbar"
+ }
+ ]
+ }, // end toolbar
+ ].concat( colmodel)
+ }
+ ]
+
+
+ }, null, 4));
+
+ },
+ xns : Roo,
+ xtype : 'GridPanel',
+ listeners : {
+ activate : function() {
+ _this.panel = this;
+ if (_this.grid) {
+ _this.grid.footer.onClick('first');
+ }
+ }
+ },
+ items : [
+
+ ]
+
+ }; }
+});
--- /dev/null
+{
+ "name" : "Editor.Roo.LayoutDialog",
+ "parent" : "",
+ "title" : "",
+ "path" : "/home/edward/gitlive/app.Builder.js/resources/Editors/Editor.Roo.LayoutDialog.bjs",
+ "permname" : "",
+ "modOrder" : "001",
+ "strings" : {
+ "b021df6aac4654c454f46c77646e745f" : "Label",
+ "793548e77e782c209a78ed67f255b5e2" : "Display Field",
+ "040076bde7f6b3387448e32b66c2eee0" : "To BJS",
+ "4ce58cbe362a5d7b156992a496d55bf3" : "Database Column",
+ "189efd19c4153526994a6d7ea5f6f068" : "Field Type",
+ "2f616612593df62aeed112de4f03110e" : "Edit a Grid",
+ "0ccc2bf3fb98387c23b6ca5500244d6e" : "Use ",
+ "c671c787b49f50a3ace9fdc5bd597825" : "core_enum",
+ "32954654ac8fe66a1d09be19001de2d4" : "Width",
+ "a1fa27779242b4902f7ae3bdd5c6d508" : "Type",
+ "6e7376dca68a2386a8737944196ab491" : "Create / Edit Grid",
+ "f541774a08fc687f6e2016c77a6ebca5" : "Load Data"
+ },
+ "items" : [
+ {
+ "listeners" : {
+ "|activate" : "function() {\n _this.panel = this;\n if (_this.grid) {\n _this.grid.footer.onClick('first');\n }\n}"
+ },
+ "| function loadData" : "function(data) { \n\n //alert(\"IPC:TEST:\" + JSON.stringify(data,null,4));\n\n var fields = _this.grid.dataSource.reader.recordType.prototype.fields;\n \n var d = [];\n\n for (var k in data) { \n var r = data[k];\n var has_s = typeof(r.relates_to_schema) != 'undefined';\n \n Roo.log(r.Type);\n var field_type = 'TextField';\n \n if (r.Type == 'text'){\n field_type = 'TextArea';\n }\n \n if(r.Type == 'date' || r.Type == 'datetime'){\n field_type = 'DateField';\n }\n \n var regex = /(.*?)\\((.*?)\\)/;\n \n if(regex.test(r.Type)){\n var type_match = regex.exec(r.Type);\n \n if(type_match[1] == 'int'){\n field_type = 'NumberField';\n \n if(type_match[2] * 1 < 11){\n field_type = 'Checkbox';\n }\n }\n } \n \n var rt = '', rc = '', rs = [];\n \n if(has_s){\n for (var kk in r.relates_to_schema) { \n var rr = r.relates_to_schema[kk];\n \n rt = r.relates_to_table;\n rc = r.relates_to_col;\n \n rs.push([rr.Field]);\n \n }\n \n field_type = 'ComboBox';\n }\n \n if(r.Field == 'id'){ // usually 'id' is hidden on the form\n field_type = 'Hidden';\n }\n \n \n \n var o = {\n active : !has_s,\n dataIndex : r.Field,\n type : r.Type,\n title : r.Field,\n width : 200,\n ftype : field_type,\n display_field : rc, //r.Field + '_display_name',\n relates_to_table : rt,\n relates_to_col : rc,\n relates_to_schema : rs\n };\n \n d.push(o);\n \n }\n\n var ar = [];\n \n Roo.each(d, function(dd){\n\n var a = [];\n \n for(var j = 0; j < fields.length; j++){\n var f = fields.items[j];\n \n if(dd.hasOwnProperty(f.name)){\n a.push(dd[f.name]);\n }\n }\n \n ar.push(a);\n });\n \n this.schema = data;\n \n //alert(\"IPC:TEST:\" + JSON.stringify(ar));\n this.grid.dataSource.loadData(ar);\n}",
+ "| function toBJS" : "function() { \n\n// convert the selected cells into a BJS data ready to send back to the UI..\n\n this.table = \"XXX\";\n this.firstTxtCol = \"XXX\";\n \n var formHeight = 50;\n \n var jreader = {};\n var formElements = [];\n this.grid.dataSource.each(function(rec) {\n if (!rec.data.active) {\n return;\n }\n \n var el = {\n fieldLabel : rec.data.title,\n name : rec.data.dataIndex,\n width : rec.data.width,\n '|xns' : 'Roo.form',\n xtype : rec.data.ftype\n }\n if (el.xtype == 'DateField') {\n el.format = 'Y-m-d';\n el.useIso = true;\n el.width = 100;\n }\n \n if (el.xtype == 'TextArea') {\n el.height = 100;\n }\n \n if (el.xtype == 'Hidden') {\n delete el.fieldLabel;\n delete el.width;\n }\n \n if (el.xtype == 'ComboBox') {\n \n el.alwaysQuery = true;\n el.triggerAction = 'all';\n el.forceSelection = true;\n el.selectOnFocus = true;\n el.minChars = 2;\n el.editable = true;\n el.emptyText = 'Select a value';\n \n \n el.queryParam = 'query[' + rec.data.display_field + ']';// SET WHEN USED\n \n el.hiddenName = rec.data.dataIndex // SET WHEN USED eg. project_id\n el.name = rec.data.dataIndex + '_' + rec.data.display_field; // SET WHEN USED eg. project_id_name\n \n el.displayField = rec.data.display_field // SET WHEN USED eg. project_id\n el.valueField = rec.data.relates_to_col \n \n el.tpl = '<div class=\"x-grid-cell-text x-btn button\"><b>{' + rec.data.display_field +'}</b> </div>'; // SET WHEN USED\n \n \n el.items = [\n {\n \n '*prop' : 'store',\n 'xtype' : 'Store',\n '|xns' : 'Roo.data',\n 'remoteSort' : true,\n '|sortInfo' : '{ direction : \\'ASC\\', field: \\'id\\' }',\n listeners : {\n '|beforeload' : 'function (_self, o)' +\n \"{\\n\" +\n \" o.params = o.params || {};\\n\" +\n \" // set more here\\n\" +\n \"}\\n\"\n },\n items : [\n {\n '*prop' : 'proxy',\n 'xtype' : 'HttpProxy',\n 'method' : 'GET',\n '|xns' : 'Roo.data',\n '|url' : \"baseURL + '/Roo/\" + rec.data.relates_to_table + \".php'\",\n },\n \n {\n '*prop' : 'reader',\n 'xtype' : 'JsonReader',\n '|xns' : 'Roo.data',\n 'id' : 'id',\n 'root' : 'data',\n 'totalProperty' : 'total'\n\n \n }\n ]\n }\n ];\n \n }\n \n if (el.xtype == 'ComboBoxArray') {\n \n el.hiddenName = rec.data.dataIndex;\n el.name = rec.data.dataIndex + '_' + rec.data.display_field;\n \n el.items = [\n {\n 'alwaysQuery' : true,\n 'triggerAction' : 'all',\n 'forceSelection': true,\n 'selectOnFocus' : true,\n 'minChars' :2,\n 'editable' : true,\n 'emptyText' : 'Select a value',\n 'displayField' : rec.data.display_field,\n 'valueField' : rec.data.relates_to_col,\n 'xtype' : 'ComboBox',\n '$ xns' : 'Roo.form',\n '* prop' : 'combo',\n 'queryParam' : 'query[' + rec.data.display_field + ']',\n 'tpl' : '<div class=\"x-grid-cell-text x-btn button\"><b>{' + rec.data.display_field +'}</b> </div>',\n \n items : [\n {\n '*prop' : 'store',\n 'xtype' : 'Store',\n '|xns' : 'Roo.data',\n 'remoteSort' : true,\n '|sortInfo' : '{ direction : \\'ASC\\', field: \\'id\\' }',\n listeners : {\n '|beforeload' : 'function (_self, o)' +\n \"{\\n\" +\n \" o.params = o.params || {};\\n\" +\n \" // set more here\\n\" +\n \"}\\n\"\n },\n items : [\n {\n '*prop' : 'proxy',\n 'xtype' : 'HttpProxy',\n 'method' : 'GET',\n '|xns' : 'Roo.data',\n '|url' : \"baseURL + '/Roo/\" + rec.data.relates_to_table + \".php'\",\n },\n {\n '*prop' : 'reader',\n 'xtype' : 'JsonReader',\n '|xns' : 'Roo.data',\n 'id' : 'id',\n 'root' : 'data',\n 'totalProperty' : 'total'\n }\n \n ]\n }\n ]\n }\n ];\n }\n \n if (el.xtype == 'HtmlEditor') {\n el.height = 250,\n el.resizable = 's',\n el.items = [\n {\n '* prop' : 'toolbars[]',\n '|xns' : 'Roo.form.HtmlEditor',\n 'xtype' : 'ToolbarContext'\n },\n {\n '* prop' : 'toolbars[]',\n '|xns' : 'Roo.form.HtmlEditor',\n 'xtype' : 'ToolbarStandard'\n\n }\n ]\n }\n \n formElements.push(el);\n \n formHeight += rec.data.ftype == 'TextArea' ? 100 : ((rec.data.ftype == 'HtmlEditor') ? 250 : 30);\n \n \n });\n \n \n \n \n \n \n var frmCfg = \n {\n '|xns' : 'Roo.form',\n xtype : \"Form\",\n listeners : {\n \"|actioncomplete\" : \"function(_self,action)\\n\"+\n \"{\\n\"+\n \" if (action.type == 'setdata') {\\n\"+\n \" //this.load({ method: 'GET', params: { '_id' : _this.data.id }});\\n\"+\n \" return;\\n\"+\n \" }\\n\"+\n \" if (action.type == 'load') {\\n\"+\n \" return;\\n\"+\n \" }\\n\"+\n \" if (action.type =='submit') {\\n\"+\n \" \\n\"+\n \" _this.dialog.hide();\\n\"+\n \" \\n\"+\n \" if (_this.callback) {\\n\"+\n \" _this.callback.call(_this, action.result.data);\\n\"+\n \" }\\n\"+\n \" _this.form.reset();\\n\"+\n \" return;\\n\"+\n \" }\\n\"+\n \"}\\n\",\n \n \"|rendered\" : \"function (form)\\n\"+\n \"{\\n\"+\n \" _this.form= form;\\n\"+\n \"}\\n\"\n },\n method : \"POST\",\n style : \"margin:10px;\",\n \"|url\" : \"baseURL + '/Roo/\" + this.table + \"'\",\n items : formElements\n };\n \n\n alert(\"IPC:OUT:\" + JSON.stringify({\n \"closable\": false,\n \"collapsible\": false,\n \"height\": formHeight,\n \"resizable\": false,\n \"title\": \"Edit / Create \" + this.table,\n \"width\": 400,\n \"modal\" : true,\n \"xtype\": \"LayoutDialog\",\n \"|xns\": \"Roo\",\n \"items\": [\n {\n \"|xns\": \"Roo\",\n \"xtype\": \"LayoutRegion\",\n \"*prop\": \"center\"\n },\n {\n \"region\": \"center\",\n \"xtype\": \"ContentPanel\",\n \"|xns\": \"Roo\",\n \"items\": [\n frmCfg\n ]\n },\n \n {\n \"listeners\": {\n \"click\": \"function (_self, e)\\n{\\n _this.dialog.hide();\\n}\"\n },\n \"*prop\": \"buttons[]\",\n \"text\": \"Cancel\",\n \"xtype\": \"Button\",\n \"|xns\": \"Roo\"\n },\n {\n \"listeners\": {\n \"click\": \"function (_self, e)\\n{\\n // do some checks?\\n \\n \\n _this.dialog.el.mask(\\\"Saving\\\");\\n _this.form.doAction(\\\"submit\\\");\\n\\n}\"\n },\n \"*prop\": \"buttons[]\",\n \"text\": \"Save\",\n \"xtype\": \"Button\",\n \"|xns\": \"Roo\"\n }\n ]\n \n \n \n }, null, 4));\n\n}",
+ "fitToframe" : true,
+ "background" : false,
+ "region" : "center",
+ "title" : "core_enum",
+ "xtype" : "GridPanel",
+ "$ xns" : "Roo",
+ "fitContainer" : true,
+ "String title" : "Create / Edit Grid",
+ "tableName" : "core_enum",
+ "items" : [
+ {
+ "listeners" : {
+ "|rowdblclick" : "function (_self, rowIndex, e)\n{\n if (!_this.dialog) return;\n \n}\n",
+ "beforeedit" : "function (e)\n{\n Roo.log('before edit!!!');\n Roo.log(e);\n \n if(e.field != 'display_field'){\n return;\n }\n \n _this.grid.colModel.getCellEditor(e.column, e.row).field.store.loadData(e.record.data.relates_to_schema);\n}",
+ "cellclick" : "function (_self, rowIndex, columnIndex, e)\n{\n\n var di = this.colModel.getDataIndex(columnIndex);\n if (di != 'active') {\n return;\n }\n \n var rec = _this.grid.ds.getAt(rowIndex);\n \n rec.set('active', rec.data.active * 1 ? 0 : 1);\n rec.commit();\n \n \n}",
+ "|render" : "function() \n{\n _this.grid = this; \n //_this.dialog = Pman.Dialog.FILL_IN\n\n}"
+ },
+ "Number clicksToEdit" : 1,
+ "autoExpandColumn" : "title",
+ "xtype" : "EditorGrid",
+ "loadMask" : true,
+ "$ xns" : "Roo.grid",
+ "* prop" : "grid",
+ "items" : [
+ {
+ "$ Array fields" : "[ \n 'active', \n 'dataIndex', \n 'type',\n 'title', \n 'width', \n 'ftype', \n 'display_field',\n 'relates_to_table',\n 'relates_to_col',\n 'relates_to_schema'\n]",
+ "$ Array data" : "[\n [ 1, 'test', 'test', 110 ]\n \n\n]",
+ "Number id" : "'dataIndex'",
+ "xtype" : "SimpleStore",
+ "$ xns" : "Roo.data",
+ "* prop" : "ds"
+ },
+ {
+ "xtype" : "Toolbar",
+ "$ xns" : "Roo",
+ "* prop" : "toolbar",
+ "items" : [
+ {
+ "string text" : "Edit a Grid",
+ "xtype" : "TextItem",
+ "$ xns" : "Roo.Toolbar"
+ },
+ {
+ "xtype" : "Fill",
+ "$ xns" : "Roo.Toolbar"
+ },
+ {
+ "listeners" : {
+ "click" : "function (_self, e)\n{\n var data = { \n \"manage_scale_id\": {\n \"Field\": \"manage_scale_id\",\n \"Type\": \"int(11)\",\n \"Null\": \"NO\",\n \"Key\": null,\n \"Default\": \"0\",\n \"Extra\": null,\n \"relates_to_table\": \"core_enum\",\n \"relates_to_col\": \"id\",\n \"relates_to_schema\": {\n \"id\": {\n \"Field\": \"id\",\n \"Type\": \"int(11)\",\n \"Null\": \"NO\",\n \"Key\": \"PRI\",\n \"Default\": null,\n \"Extra\": \"auto_increment\"\n },\n \"etype\": {\n \"Field\": \"etype\",\n \"Type\": \"varchar(32)\",\n \"Null\": \"NO\",\n \"Key\": null,\n \"Default\": null,\n \"Extra\": null\n },\n \"name\": {\n \"Field\": \"name\",\n \"Type\": \"varchar(255)\",\n \"Null\": \"NO\",\n \"Key\": null,\n \"Default\": null,\n \"Extra\": null\n },\n \"active\": {\n \"Field\": \"active\",\n \"Type\": \"int(2)\",\n \"Null\": \"NO\",\n \"Key\": null,\n \"Default\": \"1\",\n \"Extra\": null\n },\n \"seqid\": {\n \"Field\": \"seqid\",\n \"Type\": \"int(11)\",\n \"Null\": \"NO\",\n \"Key\": \"MUL\",\n \"Default\": \"0\",\n \"Extra\": null\n },\n \"seqmax\": {\n \"Field\": \"seqmax\",\n \"Type\": \"int(11)\",\n \"Null\": \"NO\",\n \"Key\": null,\n \"Default\": \"0\",\n \"Extra\": null\n },\n \"display_name\": {\n \"Field\": \"display_name\",\n \"Type\": \"text\",\n \"Null\": \"NO\",\n \"Key\": null,\n \"Default\": null,\n \"Extra\": null\n },\n \"is_system_enum\": {\n \"Field\": \"is_system_enum\",\n \"Type\": \"int(2)\",\n \"Null\": \"NO\",\n \"Key\": null,\n \"Default\": \"0\",\n \"Extra\": null\n }\n }\n },\n \"person_type\": {\n \"Field\": \"person_type\",\n \"Type\": \"text\",\n \"Null\": \"NO\",\n \"Key\": null,\n \"Default\": null,\n \"Extra\": null\n },\n \"employer_name\": {\n \"Field\": \"employer_name\",\n \"Type\": \"text\",\n \"Null\": \"NO\",\n \"Key\": null,\n \"Default\": null,\n \"Extra\": null\n },\n \"birth_date\": {\n \"Field\": \"birth_date\",\n \"Type\": \"date\",\n \"Null\": \"NO\",\n \"Key\": null,\n \"Default\": \"0000-00-00\",\n \"Extra\": null\n },\n \"employ_start_date\": {\n \"Field\": \"employ_start_date\",\n \"Type\": \"date\",\n \"Null\": \"NO\",\n \"Key\": null,\n \"Default\": \"0000-00-00\",\n \"Extra\": null\n },\n \"employ_end_date\": {\n \"Field\": \"employ_end_date\",\n \"Type\": \"date\",\n \"Null\": \"NO\",\n \"Key\": null,\n \"Default\": \"0000-00-00\",\n \"Extra\": null\n },\n \"hide_same_employer\": {\n \"Field\": \"hide_same_employer\",\n \"Type\": \"int(4)\",\n \"Null\": \"NO\",\n \"Key\": null,\n \"Default\": \"0\",\n \"Extra\": null\n },\n \"salary_currency\": {\n \"Field\": \"salary_currency\",\n \"Type\": \"varchar(256)\",\n \"Null\": \"NO\",\n \"Key\": null,\n \"Default\": null,\n \"Extra\": null\n },\n \"quota_currency\": {\n \"Field\": \"quota_currency\",\n \"Type\": \"varchar(256)\",\n \"Null\": \"NO\",\n \"Key\": null,\n \"Default\": null,\n \"Extra\": null\n },\n \"created_dt\": {\n \"Field\": \"created_dt\",\n \"Type\": \"datetime\",\n \"Null\": \"NO\",\n \"Key\": null,\n \"Default\": \"0000-00-00 00:00:00\",\n \"Extra\": null\n },\n \"updated_dt\": {\n \"Field\": \"updated_dt\",\n \"Type\": \"datetime\",\n \"Null\": \"NO\",\n \"Key\": null,\n \"Default\": \"0000-00-00 00:00:00\",\n \"Extra\": null\n }\n };\n \n Roo.log('Loading Data...');\n _this.panel.loadData(data);\n\n}"
+ },
+ "xtype" : "Button",
+ "String text" : "Load Data",
+ "$ xns" : "Roo.Toolbar"
+ },
+ {
+ "xtype" : "Separator",
+ "$ xns" : "Roo.Toolbar"
+ },
+ {
+ "listeners" : {
+ "click" : "function (_self, e)\n{\n \n Roo.log('Converting to BJS...');\n _this.panel.toBJS();\n\n}"
+ },
+ "xtype" : "Button",
+ "String text" : "To BJS",
+ "$ xns" : "Roo.Toolbar"
+ }
+ ]
+ },
+ {
+ "xtype" : "ColumnModel",
+ "header" : "Use ",
+ "width" : 75,
+ "$ renderer" : "function(v) { \n var state = v *1 > 0 ? '-checked' : '';\n\n return '<img class=\"x-grid-check-icon' + state + '\" src=\"' + Roo.BLANK_IMAGE_URL + '\"/>';\n \n }",
+ "$ xns" : "Roo.grid",
+ "* prop" : "cm[]",
+ "dataIndex" : "active"
+ },
+ {
+ "xtype" : "ColumnModel",
+ "width" : 150,
+ "header" : "Database Column",
+ "$ renderer" : "function(v) { return String.format('{0}', v); }",
+ "$ xns" : "Roo.grid",
+ "* prop" : "cm[]",
+ "dataIndex" : "dataIndex"
+ },
+ {
+ "xtype" : "ColumnModel",
+ "header" : "Type",
+ "width" : 100,
+ "$ renderer" : "function(v) { return String.format('{0}', v); }",
+ "$ xns" : "Roo.grid",
+ "* prop" : "cm[]",
+ "dataIndex" : "type"
+ },
+ {
+ "xtype" : "ColumnModel",
+ "width" : 120,
+ "header" : "Label",
+ "$ renderer" : "function(v) { return String.format('{0}', v); }",
+ "$ xns" : "Roo.grid",
+ "* prop" : "cm[]",
+ "dataIndex" : "title",
+ "items" : [
+ {
+ "xtype" : "GridEditor",
+ "$ xns" : "Roo.grid",
+ "* prop" : "editor",
+ "items" : [
+ {
+ "xtype" : "TextField",
+ "$ xns" : "Roo.form",
+ "* prop" : "field"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "xtype" : "ColumnModel",
+ "header" : "Field Type",
+ "width" : 120,
+ "$ renderer" : "function(v) { return String.format('{0}', v); }",
+ "$ xns" : "Roo.grid",
+ "* prop" : "cm[]",
+ "dataIndex" : "ftype",
+ "items" : [
+ {
+ "xtype" : "GridEditor",
+ "$ xns" : "Roo.grid",
+ "* prop" : "editor",
+ "items" : [
+ {
+ "listWidth" : 200,
+ "triggerAction" : "all",
+ "displayField" : "fname",
+ "hiddenName" : "status",
+ "valueField" : "ftype",
+ "xtype" : "ComboBox",
+ "allowBlank" : false,
+ "editable" : false,
+ "width" : 150,
+ "$ xns" : "Roo.form",
+ "mode" : "local",
+ "name" : "ftype",
+ "* prop" : "field",
+ "items" : [
+ {
+ "xtype" : "SimpleStore",
+ "$ data" : "[ \n [ 'ComboBox', \"ComboBox\"],\n [ 'ComboBoxArray', \"ComboBoxArray\"],\n [ 'TextField' , \"TextField\"],\n [ 'NumberField', \"NumberField\"],\n [ 'TextArea', \"TextArea\"],\n [ 'HtmlEditor', \"HtmlEditor\"],\n [ 'Hidden', \"Hidden\"],\n [ 'DateField', \"DateField\"],\n [ 'Checkbox', \"Checkbox\"] \n // checkbox?\n]\n",
+ "$ fields" : "[ 'ftype', 'fname']",
+ "$ xns" : "Roo.data",
+ "* prop" : "store"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "xtype" : "ColumnModel",
+ "width" : 150,
+ "header" : "Display Field",
+ "$ renderer" : "function(v) { return String.format('{0}', v); }",
+ "$ xns" : "Roo.grid",
+ "* prop" : "cm[]",
+ "dataIndex" : "display_field",
+ "items" : [
+ {
+ "xtype" : "GridEditor",
+ "$ xns" : "Roo.grid",
+ "* prop" : "editor",
+ "items" : [
+ {
+ "listWidth" : 200,
+ "triggerAction" : "all",
+ "displayField" : "dfield",
+ "hiddenName" : "status",
+ "valueField" : "dfield",
+ "xtype" : "ComboBox",
+ "allowBlank" : false,
+ "editable" : false,
+ "width" : 150,
+ "$ xns" : "Roo.form",
+ "mode" : "local",
+ "name" : "display_field",
+ "* prop" : "field",
+ "items" : [
+ {
+ "xtype" : "SimpleStore",
+ "$ data" : "[ \n ['id']\n]\n",
+ "$ fields" : "[ 'dfield']",
+ "$ xns" : "Roo.data",
+ "* prop" : "store"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "xtype" : "ColumnModel",
+ "header" : "Width",
+ "width" : 75,
+ "$ renderer" : "function(v) { return String.format('{0}', v); }",
+ "$ xns" : "Roo.grid",
+ "* prop" : "cm[]",
+ "dataIndex" : "width",
+ "items" : [
+ {
+ "xtype" : "GridEditor",
+ "$ xns" : "Roo.grid",
+ "* prop" : "editor",
+ "items" : [
+ {
+ "xtype" : "NumberField",
+ "Number decimalPrecision" : 0,
+ "$ xns" : "Roo.form",
+ "* prop" : "field"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file
--- /dev/null
+//<script type="text/javascript">
+
+// Auto generated file - created by app.Builder.js- do not edit directly (at present!)
+
+Roo.namespace('Editor.Roo');
+
+Editor.Roo.LayoutDialog = new Roo.XComponent({
+
+ _strings : {
+ 'b021df6aac4654c454f46c77646e745f' :"Label",
+ '793548e77e782c209a78ed67f255b5e2' :"Display Field",
+ '040076bde7f6b3387448e32b66c2eee0' :"To BJS",
+ '4ce58cbe362a5d7b156992a496d55bf3' :"Database Column",
+ '189efd19c4153526994a6d7ea5f6f068' :"Field Type",
+ '2f616612593df62aeed112de4f03110e' :"Edit a Grid",
+ '0ccc2bf3fb98387c23b6ca5500244d6e' :"Use ",
+ 'c671c787b49f50a3ace9fdc5bd597825' :"core_enum",
+ '32954654ac8fe66a1d09be19001de2d4' :"Width",
+ 'a1fa27779242b4902f7ae3bdd5c6d508' :"Type",
+ '6e7376dca68a2386a8737944196ab491' :"Create / Edit Grid",
+ 'f541774a08fc687f6e2016c77a6ebca5' :"Load Data"
+ },
+
+ part : ["Editors", "LayoutDialog" ],
+ order : '001-Editor.Roo.LayoutDialog',
+ region : 'center',
+ parent : false,
+ name : "unnamed module",
+ disabled : false,
+ permname : '',
+ _tree : function()
+ {
+ var _this = this;
+ var MODULE = this;
+ return {
+ grid : {
+ ds : {
+ '|xns' : 'Roo.data',
+ data : [
+ [ 1, 'test', 'test', 110 ]
+
+
+ ],
+ fields : [
+ 'active',
+ 'dataIndex',
+ 'type',
+ 'title',
+ 'width',
+ 'ftype',
+ 'display_field',
+ 'relates_to_table',
+ 'relates_to_col',
+ 'relates_to_schema'
+ ],
+ id : 'dataindex',
+ xns : Roo.data,
+ xtype : 'SimpleStore'
+ },
+ toolbar : {
+ '|xns' : 'Roo',
+ xns : Roo,
+ xtype : 'Toolbar',
+ items : [
+ {
+ '|xns' : 'Roo.Toolbar',
+ text : _this._strings['2f616612593df62aeed112de4f03110e'],
+ xns : Roo.Toolbar,
+ xtype : 'TextItem'
+ },
+ {
+ '|xns' : 'Roo.Toolbar',
+ xns : Roo.Toolbar,
+ xtype : 'Fill'
+ },
+ {
+ '|xns' : 'Roo.Toolbar',
+ text : _this._strings['f541774a08fc687f6e2016c77a6ebca5'],
+ xns : Roo.Toolbar,
+ xtype : 'Button',
+ listeners : {
+ click : function (_self, e)
+ {
+ var data = {
+ "manage_scale_id": {
+ "Field": "manage_scale_id",
+ "Type": "int(11)",
+ "Null": "NO",
+ "Key": null,
+ "Default": "0",
+ "Extra": null,
+ "relates_to_table": "core_enum",
+ "relates_to_col": "id",
+ "relates_to_schema": {
+ "id": {
+ "Field": "id",
+ "Type": "int(11)",
+ "Null": "NO",
+ "Key": "PRI",
+ "Default": null,
+ "Extra": "auto_increment"
+ },
+ "etype": {
+ "Field": "etype",
+ "Type": "varchar(32)",
+ "Null": "NO",
+ "Key": null,
+ "Default": null,
+ "Extra": null
+ },
+ "name": {
+ "Field": "name",
+ "Type": "varchar(255)",
+ "Null": "NO",
+ "Key": null,
+ "Default": null,
+ "Extra": null
+ },
+ "active": {
+ "Field": "active",
+ "Type": "int(2)",
+ "Null": "NO",
+ "Key": null,
+ "Default": "1",
+ "Extra": null
+ },
+ "seqid": {
+ "Field": "seqid",
+ "Type": "int(11)",
+ "Null": "NO",
+ "Key": "MUL",
+ "Default": "0",
+ "Extra": null
+ },
+ "seqmax": {
+ "Field": "seqmax",
+ "Type": "int(11)",
+ "Null": "NO",
+ "Key": null,
+ "Default": "0",
+ "Extra": null
+ },
+ "display_name": {
+ "Field": "display_name",
+ "Type": "text",
+ "Null": "NO",
+ "Key": null,
+ "Default": null,
+ "Extra": null
+ },
+ "is_system_enum": {
+ "Field": "is_system_enum",
+ "Type": "int(2)",
+ "Null": "NO",
+ "Key": null,
+ "Default": "0",
+ "Extra": null
+ }
+ }
+ },
+ "person_type": {
+ "Field": "person_type",
+ "Type": "text",
+ "Null": "NO",
+ "Key": null,
+ "Default": null,
+ "Extra": null
+ },
+ "employer_name": {
+ "Field": "employer_name",
+ "Type": "text",
+ "Null": "NO",
+ "Key": null,
+ "Default": null,
+ "Extra": null
+ },
+ "birth_date": {
+ "Field": "birth_date",
+ "Type": "date",
+ "Null": "NO",
+ "Key": null,
+ "Default": "0000-00-00",
+ "Extra": null
+ },
+ "employ_start_date": {
+ "Field": "employ_start_date",
+ "Type": "date",
+ "Null": "NO",
+ "Key": null,
+ "Default": "0000-00-00",
+ "Extra": null
+ },
+ "employ_end_date": {
+ "Field": "employ_end_date",
+ "Type": "date",
+ "Null": "NO",
+ "Key": null,
+ "Default": "0000-00-00",
+ "Extra": null
+ },
+ "hide_same_employer": {
+ "Field": "hide_same_employer",
+ "Type": "int(4)",
+ "Null": "NO",
+ "Key": null,
+ "Default": "0",
+ "Extra": null
+ },
+ "salary_currency": {
+ "Field": "salary_currency",
+ "Type": "varchar(256)",
+ "Null": "NO",
+ "Key": null,
+ "Default": null,
+ "Extra": null
+ },
+ "quota_currency": {
+ "Field": "quota_currency",
+ "Type": "varchar(256)",
+ "Null": "NO",
+ "Key": null,
+ "Default": null,
+ "Extra": null
+ },
+ "created_dt": {
+ "Field": "created_dt",
+ "Type": "datetime",
+ "Null": "NO",
+ "Key": null,
+ "Default": "0000-00-00 00:00:00",
+ "Extra": null
+ },
+ "updated_dt": {
+ "Field": "updated_dt",
+ "Type": "datetime",
+ "Null": "NO",
+ "Key": null,
+ "Default": "0000-00-00 00:00:00",
+ "Extra": null
+ }
+ };
+
+ Roo.log('Loading Data...');
+ _this.panel.loadData(data);
+
+ }
+ }
+ },
+ {
+ '|xns' : 'Roo.Toolbar',
+ xns : Roo.Toolbar,
+ xtype : 'Separator'
+ },
+ {
+ '|xns' : 'Roo.Toolbar',
+ text : _this._strings['040076bde7f6b3387448e32b66c2eee0'],
+ xns : Roo.Toolbar,
+ xtype : 'Button',
+ listeners : {
+ click : function (_self, e)
+ {
+
+ Roo.log('Converting to BJS...');
+ _this.panel.toBJS();
+
+ }
+ }
+ }
+ ]
+
+ },
+ '|xns' : 'Roo.grid',
+ autoExpandColumn : 'title',
+ clicksToEdit : 1,
+ loadMask : true,
+ xns : Roo.grid,
+ xtype : 'EditorGrid',
+ cm : [
+ {
+ '|xns' : 'Roo.grid',
+ dataIndex : 'active',
+ header : _this._strings['0ccc2bf3fb98387c23b6ca5500244d6e'],
+ renderer : function(v) {
+ var state = v *1 > 0 ? '-checked' : '';
+
+ return '<img class="x-grid-check-icon' + state + '" src="' + Roo.BLANK_IMAGE_URL + '"/>';
+
+ },
+ width : 75,
+ xns : Roo.grid,
+ xtype : 'ColumnModel'
+ },
+{
+ '|xns' : 'Roo.grid',
+ dataIndex : 'dataIndex',
+ header : _this._strings['4ce58cbe362a5d7b156992a496d55bf3'],
+ renderer : function(v) { return String.format('{0}', v); },
+ width : 150,
+ xns : Roo.grid,
+ xtype : 'ColumnModel'
+ },
+{
+ '|xns' : 'Roo.grid',
+ dataIndex : 'type',
+ header : _this._strings['a1fa27779242b4902f7ae3bdd5c6d508'],
+ renderer : function(v) { return String.format('{0}', v); },
+ width : 100,
+ xns : Roo.grid,
+ xtype : 'ColumnModel'
+ },
+{
+ editor : {
+ field : {
+ '|xns' : 'Roo.form',
+ xns : Roo.form,
+ xtype : 'TextField'
+ },
+ '|xns' : 'Roo.grid',
+ xns : Roo.grid,
+ xtype : 'GridEditor',
+ items : [
+
+ ]
+
+ },
+ '|xns' : 'Roo.grid',
+ dataIndex : 'title',
+ header : _this._strings['b021df6aac4654c454f46c77646e745f'],
+ renderer : function(v) { return String.format('{0}', v); },
+ width : 120,
+ xns : Roo.grid,
+ xtype : 'ColumnModel',
+ items : [
+
+ ]
+
+ },
+{
+ editor : {
+ field : {
+ store : {
+ '|xns' : 'Roo.data',
+ data : [
+ [ 'ComboBox', "ComboBox"],
+ [ 'ComboBoxArray', "ComboBoxArray"],
+ [ 'TextField' , "TextField"],
+ [ 'NumberField', "NumberField"],
+ [ 'TextArea', "TextArea"],
+ [ 'HtmlEditor', "HtmlEditor"],
+ [ 'Hidden', "Hidden"],
+ [ 'DateField', "DateField"],
+ [ 'Checkbox', "Checkbox"]
+ // checkbox?
+ ],
+ fields : [ 'ftype', 'fname'],
+ xns : Roo.data,
+ xtype : 'SimpleStore'
+ },
+ '|xns' : 'Roo.form',
+ allowBlank : false,
+ displayField : 'fname',
+ editable : false,
+ hiddenName : 'status',
+ listWidth : 200,
+ mode : 'local',
+ name : 'ftype',
+ triggerAction : 'all',
+ valueField : 'ftype',
+ width : 150,
+ xns : Roo.form,
+ xtype : 'ComboBox',
+ items : [
+
+ ]
+
+ },
+ '|xns' : 'Roo.grid',
+ xns : Roo.grid,
+ xtype : 'GridEditor',
+ items : [
+
+ ]
+
+ },
+ '|xns' : 'Roo.grid',
+ dataIndex : 'ftype',
+ header : _this._strings['189efd19c4153526994a6d7ea5f6f068'],
+ renderer : function(v) { return String.format('{0}', v); },
+ width : 120,
+ xns : Roo.grid,
+ xtype : 'ColumnModel',
+ items : [
+
+ ]
+
+ },
+{
+ editor : {
+ field : {
+ store : {
+ '|xns' : 'Roo.data',
+ data : [
+ ['id']
+ ],
+ fields : [ 'dfield'],
+ xns : Roo.data,
+ xtype : 'SimpleStore'
+ },
+ '|xns' : 'Roo.form',
+ allowBlank : false,
+ displayField : 'dfield',
+ editable : false,
+ hiddenName : 'status',
+ listWidth : 200,
+ mode : 'local',
+ name : 'display_field',
+ triggerAction : 'all',
+ valueField : 'dfield',
+ width : 150,
+ xns : Roo.form,
+ xtype : 'ComboBox',
+ items : [
+
+ ]
+
+ },
+ '|xns' : 'Roo.grid',
+ xns : Roo.grid,
+ xtype : 'GridEditor',
+ items : [
+
+ ]
+
+ },
+ '|xns' : 'Roo.grid',
+ dataIndex : 'display_field',
+ header : _this._strings['793548e77e782c209a78ed67f255b5e2'],
+ renderer : function(v) { return String.format('{0}', v); },
+ width : 150,
+ xns : Roo.grid,
+ xtype : 'ColumnModel',
+ items : [
+
+ ]
+
+ },
+{
+ editor : {
+ field : {
+ '|xns' : 'Roo.form',
+ decimalPrecision : 0,
+ xns : Roo.form,
+ xtype : 'NumberField'
+ },
+ '|xns' : 'Roo.grid',
+ xns : Roo.grid,
+ xtype : 'GridEditor',
+ items : [
+
+ ]
+
+ },
+ '|xns' : 'Roo.grid',
+ dataIndex : 'width',
+ header : _this._strings['32954654ac8fe66a1d09be19001de2d4'],
+ renderer : function(v) { return String.format('{0}', v); },
+ width : 75,
+ xns : Roo.grid,
+ xtype : 'ColumnModel',
+ items : [
+
+ ]
+
+ }
+ ],
+ listeners : {
+ beforeedit : function (e)
+ {
+ Roo.log('before edit!!!');
+ Roo.log(e);
+
+ if(e.field != 'display_field'){
+ return;
+ }
+
+ _this.grid.colModel.getCellEditor(e.column, e.row).field.store.loadData(e.record.data.relates_to_schema);
+ },
+ cellclick : function (_self, rowIndex, columnIndex, e)
+ {
+
+ var di = this.colModel.getDataIndex(columnIndex);
+ if (di != 'active') {
+ return;
+ }
+
+ var rec = _this.grid.ds.getAt(rowIndex);
+
+ rec.set('active', rec.data.active * 1 ? 0 : 1);
+ rec.commit();
+
+
+ },
+ render : function()
+ {
+ _this.grid = this;
+ //_this.dialog = Pman.Dialog.FILL_IN
+
+ },
+ rowdblclick : function (_self, rowIndex, e)
+ {
+ if (!_this.dialog) return;
+
+ }
+ },
+ items : [
+
+ ]
+
+ },
+ '|xns' : 'Roo',
+ background : false,
+ fitContainer : true,
+ fitToframe : true,
+ loadData : function(data) {
+
+ //alert("IPC:TEST:" + JSON.stringify(data,null,4));
+
+ var fields = _this.grid.dataSource.reader.recordType.prototype.fields;
+
+ var d = [];
+
+ for (var k in data) {
+ var r = data[k];
+ var has_s = typeof(r.relates_to_schema) != 'undefined';
+
+ Roo.log(r.Type);
+ var field_type = 'TextField';
+
+ if (r.Type == 'text'){
+ field_type = 'TextArea';
+ }
+
+ if(r.Type == 'date' || r.Type == 'datetime'){
+ field_type = 'DateField';
+ }
+
+ var regex = /(.*?)\((.*?)\)/;
+
+ if(regex.test(r.Type)){
+ var type_match = regex.exec(r.Type);
+
+ if(type_match[1] == 'int'){
+ field_type = 'NumberField';
+
+ if(type_match[2] * 1 < 11){
+ field_type = 'Checkbox';
+ }
+ }
+ }
+
+ var rt = '', rc = '', rs = [];
+
+ if(has_s){
+ for (var kk in r.relates_to_schema) {
+ var rr = r.relates_to_schema[kk];
+
+ rt = r.relates_to_table;
+ rc = r.relates_to_col;
+
+ rs.push([rr.Field]);
+
+ }
+
+ field_type = 'ComboBox';
+ }
+
+ if(r.Field == 'id'){ // usually 'id' is hidden on the form
+ field_type = 'Hidden';
+ }
+
+
+
+ var o = {
+ active : !has_s,
+ dataIndex : r.Field,
+ type : r.Type,
+ title : r.Field,
+ width : 200,
+ ftype : field_type,
+ display_field : rc, //r.Field + '_display_name',
+ relates_to_table : rt,
+ relates_to_col : rc,
+ relates_to_schema : rs
+ };
+
+ d.push(o);
+
+ }
+
+ var ar = [];
+
+ Roo.each(d, function(dd){
+
+ var a = [];
+
+ for(var j = 0; j < fields.length; j++){
+ var f = fields.items[j];
+
+ if(dd.hasOwnProperty(f.name)){
+ a.push(dd[f.name]);
+ }
+ }
+
+ ar.push(a);
+ });
+
+ this.schema = data;
+
+ //alert("IPC:TEST:" + JSON.stringify(ar));
+ this.grid.dataSource.loadData(ar);
+ },
+ region : 'center',
+ tableName : 'core_enum',
+ title : _this._strings['c671c787b49f50a3ace9fdc5bd597825'],
+ title : _this._strings['c671c787b49f50a3ace9fdc5bd597825'],
+ toBJS : function() {
+
+ // convert the selected cells into a BJS data ready to send back to the UI..
+
+ this.table = "XXX";
+ this.firstTxtCol = "XXX";
+
+ var formHeight = 50;
+
+ var jreader = {};
+ var formElements = [];
+ this.grid.dataSource.each(function(rec) {
+ if (!rec.data.active) {
+ return;
+ }
+
+ var el = {
+ fieldLabel : rec.data.title,
+ name : rec.data.dataIndex,
+ width : rec.data.width,
+ '|xns' : 'Roo.form',
+ xtype : rec.data.ftype
+ }
+ if (el.xtype == 'DateField') {
+ el.format = 'Y-m-d';
+ el.useIso = true;
+ el.width = 100;
+ }
+
+ if (el.xtype == 'TextArea') {
+ el.height = 100;
+ }
+
+ if (el.xtype == 'Hidden') {
+ delete el.fieldLabel;
+ delete el.width;
+ }
+
+ if (el.xtype == 'ComboBox') {
+
+ el.alwaysQuery = true;
+ el.triggerAction = 'all';
+ el.forceSelection = true;
+ el.selectOnFocus = true;
+ el.minChars = 2;
+ el.editable = true;
+ el.emptyText = 'Select a value';
+
+
+ el.queryParam = 'query[' + rec.data.display_field + ']';// SET WHEN USED
+
+ el.hiddenName = rec.data.dataIndex // SET WHEN USED eg. project_id
+ el.name = rec.data.dataIndex + '_' + rec.data.display_field; // SET WHEN USED eg. project_id_name
+
+ el.displayField = rec.data.display_field // SET WHEN USED eg. project_id
+ el.valueField = rec.data.relates_to_col
+
+ el.tpl = '<div class="x-grid-cell-text x-btn button"><b>{' + rec.data.display_field +'}</b> </div>'; // SET WHEN USED
+
+
+ el.items = [
+ {
+
+ '*prop' : 'store',
+ 'xtype' : 'Store',
+ '|xns' : 'Roo.data',
+ 'remoteSort' : true,
+ '|sortInfo' : '{ direction : \'ASC\', field: \'id\' }',
+ listeners : {
+ '|beforeload' : 'function (_self, o)' +
+ "{\n" +
+ " o.params = o.params || {};\n" +
+ " // set more here\n" +
+ "}\n"
+ },
+ items : [
+ {
+ '*prop' : 'proxy',
+ 'xtype' : 'HttpProxy',
+ 'method' : 'GET',
+ '|xns' : 'Roo.data',
+ '|url' : "baseURL + '/Roo/" + rec.data.relates_to_table + ".php'",
+ },
+
+ {
+ '*prop' : 'reader',
+ 'xtype' : 'JsonReader',
+ '|xns' : 'Roo.data',
+ 'id' : 'id',
+ 'root' : 'data',
+ 'totalProperty' : 'total'
+
+
+ }
+ ]
+ }
+ ];
+
+ }
+
+ if (el.xtype == 'ComboBoxArray') {
+
+ el.hiddenName = rec.data.dataIndex;
+ el.name = rec.data.dataIndex + '_' + rec.data.display_field;
+
+ el.items = [
+ {
+ 'alwaysQuery' : true,
+ 'triggerAction' : 'all',
+ 'forceSelection': true,
+ 'selectOnFocus' : true,
+ 'minChars' :2,
+ 'editable' : true,
+ 'emptyText' : 'Select a value',
+ 'displayField' : rec.data.display_field,
+ 'valueField' : rec.data.relates_to_col,
+ 'xtype' : 'ComboBox',
+ '$ xns' : 'Roo.form',
+ '* prop' : 'combo',
+ 'queryParam' : 'query[' + rec.data.display_field + ']',
+ 'tpl' : '<div class="x-grid-cell-text x-btn button"><b>{' + rec.data.display_field +'}</b> </div>',
+
+ items : [
+ {
+ '*prop' : 'store',
+ 'xtype' : 'Store',
+ '|xns' : 'Roo.data',
+ 'remoteSort' : true,
+ '|sortInfo' : '{ direction : \'ASC\', field: \'id\' }',
+ listeners : {
+ '|beforeload' : 'function (_self, o)' +
+ "{\n" +
+ " o.params = o.params || {};\n" +
+ " // set more here\n" +
+ "}\n"
+ },
+ items : [
+ {
+ '*prop' : 'proxy',
+ 'xtype' : 'HttpProxy',
+ 'method' : 'GET',
+ '|xns' : 'Roo.data',
+ '|url' : "baseURL + '/Roo/" + rec.data.relates_to_table + ".php'",
+ },
+ {
+ '*prop' : 'reader',
+ 'xtype' : 'JsonReader',
+ '|xns' : 'Roo.data',
+ 'id' : 'id',
+ 'root' : 'data',
+ 'totalProperty' : 'total'
+ }
+
+ ]
+ }
+ ]
+ }
+ ];
+ }
+
+ if (el.xtype == 'HtmlEditor') {
+ el.height = 250,
+ el.resizable = 's',
+ el.items = [
+ {
+ '* prop' : 'toolbars[]',
+ '|xns' : 'Roo.form.HtmlEditor',
+ 'xtype' : 'ToolbarContext'
+ },
+ {
+ '* prop' : 'toolbars[]',
+ '|xns' : 'Roo.form.HtmlEditor',
+ 'xtype' : 'ToolbarStandard'
+
+ }
+ ]
+ }
+
+ formElements.push(el);
+
+ formHeight += rec.data.ftype == 'TextArea' ? 100 : ((rec.data.ftype == 'HtmlEditor') ? 250 : 30);
+
+
+ });
+
+
+
+
+
+
+ var frmCfg =
+ {
+ '|xns' : 'Roo.form',
+ xtype : "Form",
+ listeners : {
+ "|actioncomplete" : "function(_self,action)\n"+
+ "{\n"+
+ " if (action.type == 'setdata') {\n"+
+ " //this.load({ method: 'GET', params: { '_id' : _this.data.id }});\n"+
+ " return;\n"+
+ " }\n"+
+ " if (action.type == 'load') {\n"+
+ " return;\n"+
+ " }\n"+
+ " if (action.type =='submit') {\n"+
+ " \n"+
+ " _this.dialog.hide();\n"+
+ " \n"+
+ " if (_this.callback) {\n"+
+ " _this.callback.call(_this, action.result.data);\n"+
+ " }\n"+
+ " _this.form.reset();\n"+
+ " return;\n"+
+ " }\n"+
+ "}\n",
+
+ "|rendered" : "function (form)\n"+
+ "{\n"+
+ " _this.form= form;\n"+
+ "}\n"
+ },
+ method : "POST",
+ style : "margin:10px;",
+ "|url" : "baseURL + '/Roo/" + this.table + "'",
+ items : formElements
+ };
+
+
+ alert("IPC:OUT:" + JSON.stringify({
+ "closable": false,
+ "collapsible": false,
+ "height": formHeight,
+ "resizable": false,
+ "title": "Edit / Create " + this.table,
+ "width": 400,
+ "modal" : true,
+ "xtype": "LayoutDialog",
+ "|xns": "Roo",
+ "items": [
+ {
+ "|xns": "Roo",
+ "xtype": "LayoutRegion",
+ "*prop": "center"
+ },
+ {
+ "region": "center",
+ "xtype": "ContentPanel",
+ "|xns": "Roo",
+ "items": [
+ frmCfg
+ ]
+ },
+
+ {
+ "listeners": {
+ "click": "function (_self, e)\n{\n _this.dialog.hide();\n}"
+ },
+ "*prop": "buttons[]",
+ "text": "Cancel",
+ "xtype": "Button",
+ "|xns": "Roo"
+ },
+ {
+ "listeners": {
+ "click": "function (_self, e)\n{\n // do some checks?\n \n \n _this.dialog.el.mask(\"Saving\");\n _this.form.doAction(\"submit\");\n\n}"
+ },
+ "*prop": "buttons[]",
+ "text": "Save",
+ "xtype": "Button",
+ "|xns": "Roo"
+ }
+ ]
+
+
+
+ }, null, 4));
+
+ },
+ xns : Roo,
+ xtype : 'GridPanel',
+ listeners : {
+ activate : function() {
+ _this.panel = this;
+ if (_this.grid) {
+ _this.grid.footer.onClick('first');
+ }
+ }
+ },
+ items : [
+
+ ]
+
+ }; }
+});
--- /dev/null
+{
+ "Gtk.Label.new.str": "label" ,
+ "Gtk.Label.new_with_mnemonic.str": "label" ,
+
+ "Gtk.MessageDialog.new.parent" : "transient_for",
+
+ "Gtk.MessageDialog.new.type" : "message_type",
+ "Gtk.MessageDialog.new.message_format" : "text",
+
+ "Gtk.SourceBuffer.new.table" : "tag_table",
+ "Gtk.Table.new.rows" : "n_rows",
+ "Gtk.Table.new.columns" : "n_columns",
+
+ "Gtk.ListStore.new.___" : "columns",
+ "Gtk.TreeStore.new.___" : "columns",
+
+ "Gtk.Grid.attach.top" : "top_attach",
+ "Gtk.Grid.attach.left" : "left_attach",
+
+
+ "-" : ""
+
+}
--- /dev/null
+
+// what can be added where...
+
+left:
+ *top
+right:
+ Gtk.Window
+ Gtk.Dialog
+ Gtk.MessageDialog
+ Gtk.AboutDialog
+ Gtk.Dialog
+ Gtk.FontSelectionDialog
+ Gtk.InputDialog
+ Gtk.ColorSelectionDialog
+ Gtk.FileChooserDialog
+ Gtk.Menu
+ GtkClutter.Window
+ Gtk.OffScreenWindow
+ Gtk.Popover
+ Clutter.ScrollActor
+ Clutter.Actor
+// these should really be based on heirachy..
+
+left:
+ Gtk.Window
+ Gtk.Dialog
+ Gtk.MessageDialog
+ Gtk.AboutDialog
+ Gtk.Dialog
+ Gtk.OffScreenWindow
+ Gtk.Popover
+ Gtk.Alignment
+ Gtk.AspectFrame
+ Gtk.Box
+ Gtk.ButtonBox
+ Gtk.Paned
+ Gtk.Table
+ Gtk.Layout
+ Gtk.Notebook
+ //Gtk.Table
+ //Gtk.Fixed
+ Gtk.Expander
+ Gtk.Frame
+ Gtk.ScrolledWindow
+ Gtk.ToolItem
+ Gtk.Viewport
+ Gtk.Button
+ GtkClutter.Actor
+ Gtk.HeaderBar
+ Gtk.ToolButton
+right:
+ Gtk.Alignment
+ Gtk.AspectFrame
+ Gtk.Box
+ Gtk.ButtonBox
+ Gtk.Fixed
+ Gtk.Paned
+ Gtk.Layout
+ Gtk.Notebook
+ Gtk.Table
+ Gtk.Expander
+ Gtk.Frame
+
+ Gtk.ScrolledWindow
+ Gtk.AccelLabel
+ Gtk.Image
+ Gtk.Label
+ Gtk.ProgressBar
+ Gtk.Statusbar
+ Gtk.InfoBar
+ Gtk.StatusIcon
+ Gtk.Spinner
+ Gtk.Button
+ Gtk.CheckButton
+ Gtk.RadioButton
+ Gtk.ToggleButton
+ Gtk.LinkButton
+ Gtk.ScaleButton
+ Gtk.VolumeButton
+ Gtk.Entry
+ Gtk.HeaderBar
+ Gtk.HScale
+ Gtk.VScale
+ Gtk.SpinButton
+ Gtk.TreeView
+ Gtk.TextView
+ Gtk.ComboBox
+ Gtk.ComboBoxEntry
+ Gtk.Menu
+ Gtk.MenuBar
+ Gtk.Toolbar
+ Gtk.ToolPalette
+ Gtk.ColorButton
+ Gtk.ColorSelection
+ Gtk.HSV
+ Gtk.FileChooserButton
+ Gtk.FileChooserWidget
+ Gtk.FontButton
+ GtkSource.View
+ WebKit.WebView
+ Gtk.Viewport
+ Vte.Terminal
+ GtkClutter.Embed
+ Gdl.Dock
+ Gdl.DockBar
+
+left:
+ Gdl.Dock
+right:
+ Gdl.DockItem
+
+
+
+
+left:
+ Gdl.DockItem
+right:
+ Gdl.DockItem
+
+ Gtk.Alignment
+ Gtk.AspectFrame
+ Gtk.Box
+ Gtk.ButtonBox
+ Gtk.Fixed
+ Gtk.Paned
+ Gtk.Layout
+ Gtk.Notebook
+ Gtk.Table
+ Gtk.Expander
+ Gtk.Frame
+
+ Gtk.ScrolledWindow
+ Gtk.AccelLabel
+ Gtk.Image
+ Gtk.Label
+ Gtk.ProgressBar
+ Gtk.Statusbar
+ Gtk.InfoBar
+ Gtk.StatusIcon
+ Gtk.Spinner
+ Gtk.Button
+ Gtk.CheckButton
+ Gtk.RadioButton
+ Gtk.ToggleButton
+ Gtk.LinkButton
+ Gtk.ScaleButton
+ Gtk.VolumeButton
+ Gtk.Entry
+ Gtk.HScale
+ Gtk.VScale
+ Gtk.SpinButton
+ Gtk.TreeView
+ Gtk.ComboBox
+ Gtk.ComboBoxEntry
+ Gtk.Menu
+ Gtk.MenuBar
+ Gtk.Toolbar
+ Gtk.ToolPalette
+ Gtk.ColorButton
+ Gtk.ColorSelection
+ Gtk.HSV
+ Gtk.FileChooserButton
+ Gtk.FileChooserWidget
+ Gtk.FontButton
+ GtkSource.View
+ WebKit.WebView
+ Vte.Terminal
+ GtkClutter.Embed
+
+
+
+
+left:
+ Gtk.MenuBar
+ Gtk.Menu
+right:
+ Gtk.MenuItem
+ Gtk.ImageMenuItem
+ Gtk.RadioMenuItem
+ Gtk.CheckMenuItem
+ Gtk.SeparatorMenuItem
+ Gtk.TearoffMenuItem
+left:
+ Gtk.ImageMenuItem
+right:
+ Gtk.Image
+
+
+left:
+ Gtk.MenuItem:submenu
+right:
+ Gtk.Menu
+
+left:
+ Gtk.Toolbar
+right:
+ Gtk.ToolButton
+ Gtk.ToolItem
+ Gtk.MenuToolButton
+ Gtk.ToggleToolButton
+ Gtk.RadioToolButton
+ Gtk.ToolItemGroup
+ Gtk.SeparatorToolItem
+
+
+left:
+ Gtk.TreeView
+right:
+ Gtk.TreeStore
+ Gtk.ListStore
+ Gtk.TreeModelFilter
+ Gtk.TreeViewColumn
+
+left:
+ Gtk.TreeModelFilter
+right:
+ Gtk.TreeStore
+ Gtk.ListStore
+
+left:
+ Gtk.TreeViewColumn
+right:
+ Gtk.CellRendererText
+ Gtk.CellRendererCombo
+ Gtk.CellRendererToggle
+
+left:
+ Gtk.CellRendererCombo:model
+ Gtk.ComboBox
+right:
+ Gtk.ListStore
+
+
+left:
+ Gtk.ComboBox
+right:
+ Gtk.CellRendererText
+
+
+
+left:
+ Gtk.ScrolledWindow
+right:
+ Gtk.Viewport
+
+
+
+left:
+ GtkSource.View
+right:
+ GtkSource.Buffer
+
+
+
+left:
+ GtkClutter.Window
+ GtkClutter.Embed
+
+right:
+ GtkClutter.Actor
+
+left:
+ Gdl.Dock
+right:
+ Gdl.DockItem
+
+
+left:
+ Clutter.ScrollActor:layout_manager
+ Clutter.Actor:layout_manager
+right:
+ Clutter.GridLayout
+ Clutter.FlowLayout
+ Clutter.FixedLayout
+ Clutter.TableLayout
+ Clutter.BinLayout
+ Clutter.BoxLayout
+
+left:
+ Clutter.ScrollActor
+ Clutter.Actor
+right:
+ Clutter.Actor
+ Clutter.ScrollActor
+ Clutter.Texture
+ Clutter.Text
+ Clutter.Rectangle
+
+
--- /dev/null
+
+// what can be added where...
+
+left:
+ *top
+right:
+ Roo.LayoutDialog
+ Roo.NestedLayoutPanel
+ Roo.ContentPanel
+ Roo.GridPanel
+ Roo.TreePanel
+ Roo.bootstrap.Body
+ Roo.bootstrap.Modal
+ Roo.bootstrap.Container
+ Roo.mailer.Body
+
+
+// added with a property.. (*prop)
+
+left:
+ Roo.LayoutDialog:center
+ Roo.LayoutDialog:east
+ Roo.LayoutDialog:west
+ Roo.LayoutDialog:south
+ Roo.LayoutDialog:north
+ Roo.BorderLayout:center
+ Roo.BorderLayout:east
+ Roo.BorderLayout:west
+ Roo.BorderLayout:south
+ Roo.BorderLayout:north
+right:
+ Roo.LayoutRegion
+
+// add with region? region=
+
+left:
+ Roo.LayoutDialog
+ Roo.BorderLayout
+right:
+ Roo.ContentPanel
+ Roo.NestedLayoutPanel
+ Roo.GridPanel
+ Roo.TreePanel
+
+// should probably look like this
+// Roo.ContentPanel:region=center
+// Roo.NestedLayoutPanel:region=center
+// Roo.GridPanel:region=center
+// Roo.TreePanel:region=center
+
+
+left:
+ Roo.NestedLayoutPanel:layout
+right:
+ Roo.BorderLayout
+
+
+left:
+ Roo.ContentPanel
+right:
+ Roo.form.Form
+ Roo.JsonView
+ Roo.View
+
+// some popup menus..
+left:
+ Roo.ContentPanel:menu
+ Roo.NestedLayoutPanel:menu
+ Roo.GridPanel:menu
+ Roo.TreePanel:menu
+right:
+ Roo.menu.Menu
+
+
+// Parent items
+left:
+ Roo.form.Form
+ Roo.form.FieldSet
+ Roo.form.Column
+ Roo.form.Row
+
+right:
+ Roo.form.Column
+ Roo.form.FieldSet
+ Roo.form.Row
+ Roo.form.Hidden
+ Roo.form.TextField
+ Roo.form.GridField
+ Roo.form.DateField
+ Roo.form.MonthField
+ Roo.form.NumberField
+ Roo.form.Checkbox
+ Roo.form.Radio
+ Roo.form.ComboBox
+ Roo.form.ComboBoxArray
+ Roo.form.TextArea
+ Roo.form.HtmlEditor
+ Roo.form.FCKeditor
+ Roo.Button
+
+left:
+ Roo.form.HtmlEditor:toolbars[]
+right:
+ Roo.form.HtmlEditor.ToolbarStandard
+ Roo.form.HtmlEditor.ToolbarContext
+
+left:
+ Roo.form.HtmlEditor.ToolbarStandard:btns[]
+ Roo.form.HtmlEditor.ToolbarContext:btns[]
+right:
+ Roo.form.TextField
+ Roo.form.DateField
+ Roo.form.MonthField
+ Roo.form.NumberField
+ Roo.form.Checkbox
+ Roo.form.Radio
+ Roo.form.ComboBox
+ Roo.form.TextArea
+ Roo.Toolbar.Button
+ Roo.Toolbar.Fill
+ Roo.Toolbar.Separator
+ Roo.Toolbar.Spacer
+ Roo.Toolbar.SplitButton
+ Roo.Toolbar.TextItem
+
+left:
+ Roo.grid.GridEditor:field
+right:
+ Roo.form.TextField
+ Roo.form.DateField
+ Roo.form.MonthField
+ Roo.form.NumberField
+ Roo.form.Checkbox
+ Roo.form.Radio
+ Roo.form.ComboBox
+ Roo.form.TextArea
+
+
+
+left:
+ Roo.LayoutDialog:buttons[]
+ Roo.form.Form:buttons[]
+right:
+ Roo.Button
+
+
+
+
+
+//Toolbar
+left:
+ Roo.Toolbar
+ Roo.PagingToolbar
+right:
+ Roo.Toolbar.Button
+ Roo.Toolbar.Fill
+ Roo.Toolbar.Separator
+ Roo.Toolbar.Spacer
+ Roo.Toolbar.SplitButton
+ Roo.Toolbar.TextItem
+ Roo.form.ComboBox
+ Roo.form.DateField
+ Roo.form.MonthField
+ Roo.form.TextField
+
+
+left:
+ Roo.Toolbar.Button:menu
+ Roo.Toolbar.SplitButton:menu
+ Roo.menu.Item:menu
+right:
+ Roo.menu.Menu
+
+
+
+
+//Menu
+left:
+ Roo.menu.Menu
+right:
+ Roo.menu.CheckItem
+ Roo.menu.ColorItem
+ Roo.menu.DateItem
+ Roo.menu.DateMenu
+ Roo.menu.Separator
+ Roo.menu.TextItem
+ Roo.menu.Item
+
+
+
+
+//Grids
+left:
+ Roo.GridPanel:grid
+right:
+ Roo.grid.Grid
+ Roo.grid.EditorGrid
+ Roo.grid.PropertyGrid
+
+
+left:
+ Roo.grid.Grid:sm
+ Roo.grid.EditorGrid:sm
+right:
+ Roo.grid.CellSelectionModel
+ Roo.grid.RowSelectionModel
+
+left:
+ Roo.grid.Grid:view
+right:
+ Roo.grid.EditorGrid:view
+ Roo.grid.GridView
+
+left:
+ Roo.grid.Grid:cm[]
+ Roo.grid.EditorGrid:cm[]
+right:
+ Roo.grid.ColumnModel
+
+left:
+ Roo.grid.ColumnModel:editor
+right:
+ Roo.grid.GridEditor
+
+
+left:
+ Roo.grid.EditorGrid:footer
+ Roo.grid.Grid:footer
+ Roo.Grid:footer
+right:
+ Roo.PagingToolbar
+
+
+left:
+ Roo.grid.EditorGrid:toolbar
+ Roo.grid.Grid:toolbar
+ Roo.Grid:toolbar
+ Roo.ContentPanel:toolbar
+ Roo.TreePanel:toolbar
+right:
+ Roo.Toolbar
+
+
+
+
+//Tree
+left:
+ Roo.TreePanel:tree
+right:
+ Roo.tree.TreePanel
+
+left:
+ Roo.tree.TreePanel:root
+right:
+ Roo.tree.AsyncTreeNode
+ Roo.tree.TreeNode
+
+left:
+ Roo.tree.TreePanel:editor
+right:
+ Roo.tree.TreeEditor
+
+left:
+ Roo.tree.TreeEditor:field
+right:
+ Roo.form.TextField
+
+
+
+left:
+ Roo.tree.TreePanel:loader
+right:
+ Roo.tree.TreeLoader
+
+left:
+ Roo.tree.TreePanel:sm
+right:
+ Roo.tree.DefaultSelectionModel
+ Roo.tree.MultiSelectionModel
+
+
+// combos
+
+left:
+ Roo.grid.EditorGrid:ds
+ Roo.grid.Grid:ds
+ Roo.form.ComboBox:store
+ Roo.View:store
+ Roo.JsonView:store
+ Roo.bootstrap.ComboBox:store
+ Roo.bootstrap.Calendar:store
+ Roo.bootstrap.Table:store
+right:
+ Roo.data.Store
+ Roo.data.SimpleStore
+
+left:
+ Roo.form.ComboBoxArray:combo
+right:
+ Roo.form.ComboBox
+
+left:
+ Roo.data.Store:proxy
+right:
+ Roo.data.HttpProxy
+ Roo.data.MemoryProxy
+
+
+left:
+ Roo.data.Store:reader
+right:
+ Roo.data.JsonReader
+ Roo.data.ArrayReader
+ Roo.data.XmlReader
+
+left:
+ Roo.View:tpl
+ Roo.JsonView:tpl
+right:
+ Roo.Template
+
+
+ //drag drop..
+left:
+ Roo.grid.Grid:dragTarget
+right:
+ Roo.dd.DropTarget
+
+
+
+
+// bootstrap?
+
+left:
+ Roo.bootstrap.Body
+ Roo.bootstrap.Container
+ Roo.bootstrap.Modal
+ Roo.bootstrap.Column
+ Roo.bootstrap.Row
+ Roo.bootstrap.TabPanel
+ Roo.bootstrap.Element
+ Roo.bootstrap.Form
+ Roo.bootstrap.UploadCropbox
+ Roo.bootstrap.Popover
+ Roo.bootstrap.Link
+right:
+ Roo.bootstrap.Container
+ Roo.bootstrap.Button
+ Roo.bootstrap.ButtonGroup
+ Roo.bootstrap.Column
+ Roo.bootstrap.Form
+ Roo.bootstrap.Navbar
+ Roo.bootstrap.NavGroup
+ Roo.bootstrap.NavSimplebar
+ Roo.bootstrap.NavHeaderbar
+ Roo.bootstrap.NavSidebar
+ Roo.bootstrap.Row
+ Roo.bootstrap.Header
+ Roo.bootstrap.Img
+ Roo.bootstrap.Link
+ Roo.bootstrap.Calendar
+ Roo.bootstrap.Popover
+ Roo.bootstrap.Input
+ Roo.bootstrap.TextArea
+ Roo.bootstrap.Table
+ Roo.bootstrap.Pagination
+ Roo.bootstrap.Progress
+ Roo.bootstrap.TabPanel
+ Roo.bootstrap.DateField
+ Roo.bootstrap.MonthField
+ Roo.bootstrap.TimeField
+ Roo.bootstrap.CheckBox
+ Roo.bootstrap.Radio
+ Roo.bootstrap.ComboBox
+ Roo.bootstrap.Element
+ Roo.bootstrap.HtmlEditor
+ Roo.bootstrap.MessageBar
+ Roo.bootstrap.dash.NumberBox
+ Roo.bootstrap.Graph
+ Roo.bootstrap.dash.TabBox
+ Roo.bootstrap.menu.Menu
+ Roo.bootstrap.LocationPicker
+ Roo.bootstrap.Alert
+ Roo.bootstrap.TabGroup
+ Roo.bootstrap.LayoutMasonry
+ Roo.bootstrap.UploadCropbox
+ Roo.bootstrap.DocumentManager
+ Roo.bootstrap.DocumentViewer
+ Roo.bootstrap.PagingToolbar
+ Roo.bootstrap.NavProgressBar
+ Roo.bootstrap.FieldLabel
+ Roo.bootstrap.DateSplitField
+
+left:
+ Roo.bootstrap.TabGroup
+right:
+ Roo.bootstrap.TabPanel
+
+
+left:
+ Roo.bootstrap.Progress
+right:
+ Roo.bootstrap.ProgressBar
+
+left:
+ Roo.bootstrap.Table
+right:
+ Roo.bootstrap.TableRow
+ Roo.bootstrap.TableCell
+ Roo.bootstrap.TableBody
+
+left:
+ Roo.bootstrap.Table:cm[]
+right:
+ Roo.grid.ColumnModel
+
+
+#-??? it this correct?
+left:
+ Roo.bootstrap.Table:sm
+right:
+ Roo.bootstrap.Table.RowSelectionModel
+
+
+left:
+ Roo.bootstrap.Table:footer
+right:
+ Roo.bootstrap.PagingToolbar
+
+left:
+ Roo.bootstrap.PagingToolbar:buttons[]
+right:
+ Roo.bootstrap.Button
+
+left:
+ Roo.bootstrap.PagingToolbar:store
+right:
+ Roo.data.Store
+
+left:
+ Roo.bootstrap.NavProgressBar:bullets[]
+right:
+ Roo.bootstrap.NavProgressItem
+
+left:
+ Roo.bootstrap.TableBody
+right:
+ Roo.bootstrap.TableRow
+ Roo.bootstrap.TableCell
+
+left:
+ Roo.bootstrap.TableRow
+right:
+ Roo.bootstrap.TableCell
+
+left:
+ Roo.bootstrap.TableCell
+right:
+ Roo.bootstrap.Button
+
+left:
+ Roo.bootstrap.ButtonGroup
+right:
+ Roo.bootstrap.Button
+ Roo.bootstrap.Form
+
+left:
+ Roo.bootstrap.Button:menu
+ Roo.bootstrap.NavItem:menu
+ Roo.bootstrap.NavSidebarItem:menu
+right:
+ Roo.bootstrap.Menu
+
+left:
+ Roo.bootstrap.Menu
+right:
+ Roo.bootstrap.MenuItem
+
+left:
+ Roo.bootstrap.Navbar
+ Roo.bootstrap.NavSimplebar
+ Roo.bootstrap.NavHeaderbar
+ Roo.bootstrap.NavSidebar
+right:
+ Roo.bootstrap.NavGroup
+ Roo.bootstrap.Form
+ Roo.bootstrap.Row
+ Roo.bootstrap.Column
+ Roo.bootstrap.Container
+ Roo.bootstrap.Link
+
+left:
+ Roo.bootstrap.NavGroup
+right:
+ Roo.bootstrap.NavItem
+ Roo.bootstrap.NavSidebarItem
+
+
+left:
+ Roo.bootstrap.Form
+ Roo.bootstrap.Container
+right:
+ Roo.bootstrap.Input
+ Roo.bootstrap.TextArea
+ Roo.bootstrap.Button
+ Roo.bootstrap.ComboBox
+ Roo.bootstrap.Container
+ Roo.bootstrap.Row
+ Roo.bootstrap.TabPanel
+ Roo.bootstrap.DateField
+ Roo.bootstrap.MonthField
+ Roo.bootstrap.TimeField
+ Roo.bootstrap.CheckBox
+ Roo.bootstrap.Radio
+// Roo.bootstrap.Fieldset
+
+left:
+ Roo.bootstrap.Body
+right:
+ Roo.bootstrap.Modal
+
+left:
+ Roo.bootstrap.Modal:buttons[]
+right:
+ Roo.bootstrap.Button
+
+left:
+ Roo.bootstrap.Modal:tmpl
+right:
+ Roo.Template
+ Roo.XTemplate
+ Roo.DomTemplate
+
+
+left:
+ Roo.bootstrap.Header
+right:
+ Roo.bootstrap.Container
+
+left:
+ Roo.bootstrap.NavItem
+ Roo.bootstrap.NavSidebarItem
+right:
+ Roo.bootstrap.Container
+ Roo.bootstrap.Button
+
+left:
+ Roo.bootstrap.Pagination
+right:
+ Roo.bootstrap.PaginationItem
+
+left:
+ Roo.bootstrap.Input:before
+ Roo.bootstrap.Input:after
+right:
+ Roo.bootstrap.Button
+
+left:
+ Roo.mailer.Body
+right:
+ Roo.mailer.BodyContainer
+
+left:
+ Roo.mailer.BodyContainer
+right:
+ Roo.mailer.Block
+
+left:
+ Roo.mailer.Block
+right:
+ Roo.mailer.Column
+
+left:
+ Roo.mailer.Column
+ Roo.mailer.Block
+right:
+ Roo.bootstrap.Header
+ Roo.bootstrap.Container
+ Roo.bootstrap.Image
+ Roo.bootstrap.Link
+left:
+ Roo.bootstrap.dash.TabBox
+right:
+ Roo.bootstrap.dash.TabPane
+
+left:
+ Roo.bootstrap.dash.TabPane
+right:
+ Roo.bootstrap.Graph
+ Roo.bootstrap.Column
+
+
+left:
+ Roo.bootstrap.menu.Menu
+right:
+ Roo.bootstrap.menu.Item
+ Roo.bootstrap.menu.Separator
+
+left:
+ Roo.bootstrap.menu.Item
+right:
+ Roo.bootstrap.menu.Menu
+
+left:
+ Roo.bootstrap.MenuItem
+right:
+ Roo.bootstrap.Button
+ Roo.bootstrap.Row
+ Roo.bootstrap.Column
+ Roo.bootstrap.Container
\ No newline at end of file
--- /dev/null
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:html="http://www.w3.org/1999/xhtml"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink">
+
+<!-- this is the code embeded in the webkit browser -->
+
+
+ <head>
+ <title>Gtk Builder App Runner.</title>
+ <!-- this lot needs to be available on the target site.. if used on remote.. -->
+
+ <link rel="stylesheet" type="text/css" href="roojs1/css-bootstrap/bootstrap.min.css">
+ <link rel="stylesheet" type="text/css" href="roojs1/css-bootstrap/sticky-footer.css">
+
+ <script type="text/javascript" src="roojs1/roojs-core-debug.js?ts=1234"></script>
+ <script type="text/javascript" src="roojs1/roojs-bootstrap-debug.js?ts=1234"></script>
+
+ <script type="text/javascript">
+ Ext=Roo; // bc
+ Roo.BLANK_IMAGE_URL = "roojs1/images/gray/s.gif";
+ Roo.rootURL = 'roojs1/';
+ Roo.XComponent.hideProgress = true;
+ BuilderUseBootstrap = true;
+
+ // local apps can override these ..
+ rootURL = 'http://localhost';
+ baseURL = rootURL + '/index.php';
+ </script>
+
+ <!-- <script type="text/javascript" src="builder.html.js?ts=1234"></script> -->
+
+ <!-- user generate code ends up here... -->
+
+
+ </head>
+ <!--background:#F8ECB2;-->
+ <body class=" " id="bootstrap-body">
+
+
+ </body>
+</html>
+
\ No newline at end of file
--- /dev/null
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:html="http://www.w3.org/1999/xhtml"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink">
+
+<!-- this is the code embeded in the webkit browser -->
+
+
+ <head>
+ <title>Gtk Builder App Runner.</title>
+ <!-- this lot needs to be available on the target site.. if used on remote.. -->
+
+ <link rel="stylesheet" type="text/css" href="roojs1/css-mailer/mailer.css">
+
+ <script type="text/javascript" src="roojs1/roojs-core-debug.js?ts=1234"></script>
+ <script type="text/javascript" src="roojs1/roojs-bootstrap-debug.js?ts=1234"></script>
+ <script type="text/javascript" src="roojs1/roojs-mailer-debug.js?ts=1234"></script>
+
+ <script type="text/javascript">
+ Ext=Roo; // bc
+ Roo.BLANK_IMAGE_URL = "roojs1/images/gray/s.gif";
+ Roo.rootURL = 'roojs1/';
+ Roo.XComponent.hideProgress = true;
+ </script>
+
+ <!-- <script type="text/javascript" src="builder.html.js?ts=1234"></script> -->
+
+ <!-- user generate code ends up here... -->
+
+
+ </head>
+ <!--background:#F8ECB2;-->
+ <body class=" ">
+
+
+
+ </body>
+</html>
+
\ No newline at end of file
--- /dev/null
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:html="http://www.w3.org/1999/xhtml"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink">
+
+<!-- this is the code embeded in the webkit browser -->
+
+ <head>
+ <title>Gtk Builder App Runner.</title>
+ <!-- this lot needs to be available on the target site.. if used on remote.. -->
+
+ <link rel="stylesheet" type="text/css" href="roojs1/css/roojs-debug.css" />
+ <link rel="stylesheet" type="text/css" href="roojs1/css/xtheme-slate.css" />
+
+ <script type="text/javascript" src="roojs1/roojs-debug.js?ts=1234"></script>
+
+ <script type="text/javascript">
+ Ext=Roo; // bc
+ Roo.isTouch = false; // force non-touch..
+ Roo.BLANK_IMAGE_URL = "roojs1/images/gray/s.gif";
+ Roo.rootURL = '/roojs1/';
+ Roo.XComponent.hideProgress = true;
+ // local apps can override these ..
+ rootURL = 'xhttp://localhost';
+ baseURL = rootURL + '/index.php';
+ </script>
+
+ <!-- <script type="text/javascript" src="builder.html.js?ts=1234"></script> -->
+
+ <!-- user generate code ends up here... -->
+
+
+ </head>
+ <!--background:#F8ECB2;-->
+ <body class="ytheme-gray" id="bootstrap-body">
+
+
+
+ </body>
+</html>
+
\ No newline at end of file
--- /dev/null
+//<script type="text/javascript">
+
+
+// IPC: - via alert("IPC:{method}:{data}
+
+
+var MODULE = { isBuilder : true };
+// BC
+var _this = MODULE;
+
+// the apprenderer.
+Builder = {
+
+ scriptTag : false,
+
+ id : 1,
+
+
+
+ saveHTML : function( )
+ {
+ //print("TRAVERSE DOM?");
+
+ var dom = document.body;
+ //print(dom);
+ var ret = '';
+ //Roo.select('body > div',true).each(function(el) {
+ // if the tree is not ready yet?
+
+
+ this.traverseDOMTree(function(s) { ret+=s; }, dom, 1);
+ alert("IPC:SAVEHTML:" + ret);
+ return ret;
+ },
+
+
+ traverseDOMTree : function(cb, currentElement, depth) {
+ if (!currentElement ) {
+
+ return;
+ }
+ //console.log(currentElement);
+ if (currentElement.className && currentElement.className.match(/roo-dynamic/)) {
+ return;
+ }
+
+ //Roo.log(currentElement);
+ var j;
+ var nodeName = currentElement.nodeName;
+ var tagName = currentElement.tagName;
+
+ if (nodeName == '#text') {
+ cb(currentElement.nodeValue);
+ return;
+
+ }
+ if (nodeName.match(/^#/)) { // comments?
+ return;
+ }
+
+
+
+ if(nodeName == 'BR'){
+ cb("<BR/>");
+ return;
+ }
+ if (nodeName != 'BODY') {
+ //Roo.log(currentElement);
+ if (currentElement.hasAttribute('flexy:include')) {
+
+
+ cb( '<flexy:include src="'+currentElement.getAttribute('flexy:include')+'"></flexy:include>');
+ return;
+ }
+
+ var i = 0;
+ // Prints the node tagName, such as <A>, <IMG>, etc
+ if (tagName) {
+ var attr = [];
+ for(i = 0; i < currentElement.attributes.length;i++) {
+ var attre = currentElement.attributes.item(i);
+ var aname = attre.name;
+ var aval = attre.value || '';
+ if (aname=='id' && aval.match(/^roo\-/)) { // only roo -elements hide..
+ aname= 'xbuilderid';
+ }
+ // skip -- component created by the builder?
+ if (aval == 'builderel') {
+ return;
+ }
+ attr.push(aname + '="' + aval + '"' ); //?? escaping attributes?
+ }
+
+
+ cb("<"+currentElement.tagName+ ( attr.length ? (' ' + attr.join(' ') ) : '') + ">");
+ }
+ else {
+ cb("[unknown tag]");
+ }
+ } else {
+ tagName = false;
+ }
+
+
+ // Traverse the tree
+ i = 0;
+ var currentElementChild = currentElement.childNodes.item(i);
+ var allText = true;
+ while (currentElementChild) {
+ // Formatting code (indent the tree so it looks nice on the screen)
+
+ if (currentElementChild.nodeName == '#text') {
+ cb(currentElementChild.nodeValue);
+ i++;
+ currentElementChild=currentElement.childNodes.item(i);
+ continue;
+ }
+ allText = false;
+ cb("\n");
+ for (j = 0; j < depth; j++) {
+ // ¦ is just a vertical line
+ cb(" ");
+ }
+
+
+ // Recursively traverse the tree structure of the child node
+ this.traverseDOMTree(cb, currentElementChild, depth+1);
+ i++;
+ currentElementChild=currentElement.childNodes.item(i);
+ }
+ if (!allText) {
+ // The remaining code is mostly for formatting the tree
+ cb("\n");
+ for (j = 0; j < depth - 1; j++) {
+ cb(" ");
+ }
+ }
+ if (tagName) {
+ cb("</"+tagName+">");
+ }
+
+ },
+
+
+ // this lot is to deal with draging // selecting? - not used at present
+ //
+
+
+ findNode : function(ftg , method) {
+ if (!ftg) {
+ return; false
+ }
+ // console.log(ftg.id);
+ if (ftg.id && typeof(ftg.id) == 'string' && ftg.id.match(/builder-/)) {
+ var nid = ftg.id.replace('builder-', '').replace('x-form-el-', '');
+ this[method]( nid );
+ return true;
+ }
+ // needs fixing..
+ if (ftg.dom.className.match(/[0-9]+/)) {
+ //console.log(ftg.dom.className);
+ var cmat = ftg.dom.className.match(/x-grid-hd-builder-(form-gen-[0-9:]+)/);
+ if (cmat) {
+ this[method]( cmat[1] );
+ return true;
+ }
+ }
+
+
+
+
+ return false;
+ },
+
+ overPos: function(x,y)
+ {
+
+ var el = document.elementFromPoint(x,y);
+ // //console.log(el.id);
+ // console.log(document.body.innerHTML);
+ this.hover( {
+ getTarget : function () {
+ return el;
+ },
+ stopEvent : function() {
+
+ }
+ });
+
+
+ },
+ onclick: function(e) {
+ var tg = Roo.get(e.getTarget());
+ if (!tg) {
+ //console.log('no target');
+ return;
+ }
+
+ if (this.findNode(tg,'logClick')) {
+ return;
+ }
+ var dp = Roo.get(tg.up(''));
+ if (dp && this.findNode(dp,'logClick')) {
+ return;
+ }
+
+ var ns = Roo.get(tg.getNextSibling());
+ if (ns && this.findNode(ns,'logClick')) {
+
+ return;
+ }
+ if (ns && ns.down('') && this.findNode(Roo.get(ns.down('')) ,'logClick') ) {
+ return;
+ }
+
+ for(var i =0; i < 5; i++) {
+ tg = Roo.get(tg.up(''));
+ if (!tg) {
+ //console.log('no parent' + i);
+ return;
+ }
+ if (tg && this.findNode(tg,'logClick')) {
+ return;
+ }
+ }
+ //console.log('no target in parents');
+
+ },
+ logClick : function(id)
+ {
+ var bid = id.length ? 'builder-' + id : '';
+ console.log('{ "id" : "' + bid + '"}');
+ },
+
+
+ hover : function(e) {
+
+
+ var tg = Roo.get(e.getTarget());
+ if (!tg) {
+ //console.log('no target');
+ this.logMove('');
+ return;
+ }
+
+ if (this.findNode(tg,'logMove')) {
+ e.stopEvent();
+ return;
+ }
+ var dp = Roo.get(tg.up(''));
+ if (dp && this.findNode(dp,'logMove')) {
+ e.stopEvent();
+ return;
+ }
+
+ var ns = Roo.get(tg.getNextSibling());
+ if (ns && this.findNode(ns,'logMove')) {
+ e.stopEvent();
+ return;
+ }
+ if (ns && ns.down('') && this.findNode(Roo.get(ns.down('')) ,'logMove' )) {
+ e.stopEvent();
+ return;
+ }
+
+ for(var i =0; i < 5; i++) {
+ tg = Roo.get(tg.up(''));
+ if (!tg) {
+ //console.log('no parent' + i);
+ this.logMove('');
+ return;
+ }
+ if (tg && this.findNode(tg,'logMove')) {
+ e.stopEvent();
+ return;
+ }
+ }
+ //console.log('no target in parents');
+ this.logMove('');
+ },
+ logMove : function (id) {
+ //console.log("LOGMOVE: " + id);
+
+ if (this.lastID === id) {
+ return;
+ }
+ id = ''+ id;
+ var bid = id.length ? 'builder-' + id : '';
+ //console.log('{ "hover-node" : "' + bid + '"}');
+ this.lastID = id;
+ },
+ clearBootstrap : function()
+ {
+ // if the page is not bootstrap
+
+ if ( typeof(BuilderUseBootstrap) != 'undefined' ) {
+ Roo.log("it's boostrap - BuilderUseBootstrap is defined ");
+ // it's bootstrap - probably remove roo's css..
+ return;
+ }
+ Roo.log("remove css = BuilderUseBootstrap is not defined");
+ var rem = [];
+ var ar = document.getElementsByTagName('link');
+ for (var i = 0; i < ar.length;i++) {
+ var l = ar[i];
+ Roo.log(l.getAttribute('href'));
+ if (l.getAttribute('href').match(/bootstrap/)) {
+ rem.push(l);
+
+
+ }
+ //code
+ }
+ Roo.each(rem, function(l) { l.parentNode.removeChild(l);});
+ },
+
+ applyFlexy: function(tree)
+ {
+ if (!tree.el) {
+ return;
+ }
+ if (typeof(tree['flexy:foreach']) != 'undefined') {
+ //Roo.log("add flexy:foreach");
+ tree.el.attr('flexy:foreach', tree['flexy:foreach']);
+ }
+ if (typeof(tree['flexy:if']) != 'undefined') {
+ //Roo.log("add flexy:if");
+ tree.el.attr('flexy:if', tree['flexy:if']);
+ }
+ if (typeof(tree['xtype-bootstrap']) != 'undefined') {
+ //Roo.log("add flexy:if");
+ tree.el.attr('xtype', tree['xtype-bootstrap']);
+ }
+
+ if (typeof(tree['flexy:include']) != 'undefined') {
+ //Roo.log("add flexy:if");
+ tree.el.attr('flexy:include', tree['flexy:include']);
+ }
+
+ if (typeof(tree['flexy:ignore']) != 'undefined') {
+ //Roo.log("add flexy:if");
+ tree.el.attr('flexy:ignore', tree['flexy:ignore']);
+ }
+
+ tree.el.attr('xtype', tree['|xns'] + '.' + tree['xtype']);
+ //Roo.log(tree);
+ //Roo.log("Add xtype")
+
+
+
+ if (tree.items && tree.items.length > 0) {
+ //Roo.log(tree);
+ for (var i = 0; i < tree.items.length; i++){
+ this.applyFlexy(tree.items[i]);
+ }
+ }
+ if (typeof(tree.menu) == 'object') {
+ this.applyFlexy(tree.menu);
+ }
+
+ }
+
+
+
+};
+Roo.onReady(function() { Builder.clearBootstrap(); });
+Roo.XComponent.on('buildcomplete', function() {
+ Roo.log("xcomponent built!");
+ var m = Roo.XComponent.modules;
+ Builder.applyFlexy(m[m.length-1].el);
+
+ Builder.saveHTML.defer(100, Builder);
+});
\ No newline at end of file
--- /dev/null
+[Desktop Entry]
+Version=1.0
+Encoding=UTF-8
+Name=Roo JS Builder
+Comment=Vala and Javascript Application Biuilder
+Exec=builder4
+Icon=roobuilder
+Terminal=false
+Type=Application
+StartupNotify=true
+Categories=GNOME;GTK;Utility;
--- /dev/null
+
+
+ public class AppSettings : Object
+ {
+
+
+
+ // what are we going to have as settings?
+ public string roo_html_dir { get; set; }
+
+ public AppSettings()
+ {
+ this.notify.connect(() => {
+ this.save();
+ });
+ }
+
+ public static AppSettings factory()
+ {
+
+ var setting_file = BuilderApplication.configDirectory() + "/builder.settings";
+
+ if (!FileUtils.test(setting_file, FileTest.EXISTS)) {
+ return new AppSettings();
+ }
+ string data;
+ FileUtils.get_contents(setting_file, out data);
+ return Json.gobject_from_data (typeof (AppSettings), data) as AppSettings;
+ }
+ public void save()
+ {
+ var dirname = GLib.Environment.get_home_dir() + "/.Builder";
+ var setting_file = dirname + "/builder.settings";
+ string data = Json.gobject_to_data (this, null);
+ print("saving application settings\n");
+ FileUtils.set_contents(setting_file, data);
+ }
+
+
+ }
+
+
+ public static BuilderApplication application = null;
+
+ public class BuilderApplication : Gtk.Application
+ {
+
+ // options - used when builder is run as a compiler
+ // we have to spawn ourself as a compiler as just running libvala
+ // as a task to check syntax causes memory leakage..
+ //
+ const OptionEntry[] options = {
+
+
+ { "project", 0, 0, OptionArg.STRING, ref opt_compile_project, "Compile a project", null },
+ { "target", 0, 0, OptionArg.STRING, ref opt_compile_target, "Target to build", null },
+ { "skip-file", 0, 0, OptionArg.STRING, ref opt_compile_skip ,"For test compiles do not add this (usually used in conjunction with add-file ", null },
+ { "add-file", 0, 0, OptionArg.STRING, ref opt_compile_add, "Add this file to compile list", null },
+ { "output", 0, 0, OptionArg.STRING, ref opt_compile_output, "output binary file path", null },
+ { "debug", 0, 0, OptionArg.NONE, ref opt_debug, "Show debug messages", null },
+
+ // some testing code.
+ { "list-projects", 0, 0, OptionArg.NONE, ref opt_list_projects, "List Projects", null },
+ { "list-files", 0, 0, OptionArg.NONE, ref opt_list_files, "List Files (in a project", null},
+ { "bjs", 0, 0, OptionArg.STRING, ref opt_bjs_compile, "convert bjs file", null },
+ { "bjs-target", 0, 0, OptionArg.STRING, ref opt_bjs_compile_target, "convert bjs file to tareet : vala / js", null },
+
+
+ { null }
+ };
+ public static string opt_compile_project;
+ public static string opt_compile_target;
+ public static string opt_compile_skip;
+ public static string opt_compile_add;
+ public static string opt_compile_output;
+ public static string opt_bjs_compile;
+ public static string opt_bjs_compile_target;
+ public static bool opt_debug = false;
+ public static bool opt_list_projects = false;
+ public static bool opt_list_files = false;
+
+ public static string _self;
+
+ enum Target {
+ INT32,
+ STRING,
+ ROOTWIN
+ }
+
+
+ public const Gtk.TargetEntry[] targetList = {
+ { "INTEGER", 0, Target.INT32 },
+ { "STRING", 0, Target.STRING },
+ { "application/json", 0, Target.STRING },
+ { "text/plain", 0, Target.STRING },
+ { "application/x-rootwindow-drop", 0, Target.ROOTWIN }
+ };
+ public AppSettings settings = null;
+
+
+ public BuilderApplication ( string[] args)
+ {
+
+ _self = FileUtils.read_link("/proc/self/exe");
+ GLib.debug("SELF = %s", _self);
+
+ Object(
+ application_id: "org.roojs.app-builder",
+ flags: ApplicationFlags.FLAGS_NONE
+ );
+
+ configDirectory();
+ this.settings = AppSettings.factory();
+ var opt_context = new OptionContext ("Application Builder");
+
+ try {
+ opt_context.set_help_enabled (true);
+ opt_context.add_main_entries (options, null);
+ opt_context.parse (ref args);
+
+
+ } catch (OptionError e) {
+ stdout.printf ("error: %s\n", e.message);
+ stdout.printf ("Run '%s --help' to see a full list of available command line options.\n %s",
+ args[0], opt_context.get_help(true,null));
+ GLib.Process.exit(Posix.EXIT_FAILURE);
+
+ }
+
+ }
+
+
+
+ public static BuilderApplication singleton( string[] args)
+ {
+ if (application==null) {
+ application = new BuilderApplication( args);
+
+
+ }
+ return application;
+ }
+
+
+ public static string configDirectory()
+ {
+ var dirname = GLib.Environment.get_home_dir() + "/.Builder";
+
+ if (!FileUtils.test(dirname,FileTest.IS_DIR)) {
+ var dir = File.new_for_path(dirname);
+ dir.make_directory();
+ }
+ if (!FileUtils.test(dirname + "/resources",FileTest.IS_DIR)) {
+ var dir = File.new_for_path(dirname + "/resources");
+ dir.make_directory();
+ }
+
+
+ return dirname;
+ }
+
+ }
+
+
+
+
--- /dev/null
+{
+ "name" : "About",
+ "parent" : "",
+ "title" : "",
+ "path" : "/home/alan/gitlive/app.Builder.js/src/Builder4/About.bjs",
+ "permname" : "",
+ "modOrder" : "",
+ "build_module" : "builder",
+ "items" : [
+ {
+ "listeners" : {
+ "response" : "(rid) => {\n this.el.hide();\n}\n "
+ },
+ "| void show" : "(Gtk.Window parent) {\n this.el.set_transient_for(parent);\n this.el.modal = true;\n this.el.show();\n}\n ",
+ "xtype" : "AboutDialog",
+ "program_name" : "app.Builder.js",
+ "$ modal" : true,
+ "$ authors" : "{ \"Alan Knowles\" }",
+ "$ xns" : "Gtk",
+ "website" : "http://www.roojs.org/blog.php",
+ "string copyright" : "LGPL",
+ "string license" : "LGPL"
+ }
+ ]
+}
\ No newline at end of file
--- /dev/null
+static About _About;
+
+public class About : Object
+{
+ public Gtk.AboutDialog el;
+ private About _this;
+
+ public static About singleton()
+ {
+ if (_About == null) {
+ _About= new About();
+ }
+ return _About;
+ }
+
+ // my vars (def)
+
+ // ctor
+ public About()
+ {
+ _this = this;
+ this.el = new Gtk.AboutDialog();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.program_name = "app.Builder.js";
+ this.el.license = "LGPL";
+ this.el.authors = { "Alan Knowles" };
+ this.el.website = "http://www.roojs.org/blog.php";
+ this.el.modal = true;
+ this.el.copyright = "LGPL";
+
+ //listeners
+ this.el.response.connect( (rid) => {
+ this.el.hide();
+ });
+ }
+
+ // user defined functions
+ public void show (Gtk.Window parent) {
+ this.el.set_transient_for(parent);
+ this.el.modal = true;
+ this.el.show();
+ }
+}
--- /dev/null
+{
+ "name" : "ClutterFiles",
+ "parent" : "",
+ "title" : "",
+ "path" : "/home/alan/gitlive/app.Builder.js/src/Builder4/ClutterFiles.bjs",
+ "permname" : "",
+ "modOrder" : "",
+ "build_module" : "builder",
+ "items" : [
+ {
+ "id" : "ClutterFiles",
+ "| void clearFiles" : "() {\n \n this.filelayout.el.remove_all_children();\n // we need to unref all the chidren that we loaded though...\n \n}\n ",
+ "Clutter.ScrollMode scroll_mode" : "Clutter.ScrollMode.VERTICALLY",
+ "xtype" : "Actor",
+ "| void loadProject" : "(Project.Project pr) {\n // list all the files, and create new Xcls_fileitem for each one.\n \n this.project = pr;\n \n \n // LEAK --- we should unref all the chilren...\n this.filelayout.el.y = 0;\n this.clearFiles();\n \n print(\"clutter files - load project: \" + pr.name +\"\\n\");\n // should unref.. them hopefully.\n \n this.project_title_name.el.text = pr.name;\n this.project_title_path.el.text = pr.firstPath();\n \n // file items contains a reference until we reload ...\n this.fileitems = new Gee.ArrayList<Object>();\n\n \n\n var fiter = pr.sortedFiles().list_iterator();\n while (fiter.next()) {\n var a = new Xcls_fileitem(this,fiter.get());\n this.fileitems.add(a);\n\n// a.ref();\n print(\"add to clutter file view: \" + fiter.get().name + \"\\n\");\n this.filelayout.el.add_child(a.el);\n }\n \n // folders...\n \n if (!(pr is Project.Gtk)) {\n print (\"not gtk... skipping files\");\n return;\n }\n var gpr = (Project.Gtk)pr;\n var def = gpr.compilegroups.get(\"_default_\");\n var items = def.sources;\n \n \n \n for(var i =0 ; i < items.size; i++) {\n print (\"cheking folder %s\\n\", items.get(i));\n var files = gpr.filesForOpen(items.get(i));\n if (files.size < 1) {\n continue;\n }\n\n // add the directory... items.get(i);\n var x = new Xcls_folderitem(this,items.get(i));\n this.fileitems.add(x);\n this.filelayout.el.add_child(x.el);\n \n for(var j =0 ; j < files.size; j++) {\n print (\"adding file %s\\n\", files.get(j));\n \n var y = new Xcls_folderfile(this, files.get(j));\n this.fileitems.add(y);\n x.el.add_child(y.el);\n\n // add file to files.get(j);\n \n }\n \n \n //this.el.set_value(citer, 1, items.get(i) );\n }\n \n \n \n this.el.show();\n}\n",
+ "# Gdk.Pixbuf missing_thumb_pixbuf" : "null",
+ "@ void open" : "(JsRender.JsRender file)",
+ "$ xns" : "Clutter",
+ "bool reactive" : true,
+ "Project.Project project" : "",
+ "| void set_size" : "(float w, float h) \n{\n \n // called by window resize... with is alreaddy -50 (for the buttons?)\n \n\n\n\n if (this.el == null) {\n print(\"object not ready yet?\");\n return;\n }\n \n print(\"recv width %f, filelayoutw = %f\", w, w-200);\n \n w = GLib.Math.floorf ( w/120.0f) * 120.0f;\n \n \n \n \n //_this.filelayout_manager.el.max_column_width = w - 200;\n _this.filelayout.el.width = w ;\n \n this.el.set_size(\n // this.el.get_stage().width-150,\n w,\n h // this.el.get_stage().height\n );\n \n // 100 right for buttons ..\n this.el.set_position(75,0);\n \n \n this.scroller.el.set_size(\n // this.el.get_stage().width-150,\n w,\n h // this.el.get_stage().height\n );\n \n // 100 right for buttons ..\n this.scroller.el.set_position(0,50);\n // scroll...\n _this.filelayout.el.y = 0.0f;\n \n}\n",
+ "# Gee.ArrayList<Object> fileitems" : "new Gee.ArrayList<Object>()",
+ "items" : [
+ {
+ "id" : "project_title",
+ "* init" : "\nthis.el.add_constraint(\n new Clutter.BindConstraint(_this.el,Clutter.BindCoordinate.SIZE, 0.0f)\n);\nthis.el.set_position(0,0);\n ",
+ "xtype" : "Actor",
+ "* pack" : "add_child",
+ "$ reactive" : true,
+ "$ xns" : "Clutter",
+ "items" : [
+ {
+ "id" : "project_title_manager",
+ "$ orientation" : "Clutter.FlowOrientation.HORIZONTAL",
+ "xtype" : "FlowLayout",
+ "boolean homogeneous" : false,
+ "$ xns" : "Clutter",
+ "row_spacing" : 5,
+ "* prop" : "layout_manager",
+ "column_spacing" : 20
+ },
+ {
+ "xtype" : "FixedLayout",
+ "$ xns" : "Clutter",
+ "* prop" : "layout_manager"
+ },
+ {
+ "* ctor" : "new Clutter.Text.full(\"Sans 20px\", \"\", Clutter.Color.from_string(\"#eee\"))",
+ "id" : "project_title_name",
+ "float x" : "0.0f",
+ "* pack" : "add_child",
+ "xtype" : "Text",
+ "float y" : "10.0f",
+ "boolean x_expand" : false,
+ "$ xns" : "Clutter"
+ },
+ {
+ "* ctor" : "new Clutter.Text.full(\"Sans 10px\", \"\", Clutter.Color.from_string(\"#ccc\"))",
+ "id" : "project_title_path",
+ "float x" : "0.0f",
+ "* pack" : "add_child",
+ "xtype" : "Text",
+ "float y" : "35.0f",
+ "$ xns" : "Clutter"
+ }
+ ]
+ },
+ {
+ "listeners" : {
+ "scroll_event" : "( event) => {\n print(\"scroll event\\n\");\n var y = _this.filelayout.el.y;\n var dir = event.direction;\n \n var last_child_bottom = _this.filelayout.el.last_child.y + _this.filelayout.el.last_child.height;\n var bottompos = -1 * ( last_child_bottom - (0.5f * this.el.height));\n \n switch (dir) {\n case Clutter.ScrollDirection.UP:\n print(\"Scroll up by %f\\n\", event.y);\n y += event.y /2;\n y = float.min(0, y); // \n break;\n \n case Clutter.ScrollDirection.DOWN:\n print(\"Scroll down by %f\\n\", event.y);\n y -= event.y /2 ;\n y = float.max(bottompos, y);\n \n \n break;\n \t case Clutter.ScrollDirection.SMOOTH:\n \t double delta_x, delta_y;\n \t event.get_scroll_delta(out delta_x, out delta_y);\n //print(\"Scroll SMOOTH? by %f\\n\", delta_y * event.y);\n y += ((float)delta_y * event.y * -1.0f) /2 ;\n y = float.max(bottompos, y);\n y = float.min(0, y); // \n \n break;\n default:\n\t print(\"scroll event = bad direction %s\\n\", dir.to_string());\n return false;\n }\n // range of scroll -- can go up -- eg.. -ve value.\n \n\n \n print(\"Set scroll to %f (lcb=%f / height = %f)\\n\", y, last_child_bottom, this.el.height);\n \n _this.filelayout.el.y = y;\n return true;\n \n}"
+ },
+ "# Gee.ArrayList<Xcls_fileitem> fileitems" : "new Gee.ArrayList<Xcls_fileitem>()",
+ "id" : "scroller",
+ "Clutter.ScrollMode scroll_mode" : "Clutter.ScrollMode.VERTICALLY",
+ "xtype" : "ScrollActor",
+ "* pack" : "add_child",
+ "# Gdk.Pixbuf missing_thumb_pixbuf" : "null",
+ "$ xns" : "Clutter",
+ "bool reactive" : true,
+ "items" : [
+ {
+ "id" : "filelayout",
+ "* init" : "\nthis.el.add_constraint(\n new Clutter.BindConstraint(_this.el,Clutter.BindCoordinate.SIZE, 0.0f)\n);\n\n ",
+ "xtype" : "Actor",
+ "* pack" : "add_child",
+ "$ reactive" : true,
+ "$ xns" : "Clutter",
+ "items" : [
+ {
+ "id" : "filelayout_manager",
+ "bool homogeneous" : false,
+ "$ orientation" : "Clutter.FlowOrientation.HORIZONTAL",
+ "xtype" : "FlowLayout",
+ "float max_column_width" : "100.0f",
+ "$ xns" : "Clutter",
+ "row_spacing" : 20,
+ "* prop" : "layout_manager",
+ "column_spacing" : 20
+ },
+ {
+ "listeners" : {
+ "button_press_event" : " ( event) => {\n _this.open(this.file);\n return false;\n} ",
+ "enter_event" : "( event) => {\n this.el.background_color = Clutter.Color.from_string(\"#333\");\n this.title.el.background_color = Clutter.Color.from_string(\"#fff\");\n this.typetitle.el.background_color = Clutter.Color.from_string(\"#fff\");\n this.title.el.color = Clutter.Color.from_string(\"#000\");\n this.typetitle.el.color = Clutter.Color.from_string(\"#000\");\n \n return false;\n}",
+ "leave_event" : "( event) => {\n this.el.background_color = Clutter.Color.from_string(\"#000\");\n this.title.el.background_color = Clutter.Color.from_string(\"#000\");\n this.typetitle.el.background_color = Clutter.Color.from_string(\"#000\");\n this.title.el.color = Clutter.Color.from_string(\"#fff\");\n this.typetitle.el.color = Clutter.Color.from_string(\"#fff\");\n \n \n return false;\n}"
+ },
+ "id" : "*fileitem",
+ "* args" : "JsRender.JsRender file",
+ "* init" : "this.file = file;\nthis.el.set_size(100,100);",
+ "* pack" : true,
+ "xtype" : "Actor",
+ "# JsRender.JsRender file" : "",
+ "$ reactive" : true,
+ "$ xns" : "Clutter",
+ "items" : [
+ {
+ "spacing" : 4,
+ "xtype" : "BoxLayout",
+ "orientation" : "Clutter.Orientation.VERTICAL",
+ "$ xns" : "Clutter",
+ "* prop" : "layout_manager"
+ },
+ {
+ "$ margin_right" : 5,
+ "$ margin_top" : 5,
+ "id" : "+image",
+ "* args" : "JsRender.JsRender file",
+ "* init" : "{\n Gdk.Pixbuf pixbuf= null;\n \n var fname = file.getIconFileName(false);\n\n try {\n if (FileUtils.test(fname, FileTest.EXISTS)) {\n pixbuf = new Gdk.Pixbuf.from_file(fname);\n } \n } catch (Error e) {\n // noop\n \n }\n if (pixbuf == null) {\n \n try {\n if (_this.missing_thumb_pixbuf == null) {\n var icon_theme = Gtk.IconTheme.get_default ();\n _this.missing_thumb_pixbuf = icon_theme.load_icon (\"package-x-generic\", 92, 0);\n _this.missing_thumb_pixbuf.ref();\n }\n pixbuf = _this.missing_thumb_pixbuf;\n\n } catch (Error e) {\n // noop?\n }\n }\n try {\n var img = new Clutter.Image();\n img.set_data(pixbuf.get_pixels(), \n pixbuf.has_alpha \n ? Cogl.PixelFormat.RGBA_8888\n : Cogl.PixelFormat.RGB_888,\n pixbuf.get_width (),\n pixbuf.get_height (),\n pixbuf.get_rowstride ()\n );\n this.el.set_content(img);\n } catch (Error e) {\n // noop?\n }\n // should probably do smarter scaling...\n \n \n this.el.set_size(90, 70);\n}\n",
+ "* pack" : "add_child",
+ "xtype" : "Actor",
+ "bool x_expand" : false,
+ "$ y_align" : "Clutter.ActorAlign.START",
+ "$ margin_left" : 5,
+ "$ xns" : "Clutter",
+ "bool y_expand" : false,
+ "$ x_align" : "Clutter.ActorAlign.START"
+ },
+ {
+ "* ctor" : "new Clutter.Text.full(\"Sans 10px\", file.nickType(), Clutter.Color.from_string(\"#fff\"))",
+ "* args" : "JsRender.JsRender file",
+ "id" : "+typetitle",
+ "* pack" : "add_child",
+ "xtype" : "Text",
+ "bool x_expand" : false,
+ "$ y_align" : "Clutter.ActorAlign.START",
+ "$ xns" : "Clutter",
+ "bool y_expand" : false,
+ "$ x_align" : "Clutter.ActorAlign.START"
+ },
+ {
+ "* ctor" : "new Clutter.Text.full(\"Sans 10px\", file.nickName(), Clutter.Color.from_string(\"#fff\"))",
+ "* args" : "JsRender.JsRender file",
+ "id" : "+title",
+ "* pack" : "add_child",
+ "xtype" : "Text",
+ "bool x_expand" : false,
+ "$ y_align" : "Clutter.ActorAlign.START",
+ "$ xns" : "Clutter",
+ "bool y_expand" : false,
+ "$ x_align" : "Clutter.ActorAlign.START"
+ }
+ ]
+ },
+ {
+ "id" : "*folderitem",
+ "* args" : "string folderpath",
+ "* init" : " \n//this.el.set_size(100,100);",
+ "* pack" : true,
+ "xtype" : "Actor",
+ "$ reactive" : true,
+ "$ xns" : "Clutter",
+ "items" : [
+ {
+ "spacing" : 2,
+ "xtype" : "BoxLayout",
+ "orientation" : "Clutter.Orientation.VERTICAL",
+ "$ xns" : "Clutter",
+ "* prop" : "layout_manager"
+ },
+ {
+ "* ctor" : "new Clutter.Text.full(\"Sans bold 14px\", GLib.Path.get_basename(folderpath), Clutter.Color.from_string(\"#fff\"))",
+ "id" : "+foldertitle",
+ "* args" : "string folderpath",
+ "$ x_expand" : true,
+ "* pack" : "add_child",
+ "xtype" : "Text",
+ "$ y_align" : "Clutter.ActorAlign.START",
+ "$ xns" : "Clutter",
+ "bool y_expand" : false,
+ "$ x_align" : "Clutter.ActorAlign.START"
+ },
+ {
+ "listeners" : {
+ "button_press_event" : " ( event) => {\n \n var f = JsRender.JsRender.factory(\"PlainFile\", _this.project, this.filepath);\n _this.open(f);\n return false;\n} ",
+ "enter_event" : "( event) => {\n this.el.background_color = Clutter.Color.from_string(\"#fff\");\n this.el.color = Clutter.Color.from_string(\"#000\");\n return false;\n}",
+ "leave_event" : "( event) => {\n this.el.background_color = Clutter.Color.from_string(\"#000\");\n this.el.color = Clutter.Color.from_string(\"#fff\");\n return false;\n}"
+ },
+ "* ctor" : "new Clutter.Text.full(\"Sans 10px\", GLib.Path.get_basename(filepath), Clutter.Color.from_string(\"#fff\"))",
+ "* args" : "string filepath",
+ "id" : "*folderfile",
+ "* init" : "{\n\tthis.filepath = filepath;\n}\n",
+ "xtype" : "Text",
+ "bool x_expand" : true,
+ "Clutter.ActorAlign y_align" : "Clutter.ActorAlign.START",
+ "string filepath" : "",
+ "$ xns" : "Clutter",
+ "bool reactive" : true,
+ "Clutter.ActorAlign x_align" : "Clutter.ActorAlign.START",
+ "bool y_expand" : true
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file
--- /dev/null
+static Xcls_ClutterFiles _ClutterFiles;
+
+public class Xcls_ClutterFiles : Object
+{
+ public Clutter.Actor el;
+ private Xcls_ClutterFiles _this;
+
+ public static Xcls_ClutterFiles singleton()
+ {
+ if (_ClutterFiles == null) {
+ _ClutterFiles= new Xcls_ClutterFiles();
+ }
+ return _ClutterFiles;
+ }
+ public Xcls_project_title project_title;
+ public Xcls_project_title_manager project_title_manager;
+ public Xcls_project_title_name project_title_name;
+ public Xcls_project_title_path project_title_path;
+ public Xcls_scroller scroller;
+ public Xcls_filelayout filelayout;
+ public Xcls_filelayout_manager filelayout_manager;
+
+ // my vars (def)
+ public Clutter.ScrollMode scroll_mode;
+ public Gdk.Pixbuf missing_thumb_pixbuf;
+ public signal void open (JsRender.JsRender file);
+ public Project.Project project;
+ public Gee.ArrayList<Object> fileitems;
+
+ // ctor
+ public Xcls_ClutterFiles()
+ {
+ _this = this;
+ this.el = new Clutter.Actor();
+
+ // my vars (dec)
+ this.scroll_mode = Clutter.ScrollMode.VERTICALLY;
+ this.missing_thumb_pixbuf = null;
+ this.fileitems = new Gee.ArrayList<Object>();
+
+ // set gobject values
+ this.el.reactive = true;
+ var child_0 = new Xcls_project_title( _this );
+ child_0.ref();
+ this.el.add_child ( child_0.el );
+ var child_1 = new Xcls_scroller( _this );
+ child_1.ref();
+ this.el.add_child ( child_1.el );
+ }
+
+ // user defined functions
+ public void clearFiles () {
+
+ this.filelayout.el.remove_all_children();
+ // we need to unref all the chidren that we loaded though...
+
+ }
+ public void loadProject (Project.Project pr) {
+ // list all the files, and create new Xcls_fileitem for each one.
+
+ this.project = pr;
+
+
+ // LEAK --- we should unref all the chilren...
+ this.filelayout.el.y = 0;
+ this.clearFiles();
+
+ print("clutter files - load project: " + pr.name +"\n");
+ // should unref.. them hopefully.
+
+ this.project_title_name.el.text = pr.name;
+ this.project_title_path.el.text = pr.firstPath();
+
+ // file items contains a reference until we reload ...
+ this.fileitems = new Gee.ArrayList<Object>();
+
+
+
+ var fiter = pr.sortedFiles().list_iterator();
+ while (fiter.next()) {
+ var a = new Xcls_fileitem(this,fiter.get());
+ this.fileitems.add(a);
+
+ // a.ref();
+ print("add to clutter file view: " + fiter.get().name + "\n");
+ this.filelayout.el.add_child(a.el);
+ }
+
+ // folders...
+
+ if (!(pr is Project.Gtk)) {
+ print ("not gtk... skipping files");
+ return;
+ }
+ var gpr = (Project.Gtk)pr;
+ var def = gpr.compilegroups.get("_default_");
+ var items = def.sources;
+
+
+
+ for(var i =0 ; i < items.size; i++) {
+ print ("cheking folder %s\n", items.get(i));
+ var files = gpr.filesForOpen(items.get(i));
+ if (files.size < 1) {
+ continue;
+ }
+
+ // add the directory... items.get(i);
+ var x = new Xcls_folderitem(this,items.get(i));
+ this.fileitems.add(x);
+ this.filelayout.el.add_child(x.el);
+
+ for(var j =0 ; j < files.size; j++) {
+ print ("adding file %s\n", files.get(j));
+
+ var y = new Xcls_folderfile(this, files.get(j));
+ this.fileitems.add(y);
+ x.el.add_child(y.el);
+
+ // add file to files.get(j);
+
+ }
+
+
+ //this.el.set_value(citer, 1, items.get(i) );
+ }
+
+
+
+ this.el.show();
+ }
+ public void set_size (float w, float h)
+ {
+
+ // called by window resize... with is alreaddy -50 (for the buttons?)
+
+
+
+
+ if (this.el == null) {
+ print("object not ready yet?");
+ return;
+ }
+
+ print("recv width %f, filelayoutw = %f", w, w-200);
+
+ w = GLib.Math.floorf ( w/120.0f) * 120.0f;
+
+
+
+
+ //_this.filelayout_manager.el.max_column_width = w - 200;
+ _this.filelayout.el.width = w ;
+
+ this.el.set_size(
+ // this.el.get_stage().width-150,
+ w,
+ h // this.el.get_stage().height
+ );
+
+ // 100 right for buttons ..
+ this.el.set_position(75,0);
+
+
+ this.scroller.el.set_size(
+ // this.el.get_stage().width-150,
+ w,
+ h // this.el.get_stage().height
+ );
+
+ // 100 right for buttons ..
+ this.scroller.el.set_position(0,50);
+ // scroll...
+ _this.filelayout.el.y = 0.0f;
+
+ }
+ public class Xcls_project_title : Object
+ {
+ public Clutter.Actor el;
+ private Xcls_ClutterFiles _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_project_title(Xcls_ClutterFiles _owner )
+ {
+ _this = _owner;
+ _this.project_title = this;
+ this.el = new Clutter.Actor();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.reactive = true;
+ var child_0 = new Xcls_project_title_manager( _this );
+ child_0.ref();
+ this.el.layout_manager = child_0.el;
+ var child_1 = new Xcls_FixedLayout4( _this );
+ child_1.ref();
+ this.el.layout_manager = child_1.el;
+ var child_2 = new Xcls_project_title_name( _this );
+ child_2.ref();
+ this.el.add_child ( child_2.el );
+ var child_3 = new Xcls_project_title_path( _this );
+ child_3.ref();
+ this.el.add_child ( child_3.el );
+
+ // init method
+
+ this.el.add_constraint(
+ new Clutter.BindConstraint(_this.el,Clutter.BindCoordinate.SIZE, 0.0f)
+ );
+ this.el.set_position(0,0);
+ }
+
+ // user defined functions
+ }
+ public class Xcls_project_title_manager : Object
+ {
+ public Clutter.FlowLayout el;
+ private Xcls_ClutterFiles _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_project_title_manager(Xcls_ClutterFiles _owner )
+ {
+ _this = _owner;
+ _this.project_title_manager = this;
+ this.el = new Clutter.FlowLayout( Clutter.FlowOrientation.HORIZONTAL );
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.homogeneous = false;
+ this.el.row_spacing = 5f;
+ this.el.column_spacing = 20f;
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_FixedLayout4 : Object
+ {
+ public Clutter.FixedLayout el;
+ private Xcls_ClutterFiles _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_FixedLayout4(Xcls_ClutterFiles _owner )
+ {
+ _this = _owner;
+ this.el = new Clutter.FixedLayout();
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_project_title_name : Object
+ {
+ public Clutter.Text el;
+ private Xcls_ClutterFiles _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_project_title_name(Xcls_ClutterFiles _owner )
+ {
+ _this = _owner;
+ _this.project_title_name = this;
+ this.el = new Clutter.Text.full("Sans 20px", "", Clutter.Color.from_string("#eee"));
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.x = 0.0f;
+ this.el.y = 10.0f;
+ this.el.x_expand = false;
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_project_title_path : Object
+ {
+ public Clutter.Text el;
+ private Xcls_ClutterFiles _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_project_title_path(Xcls_ClutterFiles _owner )
+ {
+ _this = _owner;
+ _this.project_title_path = this;
+ this.el = new Clutter.Text.full("Sans 10px", "", Clutter.Color.from_string("#ccc"));
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.x = 0.0f;
+ this.el.y = 35.0f;
+ }
+
+ // user defined functions
+ }
+
+
+ public class Xcls_scroller : Object
+ {
+ public Clutter.ScrollActor el;
+ private Xcls_ClutterFiles _this;
+
+
+ // my vars (def)
+ public Gee.ArrayList<Xcls_fileitem> fileitems;
+ public Gdk.Pixbuf missing_thumb_pixbuf;
+
+ // ctor
+ public Xcls_scroller(Xcls_ClutterFiles _owner )
+ {
+ _this = _owner;
+ _this.scroller = this;
+ this.el = new Clutter.ScrollActor();
+
+ // my vars (dec)
+ this.fileitems = new Gee.ArrayList<Xcls_fileitem>();
+ this.missing_thumb_pixbuf = null;
+
+ // set gobject values
+ this.el.scroll_mode = Clutter.ScrollMode.VERTICALLY;
+ this.el.reactive = true;
+ var child_0 = new Xcls_filelayout( _this );
+ child_0.ref();
+ this.el.add_child ( child_0.el );
+
+ //listeners
+ this.el.scroll_event.connect( ( event) => {
+ print("scroll event\n");
+ var y = _this.filelayout.el.y;
+ var dir = event.direction;
+
+ var last_child_bottom = _this.filelayout.el.last_child.y + _this.filelayout.el.last_child.height;
+ var bottompos = -1 * ( last_child_bottom - (0.5f * this.el.height));
+
+ switch (dir) {
+ case Clutter.ScrollDirection.UP:
+ print("Scroll up by %f\n", event.y);
+ y += event.y /2;
+ y = float.min(0, y); //
+ break;
+
+ case Clutter.ScrollDirection.DOWN:
+ print("Scroll down by %f\n", event.y);
+ y -= event.y /2 ;
+ y = float.max(bottompos, y);
+
+
+ break;
+ case Clutter.ScrollDirection.SMOOTH:
+ double delta_x, delta_y;
+ event.get_scroll_delta(out delta_x, out delta_y);
+ //print("Scroll SMOOTH? by %f\n", delta_y * event.y);
+ y += ((float)delta_y * event.y * -1.0f) /2 ;
+ y = float.max(bottompos, y);
+ y = float.min(0, y); //
+
+ break;
+ default:
+ print("scroll event = bad direction %s\n", dir.to_string());
+ return false;
+ }
+ // range of scroll -- can go up -- eg.. -ve value.
+
+
+
+ print("Set scroll to %f (lcb=%f / height = %f)\n", y, last_child_bottom, this.el.height);
+
+ _this.filelayout.el.y = y;
+ return true;
+
+ });
+ }
+
+ // user defined functions
+ }
+ public class Xcls_filelayout : Object
+ {
+ public Clutter.Actor el;
+ private Xcls_ClutterFiles _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_filelayout(Xcls_ClutterFiles _owner )
+ {
+ _this = _owner;
+ _this.filelayout = this;
+ this.el = new Clutter.Actor();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.reactive = true;
+ var child_0 = new Xcls_filelayout_manager( _this );
+ child_0.ref();
+ this.el.layout_manager = child_0.el;
+
+ // init method
+
+ this.el.add_constraint(
+ new Clutter.BindConstraint(_this.el,Clutter.BindCoordinate.SIZE, 0.0f)
+ );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_filelayout_manager : Object
+ {
+ public Clutter.FlowLayout el;
+ private Xcls_ClutterFiles _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_filelayout_manager(Xcls_ClutterFiles _owner )
+ {
+ _this = _owner;
+ _this.filelayout_manager = this;
+ this.el = new Clutter.FlowLayout( Clutter.FlowOrientation.HORIZONTAL );
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.homogeneous = false;
+ this.el.max_column_width = 100.0f;
+ this.el.row_spacing = 20f;
+ this.el.column_spacing = 20f;
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_fileitem : Object
+ {
+ public Clutter.Actor el;
+ private Xcls_ClutterFiles _this;
+
+
+ // my vars (def)
+ public JsRender.JsRender file;
+ public Xcls_image image;
+ public Xcls_typetitle typetitle;
+ public Xcls_title title;
+
+ // ctor
+ public Xcls_fileitem(Xcls_ClutterFiles _owner , JsRender.JsRender file)
+ {
+ _this = _owner;
+ this.el = new Clutter.Actor();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.reactive = true;
+ var child_0 = new Xcls_BoxLayout11( _this );
+ child_0.ref();
+ this.el.layout_manager = child_0.el;
+ var child_1 = new Xcls_image( _this ,file);
+ child_1.ref();
+ this.el.add_child ( child_1.el );
+ this.image = child_1;
+ var child_2 = new Xcls_typetitle( _this ,file);
+ child_2.ref();
+ this.el.add_child ( child_2.el );
+ this.typetitle = child_2;
+ var child_3 = new Xcls_title( _this ,file);
+ child_3.ref();
+ this.el.add_child ( child_3.el );
+ this.title = child_3;
+
+ // init method
+
+ this.file = file;
+ this.el.set_size(100,100);
+
+ //listeners
+ this.el.button_press_event.connect( ( event) => {
+ _this.open(this.file);
+ return false;
+ });
+ this.el.enter_event.connect( ( event) => {
+ this.el.background_color = Clutter.Color.from_string("#333");
+ this.title.el.background_color = Clutter.Color.from_string("#fff");
+ this.typetitle.el.background_color = Clutter.Color.from_string("#fff");
+ this.title.el.color = Clutter.Color.from_string("#000");
+ this.typetitle.el.color = Clutter.Color.from_string("#000");
+
+ return false;
+ });
+ this.el.leave_event.connect( ( event) => {
+ this.el.background_color = Clutter.Color.from_string("#000");
+ this.title.el.background_color = Clutter.Color.from_string("#000");
+ this.typetitle.el.background_color = Clutter.Color.from_string("#000");
+ this.title.el.color = Clutter.Color.from_string("#fff");
+ this.typetitle.el.color = Clutter.Color.from_string("#fff");
+
+
+ return false;
+ });
+ }
+
+ // user defined functions
+ }
+ public class Xcls_BoxLayout11 : Object
+ {
+ public Clutter.BoxLayout el;
+ private Xcls_ClutterFiles _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_BoxLayout11(Xcls_ClutterFiles _owner )
+ {
+ _this = _owner;
+ this.el = new Clutter.BoxLayout();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.spacing = 4;
+ this.el.orientation = Clutter.Orientation.VERTICAL;
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_image : Object
+ {
+ public Clutter.Actor el;
+ private Xcls_ClutterFiles _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_image(Xcls_ClutterFiles _owner , JsRender.JsRender file)
+ {
+ _this = _owner;
+ this.el = new Clutter.Actor();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.margin_right = 5f;
+ this.el.margin_left = 5f;
+ this.el.x_align = Clutter.ActorAlign.START;
+ this.el.x_expand = false;
+ this.el.y_align = Clutter.ActorAlign.START;
+ this.el.margin_top = 5f;
+ this.el.y_expand = false;
+
+ // init method
+
+ {
+ Gdk.Pixbuf pixbuf= null;
+
+ var fname = file.getIconFileName(false);
+
+ try {
+ if (FileUtils.test(fname, FileTest.EXISTS)) {
+ pixbuf = new Gdk.Pixbuf.from_file(fname);
+ }
+ } catch (Error e) {
+ // noop
+
+ }
+ if (pixbuf == null) {
+
+ try {
+ if (_this.missing_thumb_pixbuf == null) {
+ var icon_theme = Gtk.IconTheme.get_default ();
+ _this.missing_thumb_pixbuf = icon_theme.load_icon ("package-x-generic", 92, 0);
+ _this.missing_thumb_pixbuf.ref();
+ }
+ pixbuf = _this.missing_thumb_pixbuf;
+
+ } catch (Error e) {
+ // noop?
+ }
+ }
+ try {
+ var img = new Clutter.Image();
+ img.set_data(pixbuf.get_pixels(),
+ pixbuf.has_alpha
+ ? Cogl.PixelFormat.RGBA_8888
+ : Cogl.PixelFormat.RGB_888,
+ pixbuf.get_width (),
+ pixbuf.get_height (),
+ pixbuf.get_rowstride ()
+ );
+ this.el.set_content(img);
+ } catch (Error e) {
+ // noop?
+ }
+ // should probably do smarter scaling...
+
+
+ this.el.set_size(90, 70);
+ }
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_typetitle : Object
+ {
+ public Clutter.Text el;
+ private Xcls_ClutterFiles _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_typetitle(Xcls_ClutterFiles _owner , JsRender.JsRender file)
+ {
+ _this = _owner;
+ this.el = new Clutter.Text.full("Sans 10px", file.nickType(), Clutter.Color.from_string("#fff"));
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.x_align = Clutter.ActorAlign.START;
+ this.el.x_expand = false;
+ this.el.y_align = Clutter.ActorAlign.START;
+ this.el.y_expand = false;
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_title : Object
+ {
+ public Clutter.Text el;
+ private Xcls_ClutterFiles _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_title(Xcls_ClutterFiles _owner , JsRender.JsRender file)
+ {
+ _this = _owner;
+ this.el = new Clutter.Text.full("Sans 10px", file.nickName(), Clutter.Color.from_string("#fff"));
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.x_align = Clutter.ActorAlign.START;
+ this.el.x_expand = false;
+ this.el.y_align = Clutter.ActorAlign.START;
+ this.el.y_expand = false;
+ }
+
+ // user defined functions
+ }
+
+
+ public class Xcls_folderitem : Object
+ {
+ public Clutter.Actor el;
+ private Xcls_ClutterFiles _this;
+
+
+ // my vars (def)
+ public Xcls_foldertitle foldertitle;
+
+ // ctor
+ public Xcls_folderitem(Xcls_ClutterFiles _owner , string folderpath)
+ {
+ _this = _owner;
+ this.el = new Clutter.Actor();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.reactive = true;
+ var child_0 = new Xcls_BoxLayout16( _this );
+ child_0.ref();
+ this.el.layout_manager = child_0.el;
+ var child_1 = new Xcls_foldertitle( _this ,folderpath);
+ child_1.ref();
+ this.el.add_child ( child_1.el );
+ this.foldertitle = child_1;
+
+ // init method
+
+ //this.el.set_size(100,100);
+ }
+
+ // user defined functions
+ }
+ public class Xcls_BoxLayout16 : Object
+ {
+ public Clutter.BoxLayout el;
+ private Xcls_ClutterFiles _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_BoxLayout16(Xcls_ClutterFiles _owner )
+ {
+ _this = _owner;
+ this.el = new Clutter.BoxLayout();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.spacing = 2;
+ this.el.orientation = Clutter.Orientation.VERTICAL;
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_foldertitle : Object
+ {
+ public Clutter.Text el;
+ private Xcls_ClutterFiles _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_foldertitle(Xcls_ClutterFiles _owner , string folderpath)
+ {
+ _this = _owner;
+ this.el = new Clutter.Text.full("Sans bold 14px", GLib.Path.get_basename(folderpath), Clutter.Color.from_string("#fff"));
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.x_align = Clutter.ActorAlign.START;
+ this.el.x_expand = true;
+ this.el.y_align = Clutter.ActorAlign.START;
+ this.el.y_expand = false;
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_folderfile : Object
+ {
+ public Clutter.Text el;
+ private Xcls_ClutterFiles _this;
+
+
+ // my vars (def)
+ public string filepath;
+
+ // ctor
+ public Xcls_folderfile(Xcls_ClutterFiles _owner , string filepath)
+ {
+ _this = _owner;
+ this.el = new Clutter.Text.full("Sans 10px", GLib.Path.get_basename(filepath), Clutter.Color.from_string("#fff"));
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.x_align = Clutter.ActorAlign.START;
+ this.el.x_expand = true;
+ this.el.y_align = Clutter.ActorAlign.START;
+ this.el.reactive = true;
+ this.el.y_expand = true;
+
+ // init method
+
+ {
+ this.filepath = filepath;
+ }
+
+ //listeners
+ this.el.button_press_event.connect( ( event) => {
+
+ var f = JsRender.JsRender.factory("PlainFile", _this.project, this.filepath);
+ _this.open(f);
+ return false;
+ });
+ this.el.enter_event.connect( ( event) => {
+ this.el.background_color = Clutter.Color.from_string("#fff");
+ this.el.color = Clutter.Color.from_string("#000");
+ return false;
+ });
+ this.el.leave_event.connect( ( event) => {
+ this.el.background_color = Clutter.Color.from_string("#000");
+ this.el.color = Clutter.Color.from_string("#fff");
+ return false;
+ });
+ }
+
+ // user defined functions
+ }
+
+
+
+
+}
--- /dev/null
+/**
+ * handle the compile state
+ *
+ * when the app tries to compile the application, it will output information
+ * about errors/warnings and depricated information.
+ *
+ * This has a number of effects..
+ *
+ * - when it compiles
+ * -- if any of the errors// etc.. are affecting the current open file
+ * then we should flag the tree indicating which node has a problem
+ *
+ * -- update the footer bar to show stats (eg. how many errors etc..)
+ *
+ *
+ *
+ * - when you open a file
+ * - if there are any notices for that file, then we should flag the tree
+ * to show the errors.
+ *
+ *
+ *
+ */
+public class CompileState : Object
+{
+ public Xcls_MainWindow win;
+
+ public enum State {
+ NONE,
+ PREVIEW,
+ OBJECT,
+ PROP,
+ LISTENER,
+ CODE,
+ FILES,
+ PROJECT // project settings..
+ }
+
+ public State state = State.NONE;
+
+ public bool children_loaded = false;
+
+
+ public X
--- /dev/null
+{
+ "name" : "DialogConfirm",
+ "parent" : "",
+ "title" : "",
+ "path" : "/home/alan/gitlive/app.Builder.js/src/Builder4/DialogConfirm.bjs",
+ "permname" : "",
+ "modOrder" : "",
+ "build_module" : "builder",
+ "items" : [
+ {
+ "listeners" : {
+ "delete_event" : " (event) => {\n this.el.response(Gtk.ResponseType.CANCEL);\n this.el.hide();\n return true;\n \n}\n \n\n\n"
+ },
+ "$ message_type" : "Gtk.MessageType.QUESTION",
+ "text" : "Tests",
+ "title" : "Please Confirm d",
+ "xtype" : "MessageDialog",
+ "$ modal" : true,
+ "| int show" : " (string title, string msg) {\n //if (!this.el) { this.init(); } \n //this.success = success;\n this.el.title = title;\n this.el.text = msg;\n this.el.show_all();\n var ret = this.el.run();\n //print(\"ret got %d\", ret);\n this.el.hide();\n return ret;\n \n\n}\n \n\n\n\n",
+ "$ buttons" : "Gtk.ButtonsType.YES_NO",
+ "$ xns" : "Gtk",
+ "flags" : "Gtk.DialogFlags.MODAL",
+ "$ use_markup" : true,
+ "name" : "DialogConfirm"
+ }
+ ]
+}
\ No newline at end of file
--- /dev/null
+static DialogConfirm _DialogConfirm;
+
+public class DialogConfirm : Object
+{
+ public Gtk.MessageDialog el;
+ private DialogConfirm _this;
+
+ public static DialogConfirm singleton()
+ {
+ if (_DialogConfirm == null) {
+ _DialogConfirm= new DialogConfirm();
+ }
+ return _DialogConfirm;
+ }
+
+ // my vars (def)
+
+ // ctor
+ public DialogConfirm()
+ {
+ _this = this;
+ this.el = new Gtk.MessageDialog( null, Gtk.DialogFlags.MODAL, Gtk.MessageType.QUESTION, Gtk.ButtonsType.YES_NO, "Tests", null );
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.title = "Please Confirm d";
+ this.el.name = "DialogConfirm";
+ this.el.modal = true;
+ this.el.use_markup = true;
+
+ // listeners
+ this.el.delete_event.connect( (event) => {
+ this.el.response(Gtk.ResponseType.CANCEL);
+ this.el.hide();
+ return true;
+
+ });
+ }
+
+ // user defined functions
+ public int show (string title, string msg) {
+ //if (!this.el) { this.init(); }
+ //this.success = success;
+ this.el.title = title;
+ this.el.text = msg;
+ this.el.show_all();
+ var ret = this.el.run();
+ //print("ret got %d", ret);
+ this.el.hide();
+ return ret;
+
+
+ }
+}
--- /dev/null
+{
+ "name" : "DialogNewComponent",
+ "parent" : "",
+ "title" : "",
+ "path" : "/home/alan/gitlive/app.Builder.js/src/Builder4/DialogNewComponent.bjs",
+ "permname" : "",
+ "modOrder" : "",
+ "build_module" : "",
+ "items" : [
+ {
+ "listeners" : {
+ "delete_event" : "(self, event) => {\n this.el.hide();\n return true; \n //test \n}\n ",
+ "response" : " (self, response_id) => { \n \n\tif (response_id < 1) { // cancel!\n this.el.hide();\n return;\n }\n\n\n\n if (_this.name.el.get_text().length < 1) {\n StandardErrorDialog.show(\n this.el,\n \"You have to set Component name \"\n );\n \n return;\n }\n // what does this do?\n \n var isNew = _this.file.name.length > 0 ? false : true;\n /*\n if (!isNew && this.file.name != _this.name.el.get_text()) {\n Xcls_StandardErrorDialog.singleton().show(\n this.el,\n \"Sorry changing names does not work yet. \"\n );\n \n return;\n }\n */\n \n \n \n // FIXME - this may be more complicated...\n //for (var i in this.def) {\n // this.file[i] = this.get(i).el.get_text();\n //}\n\n if (!isNew) {\n try {\n this.updateFileFromEntry();\n } catch( JsRender.Error.RENAME_FILE_EXISTS er) {\n Xcls_StandardErrorDialog.singleton().show(\n this.el,\n \"The name you used already exists \"\n );\n return;\n \n }\n \n \n _this.file.save();\n this.el.hide();\n return;\n }\n var fn = this.name.el.get_text();\n var dir = _this.project.firstPath();\n \n if (GLib.FileUtils.test(dir + \"/\" + fn + \".bjs\", GLib.FileTest.EXISTS)) {\n Xcls_StandardErrorDialog.singleton().show(\n this.el,\n \"That file already exists\"\n ); \n return;\n }\n \n var f = JsRender.JsRender.factory(\n _this.file.project.xtype, \n _this.file.project, \n dir + \"/\" + fn + \".bjs\");\n\n _this.file = f;\n \n\n \n this.updateFileFromEntry();\n _this.file.save();\n _this.file.project.addFile(_this.file);\n \n\t \n // what about .js ?\n \n this.el.hide();\n \n \n //var tmpl = this.project.loadFileOnly(DialogNewComponent.get('template').getValue());\n \n //var nf = _this.project.create(dir + \"/\" + _this.file.name + \".bjs\");\n //for (var i in this.file) {\n // nf[i] = this.file[i];\n //}\n _this.success(_this.project, _this.file);\n /*\n\n -- fixme -- needs to be a signal..\n if (DialogNewComponent.success != null) {\n DialogNewComponent.success(_this.project, nf);\n }\n */\n}",
+ "show" : "(self) => {\n this.el.show_all();\n //test\n}"
+ },
+ "| void updateFileFromEntry" : "() {\n\n _this.file.title = _this.title.el.get_text();\n _this.file.region = _this.region.el.get_text(); \n _this.file.parent = _this.parent.el.get_text(); \n _this.file.permname = _this.permname.el.get_text(); \n _this.file.modOrder = _this.modOrder.el.get_text();\n \n if (_this.file.name.length > 0 && _this.file.name != _this.name.el.get_text()) {\n _this.file.renameTo(_this.name.el.get_text());\n }\n // store the module...\n _this.file.build_module = \"\"; \n Gtk.TreeIter iter; \n if (_this.build_module.el.get_active_iter (out iter)) {\n Value vfname;\n this.dbmodel.el.get_value (iter, 0, out vfname);\n if (((string)vfname).length > 0) {\n _this.file.build_module = (string)vfname;\n }\n \n }\n \n \n\n \n} ",
+ "id" : "DialogNewComponent",
+ "@ void success" : "(Project.Project pr, JsRender.JsRender file)",
+ "default_width" : 500,
+ "$ deletable" : true,
+ "# Project.Project project" : "",
+ "title" : "New Component",
+ "xtype" : "Dialog",
+ "| void show" : "(JsRender.JsRender c) \n{\n this.project = c.project;\n \n //if (!this.el) {\n //this.init();\n //}\n \n _this.name.el.set_text(c.name);\n _this.title.el.set_text(c.title);\n _this.parent.el.set_text(c.parent); \n _this.region.el.set_text(c.region);\n _this.modOrder.el.set_text(c.modOrder);\n _this.permname.el.set_text(c.permname);\n \n if (c.path.length > 0) {\n this.el.set_title(\"Edit File Details - \" + c.name);\n } else {\n this.el.set_title(\"Create New File\");\n }\n \n var ar = new Gee.ArrayList<string>();\n _this.dbmodel.loadData(ar,\"\");\n // load the modules... if relivant..\n if (this.project.xtype == \"Gtk\") {\n var p = (Project.Gtk)c.project;\n var cg = p.compilegroups;\n\n var iter = cg.map_iterator();\n while(iter.next()) {\n var key = iter.get_key();\n if (key == \"_default_\") {\n continue;\n }\n ar.add(key);\n };\n _this.dbmodel.loadData(ar, c.build_module);\n\n }\n \n \n _this.file = c;\n //console.log('show all');\n this.el.show_all();\n \n //this.success = c.success;\n \n \n}",
+ "# JsRender.JsRender file" : "null",
+ "default_height" : 200,
+ "$ modal" : true,
+ "$ xns" : "Gtk",
+ "items" : [
+ {
+ "xtype" : "VBox",
+ "$ pack" : "get_content_area().add",
+ "$ xns" : "Gtk",
+ "items" : [
+ {
+ "* pack" : "pack_start,false,false,0",
+ "xtype" : "Table",
+ "n_columns" : 2,
+ "$ xns" : "Gtk",
+ "n_rows" : 3,
+ "$ homogeneous" : true,
+ "items" : [
+ {
+ "label" : "Component Name",
+ "xalign" : 0.90000000000000002,
+ "* pack" : "attach_defaults,0,1,0,1",
+ "xtype" : "Label",
+ "$ justify" : "Gtk.Justification.RIGHT",
+ "x_options" : 4,
+ "$ xns" : "Gtk"
+ },
+ {
+ "id" : "name",
+ "$ visible" : true,
+ "xtype" : "Entry",
+ "* pack" : "attach_defaults,1,2,0,1",
+ "$ xns" : "Gtk"
+ },
+ {
+ "label" : "Title",
+ "$ visible" : true,
+ "xalign" : 0.90000000000000002,
+ "* pack" : "attach_defaults,0,1,1,2",
+ "xtype" : "Label",
+ "$ justify" : "Gtk.Justification.RIGHT",
+ "x_options" : 4,
+ "$ xns" : "Gtk"
+ },
+ {
+ "id" : "title",
+ "$ visible" : true,
+ "xtype" : "Entry",
+ "* pack" : "attach_defaults,1,2,1,2",
+ "$ xns" : "Gtk"
+ },
+ {
+ "label" : "Region",
+ "$ visible" : true,
+ "tooltip_text" : "center, north, south, east, west",
+ "xalign" : 0.90000000000000002,
+ "* pack" : "attach_defaults,0,1,2,3",
+ "xtype" : "Label",
+ "$ justify" : "Gtk.Justification.RIGHT",
+ "x_options" : 4,
+ "$ xns" : "Gtk"
+ },
+ {
+ "id" : "region",
+ "$ visible" : true,
+ "xtype" : "Entry",
+ "* pack" : "attach_defaults,1,2,2,3",
+ "$ xns" : "Gtk"
+ },
+ {
+ "label" : "Parent Name",
+ "$ visible" : true,
+ "xalign" : 0.90000000000000002,
+ "* pack" : "attach_defaults,0,1,3,4",
+ "xtype" : "Label",
+ "$ justify" : "Gtk.Justification.RIGHT",
+ "x_options" : 4,
+ "$ xns" : "Gtk"
+ },
+ {
+ "id" : "parent",
+ "$ visible" : true,
+ "xtype" : "Entry",
+ "* pack" : "attach_defaults,1,2,3,4",
+ "$ xns" : "Gtk"
+ },
+ {
+ "label" : "Permission Name",
+ "$ visible" : true,
+ "xalign" : 0.90000000000000002,
+ "* pack" : "attach_defaults,0,1,4,5",
+ "xtype" : "Label",
+ "$ justify" : "Gtk.Justification.RIGHT",
+ "x_options" : 4,
+ "$ xns" : "Gtk"
+ },
+ {
+ "id" : "permname",
+ "$ visible" : true,
+ "xtype" : "Entry",
+ "* pack" : "attach_defaults,1,2,4,5",
+ "$ xns" : "Gtk"
+ },
+ {
+ "label" : "Order (for tabs)",
+ "$ visible" : true,
+ "xalign" : 0.90000000000000002,
+ "* pack" : "attach_defaults,0,1,5,6",
+ "xtype" : "Label",
+ "$ justify" : "Gtk.Justification.RIGHT",
+ "x_options" : 4,
+ "$ xns" : "Gtk"
+ },
+ {
+ "id" : "modOrder",
+ "$ visible" : true,
+ "xtype" : "Entry",
+ "* pack" : "attach_defaults,1,2,5,6",
+ "$ xns" : "Gtk"
+ },
+ {
+ "label" : "Module to build (Vala only)",
+ "$ visible" : true,
+ "xalign" : 0.90000000000000002,
+ "* pack" : "attach_defaults,0,1,6,7",
+ "xtype" : "Label",
+ "$ justify" : "Gtk.Justification.RIGHT",
+ "x_options" : 4,
+ "$ xns" : "Gtk"
+ },
+ {
+ "id" : "build_module",
+ "* init" : "this.el.add_attribute(_this.dbcellrenderer.el , \"markup\", 1 );",
+ "* pack" : "attach_defaults,1,2,6,7",
+ "xtype" : "ComboBox",
+ "$ xns" : "Gtk",
+ "items" : [
+ {
+ "id" : "dbcellrenderer",
+ "xtype" : "CellRendererText",
+ "* pack" : "pack_start,true",
+ "$ xns" : "Gtk"
+ },
+ {
+ "id" : "dbmodel",
+ "xtype" : "ListStore",
+ "* pack" : "set_model",
+ "$ columns" : "typeof(string),typeof(string)",
+ "n_columns" : 2,
+ "$ xns" : "Gtk",
+ "| void loadData" : " (Gee.ArrayList<string> data, string cur) {\n this.el.clear(); \n Gtk.TreeIter iter;\n var el = this.el;\n \n /// el.append(out iter);\n \n \n // el.set_value(iter, 0, \"\");\n // el.set_value(iter, 1, \"aaa - Just add Element - aaa\");\n\n el.append(out iter);\n\n \n el.set_value(iter, 0, \"\");\n el.set_value(iter, 1, \"-- select a module --\");\n _this.build_module.el.set_active_iter(iter);\n \n for (var i = 0; i < data.size;i++) {\n \n\n el.append(out iter);\n \n el.set_value(iter, 0, data.get(i));\n el.set_value(iter, 1, data.get(i));\n \n if (data.get(i) == cur) {\n _this.build_module.el.set_active_iter(iter);\n }\n \n }\n this.el.set_sort_column_id(0, Gtk.SortType.ASCENDING); \n \n}\n"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "label" : "Cancel",
+ "xtype" : "Button",
+ "* pack" : "add_action_widget,0",
+ "$ xns" : "Gtk"
+ },
+ {
+ "label" : "OK",
+ "xtype" : "Button",
+ "* pack" : "add_action_widget,1",
+ "$ xns" : "Gtk"
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file
--- /dev/null
+static Xcls_DialogNewComponent _DialogNewComponent;
+
+public class Xcls_DialogNewComponent : Object
+{
+ public Gtk.Dialog el;
+ private Xcls_DialogNewComponent _this;
+
+ public static Xcls_DialogNewComponent singleton()
+ {
+ if (_DialogNewComponent == null) {
+ _DialogNewComponent= new Xcls_DialogNewComponent();
+ }
+ return _DialogNewComponent;
+ }
+ public Xcls_name name;
+ public Xcls_title title;
+ public Xcls_region region;
+ public Xcls_parent parent;
+ public Xcls_permname permname;
+ public Xcls_modOrder modOrder;
+ public Xcls_build_module build_module;
+ public Xcls_dbcellrenderer dbcellrenderer;
+ public Xcls_dbmodel dbmodel;
+
+ // my vars (def)
+ public signal void success (Project.Project pr, JsRender.JsRender file);
+ public Project.Project project;
+ public JsRender.JsRender file;
+
+ // ctor
+ public Xcls_DialogNewComponent()
+ {
+ _this = this;
+ this.el = new Gtk.Dialog();
+
+ // my vars (dec)
+ this.file = null;
+
+ // set gobject values
+ this.el.title = "New Component";
+ this.el.default_height = 200;
+ this.el.default_width = 500;
+ this.el.deletable = true;
+ this.el.modal = true;
+ var child_0 = new Xcls_VBox2( _this );
+ child_0.ref();
+ this.el.get_content_area().add ( child_0.el );
+ var child_1 = new Xcls_Button20( _this );
+ child_1.ref();
+ this.el.add_action_widget ( child_1.el , 0 );
+ var child_2 = new Xcls_Button21( _this );
+ child_2.ref();
+ this.el.add_action_widget ( child_2.el , 1 );
+
+ // listeners
+ this.el.delete_event.connect( (self, event) => {
+ this.el.hide();
+ return true;
+ //test
+ });
+ this.el.response.connect( (self, response_id) => {
+
+ if (response_id < 1) { // cancel!
+ this.el.hide();
+ return;
+ }
+
+
+
+ if (_this.name.el.get_text().length < 1) {
+ StandardErrorDialog.show(
+ this.el,
+ "You have to set Component name "
+ );
+
+ return;
+ }
+ // what does this do?
+
+ var isNew = _this.file.name.length > 0 ? false : true;
+ /*
+ if (!isNew && this.file.name != _this.name.el.get_text()) {
+ Xcls_StandardErrorDialog.singleton().show(
+ this.el,
+ "Sorry changing names does not work yet. "
+ );
+
+ return;
+ }
+ */
+
+
+
+ // FIXME - this may be more complicated...
+ //for (var i in this.def) {
+ // this.file[i] = this.get(i).el.get_text();
+ //}
+
+ if (!isNew) {
+ try {
+ this.updateFileFromEntry();
+ } catch( JsRender.Error.RENAME_FILE_EXISTS er) {
+ Xcls_StandardErrorDialog.singleton().show(
+ this.el,
+ "The name you used already exists "
+ );
+ return;
+
+ }
+
+
+ _this.file.save();
+ this.el.hide();
+ return;
+ }
+ var fn = this.name.el.get_text();
+ var dir = _this.project.firstPath();
+
+ if (GLib.FileUtils.test(dir + "/" + fn + ".bjs", GLib.FileTest.EXISTS)) {
+ Xcls_StandardErrorDialog.singleton().show(
+ this.el,
+ "That file already exists"
+ );
+ return;
+ }
+
+ var f = JsRender.JsRender.factory(
+ _this.file.project.xtype,
+ _this.file.project,
+ dir + "/" + fn + ".bjs");
+
+ _this.file = f;
+
+
+
+ this.updateFileFromEntry();
+ _this.file.save();
+ _this.file.project.addFile(_this.file);
+
+
+ // what about .js ?
+
+ this.el.hide();
+
+
+ //var tmpl = this.project.loadFileOnly(DialogNewComponent.get('template').getValue());
+
+ //var nf = _this.project.create(dir + "/" + _this.file.name + ".bjs");
+ //for (var i in this.file) {
+ // nf[i] = this.file[i];
+ //}
+ _this.success(_this.project, _this.file);
+ /*
+
+ -- fixme -- needs to be a signal..
+ if (DialogNewComponent.success != null) {
+ DialogNewComponent.success(_this.project, nf);
+ }
+ */
+ });
+ this.el.show.connect( (self) => {
+ this.el.show_all();
+ //test
+ });
+ }
+
+ // user defined functions
+ public void updateFileFromEntry () {
+
+ _this.file.title = _this.title.el.get_text();
+ _this.file.region = _this.region.el.get_text();
+ _this.file.parent = _this.parent.el.get_text();
+ _this.file.permname = _this.permname.el.get_text();
+ _this.file.modOrder = _this.modOrder.el.get_text();
+
+ if (_this.file.name.length > 0 && _this.file.name != _this.name.el.get_text()) {
+ _this.file.renameTo(_this.name.el.get_text());
+ }
+ // store the module...
+ _this.file.build_module = "";
+ Gtk.TreeIter iter;
+ if (_this.build_module.el.get_active_iter (out iter)) {
+ Value vfname;
+ this.dbmodel.el.get_value (iter, 0, out vfname);
+ if (((string)vfname).length > 0) {
+ _this.file.build_module = (string)vfname;
+ }
+
+ }
+
+
+
+
+ }
+ public void show (JsRender.JsRender c)
+ {
+ this.project = c.project;
+
+ //if (!this.el) {
+ //this.init();
+ //}
+
+ _this.name.el.set_text(c.name);
+ _this.title.el.set_text(c.title);
+ _this.parent.el.set_text(c.parent);
+ _this.region.el.set_text(c.region);
+ _this.modOrder.el.set_text(c.modOrder);
+ _this.permname.el.set_text(c.permname);
+
+ if (c.path.length > 0) {
+ this.el.set_title("Edit File Details - " + c.name);
+ } else {
+ this.el.set_title("Create New File");
+ }
+
+ var ar = new Gee.ArrayList<string>();
+ _this.dbmodel.loadData(ar,"");
+ // load the modules... if relivant..
+ if (this.project.xtype == "Gtk") {
+ var p = (Project.Gtk)c.project;
+ var cg = p.compilegroups;
+
+ var iter = cg.map_iterator();
+ while(iter.next()) {
+ var key = iter.get_key();
+ if (key == "_default_") {
+ continue;
+ }
+ ar.add(key);
+ };
+ _this.dbmodel.loadData(ar, c.build_module);
+
+ }
+
+
+ _this.file = c;
+ //console.log('show all');
+ this.el.show_all();
+
+ //this.success = c.success;
+
+
+ }
+ public class Xcls_VBox2 : Object
+ {
+ public Gtk.VBox el;
+ private Xcls_DialogNewComponent _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_VBox2(Xcls_DialogNewComponent _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.VBox( true, 0 );
+
+ // my vars (dec)
+
+ // set gobject values
+ var child_0 = new Xcls_Table3( _this );
+ child_0.ref();
+ this.el.pack_start ( child_0.el , false,false,0 );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Table3 : Object
+ {
+ public Gtk.Table el;
+ private Xcls_DialogNewComponent _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Table3(Xcls_DialogNewComponent _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Table( 3, 2, true );
+
+ // my vars (dec)
+
+ // set gobject values
+ var child_0 = new Xcls_Label4( _this );
+ child_0.ref();
+ this.el.attach_defaults ( child_0.el , 0,1,0,1 );
+ var child_1 = new Xcls_name( _this );
+ child_1.ref();
+ this.el.attach_defaults ( child_1.el , 1,2,0,1 );
+ var child_2 = new Xcls_Label6( _this );
+ child_2.ref();
+ this.el.attach_defaults ( child_2.el , 0,1,1,2 );
+ var child_3 = new Xcls_title( _this );
+ child_3.ref();
+ this.el.attach_defaults ( child_3.el , 1,2,1,2 );
+ var child_4 = new Xcls_Label8( _this );
+ child_4.ref();
+ this.el.attach_defaults ( child_4.el , 0,1,2,3 );
+ var child_5 = new Xcls_region( _this );
+ child_5.ref();
+ this.el.attach_defaults ( child_5.el , 1,2,2,3 );
+ var child_6 = new Xcls_Label10( _this );
+ child_6.ref();
+ this.el.attach_defaults ( child_6.el , 0,1,3,4 );
+ var child_7 = new Xcls_parent( _this );
+ child_7.ref();
+ this.el.attach_defaults ( child_7.el , 1,2,3,4 );
+ var child_8 = new Xcls_Label12( _this );
+ child_8.ref();
+ this.el.attach_defaults ( child_8.el , 0,1,4,5 );
+ var child_9 = new Xcls_permname( _this );
+ child_9.ref();
+ this.el.attach_defaults ( child_9.el , 1,2,4,5 );
+ var child_10 = new Xcls_Label14( _this );
+ child_10.ref();
+ this.el.attach_defaults ( child_10.el , 0,1,5,6 );
+ var child_11 = new Xcls_modOrder( _this );
+ child_11.ref();
+ this.el.attach_defaults ( child_11.el , 1,2,5,6 );
+ var child_12 = new Xcls_Label16( _this );
+ child_12.ref();
+ this.el.attach_defaults ( child_12.el , 0,1,6,7 );
+ var child_13 = new Xcls_build_module( _this );
+ child_13.ref();
+ this.el.attach_defaults ( child_13.el , 1,2,6,7 );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Label4 : Object
+ {
+ public Gtk.Label el;
+ private Xcls_DialogNewComponent _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Label4(Xcls_DialogNewComponent _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Label( "Component Name" );
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.justify = Gtk.Justification.RIGHT;
+ this.el.xalign = 0.900000f;
+ }
+
+ // user defined functions
+ }
+ public class Xcls_name : Object
+ {
+ public Gtk.Entry el;
+ private Xcls_DialogNewComponent _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_name(Xcls_DialogNewComponent _owner )
+ {
+ _this = _owner;
+ _this.name = this;
+ this.el = new Gtk.Entry();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.visible = true;
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Label6 : Object
+ {
+ public Gtk.Label el;
+ private Xcls_DialogNewComponent _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Label6(Xcls_DialogNewComponent _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Label( "Title" );
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.justify = Gtk.Justification.RIGHT;
+ this.el.xalign = 0.900000f;
+ this.el.visible = true;
+ }
+
+ // user defined functions
+ }
+ public class Xcls_title : Object
+ {
+ public Gtk.Entry el;
+ private Xcls_DialogNewComponent _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_title(Xcls_DialogNewComponent _owner )
+ {
+ _this = _owner;
+ _this.title = this;
+ this.el = new Gtk.Entry();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.visible = true;
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Label8 : Object
+ {
+ public Gtk.Label el;
+ private Xcls_DialogNewComponent _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Label8(Xcls_DialogNewComponent _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Label( "Region" );
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.justify = Gtk.Justification.RIGHT;
+ this.el.xalign = 0.900000f;
+ this.el.tooltip_text = "center, north, south, east, west";
+ this.el.visible = true;
+ }
+
+ // user defined functions
+ }
+ public class Xcls_region : Object
+ {
+ public Gtk.Entry el;
+ private Xcls_DialogNewComponent _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_region(Xcls_DialogNewComponent _owner )
+ {
+ _this = _owner;
+ _this.region = this;
+ this.el = new Gtk.Entry();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.visible = true;
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Label10 : Object
+ {
+ public Gtk.Label el;
+ private Xcls_DialogNewComponent _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Label10(Xcls_DialogNewComponent _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Label( "Parent Name" );
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.justify = Gtk.Justification.RIGHT;
+ this.el.xalign = 0.900000f;
+ this.el.visible = true;
+ }
+
+ // user defined functions
+ }
+ public class Xcls_parent : Object
+ {
+ public Gtk.Entry el;
+ private Xcls_DialogNewComponent _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_parent(Xcls_DialogNewComponent _owner )
+ {
+ _this = _owner;
+ _this.parent = this;
+ this.el = new Gtk.Entry();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.visible = true;
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Label12 : Object
+ {
+ public Gtk.Label el;
+ private Xcls_DialogNewComponent _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Label12(Xcls_DialogNewComponent _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Label( "Permission Name" );
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.justify = Gtk.Justification.RIGHT;
+ this.el.xalign = 0.900000f;
+ this.el.visible = true;
+ }
+
+ // user defined functions
+ }
+ public class Xcls_permname : Object
+ {
+ public Gtk.Entry el;
+ private Xcls_DialogNewComponent _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_permname(Xcls_DialogNewComponent _owner )
+ {
+ _this = _owner;
+ _this.permname = this;
+ this.el = new Gtk.Entry();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.visible = true;
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Label14 : Object
+ {
+ public Gtk.Label el;
+ private Xcls_DialogNewComponent _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Label14(Xcls_DialogNewComponent _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Label( "Order (for tabs)" );
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.justify = Gtk.Justification.RIGHT;
+ this.el.xalign = 0.900000f;
+ this.el.visible = true;
+ }
+
+ // user defined functions
+ }
+ public class Xcls_modOrder : Object
+ {
+ public Gtk.Entry el;
+ private Xcls_DialogNewComponent _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_modOrder(Xcls_DialogNewComponent _owner )
+ {
+ _this = _owner;
+ _this.modOrder = this;
+ this.el = new Gtk.Entry();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.visible = true;
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Label16 : Object
+ {
+ public Gtk.Label el;
+ private Xcls_DialogNewComponent _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Label16(Xcls_DialogNewComponent _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Label( "Module to build (Vala only)" );
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.justify = Gtk.Justification.RIGHT;
+ this.el.xalign = 0.900000f;
+ this.el.visible = true;
+ }
+
+ // user defined functions
+ }
+ public class Xcls_build_module : Object
+ {
+ public Gtk.ComboBox el;
+ private Xcls_DialogNewComponent _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_build_module(Xcls_DialogNewComponent _owner )
+ {
+ _this = _owner;
+ _this.build_module = this;
+ this.el = new Gtk.ComboBox();
+
+ // my vars (dec)
+
+ // set gobject values
+ var child_0 = new Xcls_dbcellrenderer( _this );
+ child_0.ref();
+ this.el.pack_start ( child_0.el , true );
+ var child_1 = new Xcls_dbmodel( _this );
+ child_1.ref();
+ this.el.set_model ( child_1.el );
+
+ // init method
+
+ this.el.add_attribute(_this.dbcellrenderer.el , "markup", 1 );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_dbcellrenderer : Object
+ {
+ public Gtk.CellRendererText el;
+ private Xcls_DialogNewComponent _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_dbcellrenderer(Xcls_DialogNewComponent _owner )
+ {
+ _this = _owner;
+ _this.dbcellrenderer = this;
+ this.el = new Gtk.CellRendererText();
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ }
+ public class Xcls_dbmodel : Object
+ {
+ public Gtk.ListStore el;
+ private Xcls_DialogNewComponent _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_dbmodel(Xcls_DialogNewComponent _owner )
+ {
+ _this = _owner;
+ _this.dbmodel = this;
+ this.el = new Gtk.ListStore( 2, typeof(string),typeof(string) );
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ public void loadData (Gee.ArrayList<string> data, string cur) {
+ this.el.clear();
+ Gtk.TreeIter iter;
+ var el = this.el;
+
+ /// el.append(out iter);
+
+
+ // el.set_value(iter, 0, "");
+ // el.set_value(iter, 1, "aaa - Just add Element - aaa");
+
+ el.append(out iter);
+
+
+ el.set_value(iter, 0, "");
+ el.set_value(iter, 1, "-- select a module --");
+ _this.build_module.el.set_active_iter(iter);
+
+ for (var i = 0; i < data.size;i++) {
+
+
+ el.append(out iter);
+
+ el.set_value(iter, 0, data.get(i));
+ el.set_value(iter, 1, data.get(i));
+
+ if (data.get(i) == cur) {
+ _this.build_module.el.set_active_iter(iter);
+ }
+
+ }
+ this.el.set_sort_column_id(0, Gtk.SortType.ASCENDING);
+
+ }
+ }
+ public class Xcls_Button20 : Object
+ {
+ public Gtk.Button el;
+ private Xcls_DialogNewComponent _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Button20(Xcls_DialogNewComponent _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Button();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.label = "Cancel";
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Button21 : Object
+ {
+ public Gtk.Button el;
+ private Xcls_DialogNewComponent _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Button21(Xcls_DialogNewComponent _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Button();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.label = "OK";
+ }
+
+ // user defined functions
+ }
+}
--- /dev/null
+{
+ "name" : "DialogPluginWebkit",
+ "parent" : "",
+ "title" : "",
+ "path" : "/home/alan/gitlive/app.Builder.js/src/Builder4/DialogPluginWebkit.bjs",
+ "permname" : "",
+ "modOrder" : "",
+ "build_module" : "builder",
+ "items" : [
+ {
+ "listeners" : {
+ "delete_event" : "(self, event) => {\n this.el.hide();\n return true; \n //test \n} \n "
+ },
+ "string tmpjs" : "",
+ "id" : "DialogPluginWebkit",
+ "utf8 title" : "Add / Edit Component",
+ "gint default_height" : 500,
+ "gboolean deletable" : true,
+ "xtype" : "Dialog",
+ "| string show" : " (Gtk.Window ?parent, Project.Project project, string cls, string tbl) {// JsRender.Node node) {\n \n if (parent != null) {\n this.el.set_transient_for(parent);\n this.el.modal = true;\n }\n this.result_json = \"\";\n var db = project.roo_database;\n \n \n this.el.show_all();\n var ret = \"\";\n while (true) {\n \n var runhtml = \"<script type=\\\"text/javascript\\\">\\n\" ;\n string builderhtml;\n \n try {\n GLib.FileUtils.get_contents(BuilderApplication.configDirectory() + \"/resources/roo.builder.js\", out builderhtml);\n } catch (Error e) {\n builderhtml = \"\";\n }\n \n\n runhtml += builderhtml + \"\\n\";\n \n \n runhtml += \"\\n\" +\n \"Builder.saveHTML = function() {};\\n\" + \n\t \"Roo.onReady(function() {\\n\" +\n\n\t \"Roo.XComponent.build();\\n\" +\n\t \"});\\n\";\n\t\n\t\n \n\n var ar = db.readForeignKeys(tbl);\n var generator = new Json.Generator ();\n var root = new Json.Node(Json.NodeType.OBJECT);\n root.init_object(ar);\n generator.set_root (root);\n \n generator.pretty = true;\n generator.indent = 4;\n \n runhtml += \"\\n\" +\n \" Roo.XComponent.on('buildcomplete', function() {\\n\" +\n \" Editor.\" + cls + \".panel.loadData(\" + generator.to_data (null) + \"); \" +\n \"});\\n\";\n\n \n\t\n\t\n\n runhtml += \"</script>\\n\" ;\n\n print(runhtml);\n // fix to make sure they are the same..\n \n // need to modify paths\n\n string inhtml;\n try {\n GLib.FileUtils.get_contents(\n BuilderApplication.configDirectory() + \"/resources/roo.builder.html\"\n , out inhtml);\n \n } catch (Error e) {\n inhtml = \"\";\n }\n // fetch the json from the database...\n \n //print(runhtml);\n \n var html = inhtml.replace(\"</head>\", runhtml + // + this.runhtml + \n \"<script type=\\\"text/javascript\\\" src=\\\"resources://localhost/Editors/Editor.\" + cls + \".js\\\"></script>\" + \n \n \n \"</head>\");\n //print(\"LOAD HTML \" + html);\n \n //var rootURL = _this.file.project.rootURL;\n \n \n \n this.webview.el.load_html( html , \n //fixme - should be a config option!\n \"xhttp://localhost/app.Builder.js/\"\n );\n \n \n \n \n var response_id = this.el.run();\n \n if (response_id == 1) { // OK...\n var loop = new MainLoop();\n // run toBJS to get the data... (calls back into alert handler)\n _this.result_json = \"\";\n this.webview.el.run_javascript.begin(\"Editor.\" + cls + \".panel.toBJS();\", null, (obj, res) => {\n try {\n this.webview.el.run_javascript.end(res);\n } catch(Error e) {\n \n }\n loop.quit();\n });\n loop.run();\n ret = _this.result_json;\n \n \n // print(\"LOOP END?\");\n // try and get the resopse...\n break;\n }\n if (response_id < 1) {\n this.el.hide();\n return \"\";\n }\n // keep showing...?\n continue;\n }\n \n // now we save it..\n this.el.hide();\n \n return ret;\n \n \n \n}\n",
+ "| bool has_plugin" : "(string cls) {\n\n return GLib.FileUtils.test(\n BuilderApplication.configDirectory() + \"/resources/Editors/Editor.\" + cls + \".js\",\n GLib.FileTest.IS_REGULAR\n );\n \n\n\n}\n",
+ "$ xns" : "Gtk",
+ "gint default_width" : 750,
+ "gboolean modal" : true,
+ "string result_json" : "",
+ "items" : [
+ {
+ "xtype" : "Box",
+ "$ pack" : "get_content_area().add",
+ "gboolean homogeneous" : false,
+ "$ xns" : "Gtk",
+ "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
+ "items" : [
+ {
+ "* init" : " this.el.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);\n \n",
+ "* pack" : "pack_start,false,true,3",
+ "xtype" : "ScrolledWindow",
+ "gboolean expand" : true,
+ "$ xns" : "Gtk",
+ "items" : [
+ {
+ "listeners" : {
+ "script_dialog" : " (dialog) => {\n if (this.el == null) {\n return true;\n }\n \n var msg = dialog.get_message();\n if (msg.length < 4) {\n return false;\n }\n if (msg.substring(0,4) != \"IPC:\") {\n return false;\n }\n var ar = msg.split(\":\", 3);\n if (ar.length < 3) {\n return false;\n }\n print(\"CMD: %s\\n\",ar[1]);\n print(\"ARGS: %s\\n\",ar[2]);\n switch(ar[1]) {\n \n case \"SAVEHTML\":\n // print(\"%sw\",ar[2]);\n // _this.file.saveHTML(ar[2]);\n return true;\n \n case \"OUT\":\n _this.result_json = ar[2];\n return true;\n \n default:\n return true;\n }\n \n}"
+ },
+ "id" : "webview",
+ "* init" : " {\n // this may not work!?\n var settings = this.el.get_settings();\n settings.enable_write_console_messages_to_stdout = true;\n \n var fs= new FakeServer(this.el);\n fs.ref();\n // this was an attempt to change the url perms.. did not work..\n // settings.enable_file_access_from_file_uris = true;\n // settings.enable_offline_web_application_cache - true;\n // settings.enable_universal_access_from_file_uris = true;\n \n \n \n \n \n\n // FIXME - base url of script..\n // we need it so some of the database features work.\n this.el.load_html( \"Render not ready\" , \n //fixme - should be a config option!\n // or should we catch stuff and fix it up..\n \"xhttp://localhost/app.Builder/\"\n );\n \n \n \n \n}\n",
+ "xtype" : "WebView",
+ "* pack" : "add",
+ "$ xns" : "WebKit"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "label" : "Reload",
+ "xtype" : "Button",
+ "* pack" : "add_action_widget,3",
+ "$ xns" : "Gtk"
+ },
+ {
+ "label" : "Cancel",
+ "* pack" : "add_action_widget,0",
+ "xtype" : "Button",
+ "$ xns" : "Gtk"
+ },
+ {
+ "label" : "OK",
+ "xtype" : "Button",
+ "* pack" : "add_action_widget,1",
+ "$ xns" : "Gtk"
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file
--- /dev/null
+static Xcls_DialogPluginWebkit _DialogPluginWebkit;
+
+public class Xcls_DialogPluginWebkit : Object
+{
+ public Gtk.Dialog el;
+ private Xcls_DialogPluginWebkit _this;
+
+ public static Xcls_DialogPluginWebkit singleton()
+ {
+ if (_DialogPluginWebkit == null) {
+ _DialogPluginWebkit= new Xcls_DialogPluginWebkit();
+ }
+ return _DialogPluginWebkit;
+ }
+ public Xcls_webview webview;
+
+ // my vars (def)
+ public string tmpjs;
+ public string result_json;
+
+ // ctor
+ public Xcls_DialogPluginWebkit()
+ {
+ _this = this;
+ this.el = new Gtk.Dialog();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.title = "Add / Edit Component";
+ this.el.default_height = 500;
+ this.el.default_width = 750;
+ this.el.deletable = true;
+ this.el.modal = true;
+ var child_0 = new Xcls_Box2( _this );
+ child_0.ref();
+ this.el.get_content_area().add ( child_0.el );
+ var child_1 = new Xcls_Button5( _this );
+ child_1.ref();
+ this.el.add_action_widget ( child_1.el , 3 );
+ var child_2 = new Xcls_Button6( _this );
+ child_2.ref();
+ this.el.add_action_widget ( child_2.el , 0 );
+ var child_3 = new Xcls_Button7( _this );
+ child_3.ref();
+ this.el.add_action_widget ( child_3.el , 1 );
+
+ //listeners
+ this.el.delete_event.connect( (self, event) => {
+ this.el.hide();
+ return true;
+ //test
+ });
+ }
+
+ // user defined functions
+ public string show (Gtk.Window ?parent, Project.Project project, string cls, string tbl) {// JsRender.Node node) {
+
+ if (parent != null) {
+ this.el.set_transient_for(parent);
+ this.el.modal = true;
+ }
+ this.result_json = "";
+ var db = project.roo_database;
+
+
+ this.el.show_all();
+ var ret = "";
+ while (true) {
+
+ var runhtml = "<script type=\"text/javascript\">\n" ;
+ string builderhtml;
+
+ try {
+ GLib.FileUtils.get_contents(BuilderApplication.configDirectory() + "/resources/roo.builder.js", out builderhtml);
+ } catch (Error e) {
+ builderhtml = "";
+ }
+
+
+ runhtml += builderhtml + "\n";
+
+
+ runhtml += "\n" +
+ "Builder.saveHTML = function() {};\n" +
+ "Roo.onReady(function() {\n" +
+
+ "Roo.XComponent.build();\n" +
+ "});\n";
+
+
+
+
+ var ar = db.readForeignKeys(tbl);
+ var generator = new Json.Generator ();
+ var root = new Json.Node(Json.NodeType.OBJECT);
+ root.init_object(ar);
+ generator.set_root (root);
+
+ generator.pretty = true;
+ generator.indent = 4;
+
+ runhtml += "\n" +
+ " Roo.XComponent.on('buildcomplete', function() {\n" +
+ " Editor." + cls + ".panel.loadData(" + generator.to_data (null) + "); " +
+ "});\n";
+
+
+
+
+
+ runhtml += "</script>\n" ;
+
+ print(runhtml);
+ // fix to make sure they are the same..
+
+ // need to modify paths
+
+ string inhtml;
+ try {
+ GLib.FileUtils.get_contents(
+ BuilderApplication.configDirectory() + "/resources/roo.builder.html"
+ , out inhtml);
+
+ } catch (Error e) {
+ inhtml = "";
+ }
+ // fetch the json from the database...
+
+ //print(runhtml);
+
+ var html = inhtml.replace("</head>", runhtml + // + this.runhtml +
+ "<script type=\"text/javascript\" src=\"resources://localhost/Editors/Editor." + cls + ".js\"></script>" +
+
+
+ "</head>");
+ //print("LOAD HTML " + html);
+
+ //var rootURL = _this.file.project.rootURL;
+
+
+
+ this.webview.el.load_html( html ,
+ //fixme - should be a config option!
+ "xhttp://localhost/app.Builder.js/"
+ );
+
+
+
+
+ var response_id = this.el.run();
+
+ if (response_id == 1) { // OK...
+ var loop = new MainLoop();
+ // run toBJS to get the data... (calls back into alert handler)
+ _this.result_json = "";
+ this.webview.el.run_javascript.begin("Editor." + cls + ".panel.toBJS();", null, (obj, res) => {
+ try {
+ this.webview.el.run_javascript.end(res);
+ } catch(Error e) {
+
+ }
+ loop.quit();
+ });
+ loop.run();
+ ret = _this.result_json;
+
+
+ // print("LOOP END?");
+ // try and get the resopse...
+ break;
+ }
+ if (response_id < 1) {
+ this.el.hide();
+ return "";
+ }
+ // keep showing...?
+ continue;
+ }
+
+ // now we save it..
+ this.el.hide();
+
+ return ret;
+
+
+
+ }
+ public bool has_plugin (string cls) {
+
+ return GLib.FileUtils.test(
+ BuilderApplication.configDirectory() + "/resources/Editors/Editor." + cls + ".js",
+ GLib.FileTest.IS_REGULAR
+ );
+
+
+
+ }
+ public class Xcls_Box2 : Object
+ {
+ public Gtk.Box el;
+ private Xcls_DialogPluginWebkit _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Box2(Xcls_DialogPluginWebkit _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.homogeneous = false;
+ var child_0 = new Xcls_ScrolledWindow3( _this );
+ child_0.ref();
+ this.el.pack_start ( child_0.el , false,true,3 );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_ScrolledWindow3 : Object
+ {
+ public Gtk.ScrolledWindow el;
+ private Xcls_DialogPluginWebkit _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_ScrolledWindow3(Xcls_DialogPluginWebkit _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.ScrolledWindow( null, null );
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.expand = true;
+ var child_0 = new Xcls_webview( _this );
+ child_0.ref();
+ this.el.add ( child_0.el );
+
+ // init method
+
+ this.el.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);
+ }
+
+ // user defined functions
+ }
+ public class Xcls_webview : Object
+ {
+ public WebKit.WebView el;
+ private Xcls_DialogPluginWebkit _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_webview(Xcls_DialogPluginWebkit _owner )
+ {
+ _this = _owner;
+ _this.webview = this;
+ this.el = new WebKit.WebView();
+
+ // my vars (dec)
+
+ // set gobject values
+
+ // init method
+
+ {
+ // this may not work!?
+ var settings = this.el.get_settings();
+ settings.enable_write_console_messages_to_stdout = true;
+
+ var fs= new FakeServer(this.el);
+ fs.ref();
+ // this was an attempt to change the url perms.. did not work..
+ // settings.enable_file_access_from_file_uris = true;
+ // settings.enable_offline_web_application_cache - true;
+ // settings.enable_universal_access_from_file_uris = true;
+
+
+
+
+
+
+ // FIXME - base url of script..
+ // we need it so some of the database features work.
+ this.el.load_html( "Render not ready" ,
+ //fixme - should be a config option!
+ // or should we catch stuff and fix it up..
+ "xhttp://localhost/app.Builder/"
+ );
+
+
+
+
+ }
+
+ //listeners
+ this.el.script_dialog.connect( (dialog) => {
+ if (this.el == null) {
+ return true;
+ }
+
+ var msg = dialog.get_message();
+ if (msg.length < 4) {
+ return false;
+ }
+ if (msg.substring(0,4) != "IPC:") {
+ return false;
+ }
+ var ar = msg.split(":", 3);
+ if (ar.length < 3) {
+ return false;
+ }
+ print("CMD: %s\n",ar[1]);
+ print("ARGS: %s\n",ar[2]);
+ switch(ar[1]) {
+
+ case "SAVEHTML":
+ // print("%sw",ar[2]);
+ // _this.file.saveHTML(ar[2]);
+ return true;
+
+ case "OUT":
+ _this.result_json = ar[2];
+ return true;
+
+ default:
+ return true;
+ }
+
+ });
+ }
+
+ // user defined functions
+ }
+
+
+
+ public class Xcls_Button5 : Object
+ {
+ public Gtk.Button el;
+ private Xcls_DialogPluginWebkit _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Button5(Xcls_DialogPluginWebkit _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Button();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.label = "Reload";
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_Button6 : Object
+ {
+ public Gtk.Button el;
+ private Xcls_DialogPluginWebkit _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Button6(Xcls_DialogPluginWebkit _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Button();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.label = "Cancel";
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_Button7 : Object
+ {
+ public Gtk.Button el;
+ private Xcls_DialogPluginWebkit _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Button7(Xcls_DialogPluginWebkit _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Button();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.label = "OK";
+ }
+
+ // user defined functions
+ }
+
+}
--- /dev/null
+{
+ "name" : "DialogSaveModule",
+ "parent" : "",
+ "title" : "",
+ "path" : "/home/alan/gitlive/app.Builder.js/src/Builder4/DialogSaveModule.bjs",
+ "permname" : "",
+ "modOrder" : "",
+ "build_module" : "builder",
+ "items" : [
+ {
+ "listeners" : {
+ "delete_event" : " (self, event) => {\n this.el.response(Gtk.ResponseType.CANCEL);\n return true;\n} "
+ },
+ "default_width" : 400,
+ "# Project.Project project" : "",
+ "xtype" : "Dialog",
+ "default_height" : 200,
+ "$ modal" : true,
+ "# JsRender.Node data" : "",
+ "| string show" : " (Gtk.Window parent, Project.Project project, JsRender.Node data) {\n \n \n this.el.set_transient_for(parent);\n this.el.modal = true;\n \n this.data = data;\n this.project = project;\n this.name.el.set_text(\"\");\n this.el.show_all();\n var name = \"\";\n while (true) {\n var response_id = this.el.run();\n if (response_id < 1) {\n this.el.hide();\n return \"\";\n }\n \n name = _this.name.el.get_text();\n if (name.length < 1) {\n StandardErrorDialog.singleton().show(\n _this.el,\n \"You must give the template a name. \"\n );\n continue;\n }\n if (!Regex.match_simple (\"^[A-Za-z][A-Za-z0-9.]+$\", name) )\n {\n StandardErrorDialog.singleton().show(\n _this.el,\n \"Template Name must contain only letters dots\"\n );\n continue;\n }\n break;\n }\n var f = project.newFile(name);\n f.tree = _this.data.deepClone();\n f.save();\n \n // now we save it..\n this.el.hide();\n \n return name;\n \n \n \n}\n",
+ "$ xns" : "Gtk",
+ "items" : [
+ {
+ "xtype" : "Box",
+ "$ pack" : " get_content_area().add\n\n",
+ "$ xns" : "Gtk",
+ "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
+ "items" : [
+ {
+ "label" : "Name",
+ "xtype" : "Label",
+ "* pack" : "add",
+ "$ xns" : "Gtk"
+ },
+ {
+ "id" : "name",
+ "xtype" : "Entry",
+ "* pack" : "add",
+ "$ xns" : "Gtk"
+ }
+ ]
+ },
+ {
+ "label" : "Cancel",
+ "xtype" : "Button",
+ "* pack" : "add_action_widget,0",
+ "$ xns" : "Gtk"
+ },
+ {
+ "label" : "OK",
+ "xtype" : "Button",
+ "* pack" : "add_action_widget,1",
+ "$ xns" : "Gtk"
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file
--- /dev/null
+static DialogSaveModule _DialogSaveModule;
+
+public class DialogSaveModule : Object
+{
+ public Gtk.Dialog el;
+ private DialogSaveModule _this;
+
+ public static DialogSaveModule singleton()
+ {
+ if (_DialogSaveModule == null) {
+ _DialogSaveModule= new DialogSaveModule();
+ }
+ return _DialogSaveModule;
+ }
+ public Xcls_name name;
+
+ // my vars (def)
+ public Project.Project project;
+ public JsRender.Node data;
+
+ // ctor
+ public DialogSaveModule()
+ {
+ _this = this;
+ this.el = new Gtk.Dialog();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.default_height = 200;
+ this.el.default_width = 400;
+ this.el.modal = true;
+ var child_0 = new Xcls_Box2( _this );
+ child_0.ref();
+ this.el.get_content_area().add ( child_0.el );
+ var child_1 = new Xcls_Button5( _this );
+ child_1.ref();
+ this.el.add_action_widget ( child_1.el , 0 );
+ var child_2 = new Xcls_Button6( _this );
+ child_2.ref();
+ this.el.add_action_widget ( child_2.el , 1 );
+
+ //listeners
+ this.el.delete_event.connect( (self, event) => {
+ this.el.response(Gtk.ResponseType.CANCEL);
+ return true;
+ });
+ }
+
+ // user defined functions
+ public string show (Gtk.Window parent, Project.Project project, JsRender.Node data) {
+
+
+ this.el.set_transient_for(parent);
+ this.el.modal = true;
+
+ this.data = data;
+ this.project = project;
+ this.name.el.set_text("");
+ this.el.show_all();
+ var name = "";
+ while (true) {
+ var response_id = this.el.run();
+ if (response_id < 1) {
+ this.el.hide();
+ return "";
+ }
+
+ name = _this.name.el.get_text();
+ if (name.length < 1) {
+ StandardErrorDialog.singleton().show(
+ _this.el,
+ "You must give the template a name. "
+ );
+ continue;
+ }
+ if (!Regex.match_simple ("^[A-Za-z][A-Za-z0-9.]+$", name) )
+ {
+ StandardErrorDialog.singleton().show(
+ _this.el,
+ "Template Name must contain only letters dots"
+ );
+ continue;
+ }
+ break;
+ }
+ var f = project.newFile(name);
+ f.tree = _this.data.deepClone();
+ f.save();
+
+ // now we save it..
+ this.el.hide();
+
+ return name;
+
+
+
+ }
+ public class Xcls_Box2 : Object
+ {
+ public Gtk.Box el;
+ private DialogSaveModule _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Box2(DialogSaveModule _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
+
+ // my vars (dec)
+
+ // set gobject values
+ var child_0 = new Xcls_Label3( _this );
+ child_0.ref();
+ this.el.add ( child_0.el );
+ var child_1 = new Xcls_name( _this );
+ child_1.ref();
+ this.el.add ( child_1.el );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Label3 : Object
+ {
+ public Gtk.Label el;
+ private DialogSaveModule _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Label3(DialogSaveModule _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Label( "Name" );
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_name : Object
+ {
+ public Gtk.Entry el;
+ private DialogSaveModule _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_name(DialogSaveModule _owner )
+ {
+ _this = _owner;
+ _this.name = this;
+ this.el = new Gtk.Entry();
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ }
+
+
+ public class Xcls_Button5 : Object
+ {
+ public Gtk.Button el;
+ private DialogSaveModule _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Button5(DialogSaveModule _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Button();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.label = "Cancel";
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_Button6 : Object
+ {
+ public Gtk.Button el;
+ private DialogSaveModule _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Button6(DialogSaveModule _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Button();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.label = "OK";
+ }
+
+ // user defined functions
+ }
+
+}
--- /dev/null
+{
+ "name" : "DialogSaveTemplate",
+ "parent" : "",
+ "title" : "",
+ "path" : "/home/alan/gitlive/app.Builder.js/src/Builder4/DialogSaveTemplate.bjs",
+ "permname" : "",
+ "modOrder" : "",
+ "build_module" : "builder",
+ "items" : [
+ {
+ "listeners" : {
+ "delete_event" : " (self, event) => {\n this.el.response(Gtk.ResponseType.CANCEL);\n return true;\n \n}"
+ },
+ "default_width" : 400,
+ "| void show" : " (Gtk.Window parent, Palete.Palete palete, JsRender.Node data) {\n \n \n this.el.set_transient_for(parent);\n this.el.modal = true;\n \n this.name.el.set_text(\"\");\n this.el.show_all();\n var name = \"\";\n while (true) {\n var response_id = this.el.run();\n if (response_id < 1) {\n this.el.hide();\n return;\n }\n \n name = _this.name.el.get_text();\n if (name.length < 1) {\n StandardErrorDialog.singleton().show(\n _this.el,\n \"You must give the template a name. \"\n );\n continue;\n }\n if (!Regex.match_simple (\"^[A-Za-z][A-Za-z0-9. ]+$\", name) )\n {\n StandardErrorDialog.singleton().show(\n _this.el,\n \"Template Name must contain only letters dots\"\n );\n continue;\n }\n break;\n }\n palete.saveTemplate(name, data);\n \n // now we save it..\n this.el.hide();\n \n \n \n \n}\n",
+ "xtype" : "Dialog",
+ "default_height" : 200,
+ "# Palete.Palete palete" : "",
+ "$ modal" : true,
+ "# JsRender.Node data" : "",
+ "$ xns" : "Gtk",
+ "items" : [
+ {
+ "xtype" : "Box",
+ "$ pack" : " get_content_area().add\n\n",
+ "$ xns" : "Gtk",
+ "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
+ "items" : [
+ {
+ "label" : "Name",
+ "xtype" : "Label",
+ "* pack" : "add",
+ "$ xns" : "Gtk"
+ },
+ {
+ "id" : "name",
+ "xtype" : "Entry",
+ "* pack" : "add",
+ "$ xns" : "Gtk"
+ }
+ ]
+ },
+ {
+ "label" : "Cancel",
+ "xtype" : "Button",
+ "* pack" : "add_action_widget,0",
+ "$ xns" : "Gtk"
+ },
+ {
+ "label" : "OK",
+ "xtype" : "Button",
+ "* pack" : "add_action_widget,1",
+ "$ xns" : "Gtk"
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file
--- /dev/null
+static DialogSaveTemplate _DialogSaveTemplate;
+
+public class DialogSaveTemplate : Object
+{
+ public Gtk.Dialog el;
+ private DialogSaveTemplate _this;
+
+ public static DialogSaveTemplate singleton()
+ {
+ if (_DialogSaveTemplate == null) {
+ _DialogSaveTemplate= new DialogSaveTemplate();
+ }
+ return _DialogSaveTemplate;
+ }
+ public Xcls_name name;
+
+ // my vars (def)
+ public Palete.Palete palete;
+ public JsRender.Node data;
+
+ // ctor
+ public DialogSaveTemplate()
+ {
+ _this = this;
+ this.el = new Gtk.Dialog();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.default_height = 200;
+ this.el.default_width = 400;
+ this.el.modal = true;
+ var child_0 = new Xcls_Box2( _this );
+ child_0.ref();
+ this.el.get_content_area().add ( child_0.el );
+ var child_1 = new Xcls_Button5( _this );
+ child_1.ref();
+ this.el.add_action_widget ( child_1.el , 0 );
+ var child_2 = new Xcls_Button6( _this );
+ child_2.ref();
+ this.el.add_action_widget ( child_2.el , 1 );
+
+ //listeners
+ this.el.delete_event.connect( (self, event) => {
+ this.el.response(Gtk.ResponseType.CANCEL);
+ return true;
+
+ });
+ }
+
+ // user defined functions
+ public void show (Gtk.Window parent, Palete.Palete palete, JsRender.Node data) {
+
+
+ this.el.set_transient_for(parent);
+ this.el.modal = true;
+
+ this.name.el.set_text("");
+ this.el.show_all();
+ var name = "";
+ while (true) {
+ var response_id = this.el.run();
+ if (response_id < 1) {
+ this.el.hide();
+ return;
+ }
+
+ name = _this.name.el.get_text();
+ if (name.length < 1) {
+ StandardErrorDialog.singleton().show(
+ _this.el,
+ "You must give the template a name. "
+ );
+ continue;
+ }
+ if (!Regex.match_simple ("^[A-Za-z][A-Za-z0-9. ]+$", name) )
+ {
+ StandardErrorDialog.singleton().show(
+ _this.el,
+ "Template Name must contain only letters dots"
+ );
+ continue;
+ }
+ break;
+ }
+ palete.saveTemplate(name, data);
+
+ // now we save it..
+ this.el.hide();
+
+
+
+
+ }
+ public class Xcls_Box2 : Object
+ {
+ public Gtk.Box el;
+ private DialogSaveTemplate _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Box2(DialogSaveTemplate _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
+
+ // my vars (dec)
+
+ // set gobject values
+ var child_0 = new Xcls_Label3( _this );
+ child_0.ref();
+ this.el.add ( child_0.el );
+ var child_1 = new Xcls_name( _this );
+ child_1.ref();
+ this.el.add ( child_1.el );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Label3 : Object
+ {
+ public Gtk.Label el;
+ private DialogSaveTemplate _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Label3(DialogSaveTemplate _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Label( "Name" );
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_name : Object
+ {
+ public Gtk.Entry el;
+ private DialogSaveTemplate _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_name(DialogSaveTemplate _owner )
+ {
+ _this = _owner;
+ _this.name = this;
+ this.el = new Gtk.Entry();
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ }
+
+
+ public class Xcls_Button5 : Object
+ {
+ public Gtk.Button el;
+ private DialogSaveTemplate _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Button5(DialogSaveTemplate _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Button();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.label = "Cancel";
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_Button6 : Object
+ {
+ public Gtk.Button el;
+ private DialogSaveTemplate _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Button6(DialogSaveTemplate _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Button();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.label = "OK";
+ }
+
+ // user defined functions
+ }
+
+}
--- /dev/null
+{
+ "name" : "DialogTemplateSelect",
+ "parent" : "",
+ "title" : "",
+ "path" : "/home/alan/gitlive/app.Builder.js/src/Builder4/DialogTemplateSelect.bjs",
+ "permname" : "",
+ "modOrder" : "",
+ "build_module" : "builder",
+ "items" : [
+ {
+ "listeners" : {
+ "delete_event" : " (self, event) =>{\n this.el.hide();\n return true;\n} "
+ },
+ "default_width" : 400,
+ "title" : "Add an Object",
+ "xtype" : "Dialog",
+ "default_height" : 200,
+ "$ modal" : true,
+ "$ xns" : "Gtk",
+ "| JsRender.Node? show" : " (Xcls_MainWindow mwindow, Palete.Palete pal, JsRender.Node node, Project.Project project) {\n \n this.el.show_all();\n var opts = pal.listTemplates(node);\n if (opts.length() < 1) {\n this.el.hide();\n return node;\n }\n this.el.set_attached_to( mwindow.el);\n this.el.set_transient_for( mwindow.el);\n \n //opts.unshift({ path: '' , name :'Just add Element' });\n _this.model.loadData(opts);\n _this.combo.el.set_active(-1);\n \n \n var db = new Palete.RooDatabase.from_project(project);\n _this.dbmodel.loadData(db.readTablesGee());\n \n var plug = mwindow.windowstate.webkit_plugin;\n \n _this.dbcombo.el.set_active(-1);\n \n \n \n var res = this.el.run();\n this.el.hide(); \n //var ix = _this.combo.el.get_active();\n if (res < 1 ) {\n return null; // 0 = cancel.\n }\n if (res < 2 ) {\n return node; // 1 = just add it..\n }\n \n // have they selected a table??\n \n Gtk.TreeIter iter; \n Value vfname; \n if (_this.dbcombo.el.get_active_iter (out iter)) { \n this.dbmodel.el.get_value (iter, 0, out vfname);\n if (((string)vfname).length > 0 && plug.has_plugin(node.fqn())) {\n var json_str = plug.show(mwindow.el, project, node.fqn(), (string)vfname);\n print(\"json_str = %s\\n\", json_str);\n if (json_str.length < 1) {\n\n return node;\n }\n var pa = new Json.Parser();\n try {\n\n\t pa.load_from_data(json_str);\n\t } catch(Error e) {\n\t return node;\n\t }\n\t var new_node = pa.get_root();\n \n\t if (new_node.get_node_type () != Json.NodeType.OBJECT) {\n\t\t return node;\n\t }\n\t var obj = new_node.get_object ();\n\n\t var ret = new JsRender.Node();\n\n\t ret.loadFromJson(obj, 1);\n\t return ret;\n }\n \n }\n\n if (!_this.combo.el.get_active_iter (out iter)) {\n\n return node; // nothing selected...\n }\n \n this.model.el.get_value (iter, 0, out vfname);\n \n \n return pal.loadTemplate((string)vfname);\n\n}\n",
+ "items" : [
+ {
+ "xtype" : "Box",
+ "$ pack" : "get_content_area().add ",
+ "$ xns" : "Gtk",
+ "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
+ "items" : [
+ {
+ "* pack" : "pack_start,false,false,0",
+ "xtype" : "Box",
+ "gint margin" : 3,
+ "$ xns" : "Gtk",
+ "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
+ "items" : [
+ {
+ "label" : "Select Template : ",
+ "xtype" : "Label",
+ "* pack" : "pack_start,false,false",
+ "$ xns" : "Gtk"
+ },
+ {
+ "id" : "combo",
+ "* init" : "this.el.add_attribute(_this.cellrenderer.el , \"markup\", 1 );",
+ "xtype" : "ComboBox",
+ "* pack" : "add",
+ "$ xns" : "Gtk",
+ "items" : [
+ {
+ "id" : "cellrenderer",
+ "xtype" : "CellRendererText",
+ "* pack" : "pack_start,true",
+ "$ xns" : "Gtk"
+ },
+ {
+ "id" : "model",
+ "* pack" : "set_model",
+ "xtype" : "ListStore",
+ "$ columns" : "typeof(string),typeof(string)",
+ "n_columns" : 2,
+ "$ xns" : "Gtk",
+ "| void loadData" : " (GLib.List<string> data) {\n this.el.clear(); \n Gtk.TreeIter iter;\n var el = this.el;\n \n /// el.append(out iter);\n \n \n // el.set_value(iter, 0, \"\");\n // el.set_value(iter, 1, \"aaa - Just add Element - aaa\");\n \n for (var i = 0; i < data.length();i++) {\n \n\n el.append(out iter);\n var str = data.nth_data(i);\n var fn = Path.get_basename (str);\n fn.replace(\".json\", \"\");\n \n el.set_value(iter, 0, str);\n el.set_value(iter, 1, fn);\n \n }\n this.el.set_sort_column_id(1, Gtk.SortType.ASCENDING); \n \n}\n"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "* pack" : "pack_start,false,false,0",
+ "xtype" : "Box",
+ "gint margin" : 3,
+ "$ xns" : "Gtk",
+ "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
+ "items" : [
+ {
+ "label" : "Select Database Table : ",
+ "xtype" : "Label",
+ "* pack" : "pack_start,false,false",
+ "$ xns" : "Gtk"
+ },
+ {
+ "id" : "dbcombo",
+ "* init" : "this.el.add_attribute(_this.dbcellrenderer.el , \"markup\", 1 );",
+ "xtype" : "ComboBox",
+ "* pack" : "add",
+ "$ xns" : "Gtk",
+ "items" : [
+ {
+ "id" : "dbcellrenderer",
+ "xtype" : "CellRendererText",
+ "* pack" : "pack_start,true",
+ "$ xns" : "Gtk"
+ },
+ {
+ "id" : "dbmodel",
+ "* pack" : "set_model",
+ "xtype" : "ListStore",
+ "$ columns" : "typeof(string),typeof(string)",
+ "n_columns" : 2,
+ "$ xns" : "Gtk",
+ "| void loadData" : " (Gee.ArrayList<string> data) {\n this.el.clear(); \n Gtk.TreeIter iter;\n var el = this.el;\n \n /// el.append(out iter);\n \n \n // el.set_value(iter, 0, \"\");\n // el.set_value(iter, 1, \"aaa - Just add Element - aaa\");\n\n el.append(out iter);\n\n \n el.set_value(iter, 0, \"\");\n el.set_value(iter, 1, \"-- select a table --\");\n \n \n for (var i = 0; i < data.size;i++) {\n \n\n el.append(out iter);\n \n el.set_value(iter, 0, data.get(i));\n el.set_value(iter, 1, data.get(i));\n \n }\n this.el.set_sort_column_id(0, Gtk.SortType.ASCENDING); \n \n}\n"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "label" : "Cancel",
+ "xtype" : "Button",
+ "* pack" : "add_action_widget,0",
+ "$ xns" : "Gtk"
+ },
+ {
+ "label" : "Just add it",
+ "* pack" : "add_action_widget,1",
+ "xtype" : "Button",
+ "$ xns" : "Gtk"
+ },
+ {
+ "label" : "OK",
+ "xtype" : "Button",
+ "* pack" : "add_action_widget,2",
+ "$ xns" : "Gtk"
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file
--- /dev/null
+static DialogTemplateSelect _DialogTemplateSelect;
+
+public class DialogTemplateSelect : Object
+{
+ public Gtk.Dialog el;
+ private DialogTemplateSelect _this;
+
+ public static DialogTemplateSelect singleton()
+ {
+ if (_DialogTemplateSelect == null) {
+ _DialogTemplateSelect= new DialogTemplateSelect();
+ }
+ return _DialogTemplateSelect;
+ }
+ public Xcls_combo combo;
+ public Xcls_cellrenderer cellrenderer;
+ public Xcls_model model;
+ public Xcls_dbcombo dbcombo;
+ public Xcls_dbcellrenderer dbcellrenderer;
+ public Xcls_dbmodel dbmodel;
+
+ // my vars (def)
+
+ // ctor
+ public DialogTemplateSelect()
+ {
+ _this = this;
+ this.el = new Gtk.Dialog();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.title = "Add an Object";
+ this.el.default_height = 200;
+ this.el.default_width = 400;
+ this.el.modal = true;
+ var child_0 = new Xcls_Box2( _this );
+ child_0.ref();
+ this.el.get_content_area().add ( child_0.el );
+ var child_1 = new Xcls_Button13( _this );
+ child_1.ref();
+ this.el.add_action_widget ( child_1.el , 0 );
+ var child_2 = new Xcls_Button14( _this );
+ child_2.ref();
+ this.el.add_action_widget ( child_2.el , 1 );
+ var child_3 = new Xcls_Button15( _this );
+ child_3.ref();
+ this.el.add_action_widget ( child_3.el , 2 );
+
+ //listeners
+ this.el.delete_event.connect( (self, event) =>{
+ this.el.hide();
+ return true;
+ });
+ }
+
+ // user defined functions
+ public JsRender.Node? show (Xcls_MainWindow mwindow, Palete.Palete pal, JsRender.Node node, Project.Project project) {
+
+ this.el.show_all();
+ var opts = pal.listTemplates(node);
+ if (opts.length() < 1) {
+ this.el.hide();
+ return node;
+ }
+ this.el.set_attached_to( mwindow.el);
+ this.el.set_transient_for( mwindow.el);
+
+ //opts.unshift({ path: '' , name :'Just add Element' });
+ _this.model.loadData(opts);
+ _this.combo.el.set_active(-1);
+
+
+ var db = new Palete.RooDatabase.from_project(project);
+ _this.dbmodel.loadData(db.readTablesGee());
+
+ var plug = mwindow.windowstate.webkit_plugin;
+
+ _this.dbcombo.el.set_active(-1);
+
+
+
+ var res = this.el.run();
+ this.el.hide();
+ //var ix = _this.combo.el.get_active();
+ if (res < 1 ) {
+ return null; // 0 = cancel.
+ }
+ if (res < 2 ) {
+ return node; // 1 = just add it..
+ }
+
+ // have they selected a table??
+
+ Gtk.TreeIter iter;
+ Value vfname;
+ if (_this.dbcombo.el.get_active_iter (out iter)) {
+ this.dbmodel.el.get_value (iter, 0, out vfname);
+ if (((string)vfname).length > 0 && plug.has_plugin(node.fqn())) {
+ var json_str = plug.show(mwindow.el, project, node.fqn(), (string)vfname);
+ print("json_str = %s\n", json_str);
+ if (json_str.length < 1) {
+
+ return node;
+ }
+ var pa = new Json.Parser();
+ try {
+
+ pa.load_from_data(json_str);
+ } catch(Error e) {
+ return node;
+ }
+ var new_node = pa.get_root();
+
+ if (new_node.get_node_type () != Json.NodeType.OBJECT) {
+ return node;
+ }
+ var obj = new_node.get_object ();
+
+ var ret = new JsRender.Node();
+
+ ret.loadFromJson(obj, 1);
+ return ret;
+ }
+
+ }
+
+ if (!_this.combo.el.get_active_iter (out iter)) {
+
+ return node; // nothing selected...
+ }
+
+ this.model.el.get_value (iter, 0, out vfname);
+
+
+ return pal.loadTemplate((string)vfname);
+
+ }
+ public class Xcls_Box2 : Object
+ {
+ public Gtk.Box el;
+ private DialogTemplateSelect _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Box2(DialogTemplateSelect _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
+
+ // my vars (dec)
+
+ // set gobject values
+ var child_0 = new Xcls_Box3( _this );
+ child_0.ref();
+ this.el.pack_start ( child_0.el , false,false,0 );
+ var child_1 = new Xcls_Box8( _this );
+ child_1.ref();
+ this.el.pack_start ( child_1.el , false,false,0 );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Box3 : Object
+ {
+ public Gtk.Box el;
+ private DialogTemplateSelect _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Box3(DialogTemplateSelect _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.margin = 3;
+ var child_0 = new Xcls_Label4( _this );
+ child_0.ref();
+ this.el.pack_start ( child_0.el , false,false );
+ var child_1 = new Xcls_combo( _this );
+ child_1.ref();
+ this.el.add ( child_1.el );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Label4 : Object
+ {
+ public Gtk.Label el;
+ private DialogTemplateSelect _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Label4(DialogTemplateSelect _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Label( "Select Template : " );
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_combo : Object
+ {
+ public Gtk.ComboBox el;
+ private DialogTemplateSelect _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_combo(DialogTemplateSelect _owner )
+ {
+ _this = _owner;
+ _this.combo = this;
+ this.el = new Gtk.ComboBox();
+
+ // my vars (dec)
+
+ // set gobject values
+ var child_0 = new Xcls_cellrenderer( _this );
+ child_0.ref();
+ this.el.pack_start ( child_0.el , true );
+ var child_1 = new Xcls_model( _this );
+ child_1.ref();
+ this.el.set_model ( child_1.el );
+
+ // init method
+
+ this.el.add_attribute(_this.cellrenderer.el , "markup", 1 );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_cellrenderer : Object
+ {
+ public Gtk.CellRendererText el;
+ private DialogTemplateSelect _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_cellrenderer(DialogTemplateSelect _owner )
+ {
+ _this = _owner;
+ _this.cellrenderer = this;
+ this.el = new Gtk.CellRendererText();
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_model : Object
+ {
+ public Gtk.ListStore el;
+ private DialogTemplateSelect _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_model(DialogTemplateSelect _owner )
+ {
+ _this = _owner;
+ _this.model = this;
+ this.el = new Gtk.ListStore( 2, typeof(string),typeof(string) );
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ public void loadData (GLib.List<string> data) {
+ this.el.clear();
+ Gtk.TreeIter iter;
+ var el = this.el;
+
+ /// el.append(out iter);
+
+
+ // el.set_value(iter, 0, "");
+ // el.set_value(iter, 1, "aaa - Just add Element - aaa");
+
+ for (var i = 0; i < data.length();i++) {
+
+
+ el.append(out iter);
+ var str = data.nth_data(i);
+ var fn = Path.get_basename (str);
+ fn.replace(".json", "");
+
+ el.set_value(iter, 0, str);
+ el.set_value(iter, 1, fn);
+
+ }
+ this.el.set_sort_column_id(1, Gtk.SortType.ASCENDING);
+
+ }
+ }
+
+
+
+ public class Xcls_Box8 : Object
+ {
+ public Gtk.Box el;
+ private DialogTemplateSelect _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Box8(DialogTemplateSelect _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.margin = 3;
+ var child_0 = new Xcls_Label9( _this );
+ child_0.ref();
+ this.el.pack_start ( child_0.el , false,false );
+ var child_1 = new Xcls_dbcombo( _this );
+ child_1.ref();
+ this.el.add ( child_1.el );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Label9 : Object
+ {
+ public Gtk.Label el;
+ private DialogTemplateSelect _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Label9(DialogTemplateSelect _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Label( "Select Database Table : " );
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_dbcombo : Object
+ {
+ public Gtk.ComboBox el;
+ private DialogTemplateSelect _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_dbcombo(DialogTemplateSelect _owner )
+ {
+ _this = _owner;
+ _this.dbcombo = this;
+ this.el = new Gtk.ComboBox();
+
+ // my vars (dec)
+
+ // set gobject values
+ var child_0 = new Xcls_dbcellrenderer( _this );
+ child_0.ref();
+ this.el.pack_start ( child_0.el , true );
+ var child_1 = new Xcls_dbmodel( _this );
+ child_1.ref();
+ this.el.set_model ( child_1.el );
+
+ // init method
+
+ this.el.add_attribute(_this.dbcellrenderer.el , "markup", 1 );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_dbcellrenderer : Object
+ {
+ public Gtk.CellRendererText el;
+ private DialogTemplateSelect _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_dbcellrenderer(DialogTemplateSelect _owner )
+ {
+ _this = _owner;
+ _this.dbcellrenderer = this;
+ this.el = new Gtk.CellRendererText();
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_dbmodel : Object
+ {
+ public Gtk.ListStore el;
+ private DialogTemplateSelect _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_dbmodel(DialogTemplateSelect _owner )
+ {
+ _this = _owner;
+ _this.dbmodel = this;
+ this.el = new Gtk.ListStore( 2, typeof(string),typeof(string) );
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ public void loadData (Gee.ArrayList<string> data) {
+ this.el.clear();
+ Gtk.TreeIter iter;
+ var el = this.el;
+
+ /// el.append(out iter);
+
+
+ // el.set_value(iter, 0, "");
+ // el.set_value(iter, 1, "aaa - Just add Element - aaa");
+
+ el.append(out iter);
+
+
+ el.set_value(iter, 0, "");
+ el.set_value(iter, 1, "-- select a table --");
+
+
+ for (var i = 0; i < data.size;i++) {
+
+
+ el.append(out iter);
+
+ el.set_value(iter, 0, data.get(i));
+ el.set_value(iter, 1, data.get(i));
+
+ }
+ this.el.set_sort_column_id(0, Gtk.SortType.ASCENDING);
+
+ }
+ }
+
+
+
+
+ public class Xcls_Button13 : Object
+ {
+ public Gtk.Button el;
+ private DialogTemplateSelect _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Button13(DialogTemplateSelect _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Button();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.label = "Cancel";
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_Button14 : Object
+ {
+ public Gtk.Button el;
+ private DialogTemplateSelect _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Button14(DialogTemplateSelect _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Button();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.label = "Just add it";
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_Button15 : Object
+ {
+ public Gtk.Button el;
+ private DialogTemplateSelect _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Button15(DialogTemplateSelect _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Button();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.label = "OK";
+ }
+
+ // user defined functions
+ }
+
+}
--- /dev/null
+{
+ "name" : "EditProject",
+ "parent" : "",
+ "title" : "",
+ "path" : "/home/alan/gitlive/app.Builder.js/src/Builder4/EditProject.bjs",
+ "permname" : "",
+ "modOrder" : "",
+ "build_module" : "builder",
+ "items" : [
+ {
+ "listeners" : {
+ "destroy_event" : "(self, event) => {\n\tthis.el.response(0);\n// this.el.hide();\n return false;\n}"
+ },
+ "default_width" : 600,
+ "$ deletable" : true,
+ "title" : "Project Properties",
+ "xtype" : "Dialog",
+ "default_height" : 500,
+ "| Project.Project? show" : "() {\n \n\n //[ 'xtype' ].forEach(function(k) {\n // _this.get(k).setValue(typeof(c[k]) == 'undefined' ? '' : c[k]);\n //});\n\t// shouild set path..\n _this.model.loadData();\n this.el.show_all();\n \n var err_dialog = StandardErrorDialog.singleton();\n\n var id = -1;\n while (id < 0) {\n id = this.el.run();\n if (id < 1) {\n this.el.hide();\n return null;\n }\n \n \n if (_this.xtype.getValue().length < 1) {\n \n err_dialog.show(_this.el,\"You have to set Project type\"); \n id = -1;\n continue;\n }\n if (_this.dir.el.get_filename().length < 1) {\n \n err_dialog.show(_this.el,\"You have to select a folder\"); \n id = -1;\n continue;\n }\n \n }\n \n this.el.hide();\n \n \n \n \n var fn = _this.dir.el.get_filename();\n print(\"add %s\\n\" , fn);\n \n var project = Project.Project.factory(_this.xtype.getValue(), fn);\n project.save();\n Project.projects.set(project.name,project);\n \n //var pr = imports.Builder.Provider.ProjectManager.ProjectManager.update(this.project);\n \n return project;\n\n \n //this.success = c.success;\n}\n",
+ "$ modal" : true,
+ "$ xns" : "Gtk",
+ "border_width" : 3,
+ "name" : "EditProject",
+ "items" : [
+ {
+ "bool expand" : true,
+ "xtype" : "Box",
+ "$ pack" : " get_content_area().add \n \n",
+ "$ xns" : "Gtk",
+ "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
+ "$ homogeneous" : false,
+ "items" : [
+ {
+ "xtype" : "Box",
+ "* pack" : "pack_start,false,true,3",
+ "$ xns" : "Gtk",
+ "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
+ "$ homogeneous" : false,
+ "items" : [
+ {
+ "label" : "Project type :",
+ "xtype" : "Label",
+ "* pack" : "pack_start,false,true,3",
+ "$ xns" : "Gtk"
+ },
+ {
+ "| string getValue" : " () {\n var ix = this.el.get_active();\n if (ix < 0 ) {\n return \"\";\n }\n switch(ix) {\n case 0:\n return \"Roo\";\n case 1:\n return \"Gtk\";\n }\n return \"\";\n}\n",
+ "id" : "xtype",
+ "* init" : " this.el.add_attribute(_this.cellrender.el , \"markup\", 1 ); \n ",
+ "xtype" : "ComboBox",
+ "* pack" : "pack_end,true,true,3",
+ "$ xns" : "Gtk",
+ "items" : [
+ {
+ "id" : "cellrender",
+ "* pack" : "pack_start,true",
+ "xtype" : "CellRendererText",
+ "$ xns" : "Gtk"
+ },
+ {
+ "id" : "model",
+ "xtype" : "ListStore",
+ "* pack" : "set_model",
+ "$ columns" : "typeof(string),typeof(string)",
+ "n_columns" : 2,
+ "$ xns" : "Gtk",
+ "| void loadData" : " ( ) {\n this.el.clear();\n \n Gtk.TreeIter iter;\n \n el.append(out iter);\n \n el.set_value(iter, 0, \"Roo\");\n el.set_value(iter, 1, \"Roo Project\");\n el.append(out iter);\n \n el.set_value(iter, 0, \"Gtk\");\n el.set_value(iter, 1, \"Gtk Project\");\n \n \n \n}\n"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "$ create_folders" : false,
+ "id" : "dir",
+ "$ action" : "Gtk.FileChooserAction.SELECT_FOLDER",
+ "bool expand" : true,
+ "* pack" : "pack_end,true,true,5",
+ "xtype" : "FileChooserWidget",
+ "$ xns" : "Gtk",
+ "$ select_multiple" : false
+ }
+ ]
+ },
+ {
+ "label" : "OK",
+ "* pack" : "add_action_widget,1",
+ "xtype" : "Button",
+ "$ xns" : "Gtk"
+ },
+ {
+ "label" : "Cancel",
+ "xtype" : "Button",
+ "* pack" : "add_action_widget,0",
+ "$ xns" : "Gtk"
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file
--- /dev/null
+static EditProject _EditProject;
+
+public class EditProject : Object
+{
+ public Gtk.Dialog el;
+ private EditProject _this;
+
+ public static EditProject singleton()
+ {
+ if (_EditProject == null) {
+ _EditProject= new EditProject();
+ }
+ return _EditProject;
+ }
+ public Xcls_xtype xtype;
+ public Xcls_cellrender cellrender;
+ public Xcls_model model;
+ public Xcls_dir dir;
+
+ // my vars (def)
+
+ // ctor
+ public EditProject()
+ {
+ _this = this;
+ this.el = new Gtk.Dialog();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.title = "Project Properties";
+ this.el.name = "EditProject";
+ this.el.border_width = 3;
+ this.el.default_height = 500;
+ this.el.default_width = 600;
+ this.el.deletable = true;
+ this.el.modal = true;
+ var child_0 = new Xcls_Box2( _this );
+ child_0.ref();
+ this.el.get_content_area().add ( child_0.el );
+ var child_1 = new Xcls_Button9( _this );
+ child_1.ref();
+ this.el.add_action_widget ( child_1.el , 1 );
+ var child_2 = new Xcls_Button10( _this );
+ child_2.ref();
+ this.el.add_action_widget ( child_2.el , 0 );
+
+ //listeners
+ this.el.destroy_event.connect( (self, event) => {
+ this.el.response(0);
+ // this.el.hide();
+ return false;
+ });
+ }
+
+ // user defined functions
+ public Project.Project? show () {
+
+
+ //[ 'xtype' ].forEach(function(k) {
+ // _this.get(k).setValue(typeof(c[k]) == 'undefined' ? '' : c[k]);
+ //});
+ // shouild set path..
+ _this.model.loadData();
+ this.el.show_all();
+
+ var err_dialog = StandardErrorDialog.singleton();
+
+ var id = -1;
+ while (id < 0) {
+ id = this.el.run();
+ if (id < 1) {
+ this.el.hide();
+ return null;
+ }
+
+
+ if (_this.xtype.getValue().length < 1) {
+
+ err_dialog.show(_this.el,"You have to set Project type");
+ id = -1;
+ continue;
+ }
+ if (_this.dir.el.get_filename().length < 1) {
+
+ err_dialog.show(_this.el,"You have to select a folder");
+ id = -1;
+ continue;
+ }
+
+ }
+
+ this.el.hide();
+
+
+
+
+ var fn = _this.dir.el.get_filename();
+ print("add %s\n" , fn);
+
+ var project = Project.Project.factory(_this.xtype.getValue(), fn);
+ project.save();
+ Project.projects.set(project.name,project);
+
+ //var pr = imports.Builder.Provider.ProjectManager.ProjectManager.update(this.project);
+
+ return project;
+
+
+ //this.success = c.success;
+ }
+ public class Xcls_Box2 : Object
+ {
+ public Gtk.Box el;
+ private EditProject _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Box2(EditProject _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.homogeneous = false;
+ this.el.expand = true;
+ var child_0 = new Xcls_Box3( _this );
+ child_0.ref();
+ this.el.pack_start ( child_0.el , false,true,3 );
+ var child_1 = new Xcls_dir( _this );
+ child_1.ref();
+ this.el.pack_end ( child_1.el , true,true,5 );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Box3 : Object
+ {
+ public Gtk.Box el;
+ private EditProject _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Box3(EditProject _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.homogeneous = false;
+ var child_0 = new Xcls_Label4( _this );
+ child_0.ref();
+ this.el.pack_start ( child_0.el , false,true,3 );
+ var child_1 = new Xcls_xtype( _this );
+ child_1.ref();
+ this.el.pack_end ( child_1.el , true,true,3 );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Label4 : Object
+ {
+ public Gtk.Label el;
+ private EditProject _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Label4(EditProject _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Label( "Project type :" );
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_xtype : Object
+ {
+ public Gtk.ComboBox el;
+ private EditProject _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_xtype(EditProject _owner )
+ {
+ _this = _owner;
+ _this.xtype = this;
+ this.el = new Gtk.ComboBox();
+
+ // my vars (dec)
+
+ // set gobject values
+ var child_0 = new Xcls_cellrender( _this );
+ child_0.ref();
+ this.el.pack_start ( child_0.el , true );
+ var child_1 = new Xcls_model( _this );
+ child_1.ref();
+ this.el.set_model ( child_1.el );
+
+ // init method
+
+ this.el.add_attribute(_this.cellrender.el , "markup", 1 );
+ }
+
+ // user defined functions
+ public string getValue () {
+ var ix = this.el.get_active();
+ if (ix < 0 ) {
+ return "";
+ }
+ switch(ix) {
+ case 0:
+ return "Roo";
+ case 1:
+ return "Gtk";
+ }
+ return "";
+ }
+ }
+ public class Xcls_cellrender : Object
+ {
+ public Gtk.CellRendererText el;
+ private EditProject _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_cellrender(EditProject _owner )
+ {
+ _this = _owner;
+ _this.cellrender = this;
+ this.el = new Gtk.CellRendererText();
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_model : Object
+ {
+ public Gtk.ListStore el;
+ private EditProject _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_model(EditProject _owner )
+ {
+ _this = _owner;
+ _this.model = this;
+ this.el = new Gtk.ListStore( 2, typeof(string),typeof(string) );
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ public void loadData ( ) {
+ this.el.clear();
+
+ Gtk.TreeIter iter;
+
+ el.append(out iter);
+
+ el.set_value(iter, 0, "Roo");
+ el.set_value(iter, 1, "Roo Project");
+ el.append(out iter);
+
+ el.set_value(iter, 0, "Gtk");
+ el.set_value(iter, 1, "Gtk Project");
+
+
+
+ }
+ }
+
+
+
+ public class Xcls_dir : Object
+ {
+ public Gtk.FileChooserWidget el;
+ private EditProject _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_dir(EditProject _owner )
+ {
+ _this = _owner;
+ _this.dir = this;
+ this.el = new Gtk.FileChooserWidget( Gtk.FileChooserAction.SELECT_FOLDER );
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.expand = true;
+ this.el.create_folders = false;
+ this.el.select_multiple = false;
+ }
+
+ // user defined functions
+ }
+
+
+ public class Xcls_Button9 : Object
+ {
+ public Gtk.Button el;
+ private EditProject _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Button9(EditProject _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Button();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.label = "OK";
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_Button10 : Object
+ {
+ public Gtk.Button el;
+ private EditProject _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Button10(EditProject _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Button();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.label = "Cancel";
+ }
+
+ // user defined functions
+ }
+
+}
--- /dev/null
+{
+ "name" : "Editor",
+ "parent" : "",
+ "title" : "",
+ "path" : "/home/alan/gitlive/app.Builder.js/src/Builder4/Editor.bjs",
+ "permname" : "",
+ "modOrder" : "",
+ "build_module" : "builder",
+ "items" : [
+ {
+ "# Xcls_MainWindow window" : "null",
+ "| bool saveContents" : " () {\n \n \n if (_this.file == null) {\n return true;\n }\n \n \n \n \n \n var str = _this.buffer.toString();\n \n _this.buffer.checkSyntax();\n \n \n \n // LeftPanel.model.changed( str , false);\n _this.dirty = false;\n _this.save_button.el.sensitive = false;\n \n // find the text for the node..\n if (_this.file.xtype != \"PlainFile\") {\n if (ptype == \"listener\") {\n this.node.listeners.set(key,str);\n \n } else {\n this.node.props.set(key,str);\n }\n } else {\n _this.file.setSource( str );\n }\n \n // call the signal..\n this.save();\n \n return true;\n\n} ",
+ "# string activeEditor" : "\"\"",
+ "| void scroll_to_line" : "(int line) {\n\n\tGLib.Timeout.add(500, () => {\n \n\t\tvar buf = this.view.el.get_buffer();\n\n\t\tvar sbuf = (Gtk.SourceBuffer) buf;\n\n\n\t\tGtk.TextIter iter; \n\t\tsbuf.get_iter_at_line(out iter, line);\n\t\tthis.view.el.scroll_to_iter(iter, 0.1f, true, 0.0f, 0.5f);\n\t\treturn false;\n\t}); \n}\n",
+ "# int pos_root_x" : "",
+ "# int pos_root_y" : "",
+ "# string ptype" : "\"\"",
+ "bool hexpand" : true,
+ "| int search" : "(string txt) {\n\n\tvar s = new Gtk.SourceSearchSettings();\n\t\n\tthis.searchcontext = new Gtk.SourceSearchContext(this.buffer.el,s);\n\tthis.searchcontext .set_highlight(true);\n\ts.set_search_text(txt);\n\tGtk.TextIter beg, st,en;\n\t \n\tthis.buffer.el.get_start_iter(out beg);\n\tthis.searchcontext.forward(beg, out st, out en);\n\tthis.last_search_end = 0;\n\t\n\treturn this.searchcontext.get_occurrences_count();\n\n \n \n\n}\n",
+ "int last_search_end" : 0,
+ "# string key" : "\"\"",
+ "* pack" : "add",
+ "xtype" : "Box",
+ "Gtk.SourceSearchContext searchcontext" : "null",
+ "| void show" : "(JsRender.JsRender file, JsRender.Node? node, string ptype, string key)\n{\n this.file = file; \n this.ptype = \"\";\n this.key = \"\";\n this.node = null;\n\tthis.searchcontext = null;\n \n if (file.xtype != \"PlainFile\") {\n \n this.ptype = ptype;\n this.key = key;\n this.node = node;\n string val = \"\";\n // find the text for the node..\n if (ptype == \"listener\") {\n val = node.listeners.get(key);\n \n } else {\n val = node.props.get(key);\n }\n this.view.load(val);\n this.key_edit.el.show();\n this.key_edit.el.text = key; \n \n } else {\n this.view.load( file.toSource() );\n this.key_edit.el.hide();\n }\n\n \n}",
+ "# JsRender.JsRender file" : "null",
+ "# bool pos" : false,
+ "string id" : "Editor",
+ "# bool dirty" : false,
+ "$ xns" : "Gtk",
+ "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
+ "@ void save" : "()",
+ "$ homogeneous" : false,
+ "| void forwardSearch" : "(bool change_focus) {\n\n\tif (this.searchcontext == null) {\n\t\treturn;\n\t}\n\t\n\tGtk.TextIter beg, st,en;\n\t \n\tthis.buffer.el.get_iter_at_offset(out beg, this.last_search_end);\n\tif (!this.searchcontext.forward(beg, out st, out en)) {\n\t\n\t\tthis.last_search_end = 0;\n\t} else {\n\t\tthis.last_search_end = en.get_offset();\n\t\tif (change_focus) {\n\t\t\tthis.view.el.grab_focus();\n\t\t}\n\t\tthis.buffer.el.place_cursor(st);\n\t\tthis.view.el.scroll_to_iter(st, 0.1f, true, 0.0f, 0.5f);\n\t}\n\n}\n",
+ "# JsRender.Node node" : "null",
+ "items" : [
+ {
+ "* pack" : "pack_start,false,true",
+ "xtype" : "Box",
+ "$ xns" : "Gtk",
+ "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
+ "$ homogeneous" : false,
+ "items" : [
+ {
+ "listeners" : {
+ "clicked" : " () => { \n _this.saveContents();\n}\n "
+ },
+ "label" : "Save",
+ "id" : "save_button",
+ "* pack" : "pack_start,false,false",
+ "xtype" : "Button",
+ "$ xns" : "Gtk"
+ },
+ {
+ "id" : "key_edit",
+ "* pack" : "pack_end,true,true",
+ "xtype" : "Entry",
+ "$ xns" : "Gtk"
+ }
+ ]
+ },
+ {
+ "id" : "RightEditor",
+ "* init" : "this.el.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);",
+ "xtype" : "ScrolledWindow",
+ "* pack" : "pack_end,true,true",
+ "$ xns" : "Gtk",
+ "items" : [
+ {
+ "listeners" : {
+ "key_release_event" : " (event) => {\n \n if (event.keyval == 115 && (event.state & Gdk.ModifierType.CONTROL_MASK ) > 0 ) {\n print(\"SAVE: ctrl-S pressed\");\n _this.saveContents();\n return false;\n }\n // print(event.key.keyval)\n \n return false;\n\n} \n\n "
+ },
+ "gboolean show_line_marks" : true,
+ "id" : "view",
+ "* init" : " \n\n\t\tvar description = Pango.FontDescription.from_string(\"monospace\");\n\t\tdescription.set_size(8000);\n\n\t\t this.el.override_font(description);\n\n\ttry { \n\t\tthis.el.completion.add_provider(new Palete.CompletionProvider(_this));\n } catch (GLib.Error e) {}\n \n\tthis.el.completion.unblock_interactive();\n\tthis.el.completion.select_on_show\t\t\t= true; // select\n\tthis.el.completion.show_headers\t\t\t= false;\n\tthis.el.completion.remember_info_visibility\t\t= true;\n \n \n var attrs = new Gtk.SourceMarkAttributes();\n var pink = Gdk.RGBA();\n pink.parse ( \"pink\");\n attrs.set_background ( pink);\n attrs.set_icon_name ( \"process-stop\"); \n attrs.query_tooltip_text.connect(( mark) => {\n //print(\"tooltip query? %s\\n\", mark.name);\n return mark.name;\n });\n \n this.el.set_mark_attributes (\"ERR\", attrs, 1);\n \n var wattrs = new Gtk.SourceMarkAttributes();\n var blue = Gdk.RGBA();\n blue.parse ( \"#ABF4EB\");\n wattrs.set_background ( blue);\n wattrs.set_icon_name ( \"process-stop\"); \n wattrs.query_tooltip_text.connect(( mark) => {\n //print(\"tooltip query? %s\\n\", mark.name);\n return mark.name;\n });\n \n this.el.set_mark_attributes (\"WARN\", wattrs, 1);\n \n \n \n var dattrs = new Gtk.SourceMarkAttributes();\n var purple = Gdk.RGBA();\n purple.parse ( \"#EEA9FF\");\n dattrs.set_background ( purple);\n dattrs.set_icon_name ( \"process-stop\"); \n dattrs.query_tooltip_text.connect(( mark) => {\n //print(\"tooltip query? %s\\n\", mark.name);\n return mark.name;\n });\n \n this.el.set_mark_attributes (\"DEPR\", dattrs, 1);\n \n ",
+ "uint tab_width" : 4,
+ "$ Gtk.SourceDrawSpacesFlags draw_spaces" : "Gtk.SourceDrawSpacesFlags.LEADING + Gtk.SourceDrawSpacesFlags.TRAILING + Gtk.SourceDrawSpacesFlags.TAB + Gtk.SourceDrawSpacesFlags.SPACE",
+ "* pack" : "add",
+ "xtype" : "SourceView",
+ "gboolean highlight_current_line" : true,
+ "$ gboolean auto_indent" : true,
+ "$ xns" : "Gtk",
+ "| void load" : " (string str) {\n\n// show the help page for the active node..\n //this.get('/Help').show();\n\n\n // this.get('/BottomPane').el.set_current_page(0);\n var buf = (Gtk.SourceBuffer)this.el.get_buffer();\n buf.set_text(str, str.length);\n buf.set_undo_manager(null);\n \n var lm = Gtk.SourceLanguageManager.get_default();\n var lang = \"vala\";\n if (_this.file != null) {\n lang = _this.file.language;\n }\n print(\"lang=%s, content_type = %s\\n\", lang, _this.file.content_type);\n var lg = _this.file.content_type.length > 0 ?\n lm.guess_language(_this.file.path, _this.file.content_type) :\n lm.get_language(lang);\n \n \n ((Gtk.SourceBuffer)(this.el.get_buffer())) .set_language(lg); \n\n this.el.insert_spaces_instead_of_tabs = true;\n if (lg != null) {\n\t\tprint(\"sourcelanguage = %s\\n\", lg.name);\n\t\tif (lg.name == \"Vala\") {\n\t\t this.el.insert_spaces_instead_of_tabs = false;\n\t\t}\n }\n _this.dirty = false;\n this.el.grab_focus();\n _this.save_button.el.sensitive = false;\n}",
+ "bool insert_spaces_instead_of_tabs" : true,
+ "indent_width" : 4,
+ "$ show_line_numbers" : true,
+ "items" : [
+ {
+ "listeners" : {
+ "changed" : " () => {\n // check syntax??\n // ??needed..??\n _this.save_button.el.sensitive = true;\n print(\"EDITOR CHANGED\");\n this.checkSyntax();\n \n _this.dirty = true;\n\n // this.get('/LeftPanel.model').changed( str , false);\n return ;\n}\n\n \n"
+ },
+ "bool check_queued" : false,
+ "int error_line" : "-1",
+ "id" : "buffer",
+ "| bool highlightErrors" : "( Gee.HashMap<int,string> validate_res) {\n \n this.error_line = validate_res.size;\n\n if (this.error_line < 1) {\n return true;\n }\n var tlines = this.el.get_line_count ();\n Gtk.TextIter iter;\n var valiter = validate_res.map_iterator();\n while (valiter.next()) {\n \n // print(\"get inter\\n\");\n var eline = valiter.get_key();\n if (eline > tlines) {\n continue;\n }\n this.el.get_iter_at_line( out iter, eline);\n //print(\"mark line\\n\");\n this.el.create_source_mark(valiter.get_value(), \"ERR\", iter);\n } \n return false;\n }",
+ "| string toString" : " () {\n \n Gtk.TextIter s;\n Gtk.TextIter e;\n this.el.get_start_iter(out s);\n this.el.get_end_iter(out e);\n var ret = this.el.get_text(s,e,true);\n //print(\"TO STRING? \" + ret);\n return ret;\n}\n ",
+ "| bool checkSyntax" : " () {\n \n if (this.check_running) {\n print(\"Check is running\\n\");\n if (this.check_queued) { \n print(\"Check is already queued\");\n return true;\n }\n this.check_queued = true;\n print(\"Adding queued Check \");\n GLib.Timeout.add_seconds(1, () => {\n this.check_queued = false;\n \n this.checkSyntax();\n return false;\n });\n \n\n return true;\n }\n var str = this.toString();\n \n // needed???\n if (this.error_line > 0) {\n Gtk.TextIter start;\n Gtk.TextIter end; \n this.el.get_bounds (out start, out end);\n\n this.el.remove_source_marks (start, end, null);\n }\n if (str.length < 1) {\n print(\"checkSyntax - empty string?\\n\");\n return true;\n }\n \n if (_this.file.xtype == \"PlainFile\") {\n \n // assume it's gtk...\n this.check_running = true;\n \n if (!_this.window.windowstate.valasource.checkPlainFileSpawn(\n\t _this.file,\n\t str\n\t )) {\n this.check_running = false;\n }\n\t\n return true;\n \n }\n if (_this.file == null) {\n return true;\n }\n var p = Palete.factory(_this.file.xtype); \n \n\n \n this.check_running = true;\n \n \n if (_this.file.language == \"js\") {\n this.check_running = false;\n print(\"calling validate javascript\\n\"); \n Gee.HashMap<int,string> errors;\n p.javascriptHasErrors(\n \t\t_this.window.windowstate,\n str, \n _this.key, \n _this.ptype,\n _this.file,\n \n out errors\n );\n return this.highlightErrors(errors); \n \n }\n \n \n print(\"calling validate vala\\n\"); \n // clear the buttons.\n \n \n if (! _this.window.windowstate.valasource.checkFileWithNodePropChange(\n _this.file,\n _this.node,\n _this.key, \n _this.ptype,\n str\n )) {\n this.check_running = false;\n } \n \n \n \n //print(\"done mark line\\n\");\n \n return true; // at present allow saving - even if it's invalid..\n}\n",
+ "* pack" : "set_buffer",
+ "xtype" : "SourceBuffer",
+ "bool check_running" : false,
+ "$ xns" : "Gtk",
+ "| bool highlightErrorsJson" : "(string type, Json.Object obj) {\n Gtk.TextIter start;\n Gtk.TextIter end; \n this.el.get_bounds (out start, out end);\n \n this.el.remove_source_marks (start, end, type);\n \n \n // we should highlight other types of errors..\n \n if (!obj.has_member(type)) {\n print(\"Return has no errors\\n\");\n return true;\n }\n \n if (_this.window.windowstate.state != WindowState.State.CODEONLY && \n _this.window.windowstate.state != WindowState.State.CODE\n ) {\n return true;\n } \n \n \n var err = obj.get_object_member(type);\n \n \n if (_this.file == null) {\n return true;\n \n }\n var valafn = _this.file.path;\n \n if (_this.file.xtype != \"PlainFile\") {\n\n\n \n \n valafn = \"\";\n try { \n var regex = new Regex(\"\\\\.bjs$\");\n // should not happen\n \n \n valafn = regex.replace(_this.file.path,_this.file.path.length , 0 , \".vala\");\n } catch (GLib.RegexError e) {\n return true;\n } \n\n\n\n }\n if (!err.has_member(valafn)) {\n print(\"File path has no errors\\n\");\n return true;\n }\n\n var lines = err.get_object_member(valafn);\n \n var offset = 1;\n if (obj.has_member(\"line_offset\")) {\n offset = (int)obj.get_int_member(\"line_offset\") + 1;\n }\n \n\n \n \n var tlines = this.el.get_line_count () +1;\n \n lines.foreach_member((obj, line, node) => {\n \n Gtk.TextIter iter;\n // print(\"get inter\\n\");\n var eline = int.parse(line) - offset;\n print(\"GOT ERROR on line %s -- converted to %d\\n\", line,eline);\n \n \n if (eline > tlines || eline < 0) {\n return;\n }\n this.el.get_iter_at_line( out iter, eline);\n //print(\"mark line\\n\");\n var msg = \"Line: %d\".printf(eline+1);\n var ar = lines.get_array_member(line);\n for (var i = 0 ; i < ar.get_length(); i++) {\n\t\t msg += (msg.length > 0) ? \"\\n\" : \"\";\n\t\t msg += ar.get_string_element(i);\n\t }\n \n \n this.el.create_source_mark(msg, type, iter);\n } );\n return false;\n \n\n\n\n\n}\n"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file
--- /dev/null
+static Editor _Editor;
+
+public class Editor : Object
+{
+ public Gtk.Box el;
+ private Editor _this;
+
+ public static Editor singleton()
+ {
+ if (_Editor == null) {
+ _Editor= new Editor();
+ }
+ return _Editor;
+ }
+ public Xcls_save_button save_button;
+ public Xcls_key_edit key_edit;
+ public Xcls_RightEditor RightEditor;
+ public Xcls_view view;
+ public Xcls_buffer buffer;
+
+ // my vars (def)
+ public Xcls_MainWindow window;
+ public string activeEditor;
+ public int pos_root_x;
+ public int pos_root_y;
+ public string ptype;
+ public int last_search_end;
+ public string key;
+ public Gtk.SourceSearchContext searchcontext;
+ public JsRender.JsRender file;
+ public bool pos;
+ public bool dirty;
+ public signal void save ();
+ public JsRender.Node node;
+
+ // ctor
+ public Editor()
+ {
+ _this = this;
+ this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
+
+ // my vars (dec)
+ this.window = null;
+ this.activeEditor = "";
+ this.ptype = "";
+ this.last_search_end = 0;
+ this.key = "";
+ this.searchcontext = null;
+ this.file = null;
+ this.pos = false;
+ this.dirty = false;
+ this.node = null;
+
+ // set gobject values
+ this.el.homogeneous = false;
+ this.el.hexpand = true;
+ var child_0 = new Xcls_Box2( _this );
+ child_0.ref();
+ this.el.pack_start ( child_0.el , false,true );
+ var child_1 = new Xcls_RightEditor( _this );
+ child_1.ref();
+ this.el.pack_end ( child_1.el , true,true );
+ }
+
+ // user defined functions
+ public bool saveContents () {
+
+
+ if (_this.file == null) {
+ return true;
+ }
+
+
+
+
+
+ var str = _this.buffer.toString();
+
+ _this.buffer.checkSyntax();
+
+
+
+ // LeftPanel.model.changed( str , false);
+ _this.dirty = false;
+ _this.save_button.el.sensitive = false;
+
+ // find the text for the node..
+ if (_this.file.xtype != "PlainFile") {
+ if (ptype == "listener") {
+ this.node.listeners.set(key,str);
+
+ } else {
+ this.node.props.set(key,str);
+ }
+ } else {
+ _this.file.setSource( str );
+ }
+
+ // call the signal..
+ this.save();
+
+ return true;
+
+ }
+ public void scroll_to_line (int line) {
+
+ GLib.Timeout.add(500, () => {
+
+ var buf = this.view.el.get_buffer();
+
+ var sbuf = (Gtk.SourceBuffer) buf;
+
+
+ Gtk.TextIter iter;
+ sbuf.get_iter_at_line(out iter, line);
+ this.view.el.scroll_to_iter(iter, 0.1f, true, 0.0f, 0.5f);
+ return false;
+ });
+ }
+ public int search (string txt) {
+
+ var s = new Gtk.SourceSearchSettings();
+
+ this.searchcontext = new Gtk.SourceSearchContext(this.buffer.el,s);
+ this.searchcontext .set_highlight(true);
+ s.set_search_text(txt);
+ Gtk.TextIter beg, st,en;
+
+ this.buffer.el.get_start_iter(out beg);
+ this.searchcontext.forward(beg, out st, out en);
+ this.last_search_end = 0;
+
+ return this.searchcontext.get_occurrences_count();
+
+
+
+
+ }
+ public void show (JsRender.JsRender file, JsRender.Node? node, string ptype, string key)
+ {
+ this.file = file;
+ this.ptype = "";
+ this.key = "";
+ this.node = null;
+ this.searchcontext = null;
+
+ if (file.xtype != "PlainFile") {
+
+ this.ptype = ptype;
+ this.key = key;
+ this.node = node;
+ string val = "";
+ // find the text for the node..
+ if (ptype == "listener") {
+ val = node.listeners.get(key);
+
+ } else {
+ val = node.props.get(key);
+ }
+ this.view.load(val);
+ this.key_edit.el.show();
+ this.key_edit.el.text = key;
+
+ } else {
+ this.view.load( file.toSource() );
+ this.key_edit.el.hide();
+ }
+
+
+ }
+ public void forwardSearch (bool change_focus) {
+
+ if (this.searchcontext == null) {
+ return;
+ }
+
+ Gtk.TextIter beg, st,en;
+
+ this.buffer.el.get_iter_at_offset(out beg, this.last_search_end);
+ if (!this.searchcontext.forward(beg, out st, out en)) {
+
+ this.last_search_end = 0;
+ } else {
+ this.last_search_end = en.get_offset();
+ if (change_focus) {
+ this.view.el.grab_focus();
+ }
+ this.buffer.el.place_cursor(st);
+ this.view.el.scroll_to_iter(st, 0.1f, true, 0.0f, 0.5f);
+ }
+
+ }
+ public class Xcls_Box2 : Object
+ {
+ public Gtk.Box el;
+ private Editor _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Box2(Editor _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.homogeneous = false;
+ var child_0 = new Xcls_save_button( _this );
+ child_0.ref();
+ this.el.pack_start ( child_0.el , false,false );
+ var child_1 = new Xcls_key_edit( _this );
+ child_1.ref();
+ this.el.pack_end ( child_1.el , true,true );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_save_button : Object
+ {
+ public Gtk.Button el;
+ private Editor _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_save_button(Editor _owner )
+ {
+ _this = _owner;
+ _this.save_button = this;
+ this.el = new Gtk.Button();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.label = "Save";
+
+ //listeners
+ this.el.clicked.connect( () => {
+ _this.saveContents();
+ });
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_key_edit : Object
+ {
+ public Gtk.Entry el;
+ private Editor _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_key_edit(Editor _owner )
+ {
+ _this = _owner;
+ _this.key_edit = this;
+ this.el = new Gtk.Entry();
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ }
+
+
+ public class Xcls_RightEditor : Object
+ {
+ public Gtk.ScrolledWindow el;
+ private Editor _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_RightEditor(Editor _owner )
+ {
+ _this = _owner;
+ _this.RightEditor = this;
+ this.el = new Gtk.ScrolledWindow( null, null );
+
+ // my vars (dec)
+
+ // set gobject values
+ var child_0 = new Xcls_view( _this );
+ child_0.ref();
+ this.el.add ( child_0.el );
+
+ // init method
+
+ this.el.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);
+ }
+
+ // user defined functions
+ }
+ public class Xcls_view : Object
+ {
+ public Gtk.SourceView el;
+ private Editor _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_view(Editor _owner )
+ {
+ _this = _owner;
+ _this.view = this;
+ this.el = new Gtk.SourceView();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.auto_indent = true;
+ this.el.indent_width = 4;
+ this.el.show_line_marks = true;
+ this.el.insert_spaces_instead_of_tabs = true;
+ this.el.show_line_numbers = true;
+ this.el.draw_spaces = Gtk.SourceDrawSpacesFlags.LEADING + Gtk.SourceDrawSpacesFlags.TRAILING + Gtk.SourceDrawSpacesFlags.TAB + Gtk.SourceDrawSpacesFlags.SPACE;
+ this.el.tab_width = 4;
+ this.el.highlight_current_line = true;
+ var child_0 = new Xcls_buffer( _this );
+ child_0.ref();
+ this.el.set_buffer ( child_0.el );
+
+ // init method
+
+ var description = Pango.FontDescription.from_string("monospace");
+ description.set_size(8000);
+
+ this.el.override_font(description);
+
+ try {
+ this.el.completion.add_provider(new Palete.CompletionProvider(_this));
+ } catch (GLib.Error e) {}
+
+ this.el.completion.unblock_interactive();
+ this.el.completion.select_on_show = true; // select
+ this.el.completion.show_headers = false;
+ this.el.completion.remember_info_visibility = true;
+
+
+ var attrs = new Gtk.SourceMarkAttributes();
+ var pink = Gdk.RGBA();
+ pink.parse ( "pink");
+ attrs.set_background ( pink);
+ attrs.set_icon_name ( "process-stop");
+ attrs.query_tooltip_text.connect(( mark) => {
+ //print("tooltip query? %s\n", mark.name);
+ return mark.name;
+ });
+
+ this.el.set_mark_attributes ("ERR", attrs, 1);
+
+ var wattrs = new Gtk.SourceMarkAttributes();
+ var blue = Gdk.RGBA();
+ blue.parse ( "#ABF4EB");
+ wattrs.set_background ( blue);
+ wattrs.set_icon_name ( "process-stop");
+ wattrs.query_tooltip_text.connect(( mark) => {
+ //print("tooltip query? %s\n", mark.name);
+ return mark.name;
+ });
+
+ this.el.set_mark_attributes ("WARN", wattrs, 1);
+
+
+
+ var dattrs = new Gtk.SourceMarkAttributes();
+ var purple = Gdk.RGBA();
+ purple.parse ( "#EEA9FF");
+ dattrs.set_background ( purple);
+ dattrs.set_icon_name ( "process-stop");
+ dattrs.query_tooltip_text.connect(( mark) => {
+ //print("tooltip query? %s\n", mark.name);
+ return mark.name;
+ });
+
+ this.el.set_mark_attributes ("DEPR", dattrs, 1);
+
+ //listeners
+ this.el.key_release_event.connect( (event) => {
+
+ if (event.keyval == 115 && (event.state & Gdk.ModifierType.CONTROL_MASK ) > 0 ) {
+ print("SAVE: ctrl-S pressed");
+ _this.saveContents();
+ return false;
+ }
+ // print(event.key.keyval)
+
+ return false;
+
+ });
+ }
+
+ // user defined functions
+ public void load (string str) {
+
+ // show the help page for the active node..
+ //this.get('/Help').show();
+
+
+ // this.get('/BottomPane').el.set_current_page(0);
+ var buf = (Gtk.SourceBuffer)this.el.get_buffer();
+ buf.set_text(str, str.length);
+ buf.set_undo_manager(null);
+
+ var lm = Gtk.SourceLanguageManager.get_default();
+ var lang = "vala";
+ if (_this.file != null) {
+ lang = _this.file.language;
+ }
+ print("lang=%s, content_type = %s\n", lang, _this.file.content_type);
+ var lg = _this.file.content_type.length > 0 ?
+ lm.guess_language(_this.file.path, _this.file.content_type) :
+ lm.get_language(lang);
+
+
+ ((Gtk.SourceBuffer)(this.el.get_buffer())) .set_language(lg);
+
+ this.el.insert_spaces_instead_of_tabs = true;
+ if (lg != null) {
+ print("sourcelanguage = %s\n", lg.name);
+ if (lg.name == "Vala") {
+ this.el.insert_spaces_instead_of_tabs = false;
+ }
+ }
+ _this.dirty = false;
+ this.el.grab_focus();
+ _this.save_button.el.sensitive = false;
+ }
+ }
+ public class Xcls_buffer : Object
+ {
+ public Gtk.SourceBuffer el;
+ private Editor _this;
+
+
+ // my vars (def)
+ public bool check_queued;
+ public int error_line;
+ public bool check_running;
+
+ // ctor
+ public Xcls_buffer(Editor _owner )
+ {
+ _this = _owner;
+ _this.buffer = this;
+ this.el = new Gtk.SourceBuffer( null );
+
+ // my vars (dec)
+ this.check_queued = false;
+ this.error_line = -1;
+ this.check_running = false;
+
+ // set gobject values
+
+ //listeners
+ this.el.changed.connect( () => {
+ // check syntax??
+ // ??needed..??
+ _this.save_button.el.sensitive = true;
+ print("EDITOR CHANGED");
+ this.checkSyntax();
+
+ _this.dirty = true;
+
+ // this.get('/LeftPanel.model').changed( str , false);
+ return ;
+ });
+ }
+
+ // user defined functions
+ public bool highlightErrors ( Gee.HashMap<int,string> validate_res) {
+
+ this.error_line = validate_res.size;
+
+ if (this.error_line < 1) {
+ return true;
+ }
+ var tlines = this.el.get_line_count ();
+ Gtk.TextIter iter;
+ var valiter = validate_res.map_iterator();
+ while (valiter.next()) {
+
+ // print("get inter\n");
+ var eline = valiter.get_key();
+ if (eline > tlines) {
+ continue;
+ }
+ this.el.get_iter_at_line( out iter, eline);
+ //print("mark line\n");
+ this.el.create_source_mark(valiter.get_value(), "ERR", iter);
+ }
+ return false;
+ }
+ public string toString () {
+
+ Gtk.TextIter s;
+ Gtk.TextIter e;
+ this.el.get_start_iter(out s);
+ this.el.get_end_iter(out e);
+ var ret = this.el.get_text(s,e,true);
+ //print("TO STRING? " + ret);
+ return ret;
+ }
+ public bool checkSyntax () {
+
+ if (this.check_running) {
+ print("Check is running\n");
+ if (this.check_queued) {
+ print("Check is already queued");
+ return true;
+ }
+ this.check_queued = true;
+ print("Adding queued Check ");
+ GLib.Timeout.add_seconds(1, () => {
+ this.check_queued = false;
+
+ this.checkSyntax();
+ return false;
+ });
+
+
+ return true;
+ }
+ var str = this.toString();
+
+ // needed???
+ if (this.error_line > 0) {
+ Gtk.TextIter start;
+ Gtk.TextIter end;
+ this.el.get_bounds (out start, out end);
+
+ this.el.remove_source_marks (start, end, null);
+ }
+ if (str.length < 1) {
+ print("checkSyntax - empty string?\n");
+ return true;
+ }
+
+ if (_this.file.xtype == "PlainFile") {
+
+ // assume it's gtk...
+ this.check_running = true;
+
+ if (!_this.window.windowstate.valasource.checkPlainFileSpawn(
+ _this.file,
+ str
+ )) {
+ this.check_running = false;
+ }
+
+ return true;
+
+ }
+ if (_this.file == null) {
+ return true;
+ }
+ var p = Palete.factory(_this.file.xtype);
+
+
+
+ this.check_running = true;
+
+
+ if (_this.file.language == "js") {
+ this.check_running = false;
+ print("calling validate javascript\n");
+ Gee.HashMap<int,string> errors;
+ p.javascriptHasErrors(
+ _this.window.windowstate,
+ str,
+ _this.key,
+ _this.ptype,
+ _this.file,
+
+ out errors
+ );
+ return this.highlightErrors(errors);
+
+ }
+
+
+ print("calling validate vala\n");
+ // clear the buttons.
+
+
+ if (! _this.window.windowstate.valasource.checkFileWithNodePropChange(
+ _this.file,
+ _this.node,
+ _this.key,
+ _this.ptype,
+ str
+ )) {
+ this.check_running = false;
+ }
+
+
+
+ //print("done mark line\n");
+
+ return true; // at present allow saving - even if it's invalid..
+ }
+ public bool highlightErrorsJson (string type, Json.Object obj) {
+ Gtk.TextIter start;
+ Gtk.TextIter end;
+ this.el.get_bounds (out start, out end);
+
+ this.el.remove_source_marks (start, end, type);
+
+
+ // we should highlight other types of errors..
+
+ if (!obj.has_member(type)) {
+ print("Return has no errors\n");
+ return true;
+ }
+
+ if (_this.window.windowstate.state != WindowState.State.CODEONLY &&
+ _this.window.windowstate.state != WindowState.State.CODE
+ ) {
+ return true;
+ }
+
+
+ var err = obj.get_object_member(type);
+
+
+ if (_this.file == null) {
+ return true;
+
+ }
+ var valafn = _this.file.path;
+
+ if (_this.file.xtype != "PlainFile") {
+
+
+
+
+ valafn = "";
+ try {
+ var regex = new Regex("\\.bjs$");
+ // should not happen
+
+
+ valafn = regex.replace(_this.file.path,_this.file.path.length , 0 , ".vala");
+ } catch (GLib.RegexError e) {
+ return true;
+ }
+
+
+
+ }
+ if (!err.has_member(valafn)) {
+ print("File path has no errors\n");
+ return true;
+ }
+
+ var lines = err.get_object_member(valafn);
+
+ var offset = 1;
+ if (obj.has_member("line_offset")) {
+ offset = (int)obj.get_int_member("line_offset") + 1;
+ }
+
+
+
+
+ var tlines = this.el.get_line_count () +1;
+
+ lines.foreach_member((obj, line, node) => {
+
+ Gtk.TextIter iter;
+ // print("get inter\n");
+ var eline = int.parse(line) - offset;
+ print("GOT ERROR on line %s -- converted to %d\n", line,eline);
+
+
+ if (eline > tlines || eline < 0) {
+ return;
+ }
+ this.el.get_iter_at_line( out iter, eline);
+ //print("mark line\n");
+ var msg = "Line: %d".printf(eline+1);
+ var ar = lines.get_array_member(line);
+ for (var i = 0 ; i < ar.get_length(); i++) {
+ msg += (msg.length > 0) ? "\n" : "";
+ msg += ar.get_string_element(i);
+ }
+
+
+ this.el.create_source_mark(msg, type, iter);
+ } );
+ return false;
+
+
+
+
+
+ }
+ }
+
+
+
+}
--- /dev/null
+/**
+ * Originally this was supposed to intercept http calls and redirect them
+ * but that is not supported in webkit2 (without using the extension api)
+ *
+ * so for now we have modified our server to serve use a base url of xhttp:
+ *
+ * so all relative urls are based on that
+ *
+ * Idea is to serve the files from the file system, so no need to setup apache etc...
+ * This should work for the static content like css / javascript etc.. but
+ * will cause issues with 'dynamic' xhr files (eg. the php stuff)
+ *
+ * the idea is nicked from geary.
+ *
+ * At present this serves from ~/gitlive/**** - that probably needs more thought..
+ *
+ *
+ */
+public errordomain FakeServerError {
+ FILE_DOES_NOT_EXIST
+}
+
+public class FakeServerCache : Object
+{
+ public string fname;
+ public uint8[] data;
+ public string content_type;
+ public int64 size;
+
+ public static Gee.HashMap<string,FakeServerCache> cache;
+
+ public static FakeServerCache factory(string fname, string scheme)
+ {
+ if (cache == null) {
+ cache = new Gee.HashMap<string,FakeServerCache>();
+ }
+
+ // print ("CACHE look for ==%s==\n", fname);
+ if (scheme == "resources") {
+ return new FakeServerCache.from_resource(fname);
+ }
+
+ if (cache.has_key(fname)) {
+ print ("CACHE got %s\n", fname);
+ return cache.get(fname);
+ }
+ print ("CACHE create %s\n", fname);
+
+ var el = new FakeServerCache(fname);
+
+ cache.set(fname, el);
+ return el;
+ }
+ // called onload to clear the temporary cached file..
+ public static void remove(string fname) {
+ if (cache == null) {
+ return;
+ }
+ if (!cache.has_key(fname)) {
+ return;
+ }
+
+
+ FakeServerCache v;
+
+ cache.unset(fname, out v);
+
+
+
+ }
+ public static void clear()
+ {
+ if (cache == null) {
+ return;
+ }
+ cache.clear();
+ }
+
+ public static FakeServerCache factory_with_data(string data) {
+ if (cache == null) {
+ cache = new Gee.HashMap<string,FakeServerCache>();
+ }
+ var el = new FakeServerCache.with_data(data);
+ print("CACHE - store %s\n", el.fname);
+ cache.set(el.fname, el);
+ return el;
+ }
+
+
+
+
+ public FakeServerCache.with_data( string data )
+ {
+ this.fname = "/" + GLib.Checksum.compute_for_string(GLib.ChecksumType.MD5, data, data.length) + ".js";
+ this.data = data.data;
+ this.content_type = "text/javascript";
+ this.size= data.length;
+
+
+ }
+ public FakeServerCache.from_resource( string fname )
+ {
+
+
+
+ this.fname = fname;
+
+ var file = File.new_for_path ( BuilderApplication.configDirectory() + "/resources/" + fname);
+ if (!file.query_exists()) {
+ this.data = "".data;
+ this.content_type = "";
+ this.size = 0;
+ return;
+ }
+ try {
+ var info = file.query_info(
+ "standard::*",
+ FileQueryInfoFlags.NONE
+ );
+
+ this.content_type = info.get_content_type();
+ this.size = info.get_size();
+ uint8[] data;
+
+
+ GLib.FileUtils.get_data(file.get_path(), out data);
+ this.data = data;
+ } catch (Error e) {
+ this.data = "".data;
+ this.size = 0;
+ this.content_type = "";
+ return;
+ }
+
+
+
+ }
+ public FakeServerCache( string fname ) {
+
+ this.fname = fname;
+
+ var file = File.new_for_path ( GLib.Environment.get_home_dir() + "/gitlive" + fname);
+ if (!file.query_exists()) {
+ this.data = "".data;
+ this.content_type = "";
+ this.size = 0;
+ return;
+ }
+ try {
+ var info = file.query_info(
+ "standard::*",
+ FileQueryInfoFlags.NONE
+ );
+ this.content_type = info.get_content_type();
+ this.size = info.get_size();
+ uint8[] data;
+
+
+ GLib.FileUtils.get_data(file.get_path(), out data);
+ this.data = data;
+ } catch (Error e) {
+ this.data = "".data;
+ this.size = 0;
+ this.content_type = "";
+ return;
+ }
+
+
+
+ print("FakeServerCache :%s, %s (%s/%d)\n", fname ,
+ this.content_type, this.size.to_string(), this.data.length);
+
+
+ }
+
+
+ public void run(WebKit.URISchemeRequest request, Cancellable? cancellable)
+ {
+ var stream = new GLib.MemoryInputStream.from_data (this.data, GLib.free);
+ print("SEND %s\nwe", this.size.to_string());
+
+ request.finish(stream,
+ this.size,
+ this.content_type);
+
+
+
+ return;
+
+ }
+
+
+}
+
+public class FakeServer : Object
+{
+ WebKit.WebView view;
+
+ public FakeServer(WebKit.WebView wkview)
+ {
+ this.view = wkview;
+
+
+ var cx = WebKit.WebContext.get_default();
+ //var cx = this.view.get_context();
+ cx.register_uri_scheme("xhttp", serve);
+ cx.register_uri_scheme("resources", serve);
+ cx.set_cache_model (WebKit.CacheModel.DOCUMENT_VIEWER);
+
+ // these do not help for cross domain requests..
+
+ //cx.get_security_manager().register_uri_scheme_as_cors_enabled("xhttp");
+ //cx.get_security_manager().register_uri_scheme_as_cors_enabled("http");
+ //cx.register_uri_scheme_as_cors_enabled("xhttp");
+ // = crash cx.set_process_model (WebKit.ProcessModel.MULTIPLE_SECONDARY_PROCESSES );
+ }
+
+
+ public void serve(WebKit.URISchemeRequest request)
+ {
+ // request is URISchemeRequest
+
+ print("REQ: %s\n",request.get_path());
+ var cdata = FakeServerCache.factory(request.get_path() , request.get_scheme());
+
+ if (cdata.size < 1 ) {
+ print("Skip file missing = %s/gitlive%s\n", GLib.Environment.get_home_dir() , request.get_path());
+ request.finish_error(new FakeServerError.FILE_DOES_NOT_EXIST ("My error msg"));
+ return;
+ }
+
+ print("Send :%s, %s (%s/%d)", request.get_path(),
+ cdata.content_type, cdata.size.to_string(), cdata.data.length);
+ cdata.run(request, null);
+
+ }
+
+
+}
--- /dev/null
+
+
+
+
+public class GladeExtras : Object
+{
+
+ static void init()
+ {
+
+
+ }
\ No newline at end of file
--- /dev/null
+{
+ "name" : "GladeView",
+ "parent" : "",
+ "title" : "",
+ "path" : "/home/alan/gitlive/app.Builder.js/Builder4/GladeView.bjs",
+ "permname" : "",
+ "modOrder" : "",
+ "items" : [
+ {
+ "* ctor" : "new Glade.DesignView(new Glade.Project())",
+ "id" : "GladeView",
+ "| void createThumb" : "() {\n \n \n if (this.file == null) {\n return;\n }\n var filename = this.file.getIconFileName(false);\n \n var win = this.el.get_parent_window();\n var width = win.get_width();\n var height = win.get_height();\n\n Gdk.Pixbuf screenshot = Gdk.pixbuf_get_from_window(win, 0, 0, width, height); // this.el.position?\n\n screenshot.save(filename,\"png\");\n return;\n \n \n \n \n \n \n \n // should we hold until it's printed...\n \n \n\n \n \n\n\n \n \n}\n",
+ "| void loadFile" : "(JsRender.JsRender file)\n{\n \n\n this.file = file;\n \n\n // clear existing elements from project?\n \n var p = this.el.get_project();\n var li = p.get_objects().copy();\n // should remove all..\n for (var i =0; i < li.length(); i++) { \n p.remove_object(li.nth_data(i)); \n }\n\n if (file.tree == null) {\n return;\n }\n\n// print(\"%s\\n\",tf.tree.toJsonString());\n\tvar x = new JsRender.NodeToGlade(file.tree, \"\");\n\n\t \n\tFileIOStream iostream;\n\tvar f = File.new_tmp (\"tpl-XXXXXX.glade\", out iostream);\n\tvar ostream = iostream.output_stream;\n\tvar dostream = new DataOutputStream (ostream);\n\tdostream.put_string (x.munge());\n\tthis.el.show();\n\t print(\"LOADING %s\\n\",f.get_path ());\n p.load_from_file(f.get_path ());\n \n \n\n}",
+ "xtype" : "DesignView",
+ "# JsRender.JsRender file" : "null",
+ "$ xns" : "Glade"
+ }
+ ]
+}
\ No newline at end of file
--- /dev/null
+static Xcls_GladeView _GladeView;
+
+public class Xcls_GladeView : Object
+{
+ public Glade.DesignView el;
+ private Xcls_GladeView _this;
+
+ public static Xcls_GladeView singleton()
+ {
+ if (_GladeView == null) {
+ _GladeView= new Xcls_GladeView();
+ }
+ return _GladeView;
+ }
+
+ // my vars (def)
+ public JsRender.JsRender file;
+
+ // ctor
+ public Xcls_GladeView()
+ {
+ _this = this;
+ this.el = new Glade.DesignView(new Glade.Project());
+
+ // my vars (dec)
+ this.file = null;
+
+ // set gobject values
+ }
+
+ // user defined functions
+ public void createThumb () {
+
+
+ if (this.file == null) {
+ return;
+ }
+ var filename = this.file.getIconFileName(false);
+
+ var win = this.el.get_parent_window();
+ var width = win.get_width();
+ var height = win.get_height();
+
+ Gdk.Pixbuf screenshot = Gdk.pixbuf_get_from_window(win, 0, 0, width, height); // this.el.position?
+
+ screenshot.save(filename,"png");
+ return;
+
+
+
+
+
+
+
+ // should we hold until it's printed...
+
+
+
+
+
+
+
+
+
+ }
+ public void loadFile (JsRender.JsRender file)
+ {
+
+
+ this.file = file;
+
+
+ // clear existing elements from project?
+
+ var p = this.el.get_project();
+ var li = p.get_objects().copy();
+ // should remove all..
+ for (var i =0; i < li.length(); i++) {
+ p.remove_object(li.nth_data(i));
+ }
+
+ if (file.tree == null) {
+ return;
+ }
+
+ // print("%s\n",tf.tree.toJsonString());
+ var x = new JsRender.NodeToGlade(file.tree, "");
+
+
+ FileIOStream iostream;
+ var f = File.new_tmp ("tpl-XXXXXX.glade", out iostream);
+ var ostream = iostream.output_stream;
+ var dostream = new DataOutputStream (ostream);
+ dostream.put_string (x.munge());
+ this.el.show();
+ print("LOADING %s\n",f.get_path ());
+ p.load_from_file(f.get_path ());
+
+
+
+ }
+}
--- /dev/null
+{
+ "name" : "GtkView",
+ "parent" : "",
+ "title" : "",
+ "path" : "/home/alan/gitlive/app.Builder.js/src/Builder4/GtkView.bjs",
+ "permname" : "",
+ "modOrder" : "",
+ "build_module" : "builder",
+ "items" : [
+ {
+ "listeners" : {
+ "size_allocate" : "(aloc) => {\n \n this.width = aloc.width;\n this.height =aloc.height;\n}\n "
+ },
+ "| void scroll_to_line" : "(int line) {\n this.notebook.el.page = 1;// code preview...\n \n GLib.Timeout.add(500, () => {\n \n \n\t \n\t \n\t\t var buf = this.sourceview.el.get_buffer();\n\t \n\t\tvar sbuf = (Gtk.SourceBuffer) buf;\n\n\n\t\tGtk.TextIter iter; \n\t\tsbuf.get_iter_at_line(out iter, line);\n\t\tthis.sourceview.el.scroll_to_iter(iter, 0.1f, true, 0.0f, 0.5f);\n\t\treturn false;\n\t}); \n\n \n}\n",
+ "id" : "GtkView",
+ "# Gtk.Widget lastObj" : "null",
+ "| void createThumb" : "() {\n \n \n if (this.file == null) {\n return;\n }\n // only screenshot the gtk preview..\n if (this.notebook.el.page > 0 ) {\n return;\n }\n \n \n var filename = this.file.getIconFileName(false);\n \n var win = this.el.get_parent_window();\n var width = win.get_width();\n var height = win.get_height();\n try {\n Gdk.Pixbuf screenshot = Gdk.pixbuf_get_from_window(win, 0, 0, width, height); // this.el.position?\n screenshot.save(filename,\"png\");\n } catch (Error e) {\n \n }\n\n \n return;\n \n \n \n \n \n // should we hold until it's printed...\n \n \n\n \n \n\n\n \n \n}\n",
+ "| void loadFile" : "(JsRender.JsRender file) \n{\n this.file = null;\n \n if (file.tree == null) {\n return;\n }\n this.notebook.el.page = 0;// gtk preview \n \n \n \n this.file = file; \n this.sourceview.loadFile();\n this.searchcontext = null;\n \n\n if (this.lastObj != null) {\n this.container.el.remove(this.lastObj);\n }\n \n // hide the compile view at present..\n \n \n var w = this.width;\n var h = this.height;\n \n print(\"ALLOC SET SIZES %d, %d\\n\", w,h); \n \n // set the container size min to 500/500 or 20 px less than max..\n w = int.max (w-20, 500);\n h = int.max (h-20, 500); \n \n print(\"SET SIZES %d, %d\\n\", w,h); \n _this.container.el.set_size_request(w,h);\n \n _this.view_layout.el.set_size(w,h); // should be baded on calc.. -- see update_scrolled.\n var rgba = Gdk.RGBA ();\n rgba.parse (\"#ccc\");\n _this.view_layout.el.override_background_color(Gtk.StateFlags.NORMAL, rgba);\n \n \n\tvar x = new JsRender.NodeToGtk(file.tree);\n var obj = x.munge() as Gtk.Widget;\n this.lastObj = null;\n\tif (obj == null) {\n \treturn;\n\t}\n\tthis.lastObj = obj;\n \n this.container.el.add(obj);\n obj.show_all();\n \n \n \n}\n ",
+ "int width" : 0,
+ "bool hexpand" : true,
+ "| int search" : "(string txt) {\n\tthis.notebook.el.page = 1;\n \tvar s = new Gtk.SourceSearchSettings();\n\tvar buf = (Gtk.SourceBuffer) this.sourceview.el.get_buffer();\n\tthis.searchcontext = new Gtk.SourceSearchContext(buf,s);\n\tthis.searchcontext.set_highlight(true);\n\ts.set_search_text(txt);\n\t\n\tGtk.TextIter beg, st,en;\n\t \n\tbuf.get_start_iter(out beg);\n\tthis.searchcontext.forward(beg, out st, out en);\n\tthis.last_search_end = 0;\n\treturn this.searchcontext.get_occurrences_count();\n\n \n}\n",
+ "int last_search_end" : 0,
+ "xtype" : "Box",
+ "Gtk.SourceSearchContext searchcontext" : "",
+ "# JsRender.JsRender file" : "null",
+ "int height" : 0,
+ "$ xns" : "Gtk",
+ "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
+ "# Xcls_MainWindow main_window" : "",
+ "| void forwardSearch" : "(bool change_focus) {\n\n\tif (this.searchcontext == null) {\n\t\treturn;\n\t}\n\tthis.notebook.el.page = 1;\n\tGtk.TextIter beg, st,en, stl;\n\t\n\tvar buf = this.sourceview.el.get_buffer();\n\tbuf.get_iter_at_offset(out beg, this.last_search_end);\n\tif (!this.searchcontext.forward(beg, out st, out en)) {\n\t\tthis.last_search_end = 0;\n\t} else { \n\t\tthis.last_search_end = en.get_offset();\n\t\tif (change_focus) {\n\t\t\tthis.sourceview.el.grab_focus();\t\n\t\t}\n\t\tbuf.place_cursor(st);\n\t\tvar ln = st.get_line();\n\t\tbuf.get_iter_at_line(out stl,ln);\n\t\t \n\t\tthis.sourceview.el.scroll_to_iter(stl, 0.0f, true, 0.0f, 0.5f);\n\t}\n\n}\n",
+ "items" : [
+ {
+ "id" : "notebook",
+ "* pack" : "pack_start,true,true,0",
+ "xtype" : "Notebook",
+ "$ xns" : "Gtk",
+ "items" : [
+ {
+ "id" : "label_preview",
+ "* pack" : false,
+ "xtype" : "Label",
+ "$ xns" : "Gtk",
+ "utf8 label" : "Preview"
+ },
+ {
+ "id" : "label_code",
+ "xtype" : "Label",
+ "* pack" : false,
+ "$ xns" : "Gtk",
+ "utf8 label" : "Preview Generated Code"
+ },
+ {
+ "* pack" : "append_page,_this.label_preview.el",
+ "xtype" : "ScrolledWindow",
+ "$ xns" : "Gtk",
+ "items" : [
+ {
+ "id" : "view_layout",
+ "xtype" : "Layout",
+ "* pack" : "add",
+ "$ xns" : "Gtk",
+ "items" : [
+ {
+ "id" : "container",
+ "* pack" : "put,10,10",
+ "xtype" : "Box",
+ "$ xns" : "Gtk",
+ "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "xtype" : "ScrolledWindow",
+ "* pack" : "append_page,_this.label_code.el",
+ "$ xns" : "Gtk",
+ "items" : [
+ {
+ "gboolean show_line_marks" : true,
+ "id" : "sourceview",
+ "* init" : "{\n \n var description = Pango.FontDescription.from_string(\"monospace\");\n description.set_size(8000);\n this.el.override_font(description);\n\n this.loading = true;\n var buf = this.el.get_buffer();\n buf.notify.connect((ps) => {\n if (this.loading) {\n return;\n }\n if (ps.name != \"cursor-position\") {\n return;\n }\n print(\"cursor changed : %d\\n\", buf.cursor_position);\n Gtk.TextIter cpos;\n buf.get_iter_at_offset(out cpos, buf.cursor_position);\n \n var ln = cpos.get_line();\n \n var node = _this.file.lineToNode(ln);\n \n if (node == null) {\n print(\"can not find node\\n\");\n return;\n }\n var ltree = _this.main_window.windowstate.left_tree;\n var tp = ltree.model.treePathFromNode(node);\n print(\"got tree path %s\\n\", tp);\n if (tp != \"\") {\n\t this.allow_node_scroll = false; \n\t print(\"changing cursor on tree..\\n\");\n ltree.view.el.set_cursor(new Gtk.TreePath.from_string(tp), null, false);\n // scrolling is disabled... as node selection calls scroll 10ms after it changes.\n GLib.Timeout.add_full(GLib.Priority.DEFAULT,100 , () => {\n\t this.allow_node_scroll = true;\n\t return false;\n });\n }\n \n // highlight the node..\n \n });\n \n \n \n var attrs = new Gtk.SourceMarkAttributes();\n var pink = Gdk.RGBA();\n pink.parse ( \"pink\");\n attrs.set_background ( pink);\n attrs.set_icon_name ( \"process-stop\"); \n attrs.query_tooltip_text.connect(( mark) => {\n //print(\"tooltip query? %s\\n\", mark.name);\n return mark.name;\n });\n \n this.el.set_mark_attributes (\"ERR\", attrs, 1);\n \n var wattrs = new Gtk.SourceMarkAttributes();\n var blue = Gdk.RGBA();\n blue.parse ( \"#ABF4EB\");\n wattrs.set_background ( blue);\n wattrs.set_icon_name ( \"process-stop\"); \n wattrs.query_tooltip_text.connect(( mark) => {\n //print(\"tooltip query? %s\\n\", mark.name);\n return mark.name;\n });\n \n this.el.set_mark_attributes (\"WARN\", wattrs, 1);\n \n \n \n var dattrs = new Gtk.SourceMarkAttributes();\n var purple = Gdk.RGBA();\n purple.parse ( \"#EEA9FF\");\n dattrs.set_background ( purple);\n dattrs.set_icon_name ( \"process-stop\"); \n dattrs.query_tooltip_text.connect(( mark) => {\n //print(\"tooltip query? %s\\n\", mark.name);\n return mark.name;\n });\n \n this.el.set_mark_attributes (\"DEPR\", dattrs, 1);\n \n \n var gattrs = new Gtk.SourceMarkAttributes();\n var grey = Gdk.RGBA();\n grey.parse ( \"#ccc\");\n gattrs.set_background ( grey);\n \n \n this.el.set_mark_attributes (\"grey\", gattrs, 1);\n \n \n \n \n \n \n}\n ",
+ "| void nodeSelected" : "(JsRender.Node? sel) {\n \n \n \n // this is connected in widnowstate\n print(\"Roo-view - node selected\\n\");\n var buf = this.el.get_buffer();\n \n var sbuf = (Gtk.SourceBuffer) buf;\n\n \n while(Gtk.events_pending()) {\n Gtk.main_iteration();\n }\n \n \n // clear all the marks..\n Gtk.TextIter start;\n Gtk.TextIter end; \n \n sbuf.get_bounds (out start, out end);\n sbuf.remove_source_marks (start, end, \"grey\");\n \n \n if (sel == null) {\n // no highlighting..\n return;\n }\n Gtk.TextIter iter; \n sbuf.get_iter_at_line(out iter, sel.line_start);\n \n \n Gtk.TextIter cur_iter;\n sbuf.get_iter_at_offset(out cur_iter, sbuf.cursor_position);\n \n //var cur_line = cur_iter.get_line();\n //if (cur_line > sel.line_start && cur_line < sel.line_end) {\n \n //} else {\n if (this.allow_node_scroll) {\n\t\t \n \tthis.el.scroll_to_iter(iter, 0.1f, true, 0.0f, 0.5f);\n\t}\n \n \n \n for (var i = 0; i < buf.get_line_count();i++) {\n if (i < sel.line_start || i > sel.line_end) {\n \n sbuf.get_iter_at_line(out iter, i);\n sbuf.create_source_mark(null, \"grey\", iter);\n \n }\n \n }\n \n\n}\n",
+ "bool loading" : true,
+ "| string toString" : "() {\n Gtk.TextIter s;\n Gtk.TextIter e;\n this.el.get_buffer().get_start_iter(out s);\n this.el.get_buffer().get_end_iter(out e);\n var ret = this.el.get_buffer().get_text(s,e,true);\n //print(\"TO STRING? \" + ret);\n return ret;\n}\n",
+ "| void loadFile" : "( ) {\n this.loading = true;\n var buf = this.el.get_buffer();\n buf.set_text(\"\",0);\n var sbuf = (Gtk.SourceBuffer) buf;\n\n \n\n if (_this.file == null || _this.file.xtype != \"Gtk\") {\n print(\"xtype != Gtk\");\n this.loading = false;\n return;\n }\n \n var valafn = \"\";\n try { \n var regex = new Regex(\"\\\\.bjs$\");\n \n \n valafn = regex.replace(_this.file.path,_this.file.path.length , 0 , \".vala\");\n } catch (GLib.RegexError e) {\n this.loading = false;\n return;\n } \n \n\n if (!FileUtils.test(valafn,FileTest.IS_REGULAR) ) {\n print(\"File path has no errors\\n\");\n this.loading = false;\n return ;\n }\n \n string str;\n try {\n \n GLib.FileUtils.get_contents (valafn, out str);\n } catch (Error e) {\n this.loading = false;\n return ;\n }\n\n// print(\"setting str %d\\n\", str.length);\n buf.set_text(str, str.length);\n var lm = Gtk.SourceLanguageManager.get_default();\n \n //?? is javascript going to work as js?\n \n ((Gtk.SourceBuffer)(buf)) .set_language(lm.get_language(_this.file.language));\n \n \n Gtk.TextIter start;\n Gtk.TextIter end; \n \n sbuf.get_bounds (out start, out end);\n sbuf.remove_source_marks (start, end, null); // remove all marks..\n \n \n if (_this.main_window.windowstate.last_compile_result != null) {\n var obj = _this.main_window.windowstate.last_compile_result;\n this.highlightErrorsJson(\"ERR\", obj);\n this.highlightErrorsJson(\"WARN\", obj);\n this.highlightErrorsJson(\"DEPR\", obj);\t\t\t\n }\n //while (Gtk.events_pending()) {\n // Gtk.main_iteration();\n // }\n \n this.loading = false; \n}\n",
+ "* pack" : "add",
+ "xtype" : "SourceView",
+ "bool allow_node_scroll" : true,
+ "| void highlightErrorsJson" : " (string type, Json.Object obj) {\n Gtk.TextIter start;\n Gtk.TextIter end; \n \n var buf = this.el.get_buffer();\n var sbuf = (Gtk.SourceBuffer)buf;\n buf.get_bounds (out start, out end);\n \n sbuf.remove_source_marks (start, end, type);\n \n \n // we should highlight other types of errors..\n \n if (!obj.has_member(type)) {\n print(\"Return has no errors\\n\");\n return ;\n }\n var err = obj.get_object_member(type);\n \n if (_this.file == null) { \n return; // just in case the file has not loaded yet?\n }\n \n\n var valafn = \"\";\n try { \n var regex = new Regex(\"\\\\.bjs$\");\n \n \n valafn = regex.replace(_this.file.path,_this.file.path.length , 0 , \".vala\");\n } catch (GLib.RegexError e) {\n return;\n } \n\n if (!err.has_member(valafn)) {\n print(\"File path has no errors\\n\");\n return ;\n }\n var lines = err.get_object_member(valafn);\n \n \n \n var tlines = buf.get_line_count () +1;\n \n lines.foreach_member((obj, line, node) => {\n \n Gtk.TextIter iter;\n // print(\"get inter\\n\");\n var eline = int.parse(line) -1 ;\n print(\"GOT ERROR on line %s -- converted to %d\\n\", line,eline);\n \n \n if (eline > tlines || eline < 0) {\n return;\n }\n sbuf.get_iter_at_line( out iter, eline);\n //print(\"mark line\\n\");\n var msg = type + \" on line: %d - %s\".printf(eline+1, valafn);\n var ar = lines.get_array_member(line);\n for (var i = 0 ; i < ar.get_length(); i++) {\n\t\t msg += (msg.length > 0) ? \"\\n\" : \"\";\n\t\t msg += ar.get_string_element(i);\n\t }\n \n \n sbuf.create_source_mark(msg, type, iter);\n } );\n return ;\n \n \n\n\n}",
+ "$ xns" : "Gtk",
+ "gboolean show_line_numbers" : true,
+ "gboolean editable" : false
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file
--- /dev/null
+static Xcls_GtkView _GtkView;
+
+public class Xcls_GtkView : Object
+{
+ public Gtk.Box el;
+ private Xcls_GtkView _this;
+
+ public static Xcls_GtkView singleton()
+ {
+ if (_GtkView == null) {
+ _GtkView= new Xcls_GtkView();
+ }
+ return _GtkView;
+ }
+ public Xcls_notebook notebook;
+ public Xcls_label_preview label_preview;
+ public Xcls_label_code label_code;
+ public Xcls_view_layout view_layout;
+ public Xcls_container container;
+ public Xcls_sourceview sourceview;
+
+ // my vars (def)
+ public Gtk.Widget lastObj;
+ public int width;
+ public int last_search_end;
+ public Gtk.SourceSearchContext searchcontext;
+ public JsRender.JsRender file;
+ public int height;
+ public Xcls_MainWindow main_window;
+
+ // ctor
+ public Xcls_GtkView()
+ {
+ _this = this;
+ this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
+
+ // my vars (dec)
+ this.lastObj = null;
+ this.width = 0;
+ this.last_search_end = 0;
+ this.file = null;
+ this.height = 0;
+
+ // set gobject values
+ this.el.hexpand = true;
+ var child_0 = new Xcls_notebook( _this );
+ child_0.ref();
+ this.el.pack_start ( child_0.el , true,true,0 );
+
+ //listeners
+ this.el.size_allocate.connect( (aloc) => {
+
+ this.width = aloc.width;
+ this.height =aloc.height;
+ });
+ }
+
+ // user defined functions
+ public void scroll_to_line (int line) {
+ this.notebook.el.page = 1;// code preview...
+
+ GLib.Timeout.add(500, () => {
+
+
+
+
+ var buf = this.sourceview.el.get_buffer();
+
+ var sbuf = (Gtk.SourceBuffer) buf;
+
+
+ Gtk.TextIter iter;
+ sbuf.get_iter_at_line(out iter, line);
+ this.sourceview.el.scroll_to_iter(iter, 0.1f, true, 0.0f, 0.5f);
+ return false;
+ });
+
+
+ }
+ public void createThumb () {
+
+
+ if (this.file == null) {
+ return;
+ }
+ // only screenshot the gtk preview..
+ if (this.notebook.el.page > 0 ) {
+ return;
+ }
+
+
+ var filename = this.file.getIconFileName(false);
+
+ var win = this.el.get_parent_window();
+ var width = win.get_width();
+ var height = win.get_height();
+ try {
+ Gdk.Pixbuf screenshot = Gdk.pixbuf_get_from_window(win, 0, 0, width, height); // this.el.position?
+ screenshot.save(filename,"png");
+ } catch (Error e) {
+
+ }
+
+
+ return;
+
+
+
+
+
+ // should we hold until it's printed...
+
+
+
+
+
+
+
+
+
+ }
+ public void loadFile (JsRender.JsRender file)
+ {
+ this.file = null;
+
+ if (file.tree == null) {
+ return;
+ }
+ this.notebook.el.page = 0;// gtk preview
+
+
+
+ this.file = file;
+ this.sourceview.loadFile();
+ this.searchcontext = null;
+
+
+ if (this.lastObj != null) {
+ this.container.el.remove(this.lastObj);
+ }
+
+ // hide the compile view at present..
+
+
+ var w = this.width;
+ var h = this.height;
+
+ print("ALLOC SET SIZES %d, %d\n", w,h);
+
+ // set the container size min to 500/500 or 20 px less than max..
+ w = int.max (w-20, 500);
+ h = int.max (h-20, 500);
+
+ print("SET SIZES %d, %d\n", w,h);
+ _this.container.el.set_size_request(w,h);
+
+ _this.view_layout.el.set_size(w,h); // should be baded on calc.. -- see update_scrolled.
+ var rgba = Gdk.RGBA ();
+ rgba.parse ("#ccc");
+ _this.view_layout.el.override_background_color(Gtk.StateFlags.NORMAL, rgba);
+
+
+ var x = new JsRender.NodeToGtk(file.tree);
+ var obj = x.munge() as Gtk.Widget;
+ this.lastObj = null;
+ if (obj == null) {
+ return;
+ }
+ this.lastObj = obj;
+
+ this.container.el.add(obj);
+ obj.show_all();
+
+
+
+ }
+ public int search (string txt) {
+ this.notebook.el.page = 1;
+ var s = new Gtk.SourceSearchSettings();
+ var buf = (Gtk.SourceBuffer) this.sourceview.el.get_buffer();
+ this.searchcontext = new Gtk.SourceSearchContext(buf,s);
+ this.searchcontext.set_highlight(true);
+ s.set_search_text(txt);
+
+ Gtk.TextIter beg, st,en;
+
+ buf.get_start_iter(out beg);
+ this.searchcontext.forward(beg, out st, out en);
+ this.last_search_end = 0;
+ return this.searchcontext.get_occurrences_count();
+
+
+ }
+ public void forwardSearch (bool change_focus) {
+
+ if (this.searchcontext == null) {
+ return;
+ }
+ this.notebook.el.page = 1;
+ Gtk.TextIter beg, st,en, stl;
+
+ var buf = this.sourceview.el.get_buffer();
+ buf.get_iter_at_offset(out beg, this.last_search_end);
+ if (!this.searchcontext.forward(beg, out st, out en)) {
+ this.last_search_end = 0;
+ } else {
+ this.last_search_end = en.get_offset();
+ if (change_focus) {
+ this.sourceview.el.grab_focus();
+ }
+ buf.place_cursor(st);
+ var ln = st.get_line();
+ buf.get_iter_at_line(out stl,ln);
+
+ this.sourceview.el.scroll_to_iter(stl, 0.0f, true, 0.0f, 0.5f);
+ }
+
+ }
+ public class Xcls_notebook : Object
+ {
+ public Gtk.Notebook el;
+ private Xcls_GtkView _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_notebook(Xcls_GtkView _owner )
+ {
+ _this = _owner;
+ _this.notebook = this;
+ this.el = new Gtk.Notebook();
+
+ // my vars (dec)
+
+ // set gobject values
+ var child_0 = new Xcls_label_preview( _this );
+ child_0.ref();
+ var child_1 = new Xcls_label_code( _this );
+ child_1.ref();
+ var child_2 = new Xcls_ScrolledWindow5( _this );
+ child_2.ref();
+ this.el.append_page ( child_2.el , _this.label_preview.el );
+ var child_3 = new Xcls_ScrolledWindow8( _this );
+ child_3.ref();
+ this.el.append_page ( child_3.el , _this.label_code.el );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_label_preview : Object
+ {
+ public Gtk.Label el;
+ private Xcls_GtkView _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_label_preview(Xcls_GtkView _owner )
+ {
+ _this = _owner;
+ _this.label_preview = this;
+ this.el = new Gtk.Label( "Preview" );
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_label_code : Object
+ {
+ public Gtk.Label el;
+ private Xcls_GtkView _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_label_code(Xcls_GtkView _owner )
+ {
+ _this = _owner;
+ _this.label_code = this;
+ this.el = new Gtk.Label( "Preview Generated Code" );
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_ScrolledWindow5 : Object
+ {
+ public Gtk.ScrolledWindow el;
+ private Xcls_GtkView _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_ScrolledWindow5(Xcls_GtkView _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.ScrolledWindow( null, null );
+
+ // my vars (dec)
+
+ // set gobject values
+ var child_0 = new Xcls_view_layout( _this );
+ child_0.ref();
+ this.el.add ( child_0.el );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_view_layout : Object
+ {
+ public Gtk.Layout el;
+ private Xcls_GtkView _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_view_layout(Xcls_GtkView _owner )
+ {
+ _this = _owner;
+ _this.view_layout = this;
+ this.el = new Gtk.Layout( null, null );
+
+ // my vars (dec)
+
+ // set gobject values
+ var child_0 = new Xcls_container( _this );
+ child_0.ref();
+ this.el.put ( child_0.el , 10,10 );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_container : Object
+ {
+ public Gtk.Box el;
+ private Xcls_GtkView _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_container(Xcls_GtkView _owner )
+ {
+ _this = _owner;
+ _this.container = this;
+ this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ }
+
+
+
+ public class Xcls_ScrolledWindow8 : Object
+ {
+ public Gtk.ScrolledWindow el;
+ private Xcls_GtkView _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_ScrolledWindow8(Xcls_GtkView _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.ScrolledWindow( null, null );
+
+ // my vars (dec)
+
+ // set gobject values
+ var child_0 = new Xcls_sourceview( _this );
+ child_0.ref();
+ this.el.add ( child_0.el );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_sourceview : Object
+ {
+ public Gtk.SourceView el;
+ private Xcls_GtkView _this;
+
+
+ // my vars (def)
+ public bool loading;
+ public bool allow_node_scroll;
+
+ // ctor
+ public Xcls_sourceview(Xcls_GtkView _owner )
+ {
+ _this = _owner;
+ _this.sourceview = this;
+ this.el = new Gtk.SourceView();
+
+ // my vars (dec)
+ this.loading = true;
+ this.allow_node_scroll = true;
+
+ // set gobject values
+ this.el.editable = false;
+ this.el.show_line_marks = true;
+ this.el.show_line_numbers = true;
+
+ // init method
+
+ {
+
+ var description = Pango.FontDescription.from_string("monospace");
+ description.set_size(8000);
+ this.el.override_font(description);
+
+ this.loading = true;
+ var buf = this.el.get_buffer();
+ buf.notify.connect((ps) => {
+ if (this.loading) {
+ return;
+ }
+ if (ps.name != "cursor-position") {
+ return;
+ }
+ print("cursor changed : %d\n", buf.cursor_position);
+ Gtk.TextIter cpos;
+ buf.get_iter_at_offset(out cpos, buf.cursor_position);
+
+ var ln = cpos.get_line();
+
+ var node = _this.file.lineToNode(ln);
+
+ if (node == null) {
+ print("can not find node\n");
+ return;
+ }
+ var ltree = _this.main_window.windowstate.left_tree;
+ var tp = ltree.model.treePathFromNode(node);
+ print("got tree path %s\n", tp);
+ if (tp != "") {
+ this.allow_node_scroll = false;
+ print("changing cursor on tree..\n");
+ ltree.view.el.set_cursor(new Gtk.TreePath.from_string(tp), null, false);
+ // scrolling is disabled... as node selection calls scroll 10ms after it changes.
+ GLib.Timeout.add_full(GLib.Priority.DEFAULT,100 , () => {
+ this.allow_node_scroll = true;
+ return false;
+ });
+ }
+
+ // highlight the node..
+
+ });
+
+
+
+ var attrs = new Gtk.SourceMarkAttributes();
+ var pink = Gdk.RGBA();
+ pink.parse ( "pink");
+ attrs.set_background ( pink);
+ attrs.set_icon_name ( "process-stop");
+ attrs.query_tooltip_text.connect(( mark) => {
+ //print("tooltip query? %s\n", mark.name);
+ return mark.name;
+ });
+
+ this.el.set_mark_attributes ("ERR", attrs, 1);
+
+ var wattrs = new Gtk.SourceMarkAttributes();
+ var blue = Gdk.RGBA();
+ blue.parse ( "#ABF4EB");
+ wattrs.set_background ( blue);
+ wattrs.set_icon_name ( "process-stop");
+ wattrs.query_tooltip_text.connect(( mark) => {
+ //print("tooltip query? %s\n", mark.name);
+ return mark.name;
+ });
+
+ this.el.set_mark_attributes ("WARN", wattrs, 1);
+
+
+
+ var dattrs = new Gtk.SourceMarkAttributes();
+ var purple = Gdk.RGBA();
+ purple.parse ( "#EEA9FF");
+ dattrs.set_background ( purple);
+ dattrs.set_icon_name ( "process-stop");
+ dattrs.query_tooltip_text.connect(( mark) => {
+ //print("tooltip query? %s\n", mark.name);
+ return mark.name;
+ });
+
+ this.el.set_mark_attributes ("DEPR", dattrs, 1);
+
+
+ var gattrs = new Gtk.SourceMarkAttributes();
+ var grey = Gdk.RGBA();
+ grey.parse ( "#ccc");
+ gattrs.set_background ( grey);
+
+
+ this.el.set_mark_attributes ("grey", gattrs, 1);
+
+
+
+
+
+
+ }
+ }
+
+ // user defined functions
+ public void nodeSelected (JsRender.Node? sel) {
+
+
+
+ // this is connected in widnowstate
+ print("Roo-view - node selected\n");
+ var buf = this.el.get_buffer();
+
+ var sbuf = (Gtk.SourceBuffer) buf;
+
+
+ while(Gtk.events_pending()) {
+ Gtk.main_iteration();
+ }
+
+
+ // clear all the marks..
+ Gtk.TextIter start;
+ Gtk.TextIter end;
+
+ sbuf.get_bounds (out start, out end);
+ sbuf.remove_source_marks (start, end, "grey");
+
+
+ if (sel == null) {
+ // no highlighting..
+ return;
+ }
+ Gtk.TextIter iter;
+ sbuf.get_iter_at_line(out iter, sel.line_start);
+
+
+ Gtk.TextIter cur_iter;
+ sbuf.get_iter_at_offset(out cur_iter, sbuf.cursor_position);
+
+ //var cur_line = cur_iter.get_line();
+ //if (cur_line > sel.line_start && cur_line < sel.line_end) {
+
+ //} else {
+ if (this.allow_node_scroll) {
+
+ this.el.scroll_to_iter(iter, 0.1f, true, 0.0f, 0.5f);
+ }
+
+
+
+ for (var i = 0; i < buf.get_line_count();i++) {
+ if (i < sel.line_start || i > sel.line_end) {
+
+ sbuf.get_iter_at_line(out iter, i);
+ sbuf.create_source_mark(null, "grey", iter);
+
+ }
+
+ }
+
+
+ }
+ public string toString () {
+ Gtk.TextIter s;
+ Gtk.TextIter e;
+ this.el.get_buffer().get_start_iter(out s);
+ this.el.get_buffer().get_end_iter(out e);
+ var ret = this.el.get_buffer().get_text(s,e,true);
+ //print("TO STRING? " + ret);
+ return ret;
+ }
+ public void loadFile ( ) {
+ this.loading = true;
+ var buf = this.el.get_buffer();
+ buf.set_text("",0);
+ var sbuf = (Gtk.SourceBuffer) buf;
+
+
+
+ if (_this.file == null || _this.file.xtype != "Gtk") {
+ print("xtype != Gtk");
+ this.loading = false;
+ return;
+ }
+
+ var valafn = "";
+ try {
+ var regex = new Regex("\\.bjs$");
+
+
+ valafn = regex.replace(_this.file.path,_this.file.path.length , 0 , ".vala");
+ } catch (GLib.RegexError e) {
+ this.loading = false;
+ return;
+ }
+
+
+ if (!FileUtils.test(valafn,FileTest.IS_REGULAR) ) {
+ print("File path has no errors\n");
+ this.loading = false;
+ return ;
+ }
+
+ string str;
+ try {
+
+ GLib.FileUtils.get_contents (valafn, out str);
+ } catch (Error e) {
+ this.loading = false;
+ return ;
+ }
+
+ // print("setting str %d\n", str.length);
+ buf.set_text(str, str.length);
+ var lm = Gtk.SourceLanguageManager.get_default();
+
+ //?? is javascript going to work as js?
+
+ ((Gtk.SourceBuffer)(buf)) .set_language(lm.get_language(_this.file.language));
+
+
+ Gtk.TextIter start;
+ Gtk.TextIter end;
+
+ sbuf.get_bounds (out start, out end);
+ sbuf.remove_source_marks (start, end, null); // remove all marks..
+
+
+ if (_this.main_window.windowstate.last_compile_result != null) {
+ var obj = _this.main_window.windowstate.last_compile_result;
+ this.highlightErrorsJson("ERR", obj);
+ this.highlightErrorsJson("WARN", obj);
+ this.highlightErrorsJson("DEPR", obj);
+ }
+ //while (Gtk.events_pending()) {
+ // Gtk.main_iteration();
+ // }
+
+ this.loading = false;
+ }
+ public void highlightErrorsJson (string type, Json.Object obj) {
+ Gtk.TextIter start;
+ Gtk.TextIter end;
+
+ var buf = this.el.get_buffer();
+ var sbuf = (Gtk.SourceBuffer)buf;
+ buf.get_bounds (out start, out end);
+
+ sbuf.remove_source_marks (start, end, type);
+
+
+ // we should highlight other types of errors..
+
+ if (!obj.has_member(type)) {
+ print("Return has no errors\n");
+ return ;
+ }
+ var err = obj.get_object_member(type);
+
+ if (_this.file == null) {
+ return; // just in case the file has not loaded yet?
+ }
+
+
+ var valafn = "";
+ try {
+ var regex = new Regex("\\.bjs$");
+
+
+ valafn = regex.replace(_this.file.path,_this.file.path.length , 0 , ".vala");
+ } catch (GLib.RegexError e) {
+ return;
+ }
+
+ if (!err.has_member(valafn)) {
+ print("File path has no errors\n");
+ return ;
+ }
+ var lines = err.get_object_member(valafn);
+
+
+
+ var tlines = buf.get_line_count () +1;
+
+ lines.foreach_member((obj, line, node) => {
+
+ Gtk.TextIter iter;
+ // print("get inter\n");
+ var eline = int.parse(line) -1 ;
+ print("GOT ERROR on line %s -- converted to %d\n", line,eline);
+
+
+ if (eline > tlines || eline < 0) {
+ return;
+ }
+ sbuf.get_iter_at_line( out iter, eline);
+ //print("mark line\n");
+ var msg = type + " on line: %d - %s".printf(eline+1, valafn);
+ var ar = lines.get_array_member(line);
+ for (var i = 0 ; i < ar.get_length(); i++) {
+ msg += (msg.length > 0) ? "\n" : "";
+ msg += ar.get_string_element(i);
+ }
+
+
+ sbuf.create_source_mark(msg, type, iter);
+ } );
+ return ;
+
+
+
+
+ }
+ }
+
+
+
+}
--- /dev/null
+{
+ "name" : "MainWindow",
+ "parent" : "",
+ "title" : "",
+ "path" : "/home/alan/gitlive/app.Builder.js/src/Builder4/MainWindow.bjs",
+ "permname" : "",
+ "modOrder" : "",
+ "build_module" : "builder",
+ "items" : [
+ {
+ "listeners" : {
+ "delete_event" : " ( event) => {\n return false;\n} ",
+ "destroy" : "() => {\n Xcls_MainWindow.singleton().no_windows--;\n \n Resources.singleton().disconnect(_this.statusbar.handler_id);\n \n \n if (Xcls_MainWindow.singleton().no_windows < 1) {\n\n Gtk.main_quit();\n }\n}",
+ "show" : " ( ) => {\n // hide the file editing..\n \n //this.hideViewEditing();\n _this.statusbar.el.hide();\n _this.statusbar_errors.el.hide();\n _this.statusbar_warnings.el.hide();\n _this.statusbar_depricated.el.hide();\n \n \n Resources.singleton().checkResources();\n\n}",
+ "key_release_event" : " (event) => {\n \n if (this.search_entry.el.is_visible()) {\n\t\tif (event.keyval == Gdk.Key.f && (event.state & Gdk.ModifierType.CONTROL_MASK ) > 0 ) {\n\t\t print(\"SAVE: ctrl-f pressed\");\n\t\t\tthis.search_entry.el.grab_focus();\n\t\t return false;\n\t\t}\n\t\t\n\t\tif (event.keyval == Gdk.Key.g && (event.state & Gdk.ModifierType.CONTROL_MASK ) > 0 ) {\n\t\t print(\"SAVE: ctrl-g pressed\");\n\t\t\tthis.search_entry.forwardSearch(true);\n\t\t return false;\n\t\t}\n\t\t\n\t} \n\t\n\tif (event.keyval == Gdk.Key.n && (event.state & Gdk.ModifierType.CONTROL_MASK ) > 0 ) {\n\t\tprint(\"SAVE: ctrl-n pressed\");\n\t\tthis.openNewWindow();\n\t\treturn false;\n\t}\n\t\n // print(event.key.keyval)\n \n return false;\n\n} \n\n"
+ },
+ "id" : "MainWindow",
+ "default_width" : 800,
+ "* init" : " \n\t \n //this.el.show_all();\n //try {\n this.el.set_icon_name(\"roobuilder\");\n\t//} catch (Exception e) {\n\t//\tprint(\"no icon found\");\n//\t}",
+ "| void openNewWindow" : "() {\n\tXcls_MainWindow.singleton().no_windows++;\n var w = new Xcls_MainWindow();\n w.ref();\n\n w.el.show_all();\n w.initChildren();\n w.windowstate.switchState(WindowState.State.FILES);\n}\n",
+ "# Project.Project project" : "null",
+ "# string title" : "\"Application Builder\"",
+ "xtype" : "Window",
+ "# int no_windows" : 1,
+ "default_height" : 500,
+ "| void initChildren" : " () {\n // this needs putting in a better place..\n this.windowstate = new WindowState(this);\n \n\n //w.el.show_all();\n var tl = new Clutter.Timeline(6000);\n tl.set_repeat_count(-1);\n tl.start();\n tl.ref();\n\n \n\n\n\n}\n",
+ "$ xns" : "Gtk",
+ "| void show" : "() {\n \n this.el.show_all();\n\n}",
+ "# WindowState windowstate" : "null",
+ "border_width" : 0,
+ "$ type" : "Gtk.WindowType.TOPLEVEL",
+ "| void setTitle" : " (string str) {\n this.headerbar.el.set_title(this.title + \" - \" + str);\n} \n",
+ "items" : [
+ {
+ "id" : "headerbar",
+ "xtype" : "HeaderBar",
+ "* pack" : "set_titlebar",
+ "bool show_close_button" : true,
+ "$ xns" : "Gtk",
+ "string title" : "Application Builder",
+ "items" : [
+ {
+ "* pack" : "pack_start",
+ "xtype" : "Box",
+ "$ xns" : "Gtk",
+ "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
+ "items" : [
+ {
+ "bool use_popover" : false,
+ "xtype" : "MenuButton",
+ "* pack" : "add",
+ "$ xns" : "Gtk",
+ "items" : [
+ {
+ "id" : "topbarmenu",
+ "* init" : "{\n this.el.show_all();\n}\n",
+ "xtype" : "Menu",
+ "* pack" : "set_popup",
+ "$ xns" : "Gtk",
+ "items" : [
+ {
+ "listeners" : {
+ "activate" : "( ) => {\n _this.openNewWindow();\n}"
+ },
+ "string label" : "Open a new Window",
+ "* pack" : "append",
+ "xtype" : "MenuItem",
+ "$ xns" : "Gtk"
+ },
+ {
+ "* pack" : "append",
+ "xtype" : "SeparatorMenuItem",
+ "$ xns" : "Gtk"
+ },
+ {
+ "listeners" : {
+ "activate" : " ( ) => {\n Resources.singleton().fetchStart();\n}"
+ },
+ "xtype" : "MenuItem",
+ "string label" : "Download updated Resources",
+ "* pack" : "append",
+ "$ xns" : "Gtk"
+ },
+ {
+ "listeners" : {
+ "activate" : "() => {\n About.singleton().el.show();\n }"
+ },
+ "* pack" : "append",
+ "xtype" : "MenuItem",
+ "string label" : "About the Builder",
+ "$ xns" : "Gtk"
+ }
+ ]
+ },
+ {
+ "utf8 icon_name" : "help-about",
+ "* pack" : "set_image",
+ "xtype" : "Image",
+ "$ xns" : "Gtk"
+ }
+ ]
+ },
+ {
+ "listeners" : {
+ "clicked" : " ( ) => {\n _this.windowstate.switchState(WindowState.State.FILES);\n \n\n}"
+ },
+ "id" : "openbtn",
+ "* pack" : "add",
+ "xtype" : "Button",
+ "$ xns" : "Gtk",
+ "$ tooltop_text" : "\"Open File\"",
+ "items" : [
+ {
+ "xtype" : "Image",
+ "utf8 icon_name" : "document-open",
+ "* pack" : "set_image",
+ "$ xns" : "Gtk"
+ }
+ ]
+ },
+ {
+ "listeners" : {
+ "clicked" : " ( ) => {\n \n _this.windowstate.switchState(WindowState.State.PREVIEW);\n \n\n}"
+ },
+ "id" : "openbackbtn",
+ "utf8 tooltip_text" : "Back",
+ "xtype" : "Button",
+ "* pack" : "add",
+ "$ xns" : "Gtk",
+ "bool visible" : false,
+ "items" : [
+ {
+ "* pack" : "set_image",
+ "xtype" : "Image",
+ "utf8 icon_name" : "go-previous",
+ "$ xns" : "Gtk"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "id" : "vbox",
+ "* pack" : "add",
+ "xtype" : "Box",
+ "$ xns" : "Gtk",
+ "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
+ "$ homogeneous" : false,
+ "items" : [
+ {
+ "id" : "mainpane",
+ "position" : 400,
+ "* pack" : "pack_start,true,true,0",
+ "# int lastWidth" : 0,
+ "xtype" : "Paned",
+ "$ xns" : "Gtk",
+ "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
+ "items" : [
+ {
+ "id" : "leftpane",
+ "xtype" : "Box",
+ "* pack" : "add1",
+ "$ xns" : "Gtk",
+ "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
+ "items" : [
+ {
+ "id" : "editpane",
+ "xtype" : "Paned",
+ "* pack" : "pack_start,true,true,0",
+ "$ xns" : "Gtk",
+ "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
+ "items" : [
+ {
+ "id" : "tree",
+ "xtype" : "Box",
+ "* pack" : "add1",
+ "$ xns" : "Gtk",
+ "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL"
+ },
+ {
+ "id" : "props",
+ "xtype" : "Box",
+ "* pack" : "add2",
+ "$ xns" : "Gtk",
+ "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "* pack" : "add2",
+ "xtype" : "Box",
+ "$ xns" : "Gtk",
+ "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
+ "items" : [
+ {
+ "listeners" : {
+ "size_allocate" : " ( alloc) => {\n if (_this.windowstate == null) {\n return;\n }\n _this.windowstate.resizeCanvas(); \n \n}"
+ },
+ "id" : "clutterembed",
+ "* init" : " var stage = this.el.get_stage();\n stage.set_background_color( Clutter.Color.from_string(\"#000\"));\n \n \n",
+ "xtype" : "Embed",
+ "* pack" : "pack_start,true,true,0",
+ "$ xns" : "GtkClutter",
+ "items" : [
+ {
+ "id" : "rooview",
+ "* init" : "{\n \n \n this.el.add_constraint(\n new Clutter.AlignConstraint(\n _this.clutterembed.el.get_stage(), \n Clutter.AlignAxis.X_AXIS,\n 1.0f\n )\n );\n \n //this.el.set_position(100,100);\n this.el.set_pivot_point(1.0f,1.0f);\n \n this.el.set_size(_this.clutterembed.el.get_stage().width-50,\n _this.clutterembed.el.get_stage().height);\n \n}",
+ "xtype" : "Actor",
+ "* pack" : "get_stage().add_child",
+ "$ xns" : "GtkClutter"
+ },
+ {
+ "id" : "objectview",
+ "* init" : "{\n \n /*\n this.el.add_constraint(\n new Clutter.AlignConstraint(\n _this.clutterembed.el.get_stage(), \n Clutter.AlignAxis.X_AXIS,\n 0.0f\n )\n );\n */\n this.el.fixed_x = 50.0f;\n this.el.fixed_y = 0.0f;\n //this.el.set_position(100,100);\n this.el.set_pivot_point(0.0f,0.0f);\n this.el.set_scale(0.0f,1.0f);\n this.el.set_size((_this.clutterembed.el.get_stage().width-50)/2,\n _this.clutterembed.el.get_stage().height);\n \n}",
+ "xtype" : "Actor",
+ "* pack" : "get_stage().add_child",
+ "$ xns" : "GtkClutter"
+ },
+ {
+ "id" : "codeeditview",
+ "* init" : "{\n \n /*\n this.el.add_constraint(\n new Clutter.AlignConstraint(\n _this.clutterembed.el.get_stage(), \n Clutter.AlignAxis.X_AXIS,\n 0.0f\n )\n );\n */\n this.el.fixed_x = 50.0f;\n this.el.fixed_y = 0.0f;\n //this.el.set_position(100,100);\n this.el.set_pivot_point(0.0f,0.0f);\n this.el.set_scale(0.0f,1.0f);\n this.el.set_size((_this.clutterembed.el.get_stage().width-50)/2,\n _this.clutterembed.el.get_stage().height);\n \n}",
+ "xtype" : "Actor",
+ "* pack" : "get_stage().add_child",
+ "$ xns" : "GtkClutter"
+ },
+ {
+ "id" : "addpropsview",
+ "* init" : "{\n \n /*\n this.el.add_constraint(\n new Clutter.AlignConstraint(\n _this.clutterembed.el.get_stage(), \n Clutter.AlignAxis.X_AXIS,\n 0.0f\n )\n );\n */\n this.el.fixed_x = 50.0f;\n this.el.fixed_y = 0.0f;\n //this.el.set_position(100,100);\n this.el.set_pivot_point(0.0f,0.0f);\n this.el.set_scale(0.0f,1.0f);\n this.el.set_size((_this.clutterembed.el.get_stage().width-50)/2,\n _this.clutterembed.el.get_stage().height);\n \n}",
+ "xtype" : "Actor",
+ "* pack" : "get_stage().add_child",
+ "$ xns" : "GtkClutter"
+ },
+ {
+ "id" : "projecteditview",
+ "* init" : "{\n \n \n this.el.add_constraint(\n new Clutter.AlignConstraint(\n _this.clutterembed.el.get_stage(), \n Clutter.AlignAxis.X_AXIS,\n 1.0f\n )\n );\n \n //this.el.set_position(100,100);\n this.el.set_pivot_point(0.0f,0.0f);\n this.el.set_scale(1.0f,0.0f);\n this.el.set_size(_this.clutterembed.el.get_stage().width-50,\n _this.clutterembed.el.get_stage().height /2);\n \n}",
+ "xtype" : "Actor",
+ "* pack" : "get_stage().add_child",
+ "$ xns" : "GtkClutter"
+ },
+ {
+ "id" : "buttonlayout",
+ "* init" : "{\n \n this.el.add_constraint(\n new Clutter.AlignConstraint(\n _this.clutterembed.el.get_stage(), \n Clutter.AlignAxis.X_AXIS,\n 0.0f\n )\n );\n \n \n //this.el.set_position(100,100);\n this.el.set_pivot_point(0.5f,0.5f);\n this.el.set_size(50,\n _this.clutterembed.el.get_stage().height);\n \n}",
+ "xtype" : "Actor",
+ "* pack" : "get_stage().add_child",
+ "$ xns" : "Clutter",
+ "items" : [
+ {
+ "$ orientation" : "Clutter.Orientation.VERTICAL",
+ "xtype" : "BoxLayout",
+ "$ xns" : "Clutter",
+ "* prop" : "layout_manager"
+ },
+ {
+ "id" : "backbutton",
+ "* init" : "this.el.set_size(50,50);",
+ "xtype" : "Actor",
+ "* pack" : "add_child",
+ "$ xns" : "Clutter",
+ "items" : [
+ {
+ "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
+ "xtype" : "Actor",
+ "* pack" : "add_child",
+ "$ xns" : "GtkClutter",
+ "items" : [
+ {
+ "listeners" : {
+ "clicked" : " ( ) => {\n if (_this.windowstate.state == WindowState.State.FILEPROJECT) {\n \n\t _this.windowstate.switchState(WindowState.State.FILES);\n } else { \n\t _this.windowstate.switchState(WindowState.State.PREVIEW);\n }\n \n\n}"
+ },
+ "utf8 tooltip_text" : "Back",
+ "* pack" : false,
+ "xtype" : "Button",
+ "width_request" : 50,
+ "$ xns" : "Gtk",
+ "height_request" : 50,
+ "items" : [
+ {
+ "xtype" : "Image",
+ "utf8 icon_name" : "go-previous",
+ "* pack" : "set_image",
+ "$ xns" : "Gtk"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "id" : "editfilebutton",
+ "* init" : "this.el.set_size(50.0f,50.0f);",
+ "xtype" : "Actor",
+ "* pack" : "add_child",
+ "$ xns" : "Clutter",
+ "items" : [
+ {
+ "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
+ "* pack" : "add_child",
+ "xtype" : "Actor",
+ "$ xns" : "GtkClutter",
+ "items" : [
+ {
+ "listeners" : {
+ "clicked" : " ( ) => {\n \n // create a new file in project..\n if (_this.project == null || _this.windowstate.file == null) {\n return ;\n }\n _this.windowstate.file_details.show(\n _this.windowstate.file, this.el\n );\n \n return ; \n\n\n}"
+ },
+ "* pack" : false,
+ "xtype" : "Button",
+ "width_request" : 50,
+ "$ xns" : "Gtk",
+ "$ tooltip_text" : "\"File Details\"",
+ "height_request" : 50,
+ "items" : [
+ {
+ "utf8 icon_name" : "document-properties",
+ "* pack" : "set_image",
+ "xtype" : "Image",
+ "$ xns" : "Gtk"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "id" : "projecteditbutton",
+ "* init" : "this.el.set_size(50,50);",
+ "xtype" : "Actor",
+ "* pack" : "add_child",
+ "$ xns" : "Clutter",
+ "items" : [
+ {
+ "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
+ "* pack" : "add_child",
+ "xtype" : "Actor",
+ "$ xns" : "GtkClutter",
+ "items" : [
+ {
+ "listeners" : {
+ "clicked" : " ( ) => {\n \n if (_this.windowstate.state == WindowState.State.FILES) {\n \n\t _this.windowstate.switchState(WindowState.State.FILEPROJECT);\n } else {\n \t _this.windowstate.switchState(WindowState.State.PROJECT);\n\t } \n \n\n\n}"
+ },
+ "* pack" : false,
+ "xtype" : "Button",
+ "width_request" : 50,
+ "$ xns" : "Gtk",
+ "$ tooltip_text" : "\"Project Details\"",
+ "height_request" : 50,
+ "items" : [
+ {
+ "xtype" : "Image",
+ "utf8 icon_name" : "emblem-system",
+ "* pack" : "set_image",
+ "$ xns" : "Gtk"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "listeners" : {
+ "enter_event" : "( event) => {\n this.el.background_color = Clutter.Color.from_string(\"#333\");\n return false;\n}",
+ "leave_event" : "( event) => {\n this.el.background_color = Clutter.Color.from_string(\"#000\");\n return false;\n}"
+ },
+ "id" : "objectshowbutton",
+ "* init" : "this.el.set_size(50,50);",
+ "xtype" : "Actor",
+ "* pack" : "add_child",
+ "$ xns" : "Clutter",
+ "items" : [
+ {
+ "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
+ "* pack" : "add_child",
+ "xtype" : "Actor",
+ "$ xns" : "GtkClutter",
+ "items" : [
+ {
+ "listeners" : {
+ "clicked" : " ( ) => {\n \n _this.windowstate.switchState(WindowState.State.OBJECT);\n \n \n}"
+ },
+ "* pack" : false,
+ "xtype" : "Button",
+ "width_request" : 50,
+ "$ xns" : "Gtk",
+ "$ tooltip_text" : "\"Add Child Element\"",
+ "height_request" : 50,
+ "items" : [
+ {
+ "* pack" : "set_image",
+ "xtype" : "Image",
+ "utf8 icon_name" : "list-add",
+ "$ xns" : "Gtk"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "id" : "addpropbutton",
+ "* init" : "this.el.set_size(50,50);",
+ "xtype" : "Actor",
+ "* pack" : "add_child",
+ "$ xns" : "Clutter",
+ "items" : [
+ {
+ "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
+ "* pack" : "add_child",
+ "xtype" : "Actor",
+ "$ xns" : "GtkClutter",
+ "items" : [
+ {
+ "listeners" : {
+ "clicked" : " ( ) => {\n \n _this.windowstate.switchState(WindowState.State.PROP);\n \n\n}"
+ },
+ "* pack" : false,
+ "xtype" : "Button",
+ "width_request" : 50,
+ "$ xns" : "Gtk",
+ "$ tooltip_text" : "\"Add Property\"",
+ "height_request" : 50,
+ "items" : [
+ {
+ "utf8 icon_name" : "format-justify-left",
+ "* pack" : "set_image",
+ "xtype" : "Image",
+ "$ xns" : "Gtk"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "id" : "addlistenerbutton",
+ "* init" : "this.el.set_size(50,50);",
+ "xtype" : "Actor",
+ "* pack" : "add_child",
+ "$ xns" : "Clutter",
+ "items" : [
+ {
+ "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
+ "* pack" : "add_child",
+ "xtype" : "Actor",
+ "$ xns" : "GtkClutter",
+ "items" : [
+ {
+ "listeners" : {
+ "clicked" : " ( ) => {\n \n _this.windowstate.switchState(WindowState.State.LISTENER);\n \n\n\n}"
+ },
+ "* pack" : false,
+ "xtype" : "Button",
+ "width_request" : 50,
+ "$ xns" : "Gtk",
+ "$ tooltip_text" : "\"Add Event Code\"",
+ "height_request" : 50,
+ "items" : [
+ {
+ "xtype" : "Image",
+ "utf8 icon_name" : "appointment-new",
+ "* pack" : "set_image",
+ "$ xns" : "Gtk"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "id" : "addprojectbutton",
+ "* init" : "this.el.set_size(50.0f,50.0f);",
+ "xtype" : "Actor",
+ "* pack" : "add_child",
+ "$ xns" : "Clutter",
+ "items" : [
+ {
+ "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
+ "* pack" : "add_child",
+ "xtype" : "Actor",
+ "$ xns" : "GtkClutter",
+ "items" : [
+ {
+ "listeners" : {
+ "clicked" : " ( ) => {\n \n // create a new file in project..\n //Xcls_DialogNewComponent.singleton().show(\n var pe = EditProject.singleton();\n pe.el.set_transient_for(_this.el);\n pe.el.set_modal(true); \n \n var p = pe.show();\n\n if (p == null) {\n return;\n }\n \n \n _this.windowstate.left_projects.is_loaded = false; \n _this.windowstate.left_projects.load();\n _this.windowstate.left_projects.selectProject(p);\n return ; \n\n\n}"
+ },
+ "* pack" : false,
+ "xtype" : "Button",
+ "width_request" : 50,
+ "$ xns" : "Gtk",
+ "$ tooltip_text" : "\"New\\nProj.\"",
+ "height_request" : 50,
+ "items" : [
+ {
+ "utf8 icon_name" : "folder-new",
+ "* pack" : "set_image",
+ "xtype" : "Image",
+ "$ xns" : "Gtk"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "id" : "addfilebutton",
+ "* init" : "this.el.set_size(50.0f,50.0f);",
+ "xtype" : "Actor",
+ "* pack" : "add_child",
+ "$ xns" : "Clutter",
+ "items" : [
+ {
+ "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
+ "* pack" : "add_child",
+ "xtype" : "Actor",
+ "$ xns" : "GtkClutter",
+ "items" : [
+ {
+ "listeners" : {
+ "clicked" : " () => {\n // create a new file in project..\n print(\"add file selected\\n\");\n // what's the currently selected project...\n var proj = _this.windowstate.left_projects.getSelectedProject();\n \n if (proj == null) {\n\t\tprint(\"no project selected?\\n\");\n return ;\n }\n \n print(\"creating file?\");\n \n var f = JsRender.JsRender.factory(proj.xtype, proj, \"\");\n _this.project = proj;\n print(\"showing popup?\");\n _this.windowstate.file_details.show(\n f, this.el\n );\n \n \n return ; \n}"
+ },
+ "* pack" : false,
+ "xtype" : "Button",
+ "width_request" : 50,
+ "$ xns" : "Gtk",
+ "$ tooltip_text" : "\"Add File\"",
+ "height_request" : 50,
+ "items" : [
+ {
+ "* pack" : "set_image",
+ "xtype" : "Image",
+ "utf8 icon_name" : "document-new",
+ "$ xns" : "Gtk"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "id" : "delprojectbutton",
+ "* init" : "this.el.set_size(50,50);",
+ "xtype" : "Actor",
+ "* pack" : "add_child",
+ "$ xns" : "Clutter",
+ "items" : [
+ {
+ "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
+ "* pack" : "add_child",
+ "xtype" : "Actor",
+ "$ xns" : "GtkClutter",
+ "items" : [
+ {
+ "listeners" : {
+ "clicked" : " ( ) => {\n \n var cd = DialogConfirm.singleton();\n cd.el.set_transient_for(_this.el);\n cd.el.set_modal(true);\n\n var project = _this.windowstate.left_projects.getSelectedProject();\n if (project == null) {\n print(\"SKIP - no project\\n\");\n return;\n }\n \n \n if (Gtk.ResponseType.YES != cd.show(\"Confirm\", \n \"Are you sure you want to delete project %s\".printf(project.name))) {\n return;\n }\n \n\n // confirm?\n Project.Project.remove(project);\n _this.project = null;\n \n _this.windowstate.left_projects.is_loaded = false;\n _this.windowstate.left_projects.load();\n _this.windowstate.clutterfiles.clearFiles();\n\n}"
+ },
+ "* pack" : false,
+ "xtype" : "Button",
+ "width_request" : 50,
+ "$ xns" : "Gtk",
+ "$ tooltip_text" : "\"Delete Project\"",
+ "height_request" : 50,
+ "items" : [
+ {
+ "utf8 icon_name" : "user-trash",
+ "* pack" : "set_image",
+ "xtype" : "Image",
+ "$ xns" : "Gtk"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "bool homogeneous" : false,
+ "xtype" : "Box",
+ "* pack" : "pack_end,false,true,0",
+ "$ xns" : "Gtk",
+ "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
+ "items" : [
+ {
+ "* pack" : "pack_start,true,true,0",
+ "xtype" : "Label",
+ "string label" : " ",
+ "$ xns" : "Gtk"
+ },
+ {
+ "bool show_text" : true,
+ "id" : "statusbar",
+ "ulong handler_id" : "-1",
+ "* init" : "{\n this.handler_id = Resources.singleton().updateProgress.connect((pos,total) => {\n if (pos < 1) {\n this.el.hide();\n _this.mainpane.el.set_sensitive(true);\n \n return;\n }\n _this.mainpane.el.set_sensitive(false);\n this.el.show();\n this.el.set_fraction ((1.0f * pos) / (1.0f * total));\n this.el.set_text(\"Fetching Resource : %s/%s\".printf(pos.to_string(), total.to_string()));\n \n });\n}\n",
+ "xtype" : "ProgressBar",
+ "* pack" : "pack_start,true,true,0",
+ "$ xns" : "Gtk"
+ },
+ {
+ "listeners" : {
+ "key_press_event" : "(event) => {\n \n \tif (event.keyval == Gdk.Key.Return) {\n\t\tthis.forwardSearch(false);\n\t return true;\n\n\t} \n // print(event.key.keyval)\n \n return false;\n\n} ",
+ "changed" : "() => {\n\tif (this.el.text == \"\") {\n\t\t_this.search_results.el.hide();\n\t\treturn;\n\t}\n\tvar res = 0;\n\tswitch(_this.windowstate.state) {\n\t\tcase WindowState.State.CODEONLY:\n\t\tcase WindowState.State.CODE:\n\t\t\t// search the code being edited..\n\t\t\tres = _this.windowstate.code_editor.search(this.el.text);\n\t\t\t\n\t\t\tbreak;\n\t\tcase WindowState.State.PREVIEW:\n\t\t\tif (_this.windowstate.file.xtype == \"Gtk\") {\n\t\t\t\t res = _this.windowstate.window_gladeview.search(this.el.text);\n\t\t\t} else { \n\t\t\t\t res = _this.windowstate.window_rooview.search(this.el.text);\t\t\t\n\t\t\t}\n\t\t\n\t\t\n\t\t\tbreak;\n\t}\n\t_this.search_results.el.show();\n\tif (res > 0) {\n\t\t_this.search_results.el.label = \"%d Matches\".printf(res);\n\t} else {\n\t\t_this.search_results.el.label = \"No Matches\";\n\t}\n\t\t\n\t\n\t\n}\n"
+ },
+ "id" : "search_entry",
+ "* init" : "var description = Pango.FontDescription.from_string(\"monospace\");\n\tdescription.set_size(8000);\n\t this.el.override_font(description);\n\n",
+ "* pack" : "pack_start,false,true,0",
+ "xtype" : "SearchEntry",
+ "$ xns" : "Gtk",
+ "| void forwardSearch" : "(bool change_focus) {\n\tswitch(_this.windowstate.state) {\n\t\tcase WindowState.State.CODEONLY:\n\t\tcase WindowState.State.CODE:\n\t\t\t// search the code being edited..\n\t\t\t_this.windowstate.code_editor.forwardSearch(change_focus);\n\t\t\t\n\t\t\tbreak;\n\t\tcase WindowState.State.PREVIEW:\n\t\t\tif (_this.windowstate.file.xtype == \"Gtk\") {\n\t\t\t\t_this.windowstate.window_gladeview.forwardSearch(change_focus);\n\t\t\t} else { \n\t\t\t\t _this.windowstate.window_rooview.forwardSearch(change_focus);\n\t\t\t}\n\t\t\n\t\t\tbreak;\n\t}\n\t\n}\n"
+ },
+ {
+ "* pack" : "pack_end,false,true,0",
+ "xtype" : "MenuBar",
+ "$ xns" : "Gtk",
+ "items" : [
+ {
+ "listeners" : {
+ "button_press_event" : "() => {\n/*\n if (this.popup == null) {\n this.popup = new Xcls_ValaCompileErrors();\n this.popup.window = _this;\n }\n \n \n this.popup.show(this.notices, this.el);\n */\n return true;\n}"
+ },
+ "bool always_show_image" : true,
+ "id" : "search_results",
+ "Xcls_ValaCompileErrors popup" : "",
+ "string label" : "Matches",
+ "* pack" : "add",
+ "xtype" : "ImageMenuItem",
+ "$ xns" : "Gtk",
+ "items" : [
+ {
+ "* pack" : "set_image",
+ "xtype" : "Image",
+ "utf8 icon_name" : "system-search",
+ "bool sensitive" : false,
+ "$ xns" : "Gtk"
+ }
+ ]
+ },
+ {
+ "id" : "statusbar_compilestatus_label",
+ "* pack" : "add",
+ "xtype" : "MenuItem",
+ "string label" : "Compile Status:",
+ "$ xns" : "Gtk"
+ },
+ {
+ "listeners" : {
+ "button_press_event" : "() => {\n if (this.popup == null) {\n this.popup = new Xcls_ValaCompileErrors();\n this.popup.window = _this;\n }\n \n \n this.popup.show(this.notices, this.el);\n return true;\n}"
+ },
+ "bool always_show_image" : true,
+ "id" : "statusbar_errors",
+ "| void setNotices" : "(Json.Object nots, int qty) {\n this.el.show();\n this.el.label = qty.to_string() + \" Errors\";\n this.notices = nots;\n\n}\n",
+ "Xcls_ValaCompileErrors popup" : "",
+ "string label" : "Errors",
+ "* pack" : "add",
+ "xtype" : "ImageMenuItem",
+ "# Json.Object notices" : "new Json.Object() ",
+ "$ xns" : "Gtk",
+ "items" : [
+ {
+ "xtype" : "Image",
+ "utf8 icon_name" : "dialog-error",
+ "* pack" : "set_image",
+ "$ xns" : "Gtk"
+ }
+ ]
+ },
+ {
+ "listeners" : {
+ "button_press_event" : "() => {\n if (this.popup == null) {\n this.popup = new Xcls_ValaCompileErrors();\n this.popup.window = _this;\n }\n \n this.popup.show(this.notices, this.el);\n return true;\n}"
+ },
+ "bool always_show_image" : true,
+ "id" : "statusbar_warnings",
+ "| void setNotices" : "(Json.Object nots, int qty) {\n this.el.show();\n this.el.label = qty.to_string() + \" Warnings\";\n this.notices = nots;\n\n}\n",
+ "Xcls_ValaCompileErrors popup" : "",
+ "* pack" : "add",
+ "string label" : "Warnings",
+ "xtype" : "ImageMenuItem",
+ "# Json.Object notices" : "new Json.Object()",
+ "$ xns" : "Gtk",
+ "items" : [
+ {
+ "* pack" : "set_image",
+ "xtype" : "Image",
+ "utf8 icon_name" : "dialog-warning",
+ "$ xns" : "Gtk"
+ }
+ ]
+ },
+ {
+ "listeners" : {
+ "button_press_event" : "() => {\n if (this.popup == null) {\n this.popup = new Xcls_ValaCompileErrors();\n this.popup.window = _this;\n }\n \n \n this.popup.show(this.notices, this.el);\n return true;\n}"
+ },
+ "bool always_show_image" : true,
+ "id" : "statusbar_depricated",
+ "| void setNotices" : "(Json.Object nots, int qty) {\n this.el.show();\n this.el.label = qty.to_string() + \" Depricated\";\n this.notices = nots;\n\n}\n",
+ "Xcls_ValaCompileErrors popup" : "",
+ "string label" : "Depricated",
+ "* pack" : "add",
+ "xtype" : "ImageMenuItem",
+ "# Json.Object notices" : "new Json.Object()",
+ "$ xns" : "Gtk",
+ "items" : [
+ {
+ "utf8 icon_name" : "dialog-information",
+ "* pack" : "set_image",
+ "xtype" : "Image",
+ "$ xns" : "Gtk"
+ }
+ ]
+ },
+ {
+ "listeners" : {
+ "button_press_event" : "() => {\n\tif (_this.windowstate.file == null) {\n\t\treturn true;\n\t}\n\t_this.windowstate.valasource.spawnExecute(_this.windowstate.file);\n\t\n\t_this.windowstate.compile_results.show(this.el,true);\n\t\n\treturn true;\n}"
+ },
+ "bool always_show_image" : true,
+ "id" : "statusbar_run",
+ "Xcls_ValaCompileErrors popup" : "",
+ "string label" : "Run",
+ "* pack" : "add",
+ "xtype" : "ImageMenuItem",
+ "$ xns" : "Gtk",
+ "items" : [
+ {
+ "* pack" : "set_image",
+ "xtype" : "Image",
+ "utf8 icon_name" : "media-playback-start",
+ "$ xns" : "Gtk"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file
--- /dev/null
+static Xcls_MainWindow _MainWindow;
+
+public class Xcls_MainWindow : Object
+{
+ public Gtk.Window el;
+ private Xcls_MainWindow _this;
+
+ public static Xcls_MainWindow singleton()
+ {
+ if (_MainWindow == null) {
+ _MainWindow= new Xcls_MainWindow();
+ }
+ return _MainWindow;
+ }
+ public Xcls_headerbar headerbar;
+ public Xcls_topbarmenu topbarmenu;
+ public Xcls_openbtn openbtn;
+ public Xcls_openbackbtn openbackbtn;
+ public Xcls_vbox vbox;
+ public Xcls_mainpane mainpane;
+ public Xcls_leftpane leftpane;
+ public Xcls_editpane editpane;
+ public Xcls_tree tree;
+ public Xcls_props props;
+ public Xcls_clutterembed clutterembed;
+ public Xcls_rooview rooview;
+ public Xcls_objectview objectview;
+ public Xcls_codeeditview codeeditview;
+ public Xcls_addpropsview addpropsview;
+ public Xcls_projecteditview projecteditview;
+ public Xcls_buttonlayout buttonlayout;
+ public Xcls_backbutton backbutton;
+ public Xcls_editfilebutton editfilebutton;
+ public Xcls_projecteditbutton projecteditbutton;
+ public Xcls_objectshowbutton objectshowbutton;
+ public Xcls_addpropbutton addpropbutton;
+ public Xcls_addlistenerbutton addlistenerbutton;
+ public Xcls_addprojectbutton addprojectbutton;
+ public Xcls_addfilebutton addfilebutton;
+ public Xcls_delprojectbutton delprojectbutton;
+ public Xcls_statusbar statusbar;
+ public Xcls_search_entry search_entry;
+ public Xcls_search_results search_results;
+ public Xcls_statusbar_compilestatus_label statusbar_compilestatus_label;
+ public Xcls_statusbar_errors statusbar_errors;
+ public Xcls_statusbar_warnings statusbar_warnings;
+ public Xcls_statusbar_depricated statusbar_depricated;
+ public Xcls_statusbar_run statusbar_run;
+
+ // my vars (def)
+ public Project.Project project;
+ public string title;
+ public int no_windows;
+ public WindowState windowstate;
+
+ // ctor
+ public Xcls_MainWindow()
+ {
+ _this = this;
+ this.el = new Gtk.Window( Gtk.WindowType.TOPLEVEL );
+
+ // my vars (dec)
+ this.project = null;
+ this.title = "Application Builder";
+ this.no_windows = 1;
+ this.windowstate = null;
+
+ // set gobject values
+ this.el.border_width = 0;
+ this.el.default_height = 500;
+ this.el.default_width = 800;
+ var child_0 = new Xcls_headerbar( _this );
+ child_0.ref();
+ this.el.set_titlebar ( child_0.el );
+ var child_1 = new Xcls_vbox( _this );
+ child_1.ref();
+ this.el.add ( child_1.el );
+
+ // init method
+
+ //this.el.show_all();
+ //try {
+ this.el.set_icon_name("roobuilder");
+ //} catch (Exception e) {
+ // print("no icon found");
+ // }
+
+ //listeners
+ this.el.delete_event.connect( ( event) => {
+ return false;
+ });
+ this.el.destroy.connect( () => {
+ Xcls_MainWindow.singleton().no_windows--;
+
+ Resources.singleton().disconnect(_this.statusbar.handler_id);
+
+
+ if (Xcls_MainWindow.singleton().no_windows < 1) {
+
+ Gtk.main_quit();
+ }
+ });
+ this.el.show.connect( ( ) => {
+ // hide the file editing..
+
+ //this.hideViewEditing();
+ _this.statusbar.el.hide();
+ _this.statusbar_errors.el.hide();
+ _this.statusbar_warnings.el.hide();
+ _this.statusbar_depricated.el.hide();
+
+
+ Resources.singleton().checkResources();
+
+ });
+ this.el.key_release_event.connect( (event) => {
+
+ if (this.search_entry.el.is_visible()) {
+ if (event.keyval == Gdk.Key.f && (event.state & Gdk.ModifierType.CONTROL_MASK ) > 0 ) {
+ print("SAVE: ctrl-f pressed");
+ this.search_entry.el.grab_focus();
+ return false;
+ }
+
+ if (event.keyval == Gdk.Key.g && (event.state & Gdk.ModifierType.CONTROL_MASK ) > 0 ) {
+ print("SAVE: ctrl-g pressed");
+ this.search_entry.forwardSearch(true);
+ return false;
+ }
+
+ }
+
+ if (event.keyval == Gdk.Key.n && (event.state & Gdk.ModifierType.CONTROL_MASK ) > 0 ) {
+ print("SAVE: ctrl-n pressed");
+ this.openNewWindow();
+ return false;
+ }
+
+ // print(event.key.keyval)
+
+ return false;
+
+ });
+ }
+
+ // user defined functions
+ public void openNewWindow () {
+ Xcls_MainWindow.singleton().no_windows++;
+ var w = new Xcls_MainWindow();
+ w.ref();
+
+ w.el.show_all();
+ w.initChildren();
+ w.windowstate.switchState(WindowState.State.FILES);
+ }
+ public void initChildren () {
+ // this needs putting in a better place..
+ this.windowstate = new WindowState(this);
+
+
+ //w.el.show_all();
+ var tl = new Clutter.Timeline(6000);
+ tl.set_repeat_count(-1);
+ tl.start();
+ tl.ref();
+
+
+
+
+
+ }
+ public void show () {
+
+ this.el.show_all();
+
+ }
+ public void setTitle (string str) {
+ this.headerbar.el.set_title(this.title + " - " + str);
+ }
+ public class Xcls_headerbar : Object
+ {
+ public Gtk.HeaderBar el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_headerbar(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ _this.headerbar = this;
+ this.el = new Gtk.HeaderBar();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.title = "Application Builder";
+ this.el.show_close_button = true;
+ var child_0 = new Xcls_Box3( _this );
+ child_0.ref();
+ this.el.pack_start ( child_0.el );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Box3 : Object
+ {
+ public Gtk.Box el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Box3(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
+
+ // my vars (dec)
+
+ // set gobject values
+ var child_0 = new Xcls_MenuButton4( _this );
+ child_0.ref();
+ this.el.add ( child_0.el );
+ var child_1 = new Xcls_openbtn( _this );
+ child_1.ref();
+ this.el.add ( child_1.el );
+ var child_2 = new Xcls_openbackbtn( _this );
+ child_2.ref();
+ this.el.add ( child_2.el );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_MenuButton4 : Object
+ {
+ public Gtk.MenuButton el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_MenuButton4(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.MenuButton();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.use_popover = false;
+ var child_0 = new Xcls_topbarmenu( _this );
+ child_0.ref();
+ this.el.set_popup ( child_0.el );
+ var child_1 = new Xcls_Image10( _this );
+ child_1.ref();
+ this.el.set_image ( child_1.el );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_topbarmenu : Object
+ {
+ public Gtk.Menu el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_topbarmenu(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ _this.topbarmenu = this;
+ this.el = new Gtk.Menu();
+
+ // my vars (dec)
+
+ // set gobject values
+ var child_0 = new Xcls_MenuItem6( _this );
+ child_0.ref();
+ this.el.append ( child_0.el );
+ var child_1 = new Xcls_SeparatorMenuItem7( _this );
+ child_1.ref();
+ this.el.append ( child_1.el );
+ var child_2 = new Xcls_MenuItem8( _this );
+ child_2.ref();
+ this.el.append ( child_2.el );
+ var child_3 = new Xcls_MenuItem9( _this );
+ child_3.ref();
+ this.el.append ( child_3.el );
+
+ // init method
+
+ {
+ this.el.show_all();
+ }
+ }
+
+ // user defined functions
+ }
+ public class Xcls_MenuItem6 : Object
+ {
+ public Gtk.MenuItem el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_MenuItem6(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.MenuItem();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.label = "Open a new Window";
+
+ //listeners
+ this.el.activate.connect( ( ) => {
+ _this.openNewWindow();
+ });
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_SeparatorMenuItem7 : Object
+ {
+ public Gtk.SeparatorMenuItem el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_SeparatorMenuItem7(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.SeparatorMenuItem();
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_MenuItem8 : Object
+ {
+ public Gtk.MenuItem el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_MenuItem8(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.MenuItem();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.label = "Download updated Resources";
+
+ //listeners
+ this.el.activate.connect( ( ) => {
+ Resources.singleton().fetchStart();
+ });
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_MenuItem9 : Object
+ {
+ public Gtk.MenuItem el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_MenuItem9(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.MenuItem();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.label = "About the Builder";
+
+ //listeners
+ this.el.activate.connect( () => {
+ About.singleton().el.show();
+ });
+ }
+
+ // user defined functions
+ }
+
+
+ public class Xcls_Image10 : Object
+ {
+ public Gtk.Image el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Image10(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Image();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.icon_name = "help-about";
+ }
+
+ // user defined functions
+ }
+
+
+ public class Xcls_openbtn : Object
+ {
+ public Gtk.Button el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_openbtn(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ _this.openbtn = this;
+ this.el = new Gtk.Button();
+
+ // my vars (dec)
+
+ // set gobject values
+ var child_0 = new Xcls_Image12( _this );
+ child_0.ref();
+ this.el.set_image ( child_0.el );
+
+ //listeners
+ this.el.clicked.connect( ( ) => {
+ _this.windowstate.switchState(WindowState.State.FILES);
+
+
+ });
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Image12 : Object
+ {
+ public Gtk.Image el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Image12(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Image();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.icon_name = "document-open";
+ }
+
+ // user defined functions
+ }
+
+
+ public class Xcls_openbackbtn : Object
+ {
+ public Gtk.Button el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_openbackbtn(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ _this.openbackbtn = this;
+ this.el = new Gtk.Button();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.tooltip_text = "Back";
+ this.el.visible = false;
+ var child_0 = new Xcls_Image14( _this );
+ child_0.ref();
+ this.el.set_image ( child_0.el );
+
+ //listeners
+ this.el.clicked.connect( ( ) => {
+
+ _this.windowstate.switchState(WindowState.State.PREVIEW);
+
+
+ });
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Image14 : Object
+ {
+ public Gtk.Image el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Image14(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Image();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.icon_name = "go-previous";
+ }
+
+ // user defined functions
+ }
+
+
+
+
+ public class Xcls_vbox : Object
+ {
+ public Gtk.Box el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_vbox(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ _this.vbox = this;
+ this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.homogeneous = false;
+ var child_0 = new Xcls_mainpane( _this );
+ child_0.ref();
+ this.el.pack_start ( child_0.el , true,true,0 );
+ var child_1 = new Xcls_Box66( _this );
+ child_1.ref();
+ this.el.pack_end ( child_1.el , false,true,0 );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_mainpane : Object
+ {
+ public Gtk.Paned el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+ public int lastWidth;
+
+ // ctor
+ public Xcls_mainpane(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ _this.mainpane = this;
+ this.el = new Gtk.Paned( Gtk.Orientation.HORIZONTAL );
+
+ // my vars (dec)
+ this.lastWidth = 0;
+
+ // set gobject values
+ this.el.position = 400;
+ var child_0 = new Xcls_leftpane( _this );
+ child_0.ref();
+ this.el.add1 ( child_0.el );
+ var child_1 = new Xcls_Box21( _this );
+ child_1.ref();
+ this.el.add2 ( child_1.el );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_leftpane : Object
+ {
+ public Gtk.Box el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_leftpane(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ _this.leftpane = this;
+ this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
+
+ // my vars (dec)
+
+ // set gobject values
+ var child_0 = new Xcls_editpane( _this );
+ child_0.ref();
+ this.el.pack_start ( child_0.el , true,true,0 );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_editpane : Object
+ {
+ public Gtk.Paned el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_editpane(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ _this.editpane = this;
+ this.el = new Gtk.Paned( Gtk.Orientation.VERTICAL );
+
+ // my vars (dec)
+
+ // set gobject values
+ var child_0 = new Xcls_tree( _this );
+ child_0.ref();
+ this.el.add1 ( child_0.el );
+ var child_1 = new Xcls_props( _this );
+ child_1.ref();
+ this.el.add2 ( child_1.el );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_tree : Object
+ {
+ public Gtk.Box el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_tree(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ _this.tree = this;
+ this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_props : Object
+ {
+ public Gtk.Box el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_props(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ _this.props = this;
+ this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ }
+
+
+
+ public class Xcls_Box21 : Object
+ {
+ public Gtk.Box el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Box21(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
+
+ // my vars (dec)
+
+ // set gobject values
+ var child_0 = new Xcls_clutterembed( _this );
+ child_0.ref();
+ this.el.pack_start ( child_0.el , true,true,0 );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_clutterembed : Object
+ {
+ public GtkClutter.Embed el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_clutterembed(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ _this.clutterembed = this;
+ this.el = new GtkClutter.Embed();
+
+ // my vars (dec)
+
+ // set gobject values
+ var child_0 = new Xcls_rooview( _this );
+ child_0.ref();
+ this.el.get_stage().add_child ( child_0.el );
+ var child_1 = new Xcls_objectview( _this );
+ child_1.ref();
+ this.el.get_stage().add_child ( child_1.el );
+ var child_2 = new Xcls_codeeditview( _this );
+ child_2.ref();
+ this.el.get_stage().add_child ( child_2.el );
+ var child_3 = new Xcls_addpropsview( _this );
+ child_3.ref();
+ this.el.get_stage().add_child ( child_3.el );
+ var child_4 = new Xcls_projecteditview( _this );
+ child_4.ref();
+ this.el.get_stage().add_child ( child_4.el );
+ var child_5 = new Xcls_buttonlayout( _this );
+ child_5.ref();
+ this.el.get_stage().add_child ( child_5.el );
+
+ // init method
+
+ var stage = this.el.get_stage();
+ stage.set_background_color( Clutter.Color.from_string("#000"));
+
+ //listeners
+ this.el.size_allocate.connect( ( alloc) => {
+ if (_this.windowstate == null) {
+ return;
+ }
+ _this.windowstate.resizeCanvas();
+
+ });
+ }
+
+ // user defined functions
+ }
+ public class Xcls_rooview : Object
+ {
+ public GtkClutter.Actor el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_rooview(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ _this.rooview = this;
+ this.el = new GtkClutter.Actor();
+
+ // my vars (dec)
+
+ // set gobject values
+
+ // init method
+
+ {
+
+
+ this.el.add_constraint(
+ new Clutter.AlignConstraint(
+ _this.clutterembed.el.get_stage(),
+ Clutter.AlignAxis.X_AXIS,
+ 1.0f
+ )
+ );
+
+ //this.el.set_position(100,100);
+ this.el.set_pivot_point(1.0f,1.0f);
+
+ this.el.set_size(_this.clutterembed.el.get_stage().width-50,
+ _this.clutterembed.el.get_stage().height);
+
+ }
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_objectview : Object
+ {
+ public GtkClutter.Actor el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_objectview(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ _this.objectview = this;
+ this.el = new GtkClutter.Actor();
+
+ // my vars (dec)
+
+ // set gobject values
+
+ // init method
+
+ {
+
+ /*
+ this.el.add_constraint(
+ new Clutter.AlignConstraint(
+ _this.clutterembed.el.get_stage(),
+ Clutter.AlignAxis.X_AXIS,
+ 0.0f
+ )
+ );
+ */
+ this.el.fixed_x = 50.0f;
+ this.el.fixed_y = 0.0f;
+ //this.el.set_position(100,100);
+ this.el.set_pivot_point(0.0f,0.0f);
+ this.el.set_scale(0.0f,1.0f);
+ this.el.set_size((_this.clutterembed.el.get_stage().width-50)/2,
+ _this.clutterembed.el.get_stage().height);
+
+ }
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_codeeditview : Object
+ {
+ public GtkClutter.Actor el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_codeeditview(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ _this.codeeditview = this;
+ this.el = new GtkClutter.Actor();
+
+ // my vars (dec)
+
+ // set gobject values
+
+ // init method
+
+ {
+
+ /*
+ this.el.add_constraint(
+ new Clutter.AlignConstraint(
+ _this.clutterembed.el.get_stage(),
+ Clutter.AlignAxis.X_AXIS,
+ 0.0f
+ )
+ );
+ */
+ this.el.fixed_x = 50.0f;
+ this.el.fixed_y = 0.0f;
+ //this.el.set_position(100,100);
+ this.el.set_pivot_point(0.0f,0.0f);
+ this.el.set_scale(0.0f,1.0f);
+ this.el.set_size((_this.clutterembed.el.get_stage().width-50)/2,
+ _this.clutterembed.el.get_stage().height);
+
+ }
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_addpropsview : Object
+ {
+ public GtkClutter.Actor el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_addpropsview(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ _this.addpropsview = this;
+ this.el = new GtkClutter.Actor();
+
+ // my vars (dec)
+
+ // set gobject values
+
+ // init method
+
+ {
+
+ /*
+ this.el.add_constraint(
+ new Clutter.AlignConstraint(
+ _this.clutterembed.el.get_stage(),
+ Clutter.AlignAxis.X_AXIS,
+ 0.0f
+ )
+ );
+ */
+ this.el.fixed_x = 50.0f;
+ this.el.fixed_y = 0.0f;
+ //this.el.set_position(100,100);
+ this.el.set_pivot_point(0.0f,0.0f);
+ this.el.set_scale(0.0f,1.0f);
+ this.el.set_size((_this.clutterembed.el.get_stage().width-50)/2,
+ _this.clutterembed.el.get_stage().height);
+
+ }
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_projecteditview : Object
+ {
+ public GtkClutter.Actor el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_projecteditview(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ _this.projecteditview = this;
+ this.el = new GtkClutter.Actor();
+
+ // my vars (dec)
+
+ // set gobject values
+
+ // init method
+
+ {
+
+
+ this.el.add_constraint(
+ new Clutter.AlignConstraint(
+ _this.clutterembed.el.get_stage(),
+ Clutter.AlignAxis.X_AXIS,
+ 1.0f
+ )
+ );
+
+ //this.el.set_position(100,100);
+ this.el.set_pivot_point(0.0f,0.0f);
+ this.el.set_scale(1.0f,0.0f);
+ this.el.set_size(_this.clutterembed.el.get_stage().width-50,
+ _this.clutterembed.el.get_stage().height /2);
+
+ }
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_buttonlayout : Object
+ {
+ public Clutter.Actor el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_buttonlayout(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ _this.buttonlayout = this;
+ this.el = new Clutter.Actor();
+
+ // my vars (dec)
+
+ // set gobject values
+ var child_0 = new Xcls_BoxLayout29( _this );
+ child_0.ref();
+ this.el.layout_manager = child_0.el;
+ var child_1 = new Xcls_backbutton( _this );
+ child_1.ref();
+ this.el.add_child ( child_1.el );
+ var child_2 = new Xcls_editfilebutton( _this );
+ child_2.ref();
+ this.el.add_child ( child_2.el );
+ var child_3 = new Xcls_projecteditbutton( _this );
+ child_3.ref();
+ this.el.add_child ( child_3.el );
+ var child_4 = new Xcls_objectshowbutton( _this );
+ child_4.ref();
+ this.el.add_child ( child_4.el );
+ var child_5 = new Xcls_addpropbutton( _this );
+ child_5.ref();
+ this.el.add_child ( child_5.el );
+ var child_6 = new Xcls_addlistenerbutton( _this );
+ child_6.ref();
+ this.el.add_child ( child_6.el );
+ var child_7 = new Xcls_addprojectbutton( _this );
+ child_7.ref();
+ this.el.add_child ( child_7.el );
+ var child_8 = new Xcls_addfilebutton( _this );
+ child_8.ref();
+ this.el.add_child ( child_8.el );
+ var child_9 = new Xcls_delprojectbutton( _this );
+ child_9.ref();
+ this.el.add_child ( child_9.el );
+
+ // init method
+
+ {
+
+ this.el.add_constraint(
+ new Clutter.AlignConstraint(
+ _this.clutterembed.el.get_stage(),
+ Clutter.AlignAxis.X_AXIS,
+ 0.0f
+ )
+ );
+
+
+ //this.el.set_position(100,100);
+ this.el.set_pivot_point(0.5f,0.5f);
+ this.el.set_size(50,
+ _this.clutterembed.el.get_stage().height);
+
+ }
+ }
+
+ // user defined functions
+ }
+ public class Xcls_BoxLayout29 : Object
+ {
+ public Clutter.BoxLayout el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_BoxLayout29(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ this.el = new Clutter.BoxLayout();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.orientation = Clutter.Orientation.VERTICAL;
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_backbutton : Object
+ {
+ public Clutter.Actor el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_backbutton(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ _this.backbutton = this;
+ this.el = new Clutter.Actor();
+
+ // my vars (dec)
+
+ // set gobject values
+ var child_0 = new Xcls_Actor31( _this );
+ child_0.ref();
+ this.el.add_child ( child_0.el );
+
+ // init method
+
+ this.el.set_size(50,50);
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Actor31 : Object
+ {
+ public GtkClutter.Actor el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Actor31(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ this.el = new GtkClutter.Actor();
+
+ // my vars (dec)
+
+ // set gobject values
+ var child_0 = new Xcls_Button32( _this );
+ child_0.ref();
+
+ // init method
+
+ ((Gtk.Container)(this.el.get_widget())).add ( child_0.el);
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Button32 : Object
+ {
+ public Gtk.Button el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Button32(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Button();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.width_request = 50;
+ this.el.height_request = 50;
+ this.el.tooltip_text = "Back";
+ var child_0 = new Xcls_Image33( _this );
+ child_0.ref();
+ this.el.set_image ( child_0.el );
+
+ //listeners
+ this.el.clicked.connect( ( ) => {
+ if (_this.windowstate.state == WindowState.State.FILEPROJECT) {
+
+ _this.windowstate.switchState(WindowState.State.FILES);
+ } else {
+ _this.windowstate.switchState(WindowState.State.PREVIEW);
+ }
+
+
+ });
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Image33 : Object
+ {
+ public Gtk.Image el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Image33(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Image();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.icon_name = "go-previous";
+ }
+
+ // user defined functions
+ }
+
+
+
+
+ public class Xcls_editfilebutton : Object
+ {
+ public Clutter.Actor el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_editfilebutton(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ _this.editfilebutton = this;
+ this.el = new Clutter.Actor();
+
+ // my vars (dec)
+
+ // set gobject values
+ var child_0 = new Xcls_Actor35( _this );
+ child_0.ref();
+ this.el.add_child ( child_0.el );
+
+ // init method
+
+ this.el.set_size(50.0f,50.0f);
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Actor35 : Object
+ {
+ public GtkClutter.Actor el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Actor35(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ this.el = new GtkClutter.Actor();
+
+ // my vars (dec)
+
+ // set gobject values
+ var child_0 = new Xcls_Button36( _this );
+ child_0.ref();
+
+ // init method
+
+ ((Gtk.Container)(this.el.get_widget())).add ( child_0.el);
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Button36 : Object
+ {
+ public Gtk.Button el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Button36(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Button();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.width_request = 50;
+ this.el.height_request = 50;
+ this.el.tooltip_text = "File Details";
+ var child_0 = new Xcls_Image37( _this );
+ child_0.ref();
+ this.el.set_image ( child_0.el );
+
+ //listeners
+ this.el.clicked.connect( ( ) => {
+
+ // create a new file in project..
+ if (_this.project == null || _this.windowstate.file == null) {
+ return ;
+ }
+ _this.windowstate.file_details.show(
+ _this.windowstate.file, this.el
+ );
+
+ return ;
+
+
+ });
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Image37 : Object
+ {
+ public Gtk.Image el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Image37(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Image();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.icon_name = "document-properties";
+ }
+
+ // user defined functions
+ }
+
+
+
+
+ public class Xcls_projecteditbutton : Object
+ {
+ public Clutter.Actor el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_projecteditbutton(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ _this.projecteditbutton = this;
+ this.el = new Clutter.Actor();
+
+ // my vars (dec)
+
+ // set gobject values
+ var child_0 = new Xcls_Actor39( _this );
+ child_0.ref();
+ this.el.add_child ( child_0.el );
+
+ // init method
+
+ this.el.set_size(50,50);
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Actor39 : Object
+ {
+ public GtkClutter.Actor el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Actor39(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ this.el = new GtkClutter.Actor();
+
+ // my vars (dec)
+
+ // set gobject values
+ var child_0 = new Xcls_Button40( _this );
+ child_0.ref();
+
+ // init method
+
+ ((Gtk.Container)(this.el.get_widget())).add ( child_0.el);
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Button40 : Object
+ {
+ public Gtk.Button el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Button40(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Button();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.width_request = 50;
+ this.el.height_request = 50;
+ this.el.tooltip_text = "Project Details";
+ var child_0 = new Xcls_Image41( _this );
+ child_0.ref();
+ this.el.set_image ( child_0.el );
+
+ //listeners
+ this.el.clicked.connect( ( ) => {
+
+ if (_this.windowstate.state == WindowState.State.FILES) {
+
+ _this.windowstate.switchState(WindowState.State.FILEPROJECT);
+ } else {
+ _this.windowstate.switchState(WindowState.State.PROJECT);
+ }
+
+
+
+ });
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Image41 : Object
+ {
+ public Gtk.Image el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Image41(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Image();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.icon_name = "emblem-system";
+ }
+
+ // user defined functions
+ }
+
+
+
+
+ public class Xcls_objectshowbutton : Object
+ {
+ public Clutter.Actor el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_objectshowbutton(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ _this.objectshowbutton = this;
+ this.el = new Clutter.Actor();
+
+ // my vars (dec)
+
+ // set gobject values
+ var child_0 = new Xcls_Actor43( _this );
+ child_0.ref();
+ this.el.add_child ( child_0.el );
+
+ // init method
+
+ this.el.set_size(50,50);
+
+ //listeners
+ this.el.enter_event.connect( ( event) => {
+ this.el.background_color = Clutter.Color.from_string("#333");
+ return false;
+ });
+ this.el.leave_event.connect( ( event) => {
+ this.el.background_color = Clutter.Color.from_string("#000");
+ return false;
+ });
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Actor43 : Object
+ {
+ public GtkClutter.Actor el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Actor43(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ this.el = new GtkClutter.Actor();
+
+ // my vars (dec)
+
+ // set gobject values
+ var child_0 = new Xcls_Button44( _this );
+ child_0.ref();
+
+ // init method
+
+ ((Gtk.Container)(this.el.get_widget())).add ( child_0.el);
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Button44 : Object
+ {
+ public Gtk.Button el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Button44(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Button();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.width_request = 50;
+ this.el.height_request = 50;
+ this.el.tooltip_text = "Add Child Element";
+ var child_0 = new Xcls_Image45( _this );
+ child_0.ref();
+ this.el.set_image ( child_0.el );
+
+ //listeners
+ this.el.clicked.connect( ( ) => {
+
+ _this.windowstate.switchState(WindowState.State.OBJECT);
+
+
+ });
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Image45 : Object
+ {
+ public Gtk.Image el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Image45(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Image();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.icon_name = "list-add";
+ }
+
+ // user defined functions
+ }
+
+
+
+
+ public class Xcls_addpropbutton : Object
+ {
+ public Clutter.Actor el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_addpropbutton(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ _this.addpropbutton = this;
+ this.el = new Clutter.Actor();
+
+ // my vars (dec)
+
+ // set gobject values
+ var child_0 = new Xcls_Actor47( _this );
+ child_0.ref();
+ this.el.add_child ( child_0.el );
+
+ // init method
+
+ this.el.set_size(50,50);
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Actor47 : Object
+ {
+ public GtkClutter.Actor el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Actor47(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ this.el = new GtkClutter.Actor();
+
+ // my vars (dec)
+
+ // set gobject values
+ var child_0 = new Xcls_Button48( _this );
+ child_0.ref();
+
+ // init method
+
+ ((Gtk.Container)(this.el.get_widget())).add ( child_0.el);
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Button48 : Object
+ {
+ public Gtk.Button el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Button48(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Button();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.width_request = 50;
+ this.el.height_request = 50;
+ this.el.tooltip_text = "Add Property";
+ var child_0 = new Xcls_Image49( _this );
+ child_0.ref();
+ this.el.set_image ( child_0.el );
+
+ //listeners
+ this.el.clicked.connect( ( ) => {
+
+ _this.windowstate.switchState(WindowState.State.PROP);
+
+
+ });
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Image49 : Object
+ {
+ public Gtk.Image el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Image49(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Image();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.icon_name = "format-justify-left";
+ }
+
+ // user defined functions
+ }
+
+
+
+
+ public class Xcls_addlistenerbutton : Object
+ {
+ public Clutter.Actor el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_addlistenerbutton(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ _this.addlistenerbutton = this;
+ this.el = new Clutter.Actor();
+
+ // my vars (dec)
+
+ // set gobject values
+ var child_0 = new Xcls_Actor51( _this );
+ child_0.ref();
+ this.el.add_child ( child_0.el );
+
+ // init method
+
+ this.el.set_size(50,50);
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Actor51 : Object
+ {
+ public GtkClutter.Actor el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Actor51(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ this.el = new GtkClutter.Actor();
+
+ // my vars (dec)
+
+ // set gobject values
+ var child_0 = new Xcls_Button52( _this );
+ child_0.ref();
+
+ // init method
+
+ ((Gtk.Container)(this.el.get_widget())).add ( child_0.el);
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Button52 : Object
+ {
+ public Gtk.Button el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Button52(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Button();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.width_request = 50;
+ this.el.height_request = 50;
+ this.el.tooltip_text = "Add Event Code";
+ var child_0 = new Xcls_Image53( _this );
+ child_0.ref();
+ this.el.set_image ( child_0.el );
+
+ //listeners
+ this.el.clicked.connect( ( ) => {
+
+ _this.windowstate.switchState(WindowState.State.LISTENER);
+
+
+
+ });
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Image53 : Object
+ {
+ public Gtk.Image el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Image53(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Image();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.icon_name = "appointment-new";
+ }
+
+ // user defined functions
+ }
+
+
+
+
+ public class Xcls_addprojectbutton : Object
+ {
+ public Clutter.Actor el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_addprojectbutton(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ _this.addprojectbutton = this;
+ this.el = new Clutter.Actor();
+
+ // my vars (dec)
+
+ // set gobject values
+ var child_0 = new Xcls_Actor55( _this );
+ child_0.ref();
+ this.el.add_child ( child_0.el );
+
+ // init method
+
+ this.el.set_size(50.0f,50.0f);
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Actor55 : Object
+ {
+ public GtkClutter.Actor el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Actor55(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ this.el = new GtkClutter.Actor();
+
+ // my vars (dec)
+
+ // set gobject values
+ var child_0 = new Xcls_Button56( _this );
+ child_0.ref();
+
+ // init method
+
+ ((Gtk.Container)(this.el.get_widget())).add ( child_0.el);
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Button56 : Object
+ {
+ public Gtk.Button el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Button56(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Button();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.width_request = 50;
+ this.el.height_request = 50;
+ this.el.tooltip_text = "New\nProj.";
+ var child_0 = new Xcls_Image57( _this );
+ child_0.ref();
+ this.el.set_image ( child_0.el );
+
+ //listeners
+ this.el.clicked.connect( ( ) => {
+
+ // create a new file in project..
+ //Xcls_DialogNewComponent.singleton().show(
+ var pe = EditProject.singleton();
+ pe.el.set_transient_for(_this.el);
+ pe.el.set_modal(true);
+
+ var p = pe.show();
+
+ if (p == null) {
+ return;
+ }
+
+
+ _this.windowstate.left_projects.is_loaded = false;
+ _this.windowstate.left_projects.load();
+ _this.windowstate.left_projects.selectProject(p);
+ return ;
+
+
+ });
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Image57 : Object
+ {
+ public Gtk.Image el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Image57(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Image();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.icon_name = "folder-new";
+ }
+
+ // user defined functions
+ }
+
+
+
+
+ public class Xcls_addfilebutton : Object
+ {
+ public Clutter.Actor el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_addfilebutton(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ _this.addfilebutton = this;
+ this.el = new Clutter.Actor();
+
+ // my vars (dec)
+
+ // set gobject values
+ var child_0 = new Xcls_Actor59( _this );
+ child_0.ref();
+ this.el.add_child ( child_0.el );
+
+ // init method
+
+ this.el.set_size(50.0f,50.0f);
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Actor59 : Object
+ {
+ public GtkClutter.Actor el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Actor59(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ this.el = new GtkClutter.Actor();
+
+ // my vars (dec)
+
+ // set gobject values
+ var child_0 = new Xcls_Button60( _this );
+ child_0.ref();
+
+ // init method
+
+ ((Gtk.Container)(this.el.get_widget())).add ( child_0.el);
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Button60 : Object
+ {
+ public Gtk.Button el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Button60(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Button();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.width_request = 50;
+ this.el.height_request = 50;
+ this.el.tooltip_text = "Add File";
+ var child_0 = new Xcls_Image61( _this );
+ child_0.ref();
+ this.el.set_image ( child_0.el );
+
+ //listeners
+ this.el.clicked.connect( () => {
+ // create a new file in project..
+ print("add file selected\n");
+ // what's the currently selected project...
+ var proj = _this.windowstate.left_projects.getSelectedProject();
+
+ if (proj == null) {
+ print("no project selected?\n");
+ return ;
+ }
+
+ print("creating file?");
+
+ var f = JsRender.JsRender.factory(proj.xtype, proj, "");
+ _this.project = proj;
+ print("showing popup?");
+ _this.windowstate.file_details.show(
+ f, this.el
+ );
+
+
+ return ;
+ });
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Image61 : Object
+ {
+ public Gtk.Image el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Image61(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Image();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.icon_name = "document-new";
+ }
+
+ // user defined functions
+ }
+
+
+
+
+ public class Xcls_delprojectbutton : Object
+ {
+ public Clutter.Actor el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_delprojectbutton(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ _this.delprojectbutton = this;
+ this.el = new Clutter.Actor();
+
+ // my vars (dec)
+
+ // set gobject values
+ var child_0 = new Xcls_Actor63( _this );
+ child_0.ref();
+ this.el.add_child ( child_0.el );
+
+ // init method
+
+ this.el.set_size(50,50);
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Actor63 : Object
+ {
+ public GtkClutter.Actor el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Actor63(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ this.el = new GtkClutter.Actor();
+
+ // my vars (dec)
+
+ // set gobject values
+ var child_0 = new Xcls_Button64( _this );
+ child_0.ref();
+
+ // init method
+
+ ((Gtk.Container)(this.el.get_widget())).add ( child_0.el);
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Button64 : Object
+ {
+ public Gtk.Button el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Button64(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Button();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.width_request = 50;
+ this.el.height_request = 50;
+ this.el.tooltip_text = "Delete Project";
+ var child_0 = new Xcls_Image65( _this );
+ child_0.ref();
+ this.el.set_image ( child_0.el );
+
+ //listeners
+ this.el.clicked.connect( ( ) => {
+
+ var cd = DialogConfirm.singleton();
+ cd.el.set_transient_for(_this.el);
+ cd.el.set_modal(true);
+
+ var project = _this.windowstate.left_projects.getSelectedProject();
+ if (project == null) {
+ print("SKIP - no project\n");
+ return;
+ }
+
+
+ if (Gtk.ResponseType.YES != cd.show("Confirm",
+ "Are you sure you want to delete project %s".printf(project.name))) {
+ return;
+ }
+
+
+ // confirm?
+ Project.Project.remove(project);
+ _this.project = null;
+
+ _this.windowstate.left_projects.is_loaded = false;
+ _this.windowstate.left_projects.load();
+ _this.windowstate.clutterfiles.clearFiles();
+
+ });
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Image65 : Object
+ {
+ public Gtk.Image el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Image65(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Image();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.icon_name = "user-trash";
+ }
+
+ // user defined functions
+ }
+
+
+
+
+
+
+
+
+ public class Xcls_Box66 : Object
+ {
+ public Gtk.Box el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Box66(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.homogeneous = false;
+ var child_0 = new Xcls_Label67( _this );
+ child_0.ref();
+ this.el.pack_start ( child_0.el , true,true,0 );
+ var child_1 = new Xcls_statusbar( _this );
+ child_1.ref();
+ this.el.pack_start ( child_1.el , true,true,0 );
+ var child_2 = new Xcls_search_entry( _this );
+ child_2.ref();
+ this.el.pack_start ( child_2.el , false,true,0 );
+ var child_3 = new Xcls_MenuBar70( _this );
+ child_3.ref();
+ this.el.pack_end ( child_3.el , false,true,0 );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Label67 : Object
+ {
+ public Gtk.Label el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Label67(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Label( " " );
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_statusbar : Object
+ {
+ public Gtk.ProgressBar el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+ public ulong handler_id;
+
+ // ctor
+ public Xcls_statusbar(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ _this.statusbar = this;
+ this.el = new Gtk.ProgressBar();
+
+ // my vars (dec)
+ this.handler_id = -1;
+
+ // set gobject values
+ this.el.show_text = true;
+
+ // init method
+
+ {
+ this.handler_id = Resources.singleton().updateProgress.connect((pos,total) => {
+ if (pos < 1) {
+ this.el.hide();
+ _this.mainpane.el.set_sensitive(true);
+
+ return;
+ }
+ _this.mainpane.el.set_sensitive(false);
+ this.el.show();
+ this.el.set_fraction ((1.0f * pos) / (1.0f * total));
+ this.el.set_text("Fetching Resource : %s/%s".printf(pos.to_string(), total.to_string()));
+
+ });
+ }
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_search_entry : Object
+ {
+ public Gtk.SearchEntry el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_search_entry(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ _this.search_entry = this;
+ this.el = new Gtk.SearchEntry();
+
+ // my vars (dec)
+
+ // set gobject values
+
+ // init method
+
+ var description = Pango.FontDescription.from_string("monospace");
+ description.set_size(8000);
+ this.el.override_font(description);
+
+ //listeners
+ this.el.key_press_event.connect( (event) => {
+
+ if (event.keyval == Gdk.Key.Return) {
+ this.forwardSearch(false);
+ return true;
+
+ }
+ // print(event.key.keyval)
+
+ return false;
+
+ });
+ this.el.changed.connect( () => {
+ if (this.el.text == "") {
+ _this.search_results.el.hide();
+ return;
+ }
+ var res = 0;
+ switch(_this.windowstate.state) {
+ case WindowState.State.CODEONLY:
+ case WindowState.State.CODE:
+ // search the code being edited..
+ res = _this.windowstate.code_editor.search(this.el.text);
+
+ break;
+ case WindowState.State.PREVIEW:
+ if (_this.windowstate.file.xtype == "Gtk") {
+ res = _this.windowstate.window_gladeview.search(this.el.text);
+ } else {
+ res = _this.windowstate.window_rooview.search(this.el.text);
+ }
+
+
+ break;
+ }
+ _this.search_results.el.show();
+ if (res > 0) {
+ _this.search_results.el.label = "%d Matches".printf(res);
+ } else {
+ _this.search_results.el.label = "No Matches";
+ }
+
+
+
+ });
+ }
+
+ // user defined functions
+ public void forwardSearch (bool change_focus) {
+ switch(_this.windowstate.state) {
+ case WindowState.State.CODEONLY:
+ case WindowState.State.CODE:
+ // search the code being edited..
+ _this.windowstate.code_editor.forwardSearch(change_focus);
+
+ break;
+ case WindowState.State.PREVIEW:
+ if (_this.windowstate.file.xtype == "Gtk") {
+ _this.windowstate.window_gladeview.forwardSearch(change_focus);
+ } else {
+ _this.windowstate.window_rooview.forwardSearch(change_focus);
+ }
+
+ break;
+ }
+
+ }
+ }
+
+ public class Xcls_MenuBar70 : Object
+ {
+ public Gtk.MenuBar el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_MenuBar70(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.MenuBar();
+
+ // my vars (dec)
+
+ // set gobject values
+ var child_0 = new Xcls_search_results( _this );
+ child_0.ref();
+ this.el.add ( child_0.el );
+ var child_1 = new Xcls_statusbar_compilestatus_label( _this );
+ child_1.ref();
+ this.el.add ( child_1.el );
+ var child_2 = new Xcls_statusbar_errors( _this );
+ child_2.ref();
+ this.el.add ( child_2.el );
+ var child_3 = new Xcls_statusbar_warnings( _this );
+ child_3.ref();
+ this.el.add ( child_3.el );
+ var child_4 = new Xcls_statusbar_depricated( _this );
+ child_4.ref();
+ this.el.add ( child_4.el );
+ var child_5 = new Xcls_statusbar_run( _this );
+ child_5.ref();
+ this.el.add ( child_5.el );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_search_results : Object
+ {
+ public Gtk.ImageMenuItem el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+ public Xcls_ValaCompileErrors popup;
+
+ // ctor
+ public Xcls_search_results(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ _this.search_results = this;
+ this.el = new Gtk.ImageMenuItem();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.always_show_image = true;
+ this.el.label = "Matches";
+ var child_0 = new Xcls_Image72( _this );
+ child_0.ref();
+ this.el.set_image ( child_0.el );
+
+ //listeners
+ this.el.button_press_event.connect( () => {
+ /*
+ if (this.popup == null) {
+ this.popup = new Xcls_ValaCompileErrors();
+ this.popup.window = _this;
+ }
+
+
+ this.popup.show(this.notices, this.el);
+ */
+ return true;
+ });
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Image72 : Object
+ {
+ public Gtk.Image el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Image72(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Image();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.icon_name = "system-search";
+ this.el.sensitive = false;
+ }
+
+ // user defined functions
+ }
+
+
+ public class Xcls_statusbar_compilestatus_label : Object
+ {
+ public Gtk.MenuItem el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_statusbar_compilestatus_label(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ _this.statusbar_compilestatus_label = this;
+ this.el = new Gtk.MenuItem();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.label = "Compile Status:";
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_statusbar_errors : Object
+ {
+ public Gtk.ImageMenuItem el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+ public Xcls_ValaCompileErrors popup;
+ public Json.Object notices;
+
+ // ctor
+ public Xcls_statusbar_errors(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ _this.statusbar_errors = this;
+ this.el = new Gtk.ImageMenuItem();
+
+ // my vars (dec)
+ this.notices = new Json.Object() ;
+
+ // set gobject values
+ this.el.always_show_image = true;
+ this.el.label = "Errors";
+ var child_0 = new Xcls_Image75( _this );
+ child_0.ref();
+ this.el.set_image ( child_0.el );
+
+ //listeners
+ this.el.button_press_event.connect( () => {
+ if (this.popup == null) {
+ this.popup = new Xcls_ValaCompileErrors();
+ this.popup.window = _this;
+ }
+
+
+ this.popup.show(this.notices, this.el);
+ return true;
+ });
+ }
+
+ // user defined functions
+ public void setNotices (Json.Object nots, int qty) {
+ this.el.show();
+ this.el.label = qty.to_string() + " Errors";
+ this.notices = nots;
+
+ }
+ }
+ public class Xcls_Image75 : Object
+ {
+ public Gtk.Image el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Image75(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Image();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.icon_name = "dialog-error";
+ }
+
+ // user defined functions
+ }
+
+
+ public class Xcls_statusbar_warnings : Object
+ {
+ public Gtk.ImageMenuItem el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+ public Xcls_ValaCompileErrors popup;
+ public Json.Object notices;
+
+ // ctor
+ public Xcls_statusbar_warnings(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ _this.statusbar_warnings = this;
+ this.el = new Gtk.ImageMenuItem();
+
+ // my vars (dec)
+ this.notices = new Json.Object();
+
+ // set gobject values
+ this.el.always_show_image = true;
+ this.el.label = "Warnings";
+ var child_0 = new Xcls_Image77( _this );
+ child_0.ref();
+ this.el.set_image ( child_0.el );
+
+ //listeners
+ this.el.button_press_event.connect( () => {
+ if (this.popup == null) {
+ this.popup = new Xcls_ValaCompileErrors();
+ this.popup.window = _this;
+ }
+
+ this.popup.show(this.notices, this.el);
+ return true;
+ });
+ }
+
+ // user defined functions
+ public void setNotices (Json.Object nots, int qty) {
+ this.el.show();
+ this.el.label = qty.to_string() + " Warnings";
+ this.notices = nots;
+
+ }
+ }
+ public class Xcls_Image77 : Object
+ {
+ public Gtk.Image el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Image77(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Image();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.icon_name = "dialog-warning";
+ }
+
+ // user defined functions
+ }
+
+
+ public class Xcls_statusbar_depricated : Object
+ {
+ public Gtk.ImageMenuItem el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+ public Xcls_ValaCompileErrors popup;
+ public Json.Object notices;
+
+ // ctor
+ public Xcls_statusbar_depricated(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ _this.statusbar_depricated = this;
+ this.el = new Gtk.ImageMenuItem();
+
+ // my vars (dec)
+ this.notices = new Json.Object();
+
+ // set gobject values
+ this.el.always_show_image = true;
+ this.el.label = "Depricated";
+ var child_0 = new Xcls_Image79( _this );
+ child_0.ref();
+ this.el.set_image ( child_0.el );
+
+ //listeners
+ this.el.button_press_event.connect( () => {
+ if (this.popup == null) {
+ this.popup = new Xcls_ValaCompileErrors();
+ this.popup.window = _this;
+ }
+
+
+ this.popup.show(this.notices, this.el);
+ return true;
+ });
+ }
+
+ // user defined functions
+ public void setNotices (Json.Object nots, int qty) {
+ this.el.show();
+ this.el.label = qty.to_string() + " Depricated";
+ this.notices = nots;
+
+ }
+ }
+ public class Xcls_Image79 : Object
+ {
+ public Gtk.Image el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Image79(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Image();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.icon_name = "dialog-information";
+ }
+
+ // user defined functions
+ }
+
+
+ public class Xcls_statusbar_run : Object
+ {
+ public Gtk.ImageMenuItem el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+ public Xcls_ValaCompileErrors popup;
+
+ // ctor
+ public Xcls_statusbar_run(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ _this.statusbar_run = this;
+ this.el = new Gtk.ImageMenuItem();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.always_show_image = true;
+ this.el.label = "Run";
+ var child_0 = new Xcls_Image81( _this );
+ child_0.ref();
+ this.el.set_image ( child_0.el );
+
+ //listeners
+ this.el.button_press_event.connect( () => {
+ if (_this.windowstate.file == null) {
+ return true;
+ }
+ _this.windowstate.valasource.spawnExecute(_this.windowstate.file);
+
+ _this.windowstate.compile_results.show(this.el,true);
+
+ return true;
+ });
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Image81 : Object
+ {
+ public Gtk.Image el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Image81(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Image();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.icon_name = "media-playback-start";
+ }
+
+ // user defined functions
+ }
+
+
+
+
+
+}
--- /dev/null
+{
+ "name" : "PopoverFileDetails",
+ "parent" : "",
+ "title" : "",
+ "path" : "/home/alan/gitlive/app.Builder.js/src/Builder4/PopoverFileDetails.bjs",
+ "permname" : "",
+ "modOrder" : "",
+ "build_module" : "builder",
+ "items" : [
+ {
+ "listeners" : {
+ "closed" : "() => {\n if (!this.done) {\n _this.el.show();\n \n }\n} "
+ },
+ "| void updateFileFromEntry" : "() {\n\n _this.file.title = _this.title.el.get_text();\n _this.file.region = _this.region.el.get_text(); \n _this.file.parent = _this.parent.el.get_text(); \n _this.file.permname = _this.permname.el.get_text(); \n _this.file.modOrder = _this.modOrder.el.get_text();\n \n if (_this.file.name.length > 0 && _this.file.name != _this.name.el.get_text()) {\n _this.file.renameTo(_this.name.el.get_text());\n }\n // store the module...\n _this.file.build_module = \"\"; \n Gtk.TreeIter iter; \n if (_this.build_module.el.get_active_iter (out iter)) {\n Value vfname;\n this.dbmodel.el.get_value (iter, 0, out vfname);\n if (((string)vfname).length > 0) {\n _this.file.build_module = (string)vfname;\n }\n \n }\n \n \n\n \n} ",
+ "@ void success" : "(Project.Project pr, JsRender.JsRender file)",
+ "id" : "PopoverFileDetails",
+ "| void show" : "(JsRender.JsRender c, Gtk.Widget btn) \n{\n this.project = c.project;\n this.done = false;\n \n \n //if (!this.el) {\n //this.init();\n //}\n \n _this.name.el.set_text(c.name);\n _this.title.el.set_text(c.title);\n _this.parent.el.set_text(c.parent); \n _this.region.el.set_text(c.region);\n _this.modOrder.el.set_text(c.modOrder);\n _this.permname.el.set_text(c.permname);\n \n \n \n \n \n \n \n \n var ar = new Gee.ArrayList<string>();\n _this.dbmodel.loadData(ar,\"\");\n // load the modules... if relivant..\n if (this.project.xtype == \"Gtk\") {\n var p = (Project.Gtk)c.project;\n var cg = p.compilegroups;\n\n var iter = cg.map_iterator();\n while(iter.next()) {\n var key = iter.get_key();\n if (key == \"_default_\") {\n continue;\n }\n ar.add(key);\n };\n _this.dbmodel.loadData(ar, c.build_module);\n\n }\n \n \n _this.file = c;\n //console.log('show all');\n this.el.set_modal(true);\n this.el.set_relative_to(btn);\n\n this.el.set_position(Gtk.PositionType.RIGHT);\n \n // window + header?\n print(\"SHOWALL - POPIP\\n\");\n this.el.show_all();\n this.name.el.grab_focus();\n \n \n \n if (c.path.length > 0) {\n\t this.save_btn.el.set_label(\"Save\");\n\t\t_this.filetype.el.hide();\n\t\t_this.filetypelbl.el.hide();\n\t\t_this.filetype.showhide(true); // as we only work on bjs files currently\n } else {\n this.save_btn.el.set_label(\"Create\");\n _this.ftdbmodel.loadData(\"bjs\"); // fixme - need to determine type..\n\t _this.filetype.el.show();\n\t _this.filetypelbl.el.show();\n }\n \n \n //this.success = c.success;\n \n \n}",
+ "bool done" : false,
+ "# Project.Project project" : "",
+ "xtype" : "Popover",
+ "Gtk.PositionType position" : "Gtk.PositionType.RIGHT",
+ "# JsRender.JsRender file" : "null",
+ "$ xns" : "Gtk",
+ "Xcls_MainWindow mainwindow" : "null",
+ "bool modal" : true,
+ "uint border_width" : 0,
+ "items" : [
+ {
+ "bool homogeneous" : false,
+ "xtype" : "Box",
+ "$ pack" : "add",
+ "$ xns" : "Gtk",
+ "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
+ "items" : [
+ {
+ "* pack" : "pack_start,false,true,0",
+ "xtype" : "HeaderBar",
+ "$ xns" : "Gtk",
+ "string title" : "Add / Edit File"
+ },
+ {
+ "id" : "grid",
+ "int margin_right" : 4,
+ "* pack" : "pack_start,false,false,4",
+ "xtype" : "Grid",
+ "uint row_spacing" : 2,
+ "n_columns" : 2,
+ "$ xns" : "Gtk",
+ "n_rows" : 7,
+ "$ homogeneous" : true,
+ "int margin_left" : 4,
+ "items" : [
+ {
+ "label" : "File type",
+ "id" : "filetypelbl",
+ "xalign" : 0.90000000000000002,
+ "* pack" : "attach,0,0,1,1",
+ "xtype" : "Label",
+ "$ justify" : "Gtk.Justification.RIGHT",
+ "x_options" : 4,
+ "$ xns" : "Gtk"
+ },
+ {
+ "listeners" : {
+ "changed" : "() => {\n\tGtk.TreeIter iter;\n\tbool is_bjs = true;\n\tif (this.el.get_active_iter(out iter)) {\n\t\tValue vfname;\n\t\t_this.ftdbmodel.el.get_value (iter, 0, out vfname);\n\t\t is_bjs = ((string)vfname) == \"bjs\";\n\t}\n \n \n // directory is only available for non-bjs \n this.showhide(is_bjs);\n\n\n}\n"
+ },
+ "id" : "filetype",
+ "* init" : "this.el.add_attribute(_this.ftdbcellrenderer.el , \"markup\", 1 );",
+ "* pack" : "attach,1,0,1,1",
+ "xtype" : "ComboBox",
+ "| void showhide" : "(bool is_bjs) {\n\tfor (var i = 2; i < 9;i++) {\n\t\tvar el = _this.grid.el.get_child_at(0,i);\n\t\t\n\t\tvar showhide= is_bjs;\n\t\tif (i> 7) {\n\t\t\tshowhide = !showhide;\n\t\t}\n\t\t\n\t\tif (showhide) {\n\t\t el.show();\n\t\t} else {\n\t\t\tel.hide();\n\t\t}\n\t\t el = _this.grid.el.get_child_at(1,i);\n\t\tif (showhide) {\n\t\t el.show();\n\t\t} else {\n\t\t\tel.hide();\n\t\t} \n }\n // load up the directories\n //??? why can we not create bjs files in other directories??\n\tif (!is_bjs && _this.file.path.length < 1) {\n\t\t_this.dirmodel.loadData();\n\t\t\n\t\t\n\t}\n \n \n}\n",
+ "$ xns" : "Gtk",
+ "items" : [
+ {
+ "id" : "ftdbcellrenderer",
+ "* pack" : "pack_start,true",
+ "xtype" : "CellRendererText",
+ "$ xns" : "Gtk"
+ },
+ {
+ "id" : "ftdbmodel",
+ "* pack" : "set_model",
+ "xtype" : "ListStore",
+ "$ columns" : "typeof(string),typeof(string)",
+ "n_columns" : 2,
+ "$ xns" : "Gtk",
+ "| void loadData" : " (string cur) {\n this.el.clear(); \n Gtk.TreeIter iter;\n var el = this.el;\n \n /// el.append(out iter);\n \n \n // el.set_value(iter, 0, \"\");\n // el.set_value(iter, 1, \"aaa - Just add Element - aaa\");\n\n el.append(out iter);\n\n \n el.set_value(iter, 0, \"bjs\");\n el.set_value(iter, 1, \"User Interface File (bjs)\");\n _this.filetype.el.set_active_iter(iter);\n\n el.append(out iter);\n \n el.set_value(iter, 0, \"vala\");\n el.set_value(iter, 1, \"Vala\");\n\tif (cur == \"vala\") {\n\t _this.filetype.el.set_active_iter(iter);\n }\n\n\n\n el.append(out iter);\n \n el.set_value(iter, 0, \"js\");\n el.set_value(iter, 1, \"Javascript\");\n\n\tif (cur == \"js\") {\n\t _this.filetype.el.set_active_iter(iter);\n }\n\n el.append(out iter);\n \n el.set_value(iter, 0, \"css\");\n el.set_value(iter, 1, \"CSS\");\n\n\tif (cur == \"css\") {\n\t _this.filetype.el.set_active_iter(iter);\n }\n \n}\n"
+ }
+ ]
+ },
+ {
+ "label" : "Component Name",
+ "xalign" : 0.90000000000000002,
+ "* pack" : "attach,0,1,1,1",
+ "xtype" : "Label",
+ "$ justify" : "Gtk.Justification.RIGHT",
+ "x_options" : 4,
+ "$ xns" : "Gtk"
+ },
+ {
+ "id" : "name",
+ "$ visible" : true,
+ "xtype" : "Entry",
+ "* pack" : "attach,1,1,1,1",
+ "$ xns" : "Gtk"
+ },
+ {
+ "label" : "Title",
+ "$ visible" : true,
+ "xalign" : 0.90000000000000002,
+ "* pack" : "attach,0,2,1,1",
+ "xtype" : "Label",
+ "$ justify" : "Gtk.Justification.RIGHT",
+ "x_options" : 4,
+ "$ xns" : "Gtk"
+ },
+ {
+ "id" : "title",
+ "$ visible" : true,
+ "xtype" : "Entry",
+ "* pack" : "attach,1,2,1,1",
+ "$ xns" : "Gtk"
+ },
+ {
+ "label" : "Region",
+ "$ visible" : true,
+ "tooltip_text" : "center, north, south, east, west",
+ "xalign" : 0.90000000000000002,
+ "* pack" : "attach,0,3,1,1",
+ "xtype" : "Label",
+ "$ justify" : "Gtk.Justification.RIGHT",
+ "x_options" : 4,
+ "$ xns" : "Gtk"
+ },
+ {
+ "id" : "region",
+ "$ visible" : true,
+ "xtype" : "Entry",
+ "* pack" : "attach,1,3,1,1",
+ "$ xns" : "Gtk"
+ },
+ {
+ "label" : "Parent Name",
+ "$ visible" : true,
+ "xalign" : 0.90000000000000002,
+ "* pack" : "attach,0,4,1,1",
+ "xtype" : "Label",
+ "$ justify" : "Gtk.Justification.RIGHT",
+ "x_options" : 4,
+ "$ xns" : "Gtk"
+ },
+ {
+ "id" : "parent",
+ "$ visible" : true,
+ "xtype" : "Entry",
+ "* pack" : "attach,1,4,1,1",
+ "$ xns" : "Gtk"
+ },
+ {
+ "label" : "Permission Name",
+ "$ visible" : true,
+ "xalign" : 0.90000000000000002,
+ "* pack" : "attach,0,5,1,1",
+ "xtype" : "Label",
+ "$ justify" : "Gtk.Justification.RIGHT",
+ "x_options" : 4,
+ "$ xns" : "Gtk"
+ },
+ {
+ "id" : "permname",
+ "$ visible" : true,
+ "xtype" : "Entry",
+ "* pack" : "attach,1,5,1,1",
+ "$ xns" : "Gtk"
+ },
+ {
+ "label" : "Order (for tabs)",
+ "$ visible" : true,
+ "xalign" : 0.90000000000000002,
+ "* pack" : "attach,0,6,1,1",
+ "xtype" : "Label",
+ "$ justify" : "Gtk.Justification.RIGHT",
+ "x_options" : 4,
+ "$ xns" : "Gtk"
+ },
+ {
+ "id" : "modOrder",
+ "$ visible" : true,
+ "xtype" : "Entry",
+ "* pack" : "attach,1,6,1,1",
+ "$ xns" : "Gtk"
+ },
+ {
+ "label" : "Module to build (Vala only)",
+ "$ visible" : true,
+ "xalign" : 0.90000000000000002,
+ "* pack" : "attach,0,7,1,1",
+ "xtype" : "Label",
+ "$ justify" : "Gtk.Justification.RIGHT",
+ "x_options" : 4,
+ "$ xns" : "Gtk"
+ },
+ {
+ "id" : "build_module",
+ "* init" : "this.el.add_attribute(_this.dbcellrenderer.el , \"markup\", 1 );",
+ "* pack" : "attach,1,7,1,1",
+ "xtype" : "ComboBox",
+ "$ xns" : "Gtk",
+ "items" : [
+ {
+ "id" : "dbcellrenderer",
+ "xtype" : "CellRendererText",
+ "* pack" : "pack_start,true",
+ "$ xns" : "Gtk"
+ },
+ {
+ "id" : "dbmodel",
+ "xtype" : "ListStore",
+ "* pack" : "set_model",
+ "$ columns" : "typeof(string),typeof(string)",
+ "n_columns" : 2,
+ "$ xns" : "Gtk",
+ "| void loadData" : " (Gee.ArrayList<string> data, string cur) {\n this.el.clear(); \n Gtk.TreeIter iter;\n var el = this.el;\n \n /// el.append(out iter);\n \n \n // el.set_value(iter, 0, \"\");\n // el.set_value(iter, 1, \"aaa - Just add Element - aaa\");\n\n el.append(out iter);\n\n \n el.set_value(iter, 0, \"\");\n el.set_value(iter, 1, \"-- select a module --\");\n _this.build_module.el.set_active_iter(iter);\n \n for (var i = 0; i < data.size;i++) {\n \n\n el.append(out iter);\n \n el.set_value(iter, 0, data.get(i));\n el.set_value(iter, 1, data.get(i));\n \n if (data.get(i) == cur) {\n _this.build_module.el.set_active_iter(iter);\n }\n \n }\n this.el.set_sort_column_id(0, Gtk.SortType.ASCENDING); \n \n}\n"
+ }
+ ]
+ },
+ {
+ "label" : "Directory",
+ "$ visible" : true,
+ "xalign" : 0.90000000000000002,
+ "* pack" : "attach,0,8",
+ "xtype" : "Label",
+ "$ justify" : "Gtk.Justification.RIGHT",
+ "x_options" : 4,
+ "$ xns" : "Gtk"
+ },
+ {
+ "id" : "dir",
+ "* init" : "this.el.add_attribute(_this.dircellrenderer.el , \"markup\", 1 );",
+ "* pack" : "attach,1,8",
+ "xtype" : "ComboBox",
+ "$ xns" : "Gtk",
+ "items" : [
+ {
+ "id" : "dircellrenderer",
+ "* pack" : "pack_start,true",
+ "xtype" : "CellRendererText",
+ "$ xns" : "Gtk"
+ },
+ {
+ "id" : "dirmodel",
+ "* pack" : "set_model",
+ "xtype" : "ListStore",
+ "$ columns" : "typeof(string),typeof(string)",
+ "n_columns" : 2,
+ "$ xns" : "Gtk",
+ "| void loadData" : " () {\n\t\n\t\n \n this.el.clear(); \n \n if (!(_this.project is Project.Gtk)) {\n\t\treturn;\n\t}\n var sd = ((Project.Gtk)_this.project).sourcedirs();\n \n Gtk.TreeIter iter;\n var el = this.el;\n \n /// el.append(out iter);\n \n \n // el.set_value(iter, 0, \"\");\n // el.set_value(iter, 1, \"aaa - Just add Element - aaa\");\n\n// el.append(out iter);\n\n \n// el.set_value(iter, 0, \"\");\n // el.set_value(iter, 1, \"-- select a directoyr --\");\n //_this.build_module.el.set_active_iter(iter);\n \n for (var i = 0; i < sd.length;i++) {\n \n\n el.append(out iter);\n \n el.set_value(iter, 0, sd[i]);\n el.set_value(iter, 1, sd[i]);\n \n //if (data.get(i) == cur) {\n // _this.build_module.el.set_active_iter(iter);\n // }\n \n }\n // this.el.set_sort_column_id(0, Gtk.SortType.ASCENDING); \n \n}\n"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "int margin_bottom" : 4,
+ "int margin_right" : 4,
+ "* pack" : "pack_end,false,true,0",
+ "xtype" : "HButtonBox",
+ "$ xns" : "Gtk",
+ "int margin_left" : 4,
+ "items" : [
+ {
+ "listeners" : {
+ "clicked" : "() => { \n\n _this.done = true;\n _this.el.hide(); \n}"
+ },
+ "string label" : "Cancel",
+ "* pack" : "add",
+ "xtype" : "Button",
+ "$ xns" : "Gtk"
+ },
+ {
+ "listeners" : {
+ "clicked" : "( ) => { \n\n \n\n\n\tif (_this.name.el.get_text().length < 1) {\n\t StandardErrorDialog.show(\n\t _this.mainwindow.el,\n\t \"You have to set Component name \"\n\t );\n\t \n\t return;\n\t}\n\t// what does this do?\n\t\n\tvar isNew = _this.file.name.length > 0 ? false : true;\n\t/*\n\tif (!isNew && this.file.name != _this.name.el.get_text()) {\n\t Xcls_StandardErrorDialog.singleton().show(\n\t this.el,\n\t \"Sorry changing names does not work yet. \"\n\t );\n\t \n\t return;\n\t}\n\t*/\n\t \n\t\n \n\t// FIXME - this may be more complicated...\n\t//for (var i in this.def) {\n\t// this.file[i] = this.get(i).el.get_text();\n\t//}\n\n\tif (!isNew) {\n\t try {\n\t _this.updateFileFromEntry();\n\t } catch( JsRender.Error.RENAME_FILE_EXISTS er) {\n\t Xcls_StandardErrorDialog.singleton().show(\n\t _this.mainwindow.el,\n\t \"The name you used already exists \"\n\t );\n\t return;\n\t \n\t }\n\n\t _this.done = true;\n\t _this.file.save();\n\t _this.el.hide();\n\t return;\n\t}\n\t\n\t// ---------------- NEW FILES...\n\tGtk.TreeIter iter;\n\n\tif (!_this.filetype.el.get_active_iter(out iter)) {\n\t\t// should not happen...\n\t\t// so we are jut going to return without \n\t\tStandardErrorDialog.show(\n\t _this.mainwindow.el,\n\t \"You must select a file type. \"\n\t );\n\t return;\n\t\t \n\t}\n\t\n\t\n\tvar fn = _this.name.el.get_text();\n\t\n\tValue ftypename;\n\t_this.ftdbmodel.el.get_value (iter, 0, out ftypename);\n\tvar ext = ((string)ftypename);\n\tvar dir = _this.project.firstPath(); \n\tif (ext != \"bjs\") {\n\t \n\t\tif (!_this.dir.el.get_active_iter(out iter)) {\n\t\t\t// should not happen...\n\t\t\t// so we are jut going to return without \n\t\t\tStandardErrorDialog.show(\n\t\t\t _this.mainwindow.el,\n\t\t\t \"You must select a directory \"\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\t\tValue vdir;\n\t\t_this.dirmodel.el.get_value (iter, 0, out vdir);\n\t\tdir = (string)vdir;\n\t}\n\t\n\tvar targetfile = dir + \"/\" + fn;\n\t\n\t// strip the file type off the end..\n\t\n\t\n var rx = new GLib.Regex(\"\\\\.\" + ext + \"$\",GLib.RegexCompileFlags.CASELESS);\n targetfile = rx.replace(targetfile, targetfile.length, 0, \"\"); \n \n\tif (GLib.FileUtils.test(targetfile + \".\" + ext, GLib.FileTest.EXISTS)) {\n\t Xcls_StandardErrorDialog.singleton().show(\n\t _this.mainwindow.el,\n\t \"That file already exists\"\n\t ); \n\t return;\n\t}\n \n var f = JsRender.JsRender.factory(\n\t\text == \"bjs\" ? _this.file.project.xtype : \"PlainFile\", \n\t\t_this.file.project, \n\t\ttargetfile + \".\" + ext);\n\n\t_this.file = f;\n\t\n\n\t\n\t_this.updateFileFromEntry();\n\t_this.file.loaded = true;\n\t_this.file.save();\n\tif (ext == \"bjs\") {\n\t\t_this.file.project.addFile(_this.file);\n\t}\n\t\n \n\t// what about .js ?\n _this.done = true;\n\t_this.el.hide();\n\n// hopefull this will work with bjs files..\n\t\n\t_this.success(_this.project, _this.file);\n \n}"
+ },
+ "id" : "save_btn",
+ "xtype" : "Button",
+ "* pack" : "add",
+ "string label" : "Save",
+ "$ xns" : "Gtk"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file
--- /dev/null
+static Xcls_PopoverFileDetails _PopoverFileDetails;
+
+public class Xcls_PopoverFileDetails : Object
+{
+ public Gtk.Popover el;
+ private Xcls_PopoverFileDetails _this;
+
+ public static Xcls_PopoverFileDetails singleton()
+ {
+ if (_PopoverFileDetails == null) {
+ _PopoverFileDetails= new Xcls_PopoverFileDetails();
+ }
+ return _PopoverFileDetails;
+ }
+ public Xcls_grid grid;
+ public Xcls_filetypelbl filetypelbl;
+ public Xcls_filetype filetype;
+ public Xcls_ftdbcellrenderer ftdbcellrenderer;
+ public Xcls_ftdbmodel ftdbmodel;
+ public Xcls_name name;
+ public Xcls_title title;
+ public Xcls_region region;
+ public Xcls_parent parent;
+ public Xcls_permname permname;
+ public Xcls_modOrder modOrder;
+ public Xcls_build_module build_module;
+ public Xcls_dbcellrenderer dbcellrenderer;
+ public Xcls_dbmodel dbmodel;
+ public Xcls_dir dir;
+ public Xcls_dircellrenderer dircellrenderer;
+ public Xcls_dirmodel dirmodel;
+ public Xcls_save_btn save_btn;
+
+ // my vars (def)
+ public signal void success (Project.Project pr, JsRender.JsRender file);
+ public bool done;
+ public Project.Project project;
+ public JsRender.JsRender file;
+ public Xcls_MainWindow mainwindow;
+
+ // ctor
+ public Xcls_PopoverFileDetails()
+ {
+ _this = this;
+ this.el = new Gtk.Popover( null );
+
+ // my vars (dec)
+ this.done = false;
+ this.file = null;
+ this.mainwindow = null;
+
+ // set gobject values
+ this.el.border_width = 0;
+ this.el.modal = true;
+ this.el.position = Gtk.PositionType.RIGHT;
+ var child_0 = new Xcls_Box2( _this );
+ child_0.ref();
+ this.el.add ( child_0.el );
+
+ //listeners
+ this.el.closed.connect( () => {
+ if (!this.done) {
+ _this.el.show();
+
+ }
+ });
+ }
+
+ // user defined functions
+ public void updateFileFromEntry () {
+
+ _this.file.title = _this.title.el.get_text();
+ _this.file.region = _this.region.el.get_text();
+ _this.file.parent = _this.parent.el.get_text();
+ _this.file.permname = _this.permname.el.get_text();
+ _this.file.modOrder = _this.modOrder.el.get_text();
+
+ if (_this.file.name.length > 0 && _this.file.name != _this.name.el.get_text()) {
+ _this.file.renameTo(_this.name.el.get_text());
+ }
+ // store the module...
+ _this.file.build_module = "";
+ Gtk.TreeIter iter;
+ if (_this.build_module.el.get_active_iter (out iter)) {
+ Value vfname;
+ this.dbmodel.el.get_value (iter, 0, out vfname);
+ if (((string)vfname).length > 0) {
+ _this.file.build_module = (string)vfname;
+ }
+
+ }
+
+
+
+
+ }
+ public void show (JsRender.JsRender c, Gtk.Widget btn)
+ {
+ this.project = c.project;
+ this.done = false;
+
+
+ //if (!this.el) {
+ //this.init();
+ //}
+
+ _this.name.el.set_text(c.name);
+ _this.title.el.set_text(c.title);
+ _this.parent.el.set_text(c.parent);
+ _this.region.el.set_text(c.region);
+ _this.modOrder.el.set_text(c.modOrder);
+ _this.permname.el.set_text(c.permname);
+
+
+
+
+
+
+
+
+ var ar = new Gee.ArrayList<string>();
+ _this.dbmodel.loadData(ar,"");
+ // load the modules... if relivant..
+ if (this.project.xtype == "Gtk") {
+ var p = (Project.Gtk)c.project;
+ var cg = p.compilegroups;
+
+ var iter = cg.map_iterator();
+ while(iter.next()) {
+ var key = iter.get_key();
+ if (key == "_default_") {
+ continue;
+ }
+ ar.add(key);
+ };
+ _this.dbmodel.loadData(ar, c.build_module);
+
+ }
+
+
+ _this.file = c;
+ //console.log('show all');
+ this.el.set_modal(true);
+ this.el.set_relative_to(btn);
+
+ this.el.set_position(Gtk.PositionType.RIGHT);
+
+ // window + header?
+ print("SHOWALL - POPIP\n");
+ this.el.show_all();
+ this.name.el.grab_focus();
+
+
+
+ if (c.path.length > 0) {
+ this.save_btn.el.set_label("Save");
+ _this.filetype.el.hide();
+ _this.filetypelbl.el.hide();
+ _this.filetype.showhide(true); // as we only work on bjs files currently
+ } else {
+ this.save_btn.el.set_label("Create");
+ _this.ftdbmodel.loadData("bjs"); // fixme - need to determine type..
+ _this.filetype.el.show();
+ _this.filetypelbl.el.show();
+ }
+
+
+ //this.success = c.success;
+
+
+ }
+ public class Xcls_Box2 : Object
+ {
+ public Gtk.Box el;
+ private Xcls_PopoverFileDetails _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Box2(Xcls_PopoverFileDetails _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.homogeneous = false;
+ var child_0 = new Xcls_HeaderBar3( _this );
+ child_0.ref();
+ this.el.pack_start ( child_0.el , false,true,0 );
+ var child_1 = new Xcls_grid( _this );
+ child_1.ref();
+ this.el.pack_start ( child_1.el , false,false,4 );
+ var child_2 = new Xcls_HButtonBox29( _this );
+ child_2.ref();
+ this.el.pack_end ( child_2.el , false,true,0 );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_HeaderBar3 : Object
+ {
+ public Gtk.HeaderBar el;
+ private Xcls_PopoverFileDetails _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_HeaderBar3(Xcls_PopoverFileDetails _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.HeaderBar();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.title = "Add / Edit File";
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_grid : Object
+ {
+ public Gtk.Grid el;
+ private Xcls_PopoverFileDetails _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_grid(Xcls_PopoverFileDetails _owner )
+ {
+ _this = _owner;
+ _this.grid = this;
+ this.el = new Gtk.Grid();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.margin_right = 4;
+ this.el.margin_left = 4;
+ this.el.row_spacing = 2;
+ var child_0 = new Xcls_filetypelbl( _this );
+ child_0.ref();
+ this.el.attach ( child_0.el , 0,0,1,1 );
+ var child_1 = new Xcls_filetype( _this );
+ child_1.ref();
+ this.el.attach ( child_1.el , 1,0,1,1 );
+ var child_2 = new Xcls_Label9( _this );
+ child_2.ref();
+ this.el.attach ( child_2.el , 0,1,1,1 );
+ var child_3 = new Xcls_name( _this );
+ child_3.ref();
+ this.el.attach ( child_3.el , 1,1,1,1 );
+ var child_4 = new Xcls_Label11( _this );
+ child_4.ref();
+ this.el.attach ( child_4.el , 0,2,1,1 );
+ var child_5 = new Xcls_title( _this );
+ child_5.ref();
+ this.el.attach ( child_5.el , 1,2,1,1 );
+ var child_6 = new Xcls_Label13( _this );
+ child_6.ref();
+ this.el.attach ( child_6.el , 0,3,1,1 );
+ var child_7 = new Xcls_region( _this );
+ child_7.ref();
+ this.el.attach ( child_7.el , 1,3,1,1 );
+ var child_8 = new Xcls_Label15( _this );
+ child_8.ref();
+ this.el.attach ( child_8.el , 0,4,1,1 );
+ var child_9 = new Xcls_parent( _this );
+ child_9.ref();
+ this.el.attach ( child_9.el , 1,4,1,1 );
+ var child_10 = new Xcls_Label17( _this );
+ child_10.ref();
+ this.el.attach ( child_10.el , 0,5,1,1 );
+ var child_11 = new Xcls_permname( _this );
+ child_11.ref();
+ this.el.attach ( child_11.el , 1,5,1,1 );
+ var child_12 = new Xcls_Label19( _this );
+ child_12.ref();
+ this.el.attach ( child_12.el , 0,6,1,1 );
+ var child_13 = new Xcls_modOrder( _this );
+ child_13.ref();
+ this.el.attach ( child_13.el , 1,6,1,1 );
+ var child_14 = new Xcls_Label21( _this );
+ child_14.ref();
+ this.el.attach ( child_14.el , 0,7,1,1 );
+ var child_15 = new Xcls_build_module( _this );
+ child_15.ref();
+ this.el.attach ( child_15.el , 1,7,1,1 );
+ var child_16 = new Xcls_Label25( _this );
+ child_16.ref();
+ this.el.attach ( child_16.el , 0,8 );
+ var child_17 = new Xcls_dir( _this );
+ child_17.ref();
+ this.el.attach ( child_17.el , 1,8 );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_filetypelbl : Object
+ {
+ public Gtk.Label el;
+ private Xcls_PopoverFileDetails _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_filetypelbl(Xcls_PopoverFileDetails _owner )
+ {
+ _this = _owner;
+ _this.filetypelbl = this;
+ this.el = new Gtk.Label( "File type" );
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.justify = Gtk.Justification.RIGHT;
+ this.el.xalign = 0.900000f;
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_filetype : Object
+ {
+ public Gtk.ComboBox el;
+ private Xcls_PopoverFileDetails _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_filetype(Xcls_PopoverFileDetails _owner )
+ {
+ _this = _owner;
+ _this.filetype = this;
+ this.el = new Gtk.ComboBox();
+
+ // my vars (dec)
+
+ // set gobject values
+ var child_0 = new Xcls_ftdbcellrenderer( _this );
+ child_0.ref();
+ this.el.pack_start ( child_0.el , true );
+ var child_1 = new Xcls_ftdbmodel( _this );
+ child_1.ref();
+ this.el.set_model ( child_1.el );
+
+ // init method
+
+ this.el.add_attribute(_this.ftdbcellrenderer.el , "markup", 1 );
+
+ //listeners
+ this.el.changed.connect( () => {
+ Gtk.TreeIter iter;
+ bool is_bjs = true;
+ if (this.el.get_active_iter(out iter)) {
+ Value vfname;
+ _this.ftdbmodel.el.get_value (iter, 0, out vfname);
+ is_bjs = ((string)vfname) == "bjs";
+ }
+
+
+ // directory is only available for non-bjs
+ this.showhide(is_bjs);
+
+
+ });
+ }
+
+ // user defined functions
+ public void showhide (bool is_bjs) {
+ for (var i = 2; i < 9;i++) {
+ var el = _this.grid.el.get_child_at(0,i);
+
+ var showhide= is_bjs;
+ if (i> 7) {
+ showhide = !showhide;
+ }
+
+ if (showhide) {
+ el.show();
+ } else {
+ el.hide();
+ }
+ el = _this.grid.el.get_child_at(1,i);
+ if (showhide) {
+ el.show();
+ } else {
+ el.hide();
+ }
+ }
+ // load up the directories
+ //??? why can we not create bjs files in other directories??
+ if (!is_bjs && _this.file.path.length < 1) {
+ _this.dirmodel.loadData();
+
+
+ }
+
+
+ }
+ }
+ public class Xcls_ftdbcellrenderer : Object
+ {
+ public Gtk.CellRendererText el;
+ private Xcls_PopoverFileDetails _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_ftdbcellrenderer(Xcls_PopoverFileDetails _owner )
+ {
+ _this = _owner;
+ _this.ftdbcellrenderer = this;
+ this.el = new Gtk.CellRendererText();
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_ftdbmodel : Object
+ {
+ public Gtk.ListStore el;
+ private Xcls_PopoverFileDetails _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_ftdbmodel(Xcls_PopoverFileDetails _owner )
+ {
+ _this = _owner;
+ _this.ftdbmodel = this;
+ this.el = new Gtk.ListStore( 2, typeof(string),typeof(string) );
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ public void loadData (string cur) {
+ this.el.clear();
+ Gtk.TreeIter iter;
+ var el = this.el;
+
+ /// el.append(out iter);
+
+
+ // el.set_value(iter, 0, "");
+ // el.set_value(iter, 1, "aaa - Just add Element - aaa");
+
+ el.append(out iter);
+
+
+ el.set_value(iter, 0, "bjs");
+ el.set_value(iter, 1, "User Interface File (bjs)");
+ _this.filetype.el.set_active_iter(iter);
+
+ el.append(out iter);
+
+ el.set_value(iter, 0, "vala");
+ el.set_value(iter, 1, "Vala");
+ if (cur == "vala") {
+ _this.filetype.el.set_active_iter(iter);
+ }
+
+
+
+ el.append(out iter);
+
+ el.set_value(iter, 0, "js");
+ el.set_value(iter, 1, "Javascript");
+
+ if (cur == "js") {
+ _this.filetype.el.set_active_iter(iter);
+ }
+
+ el.append(out iter);
+
+ el.set_value(iter, 0, "css");
+ el.set_value(iter, 1, "CSS");
+
+ if (cur == "css") {
+ _this.filetype.el.set_active_iter(iter);
+ }
+
+ }
+ }
+
+
+ public class Xcls_Label9 : Object
+ {
+ public Gtk.Label el;
+ private Xcls_PopoverFileDetails _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Label9(Xcls_PopoverFileDetails _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Label( "Component Name" );
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.justify = Gtk.Justification.RIGHT;
+ this.el.xalign = 0.900000f;
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_name : Object
+ {
+ public Gtk.Entry el;
+ private Xcls_PopoverFileDetails _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_name(Xcls_PopoverFileDetails _owner )
+ {
+ _this = _owner;
+ _this.name = this;
+ this.el = new Gtk.Entry();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.visible = true;
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_Label11 : Object
+ {
+ public Gtk.Label el;
+ private Xcls_PopoverFileDetails _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Label11(Xcls_PopoverFileDetails _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Label( "Title" );
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.justify = Gtk.Justification.RIGHT;
+ this.el.xalign = 0.900000f;
+ this.el.visible = true;
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_title : Object
+ {
+ public Gtk.Entry el;
+ private Xcls_PopoverFileDetails _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_title(Xcls_PopoverFileDetails _owner )
+ {
+ _this = _owner;
+ _this.title = this;
+ this.el = new Gtk.Entry();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.visible = true;
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_Label13 : Object
+ {
+ public Gtk.Label el;
+ private Xcls_PopoverFileDetails _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Label13(Xcls_PopoverFileDetails _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Label( "Region" );
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.justify = Gtk.Justification.RIGHT;
+ this.el.xalign = 0.900000f;
+ this.el.tooltip_text = "center, north, south, east, west";
+ this.el.visible = true;
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_region : Object
+ {
+ public Gtk.Entry el;
+ private Xcls_PopoverFileDetails _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_region(Xcls_PopoverFileDetails _owner )
+ {
+ _this = _owner;
+ _this.region = this;
+ this.el = new Gtk.Entry();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.visible = true;
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_Label15 : Object
+ {
+ public Gtk.Label el;
+ private Xcls_PopoverFileDetails _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Label15(Xcls_PopoverFileDetails _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Label( "Parent Name" );
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.justify = Gtk.Justification.RIGHT;
+ this.el.xalign = 0.900000f;
+ this.el.visible = true;
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_parent : Object
+ {
+ public Gtk.Entry el;
+ private Xcls_PopoverFileDetails _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_parent(Xcls_PopoverFileDetails _owner )
+ {
+ _this = _owner;
+ _this.parent = this;
+ this.el = new Gtk.Entry();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.visible = true;
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_Label17 : Object
+ {
+ public Gtk.Label el;
+ private Xcls_PopoverFileDetails _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Label17(Xcls_PopoverFileDetails _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Label( "Permission Name" );
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.justify = Gtk.Justification.RIGHT;
+ this.el.xalign = 0.900000f;
+ this.el.visible = true;
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_permname : Object
+ {
+ public Gtk.Entry el;
+ private Xcls_PopoverFileDetails _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_permname(Xcls_PopoverFileDetails _owner )
+ {
+ _this = _owner;
+ _this.permname = this;
+ this.el = new Gtk.Entry();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.visible = true;
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_Label19 : Object
+ {
+ public Gtk.Label el;
+ private Xcls_PopoverFileDetails _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Label19(Xcls_PopoverFileDetails _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Label( "Order (for tabs)" );
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.justify = Gtk.Justification.RIGHT;
+ this.el.xalign = 0.900000f;
+ this.el.visible = true;
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_modOrder : Object
+ {
+ public Gtk.Entry el;
+ private Xcls_PopoverFileDetails _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_modOrder(Xcls_PopoverFileDetails _owner )
+ {
+ _this = _owner;
+ _this.modOrder = this;
+ this.el = new Gtk.Entry();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.visible = true;
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_Label21 : Object
+ {
+ public Gtk.Label el;
+ private Xcls_PopoverFileDetails _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Label21(Xcls_PopoverFileDetails _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Label( "Module to build (Vala only)" );
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.justify = Gtk.Justification.RIGHT;
+ this.el.xalign = 0.900000f;
+ this.el.visible = true;
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_build_module : Object
+ {
+ public Gtk.ComboBox el;
+ private Xcls_PopoverFileDetails _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_build_module(Xcls_PopoverFileDetails _owner )
+ {
+ _this = _owner;
+ _this.build_module = this;
+ this.el = new Gtk.ComboBox();
+
+ // my vars (dec)
+
+ // set gobject values
+ var child_0 = new Xcls_dbcellrenderer( _this );
+ child_0.ref();
+ this.el.pack_start ( child_0.el , true );
+ var child_1 = new Xcls_dbmodel( _this );
+ child_1.ref();
+ this.el.set_model ( child_1.el );
+
+ // init method
+
+ this.el.add_attribute(_this.dbcellrenderer.el , "markup", 1 );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_dbcellrenderer : Object
+ {
+ public Gtk.CellRendererText el;
+ private Xcls_PopoverFileDetails _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_dbcellrenderer(Xcls_PopoverFileDetails _owner )
+ {
+ _this = _owner;
+ _this.dbcellrenderer = this;
+ this.el = new Gtk.CellRendererText();
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_dbmodel : Object
+ {
+ public Gtk.ListStore el;
+ private Xcls_PopoverFileDetails _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_dbmodel(Xcls_PopoverFileDetails _owner )
+ {
+ _this = _owner;
+ _this.dbmodel = this;
+ this.el = new Gtk.ListStore( 2, typeof(string),typeof(string) );
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ public void loadData (Gee.ArrayList<string> data, string cur) {
+ this.el.clear();
+ Gtk.TreeIter iter;
+ var el = this.el;
+
+ /// el.append(out iter);
+
+
+ // el.set_value(iter, 0, "");
+ // el.set_value(iter, 1, "aaa - Just add Element - aaa");
+
+ el.append(out iter);
+
+
+ el.set_value(iter, 0, "");
+ el.set_value(iter, 1, "-- select a module --");
+ _this.build_module.el.set_active_iter(iter);
+
+ for (var i = 0; i < data.size;i++) {
+
+
+ el.append(out iter);
+
+ el.set_value(iter, 0, data.get(i));
+ el.set_value(iter, 1, data.get(i));
+
+ if (data.get(i) == cur) {
+ _this.build_module.el.set_active_iter(iter);
+ }
+
+ }
+ this.el.set_sort_column_id(0, Gtk.SortType.ASCENDING);
+
+ }
+ }
+
+
+ public class Xcls_Label25 : Object
+ {
+ public Gtk.Label el;
+ private Xcls_PopoverFileDetails _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Label25(Xcls_PopoverFileDetails _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Label( "Directory" );
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.justify = Gtk.Justification.RIGHT;
+ this.el.xalign = 0.900000f;
+ this.el.visible = true;
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_dir : Object
+ {
+ public Gtk.ComboBox el;
+ private Xcls_PopoverFileDetails _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_dir(Xcls_PopoverFileDetails _owner )
+ {
+ _this = _owner;
+ _this.dir = this;
+ this.el = new Gtk.ComboBox();
+
+ // my vars (dec)
+
+ // set gobject values
+ var child_0 = new Xcls_dircellrenderer( _this );
+ child_0.ref();
+ this.el.pack_start ( child_0.el , true );
+ var child_1 = new Xcls_dirmodel( _this );
+ child_1.ref();
+ this.el.set_model ( child_1.el );
+
+ // init method
+
+ this.el.add_attribute(_this.dircellrenderer.el , "markup", 1 );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_dircellrenderer : Object
+ {
+ public Gtk.CellRendererText el;
+ private Xcls_PopoverFileDetails _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_dircellrenderer(Xcls_PopoverFileDetails _owner )
+ {
+ _this = _owner;
+ _this.dircellrenderer = this;
+ this.el = new Gtk.CellRendererText();
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_dirmodel : Object
+ {
+ public Gtk.ListStore el;
+ private Xcls_PopoverFileDetails _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_dirmodel(Xcls_PopoverFileDetails _owner )
+ {
+ _this = _owner;
+ _this.dirmodel = this;
+ this.el = new Gtk.ListStore( 2, typeof(string),typeof(string) );
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ public void loadData () {
+
+
+
+ this.el.clear();
+
+ if (!(_this.project is Project.Gtk)) {
+ return;
+ }
+ var sd = ((Project.Gtk)_this.project).sourcedirs();
+
+ Gtk.TreeIter iter;
+ var el = this.el;
+
+ /// el.append(out iter);
+
+
+ // el.set_value(iter, 0, "");
+ // el.set_value(iter, 1, "aaa - Just add Element - aaa");
+
+ // el.append(out iter);
+
+
+ // el.set_value(iter, 0, "");
+ // el.set_value(iter, 1, "-- select a directoyr --");
+ //_this.build_module.el.set_active_iter(iter);
+
+ for (var i = 0; i < sd.length;i++) {
+
+
+ el.append(out iter);
+
+ el.set_value(iter, 0, sd[i]);
+ el.set_value(iter, 1, sd[i]);
+
+ //if (data.get(i) == cur) {
+ // _this.build_module.el.set_active_iter(iter);
+ // }
+
+ }
+ // this.el.set_sort_column_id(0, Gtk.SortType.ASCENDING);
+
+ }
+ }
+
+
+
+ public class Xcls_HButtonBox29 : Object
+ {
+ public Gtk.HButtonBox el;
+ private Xcls_PopoverFileDetails _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_HButtonBox29(Xcls_PopoverFileDetails _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.HButtonBox();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.margin_right = 4;
+ this.el.margin_left = 4;
+ this.el.margin_bottom = 4;
+ var child_0 = new Xcls_Button30( _this );
+ child_0.ref();
+ this.el.add ( child_0.el );
+ var child_1 = new Xcls_save_btn( _this );
+ child_1.ref();
+ this.el.add ( child_1.el );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Button30 : Object
+ {
+ public Gtk.Button el;
+ private Xcls_PopoverFileDetails _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Button30(Xcls_PopoverFileDetails _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Button();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.label = "Cancel";
+
+ //listeners
+ this.el.clicked.connect( () => {
+
+ _this.done = true;
+ _this.el.hide();
+ });
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_save_btn : Object
+ {
+ public Gtk.Button el;
+ private Xcls_PopoverFileDetails _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_save_btn(Xcls_PopoverFileDetails _owner )
+ {
+ _this = _owner;
+ _this.save_btn = this;
+ this.el = new Gtk.Button();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.label = "Save";
+
+ //listeners
+ this.el.clicked.connect( ( ) => {
+
+
+
+
+ if (_this.name.el.get_text().length < 1) {
+ StandardErrorDialog.show(
+ _this.mainwindow.el,
+ "You have to set Component name "
+ );
+
+ return;
+ }
+ // what does this do?
+
+ var isNew = _this.file.name.length > 0 ? false : true;
+ /*
+ if (!isNew && this.file.name != _this.name.el.get_text()) {
+ Xcls_StandardErrorDialog.singleton().show(
+ this.el,
+ "Sorry changing names does not work yet. "
+ );
+
+ return;
+ }
+ */
+
+
+
+ // FIXME - this may be more complicated...
+ //for (var i in this.def) {
+ // this.file[i] = this.get(i).el.get_text();
+ //}
+
+ if (!isNew) {
+ try {
+ _this.updateFileFromEntry();
+ } catch( JsRender.Error.RENAME_FILE_EXISTS er) {
+ Xcls_StandardErrorDialog.singleton().show(
+ _this.mainwindow.el,
+ "The name you used already exists "
+ );
+ return;
+
+ }
+
+ _this.done = true;
+ _this.file.save();
+ _this.el.hide();
+ return;
+ }
+
+ // ---------------- NEW FILES...
+ Gtk.TreeIter iter;
+
+ if (!_this.filetype.el.get_active_iter(out iter)) {
+ // should not happen...
+ // so we are jut going to return without
+ StandardErrorDialog.show(
+ _this.mainwindow.el,
+ "You must select a file type. "
+ );
+ return;
+
+ }
+
+
+ var fn = _this.name.el.get_text();
+
+ Value ftypename;
+ _this.ftdbmodel.el.get_value (iter, 0, out ftypename);
+ var ext = ((string)ftypename);
+ var dir = _this.project.firstPath();
+ if (ext != "bjs") {
+
+ if (!_this.dir.el.get_active_iter(out iter)) {
+ // should not happen...
+ // so we are jut going to return without
+ StandardErrorDialog.show(
+ _this.mainwindow.el,
+ "You must select a directory "
+ );
+ return;
+ }
+ Value vdir;
+ _this.dirmodel.el.get_value (iter, 0, out vdir);
+ dir = (string)vdir;
+ }
+
+ var targetfile = dir + "/" + fn;
+
+ // strip the file type off the end..
+
+
+ var rx = new GLib.Regex("\\." + ext + "$",GLib.RegexCompileFlags.CASELESS);
+ targetfile = rx.replace(targetfile, targetfile.length, 0, "");
+
+ if (GLib.FileUtils.test(targetfile + "." + ext, GLib.FileTest.EXISTS)) {
+ Xcls_StandardErrorDialog.singleton().show(
+ _this.mainwindow.el,
+ "That file already exists"
+ );
+ return;
+ }
+
+ var f = JsRender.JsRender.factory(
+ ext == "bjs" ? _this.file.project.xtype : "PlainFile",
+ _this.file.project,
+ targetfile + "." + ext);
+
+ _this.file = f;
+
+
+
+ _this.updateFileFromEntry();
+ _this.file.loaded = true;
+ _this.file.save();
+ if (ext == "bjs") {
+ _this.file.project.addFile(_this.file);
+ }
+
+
+ // what about .js ?
+ _this.done = true;
+ _this.el.hide();
+
+ // hopefull this will work with bjs files..
+
+ _this.success(_this.project, _this.file);
+
+ });
+ }
+
+ // user defined functions
+ }
+
+
+
+}
--- /dev/null
+{
+ "name" : "PopoverProperty",
+ "parent" : "",
+ "title" : "",
+ "path" : "/home/alan/gitlive/app.Builder.js/src/Builder4/PopoverProperty.bjs",
+ "permname" : "",
+ "modOrder" : "",
+ "build_module" : "builder",
+ "items" : [
+ {
+ "listeners" : {
+ "closed" : "() => {\n \n \n var newtext = \"\";\n Gtk.TreeIter citer;\n GLib.Value gval;\n this.kflag.el.get_active_iter(out citer);\n this.dbmodel.el.get_value(citer, 0, out gval);\n \n var ktype = this.ktype.el.get_text().strip(); \n var kname = this.kname.el.get_text().strip(); \n newtext += ((string)gval).strip(); \n newtext += ktype.length > 0 && newtext.length > 0 ? \" \" :\"\";\n newtext += ktype;\n newtext += kname.length > 0 && newtext.length > 0 ? \" \" :\"\";\n newtext += kname;\n \n \n var lp = _this.mainwindow.windowstate.left_props;\n \n switch(this.key_type) {\n case \"listener\":\n var ov = _this.node.listeners.get(this.old_keyname);\n _this.node.listeners.set(newtext, ov);\n if (this.old_keyname != newtext) { \n\t _this.node.listeners.unset(this.old_keyname);\n }\n \n \n lp.updateKey(this.old_keyname, this.key_type, newtext);\n \n break;\n case \"props\":\n var ov = _this.node.props.get(this.old_keyname);\n _this.node.props.set(newtext, ov);\n\t\t\tif (this.old_keyname != newtext) { \n\t _this.node.props.unset(this.old_keyname);\n }\n lp.updateKey(this.old_keyname, this.key_type, newtext);\n break;\n }\n \n \n \n} "
+ },
+ "string old_keyname" : "",
+ "@ void success" : "(Project.Project pr, JsRender.JsRender file)",
+ "id" : "PopoverProperty",
+ "| void show" : "(Gtk.Widget btn, JsRender.Node node, string key_type, string key) \n\t{\n\t\n\tstring kname = \"\", kflag = \"\", ktype = \"\";\n\tif (key.length > 0) {\n\t\tnode.normalize_key( key, out kname, out kflag, out ktype);\n\t}\n\n\tif (key_type == \"listener\") {\n\t\tthis.header.el.title = \"Modify Event Listener\";\n\t} else {\n\t\tthis.header.el.title = \"Modify Property\";\n\t}\n\t\n\tthis.key_type = key_type;\n\tthis.old_keyname = key;\n\tthis.node = node;\n\t\n\t_this.kname.el.set_text(kname);\n\t_this.ktype.el.set_text(ktype);\n\t\n\t_this.dbmodel.loadData(kflag);\n\t// does node have this property...\n\n\n\t \n\n\t_this.node = node;\n\t//console.log('show all');\n\tthis.el.set_modal(true);\n\tthis.el.set_relative_to(btn);\n\n\tthis.el.set_position(Gtk.PositionType.TOP);\n\n\t// window + header?\n\t print(\"SHOWALL - POPIP\\n\");\n\tthis.el.show_all();\n\tthis.kname.el.grab_focus();\n\n\t//this.success = c.success;\n \n}",
+ "bool done" : false,
+ "| void updateNodeFromValues" : "() {\n\n /* _this.file.title = _this.title.el.get_text();\n _this.file.region = _this.region.el.get_text(); \n _this.file.parent = _this.parent.el.get_text(); \n _this.file.permname = _this.permname.el.get_text(); \n _this.file.modOrder = _this.modOrder.el.get_text();\n \n if (_this.file.name.length > 0 && _this.file.name != _this.name.el.get_text()) {\n _this.file.renameTo(_this.name.el.get_text());\n }\n // store the module...\n _this.file.build_module = \"\"; \n Gtk.TreeIter iter; \n if (_this.build_module.el.get_active_iter (out iter)) {\n Value vfname;\n this.dbmodel.el.get_value (iter, 0, out vfname);\n if (((string)vfname).length > 0) {\n _this.file.build_module = (string)vfname;\n }\n \n }\n */\n \n \n\n \n} ",
+ "xtype" : "Popover",
+ "Gtk.PositionType position" : "Gtk.PositionType.RIGHT",
+ "$ xns" : "Gtk",
+ "Xcls_MainWindow mainwindow" : "null",
+ "bool modal" : true,
+ "string key_type" : "",
+ "uint border_width" : 0,
+ "JsRender.Node node" : "",
+ "items" : [
+ {
+ "bool homogeneous" : false,
+ "$ pack" : "add",
+ "xtype" : "Box",
+ "$ xns" : "Gtk",
+ "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
+ "items" : [
+ {
+ "id" : "header",
+ "* pack" : "pack_start,false,true,0",
+ "xtype" : "HeaderBar",
+ "$ xns" : "Gtk",
+ "string title" : "Modify / Create Property"
+ },
+ {
+ "int margin_right" : 4,
+ "* pack" : "pack_start,false,false,4",
+ "xtype" : "Table",
+ "uint row_spacing" : 2,
+ "n_columns" : 2,
+ "$ xns" : "Gtk",
+ "n_rows" : 3,
+ "$ homogeneous" : true,
+ "int margin_left" : 4,
+ "items" : [
+ {
+ "label" : "Special Flags",
+ "xalign" : 0.90000000000000002,
+ "* pack" : "attach_defaults,0,1,0,1",
+ "xtype" : "Label",
+ "$ justify" : "Gtk.Justification.RIGHT",
+ "x_options" : 4,
+ "$ xns" : "Gtk"
+ },
+ {
+ "id" : "kflag",
+ "* init" : "this.el.add_attribute(_this.dbcellrenderer.el , \"markup\", 1 );",
+ "* pack" : "attach_defaults,1,2,0,1",
+ "xtype" : "ComboBox",
+ "$ xns" : "Gtk",
+ "items" : [
+ {
+ "id" : "dbcellrenderer",
+ "xtype" : "CellRendererText",
+ "* pack" : "pack_start,true",
+ "$ xns" : "Gtk"
+ },
+ {
+ "id" : "dbmodel",
+ "xtype" : "ListStore",
+ "* pack" : "set_model",
+ "$ columns" : "typeof(string),typeof(string)",
+ "n_columns" : 2,
+ "$ xns" : "Gtk",
+ "| void loadData" : " (string kflag) {\n this.el.clear(); \n Gtk.TreeIter iter;\n var el = this.el;\n \n \n // vala signal.. '@'\n // raw value '$'\n // user defined property '#'\n // user defined method '|'\n // special property '*' => prop |args|ctor|init\n \n \n \n /// el.append(out iter);\n \n \n // el.set_value(iter, 0, \"\");\n // el.set_value(iter, 1, \"aaa - Just add Element - aaa\");\n\n el.append(out iter);\n el.set(iter, 0, \"\", 1, \"Normal Property\", -1);\n\t \n\tif (_this.mainwindow.windowstate.file.xtype == \"Gtk\") {\n\t\tel.append(out iter);\n\t\tel.set(iter, 0, \"$\", 1, \"($) Raw Property (not escaped)\", -1);\n\t\t \n\t\t\n\t\tel.append(out iter);\n\t\tel.set(iter, 0, \"#\", 1, \"(#) User defined property\", -1);\n\t\t \n\t\tel.append(out iter);\n\t\tel.set(iter, 0, \"|\", 1, \"(|) User defined method\", -1);\n\t\t \n\t\tel.append(out iter);\n\t\tel.set(iter, 0, \"*\", 1, \"(*) Special property (eg. prop | args | ctor | init )\", -1);\n\t\t \n\t\t\n\t\tel.append(out iter);\n\t el.set(iter, 0, \"@\", 1, \"(@) Vala Signal\", -1);\n\t\t \n\t\t\n\t} else { \n\t\t// javascript\n\t\tel.append(out iter);\n\t\tel.set(iter, 0, \"$\", 1, \"($) Raw Property (not escaped)\", -1);\n\t\t \n\t\tel.append(out iter);\n\t\tel.set(iter, 0, \"|\", 1, \"(|) User defined method\", -1);\n\t \n\t\tel.append(out iter);\n\t\tel.set(iter, 0, \"*\", 1, \"(*) Special property (eg. prop )\", -1);\n\t\t \n\t\n\t}\n\tel.foreach((tm, tp, titer) => {\n\t\tGLib.Value val;\n\t\tel.get_value(titer, 0, out val);\n\t\t \n\t\tprint(\"check %s against %s\\n\", (string)val, kflag);\n\t\tif (((string)val) == kflag) {\n\t\t\t_this.kflag.el.set_active_iter(titer);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t});\n\t\n\n \n}\n"
+ }
+ ]
+ },
+ {
+ "label" : "Type or Return Type",
+ "$ visible" : true,
+ "xalign" : 0.90000000000000002,
+ "* pack" : "attach_defaults,0,1,1,2",
+ "xtype" : "Label",
+ "$ justify" : "Gtk.Justification.RIGHT",
+ "x_options" : 4,
+ "$ xns" : "Gtk"
+ },
+ {
+ "id" : "ktype",
+ "$ visible" : true,
+ "xtype" : "Entry",
+ "* pack" : "attach_defaults,1,2,1,2",
+ "$ xns" : "Gtk"
+ },
+ {
+ "label" : "Name",
+ "tooltip_text" : "center, north, south, east, west",
+ "$ visible" : true,
+ "xalign" : 0.90000000000000002,
+ "* pack" : "attach_defaults,0,1,2,3",
+ "xtype" : "Label",
+ "$ justify" : "Gtk.Justification.RIGHT",
+ "x_options" : 4,
+ "$ xns" : "Gtk"
+ },
+ {
+ "id" : "kname",
+ "$ visible" : true,
+ "xtype" : "Entry",
+ "* pack" : "attach_defaults,1,2,2,3",
+ "$ xns" : "Gtk"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file
--- /dev/null
+static Xcls_PopoverProperty _PopoverProperty;
+
+public class Xcls_PopoverProperty : Object
+{
+ public Gtk.Popover el;
+ private Xcls_PopoverProperty _this;
+
+ public static Xcls_PopoverProperty singleton()
+ {
+ if (_PopoverProperty == null) {
+ _PopoverProperty= new Xcls_PopoverProperty();
+ }
+ return _PopoverProperty;
+ }
+ public Xcls_header header;
+ public Xcls_kflag kflag;
+ public Xcls_dbcellrenderer dbcellrenderer;
+ public Xcls_dbmodel dbmodel;
+ public Xcls_ktype ktype;
+ public Xcls_kname kname;
+
+ // my vars (def)
+ public string old_keyname;
+ public signal void success (Project.Project pr, JsRender.JsRender file);
+ public bool done;
+ public Xcls_MainWindow mainwindow;
+ public string key_type;
+ public JsRender.Node node;
+
+ // ctor
+ public Xcls_PopoverProperty()
+ {
+ _this = this;
+ this.el = new Gtk.Popover( null );
+
+ // my vars (dec)
+ this.done = false;
+ this.mainwindow = null;
+
+ // set gobject values
+ this.el.border_width = 0;
+ this.el.modal = true;
+ this.el.position = Gtk.PositionType.RIGHT;
+ var child_0 = new Xcls_Box2( _this );
+ child_0.ref();
+ this.el.add ( child_0.el );
+
+ //listeners
+ this.el.closed.connect( () => {
+
+
+ var newtext = "";
+ Gtk.TreeIter citer;
+ GLib.Value gval;
+ this.kflag.el.get_active_iter(out citer);
+ this.dbmodel.el.get_value(citer, 0, out gval);
+
+ var ktype = this.ktype.el.get_text().strip();
+ var kname = this.kname.el.get_text().strip();
+ newtext += ((string)gval).strip();
+ newtext += ktype.length > 0 && newtext.length > 0 ? " " :"";
+ newtext += ktype;
+ newtext += kname.length > 0 && newtext.length > 0 ? " " :"";
+ newtext += kname;
+
+
+ var lp = _this.mainwindow.windowstate.left_props;
+
+ switch(this.key_type) {
+ case "listener":
+ var ov = _this.node.listeners.get(this.old_keyname);
+ _this.node.listeners.set(newtext, ov);
+ if (this.old_keyname != newtext) {
+ _this.node.listeners.unset(this.old_keyname);
+ }
+
+
+ lp.updateKey(this.old_keyname, this.key_type, newtext);
+
+ break;
+ case "props":
+ var ov = _this.node.props.get(this.old_keyname);
+ _this.node.props.set(newtext, ov);
+ if (this.old_keyname != newtext) {
+ _this.node.props.unset(this.old_keyname);
+ }
+ lp.updateKey(this.old_keyname, this.key_type, newtext);
+ break;
+ }
+
+
+
+ });
+ }
+
+ // user defined functions
+ public void show (Gtk.Widget btn, JsRender.Node node, string key_type, string key)
+ {
+
+ string kname = "", kflag = "", ktype = "";
+ if (key.length > 0) {
+ node.normalize_key( key, out kname, out kflag, out ktype);
+ }
+
+ if (key_type == "listener") {
+ this.header.el.title = "Modify Event Listener";
+ } else {
+ this.header.el.title = "Modify Property";
+ }
+
+ this.key_type = key_type;
+ this.old_keyname = key;
+ this.node = node;
+
+ _this.kname.el.set_text(kname);
+ _this.ktype.el.set_text(ktype);
+
+ _this.dbmodel.loadData(kflag);
+ // does node have this property...
+
+
+
+
+ _this.node = node;
+ //console.log('show all');
+ this.el.set_modal(true);
+ this.el.set_relative_to(btn);
+
+ this.el.set_position(Gtk.PositionType.TOP);
+
+ // window + header?
+ print("SHOWALL - POPIP\n");
+ this.el.show_all();
+ this.kname.el.grab_focus();
+
+ //this.success = c.success;
+
+ }
+ public void updateNodeFromValues () {
+
+ /* _this.file.title = _this.title.el.get_text();
+ _this.file.region = _this.region.el.get_text();
+ _this.file.parent = _this.parent.el.get_text();
+ _this.file.permname = _this.permname.el.get_text();
+ _this.file.modOrder = _this.modOrder.el.get_text();
+
+ if (_this.file.name.length > 0 && _this.file.name != _this.name.el.get_text()) {
+ _this.file.renameTo(_this.name.el.get_text());
+ }
+ // store the module...
+ _this.file.build_module = "";
+ Gtk.TreeIter iter;
+ if (_this.build_module.el.get_active_iter (out iter)) {
+ Value vfname;
+ this.dbmodel.el.get_value (iter, 0, out vfname);
+ if (((string)vfname).length > 0) {
+ _this.file.build_module = (string)vfname;
+ }
+
+ }
+ */
+
+
+
+
+ }
+ public class Xcls_Box2 : Object
+ {
+ public Gtk.Box el;
+ private Xcls_PopoverProperty _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Box2(Xcls_PopoverProperty _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.homogeneous = false;
+ var child_0 = new Xcls_header( _this );
+ child_0.ref();
+ this.el.pack_start ( child_0.el , false,true,0 );
+ var child_1 = new Xcls_Table4( _this );
+ child_1.ref();
+ this.el.pack_start ( child_1.el , false,false,4 );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_header : Object
+ {
+ public Gtk.HeaderBar el;
+ private Xcls_PopoverProperty _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_header(Xcls_PopoverProperty _owner )
+ {
+ _this = _owner;
+ _this.header = this;
+ this.el = new Gtk.HeaderBar();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.title = "Modify / Create Property";
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_Table4 : Object
+ {
+ public Gtk.Table el;
+ private Xcls_PopoverProperty _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Table4(Xcls_PopoverProperty _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Table( 3, 2, true );
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.margin_right = 4;
+ this.el.margin_left = 4;
+ this.el.row_spacing = 2;
+ var child_0 = new Xcls_Label5( _this );
+ child_0.ref();
+ this.el.attach_defaults ( child_0.el , 0,1,0,1 );
+ var child_1 = new Xcls_kflag( _this );
+ child_1.ref();
+ this.el.attach_defaults ( child_1.el , 1,2,0,1 );
+ var child_2 = new Xcls_Label9( _this );
+ child_2.ref();
+ this.el.attach_defaults ( child_2.el , 0,1,1,2 );
+ var child_3 = new Xcls_ktype( _this );
+ child_3.ref();
+ this.el.attach_defaults ( child_3.el , 1,2,1,2 );
+ var child_4 = new Xcls_Label11( _this );
+ child_4.ref();
+ this.el.attach_defaults ( child_4.el , 0,1,2,3 );
+ var child_5 = new Xcls_kname( _this );
+ child_5.ref();
+ this.el.attach_defaults ( child_5.el , 1,2,2,3 );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Label5 : Object
+ {
+ public Gtk.Label el;
+ private Xcls_PopoverProperty _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Label5(Xcls_PopoverProperty _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Label( "Special Flags" );
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.justify = Gtk.Justification.RIGHT;
+ this.el.xalign = 0.900000f;
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_kflag : Object
+ {
+ public Gtk.ComboBox el;
+ private Xcls_PopoverProperty _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_kflag(Xcls_PopoverProperty _owner )
+ {
+ _this = _owner;
+ _this.kflag = this;
+ this.el = new Gtk.ComboBox();
+
+ // my vars (dec)
+
+ // set gobject values
+ var child_0 = new Xcls_dbcellrenderer( _this );
+ child_0.ref();
+ this.el.pack_start ( child_0.el , true );
+ var child_1 = new Xcls_dbmodel( _this );
+ child_1.ref();
+ this.el.set_model ( child_1.el );
+
+ // init method
+
+ this.el.add_attribute(_this.dbcellrenderer.el , "markup", 1 );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_dbcellrenderer : Object
+ {
+ public Gtk.CellRendererText el;
+ private Xcls_PopoverProperty _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_dbcellrenderer(Xcls_PopoverProperty _owner )
+ {
+ _this = _owner;
+ _this.dbcellrenderer = this;
+ this.el = new Gtk.CellRendererText();
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_dbmodel : Object
+ {
+ public Gtk.ListStore el;
+ private Xcls_PopoverProperty _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_dbmodel(Xcls_PopoverProperty _owner )
+ {
+ _this = _owner;
+ _this.dbmodel = this;
+ this.el = new Gtk.ListStore( 2, typeof(string),typeof(string) );
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ public void loadData (string kflag) {
+ this.el.clear();
+ Gtk.TreeIter iter;
+ var el = this.el;
+
+
+ // vala signal.. '@'
+ // raw value '$'
+ // user defined property '#'
+ // user defined method '|'
+ // special property '*' => prop |args|ctor|init
+
+
+
+ /// el.append(out iter);
+
+
+ // el.set_value(iter, 0, "");
+ // el.set_value(iter, 1, "aaa - Just add Element - aaa");
+
+ el.append(out iter);
+ el.set(iter, 0, "", 1, "Normal Property", -1);
+
+ if (_this.mainwindow.windowstate.file.xtype == "Gtk") {
+ el.append(out iter);
+ el.set(iter, 0, "$", 1, "($) Raw Property (not escaped)", -1);
+
+
+ el.append(out iter);
+ el.set(iter, 0, "#", 1, "(#) User defined property", -1);
+
+ el.append(out iter);
+ el.set(iter, 0, "|", 1, "(|) User defined method", -1);
+
+ el.append(out iter);
+ el.set(iter, 0, "*", 1, "(*) Special property (eg. prop | args | ctor | init )", -1);
+
+
+ el.append(out iter);
+ el.set(iter, 0, "@", 1, "(@) Vala Signal", -1);
+
+
+ } else {
+ // javascript
+ el.append(out iter);
+ el.set(iter, 0, "$", 1, "($) Raw Property (not escaped)", -1);
+
+ el.append(out iter);
+ el.set(iter, 0, "|", 1, "(|) User defined method", -1);
+
+ el.append(out iter);
+ el.set(iter, 0, "*", 1, "(*) Special property (eg. prop )", -1);
+
+
+ }
+ el.foreach((tm, tp, titer) => {
+ GLib.Value val;
+ el.get_value(titer, 0, out val);
+
+ print("check %s against %s\n", (string)val, kflag);
+ if (((string)val) == kflag) {
+ _this.kflag.el.set_active_iter(titer);
+ return true;
+ }
+ return false;
+ });
+
+
+
+ }
+ }
+
+
+ public class Xcls_Label9 : Object
+ {
+ public Gtk.Label el;
+ private Xcls_PopoverProperty _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Label9(Xcls_PopoverProperty _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Label( "Type or Return Type" );
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.justify = Gtk.Justification.RIGHT;
+ this.el.xalign = 0.900000f;
+ this.el.visible = true;
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_ktype : Object
+ {
+ public Gtk.Entry el;
+ private Xcls_PopoverProperty _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_ktype(Xcls_PopoverProperty _owner )
+ {
+ _this = _owner;
+ _this.ktype = this;
+ this.el = new Gtk.Entry();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.visible = true;
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_Label11 : Object
+ {
+ public Gtk.Label el;
+ private Xcls_PopoverProperty _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Label11(Xcls_PopoverProperty _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Label( "Name" );
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.justify = Gtk.Justification.RIGHT;
+ this.el.xalign = 0.900000f;
+ this.el.tooltip_text = "center, north, south, east, west";
+ this.el.visible = true;
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_kname : Object
+ {
+ public Gtk.Entry el;
+ private Xcls_PopoverProperty _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_kname(Xcls_PopoverProperty _owner )
+ {
+ _this = _owner;
+ _this.kname = this;
+ this.el = new Gtk.Entry();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.visible = true;
+ }
+
+ // user defined functions
+ }
+
+
+
+}
--- /dev/null
+{
+ "name" : "ProjectSettings",
+ "parent" : "",
+ "title" : "",
+ "path" : "/home/alan/gitlive/app.Builder.js/src/Builder4/ProjectSettings.bjs",
+ "permname" : "",
+ "modOrder" : "",
+ "build_module" : "builder",
+ "items" : [
+ {
+ "@ void buttonPressed" : "(string btn)",
+ "id" : "ProjectSettings",
+ "| void show" : " (Project.Project project) {\n _this.project = project;\n _this.path.el.label = project.firstPath();\n // get the active project.\n var lm = Gtk.SourceLanguageManager.get_default();\n \n ((Gtk.SourceBuffer)(_this.view.el.get_buffer())) .set_language(\n \n lm.get_language(\"html\"));\n \n //print (project.fn);\n //project.runhtml = project.runhtml || '';\n _this.view.el.get_buffer().set_text(project.runhtml);\n \n \n _this.rootURL.el.set_text( _this.project.rootURL );\n _this.base_template.el.set_text(_this.project.base_template); \n var js = _this.project;\n _this.database_DBTYPE.el.set_text( js.get_string_member(\"DBTYPE\") );\n _this.database_DBNAME.el.set_text( js.get_string_member(\"DBNAME\") );\n _this.database_DBUSERNAME.el.set_text( js.get_string_member(\"DBUSERNAME\") );\n _this.database_DBPASSWORD.el.set_text( js.get_string_member(\"DBPASSWORD\") );\n //this.el.show_all();\n}\n",
+ "# Project.Project project" : "",
+ "xtype" : "Box",
+ "| void save" : "()\n{\n var buf = _this.view.el.get_buffer();\n Gtk.TextIter s;\n Gtk.TextIter e;\n buf.get_start_iter(out s);\n buf.get_end_iter(out e);\n _this.project.runhtml = buf.get_text(s,e,true);\n \n _this.project.rootURL = _this.rootURL.el.get_text();\n _this.project.base_template = _this.base_template.el.get_text(); \n \n var js = _this.project.json_project_data;\n js.set_string_member(\"DBTYPE\", _this.database_DBTYPE.el.get_text());\n js.set_string_member(\"DBNAME\", _this.database_DBNAME.el.get_text());\n js.set_string_member(\"DBUSERNAME\", _this.database_DBUSERNAME.el.get_text());\n js.set_string_member(\"DBPASSWORD\", _this.database_DBPASSWORD.el.get_text());\n// _this.project.set_string_member(\"DBHOST\", _this.DBTYPE.el.get_text()); \n \n // need to re-init the database \n \n _this.project.initRooDatabase();\n \n \n}",
+ "$ xns" : "Gtk",
+ "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
+ "border_width" : 5,
+ "$ homogeneous" : false,
+ "items" : [
+ {
+ "* pack" : "pack_start,false,false,0",
+ "xtype" : "Box",
+ "gboolean expand" : false,
+ "$ xns" : "Gtk",
+ "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
+ "$ homogeneous" : true,
+ "gboolean vexpand" : false,
+ "items" : [
+ {
+ "listeners" : {
+ "button_press_event" : "() => {\n _this.save();\n \n _this.buttonPressed(\"apply\");\n return false;\n}"
+ },
+ "label" : "Apply",
+ "* pack" : "add",
+ "xtype" : "Button",
+ "$ xns" : "Gtk"
+ },
+ {
+ "listeners" : {
+ "button_press_event" : "() => {\n _this.save();\n \n _this.buttonPressed(\"save\");\n return false;\n}"
+ },
+ "label" : "Save",
+ "* pack" : "add",
+ "xtype" : "Button",
+ "$ xns" : "Gtk"
+ }
+ ]
+ },
+ {
+ "* pack" : "pack_end,true,true,0",
+ "xtype" : "Notebook",
+ "$ xns" : "Gtk",
+ "items" : [
+ {
+ "id" : "label_global",
+ "xtype" : "Label",
+ "* pack" : false,
+ "$ xns" : "Gtk",
+ "utf8 label" : "Global"
+ },
+ {
+ "id" : "label_database",
+ "* pack" : false,
+ "xtype" : "Label",
+ "$ xns" : "Gtk",
+ "utf8 label" : "Database"
+ },
+ {
+ "* pack" : "append_page,_this.label_global.el",
+ "xtype" : "Box",
+ "gboolean homogeneous" : false,
+ "$ xns" : "Gtk",
+ "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
+ "items" : [
+ {
+ "label" : "filename",
+ "id" : "path",
+ "xalign" : 0,
+ "* pack" : "pack_start,false,false,0",
+ "xtype" : "Label",
+ "gint margin" : 3,
+ "$ xns" : "Gtk"
+ },
+ {
+ "* pack" : "pack_start,false,false,0",
+ "xtype" : "Box",
+ "gboolean expand" : false,
+ "$ xns" : "Gtk",
+ "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
+ "$ homogeneous" : false,
+ "items" : [
+ {
+ "label" : "HTML template file",
+ "xtype" : "Label",
+ "* pack" : "pack_start,false,false,0",
+ "gint margin" : 3,
+ "$ xns" : "Gtk"
+ },
+ {
+ "id" : "base_template",
+ "xtype" : "Entry",
+ "* pack" : "add",
+ "$ xns" : "Gtk"
+ }
+ ]
+ },
+ {
+ "* pack" : "pack_start,false,false,0",
+ "xtype" : "Box",
+ "gboolean expand" : false,
+ "$ xns" : "Gtk",
+ "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
+ "$ homogeneous" : false,
+ "items" : [
+ {
+ "label" : "root URL",
+ "xtype" : "Label",
+ "* pack" : "pack_start,false,false,0",
+ "gint margin" : 3,
+ "$ xns" : "Gtk"
+ },
+ {
+ "id" : "rootURL",
+ "xtype" : "Entry",
+ "* pack" : "add",
+ "$ xns" : "Gtk"
+ }
+ ]
+ },
+ {
+ "label" : "HTML To insert at end of <HEAD>",
+ "xtype" : "Label",
+ "* pack" : "pack_start,false,false,0",
+ "$ xns" : "Gtk"
+ },
+ {
+ "* pack" : "pack_start,true,true,0",
+ "xtype" : "ScrolledWindow",
+ "$ xns" : "Gtk",
+ "items" : [
+ {
+ "listeners" : {
+ "key_release_event" : " ( event) =>{\n if (event.keyval != 115) {\n return false;\n \n }\n if ( (event.state & Gdk.ModifierType.CONTROL_MASK ) < 1 ) {\n return false;\n }\n var buf = this.el.get_buffer();\n Gtk.TextIter s;\n Gtk.TextIter e;\n buf.get_start_iter(out s);\n buf.get_end_iter(out e);\n _this.project.runhtml = buf.get_text(s,e,true);\n \n \n _this.buttonPressed(\"save\");\n \n return false;\n \n}"
+ },
+ "id" : "view",
+ "* init" : " \n var description = Pango.FontDescription.from_string(\"monospace\");\n description.set_size(9000);\n this.el.override_font(description);",
+ "xtype" : "View",
+ "* pack" : "add",
+ "$ xns" : "GtkSource"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "* pack" : "append_page,_this.label_database.el",
+ "xtype" : "Box",
+ "gboolean homogeneous" : false,
+ "$ xns" : "Gtk",
+ "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
+ "items" : [
+ {
+ "label" : "Type (eg. MySQL or PostgreSQL)",
+ "xalign" : 0,
+ "* pack" : "pack_start,false,false,0",
+ "xtype" : "Label",
+ "$ xns" : "Gtk"
+ },
+ {
+ "listeners" : {
+ "key_press_event" : "(ev) => {\n\n if (ev.keyval == Gdk.Key.Tab) {\n _this.database_DBNAME.el.grab_focus();\n return true;\n }\n\n\n return false;\n}\n"
+ },
+ "id" : "database_DBTYPE",
+ "* pack" : "pack_start,false,false,0",
+ "xtype" : "Entry",
+ "$ xns" : "Gtk"
+ },
+ {
+ "label" : "Name",
+ "xalign" : 0,
+ "* pack" : "pack_start,false,false,0",
+ "xtype" : "Label",
+ "$ xns" : "Gtk"
+ },
+ {
+ "listeners" : {
+ "key_press_event" : "(ev) => {\n\n if (ev.keyval == Gdk.Key.Tab) {\n _this.database_DBUSERNAME.el.grab_focus();\n return true;\n }\n\n\n return false;\n}\n"
+ },
+ "id" : "database_DBNAME",
+ "xtype" : "Entry",
+ "* pack" : "pack_start,false,false,0",
+ "$ xns" : "Gtk"
+ },
+ {
+ "label" : "Username",
+ "xalign" : 0,
+ "* pack" : "pack_start,false,false,0",
+ "xtype" : "Label",
+ "$ xns" : "Gtk"
+ },
+ {
+ "listeners" : {
+ "key_press_event" : "(ev) => {\n\n if (ev.keyval == Gdk.Key.Tab) {\n _this.database_DBPASSWORD.el.grab_focus();\n return true;\n }\n\n\n return false;\n}\n"
+ },
+ "id" : "database_DBUSERNAME",
+ "* pack" : "pack_start,false,false,0",
+ "xtype" : "Entry",
+ "$ xns" : "Gtk"
+ },
+ {
+ "label" : "Password",
+ "xalign" : 0,
+ "* pack" : "pack_start,false,false,0",
+ "xtype" : "Label",
+ "$ xns" : "Gtk"
+ },
+ {
+ "id" : "database_DBPASSWORD",
+ "xtype" : "Entry",
+ "* pack" : "pack_start,false,false,0",
+ "$ xns" : "Gtk"
+ },
+ {
+ "listeners" : {
+ "clicked" : "() => {\n\n\n _this.database_ERROR.el.label = \"\";\n Gda.Connection cnc;\n try {\n // assumes localhost...\n cnc = Gda.Connection.open_from_string (\n\t\t\t_this.database_DBTYPE.el.get_text(),\n\t\t\t\"DB_NAME=\" + _this.database_DBNAME.el.get_text(), \n\t\t\t\"USERNAME=\" + _this.database_DBUSERNAME.el.get_text() + \n\t\t\t\";PASSWORD=\" + _this.database_DBPASSWORD.el.get_text(),\n\t\t\tGda.ConnectionOptions.NONE\n\t\t);\n //} catch (Gda.ConnectionError ce) { \n // _this.database_ERROR.el.label = ce.message; \n } catch(Gda.ConnectionError ue) {\n _this.database_ERROR.el.label = ue.message;\n return;\n } catch(Gda.ConfigError ue) {\n _this.database_ERROR.el.label = ue.message;\n return;\n }\n _this.database_ERROR.el.label = \"Connection Succeeded\";\n cnc.close();\n}"
+ },
+ "* pack" : "pack_start,false,false,0",
+ "xtype" : "Button",
+ "$ xns" : "Gtk",
+ "utf8 label" : "Check Connection"
+ },
+ {
+ "label" : " ",
+ "id" : "database_ERROR",
+ "xalign" : 0,
+ "* pack" : "pack_start,false,false,0",
+ "xtype" : "Label",
+ "gint margin" : 3,
+ "$ xns" : "Gtk"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file
--- /dev/null
+static Xcls_ProjectSettings _ProjectSettings;
+
+public class Xcls_ProjectSettings : Object
+{
+ public Gtk.Box el;
+ private Xcls_ProjectSettings _this;
+
+ public static Xcls_ProjectSettings singleton()
+ {
+ if (_ProjectSettings == null) {
+ _ProjectSettings= new Xcls_ProjectSettings();
+ }
+ return _ProjectSettings;
+ }
+ public Xcls_label_global label_global;
+ public Xcls_label_database label_database;
+ public Xcls_path path;
+ public Xcls_base_template base_template;
+ public Xcls_rootURL rootURL;
+ public Xcls_view view;
+ public Xcls_database_DBTYPE database_DBTYPE;
+ public Xcls_database_DBNAME database_DBNAME;
+ public Xcls_database_DBUSERNAME database_DBUSERNAME;
+ public Xcls_database_DBPASSWORD database_DBPASSWORD;
+ public Xcls_database_ERROR database_ERROR;
+
+ // my vars (def)
+ public signal void buttonPressed (string btn);
+ public Project.Project project;
+
+ // ctor
+ public Xcls_ProjectSettings()
+ {
+ _this = this;
+ this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.homogeneous = false;
+ this.el.border_width = 5;
+ var child_0 = new Xcls_Box2( _this );
+ child_0.ref();
+ this.el.pack_start ( child_0.el , false,false,0 );
+ var child_1 = new Xcls_Notebook5( _this );
+ child_1.ref();
+ this.el.pack_end ( child_1.el , true,true,0 );
+ }
+
+ // user defined functions
+ public void show (Project.Project project) {
+ _this.project = project;
+ _this.path.el.label = project.firstPath();
+ // get the active project.
+ var lm = Gtk.SourceLanguageManager.get_default();
+
+ ((Gtk.SourceBuffer)(_this.view.el.get_buffer())) .set_language(
+
+ lm.get_language("html"));
+
+ //print (project.fn);
+ //project.runhtml = project.runhtml || '';
+ _this.view.el.get_buffer().set_text(project.runhtml);
+
+
+ _this.rootURL.el.set_text( _this.project.rootURL );
+ _this.base_template.el.set_text(_this.project.base_template);
+ var js = _this.project;
+ _this.database_DBTYPE.el.set_text( js.get_string_member("DBTYPE") );
+ _this.database_DBNAME.el.set_text( js.get_string_member("DBNAME") );
+ _this.database_DBUSERNAME.el.set_text( js.get_string_member("DBUSERNAME") );
+ _this.database_DBPASSWORD.el.set_text( js.get_string_member("DBPASSWORD") );
+ //this.el.show_all();
+ }
+ public void save ()
+ {
+ var buf = _this.view.el.get_buffer();
+ Gtk.TextIter s;
+ Gtk.TextIter e;
+ buf.get_start_iter(out s);
+ buf.get_end_iter(out e);
+ _this.project.runhtml = buf.get_text(s,e,true);
+
+ _this.project.rootURL = _this.rootURL.el.get_text();
+ _this.project.base_template = _this.base_template.el.get_text();
+
+ var js = _this.project.json_project_data;
+ js.set_string_member("DBTYPE", _this.database_DBTYPE.el.get_text());
+ js.set_string_member("DBNAME", _this.database_DBNAME.el.get_text());
+ js.set_string_member("DBUSERNAME", _this.database_DBUSERNAME.el.get_text());
+ js.set_string_member("DBPASSWORD", _this.database_DBPASSWORD.el.get_text());
+ // _this.project.set_string_member("DBHOST", _this.DBTYPE.el.get_text());
+
+ // need to re-init the database
+
+ _this.project.initRooDatabase();
+
+
+ }
+ public class Xcls_Box2 : Object
+ {
+ public Gtk.Box el;
+ private Xcls_ProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Box2(Xcls_ProjectSettings _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.homogeneous = true;
+ this.el.expand = false;
+ this.el.vexpand = false;
+ var child_0 = new Xcls_Button3( _this );
+ child_0.ref();
+ this.el.add ( child_0.el );
+ var child_1 = new Xcls_Button4( _this );
+ child_1.ref();
+ this.el.add ( child_1.el );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Button3 : Object
+ {
+ public Gtk.Button el;
+ private Xcls_ProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Button3(Xcls_ProjectSettings _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Button();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.label = "Apply";
+
+ // listeners
+ this.el.button_press_event.connect( () => {
+ _this.save();
+
+ _this.buttonPressed("apply");
+ return false;
+ });
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Button4 : Object
+ {
+ public Gtk.Button el;
+ private Xcls_ProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Button4(Xcls_ProjectSettings _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Button();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.label = "Save";
+
+ // listeners
+ this.el.button_press_event.connect( () => {
+ _this.save();
+
+ _this.buttonPressed("save");
+ return false;
+ });
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Notebook5 : Object
+ {
+ public Gtk.Notebook el;
+ private Xcls_ProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Notebook5(Xcls_ProjectSettings _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Notebook();
+
+ // my vars (dec)
+
+ // set gobject values
+ var child_0 = new Xcls_label_global( _this );
+ child_0.ref();
+ var child_1 = new Xcls_label_database( _this );
+ child_1.ref();
+ var child_2 = new Xcls_Box8( _this );
+ child_2.ref();
+ this.el.append_page ( child_2.el , _this.label_global.el );
+ var child_3 = new Xcls_Box19( _this );
+ child_3.ref();
+ this.el.append_page ( child_3.el , _this.label_database.el );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_label_global : Object
+ {
+ public Gtk.Label el;
+ private Xcls_ProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_label_global(Xcls_ProjectSettings _owner )
+ {
+ _this = _owner;
+ _this.label_global = this;
+ this.el = new Gtk.Label( "Global" );
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ }
+ public class Xcls_label_database : Object
+ {
+ public Gtk.Label el;
+ private Xcls_ProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_label_database(Xcls_ProjectSettings _owner )
+ {
+ _this = _owner;
+ _this.label_database = this;
+ this.el = new Gtk.Label( "Database" );
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Box8 : Object
+ {
+ public Gtk.Box el;
+ private Xcls_ProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Box8(Xcls_ProjectSettings _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.homogeneous = false;
+ var child_0 = new Xcls_path( _this );
+ child_0.ref();
+ this.el.pack_start ( child_0.el , false,false,0 );
+ var child_1 = new Xcls_Box10( _this );
+ child_1.ref();
+ this.el.pack_start ( child_1.el , false,false,0 );
+ var child_2 = new Xcls_Box13( _this );
+ child_2.ref();
+ this.el.pack_start ( child_2.el , false,false,0 );
+ var child_3 = new Xcls_Label16( _this );
+ child_3.ref();
+ this.el.pack_start ( child_3.el , false,false,0 );
+ var child_4 = new Xcls_ScrolledWindow17( _this );
+ child_4.ref();
+ this.el.pack_start ( child_4.el , true,true,0 );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_path : Object
+ {
+ public Gtk.Label el;
+ private Xcls_ProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_path(Xcls_ProjectSettings _owner )
+ {
+ _this = _owner;
+ _this.path = this;
+ this.el = new Gtk.Label( "filename" );
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.margin = 3;
+ this.el.xalign = 0f;
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Box10 : Object
+ {
+ public Gtk.Box el;
+ private Xcls_ProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Box10(Xcls_ProjectSettings _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.homogeneous = false;
+ this.el.expand = false;
+ var child_0 = new Xcls_Label11( _this );
+ child_0.ref();
+ this.el.pack_start ( child_0.el , false,false,0 );
+ var child_1 = new Xcls_base_template( _this );
+ child_1.ref();
+ this.el.add ( child_1.el );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Label11 : Object
+ {
+ public Gtk.Label el;
+ private Xcls_ProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Label11(Xcls_ProjectSettings _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Label( "HTML template file" );
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.margin = 3;
+ }
+
+ // user defined functions
+ }
+ public class Xcls_base_template : Object
+ {
+ public Gtk.Entry el;
+ private Xcls_ProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_base_template(Xcls_ProjectSettings _owner )
+ {
+ _this = _owner;
+ _this.base_template = this;
+ this.el = new Gtk.Entry();
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Box13 : Object
+ {
+ public Gtk.Box el;
+ private Xcls_ProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Box13(Xcls_ProjectSettings _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.homogeneous = false;
+ this.el.expand = false;
+ var child_0 = new Xcls_Label14( _this );
+ child_0.ref();
+ this.el.pack_start ( child_0.el , false,false,0 );
+ var child_1 = new Xcls_rootURL( _this );
+ child_1.ref();
+ this.el.add ( child_1.el );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Label14 : Object
+ {
+ public Gtk.Label el;
+ private Xcls_ProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Label14(Xcls_ProjectSettings _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Label( "root URL" );
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.margin = 3;
+ }
+
+ // user defined functions
+ }
+ public class Xcls_rootURL : Object
+ {
+ public Gtk.Entry el;
+ private Xcls_ProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_rootURL(Xcls_ProjectSettings _owner )
+ {
+ _this = _owner;
+ _this.rootURL = this;
+ this.el = new Gtk.Entry();
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Label16 : Object
+ {
+ public Gtk.Label el;
+ private Xcls_ProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Label16(Xcls_ProjectSettings _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Label( "HTML To insert at end of <HEAD>" );
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ }
+ public class Xcls_ScrolledWindow17 : Object
+ {
+ public Gtk.ScrolledWindow el;
+ private Xcls_ProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_ScrolledWindow17(Xcls_ProjectSettings _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.ScrolledWindow( null, null );
+
+ // my vars (dec)
+
+ // set gobject values
+ var child_0 = new Xcls_view( _this );
+ child_0.ref();
+ this.el.add ( child_0.el );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_view : Object
+ {
+ public Gtk.SourceView el;
+ private Xcls_ProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_view(Xcls_ProjectSettings _owner )
+ {
+ _this = _owner;
+ _this.view = this;
+ this.el = new Gtk.SourceView();
+
+ // my vars (dec)
+
+ // init method
+
+ var description = Pango.FontDescription.from_string("monospace");
+ description.set_size(9000);
+ this.el.override_font(description);
+
+ // listeners
+ this.el.key_release_event.connect( ( event) =>{
+ if (event.keyval != 115) {
+ return false;
+
+ }
+ if ( (event.state & Gdk.ModifierType.CONTROL_MASK ) < 1 ) {
+ return false;
+ }
+ var buf = this.el.get_buffer();
+ Gtk.TextIter s;
+ Gtk.TextIter e;
+ buf.get_start_iter(out s);
+ buf.get_end_iter(out e);
+ _this.project.runhtml = buf.get_text(s,e,true);
+
+
+ _this.buttonPressed("save");
+
+ return false;
+
+ });
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Box19 : Object
+ {
+ public Gtk.Box el;
+ private Xcls_ProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Box19(Xcls_ProjectSettings _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.homogeneous = false;
+ var child_0 = new Xcls_Label20( _this );
+ child_0.ref();
+ this.el.pack_start ( child_0.el , false,false,0 );
+ var child_1 = new Xcls_database_DBTYPE( _this );
+ child_1.ref();
+ this.el.pack_start ( child_1.el , false,false,0 );
+ var child_2 = new Xcls_Label22( _this );
+ child_2.ref();
+ this.el.pack_start ( child_2.el , false,false,0 );
+ var child_3 = new Xcls_database_DBNAME( _this );
+ child_3.ref();
+ this.el.pack_start ( child_3.el , false,false,0 );
+ var child_4 = new Xcls_Label24( _this );
+ child_4.ref();
+ this.el.pack_start ( child_4.el , false,false,0 );
+ var child_5 = new Xcls_database_DBUSERNAME( _this );
+ child_5.ref();
+ this.el.pack_start ( child_5.el , false,false,0 );
+ var child_6 = new Xcls_Label26( _this );
+ child_6.ref();
+ this.el.pack_start ( child_6.el , false,false,0 );
+ var child_7 = new Xcls_database_DBPASSWORD( _this );
+ child_7.ref();
+ this.el.pack_start ( child_7.el , false,false,0 );
+ var child_8 = new Xcls_Button28( _this );
+ child_8.ref();
+ this.el.pack_start ( child_8.el , false,false,0 );
+ var child_9 = new Xcls_database_ERROR( _this );
+ child_9.ref();
+ this.el.pack_start ( child_9.el , false,false,0 );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Label20 : Object
+ {
+ public Gtk.Label el;
+ private Xcls_ProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Label20(Xcls_ProjectSettings _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Label( "Type (eg. MySQL or PostgreSQL)" );
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.xalign = 0f;
+ }
+
+ // user defined functions
+ }
+ public class Xcls_database_DBTYPE : Object
+ {
+ public Gtk.Entry el;
+ private Xcls_ProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_database_DBTYPE(Xcls_ProjectSettings _owner )
+ {
+ _this = _owner;
+ _this.database_DBTYPE = this;
+ this.el = new Gtk.Entry();
+
+ // my vars (dec)
+
+ // set gobject values
+
+ // listeners
+ this.el.key_press_event.connect( (ev) => {
+
+ if (ev.keyval == Gdk.Key.Tab) {
+ _this.database_DBNAME.el.grab_focus();
+ return true;
+ }
+
+
+ return false;
+ });
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Label22 : Object
+ {
+ public Gtk.Label el;
+ private Xcls_ProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Label22(Xcls_ProjectSettings _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Label( "Name" );
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.xalign = 0f;
+ }
+
+ // user defined functions
+ }
+ public class Xcls_database_DBNAME : Object
+ {
+ public Gtk.Entry el;
+ private Xcls_ProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_database_DBNAME(Xcls_ProjectSettings _owner )
+ {
+ _this = _owner;
+ _this.database_DBNAME = this;
+ this.el = new Gtk.Entry();
+
+ // my vars (dec)
+
+ // set gobject values
+
+ // listeners
+ this.el.key_press_event.connect( (ev) => {
+
+ if (ev.keyval == Gdk.Key.Tab) {
+ _this.database_DBUSERNAME.el.grab_focus();
+ return true;
+ }
+
+
+ return false;
+ });
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Label24 : Object
+ {
+ public Gtk.Label el;
+ private Xcls_ProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Label24(Xcls_ProjectSettings _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Label( "Username" );
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.xalign = 0f;
+ }
+
+ // user defined functions
+ }
+ public class Xcls_database_DBUSERNAME : Object
+ {
+ public Gtk.Entry el;
+ private Xcls_ProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_database_DBUSERNAME(Xcls_ProjectSettings _owner )
+ {
+ _this = _owner;
+ _this.database_DBUSERNAME = this;
+ this.el = new Gtk.Entry();
+
+ // my vars (dec)
+
+ // set gobject values
+
+ // listeners
+ this.el.key_press_event.connect( (ev) => {
+
+ if (ev.keyval == Gdk.Key.Tab) {
+ _this.database_DBPASSWORD.el.grab_focus();
+ return true;
+ }
+
+
+ return false;
+ });
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Label26 : Object
+ {
+ public Gtk.Label el;
+ private Xcls_ProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Label26(Xcls_ProjectSettings _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Label( "Password" );
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.xalign = 0f;
+ }
+
+ // user defined functions
+ }
+ public class Xcls_database_DBPASSWORD : Object
+ {
+ public Gtk.Entry el;
+ private Xcls_ProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_database_DBPASSWORD(Xcls_ProjectSettings _owner )
+ {
+ _this = _owner;
+ _this.database_DBPASSWORD = this;
+ this.el = new Gtk.Entry();
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Button28 : Object
+ {
+ public Gtk.Button el;
+ private Xcls_ProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Button28(Xcls_ProjectSettings _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Button();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.label = "Check Connection";
+
+ // listeners
+ this.el.clicked.connect( () => {
+
+
+ _this.database_ERROR.el.label = "";
+ Gda.Connection cnc;
+ try {
+ // assumes localhost...
+ cnc = Gda.Connection.open_from_string (
+ _this.database_DBTYPE.el.get_text(),
+ "DB_NAME=" + _this.database_DBNAME.el.get_text(),
+ "USERNAME=" + _this.database_DBUSERNAME.el.get_text() +
+ ";PASSWORD=" + _this.database_DBPASSWORD.el.get_text(),
+ Gda.ConnectionOptions.NONE
+ );
+ //} catch (Gda.ConnectionError ce) {
+ // _this.database_ERROR.el.label = ce.message;
+ } catch(Gda.ConnectionError ue) {
+ _this.database_ERROR.el.label = ue.message;
+ return;
+ } catch(Gda.ConfigError ue) {
+ _this.database_ERROR.el.label = ue.message;
+ return;
+ }
+ _this.database_ERROR.el.label = "Connection Succeeded";
+ cnc.close();
+ });
+ }
+
+ // user defined functions
+ }
+ public class Xcls_database_ERROR : Object
+ {
+ public Gtk.Label el;
+ private Xcls_ProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_database_ERROR(Xcls_ProjectSettings _owner )
+ {
+ _this = _owner;
+ _this.database_ERROR = this;
+ this.el = new Gtk.Label( " " );
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.margin = 3;
+ this.el.xalign = 0f;
+ }
+
+ // user defined functions
+ }
+}
--- /dev/null
+{
+ "name" : "RooProjectProperties",
+ "parent" : "",
+ "title" : "",
+ "path" : "/home/alan/gitlive/app.Builder.js/src/Builder4/RooProjectProperties.bjs",
+ "permname" : "",
+ "modOrder" : "",
+ "build_module" : "",
+ "items" : [
+ {
+ "listeners" : {
+ "delete_event" : " (self, event) => {\n this.el.hide();\n return true;\n}",
+ "response" : " (self, response_id) => {\n //print(response_id);\n if (response_id< 1 ) {\n this.el.hide();\n \n return;\n }\n \n var buf = view.el.get_buffer();\n Gtk.TextIter s;\n Gtk.TextIter e;\n buf.get_start_iter(out s);\n buf.get_end_iter(out e);\n var str = buf.get_text(s,e,true);\n // ideally we should syntax check it.. but it's html!?\n \n //var project = this.get('/Window.LeftTree').getActiveFile().project;\n \n \n _this.project.runhtml = str;\n _this.project.save();\n \n // imports.Builder.Provider.ProjectManager.ProjectManager.saveConfig();\n// print (str);\n // this.get('view').el.get_buffer().get_text(project.runjs, project.runjs.length);\n // ok pressed..\n this.el.hide();\n}"
+ },
+ "default_width" : 500,
+ "| void show" : " (Project.Project project) {\n _this.project = project;\n // get the active project.\n \n //print (project.fn);\n //project.runhtml = project.runhtml || '';\n _this.view.el.get_buffer().set_text(project.runhtml);\n \n this.el.show_all();\n}\n",
+ "# Project.Project project" : "",
+ "xtype" : "Dialog",
+ "$ modal" : true,
+ "$ xns" : "Gtk",
+ "items" : [
+ {
+ "$ pack" : " get_content_area().add\n",
+ "xtype" : "Box",
+ "$ xns" : "Gtk",
+ "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
+ "border_width" : 5,
+ "items" : [
+ {
+ "label" : "HTML To insert at end of <HEAD>",
+ "* pack" : "pack_start,false,false,0",
+ "xtype" : "Label",
+ "$ xns" : "Gtk"
+ },
+ {
+ "* pack" : "pack_end,true,true,0",
+ "xtype" : "ScrolledWindow",
+ "$ xns" : "Gtk",
+ "items" : [
+ {
+ "id" : "view",
+ "* pack" : "add",
+ "xtype" : "SourceView",
+ "$ xns" : "Gtk"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "label" : "OK",
+ "* pack" : "add_action_widget,1",
+ "xtype" : "Button",
+ "$ xns" : "Gtk"
+ },
+ {
+ "label" : "Cancel",
+ "* pack" : "add_action_widget,0",
+ "xtype" : "Button",
+ "$ xns" : "Gtk"
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file
--- /dev/null
+static RooProjectProperties _RooProjectProperties;
+
+public class RooProjectProperties : Object
+{
+ public Gtk.Dialog el;
+ private RooProjectProperties _this;
+
+ public static RooProjectProperties singleton()
+ {
+ if (_RooProjectProperties == null) {
+ _RooProjectProperties= new RooProjectProperties();
+ }
+ return _RooProjectProperties;
+ }
+ public Xcls_view view;
+
+ // my vars (def)
+ public Project.Project project;
+
+ // ctor
+ public RooProjectProperties()
+ {
+ _this = this;
+ this.el = new Gtk.Dialog();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.default_width = 500;
+ this.el.modal = true;
+ var child_0 = new Xcls_Box2( _this );
+ child_0.ref();
+ this.el.get_content_area().add ( child_0.el );
+ var child_1 = new Xcls_Button6( _this );
+ child_1.ref();
+ this.el.add_action_widget ( child_1.el , 1 );
+ var child_2 = new Xcls_Button7( _this );
+ child_2.ref();
+ this.el.add_action_widget ( child_2.el , 0 );
+
+ //listeners
+ this.el.delete_event.connect( (self, event) => {
+ this.el.hide();
+ return true;
+ });
+ this.el.response.connect( (self, response_id) => {
+ //print(response_id);
+ if (response_id< 1 ) {
+ this.el.hide();
+
+ return;
+ }
+
+ var buf = view.el.get_buffer();
+ Gtk.TextIter s;
+ Gtk.TextIter e;
+ buf.get_start_iter(out s);
+ buf.get_end_iter(out e);
+ var str = buf.get_text(s,e,true);
+ // ideally we should syntax check it.. but it's html!?
+
+ //var project = this.get('/Window.LeftTree').getActiveFile().project;
+
+
+ _this.project.runhtml = str;
+ _this.project.save();
+
+ // imports.Builder.Provider.ProjectManager.ProjectManager.saveConfig();
+ // print (str);
+ // this.get('view').el.get_buffer().get_text(project.runjs, project.runjs.length);
+ // ok pressed..
+ this.el.hide();
+ });
+ }
+
+ // user defined functions
+ public void show (Project.Project project) {
+ _this.project = project;
+ // get the active project.
+
+ //print (project.fn);
+ //project.runhtml = project.runhtml || '';
+ _this.view.el.get_buffer().set_text(project.runhtml);
+
+ this.el.show_all();
+ }
+ public class Xcls_Box2 : Object
+ {
+ public Gtk.Box el;
+ private RooProjectProperties _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Box2(RooProjectProperties _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.border_width = 5;
+ var child_0 = new Xcls_Label3( _this );
+ child_0.ref();
+ this.el.pack_start ( child_0.el , false,false,0 );
+ var child_1 = new Xcls_ScrolledWindow4( _this );
+ child_1.ref();
+ this.el.pack_end ( child_1.el , true,true,0 );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Label3 : Object
+ {
+ public Gtk.Label el;
+ private RooProjectProperties _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Label3(RooProjectProperties _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Label( "HTML To insert at end of <HEAD>" );
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_ScrolledWindow4 : Object
+ {
+ public Gtk.ScrolledWindow el;
+ private RooProjectProperties _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_ScrolledWindow4(RooProjectProperties _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.ScrolledWindow( null, null );
+
+ // my vars (dec)
+
+ // set gobject values
+ var child_0 = new Xcls_view( _this );
+ child_0.ref();
+ this.el.add ( child_0.el );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_view : Object
+ {
+ public Gtk.SourceView el;
+ private RooProjectProperties _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_view(RooProjectProperties _owner )
+ {
+ _this = _owner;
+ _this.view = this;
+ this.el = new Gtk.SourceView();
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ }
+
+
+
+ public class Xcls_Button6 : Object
+ {
+ public Gtk.Button el;
+ private RooProjectProperties _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Button6(RooProjectProperties _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Button();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.label = "OK";
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_Button7 : Object
+ {
+ public Gtk.Button el;
+ private RooProjectProperties _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Button7(RooProjectProperties _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Button();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.label = "Cancel";
+ }
+
+ // user defined functions
+ }
+
+}
--- /dev/null
+{
+ "id": "file-gtk-14",
+ "name": "StandardErrorDialog",
+ "parent": "",
+ "title": false,
+ "path": "/home/alan/gitlive/app.Builder.js/Builder4/StandardErrorDialog.bjs",
+ "items": [
+ {
+ "listeners": {
+ "delete_event": " (self, event) => {\n this.el.hide();\n return true;\n \n} \n",
+ "response": " (self, response_id) => {\n this.el.hide();\n}"
+ },
+ "text": "fixme",
+ "xtype": "MessageDialog",
+ "|buttons": "Gtk.ButtonsType.OK",
+ "|message_type": "Gtk.MessageType.ERROR",
+ "|modal": "true",
+ "|use_markup": "true",
+ "|void:show": " (Gtk.Window win, string msg) {\n\n this.el.set_transient_for(win);\n this.el.modal = true;\n this.el.text = msg;\n this.el.show_all();\n}\n",
+ "|xns": "Gtk"
+ }
+ ],
+ "permname": "",
+ "modOrder": ""
+}
\ No newline at end of file
--- /dev/null
+/* -- to compile
+valac --pkg gio-2.0 --pkg posix --pkg gtk+-3.0 --pkg libnotify --pkg gtksourceview-3.0 --pkg libwnck-3.0 \
+ /tmp/StandardErrorDialog.vala -o /tmp/StandardErrorDialog
+*/
+
+
+/* -- to test class
+static int main (string[] args) {
+ Gtk.init (ref args);
+ new Xcls_StandardErrorDialog();
+ StandardErrorDialog.show_all();
+ Gtk.main ();
+ return 0;
+}
+*/
+
+
+public static Xcls_StandardErrorDialog StandardErrorDialog;
+
+public class Xcls_StandardErrorDialog : Object
+{
+ public Gtk.MessageDialog el;
+ private Xcls_StandardErrorDialog _this;
+
+ public static Xcls_StandardErrorDialog singleton()
+ {
+ if (StandardErrorDialog == null) {
+ StandardErrorDialog= new Xcls_StandardErrorDialog();
+ }
+ return StandardErrorDialog;
+ }
+
+ // my vars
+
+ // ctor
+ public Xcls_StandardErrorDialog()
+ {
+ _this = this;
+ this.el = new Gtk.MessageDialog( null, Gtk.DialogFlags.MODAL, Gtk.MessageType.ERROR, Gtk.ButtonsType.OK, "fixme" );
+
+ // my vars
+
+ // set gobject values
+ this.el.modal = true;
+ this.el.use_markup = true;
+
+ // listeners
+ this.el.delete_event.connect( (self, event) => {
+ this.el.hide();
+ return true;
+
+ }
+ );
+ this.el.response.connect( (self, response_id) => {
+ this.el.hide();
+ } );
+ }
+
+ // userdefined functions
+ public void show (Gtk.Window win, string msg) {
+
+ this.el.set_transient_for(win);
+ this.el.modal = true;
+ this.el.text = msg;
+ this.el.show_all();
+ }
+
+ // skip |xns - no return type
+}
--- /dev/null
+{
+ "name" : "ValaCompileErrors",
+ "parent" : "",
+ "title" : "",
+ "path" : "/home/alan/gitlive/app.Builder.js/src/Builder4/ValaCompileErrors.bjs",
+ "permname" : "",
+ "modOrder" : "",
+ "build_module" : "builder",
+ "items" : [
+ {
+ "int height_request" : 800,
+ "id" : "ValaCompileErrors",
+ "Xcls_MainWindow window" : "",
+ "| void show" : "(Json.Object tree, Gtk.Widget onbtn) {\n\n \n this.file = null;\n this.notices = tree;\n \n //print(\"looking for %s\\n\", id);\n // loop through parent childnre\n \n \n var store = this.compile_result_store.el; \n \n store.clear();\n \n \n tree.foreach_member((obj, file, node) => {\n // id line \"display text\", file\n \n var title = GLib.Path.get_basename(GLib.Path.get_dirname( file)) + \"/\" + GLib.Path.get_basename( file) ;\n Gtk.TreeIter iter;\n print(\"Add file %s\", title);\n store.append(out iter, null);\n var lines = tree.get_object_member(file);\n title += \" (\" + lines.get_size().to_string() + \")\";\n store.set(iter, 0, file, 1, -1, 2, title, 3, file,-1);\n \n lines.foreach_member((obja, line, nodea) => {\n var msg = \"\";\n var ar = lines.get_array_member(line);\n for (var i = 0 ; i < ar.get_length(); i++) {\n \t\t msg += (msg.length > 0) ? \"\\n\" : \"\";\n \t\t msg += ar.get_string_element(i);\n\t }\n Gtk.TreeIter citer; \n print(\"Add line %s\", line);\n store.append(out citer, iter);\n store.set(citer, \n 0, file + \":\" + line, \n 1, int.parse(line), \n 2, GLib.Markup.escape_text(line + \": \" + msg), \n 3, file,-1);\n \n });\n \n \n \n });\n \n int w,h;\n this.window.el.get_size(out w, out h);\n \n // left tree = 250, editor area = 500?\n \n var new_w = int.min(250, w-100);\n if (new_w > (w-100)) {\n new_w = w-100;\n }\n this.el.set_size_request( int.max(100, new_w), int.max(100, h-120));\n\n \n\n if (this.el.relative_to == null) {\n this.el.set_relative_to(onbtn);\n }\n this.el.show_all();\n \n while(Gtk.events_pending()) { \n Gtk.main_iteration();\n } \n // this.hpane.el.set_position( 0);\n}\n",
+ "bool hexpand" : false,
+ "xtype" : "Popover",
+ "Gtk.PositionType position" : "Gtk.PositionType.TOP",
+ "bool active" : false,
+ "int width_request" : 900,
+ "$ xns" : "Gtk",
+ "JsRender.JsRender? file" : "",
+ "Json.Object notices" : "",
+ "bool modal" : true,
+ "items" : [
+ {
+ "id" : "compile_view",
+ "bool hexpand" : false,
+ "xtype" : "Box",
+ "* pack" : "add",
+ "gboolean homogeneous" : false,
+ "$ xns" : "Gtk",
+ "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
+ "items" : [
+ {
+ "xtype" : "Box",
+ "* pack" : "pack_start,false,false,0",
+ "$ xns" : "Gtk",
+ "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
+ "items" : [
+ {
+ "* pack" : "pack_start,true,true,0",
+ "xtype" : "Button",
+ "$ xns" : "Gtk",
+ "utf8 label" : "Compile and Run "
+ }
+ ]
+ },
+ {
+ "* init" : "{\n this.el.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);\n \n\n}\n",
+ "xtype" : "ScrolledWindow",
+ "* pack" : "pack_end,true,true,0",
+ "$ xns" : "Gtk",
+ "items" : [
+ {
+ "listeners" : {
+ "button_press_event" : " ( ev) => {\n \n Gtk.TreeViewColumn col;\n int cell_x;\n int cell_y;\n Gtk.TreePath path;\n if (!this.el.get_path_at_pos((int)ev.x, (int) ev.y, out path, out col, out cell_x, out cell_y )) {\n print(\"nothing selected on click\");\n \n return false; //not on a element.\n }\n \n \n // right click.\n if (ev.type != Gdk.EventType.2BUTTON_PRESS || ev.button != 1 ) { \n // show popup!. \n \n \n return false;\n }\n Gtk.TreeIter iter;\n var mod = _this.compile_result_store.el;\n mod.get_iter (out iter, path);\n \n \n \n // var val = \"\";\n GLib.Value value;\n _this.compile_result_store.el.get_value(iter, 3, out value);\n var fname = (string)value;\n GLib.Value lvalue;\n _this.compile_result_store.el.get_value(iter, 1, out lvalue);\n var line = (int) lvalue;\n \n print(\"open %s @ %d\\n\", fname, line);\n \n \n var bjsf = \"\";\n try { \n var regex = new Regex(\"\\\\.vala$\");\n \n \n bjsf = regex.replace(fname,fname.length , 0 , \".bjs\");\n } catch (GLib.RegexError e) {\n return false;\n } \n var p = _this.window.project;\n \n \n \n var jsr = p.getByPath(bjsf);\n if (jsr != null) {\n _this.window.windowstate.fileViewOpen(jsr, line);\n \n return false;\n \n }\n \n var pf = JsRender.JsRender.factory(\"PlainFile\", p, fname);\n _this.window.windowstate.fileViewOpen(pf,line);\n \n // try hiding the left nav..\n \n return false;\n \n }\n "
+ },
+ "id" : "compile_tree",
+ "* init" : "{\n var description = new Pango.FontDescription();\n description.set_size(8000);\n this.el.override_font(description);\n\n}\n",
+ "* pack" : "add",
+ "xtype" : "TreeView",
+ "$ xns" : "Gtk",
+ "items" : [
+ {
+ "gint n_columns" : 4,
+ "id" : "compile_result_store",
+ "columns" : " typeof(string), typeof(int), typeof(string), typeof(string) ",
+ "* pack" : "set_model",
+ "xtype" : "TreeStore",
+ "$ xns" : "Gtk"
+ },
+ {
+ "utf8 title" : "Compile output",
+ "* init" : "{\n this.el.add_attribute(_this.renderer.el , \"markup\", 2 );\n \n}\n",
+ "xtype" : "TreeViewColumn",
+ "* pack" : "append_column",
+ "string id" : "column",
+ "$ xns" : "Gtk",
+ "items" : [
+ {
+ "id" : "renderer",
+ "* pack" : "pack_start,true",
+ "xtype" : "CellRendererText",
+ "$ xns" : "Gtk"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}
--- /dev/null
+static Xcls_ValaCompileErrors _ValaCompileErrors;
+
+public class Xcls_ValaCompileErrors : Object
+{
+ public Gtk.Popover el;
+ private Xcls_ValaCompileErrors _this;
+
+ public static Xcls_ValaCompileErrors singleton()
+ {
+ if (_ValaCompileErrors == null) {
+ _ValaCompileErrors= new Xcls_ValaCompileErrors();
+ }
+ return _ValaCompileErrors;
+ }
+ public Xcls_compile_view compile_view;
+ public Xcls_compile_tree compile_tree;
+ public Xcls_compile_result_store compile_result_store;
+ public Xcls_renderer renderer;
+
+ // my vars (def)
+ public Xcls_MainWindow window;
+ public bool active;
+ public JsRender.JsRender? file;
+ public Json.Object notices;
+
+ // ctor
+ public Xcls_ValaCompileErrors()
+ {
+ _this = this;
+ this.el = new Gtk.Popover( null );
+
+ // my vars (dec)
+ this.active = false;
+
+ // set gobject values
+ this.el.width_request = 900;
+ this.el.height_request = 800;
+ this.el.hexpand = false;
+ this.el.modal = true;
+ this.el.position = Gtk.PositionType.TOP;
+ var child_0 = new Xcls_compile_view( _this );
+ child_0.ref();
+ this.el.add ( child_0.el );
+ }
+
+ // user defined functions
+ public void show (Json.Object tree, Gtk.Widget onbtn) {
+
+
+ this.file = null;
+ this.notices = tree;
+
+ //print("looking for %s\n", id);
+ // loop through parent childnre
+
+
+ var store = this.compile_result_store.el;
+
+ store.clear();
+
+
+ tree.foreach_member((obj, file, node) => {
+ // id line "display text", file
+
+ var title = GLib.Path.get_basename(GLib.Path.get_dirname( file)) + "/" + GLib.Path.get_basename( file) ;
+ Gtk.TreeIter iter;
+ print("Add file %s", title);
+ store.append(out iter, null);
+ var lines = tree.get_object_member(file);
+ title += " (" + lines.get_size().to_string() + ")";
+ store.set(iter, 0, file, 1, -1, 2, title, 3, file,-1);
+
+ lines.foreach_member((obja, line, nodea) => {
+ var msg = "";
+ var ar = lines.get_array_member(line);
+ for (var i = 0 ; i < ar.get_length(); i++) {
+ msg += (msg.length > 0) ? "\n" : "";
+ msg += ar.get_string_element(i);
+ }
+ Gtk.TreeIter citer;
+ print("Add line %s", line);
+ store.append(out citer, iter);
+ store.set(citer,
+ 0, file + ":" + line,
+ 1, int.parse(line),
+ 2, GLib.Markup.escape_text(line + ": " + msg),
+ 3, file,-1);
+
+ });
+
+
+
+ });
+
+ int w,h;
+ this.window.el.get_size(out w, out h);
+
+ // left tree = 250, editor area = 500?
+
+ var new_w = int.min(250, w-100);
+ if (new_w > (w-100)) {
+ new_w = w-100;
+ }
+ this.el.set_size_request( int.max(100, new_w), int.max(100, h-120));
+
+
+
+ if (this.el.relative_to == null) {
+ this.el.set_relative_to(onbtn);
+ }
+ this.el.show_all();
+
+ while(Gtk.events_pending()) {
+ Gtk.main_iteration();
+ }
+ // this.hpane.el.set_position( 0);
+ }
+ public class Xcls_compile_view : Object
+ {
+ public Gtk.Box el;
+ private Xcls_ValaCompileErrors _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_compile_view(Xcls_ValaCompileErrors _owner )
+ {
+ _this = _owner;
+ _this.compile_view = this;
+ this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.homogeneous = false;
+ this.el.hexpand = false;
+ var child_0 = new Xcls_Box3( _this );
+ child_0.ref();
+ this.el.pack_start ( child_0.el , false,false,0 );
+ var child_1 = new Xcls_ScrolledWindow5( _this );
+ child_1.ref();
+ this.el.pack_end ( child_1.el , true,true,0 );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Box3 : Object
+ {
+ public Gtk.Box el;
+ private Xcls_ValaCompileErrors _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Box3(Xcls_ValaCompileErrors _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
+
+ // my vars (dec)
+
+ // set gobject values
+ var child_0 = new Xcls_Button4( _this );
+ child_0.ref();
+ this.el.pack_start ( child_0.el , true,true,0 );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Button4 : Object
+ {
+ public Gtk.Button el;
+ private Xcls_ValaCompileErrors _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Button4(Xcls_ValaCompileErrors _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Button();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.label = "Compile and Run ";
+ }
+
+ // user defined functions
+ }
+
+
+ public class Xcls_ScrolledWindow5 : Object
+ {
+ public Gtk.ScrolledWindow el;
+ private Xcls_ValaCompileErrors _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_ScrolledWindow5(Xcls_ValaCompileErrors _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.ScrolledWindow( null, null );
+
+ // my vars (dec)
+
+ // set gobject values
+ var child_0 = new Xcls_compile_tree( _this );
+ child_0.ref();
+ this.el.add ( child_0.el );
+
+ // init method
+
+ {
+ this.el.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);
+
+
+ }
+ }
+
+ // user defined functions
+ }
+ public class Xcls_compile_tree : Object
+ {
+ public Gtk.TreeView el;
+ private Xcls_ValaCompileErrors _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_compile_tree(Xcls_ValaCompileErrors _owner )
+ {
+ _this = _owner;
+ _this.compile_tree = this;
+ this.el = new Gtk.TreeView();
+
+ // my vars (dec)
+
+ // set gobject values
+ var child_0 = new Xcls_compile_result_store( _this );
+ child_0.ref();
+ this.el.set_model ( child_0.el );
+ var child_1 = new Xcls_column( _this );
+ child_1.ref();
+ this.el.append_column ( child_1.el );
+
+ // init method
+
+ {
+ var description = new Pango.FontDescription();
+ description.set_size(8000);
+ this.el.override_font(description);
+
+ }
+
+ //listeners
+ this.el.button_press_event.connect( ( ev) => {
+
+ Gtk.TreeViewColumn col;
+ int cell_x;
+ int cell_y;
+ Gtk.TreePath path;
+ if (!this.el.get_path_at_pos((int)ev.x, (int) ev.y, out path, out col, out cell_x, out cell_y )) {
+ print("nothing selected on click");
+
+ return false; //not on a element.
+ }
+
+
+ // right click.
+ if (ev.type != Gdk.EventType.2BUTTON_PRESS || ev.button != 1 ) {
+ // show popup!.
+
+
+ return false;
+ }
+ Gtk.TreeIter iter;
+ var mod = _this.compile_result_store.el;
+ mod.get_iter (out iter, path);
+
+
+
+ // var val = "";
+ GLib.Value value;
+ _this.compile_result_store.el.get_value(iter, 3, out value);
+ var fname = (string)value;
+ GLib.Value lvalue;
+ _this.compile_result_store.el.get_value(iter, 1, out lvalue);
+ var line = (int) lvalue;
+
+ print("open %s @ %d\n", fname, line);
+
+
+ var bjsf = "";
+ try {
+ var regex = new Regex("\\.vala$");
+
+
+ bjsf = regex.replace(fname,fname.length , 0 , ".bjs");
+ } catch (GLib.RegexError e) {
+ return false;
+ }
+ var p = _this.window.project;
+
+
+
+ var jsr = p.getByPath(bjsf);
+ if (jsr != null) {
+ _this.window.windowstate.fileViewOpen(jsr, line);
+
+ return false;
+
+ }
+
+ var pf = JsRender.JsRender.factory("PlainFile", p, fname);
+ _this.window.windowstate.fileViewOpen(pf,line);
+
+ // try hiding the left nav..
+
+ return false;
+
+ });
+ }
+
+ // user defined functions
+ }
+ public class Xcls_compile_result_store : Object
+ {
+ public Gtk.TreeStore el;
+ private Xcls_ValaCompileErrors _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_compile_result_store(Xcls_ValaCompileErrors _owner )
+ {
+ _this = _owner;
+ _this.compile_result_store = this;
+ this.el = new Gtk.TreeStore( 4, typeof(string), typeof(int), typeof(string), typeof(string) );
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_column : Object
+ {
+ public Gtk.TreeViewColumn el;
+ private Xcls_ValaCompileErrors _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_column(Xcls_ValaCompileErrors _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.TreeViewColumn();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.title = "Compile output";
+ var child_0 = new Xcls_renderer( _this );
+ child_0.ref();
+ this.el.pack_start ( child_0.el , true );
+
+ // init method
+
+ {
+ this.el.add_attribute(_this.renderer.el , "markup", 2 );
+
+ }
+ }
+
+ // user defined functions
+ }
+ public class Xcls_renderer : Object
+ {
+ public Gtk.CellRendererText el;
+ private Xcls_ValaCompileErrors _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_renderer(Xcls_ValaCompileErrors _owner )
+ {
+ _this = _owner;
+ _this.renderer = this;
+ this.el = new Gtk.CellRendererText();
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ }
+
+
+
+
+
+}
--- /dev/null
+{
+ "name" : "ValaCompileResults",
+ "parent" : "",
+ "title" : "",
+ "path" : "/home/alan/gitlive/app.Builder.js/src/Builder4/ValaCompileResults.bjs",
+ "permname" : "",
+ "modOrder" : "",
+ "build_module" : "builder",
+ "items" : [
+ {
+ "int height_request" : 400,
+ "id" : "ValaCompileResults",
+ "| void show" : "( Gtk.Widget onbtn, bool reset) {\n\tint w, h;\n \n\tthis.window.el.get_size(out w, out h);\n \n // left tree = 250, editor area = 500?\n \n var new_w = int.min(750, w-100);\n if (new_w > (w-100)) {\n new_w = w-100;\n }\n this.el.set_size_request( int.max(100, new_w), int.max(100, h-120));\n \n\n if (this.el.relative_to == null) {\n this.el.set_relative_to(onbtn);\n }\n this.el.show_all();\n // not sure why..\n \n if (reset) {\n\t\tvar buf = (Gtk.SourceBuffer)this.sourceview.el.get_buffer();\n\t\tbuf.set_text(\"\",0);\n\t}\n \n while(Gtk.events_pending()) { \n Gtk.main_iteration();\n }\n \n \n \n}\n",
+ "Xcls_MainWindow window" : "",
+ "xtype" : "Popover",
+ "Gtk.PositionType position" : "Gtk.PositionType.TOP",
+ "bool active" : true,
+ "int width_request" : 600,
+ "$ xns" : "Gtk",
+ "| void addLine" : "(string str) {\n\tvar buf = (Gtk.SourceBuffer)this.sourceview.el.get_buffer();\n\tGtk.TextIter iter;\n\tbuf.get_end_iter (out iter);\n\tbuf.insert(ref iter, str, str.length);\n\t/// scroll..\n\tbuf.get_end_iter (out iter);\n\tthis.sourceview.el.scroll_to_iter(iter, 0.0f, true, 0.0f, 1.0f);\n\t\n\n}\n",
+ "bool modal" : true,
+ "items" : [
+ {
+ "id" : "compile_view",
+ "* pack" : "add",
+ "xtype" : "Box",
+ "gboolean homogeneous" : false,
+ "$ xns" : "Gtk",
+ "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
+ "items" : [
+ {
+ "* init" : "{\n this.el.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);\n \n\n}\n",
+ "bool hexpand" : true,
+ "* pack" : "pack_end,true,true,0",
+ "xtype" : "ScrolledWindow",
+ "$ xns" : "Gtk",
+ "items" : [
+ {
+ "id" : "sourceview",
+ "* init" : "{\n\n var description = Pango.FontDescription.from_string(\"monospace\");\n description.set_size(8000);\n this.el.override_font(description);\n\n\n}\n",
+ "xtype" : "SourceView",
+ "* pack" : "add",
+ "bool editable" : false,
+ "$ xns" : "Gtk",
+ "bool show_line_numbers" : false
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file
--- /dev/null
+static Xcls_ValaCompileResults _ValaCompileResults;
+
+public class Xcls_ValaCompileResults : Object
+{
+ public Gtk.Popover el;
+ private Xcls_ValaCompileResults _this;
+
+ public static Xcls_ValaCompileResults singleton()
+ {
+ if (_ValaCompileResults == null) {
+ _ValaCompileResults= new Xcls_ValaCompileResults();
+ }
+ return _ValaCompileResults;
+ }
+ public Xcls_compile_view compile_view;
+ public Xcls_sourceview sourceview;
+
+ // my vars (def)
+ public Xcls_MainWindow window;
+ public bool active;
+
+ // ctor
+ public Xcls_ValaCompileResults()
+ {
+ _this = this;
+ this.el = new Gtk.Popover( null );
+
+ // my vars (dec)
+ this.active = true;
+
+ // set gobject values
+ this.el.width_request = 600;
+ this.el.height_request = 400;
+ this.el.modal = true;
+ this.el.position = Gtk.PositionType.TOP;
+ var child_0 = new Xcls_compile_view( _this );
+ child_0.ref();
+ this.el.add ( child_0.el );
+ }
+
+ // user defined functions
+ public void show ( Gtk.Widget onbtn, bool reset) {
+ int w, h;
+
+ this.window.el.get_size(out w, out h);
+
+ // left tree = 250, editor area = 500?
+
+ var new_w = int.min(750, w-100);
+ if (new_w > (w-100)) {
+ new_w = w-100;
+ }
+ this.el.set_size_request( int.max(100, new_w), int.max(100, h-120));
+
+
+ if (this.el.relative_to == null) {
+ this.el.set_relative_to(onbtn);
+ }
+ this.el.show_all();
+ // not sure why..
+
+ if (reset) {
+ var buf = (Gtk.SourceBuffer)this.sourceview.el.get_buffer();
+ buf.set_text("",0);
+ }
+
+ while(Gtk.events_pending()) {
+ Gtk.main_iteration();
+ }
+
+
+
+ }
+ public void addLine (string str) {
+ var buf = (Gtk.SourceBuffer)this.sourceview.el.get_buffer();
+ Gtk.TextIter iter;
+ buf.get_end_iter (out iter);
+ buf.insert(ref iter, str, str.length);
+ /// scroll..
+ buf.get_end_iter (out iter);
+ this.sourceview.el.scroll_to_iter(iter, 0.0f, true, 0.0f, 1.0f);
+
+
+ }
+ public class Xcls_compile_view : Object
+ {
+ public Gtk.Box el;
+ private Xcls_ValaCompileResults _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_compile_view(Xcls_ValaCompileResults _owner )
+ {
+ _this = _owner;
+ _this.compile_view = this;
+ this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.homogeneous = false;
+ var child_0 = new Xcls_ScrolledWindow3( _this );
+ child_0.ref();
+ this.el.pack_end ( child_0.el , true,true,0 );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_ScrolledWindow3 : Object
+ {
+ public Gtk.ScrolledWindow el;
+ private Xcls_ValaCompileResults _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_ScrolledWindow3(Xcls_ValaCompileResults _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.ScrolledWindow( null, null );
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.hexpand = true;
+ var child_0 = new Xcls_sourceview( _this );
+ child_0.ref();
+ this.el.add ( child_0.el );
+
+ // init method
+
+ {
+ this.el.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);
+
+
+ }
+ }
+
+ // user defined functions
+ }
+ public class Xcls_sourceview : Object
+ {
+ public Gtk.SourceView el;
+ private Xcls_ValaCompileResults _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_sourceview(Xcls_ValaCompileResults _owner )
+ {
+ _this = _owner;
+ _this.sourceview = this;
+ this.el = new Gtk.SourceView();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.editable = false;
+ this.el.show_line_numbers = false;
+
+ // init method
+
+ {
+
+ var description = Pango.FontDescription.from_string("monospace");
+ description.set_size(8000);
+ this.el.override_font(description);
+
+
+ }
+ }
+
+ // user defined functions
+ }
+
+
+
+}
--- /dev/null
+{
+ "name" : "ValaProjectSettings",
+ "parent" : "",
+ "title" : "",
+ "path" : "/home/alan/gitlive/app.Builder.js/src/Builder4/ValaProjectSettings.bjs",
+ "permname" : "",
+ "modOrder" : "",
+ "build_module" : "builder",
+ "items" : [
+ {
+ "# Project.Gtk project" : "null",
+ "# Xcls_MainWindow window" : "null",
+ "| void show" : "(Project.Gtk project) {\n \n \n print(\"ValaProjectSettings show\\n\");\n \n this.project= project;\n\n this.compile_flags.el.text = _this.project.compilegroups.get(\"_default_\").compile_flags;\n \n this.default_directory_tree_store.load(); \n this.default_packages_tree_store.load(); \n this.targets_tree_store.load();\n this.files_tree_store.load();\n\n}\n",
+ "bool hexpand" : true,
+ "xtype" : "Box",
+ "string id" : "ValaProjectSettings",
+ "| void save" : "() {\n this.project.writeConfig();\n}",
+ "$ xns" : "Gtk",
+ "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
+ "items" : [
+ {
+ "* pack" : "pack_start,true,true,0",
+ "xtype" : "Notebook",
+ "$ xns" : "Gtk",
+ "items" : [
+ {
+ "id" : "label_global",
+ "* pack" : false,
+ "xtype" : "Label",
+ "$ xns" : "Gtk",
+ "utf8 label" : "Global"
+ },
+ {
+ "id" : "label_targets",
+ "xtype" : "Label",
+ "* pack" : false,
+ "$ xns" : "Gtk",
+ "utf8 label" : "Targets"
+ },
+ {
+ "xtype" : "Box",
+ "* pack" : "append_page,_this.label_global.el",
+ "gboolean homogeneous" : false,
+ "$ xns" : "Gtk",
+ "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
+ "items" : [
+ {
+ "xtype" : "Label",
+ "* pack" : "pack_start,false,false,0",
+ "$ xns" : "Gtk",
+ "utf8 label" : "compile flags"
+ },
+ {
+ "listeners" : {
+ "changed" : "() => {\n \n _this.project.compilegroups.get(\"_default_\").compile_flags = this.el.text;\n _this.project.writeConfig();\n// _this.project.save();\n\n}"
+ },
+ "id" : "compile_flags",
+ "* pack" : "pack_start,false,false,0",
+ "xtype" : "Entry",
+ "$ xns" : "Gtk",
+ "utf8 placeholder_text" : "eg. -g --valasrc $BASEDIR "
+ },
+ {
+ "* pack" : "pack_start,true,true,0",
+ "xtype" : "Paned",
+ "$ xns" : "Gtk",
+ "int position" : 300,
+ "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
+ "items" : [
+ {
+ "bool hexpand" : true,
+ "* pack" : "add",
+ "xtype" : "ScrolledWindow",
+ "$ xns" : "Gtk",
+ "items" : [
+ {
+ "gboolean headers_visible" : true,
+ "xtype" : "TreeView",
+ "* pack" : "add",
+ "string id" : "default_packages_tree",
+ "$ xns" : "Gtk",
+ "items" : [
+ {
+ "id" : "default_packages_tree_store",
+ "xtype" : "ListStore",
+ "* pack" : "set_model",
+ "$ n_columns" : 2,
+ "| void load" : "() {\n \n var def = _this.project.compilegroups.get(\"_default_\");\n var items = def.packages;\n \n this.el.clear();\n var pal = (Palete.Gtk) Palete.factory(\"Gtk\");\n var pkgs = pal.packages(_this.project);\n print(\"ValaProjectSettings:packages load %d\\n\", pkgs.size);\n\n Gtk.TreeIter citer;\n\n for(var i =0 ; i < pkgs.size; i++) {\n this.el.append(out citer); \n \n this.el.set_value(citer, 0, pkgs.get(i) ); // title \n this.el.set_value(citer, 1, items.contains(pkgs.get(i)) );\n }\n this.el.set_sort_column_id(0,Gtk.SortType.ASCENDING);\n \n}\n",
+ "$ columns" : " typeof(string), // 0 key type\n typeof(bool)",
+ "$ xns" : "Gtk"
+ },
+ {
+ "utf8 title" : "package name",
+ "* init" : " \n this.el.add_attribute(_this.packages_render.el , \"text\", 0 );\n ",
+ "* pack" : "append_column",
+ "xtype" : "TreeViewColumn",
+ "gboolean resizable" : true,
+ "gboolean expand" : true,
+ "$ xns" : "Gtk",
+ "items" : [
+ {
+ "id" : "packages_render",
+ "xtype" : "CellRendererText",
+ "* pack" : "pack_start,false",
+ "$ xns" : "Gtk"
+ }
+ ]
+ },
+ {
+ "utf8 title" : "use",
+ "* init" : "{\n this.el.add_attribute(_this.packages_render_use.el , \"active\", 1 );\n }",
+ "* pack" : "append_column",
+ "xtype" : "TreeViewColumn",
+ "gboolean resizable" : false,
+ "$ xns" : "Gtk",
+ "gint fixed_width" : 50,
+ "items" : [
+ {
+ "listeners" : {
+ "toggled" : "( path_string) => { \n var m = _this.default_packages_tree_store.el;\n Gtk.TreeIter iter;\n Gtk.TreePath path = new Gtk.TreePath.from_string (path_string);\n m.get_iter (out iter, path);\n GLib.Value val;\n m.get_value(iter, 1, out val);\n m.set_value(iter, 1, ((bool) val) ? false :true); \n GLib.Value fval; \n m.get_value(iter, 0, out fval);\n var fn = (string)fval;\n \n var def = _this.project.compilegroups.get(\"_default_\");\n var items = def.packages;\n if ((bool)val) {\n // renive\n items.remove(fn);\n } else {\n items.add(fn);\n }\n \n}"
+ },
+ "id" : "packages_render_use",
+ "* pack" : "pack_start,false",
+ "xtype" : "CellRendererToggle",
+ "$ xns" : "Gtk",
+ "gboolean activatable" : true
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "bool hexpand" : true,
+ "* pack" : "add2",
+ "xtype" : "ScrolledWindow",
+ "$ xns" : "Gtk",
+ "items" : [
+ {
+ "listeners" : {
+ "button_press_event" : " ( ev) => {\n //console.log(\"button press?\");\n \n \n if (ev.type != Gdk.EventType.BUTTON_PRESS || ev.button != 3) {\n //print(\"click\" + ev.type);\n return false;\n }\n //Gtk.TreePath res;\n //if (!this.el.get_path_at_pos((int)ev.x,(int)ev.y, out res, null, null, null) ) {\n // return true;\n //}\n \n // this.el.get_selection().select_path(res);\n \n //if (!this.get('/LeftTreeMenu').el) { \n // this.get('/LeftTreeMenu').init(); \n // }\n \n _this.default_directory_menu.el.set_screen(Gdk.Screen.get_default());\n _this.default_directory_menu.el.show_all();\n _this.default_directory_menu.el.popup(null, null, null, 3, ev.time);\n // print(\"click:\" + res.path.to_string());\n return true;\n}"
+ },
+ "gboolean headers_visible" : true,
+ "id" : "default_directory_tree",
+ "* pack" : "add",
+ "xtype" : "TreeView",
+ "$ xns" : "Gtk",
+ "items" : [
+ {
+ "id" : "default_directory_tree_store",
+ "xtype" : "ListStore",
+ "* pack" : "set_model",
+ "$ n_columns" : 1,
+ "| void load" : "() {\n \n this.el.clear();\n \n \n var def = _this.project.compilegroups.get(\"_default_\");\n var items = def.sources;\n \n \n Gtk.TreeIter citer;\n\n for(var i =0 ; i < items.size; i++) {\n this.el.append(out citer); \n \n this.el.set_value(citer, 0, items.get(i) ); // title \n //this.el.set_value(citer, 1, items.get(i) );\n }\n this.el.set_sort_column_id(0,Gtk.SortType.ASCENDING);\n \n}\n",
+ "$ columns" : " typeof(string)\n ",
+ "$ xns" : "Gtk"
+ },
+ {
+ "utf8 title" : "Available Directories (right click to add)",
+ "* init" : "\n this.el.add_attribute(_this.directory_render.el , \"text\", 0 );\n ",
+ "* pack" : "append_column",
+ "xtype" : "TreeViewColumn",
+ "gboolean resizable" : true,
+ "$ xns" : "Gtk",
+ "items" : [
+ {
+ "id" : "directory_render",
+ "xtype" : "CellRendererText",
+ "* pack" : "pack_start,false",
+ "$ xns" : "Gtk"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "id" : "default_directory_menu",
+ "xtype" : "Menu",
+ "$ xns" : "Gtk",
+ "items" : [
+ {
+ "listeners" : {
+ "activate" : "() => {\n \n var chooser = new Gtk.FileChooserDialog (\n\t\"Add a directory\", _this.window.el, Gtk.FileChooserAction.SELECT_FOLDER ,\n\t\"_Cancel\",\n\tGtk.ResponseType.CANCEL,\n\t\"_Add\",\n\tGtk.ResponseType.ACCEPT);\n if (chooser.run () != Gtk.ResponseType.ACCEPT) {\n chooser.close ();\n return;\n }\n chooser.close ();\n // add the directory..\n var fn = _this.project.relPath(chooser.get_filename());\n _this.project.compilegroups.get(\"_default_\").sources.add(fn);\n _this.default_directory_tree_store.load();\n}"
+ },
+ "* pack" : "add",
+ "xtype" : "MenuItem",
+ "$ xns" : "Gtk",
+ "utf8 label" : "Add Directory"
+ },
+ {
+ "listeners" : {
+ "activate" : "() => {\n \n var chooser = new Gtk.FileChooserDialog (\n\t\"Add a directory\", _this.window.el, Gtk.FileChooserAction.OPEN ,\n\t\"_Cancel\",\n\tGtk.ResponseType.CANCEL,\n\t\"_Add\",\n\tGtk.ResponseType.ACCEPT);\n if (chooser.run () != Gtk.ResponseType.ACCEPT) {\n chooser.close ();\n return;\n }\n chooser.close ();\n // add the directory..\n var fn = _this.project.relPath(chooser.get_filename());\n _this.project.compilegroups.get(\"_default_\").sources.add(fn);\n _this.default_directory_tree_store.load();\n}"
+ },
+ "* pack" : "add",
+ "xtype" : "MenuItem",
+ "$ xns" : "Gtk",
+ "utf8 label" : "Add File"
+ },
+ {
+ "* pack" : "add",
+ "xtype" : "SeparatorMenuItem",
+ "$ xns" : "Gtk"
+ },
+ {
+ "listeners" : {
+ "activate" : "() => {\n \n //\n Gtk.TreeModel mod;\n Gtk.TreeIter iter;\n if (!_this.default_directory_tree.el.get_selection().get_selected(out mod, out iter)) {\n print(\"nothing selected\\n\");\n return;\n }\n\n \n // add the directory..\n \n \n GLib.Value val;\n mod.get_value(iter,0, out val);\n var fn = (string) val;\n \n print(\"remove: %s\\n\", fn);\n if (!_this.project.compilegroups.get(\"_default_\").sources.remove(fn)) {\n print(\"remove failed\");\n }\n _this.default_directory_tree_store.load();\n}"
+ },
+ "* pack" : "add",
+ "xtype" : "MenuItem",
+ "$ xns" : "Gtk",
+ "utf8 label" : "Remove File/Directory"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "gint position" : 300,
+ "* pack" : "append_page,_this.label_targets.el",
+ "xtype" : "Paned",
+ "$ xns" : "Gtk",
+ "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
+ "items" : [
+ {
+ "* init" : "{ \nthis.el.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);\n\n}\n",
+ "* pack" : "add1",
+ "xtype" : "ScrolledWindow",
+ "$ xns" : "Gtk",
+ "items" : [
+ {
+ "id" : "targets_tree_menu",
+ "xtype" : "Menu",
+ "* pack" : "add",
+ "$ xns" : "Gtk",
+ "items" : [
+ {
+ "listeners" : {
+ "activate" : "() => {\n \n if (_this.project.compilegroups.has_key(\"NEW GROUP\")) {\n return;\n }\n \n // add the directory..\n \n _this.project.compilegroups.set(\"NEW GROUP\", new Project.GtkValaSettings(\"NEW GROUP\"));\n _this.targets_tree_store.load();\n}"
+ },
+ "* pack" : "add",
+ "xtype" : "MenuItem",
+ "$ xns" : "Gtk",
+ "utf8 label" : "Add Compile Target"
+ },
+ {
+ "* pack" : "add",
+ "xtype" : "SeparatorMenuItem",
+ "$ xns" : "Gtk"
+ },
+ {
+ "listeners" : {
+ "activate" : "() => {\n \n //\n Gtk.TreeModel mod;\n Gtk.TreeIter iter;\n if (!_this.targets_tree.el.get_selection().get_selected(out mod, out iter)) {\n print(\"nothing selected\\n\");\n return;\n }\n\n \n // add the directory..\n \n \n GLib.Value val;\n mod.get_value(iter,0, out val);\n var fn = (string) val;\n \n print(\"remove: %s\\n\", fn);\n if (!_this.project.compilegroups.unset(fn)) {\n print(\"remove failed\");\n }\n _this.targets_tree_store.load();\n}"
+ },
+ "* pack" : "add",
+ "xtype" : "MenuItem",
+ "$ xns" : "Gtk",
+ "utf8 label" : "Remove Target"
+ }
+ ]
+ },
+ {
+ "listeners" : {
+ "button_press_event" : " ( ev) => {\n //console.log(\"button press?\");\n \n \n if (ev.type != Gdk.EventType.BUTTON_PRESS || ev.button != 3) {\n //print(\"click\" + ev.type);\n return false;\n }\n //Gtk.TreePath res;\n //if (!this.el.get_path_at_pos((int)ev.x,(int)ev.y, out res, null, null, null) ) {\n // return true;\n //}\n \n // this.el.get_selection().select_path(res);\n \n //if (!this.get('/LeftTreeMenu').el) { \n // this.get('/LeftTreeMenu').init(); \n // }\n \n _this.targets_tree_menu.el.set_screen(Gdk.Screen.get_default());\n _this.targets_tree_menu.el.show_all();\n _this.targets_tree_menu.el.popup(null, null, null, 3, ev.time);\n // print(\"click:\" + res.path.to_string());\n return true;\n}",
+ "cursor_changed" : " ( ) => {\n\n if (this.cursor != \"\") {\n // save the values..\n }\n \n // load the new values.\n \n\n Gtk.TreeModel mod;\n Gtk.TreeIter iter;\n if (!this.el.get_selection().get_selected(out mod, out iter)) {\n print(\"nothing selected\\n\");\n // should disable the right hand side..\n _this.set_vbox.el.hide();\n return;\n }\n _this.set_vbox.el.show();\n \n // add the directory..\n \n \n GLib.Value val;\n mod.get_value(iter,0, out val);\n var fn = (string) val;\n \n this.cursor = fn;\n var cg = _this.project.compilegroups.get(fn);\n \n _this.build_pack_target.el.set_text(cg.target_bin);\n _this.build_compile_flags.el.set_text(cg.compile_flags);\n\t\t_this.build_execute_args.el.set_text(cg.execute_args);\n \n _this.set_vbox.cgroup = cg;\n _this.files_tree_store.update();\n \n // load the srouces\n \n\n }"
+ },
+ "id" : "targets_tree",
+ "# string cursor" : "",
+ "* pack" : "add",
+ "xtype" : "TreeView",
+ "$ xns" : "Gtk",
+ "items" : [
+ {
+ "id" : "targets_tree_store",
+ "* pack" : "set_model",
+ "xtype" : "ListStore",
+ "$ n_columns" : 2,
+ "| void load" : "() {\n \n this.el.clear();\n \n \n var cg = _this.project.compilegroups;\n \n _this.targets_tree.cursor = \"\";\n Gtk.TreeIter citer;\n var iter = cg.map_iterator();\n while(iter.next()) {\n var key = iter.get_key();\n if (key == \"_default_\") {\n continue;\n }\n \n this.el.append(out citer); \n \n this.el.set_value(citer, 0, key ); // title \n //this.el.set_value(citer, 1, items.get(i) );\n };\n this.el.set_sort_column_id(0,Gtk.SortType.ASCENDING);\n _this.set_vbox.el.hide();\n}\n",
+ "$ columns" : " typeof(string), // 0 key type\n typeof(string) // ??\n ",
+ "$ xns" : "Gtk"
+ },
+ {
+ "utf8 title" : "name",
+ "* init" : " {\n this.el.add_attribute(_this.targets_render.el , \"text\", 0 );\n }",
+ "* pack" : "append_column",
+ "xtype" : "TreeViewColumn",
+ "gboolean resizable" : true,
+ "$ xns" : "Gtk",
+ "items" : [
+ {
+ "listeners" : {
+ "edited" : " (path, newtext) => {\n \n Gtk.TreeIter iter;\n _this.targets_tree_store.el.get_iter(out iter, new Gtk.TreePath.from_string(path));\n GLib.Value gval;\n _this.targets_tree_store.el.get_value(iter,0, out gval);\n var oldval = (string)gval;\n if (oldval == newtext) {\n return;\n }\n var cg = _this.project.compilegroups.get(oldval);\n cg.name = newtext;\n _this.project.compilegroups.unset(oldval);\n _this.project.compilegroups.set(newtext, cg);\n _this.targets_tree_store.load();\n }"
+ },
+ "id" : "targets_render",
+ "* pack" : "pack_start,false",
+ "xtype" : "CellRendererText",
+ "$ xns" : "Gtk",
+ "gboolean editable" : true
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "id" : "set_vbox",
+ "* pack" : "add2",
+ "xtype" : "Box",
+ "gboolean homogeneous" : false,
+ "$ xns" : "Gtk",
+ "# Project.GtkValaSettings cgroup" : "null",
+ "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
+ "items" : [
+ {
+ "xtype" : "Label",
+ "* pack" : "pack_start,false,false,0",
+ "$ xns" : "Gtk",
+ "utf8 label" : "target filename"
+ },
+ {
+ "listeners" : {
+ "changed" : "() => {\n if (_this.targets_tree.cursor.length < 1) {\n return;\n }\n _this.project.compilegroups.get(_this.targets_tree.cursor).target_bin = this.el.text;\n}"
+ },
+ "id" : "build_pack_target",
+ "* pack" : "pack_start,false,false,0",
+ "xtype" : "Entry",
+ "$ xns" : "Gtk"
+ },
+ {
+ "xtype" : "Label",
+ "* pack" : "pack_start,false,false,0",
+ "$ xns" : "Gtk",
+ "utf8 label" : "compile flags"
+ },
+ {
+ "listeners" : {
+ "changed" : "() => {\n if (_this.targets_tree.cursor.length < 1) {\n return;\n }\n _this.project.compilegroups.get(_this.targets_tree.cursor).compile_flags = this.el.text;\n}"
+ },
+ "id" : "build_compile_flags",
+ "* pack" : "pack_start,false,false,0",
+ "xtype" : "Entry",
+ "$ xns" : "Gtk"
+ },
+ {
+ "xtype" : "Label",
+ "* pack" : "pack_start,false,false,0",
+ "$ xns" : "Gtk",
+ "utf8 label" : "test argments - when run after a build"
+ },
+ {
+ "listeners" : {
+ "changed" : "() => {\n if (_this.targets_tree.cursor.length < 1) {\n return;\n }\n _this.project.compilegroups.get(_this.targets_tree.cursor).execute_args = this.el.text;\n}"
+ },
+ "id" : "build_execute_args",
+ "string placeholder_text" : "eg. -f somefile -g ",
+ "xtype" : "Entry",
+ "* pack" : "pack_start,false,false,0",
+ "$ xns" : "Gtk"
+ },
+ {
+ "xtype" : "Label",
+ "* pack" : "pack_start,false,false,0",
+ "$ xns" : "Gtk",
+ "utf8 label" : "Files to compile"
+ },
+ {
+ "* pack" : "pack_start,true,true,0",
+ "xtype" : "ScrolledWindow",
+ "$ xns" : "Gtk",
+ "items" : [
+ {
+ "xtype" : "TreeView",
+ "* pack" : "add",
+ "string id" : "files_tree",
+ "$ xns" : "Gtk",
+ "items" : [
+ {
+ "id" : "files_tree_store",
+ "* pack" : "set_model",
+ "xtype" : "ListStore",
+ "| void updateDir" : "(string dname, bool bval) {\n \n Gtk.TreeIter citer;\n\n var cg = _this.set_vbox.cgroup;\n for(var i =0 ; i < this.el.iter_n_children(null); i++) {\n this.el.iter_nth_child(out citer,null,i);\n\n GLib.Value val;\n this.el.get_value(citer,0, out val);\n var fn = (string) val;\n \n if ( Path.get_dirname (fn) == dname) {\n \n this.el.set_value(citer, 3, bval ); // checked \n \n \n \n if (!bval) {\n // renive\n if (cg.sources.contains(fn)) {\n cg.sources.remove(fn);\n }\n } else {\n if (!cg.sources.contains(fn)) {\n cg.sources.add(fn);\n }\n }\n \n \n }\n }\n\n}\n",
+ "$ n_columns" : 4,
+ "| void load" : "() {\n \n this.el.clear();\n \n \n var def = _this.project.compilegroups.get(\"_default_\");\n var items = def.sources;\n \n \n \n \n \n Gtk.TreeIter citer;\n\n for(var i =0 ; i < items.size; i++) {\n \n var files = _this.project.filesForCompile(items.get(i), false);\n if (files.size < 1) {\n continue;\n }\n \n this.el.append(out citer); \n \n this.el.set_value(citer, 0, items.get(i) ); // title \n this.el.set_value(citer, 1, \"<span foreground=\\\"green\\\" font_weight=\\\"bold\\\">\" + \n GLib.Markup.escape_text(items.get(i)) + \"</span>\"\n ); // title \n print(\"ADD item %s\", items.get(i));\n this.el.set_value(citer, 2, \"dir\"); // type \n this.el.set_value(citer, 3, false ); // checked \n\n \n \n for(var j =0 ; j < files.size; j++) {\n this.el.append(out citer); \n print(\"ADD item %s\", files.get(j));\n this.el.set_value(citer, 0, files.get(j) ); // title \n this.el.set_value(citer, 1, GLib.Markup.escape_text( Path.get_basename (files.get(j))) ); // title \n this.el.set_value(citer, 2, \"file\"); // type \n this.el.set_value(citer, 3, false ); // checked \n\n }\n \n \n //this.el.set_value(citer, 1, items.get(i) );\n }\n this.el.set_sort_column_id(0,Gtk.SortType.ASCENDING);\n \n}\n ",
+ "$ columns" : " typeof(string), // 0 file name\n typeof(string), // 0 basename\n typeof(string), // type (dir orfile)\n typeof(bool) // is checked.\n ",
+ "$ xns" : "Gtk",
+ "| void update" : "() {\n\n\n Gtk.TreeIter citer;\n\n for(var i =0 ; i < this.el.iter_n_children(null); i++) {\n this.el.iter_nth_child(out citer,null,i);\n\n GLib.Value val;\n this.el.get_value(citer,0, out val);\n var fn = (string) val;\n \n var active = false;\n if (_this.set_vbox.cgroup.sources.contains(fn)) {\n active = true;\n }\n \n this.el.set_value(citer, 3, active ); // checked \n }\n\n\n}\n"
+ },
+ {
+ "utf8 title" : "name",
+ "* init" : "\n this.el.add_attribute(_this.files_render.el , \"markup\", 1 ); // basnemae\n \n/* this.el.add_attribute(_this.files_render.el , \"markup\", 2 );\n*/",
+ "* pack" : "append_column",
+ "xtype" : "TreeViewColumn",
+ "gboolean resizable" : true,
+ "$ xns" : "Gtk",
+ "items" : [
+ {
+ "id" : "files_render",
+ "xtype" : "CellRendererText",
+ "* pack" : "pack_start,false",
+ "$ xns" : "Gtk"
+ }
+ ]
+ },
+ {
+ "utf8 title" : "use",
+ "* init" : "{\n this.el.add_attribute(_this.files_render_use.el , \"active\", 3 );\n }",
+ "* pack" : "append_column",
+ "xtype" : "TreeViewColumn",
+ "gboolean resizable" : false,
+ "$ xns" : "Gtk",
+ "gint fixed_width" : 50,
+ "items" : [
+ {
+ "listeners" : {
+ "toggled" : "( path_string) => { \n\n\n\n var m = _this.files_tree_store.el;\n Gtk.TreeIter iter;\n Gtk.TreePath path = new Gtk.TreePath.from_string (path_string);\n m.get_iter (out iter, path);\n GLib.Value val;\n m.get_value(iter, 3, out val);\n m.set_value(iter, 3, ((bool) val) ? false :true); \n \n // type.\n GLib.Value ftval; \n m.get_value(iter, 2, out ftval);\n var ftype = (string)ftval; \n \n // full name... \n GLib.Value fval; \n m.get_value(iter, 0, out fval);\n var fn = (string)fval;\n \n \n var cg = _this.set_vbox.cgroup;\n // what's the sleected target?\n // update the list..\n // if ftype is a dir == then toggle all the bellow.\n \n if (ftype == \"dir\") {\n _this.files_tree_store.updateDir(fn, ((bool) val) ? false :true);\n }\n \n // if ftype is a file .. see if all the files in that directory are check and check the dir.\n\n \n if ((bool)val) {\n // renive\n cg.sources.remove(fn);\n } else {\n cg.sources.add(fn);\n }\n \n}"
+ },
+ "id" : "files_render_use",
+ "* pack" : "pack_start,false",
+ "xtype" : "CellRendererToggle",
+ "$ xns" : "Gtk",
+ "gboolean activatable" : true
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file
--- /dev/null
+static ValaProjectSettings _ValaProjectSettings;
+
+public class ValaProjectSettings : Object
+{
+ public Gtk.Box el;
+ private ValaProjectSettings _this;
+
+ public static ValaProjectSettings singleton()
+ {
+ if (_ValaProjectSettings == null) {
+ _ValaProjectSettings= new ValaProjectSettings();
+ }
+ return _ValaProjectSettings;
+ }
+ public Xcls_label_global label_global;
+ public Xcls_label_targets label_targets;
+ public Xcls_compile_flags compile_flags;
+ public Xcls_default_packages_tree_store default_packages_tree_store;
+ public Xcls_packages_render packages_render;
+ public Xcls_packages_render_use packages_render_use;
+ public Xcls_default_directory_tree default_directory_tree;
+ public Xcls_default_directory_tree_store default_directory_tree_store;
+ public Xcls_directory_render directory_render;
+ public Xcls_default_directory_menu default_directory_menu;
+ public Xcls_targets_tree_menu targets_tree_menu;
+ public Xcls_targets_tree targets_tree;
+ public Xcls_targets_tree_store targets_tree_store;
+ public Xcls_targets_render targets_render;
+ public Xcls_set_vbox set_vbox;
+ public Xcls_build_pack_target build_pack_target;
+ public Xcls_build_compile_flags build_compile_flags;
+ public Xcls_build_execute_args build_execute_args;
+ public Xcls_files_tree_store files_tree_store;
+ public Xcls_files_render files_render;
+ public Xcls_files_render_use files_render_use;
+
+ // my vars (def)
+ public Project.Gtk project;
+ public Xcls_MainWindow window;
+
+ // ctor
+ public ValaProjectSettings()
+ {
+ _this = this;
+ this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
+
+ // my vars (dec)
+ this.project = null;
+ this.window = null;
+
+ // set gobject values
+ this.el.hexpand = true;
+ var child_0 = new Xcls_Notebook2( _this );
+ child_0.ref();
+ this.el.pack_start ( child_0.el , true,true,0 );
+ }
+
+ // user defined functions
+ public void show (Project.Gtk project) {
+
+
+ print("ValaProjectSettings show\n");
+
+ this.project= project;
+
+ this.compile_flags.el.text = _this.project.compilegroups.get("_default_").compile_flags;
+
+ this.default_directory_tree_store.load();
+ this.default_packages_tree_store.load();
+ this.targets_tree_store.load();
+ this.files_tree_store.load();
+
+ }
+ public void save () {
+ this.project.writeConfig();
+ }
+ public class Xcls_Notebook2 : Object
+ {
+ public Gtk.Notebook el;
+ private ValaProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Notebook2(ValaProjectSettings _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Notebook();
+
+ // my vars (dec)
+
+ // set gobject values
+ var child_0 = new Xcls_label_global( _this );
+ child_0.ref();
+ var child_1 = new Xcls_label_targets( _this );
+ child_1.ref();
+ var child_2 = new Xcls_Box5( _this );
+ child_2.ref();
+ this.el.append_page ( child_2.el , _this.label_global.el );
+ var child_3 = new Xcls_Paned26( _this );
+ child_3.ref();
+ this.el.append_page ( child_3.el , _this.label_targets.el );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_label_global : Object
+ {
+ public Gtk.Label el;
+ private ValaProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_label_global(ValaProjectSettings _owner )
+ {
+ _this = _owner;
+ _this.label_global = this;
+ this.el = new Gtk.Label( "Global" );
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_label_targets : Object
+ {
+ public Gtk.Label el;
+ private ValaProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_label_targets(ValaProjectSettings _owner )
+ {
+ _this = _owner;
+ _this.label_targets = this;
+ this.el = new Gtk.Label( "Targets" );
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_Box5 : Object
+ {
+ public Gtk.Box el;
+ private ValaProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Box5(ValaProjectSettings _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.homogeneous = false;
+ var child_0 = new Xcls_Label6( _this );
+ child_0.ref();
+ this.el.pack_start ( child_0.el , false,false,0 );
+ var child_1 = new Xcls_compile_flags( _this );
+ child_1.ref();
+ this.el.pack_start ( child_1.el , false,false,0 );
+ var child_2 = new Xcls_Paned8( _this );
+ child_2.ref();
+ this.el.pack_start ( child_2.el , true,true,0 );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Label6 : Object
+ {
+ public Gtk.Label el;
+ private ValaProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Label6(ValaProjectSettings _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Label( "compile flags" );
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_compile_flags : Object
+ {
+ public Gtk.Entry el;
+ private ValaProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_compile_flags(ValaProjectSettings _owner )
+ {
+ _this = _owner;
+ _this.compile_flags = this;
+ this.el = new Gtk.Entry();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.placeholder_text = "eg. -g --valasrc $BASEDIR ";
+
+ //listeners
+ this.el.changed.connect( () => {
+
+ _this.project.compilegroups.get("_default_").compile_flags = this.el.text;
+ _this.project.writeConfig();
+ // _this.project.save();
+
+ });
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_Paned8 : Object
+ {
+ public Gtk.Paned el;
+ private ValaProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Paned8(ValaProjectSettings _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Paned( Gtk.Orientation.HORIZONTAL );
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.position = 300;
+ var child_0 = new Xcls_ScrolledWindow9( _this );
+ child_0.ref();
+ this.el.add ( child_0.el );
+ var child_1 = new Xcls_ScrolledWindow16( _this );
+ child_1.ref();
+ this.el.add2 ( child_1.el );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_ScrolledWindow9 : Object
+ {
+ public Gtk.ScrolledWindow el;
+ private ValaProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_ScrolledWindow9(ValaProjectSettings _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.ScrolledWindow( null, null );
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.hexpand = true;
+ var child_0 = new Xcls_default_packages_tree( _this );
+ child_0.ref();
+ this.el.add ( child_0.el );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_default_packages_tree : Object
+ {
+ public Gtk.TreeView el;
+ private ValaProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_default_packages_tree(ValaProjectSettings _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.TreeView();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.headers_visible = true;
+ var child_0 = new Xcls_default_packages_tree_store( _this );
+ child_0.ref();
+ this.el.set_model ( child_0.el );
+ var child_1 = new Xcls_TreeViewColumn12( _this );
+ child_1.ref();
+ this.el.append_column ( child_1.el );
+ var child_2 = new Xcls_TreeViewColumn14( _this );
+ child_2.ref();
+ this.el.append_column ( child_2.el );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_default_packages_tree_store : Object
+ {
+ public Gtk.ListStore el;
+ private ValaProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_default_packages_tree_store(ValaProjectSettings _owner )
+ {
+ _this = _owner;
+ _this.default_packages_tree_store = this;
+ this.el = new Gtk.ListStore( 2, typeof(string), // 0 key type
+ typeof(bool) );
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ public void load () {
+
+ var def = _this.project.compilegroups.get("_default_");
+ var items = def.packages;
+
+ this.el.clear();
+ var pal = (Palete.Gtk) Palete.factory("Gtk");
+ var pkgs = pal.packages(_this.project);
+ print("ValaProjectSettings:packages load %d\n", pkgs.size);
+
+ Gtk.TreeIter citer;
+
+ for(var i =0 ; i < pkgs.size; i++) {
+ this.el.append(out citer);
+
+ this.el.set_value(citer, 0, pkgs.get(i) ); // title
+ this.el.set_value(citer, 1, items.contains(pkgs.get(i)) );
+ }
+ this.el.set_sort_column_id(0,Gtk.SortType.ASCENDING);
+
+ }
+ }
+
+ public class Xcls_TreeViewColumn12 : Object
+ {
+ public Gtk.TreeViewColumn el;
+ private ValaProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_TreeViewColumn12(ValaProjectSettings _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.TreeViewColumn();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.title = "package name";
+ this.el.expand = true;
+ this.el.resizable = true;
+ var child_0 = new Xcls_packages_render( _this );
+ child_0.ref();
+ this.el.pack_start ( child_0.el , false );
+
+ // init method
+
+ this.el.add_attribute(_this.packages_render.el , "text", 0 );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_packages_render : Object
+ {
+ public Gtk.CellRendererText el;
+ private ValaProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_packages_render(ValaProjectSettings _owner )
+ {
+ _this = _owner;
+ _this.packages_render = this;
+ this.el = new Gtk.CellRendererText();
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ }
+
+
+ public class Xcls_TreeViewColumn14 : Object
+ {
+ public Gtk.TreeViewColumn el;
+ private ValaProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_TreeViewColumn14(ValaProjectSettings _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.TreeViewColumn();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.title = "use";
+ this.el.resizable = false;
+ this.el.fixed_width = 50;
+ var child_0 = new Xcls_packages_render_use( _this );
+ child_0.ref();
+ this.el.pack_start ( child_0.el , false );
+
+ // init method
+
+ {
+ this.el.add_attribute(_this.packages_render_use.el , "active", 1 );
+ }
+ }
+
+ // user defined functions
+ }
+ public class Xcls_packages_render_use : Object
+ {
+ public Gtk.CellRendererToggle el;
+ private ValaProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_packages_render_use(ValaProjectSettings _owner )
+ {
+ _this = _owner;
+ _this.packages_render_use = this;
+ this.el = new Gtk.CellRendererToggle();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.activatable = true;
+
+ //listeners
+ this.el.toggled.connect( ( path_string) => {
+ var m = _this.default_packages_tree_store.el;
+ Gtk.TreeIter iter;
+ Gtk.TreePath path = new Gtk.TreePath.from_string (path_string);
+ m.get_iter (out iter, path);
+ GLib.Value val;
+ m.get_value(iter, 1, out val);
+ m.set_value(iter, 1, ((bool) val) ? false :true);
+ GLib.Value fval;
+ m.get_value(iter, 0, out fval);
+ var fn = (string)fval;
+
+ var def = _this.project.compilegroups.get("_default_");
+ var items = def.packages;
+ if ((bool)val) {
+ // renive
+ items.remove(fn);
+ } else {
+ items.add(fn);
+ }
+
+ });
+ }
+
+ // user defined functions
+ }
+
+
+
+
+ public class Xcls_ScrolledWindow16 : Object
+ {
+ public Gtk.ScrolledWindow el;
+ private ValaProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_ScrolledWindow16(ValaProjectSettings _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.ScrolledWindow( null, null );
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.hexpand = true;
+ var child_0 = new Xcls_default_directory_tree( _this );
+ child_0.ref();
+ this.el.add ( child_0.el );
+ var child_1 = new Xcls_default_directory_menu( _this );
+ child_1.ref();
+ }
+
+ // user defined functions
+ }
+ public class Xcls_default_directory_tree : Object
+ {
+ public Gtk.TreeView el;
+ private ValaProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_default_directory_tree(ValaProjectSettings _owner )
+ {
+ _this = _owner;
+ _this.default_directory_tree = this;
+ this.el = new Gtk.TreeView();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.headers_visible = true;
+ var child_0 = new Xcls_default_directory_tree_store( _this );
+ child_0.ref();
+ this.el.set_model ( child_0.el );
+ var child_1 = new Xcls_TreeViewColumn19( _this );
+ child_1.ref();
+ this.el.append_column ( child_1.el );
+
+ //listeners
+ this.el.button_press_event.connect( ( ev) => {
+ //console.log("button press?");
+
+
+ if (ev.type != Gdk.EventType.BUTTON_PRESS || ev.button != 3) {
+ //print("click" + ev.type);
+ return false;
+ }
+ //Gtk.TreePath res;
+ //if (!this.el.get_path_at_pos((int)ev.x,(int)ev.y, out res, null, null, null) ) {
+ // return true;
+ //}
+
+ // this.el.get_selection().select_path(res);
+
+ //if (!this.get('/LeftTreeMenu').el) {
+ // this.get('/LeftTreeMenu').init();
+ // }
+
+ _this.default_directory_menu.el.set_screen(Gdk.Screen.get_default());
+ _this.default_directory_menu.el.show_all();
+ _this.default_directory_menu.el.popup(null, null, null, 3, ev.time);
+ // print("click:" + res.path.to_string());
+ return true;
+ });
+ }
+
+ // user defined functions
+ }
+ public class Xcls_default_directory_tree_store : Object
+ {
+ public Gtk.ListStore el;
+ private ValaProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_default_directory_tree_store(ValaProjectSettings _owner )
+ {
+ _this = _owner;
+ _this.default_directory_tree_store = this;
+ this.el = new Gtk.ListStore( 1, typeof(string)
+ );
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ public void load () {
+
+ this.el.clear();
+
+
+ var def = _this.project.compilegroups.get("_default_");
+ var items = def.sources;
+
+
+ Gtk.TreeIter citer;
+
+ for(var i =0 ; i < items.size; i++) {
+ this.el.append(out citer);
+
+ this.el.set_value(citer, 0, items.get(i) ); // title
+ //this.el.set_value(citer, 1, items.get(i) );
+ }
+ this.el.set_sort_column_id(0,Gtk.SortType.ASCENDING);
+
+ }
+ }
+
+ public class Xcls_TreeViewColumn19 : Object
+ {
+ public Gtk.TreeViewColumn el;
+ private ValaProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_TreeViewColumn19(ValaProjectSettings _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.TreeViewColumn();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.title = "Available Directories (right click to add)";
+ this.el.resizable = true;
+ var child_0 = new Xcls_directory_render( _this );
+ child_0.ref();
+ this.el.pack_start ( child_0.el , false );
+
+ // init method
+
+ this.el.add_attribute(_this.directory_render.el , "text", 0 );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_directory_render : Object
+ {
+ public Gtk.CellRendererText el;
+ private ValaProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_directory_render(ValaProjectSettings _owner )
+ {
+ _this = _owner;
+ _this.directory_render = this;
+ this.el = new Gtk.CellRendererText();
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ }
+
+
+
+ public class Xcls_default_directory_menu : Object
+ {
+ public Gtk.Menu el;
+ private ValaProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_default_directory_menu(ValaProjectSettings _owner )
+ {
+ _this = _owner;
+ _this.default_directory_menu = this;
+ this.el = new Gtk.Menu();
+
+ // my vars (dec)
+
+ // set gobject values
+ var child_0 = new Xcls_MenuItem22( _this );
+ child_0.ref();
+ this.el.add ( child_0.el );
+ var child_1 = new Xcls_MenuItem23( _this );
+ child_1.ref();
+ this.el.add ( child_1.el );
+ var child_2 = new Xcls_SeparatorMenuItem24( _this );
+ child_2.ref();
+ this.el.add ( child_2.el );
+ var child_3 = new Xcls_MenuItem25( _this );
+ child_3.ref();
+ this.el.add ( child_3.el );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_MenuItem22 : Object
+ {
+ public Gtk.MenuItem el;
+ private ValaProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_MenuItem22(ValaProjectSettings _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.MenuItem();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.label = "Add Directory";
+
+ //listeners
+ this.el.activate.connect( () => {
+
+ var chooser = new Gtk.FileChooserDialog (
+ "Add a directory", _this.window.el, Gtk.FileChooserAction.SELECT_FOLDER ,
+ "_Cancel",
+ Gtk.ResponseType.CANCEL,
+ "_Add",
+ Gtk.ResponseType.ACCEPT);
+ if (chooser.run () != Gtk.ResponseType.ACCEPT) {
+ chooser.close ();
+ return;
+ }
+ chooser.close ();
+ // add the directory..
+ var fn = _this.project.relPath(chooser.get_filename());
+ _this.project.compilegroups.get("_default_").sources.add(fn);
+ _this.default_directory_tree_store.load();
+ });
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_MenuItem23 : Object
+ {
+ public Gtk.MenuItem el;
+ private ValaProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_MenuItem23(ValaProjectSettings _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.MenuItem();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.label = "Add File";
+
+ //listeners
+ this.el.activate.connect( () => {
+
+ var chooser = new Gtk.FileChooserDialog (
+ "Add a directory", _this.window.el, Gtk.FileChooserAction.OPEN ,
+ "_Cancel",
+ Gtk.ResponseType.CANCEL,
+ "_Add",
+ Gtk.ResponseType.ACCEPT);
+ if (chooser.run () != Gtk.ResponseType.ACCEPT) {
+ chooser.close ();
+ return;
+ }
+ chooser.close ();
+ // add the directory..
+ var fn = _this.project.relPath(chooser.get_filename());
+ _this.project.compilegroups.get("_default_").sources.add(fn);
+ _this.default_directory_tree_store.load();
+ });
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_SeparatorMenuItem24 : Object
+ {
+ public Gtk.SeparatorMenuItem el;
+ private ValaProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_SeparatorMenuItem24(ValaProjectSettings _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.SeparatorMenuItem();
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_MenuItem25 : Object
+ {
+ public Gtk.MenuItem el;
+ private ValaProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_MenuItem25(ValaProjectSettings _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.MenuItem();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.label = "Remove File/Directory";
+
+ //listeners
+ this.el.activate.connect( () => {
+
+ //
+ Gtk.TreeModel mod;
+ Gtk.TreeIter iter;
+ if (!_this.default_directory_tree.el.get_selection().get_selected(out mod, out iter)) {
+ print("nothing selected\n");
+ return;
+ }
+
+
+ // add the directory..
+
+
+ GLib.Value val;
+ mod.get_value(iter,0, out val);
+ var fn = (string) val;
+
+ print("remove: %s\n", fn);
+ if (!_this.project.compilegroups.get("_default_").sources.remove(fn)) {
+ print("remove failed");
+ }
+ _this.default_directory_tree_store.load();
+ });
+ }
+
+ // user defined functions
+ }
+
+
+
+
+
+ public class Xcls_Paned26 : Object
+ {
+ public Gtk.Paned el;
+ private ValaProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Paned26(ValaProjectSettings _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Paned( Gtk.Orientation.HORIZONTAL );
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.position = 300;
+ var child_0 = new Xcls_ScrolledWindow27( _this );
+ child_0.ref();
+ this.el.add1 ( child_0.el );
+ var child_1 = new Xcls_set_vbox( _this );
+ child_1.ref();
+ this.el.add2 ( child_1.el );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_ScrolledWindow27 : Object
+ {
+ public Gtk.ScrolledWindow el;
+ private ValaProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_ScrolledWindow27(ValaProjectSettings _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.ScrolledWindow( null, null );
+
+ // my vars (dec)
+
+ // set gobject values
+ var child_0 = new Xcls_targets_tree_menu( _this );
+ child_0.ref();
+ this.el.add ( child_0.el );
+ var child_1 = new Xcls_targets_tree( _this );
+ child_1.ref();
+ this.el.add ( child_1.el );
+
+ // init method
+
+ {
+ this.el.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);
+
+ }
+ }
+
+ // user defined functions
+ }
+ public class Xcls_targets_tree_menu : Object
+ {
+ public Gtk.Menu el;
+ private ValaProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_targets_tree_menu(ValaProjectSettings _owner )
+ {
+ _this = _owner;
+ _this.targets_tree_menu = this;
+ this.el = new Gtk.Menu();
+
+ // my vars (dec)
+
+ // set gobject values
+ var child_0 = new Xcls_MenuItem29( _this );
+ child_0.ref();
+ this.el.add ( child_0.el );
+ var child_1 = new Xcls_SeparatorMenuItem30( _this );
+ child_1.ref();
+ this.el.add ( child_1.el );
+ var child_2 = new Xcls_MenuItem31( _this );
+ child_2.ref();
+ this.el.add ( child_2.el );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_MenuItem29 : Object
+ {
+ public Gtk.MenuItem el;
+ private ValaProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_MenuItem29(ValaProjectSettings _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.MenuItem();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.label = "Add Compile Target";
+
+ //listeners
+ this.el.activate.connect( () => {
+
+ if (_this.project.compilegroups.has_key("NEW GROUP")) {
+ return;
+ }
+
+ // add the directory..
+
+ _this.project.compilegroups.set("NEW GROUP", new Project.GtkValaSettings("NEW GROUP"));
+ _this.targets_tree_store.load();
+ });
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_SeparatorMenuItem30 : Object
+ {
+ public Gtk.SeparatorMenuItem el;
+ private ValaProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_SeparatorMenuItem30(ValaProjectSettings _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.SeparatorMenuItem();
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_MenuItem31 : Object
+ {
+ public Gtk.MenuItem el;
+ private ValaProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_MenuItem31(ValaProjectSettings _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.MenuItem();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.label = "Remove Target";
+
+ //listeners
+ this.el.activate.connect( () => {
+
+ //
+ Gtk.TreeModel mod;
+ Gtk.TreeIter iter;
+ if (!_this.targets_tree.el.get_selection().get_selected(out mod, out iter)) {
+ print("nothing selected\n");
+ return;
+ }
+
+
+ // add the directory..
+
+
+ GLib.Value val;
+ mod.get_value(iter,0, out val);
+ var fn = (string) val;
+
+ print("remove: %s\n", fn);
+ if (!_this.project.compilegroups.unset(fn)) {
+ print("remove failed");
+ }
+ _this.targets_tree_store.load();
+ });
+ }
+
+ // user defined functions
+ }
+
+
+ public class Xcls_targets_tree : Object
+ {
+ public Gtk.TreeView el;
+ private ValaProjectSettings _this;
+
+
+ // my vars (def)
+ public string cursor;
+
+ // ctor
+ public Xcls_targets_tree(ValaProjectSettings _owner )
+ {
+ _this = _owner;
+ _this.targets_tree = this;
+ this.el = new Gtk.TreeView();
+
+ // my vars (dec)
+
+ // set gobject values
+ var child_0 = new Xcls_targets_tree_store( _this );
+ child_0.ref();
+ this.el.set_model ( child_0.el );
+ var child_1 = new Xcls_TreeViewColumn34( _this );
+ child_1.ref();
+ this.el.append_column ( child_1.el );
+
+ //listeners
+ this.el.button_press_event.connect( ( ev) => {
+ //console.log("button press?");
+
+
+ if (ev.type != Gdk.EventType.BUTTON_PRESS || ev.button != 3) {
+ //print("click" + ev.type);
+ return false;
+ }
+ //Gtk.TreePath res;
+ //if (!this.el.get_path_at_pos((int)ev.x,(int)ev.y, out res, null, null, null) ) {
+ // return true;
+ //}
+
+ // this.el.get_selection().select_path(res);
+
+ //if (!this.get('/LeftTreeMenu').el) {
+ // this.get('/LeftTreeMenu').init();
+ // }
+
+ _this.targets_tree_menu.el.set_screen(Gdk.Screen.get_default());
+ _this.targets_tree_menu.el.show_all();
+ _this.targets_tree_menu.el.popup(null, null, null, 3, ev.time);
+ // print("click:" + res.path.to_string());
+ return true;
+ });
+ this.el.cursor_changed.connect( ( ) => {
+
+ if (this.cursor != "") {
+ // save the values..
+ }
+
+ // load the new values.
+
+
+ Gtk.TreeModel mod;
+ Gtk.TreeIter iter;
+ if (!this.el.get_selection().get_selected(out mod, out iter)) {
+ print("nothing selected\n");
+ // should disable the right hand side..
+ _this.set_vbox.el.hide();
+ return;
+ }
+ _this.set_vbox.el.show();
+
+ // add the directory..
+
+
+ GLib.Value val;
+ mod.get_value(iter,0, out val);
+ var fn = (string) val;
+
+ this.cursor = fn;
+ var cg = _this.project.compilegroups.get(fn);
+
+ _this.build_pack_target.el.set_text(cg.target_bin);
+ _this.build_compile_flags.el.set_text(cg.compile_flags);
+ _this.build_execute_args.el.set_text(cg.execute_args);
+
+ _this.set_vbox.cgroup = cg;
+ _this.files_tree_store.update();
+
+ // load the srouces
+
+
+ });
+ }
+
+ // user defined functions
+ }
+ public class Xcls_targets_tree_store : Object
+ {
+ public Gtk.ListStore el;
+ private ValaProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_targets_tree_store(ValaProjectSettings _owner )
+ {
+ _this = _owner;
+ _this.targets_tree_store = this;
+ this.el = new Gtk.ListStore( 2, typeof(string), // 0 key type
+ typeof(string) // ??
+ );
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ public void load () {
+
+ this.el.clear();
+
+
+ var cg = _this.project.compilegroups;
+
+ _this.targets_tree.cursor = "";
+ Gtk.TreeIter citer;
+ var iter = cg.map_iterator();
+ while(iter.next()) {
+ var key = iter.get_key();
+ if (key == "_default_") {
+ continue;
+ }
+
+ this.el.append(out citer);
+
+ this.el.set_value(citer, 0, key ); // title
+ //this.el.set_value(citer, 1, items.get(i) );
+ };
+ this.el.set_sort_column_id(0,Gtk.SortType.ASCENDING);
+ _this.set_vbox.el.hide();
+ }
+ }
+
+ public class Xcls_TreeViewColumn34 : Object
+ {
+ public Gtk.TreeViewColumn el;
+ private ValaProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_TreeViewColumn34(ValaProjectSettings _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.TreeViewColumn();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.title = "name";
+ this.el.resizable = true;
+ var child_0 = new Xcls_targets_render( _this );
+ child_0.ref();
+ this.el.pack_start ( child_0.el , false );
+
+ // init method
+
+ {
+ this.el.add_attribute(_this.targets_render.el , "text", 0 );
+ }
+ }
+
+ // user defined functions
+ }
+ public class Xcls_targets_render : Object
+ {
+ public Gtk.CellRendererText el;
+ private ValaProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_targets_render(ValaProjectSettings _owner )
+ {
+ _this = _owner;
+ _this.targets_render = this;
+ this.el = new Gtk.CellRendererText();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.editable = true;
+
+ //listeners
+ this.el.edited.connect( (path, newtext) => {
+
+ Gtk.TreeIter iter;
+ _this.targets_tree_store.el.get_iter(out iter, new Gtk.TreePath.from_string(path));
+ GLib.Value gval;
+ _this.targets_tree_store.el.get_value(iter,0, out gval);
+ var oldval = (string)gval;
+ if (oldval == newtext) {
+ return;
+ }
+ var cg = _this.project.compilegroups.get(oldval);
+ cg.name = newtext;
+ _this.project.compilegroups.unset(oldval);
+ _this.project.compilegroups.set(newtext, cg);
+ _this.targets_tree_store.load();
+ });
+ }
+
+ // user defined functions
+ }
+
+
+
+
+ public class Xcls_set_vbox : Object
+ {
+ public Gtk.Box el;
+ private ValaProjectSettings _this;
+
+
+ // my vars (def)
+ public Project.GtkValaSettings cgroup;
+
+ // ctor
+ public Xcls_set_vbox(ValaProjectSettings _owner )
+ {
+ _this = _owner;
+ _this.set_vbox = this;
+ this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
+
+ // my vars (dec)
+ this.cgroup = null;
+
+ // set gobject values
+ this.el.homogeneous = false;
+ var child_0 = new Xcls_Label37( _this );
+ child_0.ref();
+ this.el.pack_start ( child_0.el , false,false,0 );
+ var child_1 = new Xcls_build_pack_target( _this );
+ child_1.ref();
+ this.el.pack_start ( child_1.el , false,false,0 );
+ var child_2 = new Xcls_Label39( _this );
+ child_2.ref();
+ this.el.pack_start ( child_2.el , false,false,0 );
+ var child_3 = new Xcls_build_compile_flags( _this );
+ child_3.ref();
+ this.el.pack_start ( child_3.el , false,false,0 );
+ var child_4 = new Xcls_Label41( _this );
+ child_4.ref();
+ this.el.pack_start ( child_4.el , false,false,0 );
+ var child_5 = new Xcls_build_execute_args( _this );
+ child_5.ref();
+ this.el.pack_start ( child_5.el , false,false,0 );
+ var child_6 = new Xcls_Label43( _this );
+ child_6.ref();
+ this.el.pack_start ( child_6.el , false,false,0 );
+ var child_7 = new Xcls_ScrolledWindow44( _this );
+ child_7.ref();
+ this.el.pack_start ( child_7.el , true,true,0 );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Label37 : Object
+ {
+ public Gtk.Label el;
+ private ValaProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Label37(ValaProjectSettings _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Label( "target filename" );
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_build_pack_target : Object
+ {
+ public Gtk.Entry el;
+ private ValaProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_build_pack_target(ValaProjectSettings _owner )
+ {
+ _this = _owner;
+ _this.build_pack_target = this;
+ this.el = new Gtk.Entry();
+
+ // my vars (dec)
+
+ // set gobject values
+
+ //listeners
+ this.el.changed.connect( () => {
+ if (_this.targets_tree.cursor.length < 1) {
+ return;
+ }
+ _this.project.compilegroups.get(_this.targets_tree.cursor).target_bin = this.el.text;
+ });
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_Label39 : Object
+ {
+ public Gtk.Label el;
+ private ValaProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Label39(ValaProjectSettings _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Label( "compile flags" );
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_build_compile_flags : Object
+ {
+ public Gtk.Entry el;
+ private ValaProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_build_compile_flags(ValaProjectSettings _owner )
+ {
+ _this = _owner;
+ _this.build_compile_flags = this;
+ this.el = new Gtk.Entry();
+
+ // my vars (dec)
+
+ // set gobject values
+
+ //listeners
+ this.el.changed.connect( () => {
+ if (_this.targets_tree.cursor.length < 1) {
+ return;
+ }
+ _this.project.compilegroups.get(_this.targets_tree.cursor).compile_flags = this.el.text;
+ });
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_Label41 : Object
+ {
+ public Gtk.Label el;
+ private ValaProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Label41(ValaProjectSettings _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Label( "test argments - when run after a build" );
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_build_execute_args : Object
+ {
+ public Gtk.Entry el;
+ private ValaProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_build_execute_args(ValaProjectSettings _owner )
+ {
+ _this = _owner;
+ _this.build_execute_args = this;
+ this.el = new Gtk.Entry();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.placeholder_text = "eg. -f somefile -g ";
+
+ //listeners
+ this.el.changed.connect( () => {
+ if (_this.targets_tree.cursor.length < 1) {
+ return;
+ }
+ _this.project.compilegroups.get(_this.targets_tree.cursor).execute_args = this.el.text;
+ });
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_Label43 : Object
+ {
+ public Gtk.Label el;
+ private ValaProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Label43(ValaProjectSettings _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Label( "Files to compile" );
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_ScrolledWindow44 : Object
+ {
+ public Gtk.ScrolledWindow el;
+ private ValaProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_ScrolledWindow44(ValaProjectSettings _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.ScrolledWindow( null, null );
+
+ // my vars (dec)
+
+ // set gobject values
+ var child_0 = new Xcls_files_tree( _this );
+ child_0.ref();
+ this.el.add ( child_0.el );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_files_tree : Object
+ {
+ public Gtk.TreeView el;
+ private ValaProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_files_tree(ValaProjectSettings _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.TreeView();
+
+ // my vars (dec)
+
+ // set gobject values
+ var child_0 = new Xcls_files_tree_store( _this );
+ child_0.ref();
+ this.el.set_model ( child_0.el );
+ var child_1 = new Xcls_TreeViewColumn47( _this );
+ child_1.ref();
+ this.el.append_column ( child_1.el );
+ var child_2 = new Xcls_TreeViewColumn49( _this );
+ child_2.ref();
+ this.el.append_column ( child_2.el );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_files_tree_store : Object
+ {
+ public Gtk.ListStore el;
+ private ValaProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_files_tree_store(ValaProjectSettings _owner )
+ {
+ _this = _owner;
+ _this.files_tree_store = this;
+ this.el = new Gtk.ListStore( 4, typeof(string), // 0 file name
+ typeof(string), // 0 basename
+ typeof(string), // type (dir orfile)
+ typeof(bool) // is checked.
+ );
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ public void updateDir (string dname, bool bval) {
+
+ Gtk.TreeIter citer;
+
+ var cg = _this.set_vbox.cgroup;
+ for(var i =0 ; i < this.el.iter_n_children(null); i++) {
+ this.el.iter_nth_child(out citer,null,i);
+
+ GLib.Value val;
+ this.el.get_value(citer,0, out val);
+ var fn = (string) val;
+
+ if ( Path.get_dirname (fn) == dname) {
+
+ this.el.set_value(citer, 3, bval ); // checked
+
+
+
+ if (!bval) {
+ // renive
+ if (cg.sources.contains(fn)) {
+ cg.sources.remove(fn);
+ }
+ } else {
+ if (!cg.sources.contains(fn)) {
+ cg.sources.add(fn);
+ }
+ }
+
+
+ }
+ }
+
+ }
+ public void load () {
+
+ this.el.clear();
+
+
+ var def = _this.project.compilegroups.get("_default_");
+ var items = def.sources;
+
+
+
+
+
+ Gtk.TreeIter citer;
+
+ for(var i =0 ; i < items.size; i++) {
+
+ var files = _this.project.filesForCompile(items.get(i), false);
+ if (files.size < 1) {
+ continue;
+ }
+
+ this.el.append(out citer);
+
+ this.el.set_value(citer, 0, items.get(i) ); // title
+ this.el.set_value(citer, 1, "<span foreground=\"green\" font_weight=\"bold\">" +
+ GLib.Markup.escape_text(items.get(i)) + "</span>"
+ ); // title
+ print("ADD item %s", items.get(i));
+ this.el.set_value(citer, 2, "dir"); // type
+ this.el.set_value(citer, 3, false ); // checked
+
+
+
+ for(var j =0 ; j < files.size; j++) {
+ this.el.append(out citer);
+ print("ADD item %s", files.get(j));
+ this.el.set_value(citer, 0, files.get(j) ); // title
+ this.el.set_value(citer, 1, GLib.Markup.escape_text( Path.get_basename (files.get(j))) ); // title
+ this.el.set_value(citer, 2, "file"); // type
+ this.el.set_value(citer, 3, false ); // checked
+
+ }
+
+
+ //this.el.set_value(citer, 1, items.get(i) );
+ }
+ this.el.set_sort_column_id(0,Gtk.SortType.ASCENDING);
+
+ }
+ public void update () {
+
+
+ Gtk.TreeIter citer;
+
+ for(var i =0 ; i < this.el.iter_n_children(null); i++) {
+ this.el.iter_nth_child(out citer,null,i);
+
+ GLib.Value val;
+ this.el.get_value(citer,0, out val);
+ var fn = (string) val;
+
+ var active = false;
+ if (_this.set_vbox.cgroup.sources.contains(fn)) {
+ active = true;
+ }
+
+ this.el.set_value(citer, 3, active ); // checked
+ }
+
+
+ }
+ }
+
+ public class Xcls_TreeViewColumn47 : Object
+ {
+ public Gtk.TreeViewColumn el;
+ private ValaProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_TreeViewColumn47(ValaProjectSettings _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.TreeViewColumn();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.title = "name";
+ this.el.resizable = true;
+ var child_0 = new Xcls_files_render( _this );
+ child_0.ref();
+ this.el.pack_start ( child_0.el , false );
+
+ // init method
+
+ this.el.add_attribute(_this.files_render.el , "markup", 1 ); // basnemae
+
+ /* this.el.add_attribute(_this.files_render.el , "markup", 2 );
+ */
+ }
+
+ // user defined functions
+ }
+ public class Xcls_files_render : Object
+ {
+ public Gtk.CellRendererText el;
+ private ValaProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_files_render(ValaProjectSettings _owner )
+ {
+ _this = _owner;
+ _this.files_render = this;
+ this.el = new Gtk.CellRendererText();
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ }
+
+
+ public class Xcls_TreeViewColumn49 : Object
+ {
+ public Gtk.TreeViewColumn el;
+ private ValaProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_TreeViewColumn49(ValaProjectSettings _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.TreeViewColumn();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.title = "use";
+ this.el.resizable = false;
+ this.el.fixed_width = 50;
+ var child_0 = new Xcls_files_render_use( _this );
+ child_0.ref();
+ this.el.pack_start ( child_0.el , false );
+
+ // init method
+
+ {
+ this.el.add_attribute(_this.files_render_use.el , "active", 3 );
+ }
+ }
+
+ // user defined functions
+ }
+ public class Xcls_files_render_use : Object
+ {
+ public Gtk.CellRendererToggle el;
+ private ValaProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_files_render_use(ValaProjectSettings _owner )
+ {
+ _this = _owner;
+ _this.files_render_use = this;
+ this.el = new Gtk.CellRendererToggle();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.activatable = true;
+
+ //listeners
+ this.el.toggled.connect( ( path_string) => {
+
+
+
+ var m = _this.files_tree_store.el;
+ Gtk.TreeIter iter;
+ Gtk.TreePath path = new Gtk.TreePath.from_string (path_string);
+ m.get_iter (out iter, path);
+ GLib.Value val;
+ m.get_value(iter, 3, out val);
+ m.set_value(iter, 3, ((bool) val) ? false :true);
+
+ // type.
+ GLib.Value ftval;
+ m.get_value(iter, 2, out ftval);
+ var ftype = (string)ftval;
+
+ // full name...
+ GLib.Value fval;
+ m.get_value(iter, 0, out fval);
+ var fn = (string)fval;
+
+
+ var cg = _this.set_vbox.cgroup;
+ // what's the sleected target?
+ // update the list..
+ // if ftype is a dir == then toggle all the bellow.
+
+ if (ftype == "dir") {
+ _this.files_tree_store.updateDir(fn, ((bool) val) ? false :true);
+ }
+
+ // if ftype is a file .. see if all the files in that directory are check and check the dir.
+
+
+ if ((bool)val) {
+ // renive
+ cg.sources.remove(fn);
+ } else {
+ cg.sources.add(fn);
+ }
+
+ });
+ }
+
+ // user defined functions
+ }
+
+
+
+
+
+
+
+}
--- /dev/null
+{
+ "name" : "WindowAddProp",
+ "parent" : "",
+ "title" : "",
+ "path" : "/home/alan/gitlive/app.Builder.js/src/Builder4/WindowAddProp.bjs",
+ "permname" : "",
+ "modOrder" : "",
+ "build_module" : "builder",
+ "items" : [
+ {
+ "id" : "WindowAddProp",
+ "$ shadow_type" : "Gtk.ShadowType.IN",
+ "* init" : " this.el.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);\n ",
+ "| void show" : "(Palete.Palete pal, string etype, string xtype) {\n this.model.el.clear();\n\n Gtk.TreeIter iter;\n var elementList = pal.getPropertiesFor( xtype,etype);\n \n \n //print (\"GOT \" + elementList.length + \" items for \" + fullpath + \"|\" + type);\n // console.dump(elementList);\n \n var miter = elementList.map_iterator();\n while (miter.next()) {\n var p = miter.get_value();\n \n this.model.el.append(out iter);\n\n this.model.el.set(iter,\n 0, p.name, \n 1, p.type,\n 2, \"<b>\" + p.name +\"</b> <i>\"+p.type+\"</i>\\n\" + \n GLib.Markup.escape_text(p.doctxt),\n 3, p.sig,\n 4, \"<b>\" + p.name +\"</b> <span size=\\\"small\\\"><i>\"+p.type+\"</i></span>\",\n 5, etype,\n -1\n );\n }\n this.model.el.set_sort_column_id(0,Gtk.SortType.ASCENDING);\n \n}\n",
+ "xtype" : "ScrolledWindow",
+ "@ void select" : "(string key, string type, string skel, string etype)",
+ "$ xns" : "Gtk",
+ "| void clear" : "() {\n this.model.el.clear();\n\n}",
+ "items" : [
+ {
+ "listeners" : {
+ "row_activated" : "(path, column) => {\n\n Gtk.TreeIter iter;\n\n\n var m = _this.model;\n \n m.el.get_iter(out iter,path);\n \n \n // var val = \"\";\n \n \n var key = m.getValue(iter, 0);\n \n var type = m.getValue(iter, 1);\n var skel = m.getValue(iter, 3);\n var etype = m.getValue(iter, 5);\n \n \n _this.select(key,etype == \"signals\" ? \"\" : type,skel, etype);\n \n}\n "
+ },
+ "* init" : "{ \n var description = new Pango.FontDescription();\n description.set_size(8000);\n this.el.override_font(description); \n \n this.el.get_selection().set_mode( Gtk.SelectionMode.SINGLE);\n \n\n \n \n \n}\n",
+ "tooltip_column" : 2,
+ "xtype" : "TreeView",
+ "* pack" : "add",
+ "$ enable_tree_lines" : true,
+ "$ headers_visible" : true,
+ "$ xns" : "Gtk",
+ "items" : [
+ {
+ "| string getValue" : "(Gtk.TreeIter iter, int col)\n{\n\n GLib.Value value;\n this.el.get_value(iter, col, out value);\n\n return (string)value;\n \n}",
+ "id" : "model",
+ "* pack" : "set_model",
+ "xtype" : "ListStore",
+ "$ columns" : "typeof(string), // 0 real key\ntypeof(string), // 1 real type\ntypeof(string), // 2 docs ?\ntypeof(string), // 3 visable desc\ntypeof(string), // 4 function desc\ntypeof(string) // 5 element type (event|prop)\n ",
+ "n_columns" : 6,
+ "$ xns" : "Gtk"
+ },
+ {
+ "id" : "namecol",
+ "utf8 title" : "Double click to add",
+ "* init" : " this.el.add_attribute(_this.namerender.el , \"markup\", 4 );\n \n",
+ "xtype" : "TreeViewColumn",
+ "* pack" : "append_column",
+ "$ xns" : "Gtk",
+ "items" : [
+ {
+ "id" : "namerender",
+ "* pack" : "pack_start,true",
+ "xtype" : "CellRendererText",
+ "$ xns" : "Gtk"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file
--- /dev/null
+static Xcls_WindowAddProp _WindowAddProp;
+
+public class Xcls_WindowAddProp : Object
+{
+ public Gtk.ScrolledWindow el;
+ private Xcls_WindowAddProp _this;
+
+ public static Xcls_WindowAddProp singleton()
+ {
+ if (_WindowAddProp == null) {
+ _WindowAddProp= new Xcls_WindowAddProp();
+ }
+ return _WindowAddProp;
+ }
+ public Xcls_model model;
+ public Xcls_namecol namecol;
+ public Xcls_namerender namerender;
+
+ // my vars (def)
+ public signal void select (string key, string type, string skel, string etype);
+
+ // ctor
+ public Xcls_WindowAddProp()
+ {
+ _this = this;
+ this.el = new Gtk.ScrolledWindow( null, null );
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.shadow_type = Gtk.ShadowType.IN;
+ var child_0 = new Xcls_TreeView2( _this );
+ child_0.ref();
+ this.el.add ( child_0.el );
+
+ // init method
+
+ this.el.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);
+ }
+
+ // user defined functions
+ public void show (Palete.Palete pal, string etype, string xtype) {
+ this.model.el.clear();
+
+ Gtk.TreeIter iter;
+ var elementList = pal.getPropertiesFor( xtype,etype);
+
+
+ //print ("GOT " + elementList.length + " items for " + fullpath + "|" + type);
+ // console.dump(elementList);
+
+ var miter = elementList.map_iterator();
+ while (miter.next()) {
+ var p = miter.get_value();
+
+ this.model.el.append(out iter);
+
+ this.model.el.set(iter,
+ 0, p.name,
+ 1, p.type,
+ 2, "<b>" + p.name +"</b> <i>"+p.type+"</i>\n" +
+ GLib.Markup.escape_text(p.doctxt),
+ 3, p.sig,
+ 4, "<b>" + p.name +"</b> <span size=\"small\"><i>"+p.type+"</i></span>",
+ 5, etype,
+ -1
+ );
+ }
+ this.model.el.set_sort_column_id(0,Gtk.SortType.ASCENDING);
+
+ }
+ public void clear () {
+ this.model.el.clear();
+
+ }
+ public class Xcls_TreeView2 : Object
+ {
+ public Gtk.TreeView el;
+ private Xcls_WindowAddProp _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_TreeView2(Xcls_WindowAddProp _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.TreeView();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.tooltip_column = 2;
+ this.el.enable_tree_lines = true;
+ this.el.headers_visible = true;
+ var child_0 = new Xcls_model( _this );
+ child_0.ref();
+ this.el.set_model ( child_0.el );
+ var child_1 = new Xcls_namecol( _this );
+ child_1.ref();
+ this.el.append_column ( child_1.el );
+
+ // init method
+
+ {
+ var description = new Pango.FontDescription();
+ description.set_size(8000);
+ this.el.override_font(description);
+
+ this.el.get_selection().set_mode( Gtk.SelectionMode.SINGLE);
+
+
+
+
+
+ }
+
+ // listeners
+ this.el.row_activated.connect( (path, column) => {
+
+ Gtk.TreeIter iter;
+
+
+ var m = _this.model;
+
+ m.el.get_iter(out iter,path);
+
+
+ // var val = "";
+
+
+ var key = m.getValue(iter, 0);
+
+ var type = m.getValue(iter, 1);
+ var skel = m.getValue(iter, 3);
+ var etype = m.getValue(iter, 5);
+
+
+ _this.select(key,etype == "signals" ? "" : type,skel, etype);
+
+ });
+ }
+
+ // user defined functions
+ }
+ public class Xcls_model : Object
+ {
+ public Gtk.ListStore el;
+ private Xcls_WindowAddProp _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_model(Xcls_WindowAddProp _owner )
+ {
+ _this = _owner;
+ _this.model = this;
+ this.el = new Gtk.ListStore( 6, typeof(string), // 0 real key
+typeof(string), // 1 real type
+typeof(string), // 2 docs ?
+typeof(string), // 3 visable desc
+typeof(string), // 4 function desc
+typeof(string) // 5 element type (event|prop)
+ );
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ public string getValue (Gtk.TreeIter iter, int col)
+ {
+
+ GLib.Value value;
+ this.el.get_value(iter, col, out value);
+
+ return (string)value;
+
+ }
+ }
+ public class Xcls_namecol : Object
+ {
+ public Gtk.TreeViewColumn el;
+ private Xcls_WindowAddProp _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_namecol(Xcls_WindowAddProp _owner )
+ {
+ _this = _owner;
+ _this.namecol = this;
+ this.el = new Gtk.TreeViewColumn();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.title = "Double click to add";
+ var child_0 = new Xcls_namerender( _this );
+ child_0.ref();
+ this.el.pack_start ( child_0.el , true );
+
+ // init method
+
+ this.el.add_attribute(_this.namerender.el , "markup", 4 );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_namerender : Object
+ {
+ public Gtk.CellRendererText el;
+ private Xcls_WindowAddProp _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_namerender(Xcls_WindowAddProp _owner )
+ {
+ _this = _owner;
+ _this.namerender = this;
+ this.el = new Gtk.CellRendererText();
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ }
+}
--- /dev/null
+{
+ "name" : "WindowLeftProjects",
+ "parent" : "",
+ "title" : "",
+ "path" : "/home/alan/gitlive/app.Builder.js/src/Builder4/WindowLeftProjects.bjs",
+ "permname" : "",
+ "modOrder" : "",
+ "build_module" : "builder",
+ "items" : [
+ {
+ "listeners" : {
+ "show" : " ( ) => {\n this.load();\n}"
+ },
+ "@ void project_selected" : "(Project.Project project)",
+ "id" : "WindowLeftProjects",
+ "| void load" : "() {\n // clear list...\n \n if (_this.is_loaded) {\n return;\n }\n _this.is_loading = true;\n \n _this.is_loaded = true;\n \n Project.Project.loadAll();\n var projects = Project.Project.allProjectsByName();\n \n Gtk.TreeIter iter;\n var m = this.model.el;\n m.clear();\n \n for (var i = 0; i < projects.size; i++) {\n m.append(out iter);\n m.set(iter, 0,projects.get(i).name );\n \n var o = GLib.Value(typeof(Object));\n o.set_object((Object)projects.get(i));\n \n m.set_value(iter, 1, o);\n \n }\n m.set_sort_column_id(0, Gtk.SortType.ASCENDING);\n _this.is_loading = false; \n}\n",
+ "# bool is_loaded" : false,
+ "* pack" : "add",
+ "xtype" : "Box",
+ "| Project.Project? getSelectedProject" : "() { \n Gtk.TreeIter iter;\n Gtk.TreeModel mod;\n \n var s = this.view.el.get_selection();\n if (!s.get_selected(out mod, out iter)) {\n return null;\n }\n \n GLib.Value gval;\n\n mod.get_value(iter, 1 , out gval);\n var project = (Project.Project)gval.get_object();\n \n return project;\n}",
+ "| void selectProject" : "(Project.Project project) {\n \n var sel = _this.view.el.get_selection();\n \n sel.unselect_all();\n \n var found = false;\n _this.model.el.foreach((mod, path, iter) => {\n GLib.Value val;\n \n mod.get_value(iter, 1, out val);\n if ( ( (Project.Project)val.get_object()).fn != project.fn) {\n print(\"SKIP %s != %s\\n\", ((Project.Project)val.get_object()).name , project.name);\n return false;//continue\n }\n sel.select_iter(iter);\n this.project_selected(project);\n found = true;\n return true;\n \n \n });\n if (!found) {\n\t print(\"tried to select %s, could not find it\", project.name);\n }\n}\n",
+ "# bool is_loading" : false,
+ "$ xns" : "Gtk",
+ "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
+ "$ homogeneous" : false,
+ "@ void show_new_project" : "()",
+ "items" : [
+ {
+ "* init" : " this.el.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);\n",
+ "$ shadow_type" : "Gtk.ShadowType.IN",
+ "* pack" : "pack_end,true,true,0",
+ "xtype" : "ScrolledWindow",
+ "$ xns" : "Gtk",
+ "items" : [
+ {
+ "listeners" : {
+ "cursor_changed" : " () => {\n if (_this.is_loading) {\n return;\n }\n \n Gtk.TreeIter iter;\n Gtk.TreeModel mod;\n \n var s = this.el.get_selection();\n if (!s.get_selected(out mod, out iter)) {\n return;\n }\n \n GLib.Value gval;\n\n mod.get_value(iter, 1 , out gval);\n var project = (Project.Project)gval.get_object();\n \n _this.project_selected(project);\n \n} "
+ },
+ "id" : "view",
+ "* init" : " var description = new Pango.FontDescription();\n description.set_size(8000);\n this.el.override_font(description); \n \n var selection = this.el.get_selection();\n selection.set_mode( Gtk.SelectionMode.SINGLE);\n \n\n \n \n ",
+ "xtype" : "TreeView",
+ "* pack" : "add",
+ "$ enable_tree_lines" : true,
+ "$ headers_visible" : true,
+ "$ xns" : "Gtk",
+ "items" : [
+ {
+ "id" : "model",
+ "* init" : "{\n this.el.set_sort_func(0, (mod,a,b) => {\n GLib.Value ga, gb;\n mod.get_value(a,0, out ga);\n mod.get_value(b,0, out gb);\n \n if ((string)ga == (string)gb) {\n return 0;\n }\n return (string)ga > (string)gb ? 1 : -1;\n }); \n\n\n}\n",
+ "* pack" : "set_model",
+ "xtype" : "ListStore",
+ "$ columns" : "typeof(string), typeof(Object)",
+ "n_columns" : 2,
+ "$ xns" : "Gtk"
+ },
+ {
+ "utf8 title" : "Projects",
+ "* init" : "\n this.el.add_attribute(_this.namecol.el , \"markup\", 0 );\n ",
+ "* pack" : "append_column",
+ "xtype" : "TreeViewColumn",
+ "$ xns" : "Gtk",
+ "items" : [
+ {
+ "id" : "namecol",
+ "* pack" : "pack_start,true",
+ "xtype" : "CellRendererText",
+ "$ xns" : "Gtk"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file
--- /dev/null
+static Xcls_WindowLeftProjects _WindowLeftProjects;
+
+public class Xcls_WindowLeftProjects : Object
+{
+ public Gtk.Box el;
+ private Xcls_WindowLeftProjects _this;
+
+ public static Xcls_WindowLeftProjects singleton()
+ {
+ if (_WindowLeftProjects == null) {
+ _WindowLeftProjects= new Xcls_WindowLeftProjects();
+ }
+ return _WindowLeftProjects;
+ }
+ public Xcls_view view;
+ public Xcls_model model;
+ public Xcls_namecol namecol;
+
+ // my vars (def)
+ public signal void project_selected (Project.Project project);
+ public bool is_loaded;
+ public bool is_loading;
+ public signal void show_new_project ();
+
+ // ctor
+ public Xcls_WindowLeftProjects()
+ {
+ _this = this;
+ this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
+
+ // my vars (dec)
+ this.is_loaded = false;
+ this.is_loading = false;
+
+ // set gobject values
+ this.el.homogeneous = false;
+ var child_0 = new Xcls_ScrolledWindow2( _this );
+ child_0.ref();
+ this.el.pack_end ( child_0.el , true,true,0 );
+
+ //listeners
+ this.el.show.connect( ( ) => {
+ this.load();
+ });
+ }
+
+ // user defined functions
+ public void load () {
+ // clear list...
+
+ if (_this.is_loaded) {
+ return;
+ }
+ _this.is_loading = true;
+
+ _this.is_loaded = true;
+
+ Project.Project.loadAll();
+ var projects = Project.Project.allProjectsByName();
+
+ Gtk.TreeIter iter;
+ var m = this.model.el;
+ m.clear();
+
+ for (var i = 0; i < projects.size; i++) {
+ m.append(out iter);
+ m.set(iter, 0,projects.get(i).name );
+
+ var o = GLib.Value(typeof(Object));
+ o.set_object((Object)projects.get(i));
+
+ m.set_value(iter, 1, o);
+
+ }
+ m.set_sort_column_id(0, Gtk.SortType.ASCENDING);
+ _this.is_loading = false;
+ }
+ public Project.Project? getSelectedProject () {
+ Gtk.TreeIter iter;
+ Gtk.TreeModel mod;
+
+ var s = this.view.el.get_selection();
+ if (!s.get_selected(out mod, out iter)) {
+ return null;
+ }
+
+ GLib.Value gval;
+
+ mod.get_value(iter, 1 , out gval);
+ var project = (Project.Project)gval.get_object();
+
+ return project;
+ }
+ public void selectProject (Project.Project project) {
+
+ var sel = _this.view.el.get_selection();
+
+ sel.unselect_all();
+
+ var found = false;
+ _this.model.el.foreach((mod, path, iter) => {
+ GLib.Value val;
+
+ mod.get_value(iter, 1, out val);
+ if ( ( (Project.Project)val.get_object()).fn != project.fn) {
+ print("SKIP %s != %s\n", ((Project.Project)val.get_object()).name , project.name);
+ return false;//continue
+ }
+ sel.select_iter(iter);
+ this.project_selected(project);
+ found = true;
+ return true;
+
+
+ });
+ if (!found) {
+ print("tried to select %s, could not find it", project.name);
+ }
+ }
+ public class Xcls_ScrolledWindow2 : Object
+ {
+ public Gtk.ScrolledWindow el;
+ private Xcls_WindowLeftProjects _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_ScrolledWindow2(Xcls_WindowLeftProjects _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.ScrolledWindow( null, null );
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.shadow_type = Gtk.ShadowType.IN;
+ var child_0 = new Xcls_view( _this );
+ child_0.ref();
+ this.el.add ( child_0.el );
+
+ // init method
+
+ this.el.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);
+ }
+
+ // user defined functions
+ }
+ public class Xcls_view : Object
+ {
+ public Gtk.TreeView el;
+ private Xcls_WindowLeftProjects _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_view(Xcls_WindowLeftProjects _owner )
+ {
+ _this = _owner;
+ _this.view = this;
+ this.el = new Gtk.TreeView();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.enable_tree_lines = true;
+ this.el.headers_visible = true;
+ var child_0 = new Xcls_model( _this );
+ child_0.ref();
+ this.el.set_model ( child_0.el );
+ var child_1 = new Xcls_TreeViewColumn5( _this );
+ child_1.ref();
+ this.el.append_column ( child_1.el );
+
+ // init method
+
+ var description = new Pango.FontDescription();
+ description.set_size(8000);
+ this.el.override_font(description);
+
+ var selection = this.el.get_selection();
+ selection.set_mode( Gtk.SelectionMode.SINGLE);
+
+ //listeners
+ this.el.cursor_changed.connect( () => {
+ if (_this.is_loading) {
+ return;
+ }
+
+ Gtk.TreeIter iter;
+ Gtk.TreeModel mod;
+
+ var s = this.el.get_selection();
+ if (!s.get_selected(out mod, out iter)) {
+ return;
+ }
+
+ GLib.Value gval;
+
+ mod.get_value(iter, 1 , out gval);
+ var project = (Project.Project)gval.get_object();
+
+ _this.project_selected(project);
+
+ });
+ }
+
+ // user defined functions
+ }
+ public class Xcls_model : Object
+ {
+ public Gtk.ListStore el;
+ private Xcls_WindowLeftProjects _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_model(Xcls_WindowLeftProjects _owner )
+ {
+ _this = _owner;
+ _this.model = this;
+ this.el = new Gtk.ListStore( 2, typeof(string), typeof(Object) );
+
+ // my vars (dec)
+
+ // set gobject values
+
+ // init method
+
+ {
+ this.el.set_sort_func(0, (mod,a,b) => {
+ GLib.Value ga, gb;
+ mod.get_value(a,0, out ga);
+ mod.get_value(b,0, out gb);
+
+ if ((string)ga == (string)gb) {
+ return 0;
+ }
+ return (string)ga > (string)gb ? 1 : -1;
+ });
+
+
+ }
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_TreeViewColumn5 : Object
+ {
+ public Gtk.TreeViewColumn el;
+ private Xcls_WindowLeftProjects _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_TreeViewColumn5(Xcls_WindowLeftProjects _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.TreeViewColumn();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.title = "Projects";
+ var child_0 = new Xcls_namecol( _this );
+ child_0.ref();
+ this.el.pack_start ( child_0.el , true );
+
+ // init method
+
+ this.el.add_attribute(_this.namecol.el , "markup", 0 );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_namecol : Object
+ {
+ public Gtk.CellRendererText el;
+ private Xcls_WindowLeftProjects _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_namecol(Xcls_WindowLeftProjects _owner )
+ {
+ _this = _owner;
+ _this.namecol = this;
+ this.el = new Gtk.CellRendererText();
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ }
+
+
+
+
+}
--- /dev/null
+{
+ "name" : "WindowLeftProps",
+ "parent" : "",
+ "title" : "",
+ "path" : "/home/alan/gitlive/app.Builder.js/src/Builder4/WindowLeftProps.bjs",
+ "permname" : "",
+ "modOrder" : "",
+ "build_module" : "builder",
+ "items" : [
+ {
+ "# bool allow_edit" : false,
+ "| void updateKey" : "(string oldkey, string type, string key ) {\n\n \n\t\n\t_this.model.el.foreach((mod, path, iter) => {\n\t\t \n \n \t \n \n\t\t GLib.Value gvaltype, gval,kvalue;\n\t\t mod.get_value(iter, 1 , out gval); // one is key..\n\t\t\n\t mod.get_value(iter,0, out gvaltype);\n\t \n \t mod.get_value(iter,3, out kvalue);\n\t \n\t if (oldkey == ((string)gval) && type == ((string)gvaltype)) {\n\t \n\t\t \t //print(\"update iter type=%s, key=%s value=%s\\n\", type, key,(string) kvalue);\n\t \n \t \t this.updateIter(iter, type, key, (string)kvalue);\n \t \t return true;\n\t \t }\n\t \n\n\t\treturn false;\n\t});\n\t\n\tthis.changed();\n\n\n}\n",
+ "id" : "LeftProps",
+ "| void before_edit" : "()\n{\n\n print(\"before edit - stop editing\\n\");\n \n // these do not appear to trigger save...\n _this.keyrender.el.stop_editing(false);\n _this.keyrender.el.editable =false;\n\n _this.valrender.el.stop_editing(false);\n _this.valrender.el.editable =false; \n \n \n// technicall stop the popup editor..\n\n}\n",
+ "| string keySortFormat" : "(string key) {\n // listeners first - with 0\n // specials\n if (key[0] == '*') {\n return \"1 \" + key;\n }\n // functions\n \n var bits = key.split(\" \");\n \n if (key[0] == '|') {\n return \"2 \" + bits[bits.length -1];\n }\n // signals\n if (key[0] == '@') {\n return \"3 \" + bits[bits.length -1];\n }\n \n // props\n if (key[0] == '#') {\n return \"4 \" + bits[bits.length -1];\n }\n // the rest..\n return \"5 \" + bits[bits.length -1]; \n\n\n\n}",
+ "| void finish_editing" : "() {\n // \n this.before_edit();\n}",
+ "| bool startEditingValue" : "( Gtk.TreePath path) {\n\n // ONLY return true if editing is allowed - eg. combo..\n\n print(\"start editing?\\n\");\n if (!this.stop_editor()) {\n print(\"stop editor failed\\n\");\n return false;\n }\n \n Gtk.TreeIter iter;\n\n var mod = this.model.el;\n mod.get_iter (out iter, path);\n \n /*\n m.set(iter, \n 0, \"listener\",\n 1, miter.get_key(),\n 2, \"<b>\" + miter.get_key() + \"</b>\",\n 3, miter.get_value()\n ); \n \n */\n GLib.Value gval;\n mod.get_value(iter, 3 , out gval);\n var val = (string)gval;\n\n mod.get_value(iter, 1 , out gval);\n var key = (string)gval;\n \n \n string kname, kflag, ktype;\n this.node.normalize_key(key, out kname, out kflag, out ktype);\n \n \n mod.get_value(iter, 0 , out gval);\n var type = (string)gval; // listerner or prop..\n \n \n \n var use_textarea = false;\n\n //------------ things that require the text editor...\n \n if (type == \"listener\") {\n use_textarea = true;\n }\n if (key.length > 0 && key[0] == '|') { // user defined method\n use_textarea = true;\n }\n if (key.length > 0 && key[0] == '$') { // raw string\n use_textarea = true;\n }\n if (key.length > 0 && key == \"* init\") {\n use_textarea = true;\n }\n if (val.length > 40) { // long value...\n use_textarea = true;\n }\n \n \n \n if (use_textarea) {\n print(\"Call show editor\\n\");\n GLib.Timeout.add_full(GLib.Priority.DEFAULT,10 , () => {\n this.view.el.get_selection().select_path(path);\n \n this.show_editor(file, node, type, key);\n \n return false;\n });\n \n \n return false;\n }\n \n var pal = Palete.factory(this.file.project.xtype);\n \n string[] opts;\n var has_opts = pal.typeOptions(this.node.fqn(), kname, ktype, out opts);\n \n \n \n // others... - fill in options for true/false?\n print(\"turn on editing %s \\n\" , mod.get_path(iter).to_string());\n \n print (ktype.up());\n if (has_opts) {\n print(\"start editing try/false)???\");\n this.valrender.el.has_entry = false;\n \n this.valrender.setOptions(opts);\n \n this.valrender.el.has_entry = false;\n this.valrender.el.editable = true;\n this.allow_edit = true;\n GLib.Timeout.add_full(GLib.Priority.DEFAULT,100 , () => {\n this.view.el.set_cursor_on_cell(\n path,\n this.valcol.el,\n this.valrender.el,\n true\n );\n return false;\n });\n return true;\n }\n \n // see if type is a Enum.\n \n \n \n \n \n opts = { };\n this.valrender.setOptions(opts);\n \n GLib.Timeout.add_full(GLib.Priority.DEFAULT,10 , () => {\n \n // at this point - work out the type...\n // if its' a combo... then show the options..\n this.valrender.el.has_entry = true;\n \n this.valrender.el.editable = true; \n \n \n this.allow_edit = true;\n \n \n \n \n\n this.view.el.set_cursor_on_cell(\n path,\n this.valcol.el,\n this.valrender.el,\n true\n );\n return false;\n });\n return false;\n}\n",
+ "| void load" : "(JsRender.JsRender file, JsRender.Node? node) \n{\n print(\"load leftprops\\n\");\n this.before_edit();\n this.node = node;\n this.file = file;\n \n \n this.model.el.clear();\n \n //this.get('/RightEditor').el.hide();\n if (node ==null) {\n return ;\n }\n \n \n\n //var provider = this.get('/LeftTree').getPaleteProvider();\n Gtk.TreeIter iter;\n \n //typeof(string), // 0 key type\n //typeof(string), // 1 key\n //typeof(string), // 2 key (display)\n //typeof(string), // 3 value\n //typeof(string), // 4 value (display)\n //typeof(string), // 5 both (tooltip)\n \n \n \n \n // really need a way to sort the hashmap...\n var m = this.model.el;\n \n var miter = node.listeners.map_iterator();\n var i = 0;\n \n while(miter.next()) {\n i++;\n m.append(out iter,null);\n \n this.updateIter(iter, \"listener\", miter.get_key(), miter.get_value());\n \n \n }\n \n \n miter = node.props.map_iterator();\n \n \n while(miter.next()) {\n i++;\n m.append(out iter,null);\n this.updateIter(iter, \"prop\", miter.get_key(), miter.get_value());\n \n }\n print(\"clear selection\\n\");\n // clear selection?\n this.model.el.set_sort_column_id(6,Gtk.SortType.ASCENDING); // sort by real key..\n \n this.view.el.get_selection().unselect_all();\n \n var pane = _this.main_window.editpane.el;\n var try_size = (i * 25) + 60; // est. 20px per line + 40px header\n \n // max 80%...\n pane.set_position( \n ((try_size * 1.0f) / (pane.max_position * 1.0f)) > 0.8f ? \n (int) (pane.max_position * 0.2f) :\n pane.max_position-try_size);\n \n \n}\n",
+ "xtype" : "Box",
+ "| string keyFormat" : "(string val, string type) {\n \n // Glib.markup_escape_text(val);\n\n if (type == \"listener\") {\n return \"<span font_weight=\\\"bold\\\" color=\\\"#660000\\\">\" + \n GLib.Markup.escape_text(val) +\n \"</span>\";\n }\n // property..\n if (val.length < 1) {\n return \"<span color=\\\"#FF0000\\\">--empty--</span>\";\n }\n \n //@ = signal\n //$ = property with \n //# - object properties\n //* = special\n // all of these... - display value is last element..\n var ar = val.strip().split(\" \");\n \n \n var dval = GLib.Markup.escape_text(ar[ar.length-1]);\n \n \n \n \n switch(val[0]) {\n case '@': // signal // just bold balck?\n if (dval[0] == '@') {\n dval = dval.substring(1);\n }\n \n return @\"<span font_weight=\\\"bold\\\">@ $dval</span>\"; \n case '#': // object properties?\n if (dval[0] == '#') {\n dval = dval.substring(1);\n }\n return @\"<span font_weight=\\\"bold\\\">$dval</span>\";\n case '*': // special\n if (dval[0] == '*') {\n dval = dval.substring(1);\n }\n return @\"<span color=\\\"#0000CC\\\" font_weight=\\\"bold\\\">$dval</span>\"; \n case '$':\n if (dval[0] == '$') {\n dval = dval.substring(1);\n }\n return @\"<span style=\\\"italic\\\">$dval</span>\";\n case '|': // user defined methods\n if (dval[0] == '|') {\n dval = dval.substring(1);\n }\n return @\"<span color=\\\"#008000\\\" font_weight=\\\"bold\\\">$dval</span>\";\n \n \n \n default:\n return dval;\n }\n \n \n\n}",
+ "# JsRender.JsRender file" : "",
+ "@ bool stop_editor" : "()",
+ "@ void show_editor" : "(JsRender.JsRender file, JsRender.Node node, string type, string key)",
+ "@ void changed" : "()",
+ "| void deleteSelected" : " () {\n \n Gtk.TreeIter iter;\n Gtk.TreeModel mod;\n \n var s = this.view.el.get_selection();\n s.get_selected(out mod, out iter);\n \n \n GLib.Value gval;\n mod.get_value(iter, 0 , out gval);\n var type = (string)gval;\n \n mod.get_value(iter, 1 , out gval);\n var key = (string)gval;\n \n switch(type) {\n case \"listener\":\n this.node.listeners.unset(key);\n break;\n \n case \"props\":\n this.node.props.unset(key);\n break;\n }\n this.load(this.file, this.node);\n \n _this.changed();\n}",
+ "$ xns" : "Gtk",
+ "| void startEditingKey" : "( Gtk.TreePath path) {\n \n if (!this.stop_editor()) {\n return;\n }\n \n // others... - fill in options for true/false?\n \n \n GLib.Timeout.add_full(GLib.Priority.DEFAULT,10 , () => {\n this.allow_edit = true;\n this.keyrender.el.editable = true;\n \n this.view.el.set_cursor_on_cell(\n path,\n this.keycol.el,\n this.keyrender.el,\n true\n );\n \n return false;\n });\n \n \n}\n",
+ "@ void show_add_props" : "(string type)",
+ "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
+ "$ homogeneous" : "false ",
+ "# Xcls_MainWindow main_window" : "null",
+ "| void addProp" : " (string in_type, string key, string value, string value_type) {\n // info includes key, val, skel, etype..\n //console.dump(info);\n //type = info.type.toLowerCase();\n //var data = this.toJS();\n \n var type = in_type == \"signals\" ? \"listener\" : in_type;\n \n var fkey = (value_type.length > 0 ? value_type + \" \" : \"\") + key;\n \n if (type == \"listener\") {\n if (this.node.listeners.has_key(key)) {\n return;\n }\n this.node.listeners.set(key,value);\n } else {\n \n if (this.node.props.has_key(fkey)) {\n return;\n }\n this.node.props.set(fkey,value);\n }\n \n \n // add a row???\n this.load(this.file, this.node);\n \n \n \n /// need to find the row which I've just added..\n \n \n var s = this.view.el.get_selection();\n s.unselect_all();\n \n print(\"trying to find new iter\");\n \n this.model.el.foreach((model, path, iter) => {\n GLib.Value gval;\n \n this.model.el.get_value(iter, 0 , out gval);\n if ((string)gval != type) {\n print(\"not type: %s = %s\\n\", (string)gval , type);\n return false;\n }\n this.model.el.get_value(iter, 1 , out gval);\n if ((string)gval != fkey) {\n print(\"not key: %s = %s\\n\", (string)gval , fkey);\n return false;\n }\n // delay this?\n GLib.Timeout.add_full(GLib.Priority.DEFAULT,40 , () => {\n \n this.startEditingValue(this.model.el.get_path(iter));\n return false;\n });\n //s.select_iter(iter);\n return true; \n });\n \n \n \n \n}\n",
+ "| void updateIter" : "(Gtk.TreeIter iter, string type, string key, string kvalue) {\n\n //print(\"update Iter %s, %s\\n\", key,kvalue);\n //typeof(string), // 0 key type\n //typeof(string), // 1 key\n //typeof(string), // 2 key (display)\n //typeof(string), // 3 value\n //typeof(string), // 4 value (display)\n //typeof(string), // 5 both (tooltip)\n //typeof(string), // 6 key (sort)\n \n var dl = kvalue.strip().split(\"\\n\");\n\n var dis_val = dl.length > 1 ? (dl[0].strip()+ \"...\") : dl[0];\n \n if (type == \"listener\") {\n \n \n \n this.model.el.set(iter, \n 0, type,\n 1, key,\n 2, this.keyFormat(key ,type),\n 3, kvalue,\n 4, dis_val,\n 5, \"<tt>\" + GLib.Markup.escape_text(key + \" \" +kvalue) + \"</tt>\",\n 6, \"0 \" + key\n ); \n return;\n }\n \n\n\n this.model.el.set(iter, \n 0, \"props\",\n 1, key,\n 2, this.keyFormat(key , \"prop\"),\n 3, kvalue,\n 4, dis_val,\n 5, \"<tt>\" + GLib.Markup.escape_text(key + \" \" + kvalue) + \"</tt>\",\n 6, this.keySortFormat(key)\n ); \n}",
+ "# JsRender.Node node" : "",
+ "items" : [
+ {
+ "* pack" : "pack_start,false,true,0",
+ "xtype" : "Box",
+ "$ xns" : "Gtk",
+ "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
+ "items" : [
+ {
+ "listeners" : {
+ "button_press_event" : " (self, ev) => {\n _this.before_edit();\n \n \n var p = _this.AddPropertyPopup;\n p.el.set_screen(Gdk.Screen.get_default());\n p.el.show_all();\n p.el.popup(null, null, null, ev.button, ev.time);\n return true;\n}"
+ },
+ "bool hexpand" : true,
+ "xtype" : "Button",
+ "* pack" : "add",
+ "$ xns" : "Gtk",
+ "items" : [
+ {
+ "* pack" : "add",
+ "xtype" : "Box",
+ "$ xns" : "Gtk",
+ "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
+ "items" : [
+ {
+ "$ Gtk.Stock stock" : "Gtk.Stock.ADD",
+ "* pack" : "add",
+ "xtype" : "Image",
+ "$ xns" : "Gtk",
+ "$ icon_size" : "Gtk.IconSize.MENU"
+ },
+ {
+ "label" : "Other",
+ "xtype" : "Label",
+ "* pack" : "add",
+ "$ xns" : "Gtk"
+ }
+ ]
+ },
+ {
+ "id" : "AddPropertyPopup",
+ "xtype" : "Menu",
+ "* pack" : false,
+ "$ xns" : "Gtk",
+ "items" : [
+ {
+ "listeners" : {
+ "activate" : " () => {\n _this.addProp( \"prop\", \"id\", \"\", \"\");\n}"
+ },
+ "label" : "id: _this.{ID} (Vala)",
+ "xtype" : "MenuItem",
+ "* pack" : "append",
+ "tooltip_markup" : "Using _this.{ID} will map to this element",
+ "$ xns" : "Gtk"
+ },
+ {
+ "listeners" : {
+ "activate" : " ( ) => {\n\n _this.addProp( \"prop\", \"pack\",\"add\", \"*\");\n}"
+ },
+ "label" : "pack: Pack method (Vala)",
+ "* pack" : "append",
+ "xtype" : "MenuItem",
+ "tooltip_markup" : "how to pack this element onto parent, (method, 2nd arg, 3rd arg) .. the 1st argument is filled by the element",
+ "$ xns" : "Gtk"
+ },
+ {
+ "listeners" : {
+ "activate" : " ( ) => {\n\n _this.addProp( \"prop\", \"ctor\",\"\", \"*\");\n}"
+ },
+ "label" : "ctor: Alterative to default contructor (Vala)",
+ "xtype" : "MenuItem",
+ "* pack" : "append",
+ "tooltip_markup" : "eg. \n\nnew Clutter.Image.from_file(.....)",
+ "$ xns" : "Gtk"
+ },
+ {
+ "listeners" : {
+ "activate" : " ( ) => {\n\n _this.addProp( \"prop\", \"init\", \"{\\n\\n}\\n\", \"*\" );\n}"
+ },
+ "label" : "init: initialziation code (vala)",
+ "xtype" : "MenuItem",
+ "* pack" : "append",
+ "tooltip_markup" : "This code is called after the ctor",
+ "$ xns" : "Gtk"
+ },
+ {
+ "listeners" : {
+ "activate" : " () => {\n _this.addProp( \"prop\", \"cms-id\", \"\", \"string\");\n}"
+ },
+ "label" : "cms-id: (Roo JS/Pman library)",
+ "* pack" : "append",
+ "xtype" : "MenuItem",
+ "tooltip_markup" : "set the cms-id for this element, when converted to javascript, the html value will be wrapped with Pman.Cms.content({cms-id},{original-html})\n",
+ "$ xns" : "Gtk"
+ },
+ {
+ "* pack" : "add",
+ "xtype" : "SeparatorMenuItem",
+ "$ xns" : "Gtk"
+ },
+ {
+ "listeners" : {
+ "activate" : " (self) => {\n\n _this.addProp( \"prop\", \"XXXX\", \"\",\"string\");\n\n}"
+ },
+ "label" : "String",
+ "xtype" : "MenuItem",
+ "* pack" : "append",
+ "tooltip_markup" : "Add a user defined string property",
+ "$ xns" : "Gtk"
+ },
+ {
+ "listeners" : {
+ "activate" : " ( ) =>{\n\n _this.addProp(\"prop\", \"XXX\", \"0\", \"int\");\n}"
+ },
+ "label" : "Number",
+ "xtype" : "MenuItem",
+ "* pack" : "append",
+ "tooltip_markup" : "Add a user defined number property",
+ "$ xns" : "Gtk"
+ },
+ {
+ "listeners" : {
+ "activate" : " ( ) =>{\n\n _this.addProp( \"prop\", \"XXX\", \"true\", \"bool\");\n}"
+ },
+ "label" : "Boolean",
+ "xtype" : "MenuItem",
+ "* pack" : "append",
+ "tooltip_markup" : "Add a user defined boolean property",
+ "$ xns" : "Gtk"
+ },
+ {
+ "* pack" : "add",
+ "xtype" : "SeparatorMenuItem",
+ "$ xns" : "Gtk"
+ },
+ {
+ "listeners" : {
+ "activate" : " ( ) =>{\n\n _this.addProp(\"prop\", \"XXXX\", \"function() { }\", \"| function\");\n}"
+ },
+ "label" : "Javascript Function",
+ "xtype" : "MenuItem",
+ "* pack" : "append",
+ "tooltip_markup" : "Add a user function boolean property",
+ "$ xns" : "Gtk"
+ },
+ {
+ "listeners" : {
+ "activate" : " ( ) =>{\n\n _this.addProp( \"prop\", \"XXXX\", \"() {\\n\\n}\\n\", \"| return_type\");\n}"
+ },
+ "label" : "Vala Method",
+ "* pack" : "append",
+ "xtype" : "MenuItem",
+ "tooltip_markup" : "Add a user function boolean property",
+ "$ xns" : "Gtk"
+ },
+ {
+ "listeners" : {
+ "activate" : " ( ) =>{\n\n _this.addProp( \"prop\", \"XXXX\", \"()\", \"@ void\");\n}"
+ },
+ "label" : "Vala Signal",
+ "xtype" : "MenuItem",
+ "* pack" : "append",
+ "tooltip_markup" : "Add a vala signal",
+ "$ xns" : "Gtk"
+ },
+ {
+ "* pack" : "add",
+ "xtype" : "SeparatorMenuItem",
+ "$ xns" : "Gtk"
+ },
+ {
+ "listeners" : {
+ "activate" : " ( ) =>{\n\n _this.addProp(\"prop\", \"flexy:if\", \"value_or_condition\", \"string\");\n}"
+ },
+ "label" : "Flexy - If",
+ "xtype" : "MenuItem",
+ "* pack" : "append",
+ "tooltip_markup" : "Add a flexy if (for HTML templates)",
+ "$ xns" : "Gtk"
+ },
+ {
+ "listeners" : {
+ "activate" : " ( ) =>{\n\n _this.addProp(\"prop\", \"flexy:include\", \"name_of_file.html\", \"string\");\n}"
+ },
+ "label" : "Flexy - Include",
+ "* pack" : "append",
+ "xtype" : "MenuItem",
+ "tooltip_markup" : "Add a flexy include (for HTML templates)",
+ "$ xns" : "Gtk"
+ },
+ {
+ "listeners" : {
+ "activate" : " ( ) =>{\n\n _this.addProp(\"prop\", \"flexy:foreach\", \"array,key,value\", \"string\");\n}"
+ },
+ "label" : "Flexy - Foreach",
+ "* pack" : "append",
+ "xtype" : "MenuItem",
+ "tooltip_markup" : "Add a flexy foreach (for HTML templates)",
+ "$ xns" : "Gtk"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "# bool editing" : false,
+ "id" : "EditProps",
+ "* init" : " {\n \n this.el.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);\n}\n",
+ "$ shadow_type" : "Gtk.ShadowType.IN",
+ "* pack" : "pack_end,true,true,0",
+ "xtype" : "ScrolledWindow",
+ "$ xns" : "Gtk",
+ "items" : [
+ {
+ "listeners" : {
+ "button_press_event" : " ( ev) => {\n \n Gtk.TreeViewColumn col;\n int cell_x;\n int cell_y;\n Gtk.TreePath path;\n if (!this.el.get_path_at_pos((int)ev.x, (int) ev.y, out path, out col, out cell_x, out cell_y )) {\n print(\"nothing selected on click\");\n GLib.Timeout.add_full(GLib.Priority.DEFAULT,10 , () => {\n this.el.get_selection().unselect_all();\n\n return false;\n });\n _this.before_edit();\n return false; //not on a element.\n }\n \n \n // double click on name..\n if (ev.type == Gdk.EventType.2BUTTON_PRESS && ev.button == 1 && col.title == \"Name\") { \n // show popup!. \n \n if (this.popover == null) {\n \t\t this.popover = new Xcls_PopoverProperty();\n \t\t this.popover.mainwindow = _this.main_window;\n \t\t}\n \t\t\n \n _this.before_edit();\n _this.stop_editor();\n\t\t \n _this.keyrender.el.stop_editing(false);\n _this.keyrender.el.editable =false;\n \n _this.valrender.el.stop_editing(false);\n _this.valrender.el.editable =false;\n Gtk.TreeIter iter;\n var mod = this.el.get_model();\n\t\t mod.get_iter (out iter, path);\n\t\t \n \n\t\tGLib.Value gvaltype, gval;\n\t\tmod.get_value(iter, 1 , out gval); // one is key..\n\t\t\n\t mod.get_value(iter,0, out gvaltype);\n\n this.popover.show(this.el, _this.node, (string)gvaltype, (string)gval);\n \n // _this.startEditingKey(path); \n \n return false;\n }\n \n \n \n \n // right click.\n if (ev.type == Gdk.EventType.BUTTON_PRESS && ev.button == 3) { \n // show popup!. \n //if (col.title == \"Value\") {\n // _this.before_edit();\n // return false;\n //}\n\n var p = _this.ContextMenu;\n\n p.el.set_screen(Gdk.Screen.get_default());\n p.el.show_all();\n p.el.popup(null, null, null, ev.button, ev.time);\n //Seed.print(\"click:\" + res.column.title);\n // select the \n GLib.Timeout.add_full(GLib.Priority.DEFAULT,10 , () => {\n \n this.el.get_selection().select_path(path);\n return false;\n });\n _this.before_edit();\n return false;\n }\n \n \n if (col.title != \"Value\") {\n print(\"col title != Value\");\n \n GLib.Timeout.add_full(GLib.Priority.DEFAULT,10 , () => {\n this.el.get_selection().select_path(path);\n return false;\n });\n \n _this.before_edit();\n // XObject.error(\"column is not value?\");\n return false; // ignore.. - key click.. ??? should we do this??\n }\n \n \n // if the cell can be edited with a pulldown\n // then we should return true... - and let the start_editing handle it?\n \n \n \n \n \n \n // _this.before_edit(); <<< we really need to stop the other editor..\n _this.keyrender.el.stop_editing(false);\n _this.keyrender.el.editable =false;\n \n \n return _this.startEditingValue(path); // assumes selected row..\n \n \n\n \n \n}"
+ },
+ "id" : "view",
+ "* init" : "{\n var selection = this.el.get_selection();\n selection.set_mode( Gtk.SelectionMode.SINGLE);\n\n\n var description = new Pango.FontDescription();\n description.set_size(10000);\n this.el.override_font(description);\n}\n",
+ "tooltip_column" : 5,
+ "xtype" : "TreeView",
+ "$ enable_tree_lines" : true,
+ "$ headers_visible" : true,
+ "* pack" : "add",
+ "$ xns" : "Gtk",
+ "Xcls_PopoverProperty popover" : "null",
+ "items" : [
+ {
+ "id" : "model",
+ "$ changed" : "function(str, doRefresh) {\n if (!this.activePath) {\n return;\n }\n var iter = new Gtk.TreeIter();\n this.el.get_iter(iter, new Gtk.TreePath.from_string(this.activePath));\n \n this.el.set_value(iter, 1, '' +str);\n this.el.set_value(iter, 3, '' + this.toShort(str));\n var type = this.getIterValue(iter, 4);\n\n this.el.set_value(iter, 5, type + ' : ' + str);\n // update the tree... \n\n this.get('/LeftTree.model').changed(this.toJS(), doRefresh); \n}\n",
+ "* pack" : "set_model",
+ "xtype" : "TreeStore",
+ "$ columns" : " typeof(string), // 0 key type\n typeof(string), // 1 key\n typeof(string), // 2 key (display)\n typeof(string), // 3 value\n typeof(string), // 4 value (display)\n typeof(string), // 5 both (tooltip) \n typeof(string) // 6 key (for sorting)\n",
+ "n_columns" : 7,
+ "$ xns" : "Gtk",
+ "$ toShort" : "function(str) {\n var a = typeof(str) == 'string' ? str.split(\"\\n\") : [];\n return a.length > 1 ? a[0] + '....' : '' + str;\n}\n"
+ },
+ {
+ "id" : "keycol",
+ "* init" : " this.el.add_attribute(_this.keyrender.el , \"markup\", 2 );\n this.el.add_attribute(_this.keyrender.el , \"text\", 1 );\n ",
+ "title" : "Name",
+ "* pack" : "append_column",
+ "xtype" : "TreeViewColumn",
+ "$ resizable" : true,
+ "$ xns" : "Gtk",
+ "items" : [
+ {
+ "listeners" : {
+ "editing_started" : "( editable, path) => {\n\n Gtk.TreeIter iter;\n _this.model.el.get_iter(out iter, new Gtk.TreePath.from_string(path));\n GLib.Value gval;\n \n\n\n // this.get('/LeftPanel.model').activePath = path;\n _this.model.el.get_value(iter,1, out gval);\n var val = (string)gval;\n \n ((Gtk.Entry)editable).set_text(val); \n}",
+ "edited" : " (path, newtext) => {\n print(\"Keyrender - signal:edited\\n\");\n \n this.el.editable = false;\n \n \n\n Gtk.TreeIter iter;\n _this.model.el.get_iter(out iter, new Gtk.TreePath.from_string(path));\n GLib.Value gval;\n \n _this.model.el.get_value(iter,1, out gval);\n var oldval = (string)gval;\n \n _this.model.el.get_value(iter,0, out gval);\n var ktype = (string)gval;\n \n _this.model.el.set_value(iter, 1, newtext);\n \n if (oldval == newtext) {\n return;\n }\n \n \n print(\"ktype: %s\\n\",ktype);\n switch(ktype) {\n case \"listener\":\n var ov = _this.node.listeners.get(oldval);\n _this.node.listeners.set(newtext, ov);\n _this.node.listeners.unset(oldval);\n \n _this.updateIter(iter, ktype, newtext, ov);\n \n break;\n case \"props\":\n var ov = _this.node.props.get(oldval);\n _this.node.props.set(newtext, ov);\n _this.node.props.unset(oldval);\n _this.updateIter(iter, ktype, newtext, ov);\n break;\n }\n _this.changed();\n \n}"
+ },
+ "id" : "keyrender",
+ "* pack" : "pack_start,false",
+ "xtype" : "CellRendererText",
+ "$ xns" : "Gtk"
+ }
+ ]
+ },
+ {
+ "id" : "valcol",
+ "* init" : "{\n\t\n\t// typeof(string), // 0 key type\n // typeof(string), // 1 key\n // typeof(string), // 2 key (display)\n // typeof(string), // 3 value\n // typeof(string) // 4 value (display)\n\n\t\n\tthis.el.add_attribute(_this.valrender.el , \"text\", 4 );\n\t//this.el.add_attribute(_this.valrender.el , \"sensitive\", 4 );\n\t//this.el.add_attribute(this.items[0].el , 'editable', 3 );\n // this.el.set_cell_data_func(cell, age_cell_data_func, NULL, NULL);\n\n //\tthis.get('/LeftPanel').editableColumn= this;\n}\n",
+ "* pack" : "append_column",
+ "title" : "Value",
+ "xtype" : "TreeViewColumn",
+ "$ resizable" : true,
+ "$ xns" : "Gtk",
+ "items" : [
+ {
+ "listeners" : {
+ "editing_started" : "( editable, path) => {\n //_this.editing = true;\n print(\"editing started called\\n\");\n if (!_this.allow_edit) {\n \n print(\"val - editing_Started\\n\");\n this.el.editable = false; // make sure it's not editor...\n \n \n return;\n }\n _this.allow_edit =false;\n \n \n if ( this.el.has_entry ) {\n \n Gtk.TreeIter iter;\n _this.model.el.get_iter(out iter, new Gtk.TreePath.from_string(path));\n GLib.Value gval;\n \n\n \n // this.get('/LeftPanel.model').activePath = path;\n _this.model.el.get_value(iter,3, out gval);\n \n\n var val = (string)gval;\n var combo = (Gtk.ComboBox)editable;\n\n var entry = (Gtk.Entry) combo.get_child(); \n entry.set_text(val);\n }\n \n}",
+ "edited" : " (path, newtext) => {\n print(\"Valrender - signal:edited\\n\");\n \n this.el.editable = false;\n/* \n m.set(iter, \n 0, \"listener\",\n 1, miter.get_key(),\n 2, \"<b>\" + miter.get_key() + \"</b>\",\n 3, miter.get_value(),\n 4, display_value(short);\n ); \n\n */ \n\n Gtk.TreeIter iter;\n _this.model.el.get_iter(out iter, new Gtk.TreePath.from_string(path));\n GLib.Value gval;\n \n _this.model.el.get_value(iter,0, out gval);\n var ktype = (string)gval;\n \n \n _this.model.el.get_value(iter,3, out gval);\n var oldval = (string)gval;\n \n _this.model.el.get_value(iter,1, out gval);\n var key = (string)gval;\n \n \n \n switch(ktype) {\n case \"listener\":\n _this.node.listeners.set(key, newtext);\n _this.updateIter(iter,ktype,key,newtext);\n break;\n case \"props\":\n _this.node.props.set(key,newtext);\n _this.updateIter(iter,ktype, key,newtext); \n break;\n }\n// _this.load(_this.file,_this.node);\n _this.changed();\n \n}"
+ },
+ "id" : "valrender",
+ "xtype" : "CellRendererCombo",
+ "* pack" : "pack_start,true",
+ "$ editable" : false,
+ "$ has_entry" : true,
+ "$ xns" : "Gtk",
+ "| void setOptions" : "(string[] ar) {\n var m = _this.valrendermodel.el;\n m.clear();\n Gtk.TreeIter iret;\n for (var i =0; i < ar.length; i++) {\n m.append(out iret);\n m.set_value(iret, 0, ar[i]);\n }\n\n}",
+ "text_column" : 0,
+ "items" : [
+ {
+ "id" : "valrendermodel",
+ "xtype" : "ListStore",
+ "* pack" : false,
+ "$ columns" : "typeof(string)",
+ "n_columns" : 1,
+ "$ xns" : "Gtk",
+ "* prop" : "model"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "id" : "ContextMenu",
+ "* pack" : false,
+ "xtype" : "Menu",
+ "$ xns" : "Gtk",
+ "items" : [
+ {
+ "listeners" : {
+ "activate" : " ( ) =>{\n \n var s = _this.view.el.get_selection();\n Gtk.TreeIter iter;\n Gtk.TreeModel mod;\n s.get_selected (out mod, out iter);\n \n if (_this.view.popover == null) {\n \t\t _this.view.popover = new Xcls_PopoverProperty();\n \t\t _this.view.popover.mainwindow = _this.main_window;\n \t\t}\n \t\t\n \n _this.before_edit();\n _this.stop_editor();\n\t \n _this.keyrender.el.stop_editing(false);\n _this.keyrender.el.editable =false;\n\n _this.valrender.el.stop_editing(false);\n _this.valrender.el.editable =false;\n \n \n\tGLib.Value gvaltype, gval;\n\tmod.get_value(iter, 1 , out gval); // one is key..\n\t\n mod.get_value(iter,0, out gvaltype);\n\n\t_this.view.popover.show(_this.view.el, _this.node, (string)gvaltype, (string)gval);\n \n \n \n // _this.startEditingKey(model.get_path(iter));\n}"
+ },
+ "label" : "Edit (double click)",
+ "* pack" : "append",
+ "xtype" : "MenuItem",
+ "$ xns" : "Gtk"
+ },
+ {
+ "* pack" : "append",
+ "xtype" : "SeparatorMenuItem",
+ "$ xns" : "Gtk"
+ },
+ {
+ "listeners" : {
+ "activate" : " ( ) =>{\n\t_this.deleteSelected();\n}"
+ },
+ "label" : "Delete",
+ "* pack" : "append",
+ "xtype" : "MenuItem",
+ "$ xns" : "Gtk"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file
--- /dev/null
+static Xcls_LeftProps _LeftProps;
+
+public class Xcls_LeftProps : Object
+{
+ public Gtk.Box el;
+ private Xcls_LeftProps _this;
+
+ public static Xcls_LeftProps singleton()
+ {
+ if (_LeftProps == null) {
+ _LeftProps= new Xcls_LeftProps();
+ }
+ return _LeftProps;
+ }
+ public Xcls_AddPropertyPopup AddPropertyPopup;
+ public Xcls_EditProps EditProps;
+ public Xcls_view view;
+ public Xcls_model model;
+ public Xcls_keycol keycol;
+ public Xcls_keyrender keyrender;
+ public Xcls_valcol valcol;
+ public Xcls_valrender valrender;
+ public Xcls_valrendermodel valrendermodel;
+ public Xcls_ContextMenu ContextMenu;
+
+ // my vars (def)
+ public bool allow_edit;
+ public JsRender.JsRender file;
+ public signal bool stop_editor ();
+ public signal void show_editor (JsRender.JsRender file, JsRender.Node node, string type, string key);
+ public signal void changed ();
+ public signal void show_add_props (string type);
+ public Xcls_MainWindow main_window;
+ public JsRender.Node node;
+
+ // ctor
+ public Xcls_LeftProps()
+ {
+ _this = this;
+ this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
+
+ // my vars (dec)
+ this.allow_edit = false;
+ this.main_window = null;
+
+ // set gobject values
+ this.el.homogeneous = false ;
+ var child_0 = new Xcls_Box2( _this );
+ child_0.ref();
+ this.el.pack_start ( child_0.el , false,true,0 );
+ var child_1 = new Xcls_EditProps( _this );
+ child_1.ref();
+ this.el.pack_end ( child_1.el , true,true,0 );
+ }
+
+ // user defined functions
+ public void updateKey (string oldkey, string type, string key ) {
+
+
+
+ _this.model.el.foreach((mod, path, iter) => {
+
+
+
+
+ GLib.Value gvaltype, gval,kvalue;
+ mod.get_value(iter, 1 , out gval); // one is key..
+
+ mod.get_value(iter,0, out gvaltype);
+
+ mod.get_value(iter,3, out kvalue);
+
+ if (oldkey == ((string)gval) && type == ((string)gvaltype)) {
+
+ //print("update iter type=%s, key=%s value=%s\n", type, key,(string) kvalue);
+
+ this.updateIter(iter, type, key, (string)kvalue);
+ return true;
+ }
+
+
+ return false;
+ });
+
+ this.changed();
+
+
+ }
+ public void before_edit ()
+ {
+
+ print("before edit - stop editing\n");
+
+ // these do not appear to trigger save...
+ _this.keyrender.el.stop_editing(false);
+ _this.keyrender.el.editable =false;
+
+ _this.valrender.el.stop_editing(false);
+ _this.valrender.el.editable =false;
+
+
+ // technicall stop the popup editor..
+
+ }
+ public string keySortFormat (string key) {
+ // listeners first - with 0
+ // specials
+ if (key[0] == '*') {
+ return "1 " + key;
+ }
+ // functions
+
+ var bits = key.split(" ");
+
+ if (key[0] == '|') {
+ return "2 " + bits[bits.length -1];
+ }
+ // signals
+ if (key[0] == '@') {
+ return "3 " + bits[bits.length -1];
+ }
+
+ // props
+ if (key[0] == '#') {
+ return "4 " + bits[bits.length -1];
+ }
+ // the rest..
+ return "5 " + bits[bits.length -1];
+
+
+
+ }
+ public void finish_editing () {
+ //
+ this.before_edit();
+ }
+ public bool startEditingValue ( Gtk.TreePath path) {
+
+ // ONLY return true if editing is allowed - eg. combo..
+
+ print("start editing?\n");
+ if (!this.stop_editor()) {
+ print("stop editor failed\n");
+ return false;
+ }
+
+ Gtk.TreeIter iter;
+
+ var mod = this.model.el;
+ mod.get_iter (out iter, path);
+
+ /*
+ m.set(iter,
+ 0, "listener",
+ 1, miter.get_key(),
+ 2, "<b>" + miter.get_key() + "</b>",
+ 3, miter.get_value()
+ );
+
+ */
+ GLib.Value gval;
+ mod.get_value(iter, 3 , out gval);
+ var val = (string)gval;
+
+ mod.get_value(iter, 1 , out gval);
+ var key = (string)gval;
+
+
+ string kname, kflag, ktype;
+ this.node.normalize_key(key, out kname, out kflag, out ktype);
+
+
+ mod.get_value(iter, 0 , out gval);
+ var type = (string)gval; // listerner or prop..
+
+
+
+ var use_textarea = false;
+
+ //------------ things that require the text editor...
+
+ if (type == "listener") {
+ use_textarea = true;
+ }
+ if (key.length > 0 && key[0] == '|') { // user defined method
+ use_textarea = true;
+ }
+ if (key.length > 0 && key[0] == '$') { // raw string
+ use_textarea = true;
+ }
+ if (key.length > 0 && key == "* init") {
+ use_textarea = true;
+ }
+ if (val.length > 40) { // long value...
+ use_textarea = true;
+ }
+
+
+
+ if (use_textarea) {
+ print("Call show editor\n");
+ GLib.Timeout.add_full(GLib.Priority.DEFAULT,10 , () => {
+ this.view.el.get_selection().select_path(path);
+
+ this.show_editor(file, node, type, key);
+
+ return false;
+ });
+
+
+ return false;
+ }
+
+ var pal = Palete.factory(this.file.project.xtype);
+
+ string[] opts;
+ var has_opts = pal.typeOptions(this.node.fqn(), kname, ktype, out opts);
+
+
+
+ // others... - fill in options for true/false?
+ print("turn on editing %s \n" , mod.get_path(iter).to_string());
+
+ print (ktype.up());
+ if (has_opts) {
+ print("start editing try/false)???");
+ this.valrender.el.has_entry = false;
+
+ this.valrender.setOptions(opts);
+
+ this.valrender.el.has_entry = false;
+ this.valrender.el.editable = true;
+ this.allow_edit = true;
+ GLib.Timeout.add_full(GLib.Priority.DEFAULT,100 , () => {
+ this.view.el.set_cursor_on_cell(
+ path,
+ this.valcol.el,
+ this.valrender.el,
+ true
+ );
+ return false;
+ });
+ return true;
+ }
+
+ // see if type is a Enum.
+
+
+
+
+
+ opts = { };
+ this.valrender.setOptions(opts);
+
+ GLib.Timeout.add_full(GLib.Priority.DEFAULT,10 , () => {
+
+ // at this point - work out the type...
+ // if its' a combo... then show the options..
+ this.valrender.el.has_entry = true;
+
+ this.valrender.el.editable = true;
+
+
+ this.allow_edit = true;
+
+
+
+
+
+ this.view.el.set_cursor_on_cell(
+ path,
+ this.valcol.el,
+ this.valrender.el,
+ true
+ );
+ return false;
+ });
+ return false;
+ }
+ public void load (JsRender.JsRender file, JsRender.Node? node)
+ {
+ print("load leftprops\n");
+ this.before_edit();
+ this.node = node;
+ this.file = file;
+
+
+ this.model.el.clear();
+
+ //this.get('/RightEditor').el.hide();
+ if (node ==null) {
+ return ;
+ }
+
+
+
+ //var provider = this.get('/LeftTree').getPaleteProvider();
+ Gtk.TreeIter iter;
+
+ //typeof(string), // 0 key type
+ //typeof(string), // 1 key
+ //typeof(string), // 2 key (display)
+ //typeof(string), // 3 value
+ //typeof(string), // 4 value (display)
+ //typeof(string), // 5 both (tooltip)
+
+
+
+
+ // really need a way to sort the hashmap...
+ var m = this.model.el;
+
+ var miter = node.listeners.map_iterator();
+ var i = 0;
+
+ while(miter.next()) {
+ i++;
+ m.append(out iter,null);
+
+ this.updateIter(iter, "listener", miter.get_key(), miter.get_value());
+
+
+ }
+
+
+ miter = node.props.map_iterator();
+
+
+ while(miter.next()) {
+ i++;
+ m.append(out iter,null);
+ this.updateIter(iter, "prop", miter.get_key(), miter.get_value());
+
+ }
+ print("clear selection\n");
+ // clear selection?
+ this.model.el.set_sort_column_id(6,Gtk.SortType.ASCENDING); // sort by real key..
+
+ this.view.el.get_selection().unselect_all();
+
+ var pane = _this.main_window.editpane.el;
+ var try_size = (i * 25) + 60; // est. 20px per line + 40px header
+
+ // max 80%...
+ pane.set_position(
+ ((try_size * 1.0f) / (pane.max_position * 1.0f)) > 0.8f ?
+ (int) (pane.max_position * 0.2f) :
+ pane.max_position-try_size);
+
+
+ }
+ public string keyFormat (string val, string type) {
+
+ // Glib.markup_escape_text(val);
+
+ if (type == "listener") {
+ return "<span font_weight=\"bold\" color=\"#660000\">" +
+ GLib.Markup.escape_text(val) +
+ "</span>";
+ }
+ // property..
+ if (val.length < 1) {
+ return "<span color=\"#FF0000\">--empty--</span>";
+ }
+
+ //@ = signal
+ //$ = property with
+ //# - object properties
+ //* = special
+ // all of these... - display value is last element..
+ var ar = val.strip().split(" ");
+
+
+ var dval = GLib.Markup.escape_text(ar[ar.length-1]);
+
+
+
+
+ switch(val[0]) {
+ case '@': // signal // just bold balck?
+ if (dval[0] == '@') {
+ dval = dval.substring(1);
+ }
+
+ return @"<span font_weight=\"bold\">@ $dval</span>";
+ case '#': // object properties?
+ if (dval[0] == '#') {
+ dval = dval.substring(1);
+ }
+ return @"<span font_weight=\"bold\">$dval</span>";
+ case '*': // special
+ if (dval[0] == '*') {
+ dval = dval.substring(1);
+ }
+ return @"<span color=\"#0000CC\" font_weight=\"bold\">$dval</span>";
+ case '$':
+ if (dval[0] == '$') {
+ dval = dval.substring(1);
+ }
+ return @"<span style=\"italic\">$dval</span>";
+ case '|': // user defined methods
+ if (dval[0] == '|') {
+ dval = dval.substring(1);
+ }
+ return @"<span color=\"#008000\" font_weight=\"bold\">$dval</span>";
+
+
+
+ default:
+ return dval;
+ }
+
+
+
+ }
+ public void deleteSelected () {
+
+ Gtk.TreeIter iter;
+ Gtk.TreeModel mod;
+
+ var s = this.view.el.get_selection();
+ s.get_selected(out mod, out iter);
+
+
+ GLib.Value gval;
+ mod.get_value(iter, 0 , out gval);
+ var type = (string)gval;
+
+ mod.get_value(iter, 1 , out gval);
+ var key = (string)gval;
+
+ switch(type) {
+ case "listener":
+ this.node.listeners.unset(key);
+ break;
+
+ case "props":
+ this.node.props.unset(key);
+ break;
+ }
+ this.load(this.file, this.node);
+
+ _this.changed();
+ }
+ public void startEditingKey ( Gtk.TreePath path) {
+
+ if (!this.stop_editor()) {
+ return;
+ }
+
+ // others... - fill in options for true/false?
+
+
+ GLib.Timeout.add_full(GLib.Priority.DEFAULT,10 , () => {
+ this.allow_edit = true;
+ this.keyrender.el.editable = true;
+
+ this.view.el.set_cursor_on_cell(
+ path,
+ this.keycol.el,
+ this.keyrender.el,
+ true
+ );
+
+ return false;
+ });
+
+
+ }
+ public void addProp (string in_type, string key, string value, string value_type) {
+ // info includes key, val, skel, etype..
+ //console.dump(info);
+ //type = info.type.toLowerCase();
+ //var data = this.toJS();
+
+ var type = in_type == "signals" ? "listener" : in_type;
+
+ var fkey = (value_type.length > 0 ? value_type + " " : "") + key;
+
+ if (type == "listener") {
+ if (this.node.listeners.has_key(key)) {
+ return;
+ }
+ this.node.listeners.set(key,value);
+ } else {
+
+ if (this.node.props.has_key(fkey)) {
+ return;
+ }
+ this.node.props.set(fkey,value);
+ }
+
+
+ // add a row???
+ this.load(this.file, this.node);
+
+
+
+ /// need to find the row which I've just added..
+
+
+ var s = this.view.el.get_selection();
+ s.unselect_all();
+
+ print("trying to find new iter");
+
+ this.model.el.foreach((model, path, iter) => {
+ GLib.Value gval;
+
+ this.model.el.get_value(iter, 0 , out gval);
+ if ((string)gval != type) {
+ print("not type: %s = %s\n", (string)gval , type);
+ return false;
+ }
+ this.model.el.get_value(iter, 1 , out gval);
+ if ((string)gval != fkey) {
+ print("not key: %s = %s\n", (string)gval , fkey);
+ return false;
+ }
+ // delay this?
+ GLib.Timeout.add_full(GLib.Priority.DEFAULT,40 , () => {
+
+ this.startEditingValue(this.model.el.get_path(iter));
+ return false;
+ });
+ //s.select_iter(iter);
+ return true;
+ });
+
+
+
+
+ }
+ public void updateIter (Gtk.TreeIter iter, string type, string key, string kvalue) {
+
+ //print("update Iter %s, %s\n", key,kvalue);
+ //typeof(string), // 0 key type
+ //typeof(string), // 1 key
+ //typeof(string), // 2 key (display)
+ //typeof(string), // 3 value
+ //typeof(string), // 4 value (display)
+ //typeof(string), // 5 both (tooltip)
+ //typeof(string), // 6 key (sort)
+
+ var dl = kvalue.strip().split("\n");
+
+ var dis_val = dl.length > 1 ? (dl[0].strip()+ "...") : dl[0];
+
+ if (type == "listener") {
+
+
+
+ this.model.el.set(iter,
+ 0, type,
+ 1, key,
+ 2, this.keyFormat(key ,type),
+ 3, kvalue,
+ 4, dis_val,
+ 5, "<tt>" + GLib.Markup.escape_text(key + " " +kvalue) + "</tt>",
+ 6, "0 " + key
+ );
+ return;
+ }
+
+
+
+ this.model.el.set(iter,
+ 0, "props",
+ 1, key,
+ 2, this.keyFormat(key , "prop"),
+ 3, kvalue,
+ 4, dis_val,
+ 5, "<tt>" + GLib.Markup.escape_text(key + " " + kvalue) + "</tt>",
+ 6, this.keySortFormat(key)
+ );
+ }
+ public class Xcls_Box2 : Object
+ {
+ public Gtk.Box el;
+ private Xcls_LeftProps _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Box2(Xcls_LeftProps _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
+
+ // my vars (dec)
+
+ // set gobject values
+ var child_0 = new Xcls_Button3( _this );
+ child_0.ref();
+ this.el.add ( child_0.el );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Button3 : Object
+ {
+ public Gtk.Button el;
+ private Xcls_LeftProps _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Button3(Xcls_LeftProps _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Button();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.hexpand = true;
+ var child_0 = new Xcls_Box4( _this );
+ child_0.ref();
+ this.el.add ( child_0.el );
+ var child_1 = new Xcls_AddPropertyPopup( _this );
+ child_1.ref();
+
+ //listeners
+ this.el.button_press_event.connect( (self, ev) => {
+ _this.before_edit();
+
+
+ var p = _this.AddPropertyPopup;
+ p.el.set_screen(Gdk.Screen.get_default());
+ p.el.show_all();
+ p.el.popup(null, null, null, ev.button, ev.time);
+ return true;
+ });
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Box4 : Object
+ {
+ public Gtk.Box el;
+ private Xcls_LeftProps _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Box4(Xcls_LeftProps _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
+
+ // my vars (dec)
+
+ // set gobject values
+ var child_0 = new Xcls_Image5( _this );
+ child_0.ref();
+ this.el.add ( child_0.el );
+ var child_1 = new Xcls_Label6( _this );
+ child_1.ref();
+ this.el.add ( child_1.el );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Image5 : Object
+ {
+ public Gtk.Image el;
+ private Xcls_LeftProps _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Image5(Xcls_LeftProps _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Image();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.stock = Gtk.Stock.ADD;
+ this.el.icon_size = Gtk.IconSize.MENU;
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_Label6 : Object
+ {
+ public Gtk.Label el;
+ private Xcls_LeftProps _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Label6(Xcls_LeftProps _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Label( "Other" );
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ }
+
+
+ public class Xcls_AddPropertyPopup : Object
+ {
+ public Gtk.Menu el;
+ private Xcls_LeftProps _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_AddPropertyPopup(Xcls_LeftProps _owner )
+ {
+ _this = _owner;
+ _this.AddPropertyPopup = this;
+ this.el = new Gtk.Menu();
+
+ // my vars (dec)
+
+ // set gobject values
+ var child_0 = new Xcls_MenuItem8( _this );
+ child_0.ref();
+ this.el.append ( child_0.el );
+ var child_1 = new Xcls_MenuItem9( _this );
+ child_1.ref();
+ this.el.append ( child_1.el );
+ var child_2 = new Xcls_MenuItem10( _this );
+ child_2.ref();
+ this.el.append ( child_2.el );
+ var child_3 = new Xcls_MenuItem11( _this );
+ child_3.ref();
+ this.el.append ( child_3.el );
+ var child_4 = new Xcls_MenuItem12( _this );
+ child_4.ref();
+ this.el.append ( child_4.el );
+ var child_5 = new Xcls_SeparatorMenuItem13( _this );
+ child_5.ref();
+ this.el.add ( child_5.el );
+ var child_6 = new Xcls_MenuItem14( _this );
+ child_6.ref();
+ this.el.append ( child_6.el );
+ var child_7 = new Xcls_MenuItem15( _this );
+ child_7.ref();
+ this.el.append ( child_7.el );
+ var child_8 = new Xcls_MenuItem16( _this );
+ child_8.ref();
+ this.el.append ( child_8.el );
+ var child_9 = new Xcls_SeparatorMenuItem17( _this );
+ child_9.ref();
+ this.el.add ( child_9.el );
+ var child_10 = new Xcls_MenuItem18( _this );
+ child_10.ref();
+ this.el.append ( child_10.el );
+ var child_11 = new Xcls_MenuItem19( _this );
+ child_11.ref();
+ this.el.append ( child_11.el );
+ var child_12 = new Xcls_MenuItem20( _this );
+ child_12.ref();
+ this.el.append ( child_12.el );
+ var child_13 = new Xcls_SeparatorMenuItem21( _this );
+ child_13.ref();
+ this.el.add ( child_13.el );
+ var child_14 = new Xcls_MenuItem22( _this );
+ child_14.ref();
+ this.el.append ( child_14.el );
+ var child_15 = new Xcls_MenuItem23( _this );
+ child_15.ref();
+ this.el.append ( child_15.el );
+ var child_16 = new Xcls_MenuItem24( _this );
+ child_16.ref();
+ this.el.append ( child_16.el );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_MenuItem8 : Object
+ {
+ public Gtk.MenuItem el;
+ private Xcls_LeftProps _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_MenuItem8(Xcls_LeftProps _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.MenuItem();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.tooltip_markup = "Using _this.{ID} will map to this element";
+ this.el.label = "id: _this.{ID} (Vala)";
+
+ //listeners
+ this.el.activate.connect( () => {
+ _this.addProp( "prop", "id", "", "");
+ });
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_MenuItem9 : Object
+ {
+ public Gtk.MenuItem el;
+ private Xcls_LeftProps _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_MenuItem9(Xcls_LeftProps _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.MenuItem();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.tooltip_markup = "how to pack this element onto parent, (method, 2nd arg, 3rd arg) .. the 1st argument is filled by the element";
+ this.el.label = "pack: Pack method (Vala)";
+
+ //listeners
+ this.el.activate.connect( ( ) => {
+
+ _this.addProp( "prop", "pack","add", "*");
+ });
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_MenuItem10 : Object
+ {
+ public Gtk.MenuItem el;
+ private Xcls_LeftProps _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_MenuItem10(Xcls_LeftProps _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.MenuItem();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.tooltip_markup = "eg. \n\nnew Clutter.Image.from_file(.....)";
+ this.el.label = "ctor: Alterative to default contructor (Vala)";
+
+ //listeners
+ this.el.activate.connect( ( ) => {
+
+ _this.addProp( "prop", "ctor","", "*");
+ });
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_MenuItem11 : Object
+ {
+ public Gtk.MenuItem el;
+ private Xcls_LeftProps _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_MenuItem11(Xcls_LeftProps _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.MenuItem();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.tooltip_markup = "This code is called after the ctor";
+ this.el.label = "init: initialziation code (vala)";
+
+ //listeners
+ this.el.activate.connect( ( ) => {
+
+ _this.addProp( "prop", "init", "{\n\n}\n", "*" );
+ });
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_MenuItem12 : Object
+ {
+ public Gtk.MenuItem el;
+ private Xcls_LeftProps _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_MenuItem12(Xcls_LeftProps _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.MenuItem();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.tooltip_markup = "set the cms-id for this element, when converted to javascript, the html value will be wrapped with Pman.Cms.content({cms-id},{original-html})\n";
+ this.el.label = "cms-id: (Roo JS/Pman library)";
+
+ //listeners
+ this.el.activate.connect( () => {
+ _this.addProp( "prop", "cms-id", "", "string");
+ });
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_SeparatorMenuItem13 : Object
+ {
+ public Gtk.SeparatorMenuItem el;
+ private Xcls_LeftProps _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_SeparatorMenuItem13(Xcls_LeftProps _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.SeparatorMenuItem();
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_MenuItem14 : Object
+ {
+ public Gtk.MenuItem el;
+ private Xcls_LeftProps _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_MenuItem14(Xcls_LeftProps _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.MenuItem();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.tooltip_markup = "Add a user defined string property";
+ this.el.label = "String";
+
+ //listeners
+ this.el.activate.connect( (self) => {
+
+ _this.addProp( "prop", "XXXX", "","string");
+
+ });
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_MenuItem15 : Object
+ {
+ public Gtk.MenuItem el;
+ private Xcls_LeftProps _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_MenuItem15(Xcls_LeftProps _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.MenuItem();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.tooltip_markup = "Add a user defined number property";
+ this.el.label = "Number";
+
+ //listeners
+ this.el.activate.connect( ( ) =>{
+
+ _this.addProp("prop", "XXX", "0", "int");
+ });
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_MenuItem16 : Object
+ {
+ public Gtk.MenuItem el;
+ private Xcls_LeftProps _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_MenuItem16(Xcls_LeftProps _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.MenuItem();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.tooltip_markup = "Add a user defined boolean property";
+ this.el.label = "Boolean";
+
+ //listeners
+ this.el.activate.connect( ( ) =>{
+
+ _this.addProp( "prop", "XXX", "true", "bool");
+ });
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_SeparatorMenuItem17 : Object
+ {
+ public Gtk.SeparatorMenuItem el;
+ private Xcls_LeftProps _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_SeparatorMenuItem17(Xcls_LeftProps _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.SeparatorMenuItem();
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_MenuItem18 : Object
+ {
+ public Gtk.MenuItem el;
+ private Xcls_LeftProps _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_MenuItem18(Xcls_LeftProps _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.MenuItem();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.tooltip_markup = "Add a user function boolean property";
+ this.el.label = "Javascript Function";
+
+ //listeners
+ this.el.activate.connect( ( ) =>{
+
+ _this.addProp("prop", "XXXX", "function() { }", "| function");
+ });
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_MenuItem19 : Object
+ {
+ public Gtk.MenuItem el;
+ private Xcls_LeftProps _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_MenuItem19(Xcls_LeftProps _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.MenuItem();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.tooltip_markup = "Add a user function boolean property";
+ this.el.label = "Vala Method";
+
+ //listeners
+ this.el.activate.connect( ( ) =>{
+
+ _this.addProp( "prop", "XXXX", "() {\n\n}\n", "| return_type");
+ });
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_MenuItem20 : Object
+ {
+ public Gtk.MenuItem el;
+ private Xcls_LeftProps _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_MenuItem20(Xcls_LeftProps _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.MenuItem();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.tooltip_markup = "Add a vala signal";
+ this.el.label = "Vala Signal";
+
+ //listeners
+ this.el.activate.connect( ( ) =>{
+
+ _this.addProp( "prop", "XXXX", "()", "@ void");
+ });
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_SeparatorMenuItem21 : Object
+ {
+ public Gtk.SeparatorMenuItem el;
+ private Xcls_LeftProps _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_SeparatorMenuItem21(Xcls_LeftProps _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.SeparatorMenuItem();
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_MenuItem22 : Object
+ {
+ public Gtk.MenuItem el;
+ private Xcls_LeftProps _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_MenuItem22(Xcls_LeftProps _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.MenuItem();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.tooltip_markup = "Add a flexy if (for HTML templates)";
+ this.el.label = "Flexy - If";
+
+ //listeners
+ this.el.activate.connect( ( ) =>{
+
+ _this.addProp("prop", "flexy:if", "value_or_condition", "string");
+ });
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_MenuItem23 : Object
+ {
+ public Gtk.MenuItem el;
+ private Xcls_LeftProps _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_MenuItem23(Xcls_LeftProps _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.MenuItem();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.tooltip_markup = "Add a flexy include (for HTML templates)";
+ this.el.label = "Flexy - Include";
+
+ //listeners
+ this.el.activate.connect( ( ) =>{
+
+ _this.addProp("prop", "flexy:include", "name_of_file.html", "string");
+ });
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_MenuItem24 : Object
+ {
+ public Gtk.MenuItem el;
+ private Xcls_LeftProps _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_MenuItem24(Xcls_LeftProps _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.MenuItem();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.tooltip_markup = "Add a flexy foreach (for HTML templates)";
+ this.el.label = "Flexy - Foreach";
+
+ //listeners
+ this.el.activate.connect( ( ) =>{
+
+ _this.addProp("prop", "flexy:foreach", "array,key,value", "string");
+ });
+ }
+
+ // user defined functions
+ }
+
+
+
+
+ public class Xcls_EditProps : Object
+ {
+ public Gtk.ScrolledWindow el;
+ private Xcls_LeftProps _this;
+
+
+ // my vars (def)
+ public bool editing;
+
+ // ctor
+ public Xcls_EditProps(Xcls_LeftProps _owner )
+ {
+ _this = _owner;
+ _this.EditProps = this;
+ this.el = new Gtk.ScrolledWindow( null, null );
+
+ // my vars (dec)
+ this.editing = false;
+
+ // set gobject values
+ this.el.shadow_type = Gtk.ShadowType.IN;
+ var child_0 = new Xcls_view( _this );
+ child_0.ref();
+ this.el.add ( child_0.el );
+
+ // init method
+
+ {
+
+ this.el.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);
+ }
+ }
+
+ // user defined functions
+ }
+ public class Xcls_view : Object
+ {
+ public Gtk.TreeView el;
+ private Xcls_LeftProps _this;
+
+
+ // my vars (def)
+ public Xcls_PopoverProperty popover;
+
+ // ctor
+ public Xcls_view(Xcls_LeftProps _owner )
+ {
+ _this = _owner;
+ _this.view = this;
+ this.el = new Gtk.TreeView();
+
+ // my vars (dec)
+ this.popover = null;
+
+ // set gobject values
+ this.el.tooltip_column = 5;
+ this.el.enable_tree_lines = true;
+ this.el.headers_visible = true;
+ var child_0 = new Xcls_model( _this );
+ child_0.ref();
+ this.el.set_model ( child_0.el );
+ var child_1 = new Xcls_keycol( _this );
+ child_1.ref();
+ this.el.append_column ( child_1.el );
+ var child_2 = new Xcls_valcol( _this );
+ child_2.ref();
+ this.el.append_column ( child_2.el );
+ var child_3 = new Xcls_ContextMenu( _this );
+ child_3.ref();
+
+ // init method
+
+ {
+ var selection = this.el.get_selection();
+ selection.set_mode( Gtk.SelectionMode.SINGLE);
+
+
+ var description = new Pango.FontDescription();
+ description.set_size(10000);
+ this.el.override_font(description);
+ }
+
+ //listeners
+ this.el.button_press_event.connect( ( ev) => {
+
+ Gtk.TreeViewColumn col;
+ int cell_x;
+ int cell_y;
+ Gtk.TreePath path;
+ if (!this.el.get_path_at_pos((int)ev.x, (int) ev.y, out path, out col, out cell_x, out cell_y )) {
+ print("nothing selected on click");
+ GLib.Timeout.add_full(GLib.Priority.DEFAULT,10 , () => {
+ this.el.get_selection().unselect_all();
+
+ return false;
+ });
+ _this.before_edit();
+ return false; //not on a element.
+ }
+
+
+ // double click on name..
+ if (ev.type == Gdk.EventType.2BUTTON_PRESS && ev.button == 1 && col.title == "Name") {
+ // show popup!.
+
+ if (this.popover == null) {
+ this.popover = new Xcls_PopoverProperty();
+ this.popover.mainwindow = _this.main_window;
+ }
+
+
+ _this.before_edit();
+ _this.stop_editor();
+
+ _this.keyrender.el.stop_editing(false);
+ _this.keyrender.el.editable =false;
+
+ _this.valrender.el.stop_editing(false);
+ _this.valrender.el.editable =false;
+ Gtk.TreeIter iter;
+ var mod = this.el.get_model();
+ mod.get_iter (out iter, path);
+
+
+ GLib.Value gvaltype, gval;
+ mod.get_value(iter, 1 , out gval); // one is key..
+
+ mod.get_value(iter,0, out gvaltype);
+
+ this.popover.show(this.el, _this.node, (string)gvaltype, (string)gval);
+
+ // _this.startEditingKey(path);
+
+ return false;
+ }
+
+
+
+
+ // right click.
+ if (ev.type == Gdk.EventType.BUTTON_PRESS && ev.button == 3) {
+ // show popup!.
+ //if (col.title == "Value") {
+ // _this.before_edit();
+ // return false;
+ //}
+
+ var p = _this.ContextMenu;
+
+ p.el.set_screen(Gdk.Screen.get_default());
+ p.el.show_all();
+ p.el.popup(null, null, null, ev.button, ev.time);
+ //Seed.print("click:" + res.column.title);
+ // select the
+ GLib.Timeout.add_full(GLib.Priority.DEFAULT,10 , () => {
+
+ this.el.get_selection().select_path(path);
+ return false;
+ });
+ _this.before_edit();
+ return false;
+ }
+
+
+ if (col.title != "Value") {
+ print("col title != Value");
+
+ GLib.Timeout.add_full(GLib.Priority.DEFAULT,10 , () => {
+ this.el.get_selection().select_path(path);
+ return false;
+ });
+
+ _this.before_edit();
+ // XObject.error("column is not value?");
+ return false; // ignore.. - key click.. ??? should we do this??
+ }
+
+
+ // if the cell can be edited with a pulldown
+ // then we should return true... - and let the start_editing handle it?
+
+
+
+
+
+
+ // _this.before_edit(); <<< we really need to stop the other editor..
+ _this.keyrender.el.stop_editing(false);
+ _this.keyrender.el.editable =false;
+
+
+ return _this.startEditingValue(path); // assumes selected row..
+
+
+
+
+
+ });
+ }
+
+ // user defined functions
+ }
+ public class Xcls_model : Object
+ {
+ public Gtk.TreeStore el;
+ private Xcls_LeftProps _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_model(Xcls_LeftProps _owner )
+ {
+ _this = _owner;
+ _this.model = this;
+ this.el = new Gtk.TreeStore( 7, typeof(string), // 0 key type
+ typeof(string), // 1 key
+ typeof(string), // 2 key (display)
+ typeof(string), // 3 value
+ typeof(string), // 4 value (display)
+ typeof(string), // 5 both (tooltip)
+ typeof(string) // 6 key (for sorting)
+ );
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_keycol : Object
+ {
+ public Gtk.TreeViewColumn el;
+ private Xcls_LeftProps _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_keycol(Xcls_LeftProps _owner )
+ {
+ _this = _owner;
+ _this.keycol = this;
+ this.el = new Gtk.TreeViewColumn();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.title = "Name";
+ this.el.resizable = true;
+ var child_0 = new Xcls_keyrender( _this );
+ child_0.ref();
+ this.el.pack_start ( child_0.el , false );
+
+ // init method
+
+ this.el.add_attribute(_this.keyrender.el , "markup", 2 );
+ this.el.add_attribute(_this.keyrender.el , "text", 1 );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_keyrender : Object
+ {
+ public Gtk.CellRendererText el;
+ private Xcls_LeftProps _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_keyrender(Xcls_LeftProps _owner )
+ {
+ _this = _owner;
+ _this.keyrender = this;
+ this.el = new Gtk.CellRendererText();
+
+ // my vars (dec)
+
+ // set gobject values
+
+ //listeners
+ this.el.editing_started.connect( ( editable, path) => {
+
+ Gtk.TreeIter iter;
+ _this.model.el.get_iter(out iter, new Gtk.TreePath.from_string(path));
+ GLib.Value gval;
+
+
+
+ // this.get('/LeftPanel.model').activePath = path;
+ _this.model.el.get_value(iter,1, out gval);
+ var val = (string)gval;
+
+ ((Gtk.Entry)editable).set_text(val);
+ });
+ this.el.edited.connect( (path, newtext) => {
+ print("Keyrender - signal:edited\n");
+
+ this.el.editable = false;
+
+
+
+ Gtk.TreeIter iter;
+ _this.model.el.get_iter(out iter, new Gtk.TreePath.from_string(path));
+ GLib.Value gval;
+
+ _this.model.el.get_value(iter,1, out gval);
+ var oldval = (string)gval;
+
+ _this.model.el.get_value(iter,0, out gval);
+ var ktype = (string)gval;
+
+ _this.model.el.set_value(iter, 1, newtext);
+
+ if (oldval == newtext) {
+ return;
+ }
+
+
+ print("ktype: %s\n",ktype);
+ switch(ktype) {
+ case "listener":
+ var ov = _this.node.listeners.get(oldval);
+ _this.node.listeners.set(newtext, ov);
+ _this.node.listeners.unset(oldval);
+
+ _this.updateIter(iter, ktype, newtext, ov);
+
+ break;
+ case "props":
+ var ov = _this.node.props.get(oldval);
+ _this.node.props.set(newtext, ov);
+ _this.node.props.unset(oldval);
+ _this.updateIter(iter, ktype, newtext, ov);
+ break;
+ }
+ _this.changed();
+
+ });
+ }
+
+ // user defined functions
+ }
+
+
+ public class Xcls_valcol : Object
+ {
+ public Gtk.TreeViewColumn el;
+ private Xcls_LeftProps _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_valcol(Xcls_LeftProps _owner )
+ {
+ _this = _owner;
+ _this.valcol = this;
+ this.el = new Gtk.TreeViewColumn();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.title = "Value";
+ this.el.resizable = true;
+ var child_0 = new Xcls_valrender( _this );
+ child_0.ref();
+ this.el.pack_start ( child_0.el , true );
+
+ // init method
+
+ {
+
+ // typeof(string), // 0 key type
+ // typeof(string), // 1 key
+ // typeof(string), // 2 key (display)
+ // typeof(string), // 3 value
+ // typeof(string) // 4 value (display)
+
+
+ this.el.add_attribute(_this.valrender.el , "text", 4 );
+ //this.el.add_attribute(_this.valrender.el , "sensitive", 4 );
+ //this.el.add_attribute(this.items[0].el , 'editable', 3 );
+ // this.el.set_cell_data_func(cell, age_cell_data_func, NULL, NULL);
+
+ // this.get('/LeftPanel').editableColumn= this;
+ }
+ }
+
+ // user defined functions
+ }
+ public class Xcls_valrender : Object
+ {
+ public Gtk.CellRendererCombo el;
+ private Xcls_LeftProps _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_valrender(Xcls_LeftProps _owner )
+ {
+ _this = _owner;
+ _this.valrender = this;
+ this.el = new Gtk.CellRendererCombo();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.editable = false;
+ this.el.text_column = 0;
+ this.el.has_entry = true;
+ var child_0 = new Xcls_valrendermodel( _this );
+ child_0.ref();
+ this.el.model = child_0.el;
+
+ //listeners
+ this.el.editing_started.connect( ( editable, path) => {
+ //_this.editing = true;
+ print("editing started called\n");
+ if (!_this.allow_edit) {
+
+ print("val - editing_Started\n");
+ this.el.editable = false; // make sure it's not editor...
+
+
+ return;
+ }
+ _this.allow_edit =false;
+
+
+ if ( this.el.has_entry ) {
+
+ Gtk.TreeIter iter;
+ _this.model.el.get_iter(out iter, new Gtk.TreePath.from_string(path));
+ GLib.Value gval;
+
+
+
+ // this.get('/LeftPanel.model').activePath = path;
+ _this.model.el.get_value(iter,3, out gval);
+
+
+ var val = (string)gval;
+ var combo = (Gtk.ComboBox)editable;
+
+ var entry = (Gtk.Entry) combo.get_child();
+ entry.set_text(val);
+ }
+
+ });
+ this.el.edited.connect( (path, newtext) => {
+ print("Valrender - signal:edited\n");
+
+ this.el.editable = false;
+ /*
+ m.set(iter,
+ 0, "listener",
+ 1, miter.get_key(),
+ 2, "<b>" + miter.get_key() + "</b>",
+ 3, miter.get_value(),
+ 4, display_value(short);
+ );
+
+ */
+
+ Gtk.TreeIter iter;
+ _this.model.el.get_iter(out iter, new Gtk.TreePath.from_string(path));
+ GLib.Value gval;
+
+ _this.model.el.get_value(iter,0, out gval);
+ var ktype = (string)gval;
+
+
+ _this.model.el.get_value(iter,3, out gval);
+ var oldval = (string)gval;
+
+ _this.model.el.get_value(iter,1, out gval);
+ var key = (string)gval;
+
+
+
+ switch(ktype) {
+ case "listener":
+ _this.node.listeners.set(key, newtext);
+ _this.updateIter(iter,ktype,key,newtext);
+ break;
+ case "props":
+ _this.node.props.set(key,newtext);
+ _this.updateIter(iter,ktype, key,newtext);
+ break;
+ }
+ // _this.load(_this.file,_this.node);
+ _this.changed();
+
+ });
+ }
+
+ // user defined functions
+ public void setOptions (string[] ar) {
+ var m = _this.valrendermodel.el;
+ m.clear();
+ Gtk.TreeIter iret;
+ for (var i =0; i < ar.length; i++) {
+ m.append(out iret);
+ m.set_value(iret, 0, ar[i]);
+ }
+
+ }
+ }
+ public class Xcls_valrendermodel : Object
+ {
+ public Gtk.ListStore el;
+ private Xcls_LeftProps _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_valrendermodel(Xcls_LeftProps _owner )
+ {
+ _this = _owner;
+ _this.valrendermodel = this;
+ this.el = new Gtk.ListStore( 1, typeof(string) );
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ }
+
+
+
+ public class Xcls_ContextMenu : Object
+ {
+ public Gtk.Menu el;
+ private Xcls_LeftProps _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_ContextMenu(Xcls_LeftProps _owner )
+ {
+ _this = _owner;
+ _this.ContextMenu = this;
+ this.el = new Gtk.Menu();
+
+ // my vars (dec)
+
+ // set gobject values
+ var child_0 = new Xcls_MenuItem34( _this );
+ child_0.ref();
+ this.el.append ( child_0.el );
+ var child_1 = new Xcls_SeparatorMenuItem35( _this );
+ child_1.ref();
+ this.el.append ( child_1.el );
+ var child_2 = new Xcls_MenuItem36( _this );
+ child_2.ref();
+ this.el.append ( child_2.el );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_MenuItem34 : Object
+ {
+ public Gtk.MenuItem el;
+ private Xcls_LeftProps _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_MenuItem34(Xcls_LeftProps _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.MenuItem();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.label = "Edit (double click)";
+
+ //listeners
+ this.el.activate.connect( ( ) =>{
+
+ var s = _this.view.el.get_selection();
+ Gtk.TreeIter iter;
+ Gtk.TreeModel mod;
+ s.get_selected (out mod, out iter);
+
+ if (_this.view.popover == null) {
+ _this.view.popover = new Xcls_PopoverProperty();
+ _this.view.popover.mainwindow = _this.main_window;
+ }
+
+
+ _this.before_edit();
+ _this.stop_editor();
+
+ _this.keyrender.el.stop_editing(false);
+ _this.keyrender.el.editable =false;
+
+ _this.valrender.el.stop_editing(false);
+ _this.valrender.el.editable =false;
+
+
+ GLib.Value gvaltype, gval;
+ mod.get_value(iter, 1 , out gval); // one is key..
+
+ mod.get_value(iter,0, out gvaltype);
+
+ _this.view.popover.show(_this.view.el, _this.node, (string)gvaltype, (string)gval);
+
+
+
+ // _this.startEditingKey(model.get_path(iter));
+ });
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_SeparatorMenuItem35 : Object
+ {
+ public Gtk.SeparatorMenuItem el;
+ private Xcls_LeftProps _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_SeparatorMenuItem35(Xcls_LeftProps _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.SeparatorMenuItem();
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_MenuItem36 : Object
+ {
+ public Gtk.MenuItem el;
+ private Xcls_LeftProps _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_MenuItem36(Xcls_LeftProps _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.MenuItem();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.label = "Delete";
+
+ //listeners
+ this.el.activate.connect( ( ) =>{
+ _this.deleteSelected();
+ });
+ }
+
+ // user defined functions
+ }
+
+
+
+
+}
--- /dev/null
+{
+ "name" : "WindowLeftTree",
+ "parent" : "",
+ "title" : "",
+ "path" : "/home/alan/gitlive/app.Builder.js/src/Builder4/WindowLeftTree.bjs",
+ "permname" : "",
+ "modOrder" : "",
+ "build_module" : "builder",
+ "items" : [
+ {
+ "| JsRender.Node? getActiveElement" : " () { // return path to actie node.\n\n var path = this.getActivePath();\n if (path.length < 1) {\n return null;\n }\n return _this.model.pathToNode(path);\n \n}\n",
+ "id" : "WindowLeftTree",
+ "@ bool before_node_change" : "()",
+ "$ shadow_type" : "Gtk.ShadowType.IN",
+ "* init" : " this.el.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);\n \n",
+ "| JsRender.JsRender getActiveFile" : "() {\n return this.main_window.windowstate.file;\n}\n",
+ "* pack" : "add",
+ "xtype" : "ScrolledWindow",
+ "@ void changed" : "()",
+ "$ xns" : "Gtk",
+ "@ void node_selected" : "(JsRender.Node? node, string source)",
+ "# Xcls_MainWindow main_window" : "null",
+ "| string getActivePath" : " () {\n \n var view = this.view.el;\n if (view.get_selection().count_selected_rows() < 1) {\n return \"\";\n }\n Gtk.TreeIter iter;\n Gtk.TreeModel mod;\n view.get_selection().get_selected(out mod, out iter);\n return mod.get_path(iter).to_string();\n}\n ",
+ "items" : [
+ {
+ "listeners" : {
+ "button_press_event" : " ( ev) => {\n //console.log(\"button press?\");\n this.lastEventSource = \"tree\";\n if (! _this.before_node_change() ) {\n \n return true;\n }\n \n\n \n if (ev.type != Gdk.EventType.BUTTON_PRESS || ev.button != 3) {\n //print(\"click\" + ev.type);\n return false;\n }\n Gtk.TreePath res;\n if (!_this.view.el.get_path_at_pos((int)ev.x,(int)ev.y, out res, null, null, null) ) {\n return true;\n }\n \n this.el.get_selection().select_path(res);\n \n //if (!this.get('/LeftTreeMenu').el) { \n // this.get('/LeftTreeMenu').init(); \n // }\n \n _this.LeftTreeMenu.el.set_screen(Gdk.Screen.get_default());\n _this.LeftTreeMenu.el.show_all();\n _this.LeftTreeMenu.el.popup(null, null, null, 3, ev.time);\n // print(\"click:\" + res.path.to_string());\n return true;\n}",
+ "drag_begin" : "( ctx) => {\n\t//print('SOURCE: drag-begin');\n \n \n //this.targetData = \"\";\n \n // find what is selected in our tree...\n \n var s = _this.view.el.get_selection();\n if (s.count_selected_rows() < 1) {\n return;\n }\n Gtk.TreeIter iter;\n Gtk.TreeModel mod;\n s.get_selected(out mod, out iter);\n\n \n\n // set some properties of the tree for use by the dropped element.\n GLib.Value value;\n _this.model.el.get_value(iter, 2, out value);\n var tp = mod.get_path(iter).to_string();\n var data = (JsRender.Node)(value.dup_object());\n var xname = data.fqn();\n print (\"XNAME IS \" + xname+ \"\\n\");\n this.dragData = tp;\n this.dropList = _this.main_window.windowstate.file.palete().getDropList(xname);\n \n print (\"DROP LIST IS \" + string.joinv(\", \", this.dropList) + \"\\n\");\n \n\n // make the drag icon a picture of the node that was selected\n \n \n // by default returns the path..\n var path = _this.model.el.get_path(iter);\n\n \n var pix = this.el.create_row_drag_icon ( path);\n \n Gtk.drag_set_icon_surface (ctx, pix) ;\n \n return;\n}",
+ "cursor_changed" : " ( ) => {\n\n\n if (this.blockChanges) { // probably not needed.. \n return ;\n }\n if (!_this.before_node_change( ) ) {\n\t this.blockChanges = true;\n\t this.el.get_selection().unselect_all();\n\t this.blockChanges = false;\n\t return;\n }\n if (_this.main_window.windowstate.file == null) {\n return;\n } \n \n //var render = this.get('/LeftTree').getRenderer(); \n print(\"LEFT TREE -> view -> selection changed called\\n\");\n \n \n // -- it appears that the selection is not updated.\n \n GLib.Timeout.add_full(GLib.Priority.DEFAULT,10 , () => {\n \n\n if (this.el.get_selection().count_selected_rows() < 1) {\n\n print(\"selected rows < 1\\n\");\n //??this.model.load( false);\n _this.node_selected(null, this.lastEventSource);\n \n return false ;\n }\n \n //console.log('changed');\n var s = this.el.get_selection();\n Gtk.TreeIter iter;\n Gtk.TreeModel mod;\n s.get_selected(out mod, out iter);\n \n \n // var val = \"\";\n GLib.Value value;\n _this.model.el.get_value(iter, 2, out value);\n _this.model.activePath = mod.get_path(iter).to_string();\n \n var node = (JsRender.Node)value.dup_object();\n _this.node_selected(node, this.lastEventSource);\n while (Gtk.events_pending()) {\n Gtk.main_iteration();\n }\n var cp = mod.get_path(iter);\n Gtk.TreePath sp, ep;\n this.el.get_visible_range(out sp, out ep);\n // if sp is before cp then retuns 1.\n // if cp is before ep then retuns 1.\n if (cp.compare(sp) >= 0 && ep.compare(cp) >=1) {\n return false;\n }\n \n \n \n this.el.scroll_to_cell(new Gtk.TreePath.from_string(_this.model.activePath), null, true, 0.1f,0.0f);\n \n return false;\n }); \n //_this.after_node_change(node);\n\n// _this.model.file.changed(node, \"tree\");\n \n //Seed.print( value.get_string());\n return ;\n \n}",
+ "drag_end" : " (drag_context) => {\n\t//Seed.print('LEFT-TREE: drag-end');\n this.dragData = \"\";\n this.dropList = null;\n// this.targetData = \"\";\n this.highlightDropPath(\"\",0);\n// return true;\n}",
+ "drag_motion" : " ( ctx, x, y, time) => {\n print(\"got drag motion\\n\");\n var src = Gtk.drag_get_source_widget(ctx);\n this.drag_x = x;\n this.drag_y = y; \n\n if (src != this.el) {\n \n \n \n // the point of this is to detect where an item could be dropped..\n print(\"requesting drag data\\n\");\n this.drag_in_motion = true;\n \n // request data that will be recieved by the recieve... \n Gtk.drag_get_data\n (\n this.el, // will receive 'drag-data-received' signal \n ctx, // represents the current state of the DnD \n Gdk.Atom.intern(\"STRING\",true), // the target type we want \n time // time stamp \n );\n return true;\n } \n\n\n print(\"action: %d\\n\", ctx.get_actions());\n //print(\"GETTING POS\");\n var targetData = \"\";\n\n Gtk.TreePath path;\n Gtk.TreeViewDropPosition pos;\n var isOver = _this.view.el.get_dest_row_at_pos(this.drag_x,this.drag_y, out path, out pos);\n\n // if there are not items in the tree.. the we have to set isOver to true for anything..\n var isEmpty = false;\n if (_this.model.el.iter_n_children(null) < 1) {\n print(\"got NO children?\\n\");\n isOver = true; //??? \n isEmpty = true;\n pos = Gtk.TreeViewDropPosition.INTO_OR_AFTER;\n }\n\n\n // ------------- a drag from self..\n\n\n //var action = Gdk.DragAction.COPY;\n // unless we are copying!!! ctl button..\n \n var action = (ctx.get_actions() & Gdk.DragAction.MOVE) > 0 ?\n Gdk.DragAction.COPY : Gdk.DragAction.MOVE ;\n // Gdk.DragAction.MOVE : Gdk.DragAction.COPY ;\n\n\n if (_this.model.el.iter_n_children(null) < 1) {\n // no children.. -- asume it's ok..\n \n targetData = \"|%d|\".printf((int)Gtk.TreeViewDropPosition.INTO_OR_AFTER);\n \n this.highlightDropPath(\"\", (Gtk.TreeViewDropPosition)0); \n Gdk.drag_status(ctx, action ,time);\n return true;\n \n // continue through to allow drop...\n\n } \n \n \n\n \n \n //print(\"ISOVER? \" + isOver);\n if (!isOver) {\n \n Gdk.drag_status(ctx, 0 ,time);\n this.highlightDropPath(\"\", (Gtk.TreeViewDropPosition)0); \n return false;\n\n }\n \n // drag node is parent of child..\n //console.log(\"SRC TREEPATH: \" + src.treepath);\n //console.log(\"TARGET TREEPATH: \" + data.path.to_string());\n \n // nned to check a few here..\n //Gtk.TreeViewDropPosition.INTO_OR_AFTER\n //Gtk.TreeViewDropPosition.INTO_OR_BEFORE\n //Gtk.TreeViewDropPosition.AFTER\n //Gtk.TreeViewDropPosition.BEFORE\n \n // locally dragged items to not really use the \n var selection_text = this.dragData;\n \n \n \n if (selection_text == null || selection_text.length < 1) {\n //print(\"Error - drag selection text returned NULL\");\n Gdk.drag_status(ctx, 0 ,time);\n this.highlightDropPath(\"\", (Gtk.TreeViewDropPosition)0);\n return false;\n }\n \n \n // see if we are dragging into ourself?\n var target_path = path.to_string(); \n print (\"Drag %s onto %s--%d\\n \", selection_text, target_path, pos);\n \n // pos : 3 = ontop - 0 = after, 1 = before\n //print(\"target_path=\"+target_path);\n\n // \n if (selection_text == target_path) {\n print(\"self drag ?? == we should perhaps allow copy onto self..\\n\");\n \n Gdk.drag_status(ctx, 0 ,time);\n this.highlightDropPath(\"\", (Gtk.TreeViewDropPosition)0);\n return false;\n// -- fixme -- this is not really correct..\n\n }\n \n // check that \n //print(\"DUMPING DATA\");\n //console.dump(data);\n // path, pos\n \n //print(data.path.to_string() +' => '+ data.pos);\n \n // dropList is a list of xtypes that this node could be dropped on.\n // it is set up when we start to drag..\n \n \n targetData = _this.model.findDropNodeByPath( path.to_string(), this.dropList, pos);\n \n print(\"targetDAta: \" + targetData +\"\\n\");\n \n if (targetData.length < 1) {\n //print(\"Can not find drop node path\");\n \n Gdk.drag_status(ctx, 0, time);\n this.highlightDropPath(\"\", (Gtk.TreeViewDropPosition)0);\n return false;\n }\n \n var td_ar = targetData.split(\"|\");\n \n \n\n Gdk.drag_status(ctx, action ,time);\n this.highlightDropPath(td_ar[0], (Gtk.TreeViewDropPosition)int.parse(td_ar[1]));\n return true;\n \n \n}",
+ "drag_data_get" : "( drag_context, data, info, time) => {\n \n \n //print(\"drag-data-get\");\n var s = this.el.get_selection();\n if (s.count_selected_rows() < 1) {\n data.set_text(\"\",0); \n print(\"return empty string - no selection..\");\n return;\n }\n \n Gtk.TreeIter iter;\n Gtk.TreeModel mod;\n \n s.get_selected(out mod, out iter);\n \n \n \n GLib.Value value;\n _this.model.el.get_value(iter, 2, out value);\n var ndata = (JsRender.Node)(value.dup_object());\n \n \n \n var tp = mod.get_path(iter).to_string();\n // by default returns the path..\n \n if ( info != Gdk.Atom.intern(\"STRING\",true) ) {\n tp = ndata.toJsonString();\n } \n \n //data.set_text(tp,tp.length); \n \n data.set (data.get_target (), 8, (uchar[]) tp.to_utf8 ());\n \n \n // print(\"return \" + tp);\n }",
+ "drag_data_received" : " (ctx, x, y, sel, info, time) => {\n \n // THIS CODE ONLY RELATES TO drag or drop of \"NEW\" elements or \"FROM another tree..\"\n \n \n // print(\"Tree: drag-data-received\\n\");\n var selection_text = (string)sel.get_data();\n //print(\"selection_text= %s\\n\",selection_text);\n\n var is_drag = this.drag_in_motion;\n \n \n\n print(\"Is Drag %s\\n\", is_drag ? \"Y\": \"N\");\n var targetData = \"\";\n \n Gtk.TreePath path;\n Gtk.TreeViewDropPosition pos;\n var isOver = _this.view.el.get_dest_row_at_pos(this.drag_x,this.drag_y, out path, out pos);\n \n // if there are not items in the tree.. the we have to set isOver to true for anything..\n var isEmpty = false;\n if (_this.model.el.iter_n_children(null) < 1) {\n print(\"got NO children?\\n\");\n isOver = true; //??? \n isEmpty = true;\n pos = Gtk.TreeViewDropPosition.INTO_OR_AFTER;\n }\n \n \n //console.log(\"LEFT-TREE: drag-motion\");\n var src = Gtk.drag_get_source_widget(ctx);\n \n // a drag from self - this should be handled by drop and motion.\n if (src == this.el) {\n print(\"Source == this element should not happen.. ? \\n\");\n return;\n }\n //print(\"drag_data_recieved from another element\");\n \n \n \n \n if (selection_text == null || selection_text.length < 1 || !isOver) {\n // nothing valid foudn to drop...\n print(\"empty sel text or not over\");\n if (is_drag) {\n Gdk.drag_status(ctx, 0, time);\n this.highlightDropPath(\"\", (Gtk.TreeViewDropPosition)0);\n return;\n }\n Gtk.drag_finish (ctx, false, false, time); // drop failed..\n // no drop action...\n return; \n \n }\n var dropNode = new JsRender.Node(); \n \n var dropNodeType = selection_text;\n var show_templates = true;\n // for drop\n if (dropNodeType[0] == '{') {\n var pa = new Json.Parser();\n try {\n pa.load_from_data(dropNodeType);\n } catch (Error e) {\n Gtk.drag_finish (ctx, false, false, time); // drop failed..\n // no drop action...\n return; \n }\n \n dropNode.loadFromJson( pa.get_root().get_object(), 2);\n dropNodeType = dropNode.fqn();\n show_templates = false;\n \n \n } else {\n\n dropNode.setFqn(selection_text);\n }\n\n \n // dropList --- need to gather this ... \n print(\"get dropList for : %s\\n\",dropNodeType); \n var dropList = _this.main_window.windowstate.file.palete().getDropList(dropNodeType);\n \n print(\"dropList: %s\\n\", string.joinv(\" , \", dropList));\n \n // if drag action is link ... then we can drop it anywahere...\n if ((ctx.get_actions() & Gdk.DragAction.LINK) > 0) {\n // if path is null?? dragging into an empty tree?\n targetData = (path == null ? \"\" : path.to_string()) + \"|%d\".printf((int)pos);\n } else {\n \n \n targetData = _this.model.findDropNodeByPath( isEmpty ? \"\" : path.to_string(), dropList, pos);\n }\n \n \n \n print(\"targetDAta: \" + targetData +\"\\n\");\n \n if (targetData.length < 1) {\n \n // invalid drop path..\n if (this.drag_in_motion) {\n Gdk.drag_status(ctx, 0, time);\n this.highlightDropPath(\"\", (Gtk.TreeViewDropPosition)0);\n return;\n }\n Gtk.drag_finish (ctx, false, false, time); // drop failed..\n // no drop action...\n return;\n }\n // valid drop path..\n \n var td_ar = targetData.split(\"|\");\n \n \n if (this.drag_in_motion) { \n Gdk.drag_status(ctx, Gdk.DragAction.COPY ,time);\n\n this.highlightDropPath( td_ar[0] , (Gtk.TreeViewDropPosition)int.parse(td_ar[1]));\n return;\n }\n // continue on to allow drop..\n \n\n // at this point, drag is not in motion... -- as checked above... - so it's a real drop event..\n \n\n _this.model.dropNode(targetData, dropNode, show_templates);\n print(\"ADD new node!!!\\n\");\n \n ///Xcls_DialogTemplateSelect.singleton().show( _this.model.file.palete(), node);\n \n Gtk.drag_finish (ctx, false, false,time);\n \n \n \n \n \n}",
+ "drag_drop" : " ( ctx, x, y, time) => {\n //Seed.print(\"TARGET: drag-drop\");\n \n \n var src = Gtk.drag_get_source_widget(ctx);\n \n if (src != this.el) {\n \n \n \n this.drag_in_motion = false; \n // request data that will be recieved by the recieve... \n Gtk.drag_get_data\n (\n this.el, // will receive 'drag-data-received' signal \n ctx, // represents the current state of the DnD \n Gdk.Atom.intern(\"application/json\",true), // the target type we want \n time // time stamp \n );\n\n \n // No target offered by source => error\n \n\n return false;\n }\n \n // handle drop around self..\n \n \n \n //print(\"GETTING POS\");\n var targetData = \"\";\n \n Gtk.TreePath path;\n Gtk.TreeViewDropPosition pos;\n var isOver = _this.view.el.get_dest_row_at_pos(this.drag_x,this.drag_y, out path, out pos);\n \n // if there are not items in the tree.. the we have to set isOver to true for anything..\n var isEmpty = false;\n if (_this.model.el.iter_n_children(null) < 1) {\n print(\"got NO children?\\n\");\n isOver = true; //??? \n isEmpty = true;\n pos = Gtk.TreeViewDropPosition.INTO_OR_AFTER;\n }\n \n \n \n //var action = Gdk.DragAction.COPY;\n // unless we are copying!!! ctl button..\n \n var action = (ctx.get_actions() & Gdk.DragAction.MOVE) > 0 ?\n Gdk.DragAction.COPY : Gdk.DragAction.MOVE ;\n // Gdk.DragAction.MOVE : Gdk.DragAction.COPY ;\n\n \n if (_this.model.el.iter_n_children(null) < 1) {\n // no children.. -- asume it's ok..\n \n targetData = \"|%d|\".printf((int)Gtk.TreeViewDropPosition.INTO_OR_AFTER);\n \n // continue through to allow drop...\n\n } else {\n \n \n \n \n \n //print(\"ISOVER? \" + isOver);\n if (!isOver) {\n \n Gtk.drag_finish (ctx, false, false, time); // drop failed..\n return true; // not over apoint!?! - no action on drop or motion..\n }\n \n // drag node is parent of child..\n //console.log(\"SRC TREEPATH: \" + src.treepath);\n //console.log(\"TARGET TREEPATH: \" + data.path.to_string());\n \n // nned to check a few here..\n //Gtk.TreeViewDropPosition.INTO_OR_AFTER\n //Gtk.TreeViewDropPosition.INTO_OR_BEFORE\n //Gtk.TreeViewDropPosition.AFTER\n //Gtk.TreeViewDropPosition.BEFORE\n \n // locally dragged items to not really use the \n var selection_text = this.dragData;\n \n \n \n if (selection_text == null || selection_text.length < 1) {\n //print(\"Error - drag selection text returned NULL\");\n \n Gtk.drag_finish (ctx, false, false, time); // drop failed..\n return true; /// -- fixme -- this is not really correct..\n } \n \n // see if we are dragging into ourself?\n print (\"got selection text of \" + selection_text);\n \n var target_path = path.to_string();\n //print(\"target_path=\"+target_path);\n\n // \n if (selection_text == target_path) {\n print(\"self drag ?? == we should perhaps allow copy onto self..\\n\");\n \n Gtk.drag_finish (ctx, false, false, time); // drop failed..\n\n return true; /// -- fixme -- this is not really correct..\n\n }\n \n // check that \n //print(\"DUMPING DATA\");\n //console.dump(data);\n // path, pos\n \n //print(data.path.to_string() +' => '+ data.pos);\n \n // dropList is a list of xtypes that this node could be dropped on.\n // it is set up when we start to drag..\n \n \n targetData = _this.model.findDropNodeByPath( path.to_string(), this.dropList, pos);\n \n print(\"targetDAta: \" + targetData +\"\\n\");\n \n if (targetData.length < 1) {\n //print(\"Can not find drop node path\");\n \n Gtk.drag_finish (ctx, false, false, time); // drop failed..\n return true;\n }\n \n \n \n // continue on to allow drop..\n }\n // at this point, drag is not in motion... -- as checked above... - so it's a real drop event..\n\n\n var delete_selection_data = false;\n \n if (action == Gdk.DragAction.ASK) {\n /* Ask the user to move or copy, then set the ctx action. */\n }\n\n if (action == Gdk.DragAction.MOVE) {\n delete_selection_data = true;\n }\n \n // drag around.. - reorder..\n _this.model.moveNode(targetData, action);\n \n \n \n \n \n // we can send stuff to souce here...\n\n\n// do we always say failure, so we handle the reall drop?\n Gtk.drag_finish (ctx, false, false,time); //delete_selection_data, time);\n\n return true;\n \n \n \n \n \n \n}"
+ },
+ "# string dragData" : "",
+ "# int drag_x" : "",
+ "# string[] dropList" : "",
+ "id" : "view",
+ "gboolean headers_visible" : true,
+ "# int drag_y" : "",
+ "* init" : "{\n var description = new Pango.FontDescription();\n description.set_size(8000);\n this.el.override_font(description);\n\n var selection = this.el.get_selection();\n selection.set_mode( Gtk.SelectionMode.SINGLE);\n\n\n // is this really needed??\n /*\n this.selection.signal['changed'].connect(function() {\n\t _this.get('/LeftTree.view').listeners.cursor_changed.apply(\n\t _this.get('/LeftTree.view'), [ _this.get('/LeftTree.view'), '']\n\t );\n });\n */\n Gtk.drag_source_set (\n\t this.el, /* widget will be drag-able */\n\t Gdk.ModifierType.BUTTON1_MASK, /* modifier that will start a drag */\n\t BuilderApplication.targetList, /* lists of target to support */\n\t Gdk.DragAction.COPY | Gdk.DragAction.MOVE | Gdk.DragAction.LINK /* what to do with data after dropped */\n );\n\n // ?? needed??\n //Gtk.drag_source_add_text_targets(this.el); \n\n Gtk.drag_dest_set\n (\n this.el, /* widget that will accept a drop */\n Gtk.DestDefaults.MOTION | Gtk.DestDefaults.HIGHLIGHT,\n BuilderApplication.targetList, /* lists of target to support */\n Gdk.DragAction.COPY | Gdk.DragAction.MOVE | Gdk.DragAction.LINK /* what to do with data after dropped */\n );\n\n //Gtk.drag_dest_set_target_list(this.el, Builder.Application.targetList);\n //Gtk.drag_dest_add_text_targets(this.el);\n}\n",
+ "tooltip_column" : 1,
+ "bool expand" : true,
+ "* pack" : "add",
+ "xtype" : "TreeView",
+ "$ enable_tree_lines" : true,
+ "$ headers_visible" : false,
+ "| void highlightDropPath" : " ( string treepath, Gtk.TreeViewDropPosition pos) {\n\n // highlighting for drag/drop\n if (treepath.length > 0) {\n this.el.set_drag_dest_row( new Gtk.TreePath.from_string( treepath ), pos);\n } else {\n this.el.set_drag_dest_row(null, Gtk.TreeViewDropPosition.INTO_OR_AFTER);\n }\n \n}",
+ "$ string lastEventSource" : "\"\"",
+ "# bool drag_in_motion" : "",
+ "# bool blockChanges" : false,
+ "$ xns" : "Gtk",
+ "| void setCursor" : "(string treepath, string sourceEvent) {\n\tthis.lastEventSource = sourceEvent;\n\t//this.blockChanges = true; << block changes prevents loading of 'node data' and firing of node_selected..\n this.el.set_cursor(new Gtk.TreePath.from_string(treepath), null, false); \n // fire node_selected..\n //this.blockChanges = false;\n\tthis.lastEventSource = \"\";\n}\n",
+ "| void selectNode" : "(string treepath_str, string source) {\n\tthis.lastEventSource = source;\n //this.selection.select_path(new Gtk.TreePath.from_string( treepath_str));\n var tp = new Gtk.TreePath.from_string(treepath_str);\n \n this.el.set_cursor(tp, null, false); \n this.el.scroll_to_cell(tp, null, false, 0,0);\n}\n",
+ "items" : [
+ {
+ "| string findDropNode" : " (string treepath_str, string[] targets) {\n\n // this is used by the dragdrop code in the roo version AFAIR..\n\n //var path = treepath_str.replace(/^builder-/, '');\n // treemap is depreciated... - should really check if model has any entries..\n\n if (this.el.iter_n_children(null) < 1) {\n //print(\"NO KEYS\");\n return \"|%d\".printf((int)Gtk.TreeViewDropPosition.INTO_OR_AFTER);\n }\n //print(\"FIND treepath: \" + path);\n //console.dump(this.treemap);\n \n //if (!treepath_str.match(/^builder-/)) {\n // return []; // nothing!\n //}\n if (targets.length > 0 && targets[0] == \"*\") {\n return treepath_str;\n }\n return this.findDropNodeByPath(treepath_str,targets, -1);\n}\n",
+ "currentTree" : false,
+ "id" : "model",
+ "# DialogTemplateSelect template_select" : "null",
+ "* init" : "print(\"model initialized\");\n\n",
+ "| void loadFile" : "(JsRender.JsRender f) {\n //console.dump(f);\n this.el.clear();\n \n // needed???\n _this.main_window.windowstate.file = f;\n \n \n if (f.tree == null) {\n\t try {\n\t f.loadItems( );\n } catch (Error e) {\n \t\treturn;\n }\n }\n // if it's still null?\n if (f.tree == null) {\n return;\n }\n \n var o = new Gee.ArrayList<JsRender.Node>();\n o.add(f.tree);\n this.load(o,null);\n \n _this.view.el.expand_all();\n\n if (f.tree.items.size < 1) {\n // single item..\n \n //this.get('/Window.leftvpaned').el.set_position(80);\n // select first...\n _this.view.el.set_cursor( \n new Gtk.TreePath.from_string(\"0\"), null, false);\n \n \n } else {\n //this.get('/Window.leftvpaned').el.set_position(200);\n }\n \n return;\n \n \n}\n",
+ "| void updateSelected" : "() {\n \n \n var s = _this.view.el.get_selection();\n \n Gtk.TreeIter iter;\n Gtk.TreeModel mod;\n \n \n \n if (!s.get_selected(out mod, out iter)) {\n return; // nothing seleted..\n }\n \n GLib.Value value;\n this.el.get_value(iter, 2, out value);\n var node = (JsRender.Node)(value.get_object());\n \n this.el.set(iter, 0, node.nodeTitle(),\n 1, node.nodeTip(), -1\n );\n}\n",
+ "* pack" : "set_model",
+ "xtype" : "TreeStore",
+ "| string findDropNodeByPath" : " (string treepath_str, string[] targets, int in_pref = -1) {\n\n var path = treepath_str; // dupe it..\n \n \n // pref : 3 = ontop - 0 = after, 1 = before\n int pref = in_pref < 0 ? Gtk.TreeViewDropPosition.INTO_OR_AFTER : in_pref;\n \n var last = \"\";\n \n //console.dump(this.treemap);\n \n print(\"findDropNodeByPath : got path length %d / %s\\n\", path.length, path);\n \n if (path.length == 0) {\n // top drop. // just return empty..\n return \"|%d\".printf((int)pref) ;\n \n }\n \n \n while (path.length > 0) {\n \n if (path.length == treepath_str.length && pref != Gtk.TreeViewDropPosition.INTO_OR_AFTER) {\n if (path.last_index_of(\":\") < 0 ) {\n return \"\";\n }\n path = path.substring(0, path.last_index_of(\":\"));\n last = treepath_str;\n print(\"DROP before or after : using %s\\n\",path);\n continue;\n }\n \n //print(\"LOOKING FOR PATH: \" + path);\n var node_data = this.pathToNode(path);\n \n if (node_data == null) {\n print(\"node not found\");\n return \"\";\n }\n \n var xname = node_data.fqn();\n var match = \"\";\n var prop = \"\";\n \n for (var i =0; i < targets.length; i++) {\n var tg = targets[i];\n if ((tg == xname) ) {\n match = tg;\n break;\n }\n // if target is \"xxxx:name\"\n if (tg.contains(xname +\":\")) {\n match = tg;\n var ar = tg.split(\":\");\n prop = ar[1];\n break;\n }\n }\n \n if (match.length > 0) {\n if (last.length > 0) { // pref is after/before..\n // then it's after last\n //if (pref > 1) {\n // return \"\";\n //}\n return last + \"|%d\".printf((int)pref) + \"|\" + prop;\n\n \n }\n // we need to add prop - as :store -> needs to bee added when dropping onto.\n return path + \"|%d\".printf( (int) Gtk.TreeViewDropPosition.INTO_OR_AFTER) + \"|\" + prop;\n }\n /*\n last = \"\" + path;\n var par = path.split(\":\");\n string [] ppar = {};\n for (var i = 0; i < par.length-1; i++) {\n ppar += par[i];\n }\n \n path = string.joinv(\":\", ppar);\n */\n break;\n\n }\n \n return \"\";\n \n}\n",
+ "| void moveNode" : "(string target_data, Gdk.DragAction action) \n{\n \n /// target_data = \"path|pos\");\n \n \n //print(\"MOVE NODE\");\n // console.dump(target_data);\n Gtk.TreeIter old_iter;\n Gtk.TreeModel mod;\n \n var s = _this.view.el.get_selection();\n s.get_selected(out mod , out old_iter);\n mod.get_path(old_iter);\n \n var node = this.pathToNode(mod.get_path(old_iter).to_string());\n //console.dump(node);\n if (node == null) {\n print(\"moveNode: ERROR - node is null?\");\n }\n \n \n\n // needs to drop first, otherwise the target_data \n // treepath will be invalid.\n\n \n if ((action & Gdk.DragAction.MOVE) > 0) {\n print(\"REMOVING OLD NODE : \" + target_data + \"\\n\");\n node.remove();\n this.dropNode(target_data, node, false);\n this.el.remove(ref old_iter);\n \n \n \n } else {\n print(\"DROPPING NODE // copy: \" + target_data + \"\\n\");\n node = node.deepClone();\n this.dropNode(target_data, node, false);\n }\n _this.changed();\n this.activePath= \"\";\n //this.updateNode(false,true);\n}\n",
+ "# string activePath" : "\"\"",
+ "$ columns" : "typeof(string),typeof(string),typeof(Object)",
+ "| void load" : "(Gee.ArrayList<JsRender.Node> tr, Gtk.TreeIter? iter) \n{\n Gtk.TreeIter citer;\n //this.insert(citer,iter,0);\n for(var i =0 ; i < tr.size; i++) {\n if (iter != null) {\n this.el.insert(out citer,iter,-1); // why not append?\n } else {\n this.el.append(out citer,null);\n }\n \n this.el.set(citer, 0, tr.get(i).nodeTitle(),\n 1, tr.get(i).nodeTip(), -1\n );\n var o = GLib.Value(typeof(Object));\n o.set_object((Object)tr.get(i));\n \n this.el.set_value(citer, 2, o);\n \n if (tr.get(i).items.size > 0) {\n this.load(tr.get(i).items, citer);\n }\n \n }\n\n \n}",
+ "| void deleteSelected" : "() {\n \n print(\"DELETE SELECTED?\");\n //_this.view.blockChanges = true;\n print(\"GET SELECTION?\");\n\n var s = _this.view.el.get_selection();\n \n print(\"GET SELECTED?\");\n Gtk.TreeIter iter;\n Gtk.TreeModel mod;\n\n \n if (!s.get_selected(out mod, out iter)) {\n return; // nothing seleted..\n }\n \n\n\n this.activePath= \"\"; \n print(\"GET vnode value?\");\n\n GLib.Value value;\n this.el.get_value(iter, 2, out value);\n var data = (JsRender.Node)(value.get_object());\n print(\"removing node from Render\\n\");\n if (data.parent == null) {\n _this.main_window.windowstate.file.tree = null;\n } else {\n data.remove();\n }\n print(\"removing node from Tree\\n\"); \n s.unselect_all();\n this.el.remove(ref iter);\n\n \n \n \n // \n \n \n\n\n this.activePath= \"\"; // again!?!? \n //this.changed(null,true);\n \n _this.changed();\n \n _this.view.blockChanges = false;\n}\n",
+ "n_columns" : 3,
+ "$ xns" : "Gtk",
+ "| JsRender.Node pathToNode" : "(string path) {\n \n \n Gtk.TreeIter iter;\n _this.model.el.get_iter_from_string(out iter, path);\n \n GLib.Value value;\n _this.model.el.get_value(iter, 2, out value);\n \n return (JsRender.Node)value.dup_object();\n\n}",
+ "| void dropNode" : "(string target_data_str, JsRender.Node node, bool show_templates) {\n// print(\"drop Node\");\n // console.dump(node);\n // console.dump(target_data);\n \n \n // 0 = before , 1=after 2/3 onto\n \n \n var target_data= target_data_str.split(\"|\");\n \n var parent_str = target_data[0].length > 0 ? target_data[0] : \"\";\n var pos = target_data.length > 1 ? int.parse(target_data[1]) : 2; // ontop..\n \n \n Gtk.TreePath tree_path = parent_str.length > 0 ? new Gtk.TreePath.from_string( parent_str ) : null;\n \n \n \n //print(\"add \" + tp + \"@\" + target_data[1] );\n \n JsRender.Node parentNode = null;\n \n Gtk.TreeIter iter_after;\n Gtk.TreeIter iter_par ;\n \n \n if (target_data.length == 3 && target_data[2].length > 0) {\n node.props.set(\"* prop\", target_data[2]);\n }\n\n Gtk.TreePath expand_parent = null;\n \n // we only need to show the template if it's come from else where?\n if (show_templates) {\n \n var ts = _this.main_window.windowstate.template_select;\n \n var new_node = ts.show(\n _this.main_window, // (Gtk.Window) _this.el.get_toplevel (),\n _this.main_window.windowstate.file.palete(),\n node,\n _this.main_window.windowstate.project);\n \n if (new_node == null) {\n return; // do not add?\n }\n node = new_node;\n } \n \n //print(\"pos is %d \\n\".printf(pos));\n \n Gtk.TreeIter n_iter; \n \n if ( parent_str.length < 1) {\n this.el.append(out n_iter, null); // drop at top level..\n node.parent = null;\n _this.main_window.windowstate.file.tree = node;\n \n \n } else if (pos < 2) {\n //print(target_data[1] > 0 ? 'insert_after' : 'insert_before');\n \n this.el.get_iter(out iter_after, tree_path ); \n this.el.iter_parent(out iter_par, iter_after);\n expand_parent = this.el.get_path(iter_par);\n \n GLib.Value value;\n this.el.get_value( iter_par, 2, out value);\n parentNode = (JsRender.Node)value.dup_object();\n \n \n this.el.get_value( iter_after, 2, out value);\n var relNode = (JsRender.Node)value.dup_object();\n \n if ( pos > 0 ) {\n \n this.el.insert_after(out n_iter, iter_par , iter_after);\n var ix = parentNode.items.index_of(relNode);\n parentNode.items.insert(ix+1, node);\n \n } else {\n this.el.insert_before(out n_iter, iter_par , iter_after);\n var ix = parentNode.items.index_of(relNode);\n parentNode.items.insert(ix, node);\n \n }\n node.parent = parentNode;\n \n \n \n } else {\n // print(\"appending to \" + parent_str);\n this.el.get_iter(out iter_par, tree_path);\n this.el.append(out n_iter, iter_par );\n expand_parent = this.el.get_path(iter_par);\n \n GLib.Value value;\n this.el.get_value( iter_par, 2, out value);\n parentNode = (JsRender.Node)value.dup_object();\n node.parent = parentNode;\n parentNode.items.add(node);\n }\n \n // reparent node in tree...\n \n \n // why only on no parent???\n \n //if (node.parent = null) {\n \n \n \n //}\n \n \n // work out what kind of packing to use.. -- should be in \n if (!node.has(\"pack\") && parent_str.length > 1) {\n \n _this.main_window.windowstate.file.palete().fillPack(node,parentNode);\n \n \n }\n \n // add the node...\n \n this.el.set(n_iter, 0, node.nodeTitle(), 1, node.nodeTip(), -1 );\n var o = GLib.Value(typeof(Object));\n o.set_object((Object)node);\n \n this.el.set_value(n_iter, 2, o);\n \n \n \n \n// load children - if it has any..\n \n if (node.items.size > 0) {\n this.load(node.items, n_iter);\n _this.view.el.expand_row(this.el.get_path(n_iter), true);\n } else if (expand_parent != null && !_this.view.el.is_row_expanded(expand_parent)) {\n _this.view.el.expand_row(expand_parent,true);\n }\n\n //if (tp != null && (node.items.length() > 0 || pos > 1)) {\n // _this.view.el.expand_row(this.el.get_path(iter_par), true);\n // }\n // wee need to get the empty proptypes from somewhere..\n \n //var olditer = this.activeIter;\n this.activePath = this.el.get_path(n_iter).to_string();\n\n\n \n \n _this.view.el.set_cursor(this.el.get_path(n_iter), null, false);\n _this.changed();\n \n \n \n}\n",
+ "$ listAllTypes" : "function() {\n var s = this.get('/LeftTree.view').selection;\n print (\"LIST ALL TYPES: \" + s.count_selected_rows() );\n \n if (s.count_selected_rows() > 0) {\n var iter = new Gtk.TreeIter(); \n s.get_selected(this.el, iter);\n\n // set some properties of the tree for use by the dropped element.\n var value = new GObject.Value('');\n this.el.get_value(iter, 2, value);\n var data = JSON.parse(value.value);\n \n \n var xname = this.get('/LeftTree.model').file.guessName(data);\n console.log('selected:' + xname);\n if (xname.length) {\n return [ xname ];\n }\n return []; // could not find it..\n }\n \n var ret = [ ];\n \n var _this = this;\n function addall(li)\n {\n li.forEach(function(el) {\n // this is specific to roo!!!?\n if (!el) { // skip empty?\n return;\n }\n var fullpath = _this.file.guessName(el);\n if (fullpath.length && ret.indexOf(fullpath) < 0) {\n ret.push(fullpath);\n }\n \n \n if (el.items && el.items.length) {\n addall(el.items);\n }\n \n });\n \n \n }\n \n addall([this.currentTree]);\n \n // only if we have nothing, should we add '*top'\n if (!ret.length) {\n ret = [ '*top' ];\n }\n //console.log('all types in tree');\n //console.dump(ret);\n \n return ret;\n \n}\n",
+ "| string treePathFromNode" : "(JsRender.Node node) {\n // iterate through the tree and find the node\n var ret = \"\";\n \n this.el.foreach((mod, pth, iter) => {\n // get the node..\n \n \n GLib.Value value;\n _this.model.el.get_value(iter, 2, out value);\n \n\n \n var n = (JsRender.Node)value;\n\n print(\"compare %s to %s\\n\", n.fqn(), node.fqn());\n if (node == n) {\n ret = pth.to_string();\n return true;\n }\n return false;\n });\n return ret;\n\n}\n"
+ },
+ {
+ "utf8 title" : "test",
+ "* init" : " this.el.add_attribute(_this.renderer.el , \"markup\", 0 );\n ",
+ "xtype" : "TreeViewColumn",
+ "* pack" : "append_column",
+ "$ xns" : "Gtk",
+ "items" : [
+ {
+ "id" : "renderer",
+ "xtype" : "CellRendererText",
+ "* pack" : "pack_start,true",
+ "$ xns" : "Gtk"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "id" : "LeftTreeMenu",
+ "xtype" : "Menu",
+ "* pack" : false,
+ "$ xns" : "Gtk",
+ "items" : [
+ {
+ "listeners" : {
+ "activate" : " ( ) => {\n \n print(\"ACTIVATE?\");\n \n \n _this.model.deleteSelected();\n}"
+ },
+ "label" : "Delete Element",
+ "xtype" : "MenuItem",
+ "* pack" : "add",
+ "$ xns" : "Gtk"
+ },
+ {
+ "listeners" : {
+ "activate" : " () => {\n\n DialogSaveTemplate.singleton().show(\n (Gtk.Window) _this.el.get_toplevel (), \n _this.main_window.windowstate.file.palete(), \n _this.getActiveElement()\n );\n \n \n}"
+ },
+ "label" : "Save as Template",
+ "xtype" : "MenuItem",
+ "* pack" : "add",
+ "$ xns" : "Gtk"
+ },
+ {
+ "listeners" : {
+ "activate" : " () => {\n var node = _this.getActiveElement();\n var name = DialogSaveModule.singleton().show(\n (Gtk.Window) _this.el.get_toplevel (), \n _this.main_window.windowstate.project, \n node\n );\n if (name.length < 1) {\n return;\n \n }\n node.props.set(\"* xinclude\", name);\n node.items.clear();\n\n\n var s = _this.view.el.get_selection();\n \n print(\"GET SELECTED?\");\n Gtk.TreeIter iter;\n Gtk.TreeModel mod;\n\n \n if (!s.get_selected(out mod, out iter)) {\n return; // nothing seleted..\n }\n Gtk.TreeIter citer;\n var n_cn = mod.iter_n_children(iter) -1;\n for (var i = n_cn; i > -1; i--) {\n mod.iter_nth_child(out citer, iter, i);\n \n\n print(\"removing node from Tree\\n\"); \n \n _this.model.el.remove(ref citer);\n }\n _this.changed();\n _this.node_selected(node, \"tree\");\n \n \n}"
+ },
+ "label" : "Save as Module",
+ "xtype" : "MenuItem",
+ "* pack" : "add",
+ "$ xns" : "Gtk"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file
--- /dev/null
+static Xcls_WindowLeftTree _WindowLeftTree;
+
+public class Xcls_WindowLeftTree : Object
+{
+ public Gtk.ScrolledWindow el;
+ private Xcls_WindowLeftTree _this;
+
+ public static Xcls_WindowLeftTree singleton()
+ {
+ if (_WindowLeftTree == null) {
+ _WindowLeftTree= new Xcls_WindowLeftTree();
+ }
+ return _WindowLeftTree;
+ }
+ public Xcls_view view;
+ public Xcls_model model;
+ public Xcls_renderer renderer;
+ public Xcls_LeftTreeMenu LeftTreeMenu;
+
+ // my vars (def)
+ public signal bool before_node_change ();
+ public signal void changed ();
+ public signal void node_selected (JsRender.Node? node, string source);
+ public Xcls_MainWindow main_window;
+
+ // ctor
+ public Xcls_WindowLeftTree()
+ {
+ _this = this;
+ this.el = new Gtk.ScrolledWindow( null, null );
+
+ // my vars (dec)
+ this.main_window = null;
+
+ // set gobject values
+ this.el.shadow_type = Gtk.ShadowType.IN;
+ var child_0 = new Xcls_view( _this );
+ child_0.ref();
+ this.el.add ( child_0.el );
+ var child_1 = new Xcls_LeftTreeMenu( _this );
+ child_1.ref();
+
+ // init method
+
+ this.el.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);
+ }
+
+ // user defined functions
+ public JsRender.Node? getActiveElement () { // return path to actie node.
+
+ var path = this.getActivePath();
+ if (path.length < 1) {
+ return null;
+ }
+ return _this.model.pathToNode(path);
+
+ }
+ public JsRender.JsRender getActiveFile () {
+ return this.main_window.windowstate.file;
+ }
+ public string getActivePath () {
+
+ var view = this.view.el;
+ if (view.get_selection().count_selected_rows() < 1) {
+ return "";
+ }
+ Gtk.TreeIter iter;
+ Gtk.TreeModel mod;
+ view.get_selection().get_selected(out mod, out iter);
+ return mod.get_path(iter).to_string();
+ }
+ public class Xcls_view : Object
+ {
+ public Gtk.TreeView el;
+ private Xcls_WindowLeftTree _this;
+
+
+ // my vars (def)
+ public string dragData;
+ public int drag_x;
+ public string[] dropList;
+ public int drag_y;
+ public string lastEventSource;
+ public bool drag_in_motion;
+ public bool blockChanges;
+
+ // ctor
+ public Xcls_view(Xcls_WindowLeftTree _owner )
+ {
+ _this = _owner;
+ _this.view = this;
+ this.el = new Gtk.TreeView();
+
+ // my vars (dec)
+ this.lastEventSource = "";
+ this.blockChanges = false;
+
+ // set gobject values
+ this.el.expand = true;
+ this.el.tooltip_column = 1;
+ this.el.enable_tree_lines = true;
+ this.el.headers_visible = false;
+ var child_0 = new Xcls_model( _this );
+ child_0.ref();
+ this.el.set_model ( child_0.el );
+ var child_1 = new Xcls_TreeViewColumn4( _this );
+ child_1.ref();
+ this.el.append_column ( child_1.el );
+
+ // init method
+
+ {
+ var description = new Pango.FontDescription();
+ description.set_size(8000);
+ this.el.override_font(description);
+
+ var selection = this.el.get_selection();
+ selection.set_mode( Gtk.SelectionMode.SINGLE);
+
+
+ // is this really needed??
+ /*
+ this.selection.signal['changed'].connect(function() {
+ _this.get('/LeftTree.view').listeners.cursor_changed.apply(
+ _this.get('/LeftTree.view'), [ _this.get('/LeftTree.view'), '']
+ );
+ });
+ */
+ Gtk.drag_source_set (
+ this.el, /* widget will be drag-able */
+ Gdk.ModifierType.BUTTON1_MASK, /* modifier that will start a drag */
+ BuilderApplication.targetList, /* lists of target to support */
+ Gdk.DragAction.COPY | Gdk.DragAction.MOVE | Gdk.DragAction.LINK /* what to do with data after dropped */
+ );
+
+ // ?? needed??
+ //Gtk.drag_source_add_text_targets(this.el);
+
+ Gtk.drag_dest_set
+ (
+ this.el, /* widget that will accept a drop */
+ Gtk.DestDefaults.MOTION | Gtk.DestDefaults.HIGHLIGHT,
+ BuilderApplication.targetList, /* lists of target to support */
+ Gdk.DragAction.COPY | Gdk.DragAction.MOVE | Gdk.DragAction.LINK /* what to do with data after dropped */
+ );
+
+ //Gtk.drag_dest_set_target_list(this.el, Builder.Application.targetList);
+ //Gtk.drag_dest_add_text_targets(this.el);
+ }
+
+ //listeners
+ this.el.button_press_event.connect( ( ev) => {
+ //console.log("button press?");
+ this.lastEventSource = "tree";
+ if (! _this.before_node_change() ) {
+
+ return true;
+ }
+
+
+
+ if (ev.type != Gdk.EventType.BUTTON_PRESS || ev.button != 3) {
+ //print("click" + ev.type);
+ return false;
+ }
+ Gtk.TreePath res;
+ if (!_this.view.el.get_path_at_pos((int)ev.x,(int)ev.y, out res, null, null, null) ) {
+ return true;
+ }
+
+ this.el.get_selection().select_path(res);
+
+ //if (!this.get('/LeftTreeMenu').el) {
+ // this.get('/LeftTreeMenu').init();
+ // }
+
+ _this.LeftTreeMenu.el.set_screen(Gdk.Screen.get_default());
+ _this.LeftTreeMenu.el.show_all();
+ _this.LeftTreeMenu.el.popup(null, null, null, 3, ev.time);
+ // print("click:" + res.path.to_string());
+ return true;
+ });
+ this.el.drag_begin.connect( ( ctx) => {
+ //print('SOURCE: drag-begin');
+
+
+ //this.targetData = "";
+
+ // find what is selected in our tree...
+
+ var s = _this.view.el.get_selection();
+ if (s.count_selected_rows() < 1) {
+ return;
+ }
+ Gtk.TreeIter iter;
+ Gtk.TreeModel mod;
+ s.get_selected(out mod, out iter);
+
+
+
+ // set some properties of the tree for use by the dropped element.
+ GLib.Value value;
+ _this.model.el.get_value(iter, 2, out value);
+ var tp = mod.get_path(iter).to_string();
+ var data = (JsRender.Node)(value.dup_object());
+ var xname = data.fqn();
+ print ("XNAME IS " + xname+ "\n");
+ this.dragData = tp;
+ this.dropList = _this.main_window.windowstate.file.palete().getDropList(xname);
+
+ print ("DROP LIST IS " + string.joinv(", ", this.dropList) + "\n");
+
+
+ // make the drag icon a picture of the node that was selected
+
+
+ // by default returns the path..
+ var path = _this.model.el.get_path(iter);
+
+
+ var pix = this.el.create_row_drag_icon ( path);
+
+ Gtk.drag_set_icon_surface (ctx, pix) ;
+
+ return;
+ });
+ this.el.cursor_changed.connect( ( ) => {
+
+
+ if (this.blockChanges) { // probably not needed..
+ return ;
+ }
+ if (!_this.before_node_change( ) ) {
+ this.blockChanges = true;
+ this.el.get_selection().unselect_all();
+ this.blockChanges = false;
+ return;
+ }
+ if (_this.main_window.windowstate.file == null) {
+ return;
+ }
+
+ //var render = this.get('/LeftTree').getRenderer();
+ print("LEFT TREE -> view -> selection changed called\n");
+
+
+ // -- it appears that the selection is not updated.
+
+ GLib.Timeout.add_full(GLib.Priority.DEFAULT,10 , () => {
+
+
+ if (this.el.get_selection().count_selected_rows() < 1) {
+
+ print("selected rows < 1\n");
+ //??this.model.load( false);
+ _this.node_selected(null, this.lastEventSource);
+
+ return false ;
+ }
+
+ //console.log('changed');
+ var s = this.el.get_selection();
+ Gtk.TreeIter iter;
+ Gtk.TreeModel mod;
+ s.get_selected(out mod, out iter);
+
+
+ // var val = "";
+ GLib.Value value;
+ _this.model.el.get_value(iter, 2, out value);
+ _this.model.activePath = mod.get_path(iter).to_string();
+
+ var node = (JsRender.Node)value.dup_object();
+ _this.node_selected(node, this.lastEventSource);
+ while (Gtk.events_pending()) {
+ Gtk.main_iteration();
+ }
+ var cp = mod.get_path(iter);
+ Gtk.TreePath sp, ep;
+ this.el.get_visible_range(out sp, out ep);
+ // if sp is before cp then retuns 1.
+ // if cp is before ep then retuns 1.
+ if (cp.compare(sp) >= 0 && ep.compare(cp) >=1) {
+ return false;
+ }
+
+
+
+ this.el.scroll_to_cell(new Gtk.TreePath.from_string(_this.model.activePath), null, true, 0.1f,0.0f);
+
+ return false;
+ });
+ //_this.after_node_change(node);
+
+ // _this.model.file.changed(node, "tree");
+
+ //Seed.print( value.get_string());
+ return ;
+
+ });
+ this.el.drag_end.connect( (drag_context) => {
+ //Seed.print('LEFT-TREE: drag-end');
+ this.dragData = "";
+ this.dropList = null;
+ // this.targetData = "";
+ this.highlightDropPath("",0);
+ // return true;
+ });
+ this.el.drag_motion.connect( ( ctx, x, y, time) => {
+ print("got drag motion\n");
+ var src = Gtk.drag_get_source_widget(ctx);
+ this.drag_x = x;
+ this.drag_y = y;
+
+ if (src != this.el) {
+
+
+
+ // the point of this is to detect where an item could be dropped..
+ print("requesting drag data\n");
+ this.drag_in_motion = true;
+
+ // request data that will be recieved by the recieve...
+ Gtk.drag_get_data
+ (
+ this.el, // will receive 'drag-data-received' signal
+ ctx, // represents the current state of the DnD
+ Gdk.Atom.intern("STRING",true), // the target type we want
+ time // time stamp
+ );
+ return true;
+ }
+
+
+ print("action: %d\n", ctx.get_actions());
+ //print("GETTING POS");
+ var targetData = "";
+
+ Gtk.TreePath path;
+ Gtk.TreeViewDropPosition pos;
+ var isOver = _this.view.el.get_dest_row_at_pos(this.drag_x,this.drag_y, out path, out pos);
+
+ // if there are not items in the tree.. the we have to set isOver to true for anything..
+ var isEmpty = false;
+ if (_this.model.el.iter_n_children(null) < 1) {
+ print("got NO children?\n");
+ isOver = true; //???
+ isEmpty = true;
+ pos = Gtk.TreeViewDropPosition.INTO_OR_AFTER;
+ }
+
+
+ // ------------- a drag from self..
+
+
+ //var action = Gdk.DragAction.COPY;
+ // unless we are copying!!! ctl button..
+
+ var action = (ctx.get_actions() & Gdk.DragAction.MOVE) > 0 ?
+ Gdk.DragAction.COPY : Gdk.DragAction.MOVE ;
+ // Gdk.DragAction.MOVE : Gdk.DragAction.COPY ;
+
+
+ if (_this.model.el.iter_n_children(null) < 1) {
+ // no children.. -- asume it's ok..
+
+ targetData = "|%d|".printf((int)Gtk.TreeViewDropPosition.INTO_OR_AFTER);
+
+ this.highlightDropPath("", (Gtk.TreeViewDropPosition)0);
+ Gdk.drag_status(ctx, action ,time);
+ return true;
+
+ // continue through to allow drop...
+
+ }
+
+
+
+
+
+ //print("ISOVER? " + isOver);
+ if (!isOver) {
+
+ Gdk.drag_status(ctx, 0 ,time);
+ this.highlightDropPath("", (Gtk.TreeViewDropPosition)0);
+ return false;
+
+ }
+
+ // drag node is parent of child..
+ //console.log("SRC TREEPATH: " + src.treepath);
+ //console.log("TARGET TREEPATH: " + data.path.to_string());
+
+ // nned to check a few here..
+ //Gtk.TreeViewDropPosition.INTO_OR_AFTER
+ //Gtk.TreeViewDropPosition.INTO_OR_BEFORE
+ //Gtk.TreeViewDropPosition.AFTER
+ //Gtk.TreeViewDropPosition.BEFORE
+
+ // locally dragged items to not really use the
+ var selection_text = this.dragData;
+
+
+
+ if (selection_text == null || selection_text.length < 1) {
+ //print("Error - drag selection text returned NULL");
+ Gdk.drag_status(ctx, 0 ,time);
+ this.highlightDropPath("", (Gtk.TreeViewDropPosition)0);
+ return false;
+ }
+
+
+ // see if we are dragging into ourself?
+ var target_path = path.to_string();
+ print ("Drag %s onto %s--%d\n ", selection_text, target_path, pos);
+
+ // pos : 3 = ontop - 0 = after, 1 = before
+ //print("target_path="+target_path);
+
+ //
+ if (selection_text == target_path) {
+ print("self drag ?? == we should perhaps allow copy onto self..\n");
+
+ Gdk.drag_status(ctx, 0 ,time);
+ this.highlightDropPath("", (Gtk.TreeViewDropPosition)0);
+ return false;
+ // -- fixme -- this is not really correct..
+
+ }
+
+ // check that
+ //print("DUMPING DATA");
+ //console.dump(data);
+ // path, pos
+
+ //print(data.path.to_string() +' => '+ data.pos);
+
+ // dropList is a list of xtypes that this node could be dropped on.
+ // it is set up when we start to drag..
+
+
+ targetData = _this.model.findDropNodeByPath( path.to_string(), this.dropList, pos);
+
+ print("targetDAta: " + targetData +"\n");
+
+ if (targetData.length < 1) {
+ //print("Can not find drop node path");
+
+ Gdk.drag_status(ctx, 0, time);
+ this.highlightDropPath("", (Gtk.TreeViewDropPosition)0);
+ return false;
+ }
+
+ var td_ar = targetData.split("|");
+
+
+
+ Gdk.drag_status(ctx, action ,time);
+ this.highlightDropPath(td_ar[0], (Gtk.TreeViewDropPosition)int.parse(td_ar[1]));
+ return true;
+
+
+ });
+ this.el.drag_data_get.connect( ( drag_context, data, info, time) => {
+
+
+ //print("drag-data-get");
+ var s = this.el.get_selection();
+ if (s.count_selected_rows() < 1) {
+ data.set_text("",0);
+ print("return empty string - no selection..");
+ return;
+ }
+
+ Gtk.TreeIter iter;
+ Gtk.TreeModel mod;
+
+ s.get_selected(out mod, out iter);
+
+
+
+ GLib.Value value;
+ _this.model.el.get_value(iter, 2, out value);
+ var ndata = (JsRender.Node)(value.dup_object());
+
+
+
+ var tp = mod.get_path(iter).to_string();
+ // by default returns the path..
+
+ if ( info != Gdk.Atom.intern("STRING",true) ) {
+ tp = ndata.toJsonString();
+ }
+
+ //data.set_text(tp,tp.length);
+
+ data.set (data.get_target (), 8, (uchar[]) tp.to_utf8 ());
+
+
+ // print("return " + tp);
+ });
+ this.el.drag_data_received.connect( (ctx, x, y, sel, info, time) => {
+
+ // THIS CODE ONLY RELATES TO drag or drop of "NEW" elements or "FROM another tree.."
+
+
+ // print("Tree: drag-data-received\n");
+ var selection_text = (string)sel.get_data();
+ //print("selection_text= %s\n",selection_text);
+
+ var is_drag = this.drag_in_motion;
+
+
+
+ print("Is Drag %s\n", is_drag ? "Y": "N");
+ var targetData = "";
+
+ Gtk.TreePath path;
+ Gtk.TreeViewDropPosition pos;
+ var isOver = _this.view.el.get_dest_row_at_pos(this.drag_x,this.drag_y, out path, out pos);
+
+ // if there are not items in the tree.. the we have to set isOver to true for anything..
+ var isEmpty = false;
+ if (_this.model.el.iter_n_children(null) < 1) {
+ print("got NO children?\n");
+ isOver = true; //???
+ isEmpty = true;
+ pos = Gtk.TreeViewDropPosition.INTO_OR_AFTER;
+ }
+
+
+ //console.log("LEFT-TREE: drag-motion");
+ var src = Gtk.drag_get_source_widget(ctx);
+
+ // a drag from self - this should be handled by drop and motion.
+ if (src == this.el) {
+ print("Source == this element should not happen.. ? \n");
+ return;
+ }
+ //print("drag_data_recieved from another element");
+
+
+
+
+ if (selection_text == null || selection_text.length < 1 || !isOver) {
+ // nothing valid foudn to drop...
+ print("empty sel text or not over");
+ if (is_drag) {
+ Gdk.drag_status(ctx, 0, time);
+ this.highlightDropPath("", (Gtk.TreeViewDropPosition)0);
+ return;
+ }
+ Gtk.drag_finish (ctx, false, false, time); // drop failed..
+ // no drop action...
+ return;
+
+ }
+ var dropNode = new JsRender.Node();
+
+ var dropNodeType = selection_text;
+ var show_templates = true;
+ // for drop
+ if (dropNodeType[0] == '{') {
+ var pa = new Json.Parser();
+ try {
+ pa.load_from_data(dropNodeType);
+ } catch (Error e) {
+ Gtk.drag_finish (ctx, false, false, time); // drop failed..
+ // no drop action...
+ return;
+ }
+
+ dropNode.loadFromJson( pa.get_root().get_object(), 2);
+ dropNodeType = dropNode.fqn();
+ show_templates = false;
+
+
+ } else {
+
+ dropNode.setFqn(selection_text);
+ }
+
+
+ // dropList --- need to gather this ...
+ print("get dropList for : %s\n",dropNodeType);
+ var dropList = _this.main_window.windowstate.file.palete().getDropList(dropNodeType);
+
+ print("dropList: %s\n", string.joinv(" , ", dropList));
+
+ // if drag action is link ... then we can drop it anywahere...
+ if ((ctx.get_actions() & Gdk.DragAction.LINK) > 0) {
+ // if path is null?? dragging into an empty tree?
+ targetData = (path == null ? "" : path.to_string()) + "|%d".printf((int)pos);
+ } else {
+
+
+ targetData = _this.model.findDropNodeByPath( isEmpty ? "" : path.to_string(), dropList, pos);
+ }
+
+
+
+ print("targetDAta: " + targetData +"\n");
+
+ if (targetData.length < 1) {
+
+ // invalid drop path..
+ if (this.drag_in_motion) {
+ Gdk.drag_status(ctx, 0, time);
+ this.highlightDropPath("", (Gtk.TreeViewDropPosition)0);
+ return;
+ }
+ Gtk.drag_finish (ctx, false, false, time); // drop failed..
+ // no drop action...
+ return;
+ }
+ // valid drop path..
+
+ var td_ar = targetData.split("|");
+
+
+ if (this.drag_in_motion) {
+ Gdk.drag_status(ctx, Gdk.DragAction.COPY ,time);
+
+ this.highlightDropPath( td_ar[0] , (Gtk.TreeViewDropPosition)int.parse(td_ar[1]));
+ return;
+ }
+ // continue on to allow drop..
+
+
+ // at this point, drag is not in motion... -- as checked above... - so it's a real drop event..
+
+
+ _this.model.dropNode(targetData, dropNode, show_templates);
+ print("ADD new node!!!\n");
+
+ ///Xcls_DialogTemplateSelect.singleton().show( _this.model.file.palete(), node);
+
+ Gtk.drag_finish (ctx, false, false,time);
+
+
+
+
+
+ });
+ this.el.drag_drop.connect( ( ctx, x, y, time) => {
+ //Seed.print("TARGET: drag-drop");
+
+
+ var src = Gtk.drag_get_source_widget(ctx);
+
+ if (src != this.el) {
+
+
+
+ this.drag_in_motion = false;
+ // request data that will be recieved by the recieve...
+ Gtk.drag_get_data
+ (
+ this.el, // will receive 'drag-data-received' signal
+ ctx, // represents the current state of the DnD
+ Gdk.Atom.intern("application/json",true), // the target type we want
+ time // time stamp
+ );
+
+
+ // No target offered by source => error
+
+
+ return false;
+ }
+
+ // handle drop around self..
+
+
+
+ //print("GETTING POS");
+ var targetData = "";
+
+ Gtk.TreePath path;
+ Gtk.TreeViewDropPosition pos;
+ var isOver = _this.view.el.get_dest_row_at_pos(this.drag_x,this.drag_y, out path, out pos);
+
+ // if there are not items in the tree.. the we have to set isOver to true for anything..
+ var isEmpty = false;
+ if (_this.model.el.iter_n_children(null) < 1) {
+ print("got NO children?\n");
+ isOver = true; //???
+ isEmpty = true;
+ pos = Gtk.TreeViewDropPosition.INTO_OR_AFTER;
+ }
+
+
+
+ //var action = Gdk.DragAction.COPY;
+ // unless we are copying!!! ctl button..
+
+ var action = (ctx.get_actions() & Gdk.DragAction.MOVE) > 0 ?
+ Gdk.DragAction.COPY : Gdk.DragAction.MOVE ;
+ // Gdk.DragAction.MOVE : Gdk.DragAction.COPY ;
+
+
+ if (_this.model.el.iter_n_children(null) < 1) {
+ // no children.. -- asume it's ok..
+
+ targetData = "|%d|".printf((int)Gtk.TreeViewDropPosition.INTO_OR_AFTER);
+
+ // continue through to allow drop...
+
+ } else {
+
+
+
+
+
+ //print("ISOVER? " + isOver);
+ if (!isOver) {
+
+ Gtk.drag_finish (ctx, false, false, time); // drop failed..
+ return true; // not over apoint!?! - no action on drop or motion..
+ }
+
+ // drag node is parent of child..
+ //console.log("SRC TREEPATH: " + src.treepath);
+ //console.log("TARGET TREEPATH: " + data.path.to_string());
+
+ // nned to check a few here..
+ //Gtk.TreeViewDropPosition.INTO_OR_AFTER
+ //Gtk.TreeViewDropPosition.INTO_OR_BEFORE
+ //Gtk.TreeViewDropPosition.AFTER
+ //Gtk.TreeViewDropPosition.BEFORE
+
+ // locally dragged items to not really use the
+ var selection_text = this.dragData;
+
+
+
+ if (selection_text == null || selection_text.length < 1) {
+ //print("Error - drag selection text returned NULL");
+
+ Gtk.drag_finish (ctx, false, false, time); // drop failed..
+ return true; /// -- fixme -- this is not really correct..
+ }
+
+ // see if we are dragging into ourself?
+ print ("got selection text of " + selection_text);
+
+ var target_path = path.to_string();
+ //print("target_path="+target_path);
+
+ //
+ if (selection_text == target_path) {
+ print("self drag ?? == we should perhaps allow copy onto self..\n");
+
+ Gtk.drag_finish (ctx, false, false, time); // drop failed..
+
+ return true; /// -- fixme -- this is not really correct..
+
+ }
+
+ // check that
+ //print("DUMPING DATA");
+ //console.dump(data);
+ // path, pos
+
+ //print(data.path.to_string() +' => '+ data.pos);
+
+ // dropList is a list of xtypes that this node could be dropped on.
+ // it is set up when we start to drag..
+
+
+ targetData = _this.model.findDropNodeByPath( path.to_string(), this.dropList, pos);
+
+ print("targetDAta: " + targetData +"\n");
+
+ if (targetData.length < 1) {
+ //print("Can not find drop node path");
+
+ Gtk.drag_finish (ctx, false, false, time); // drop failed..
+ return true;
+ }
+
+
+
+ // continue on to allow drop..
+ }
+ // at this point, drag is not in motion... -- as checked above... - so it's a real drop event..
+
+
+ var delete_selection_data = false;
+
+ if (action == Gdk.DragAction.ASK) {
+ /* Ask the user to move or copy, then set the ctx action. */
+ }
+
+ if (action == Gdk.DragAction.MOVE) {
+ delete_selection_data = true;
+ }
+
+ // drag around.. - reorder..
+ _this.model.moveNode(targetData, action);
+
+
+
+
+
+ // we can send stuff to souce here...
+
+
+ // do we always say failure, so we handle the reall drop?
+ Gtk.drag_finish (ctx, false, false,time); //delete_selection_data, time);
+
+ return true;
+
+
+
+
+
+
+ });
+ }
+
+ // user defined functions
+ public void highlightDropPath ( string treepath, Gtk.TreeViewDropPosition pos) {
+
+ // highlighting for drag/drop
+ if (treepath.length > 0) {
+ this.el.set_drag_dest_row( new Gtk.TreePath.from_string( treepath ), pos);
+ } else {
+ this.el.set_drag_dest_row(null, Gtk.TreeViewDropPosition.INTO_OR_AFTER);
+ }
+
+ }
+ public void setCursor (string treepath, string sourceEvent) {
+ this.lastEventSource = sourceEvent;
+ //this.blockChanges = true; << block changes prevents loading of 'node data' and firing of node_selected..
+ this.el.set_cursor(new Gtk.TreePath.from_string(treepath), null, false);
+ // fire node_selected..
+ //this.blockChanges = false;
+ this.lastEventSource = "";
+ }
+ public void selectNode (string treepath_str, string source) {
+ this.lastEventSource = source;
+ //this.selection.select_path(new Gtk.TreePath.from_string( treepath_str));
+ var tp = new Gtk.TreePath.from_string(treepath_str);
+
+ this.el.set_cursor(tp, null, false);
+ this.el.scroll_to_cell(tp, null, false, 0,0);
+ }
+ }
+ public class Xcls_model : Object
+ {
+ public Gtk.TreeStore el;
+ private Xcls_WindowLeftTree _this;
+
+
+ // my vars (def)
+ public DialogTemplateSelect template_select;
+ public string activePath;
+
+ // ctor
+ public Xcls_model(Xcls_WindowLeftTree _owner )
+ {
+ _this = _owner;
+ _this.model = this;
+ this.el = new Gtk.TreeStore( 3, typeof(string),typeof(string),typeof(Object) );
+
+ // my vars (dec)
+ this.template_select = null;
+ this.activePath = "";
+
+ // set gobject values
+
+ // init method
+
+ print("model initialized");
+ }
+
+ // user defined functions
+ public string findDropNode (string treepath_str, string[] targets) {
+
+ // this is used by the dragdrop code in the roo version AFAIR..
+
+ //var path = treepath_str.replace(/^builder-/, '');
+ // treemap is depreciated... - should really check if model has any entries..
+
+ if (this.el.iter_n_children(null) < 1) {
+ //print("NO KEYS");
+ return "|%d".printf((int)Gtk.TreeViewDropPosition.INTO_OR_AFTER);
+ }
+ //print("FIND treepath: " + path);
+ //console.dump(this.treemap);
+
+ //if (!treepath_str.match(/^builder-/)) {
+ // return []; // nothing!
+ //}
+ if (targets.length > 0 && targets[0] == "*") {
+ return treepath_str;
+ }
+ return this.findDropNodeByPath(treepath_str,targets, -1);
+ }
+ public void loadFile (JsRender.JsRender f) {
+ //console.dump(f);
+ this.el.clear();
+
+ // needed???
+ _this.main_window.windowstate.file = f;
+
+
+ if (f.tree == null) {
+ try {
+ f.loadItems( );
+ } catch (Error e) {
+ return;
+ }
+ }
+ // if it's still null?
+ if (f.tree == null) {
+ return;
+ }
+
+ var o = new Gee.ArrayList<JsRender.Node>();
+ o.add(f.tree);
+ this.load(o,null);
+
+ _this.view.el.expand_all();
+
+ if (f.tree.items.size < 1) {
+ // single item..
+
+ //this.get('/Window.leftvpaned').el.set_position(80);
+ // select first...
+ _this.view.el.set_cursor(
+ new Gtk.TreePath.from_string("0"), null, false);
+
+
+ } else {
+ //this.get('/Window.leftvpaned').el.set_position(200);
+ }
+
+ return;
+
+
+ }
+ public void updateSelected () {
+
+
+ var s = _this.view.el.get_selection();
+
+ Gtk.TreeIter iter;
+ Gtk.TreeModel mod;
+
+
+
+ if (!s.get_selected(out mod, out iter)) {
+ return; // nothing seleted..
+ }
+
+ GLib.Value value;
+ this.el.get_value(iter, 2, out value);
+ var node = (JsRender.Node)(value.get_object());
+
+ this.el.set(iter, 0, node.nodeTitle(),
+ 1, node.nodeTip(), -1
+ );
+ }
+ public string findDropNodeByPath (string treepath_str, string[] targets, int in_pref = -1) {
+
+ var path = treepath_str; // dupe it..
+
+
+ // pref : 3 = ontop - 0 = after, 1 = before
+ int pref = in_pref < 0 ? Gtk.TreeViewDropPosition.INTO_OR_AFTER : in_pref;
+
+ var last = "";
+
+ //console.dump(this.treemap);
+
+ print("findDropNodeByPath : got path length %d / %s\n", path.length, path);
+
+ if (path.length == 0) {
+ // top drop. // just return empty..
+ return "|%d".printf((int)pref) ;
+
+ }
+
+
+ while (path.length > 0) {
+
+ if (path.length == treepath_str.length && pref != Gtk.TreeViewDropPosition.INTO_OR_AFTER) {
+ if (path.last_index_of(":") < 0 ) {
+ return "";
+ }
+ path = path.substring(0, path.last_index_of(":"));
+ last = treepath_str;
+ print("DROP before or after : using %s\n",path);
+ continue;
+ }
+
+ //print("LOOKING FOR PATH: " + path);
+ var node_data = this.pathToNode(path);
+
+ if (node_data == null) {
+ print("node not found");
+ return "";
+ }
+
+ var xname = node_data.fqn();
+ var match = "";
+ var prop = "";
+
+ for (var i =0; i < targets.length; i++) {
+ var tg = targets[i];
+ if ((tg == xname) ) {
+ match = tg;
+ break;
+ }
+ // if target is "xxxx:name"
+ if (tg.contains(xname +":")) {
+ match = tg;
+ var ar = tg.split(":");
+ prop = ar[1];
+ break;
+ }
+ }
+
+ if (match.length > 0) {
+ if (last.length > 0) { // pref is after/before..
+ // then it's after last
+ //if (pref > 1) {
+ // return "";
+ //}
+ return last + "|%d".printf((int)pref) + "|" + prop;
+
+
+ }
+ // we need to add prop - as :store -> needs to bee added when dropping onto.
+ return path + "|%d".printf( (int) Gtk.TreeViewDropPosition.INTO_OR_AFTER) + "|" + prop;
+ }
+ /*
+ last = "" + path;
+ var par = path.split(":");
+ string [] ppar = {};
+ for (var i = 0; i < par.length-1; i++) {
+ ppar += par[i];
+ }
+
+ path = string.joinv(":", ppar);
+ */
+ break;
+
+ }
+
+ return "";
+
+ }
+ public void moveNode (string target_data, Gdk.DragAction action)
+ {
+
+ /// target_data = "path|pos");
+
+
+ //print("MOVE NODE");
+ // console.dump(target_data);
+ Gtk.TreeIter old_iter;
+ Gtk.TreeModel mod;
+
+ var s = _this.view.el.get_selection();
+ s.get_selected(out mod , out old_iter);
+ mod.get_path(old_iter);
+
+ var node = this.pathToNode(mod.get_path(old_iter).to_string());
+ //console.dump(node);
+ if (node == null) {
+ print("moveNode: ERROR - node is null?");
+ }
+
+
+
+ // needs to drop first, otherwise the target_data
+ // treepath will be invalid.
+
+
+ if ((action & Gdk.DragAction.MOVE) > 0) {
+ print("REMOVING OLD NODE : " + target_data + "\n");
+ node.remove();
+ this.dropNode(target_data, node, false);
+ this.el.remove(ref old_iter);
+
+
+
+ } else {
+ print("DROPPING NODE // copy: " + target_data + "\n");
+ node = node.deepClone();
+ this.dropNode(target_data, node, false);
+ }
+ _this.changed();
+ this.activePath= "";
+ //this.updateNode(false,true);
+ }
+ public void load (Gee.ArrayList<JsRender.Node> tr, Gtk.TreeIter? iter)
+ {
+ Gtk.TreeIter citer;
+ //this.insert(citer,iter,0);
+ for(var i =0 ; i < tr.size; i++) {
+ if (iter != null) {
+ this.el.insert(out citer,iter,-1); // why not append?
+ } else {
+ this.el.append(out citer,null);
+ }
+
+ this.el.set(citer, 0, tr.get(i).nodeTitle(),
+ 1, tr.get(i).nodeTip(), -1
+ );
+ var o = GLib.Value(typeof(Object));
+ o.set_object((Object)tr.get(i));
+
+ this.el.set_value(citer, 2, o);
+
+ if (tr.get(i).items.size > 0) {
+ this.load(tr.get(i).items, citer);
+ }
+
+ }
+
+
+ }
+ public void deleteSelected () {
+
+ print("DELETE SELECTED?");
+ //_this.view.blockChanges = true;
+ print("GET SELECTION?");
+
+ var s = _this.view.el.get_selection();
+
+ print("GET SELECTED?");
+ Gtk.TreeIter iter;
+ Gtk.TreeModel mod;
+
+
+ if (!s.get_selected(out mod, out iter)) {
+ return; // nothing seleted..
+ }
+
+
+
+ this.activePath= "";
+ print("GET vnode value?");
+
+ GLib.Value value;
+ this.el.get_value(iter, 2, out value);
+ var data = (JsRender.Node)(value.get_object());
+ print("removing node from Render\n");
+ if (data.parent == null) {
+ _this.main_window.windowstate.file.tree = null;
+ } else {
+ data.remove();
+ }
+ print("removing node from Tree\n");
+ s.unselect_all();
+ this.el.remove(ref iter);
+
+
+
+
+ //
+
+
+
+
+ this.activePath= ""; // again!?!?
+ //this.changed(null,true);
+
+ _this.changed();
+
+ _this.view.blockChanges = false;
+ }
+ public JsRender.Node pathToNode (string path) {
+
+
+ Gtk.TreeIter iter;
+ _this.model.el.get_iter_from_string(out iter, path);
+
+ GLib.Value value;
+ _this.model.el.get_value(iter, 2, out value);
+
+ return (JsRender.Node)value.dup_object();
+
+ }
+ public void dropNode (string target_data_str, JsRender.Node node, bool show_templates) {
+ // print("drop Node");
+ // console.dump(node);
+ // console.dump(target_data);
+
+
+ // 0 = before , 1=after 2/3 onto
+
+
+ var target_data= target_data_str.split("|");
+
+ var parent_str = target_data[0].length > 0 ? target_data[0] : "";
+ var pos = target_data.length > 1 ? int.parse(target_data[1]) : 2; // ontop..
+
+
+ Gtk.TreePath tree_path = parent_str.length > 0 ? new Gtk.TreePath.from_string( parent_str ) : null;
+
+
+
+ //print("add " + tp + "@" + target_data[1] );
+
+ JsRender.Node parentNode = null;
+
+ Gtk.TreeIter iter_after;
+ Gtk.TreeIter iter_par ;
+
+
+ if (target_data.length == 3 && target_data[2].length > 0) {
+ node.props.set("* prop", target_data[2]);
+ }
+
+ Gtk.TreePath expand_parent = null;
+
+ // we only need to show the template if it's come from else where?
+ if (show_templates) {
+
+ var ts = _this.main_window.windowstate.template_select;
+
+ var new_node = ts.show(
+ _this.main_window, // (Gtk.Window) _this.el.get_toplevel (),
+ _this.main_window.windowstate.file.palete(),
+ node,
+ _this.main_window.windowstate.project);
+
+ if (new_node == null) {
+ return; // do not add?
+ }
+ node = new_node;
+ }
+
+ //print("pos is %d \n".printf(pos));
+
+ Gtk.TreeIter n_iter;
+
+ if ( parent_str.length < 1) {
+ this.el.append(out n_iter, null); // drop at top level..
+ node.parent = null;
+ _this.main_window.windowstate.file.tree = node;
+
+
+ } else if (pos < 2) {
+ //print(target_data[1] > 0 ? 'insert_after' : 'insert_before');
+
+ this.el.get_iter(out iter_after, tree_path );
+ this.el.iter_parent(out iter_par, iter_after);
+ expand_parent = this.el.get_path(iter_par);
+
+ GLib.Value value;
+ this.el.get_value( iter_par, 2, out value);
+ parentNode = (JsRender.Node)value.dup_object();
+
+
+ this.el.get_value( iter_after, 2, out value);
+ var relNode = (JsRender.Node)value.dup_object();
+
+ if ( pos > 0 ) {
+
+ this.el.insert_after(out n_iter, iter_par , iter_after);
+ var ix = parentNode.items.index_of(relNode);
+ parentNode.items.insert(ix+1, node);
+
+ } else {
+ this.el.insert_before(out n_iter, iter_par , iter_after);
+ var ix = parentNode.items.index_of(relNode);
+ parentNode.items.insert(ix, node);
+
+ }
+ node.parent = parentNode;
+
+
+
+ } else {
+ // print("appending to " + parent_str);
+ this.el.get_iter(out iter_par, tree_path);
+ this.el.append(out n_iter, iter_par );
+ expand_parent = this.el.get_path(iter_par);
+
+ GLib.Value value;
+ this.el.get_value( iter_par, 2, out value);
+ parentNode = (JsRender.Node)value.dup_object();
+ node.parent = parentNode;
+ parentNode.items.add(node);
+ }
+
+ // reparent node in tree...
+
+
+ // why only on no parent???
+
+ //if (node.parent = null) {
+
+
+
+ //}
+
+
+ // work out what kind of packing to use.. -- should be in
+ if (!node.has("pack") && parent_str.length > 1) {
+
+ _this.main_window.windowstate.file.palete().fillPack(node,parentNode);
+
+
+ }
+
+ // add the node...
+
+ this.el.set(n_iter, 0, node.nodeTitle(), 1, node.nodeTip(), -1 );
+ var o = GLib.Value(typeof(Object));
+ o.set_object((Object)node);
+
+ this.el.set_value(n_iter, 2, o);
+
+
+
+
+ // load children - if it has any..
+
+ if (node.items.size > 0) {
+ this.load(node.items, n_iter);
+ _this.view.el.expand_row(this.el.get_path(n_iter), true);
+ } else if (expand_parent != null && !_this.view.el.is_row_expanded(expand_parent)) {
+ _this.view.el.expand_row(expand_parent,true);
+ }
+
+ //if (tp != null && (node.items.length() > 0 || pos > 1)) {
+ // _this.view.el.expand_row(this.el.get_path(iter_par), true);
+ // }
+ // wee need to get the empty proptypes from somewhere..
+
+ //var olditer = this.activeIter;
+ this.activePath = this.el.get_path(n_iter).to_string();
+
+
+
+
+ _this.view.el.set_cursor(this.el.get_path(n_iter), null, false);
+ _this.changed();
+
+
+
+ }
+ public string treePathFromNode (JsRender.Node node) {
+ // iterate through the tree and find the node
+ var ret = "";
+
+ this.el.foreach((mod, pth, iter) => {
+ // get the node..
+
+
+ GLib.Value value;
+ _this.model.el.get_value(iter, 2, out value);
+
+
+
+ var n = (JsRender.Node)value;
+
+ print("compare %s to %s\n", n.fqn(), node.fqn());
+ if (node == n) {
+ ret = pth.to_string();
+ return true;
+ }
+ return false;
+ });
+ return ret;
+
+ }
+ }
+
+ public class Xcls_TreeViewColumn4 : Object
+ {
+ public Gtk.TreeViewColumn el;
+ private Xcls_WindowLeftTree _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_TreeViewColumn4(Xcls_WindowLeftTree _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.TreeViewColumn();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.title = "test";
+ var child_0 = new Xcls_renderer( _this );
+ child_0.ref();
+ this.el.pack_start ( child_0.el , true );
+
+ // init method
+
+ this.el.add_attribute(_this.renderer.el , "markup", 0 );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_renderer : Object
+ {
+ public Gtk.CellRendererText el;
+ private Xcls_WindowLeftTree _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_renderer(Xcls_WindowLeftTree _owner )
+ {
+ _this = _owner;
+ _this.renderer = this;
+ this.el = new Gtk.CellRendererText();
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ }
+
+
+
+ public class Xcls_LeftTreeMenu : Object
+ {
+ public Gtk.Menu el;
+ private Xcls_WindowLeftTree _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_LeftTreeMenu(Xcls_WindowLeftTree _owner )
+ {
+ _this = _owner;
+ _this.LeftTreeMenu = this;
+ this.el = new Gtk.Menu();
+
+ // my vars (dec)
+
+ // set gobject values
+ var child_0 = new Xcls_MenuItem7( _this );
+ child_0.ref();
+ this.el.add ( child_0.el );
+ var child_1 = new Xcls_MenuItem8( _this );
+ child_1.ref();
+ this.el.add ( child_1.el );
+ var child_2 = new Xcls_MenuItem9( _this );
+ child_2.ref();
+ this.el.add ( child_2.el );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_MenuItem7 : Object
+ {
+ public Gtk.MenuItem el;
+ private Xcls_WindowLeftTree _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_MenuItem7(Xcls_WindowLeftTree _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.MenuItem();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.label = "Delete Element";
+
+ //listeners
+ this.el.activate.connect( ( ) => {
+
+ print("ACTIVATE?");
+
+
+ _this.model.deleteSelected();
+ });
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_MenuItem8 : Object
+ {
+ public Gtk.MenuItem el;
+ private Xcls_WindowLeftTree _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_MenuItem8(Xcls_WindowLeftTree _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.MenuItem();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.label = "Save as Template";
+
+ //listeners
+ this.el.activate.connect( () => {
+
+ DialogSaveTemplate.singleton().show(
+ (Gtk.Window) _this.el.get_toplevel (),
+ _this.main_window.windowstate.file.palete(),
+ _this.getActiveElement()
+ );
+
+
+ });
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_MenuItem9 : Object
+ {
+ public Gtk.MenuItem el;
+ private Xcls_WindowLeftTree _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_MenuItem9(Xcls_WindowLeftTree _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.MenuItem();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.label = "Save as Module";
+
+ //listeners
+ this.el.activate.connect( () => {
+ var node = _this.getActiveElement();
+ var name = DialogSaveModule.singleton().show(
+ (Gtk.Window) _this.el.get_toplevel (),
+ _this.main_window.windowstate.project,
+ node
+ );
+ if (name.length < 1) {
+ return;
+
+ }
+ node.props.set("* xinclude", name);
+ node.items.clear();
+
+
+ var s = _this.view.el.get_selection();
+
+ print("GET SELECTED?");
+ Gtk.TreeIter iter;
+ Gtk.TreeModel mod;
+
+
+ if (!s.get_selected(out mod, out iter)) {
+ return; // nothing seleted..
+ }
+ Gtk.TreeIter citer;
+ var n_cn = mod.iter_n_children(iter) -1;
+ for (var i = n_cn; i > -1; i--) {
+ mod.iter_nth_child(out citer, iter, i);
+
+
+ print("removing node from Tree\n");
+
+ _this.model.el.remove(ref citer);
+ }
+ _this.changed();
+ _this.node_selected(node, "tree");
+
+
+ });
+ }
+
+ // user defined functions
+ }
+
+
+}
--- /dev/null
+{
+ "name" : "WindowRightPalete",
+ "parent" : "",
+ "title" : "",
+ "path" : "/home/alan/gitlive/app.Builder.js/src/Builder4/WindowRightPalete.bjs",
+ "permname" : "",
+ "modOrder" : "",
+ "build_module" : "builder",
+ "items" : [
+ {
+ "id" : "RightPalete",
+ "@ void after_node_change(JsRender.Node? node)" : "",
+ "* pack" : "add",
+ "xtype" : "Box",
+ "@ void before_node_change(JsRender.Node? node)" : "",
+ "| void load" : " (Palete.Palete pal, string cls ) {\n \n // this.get('model').expanded();\n \n var tr = pal.getChildList(cls);\n this.model.el.clear();\n\n\n Gtk.TreeIter citer;\n\n for(var i =0 ; i < tr.length; i++) {\n this.model.el.append(out citer); \n \n this.model.el.set_value(citer, 0, tr[i] ); // title \n \n }\n this.model.el.set_sort_column_id(0,Gtk.SortType.ASCENDING);\n \n} \n\n",
+ "@ void drag_end()" : "",
+ "$ xns" : "Gtk",
+ "| void clear" : "() {\n this.model.el.clear();\n} ",
+ "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
+ "items" : [
+ {
+ "id" : "viewbox",
+ "* pack" : "pack_start,true,true,0",
+ "xtype" : "Box",
+ "$ xns" : "Gtk",
+ "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
+ "items" : [
+ {
+ "* init" : " this.el.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);\n this.el.set_size_request(-1,200);\n \n",
+ "$ shadow_type" : "Gtk.ShadowType.IN",
+ "* pack" : "pack_start,true,true,0",
+ "xtype" : "ScrolledWindow",
+ "$ xns" : "Gtk",
+ "items" : [
+ {
+ "listeners" : {
+ "button_press_event" : " ( event) => {\n\n //\tif (!this.get('/Editor').save()) {\n //\t // popup!! - click handled.. \n// \t return true;\n// }\n return false;\n}",
+ "drag_begin" : " ( ctx) => {\n // we could fill this in now...\n// Seed.print('SOURCE: drag-begin');\n \n \n \n Gtk.TreeIter iter;\n var s = this.el.get_selection();\n \n Gtk.TreeModel mod;\n s.get_selected(out mod, out iter);\n var path = mod.get_path(iter);\n \n /// pix is a surface..\n var pix = this.el.create_row_drag_icon ( path);\n \n \n Gtk.drag_set_icon_surface (ctx, pix);\n GLib.Value value;\n \n\n _this.model.el.get_value(iter, 0, out value);\n \n this.dragData = (string) value;\n \n \n return;\n}",
+ "drag_end" : "( drag_context) => {\n \t print(\"SOURCE: drag-end\\n\");\n\t\n\tthis.dragData = \"\";\n\t//this.dropList = null;\n\t_this.drag_end(); // call signal..\n\t//this.get('/LeftTree.view').highlight(false);\n\t \n}",
+ "drag_data_get" : "(drag_context, selection_data, info, time) => {\n \t//Seed.print('Palete: drag-data-get: ' + target_type);\n if (this.dragData.length < 1 ) {\n return; \n }\n \n print(\"setting drag data to %s\\n\", this.dragData);\n // selection_data.set_text(this.dragData ,this.dragData.length);\n selection_data.set (selection_data.get_target (), 8, (uchar[]) this.dragData.to_utf8 ());\n\n //this.el.dragData = \"TEST from source widget\";\n \n \n}"
+ },
+ "# string dragData" : "",
+ "* init" : " {\n this.el.set_size_request(150,-1);\n // set_reorderable: [1]\n \n var description = new Pango.FontDescription();\n description.set_size(8000);\n this.el.override_font(description);\n \n var selection = this.el.get_selection();\n selection.set_mode( Gtk.SelectionMode.SINGLE);\n // this.selection.signal['changed'].connect(function() {\n // _view.listeners['cursor-changed'].apply(_view, [ _view, '']);\n //});\n // see: http://live.gnome.org/GnomeLove/DragNDropTutorial\n \n Gtk.drag_source_set (\n this.el, /* widget will be drag-able */\n Gdk.ModifierType.BUTTON1_MASK, /* modifier that will start a drag */\n BuilderApplication.targetList, /* lists of target to support */\n Gdk.DragAction.COPY /* what to do with data after dropped */\n );\n //Gtk.drag_source_set_target_list(this.el, LeftTree.targetList);\n \n // Gtk.drag_source_set_target_list(this.el, Application.targetList);\n // Gtk.drag_source_add_text_targets(this.el); \n \n}\n",
+ "xtype" : "TreeView",
+ "* pack" : "add",
+ "$ enable_tree_lines" : true,
+ "$ headers_visible" : true,
+ "$ xns" : "Gtk",
+ "items" : [
+ {
+ "| string getValue" : " (Gtk.TreeIter iter, int col) {\n GLib.Value gval;\n this.el.get_value(iter, col , out gval);\n return (string)gval;\n \n \n}",
+ "id" : "model",
+ "* pack" : "set_model",
+ "xtype" : "ListStore",
+ "$ columns" : "typeof(string),typeof(string)",
+ "n_columns" : 2,
+ "$ xns" : "Gtk"
+ },
+ {
+ "utf8 title" : "Drag to add Object",
+ "* init" : " this.el.add_attribute(_this.txtrender.el , \"markup\", 0 );\n \n",
+ "* pack" : "append_column",
+ "xtype" : "TreeViewColumn",
+ "$ xns" : "Gtk",
+ "items" : [
+ {
+ "id" : "txtrender",
+ "xtype" : "CellRendererText",
+ "* pack" : "pack_start,true",
+ "$ xns" : "Gtk"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file
--- /dev/null
+static Xcls_RightPalete _RightPalete;
+
+public class Xcls_RightPalete : Object
+{
+ public Gtk.Box el;
+ private Xcls_RightPalete _this;
+
+ public static Xcls_RightPalete singleton()
+ {
+ if (_RightPalete == null) {
+ _RightPalete= new Xcls_RightPalete();
+ }
+ return _RightPalete;
+ }
+ public Xcls_viewbox viewbox;
+ public Xcls_model model;
+ public Xcls_txtrender txtrender;
+
+ // my vars (def)
+ public signal void after_node_change(JsRender.Node? node) ;
+ public signal void before_node_change(JsRender.Node? node) ;
+ public signal void drag_end() ;
+
+ // ctor
+ public Xcls_RightPalete()
+ {
+ _this = this;
+ this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
+
+ // my vars (dec)
+
+ // set gobject values
+ var child_0 = new Xcls_viewbox( _this );
+ child_0.ref();
+ this.el.pack_start ( child_0.el , true,true,0 );
+ }
+
+ // user defined functions
+ public void load (Palete.Palete pal, string cls ) {
+
+ // this.get('model').expanded();
+
+ var tr = pal.getChildList(cls);
+ this.model.el.clear();
+
+
+ Gtk.TreeIter citer;
+
+ for(var i =0 ; i < tr.length; i++) {
+ this.model.el.append(out citer);
+
+ this.model.el.set_value(citer, 0, tr[i] ); // title
+
+ }
+ this.model.el.set_sort_column_id(0,Gtk.SortType.ASCENDING);
+
+ }
+ public void clear () {
+ this.model.el.clear();
+ }
+ public class Xcls_viewbox : Object
+ {
+ public Gtk.Box el;
+ private Xcls_RightPalete _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_viewbox(Xcls_RightPalete _owner )
+ {
+ _this = _owner;
+ _this.viewbox = this;
+ this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
+
+ // my vars (dec)
+
+ // set gobject values
+ var child_0 = new Xcls_ScrolledWindow3( _this );
+ child_0.ref();
+ this.el.pack_start ( child_0.el , true,true,0 );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_ScrolledWindow3 : Object
+ {
+ public Gtk.ScrolledWindow el;
+ private Xcls_RightPalete _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_ScrolledWindow3(Xcls_RightPalete _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.ScrolledWindow( null, null );
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.shadow_type = Gtk.ShadowType.IN;
+ var child_0 = new Xcls_TreeView4( _this );
+ child_0.ref();
+ this.el.add ( child_0.el );
+
+ // init method
+
+ this.el.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);
+ this.el.set_size_request(-1,200);
+ }
+
+ // user defined functions
+ }
+ public class Xcls_TreeView4 : Object
+ {
+ public Gtk.TreeView el;
+ private Xcls_RightPalete _this;
+
+
+ // my vars (def)
+ public string dragData;
+
+ // ctor
+ public Xcls_TreeView4(Xcls_RightPalete _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.TreeView();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.enable_tree_lines = true;
+ this.el.headers_visible = true;
+ var child_0 = new Xcls_model( _this );
+ child_0.ref();
+ this.el.set_model ( child_0.el );
+ var child_1 = new Xcls_TreeViewColumn6( _this );
+ child_1.ref();
+ this.el.append_column ( child_1.el );
+
+ // init method
+
+ {
+ this.el.set_size_request(150,-1);
+ // set_reorderable: [1]
+
+ var description = new Pango.FontDescription();
+ description.set_size(8000);
+ this.el.override_font(description);
+
+ var selection = this.el.get_selection();
+ selection.set_mode( Gtk.SelectionMode.SINGLE);
+ // this.selection.signal['changed'].connect(function() {
+ // _view.listeners['cursor-changed'].apply(_view, [ _view, '']);
+ //});
+ // see: http://live.gnome.org/GnomeLove/DragNDropTutorial
+
+ Gtk.drag_source_set (
+ this.el, /* widget will be drag-able */
+ Gdk.ModifierType.BUTTON1_MASK, /* modifier that will start a drag */
+ BuilderApplication.targetList, /* lists of target to support */
+ Gdk.DragAction.COPY /* what to do with data after dropped */
+ );
+ //Gtk.drag_source_set_target_list(this.el, LeftTree.targetList);
+
+ // Gtk.drag_source_set_target_list(this.el, Application.targetList);
+ // Gtk.drag_source_add_text_targets(this.el);
+
+ }
+
+ //listeners
+ this.el.button_press_event.connect( ( event) => {
+
+ // if (!this.get('/Editor').save()) {
+ // // popup!! - click handled..
+ // return true;
+ // }
+ return false;
+ });
+ this.el.drag_begin.connect( ( ctx) => {
+ // we could fill this in now...
+ // Seed.print('SOURCE: drag-begin');
+
+
+
+ Gtk.TreeIter iter;
+ var s = this.el.get_selection();
+
+ Gtk.TreeModel mod;
+ s.get_selected(out mod, out iter);
+ var path = mod.get_path(iter);
+
+ /// pix is a surface..
+ var pix = this.el.create_row_drag_icon ( path);
+
+
+ Gtk.drag_set_icon_surface (ctx, pix);
+ GLib.Value value;
+
+
+ _this.model.el.get_value(iter, 0, out value);
+
+ this.dragData = (string) value;
+
+
+ return;
+ });
+ this.el.drag_end.connect( ( drag_context) => {
+ print("SOURCE: drag-end\n");
+
+ this.dragData = "";
+ //this.dropList = null;
+ _this.drag_end(); // call signal..
+ //this.get('/LeftTree.view').highlight(false);
+
+ });
+ this.el.drag_data_get.connect( (drag_context, selection_data, info, time) => {
+ //Seed.print('Palete: drag-data-get: ' + target_type);
+ if (this.dragData.length < 1 ) {
+ return;
+ }
+
+ print("setting drag data to %s\n", this.dragData);
+ // selection_data.set_text(this.dragData ,this.dragData.length);
+ selection_data.set (selection_data.get_target (), 8, (uchar[]) this.dragData.to_utf8 ());
+
+ //this.el.dragData = "TEST from source widget";
+
+
+ });
+ }
+
+ // user defined functions
+ }
+ public class Xcls_model : Object
+ {
+ public Gtk.ListStore el;
+ private Xcls_RightPalete _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_model(Xcls_RightPalete _owner )
+ {
+ _this = _owner;
+ _this.model = this;
+ this.el = new Gtk.ListStore( 2, typeof(string),typeof(string) );
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ public string getValue (Gtk.TreeIter iter, int col) {
+ GLib.Value gval;
+ this.el.get_value(iter, col , out gval);
+ return (string)gval;
+
+
+ }
+ }
+
+ public class Xcls_TreeViewColumn6 : Object
+ {
+ public Gtk.TreeViewColumn el;
+ private Xcls_RightPalete _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_TreeViewColumn6(Xcls_RightPalete _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.TreeViewColumn();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.title = "Drag to add Object";
+ var child_0 = new Xcls_txtrender( _this );
+ child_0.ref();
+ this.el.pack_start ( child_0.el , true );
+
+ // init method
+
+ this.el.add_attribute(_this.txtrender.el , "markup", 0 );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_txtrender : Object
+ {
+ public Gtk.CellRendererText el;
+ private Xcls_RightPalete _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_txtrender(Xcls_RightPalete _owner )
+ {
+ _this = _owner;
+ _this.txtrender = this;
+ this.el = new Gtk.CellRendererText();
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ }
+
+
+
+
+
+}
--- /dev/null
+{
+ "name" : "WindowRooView",
+ "parent" : "",
+ "title" : "",
+ "path" : "/home/alan/gitlive/app.Builder.js/src/Builder4/WindowRooView.bjs",
+ "permname" : "",
+ "modOrder" : "",
+ "build_module" : "builder",
+ "items" : [
+ {
+ "| void scroll_to_line" : "(int line) {\n this.notebook.el.page = 1;// code preview...\n \n GLib.Timeout.add(500, () => {\n \n \n\t \n\t \n\t\t var buf = this.sourceview.el.get_buffer();\n\t \n\t\tvar sbuf = (Gtk.SourceBuffer) buf;\n\n\n\t\tGtk.TextIter iter; \n\t\tsbuf.get_iter_at_line(out iter, line);\n\t\tthis.sourceview.el.scroll_to_iter(iter, 0.1f, true, 0.0f, 0.5f);\n\t\treturn false;\n\t}); \n\n \n}\n",
+ "id" : "WindowRooView",
+ "# Gtk.Widget lastObj" : "null",
+ "| void createThumb" : "() {\n \n \n if (this.file == null) {\n return;\n }\n\tif (this.notebook.el.page > 0 ) {\n return;\n }\n \n var filename = this.file.getIconFileName(false);\n \n var win = this.el.get_parent_window();\n var width = win.get_width();\n // var height = win.get_height();\n try { \n Gdk.Pixbuf screenshot = Gdk.pixbuf_get_from_window(win, 0, 0, width, this.paned.el.position);\n screenshot.save(filename,\"png\");\n } catch(Error e) {\n //noop\n }\n\n \n \n \n \n}\n",
+ "| void loadFile" : "\n(JsRender.JsRender file)\n{\n this.file = file;\n this.view.renderJS(true);\n this.notebook.el.page = 0;// gtk preview \n this.sourceview.loadFile(); \n \n}\n \n ",
+ "int width" : 0,
+ "bool hexpand" : true,
+ "| int search" : "(string txt) {\n\tthis.notebook.el.page = 1;\n \tvar s = new Gtk.SourceSearchSettings();\n\tvar buf = (Gtk.SourceBuffer) this.sourceview.el.get_buffer();\n\tthis.searchcontext = new Gtk.SourceSearchContext(buf,s);\n\tthis.searchcontext.set_highlight(true);\n\ts.set_search_text(txt);\n\t\n\tGtk.TextIter beg, st,en;\n\t \n\tbuf.get_start_iter(out beg);\n\tthis.searchcontext.forward(beg, out st, out en);\n\tthis.last_search_end = 0;\n\treturn this.searchcontext.get_occurrences_count();\n\n \n}\n",
+ "int last_search_end" : 0,
+ "xtype" : "Box",
+ "Gtk.SourceSearchContext searchcontext" : "",
+ "# JsRender.JsRender file" : "null",
+ "int height" : 0,
+ "| void requestRedraw" : "() {\n this.view.renderJS(false);\n this.sourceview.loadFile(); \n}",
+ "$ xns" : "Gtk",
+ "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
+ "# Xcls_MainWindow main_window" : "",
+ "| void forwardSearch" : "(bool change_focus) {\n\n\tif (this.searchcontext == null) {\n\t\treturn;\n\t}\n\tthis.notebook.el.page = 1;\n\tGtk.TextIter beg, st,en, stl;\n\t\n\tvar buf = this.sourceview.el.get_buffer();\n\tbuf.get_iter_at_offset(out beg, this.last_search_end);\n\tif (!this.searchcontext.forward(beg, out st, out en)) {\n\t\tthis.last_search_end = 0;\n\t} else { \n\t\tthis.last_search_end = en.get_offset();\n\t\tif (change_focus) {\n\t\t\tthis.sourceview.el.grab_focus();\n\t\t}\n\t\tbuf.place_cursor(st);\n\t\tvar ln = st.get_line();\n\t\tbuf.get_iter_at_line(out stl,ln);\n\t\t \n\t\tthis.sourceview.el.scroll_to_iter(stl, 0.0f, true, 0.0f, 0.5f);\n\t}\n\n}\n",
+ "items" : [
+ {
+ "id" : "notebook",
+ "xtype" : "Notebook",
+ "* pack" : "pack_start,true,true,0",
+ "$ xns" : "Gtk",
+ "items" : [
+ {
+ "id" : "label_preview",
+ "xtype" : "Label",
+ "* pack" : false,
+ "$ xns" : "Gtk",
+ "utf8 label" : "Preview"
+ },
+ {
+ "id" : "label_code",
+ "* pack" : false,
+ "xtype" : "Label",
+ "$ xns" : "Gtk",
+ "utf8 label" : "Preview Generated Code"
+ },
+ {
+ "id" : "paned",
+ "xtype" : "Paned",
+ "* pack" : "add",
+ "$ xns" : "Gtk",
+ "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
+ "items" : [
+ {
+ "id" : "viewbox",
+ "xtype" : "Box",
+ "* pack" : "pack1,true,true",
+ "$ xns" : "Gtk",
+ "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
+ "$ homogeneous" : false,
+ "items" : [
+ {
+ "$ vexpand" : false,
+ "* pack" : "pack_start,false,true,0",
+ "$ height_request" : 20,
+ "xtype" : "Box",
+ "$ xns" : "Gtk",
+ "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
+ "$ homogeneous" : true,
+ "items" : [
+ {
+ "listeners" : {
+ "clicked" : "( ) => {\n _this.view.renderJS( true);\n}"
+ },
+ "label" : "Redraw",
+ "* pack" : "pack_start,false,false,0",
+ "xtype" : "Button",
+ "$ xns" : "Gtk"
+ },
+ {
+ "listeners" : {
+ "toggled" : " (state) => {\n this.el.set_label(this.el.active ? \"Auto Redraw On\" : \"Auto Redraw Off\");\n}"
+ },
+ "label" : "Auto Redraw On",
+ "id" : "AutoRedraw",
+ "$ active" : true,
+ "* pack" : "pack_start,false,false,0",
+ "xtype" : "CheckButton",
+ "$ xns" : "Gtk"
+ },
+ {
+ "listeners" : {
+ "clicked" : " () => {\n _this.view.redraws = 99;\n _this.view.el.web_context.clear_cache(); \n //_this.view.renderJS(true);\n FakeServerCache.clear();\n _this.view.reInit();\n\n}"
+ },
+ "label" : "Full Redraw",
+ "* pack" : "pack_start,false,false,0",
+ "xtype" : "Button",
+ "$ xns" : "Gtk"
+ }
+ ]
+ },
+ {
+ "id" : "viewcontainer",
+ "$ shadow_type" : "Gtk.ShadowType.IN",
+ "* init" : " this.el.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);\n \n",
+ "* pack" : "pack_end,true,true,0",
+ "xtype" : "ScrolledWindow",
+ "$ xns" : "Gtk",
+ "items" : [
+ {
+ "listeners" : {
+ "script_dialog" : " (dialog) => {\n if (this.el == null) {\n return true;\n }\n \n var msg = dialog.get_message();\n if (msg.length < 4) {\n return false;\n }\n if (msg.substring(0,4) != \"IPC:\") {\n return false;\n }\n var ar = msg.split(\":\", 3);\n if (ar.length < 3) {\n return false;\n }\n switch(ar[1]) {\n case \"SAVEHTML\":\n _this.file.saveHTML(ar[2]);\n return true;\n default:\n return false;\n }\n \n}",
+ "show" : " ( ) => {\n this.initInspector();;\n}",
+ "drag_drop" : " ( ctx, x, y,time, ud) => {\n return false;\n /*\n\tprint(\"TARGET: drag-drop\");\n var is_valid_drop_site = true;\n \n \n Gtk.drag_get_data\n (\n w, // will receive 'drag-data-received' signal \n ctx, /* represents the current state of the DnD \n this.get('/Window').atoms[\"STRING\"], /* the target type we want \n time /* time stamp \n );\n \n \n /* No target offered by source => error \n \n\n\treturn is_valid_drop_site;\n\t*/\n}",
+ "load_changed" : "(le) => {\n if (le != WebKit.LoadEvent.FINISHED) {\n return;\n }\n if (this.runjs.length < 1) {\n return;\n }\n // this.el.run_javascript(this.runjs, null);\n FakeServerCache.remove( this.runjs);\n this.runjs = \"\";\n}"
+ },
+ "# string renderedData" : "\"\"",
+ "id" : "view",
+ "# bool refreshRequired" : false,
+ "* init" : " {\n // this may not work!?\n var settings = this.el.get_settings();\n settings.enable_developer_extras = true;\n \n \n var fs= new FakeServer(this.el);\n fs.ref();\n // this was an attempt to change the url perms.. did not work..\n // settings.enable_file_access_from_file_uris = true;\n // settings.enable_offline_web_application_cache - true;\n // settings.enable_universal_access_from_file_uris = true;\n \n \n \n \n \n\n // FIXME - base url of script..\n // we need it so some of the database features work.\n this.el.load_html( \"Render not ready\" , \n //fixme - should be a config option!\n // or should we catch stuff and fix it up..\n \"http://localhost/app.Builder/\"\n );\n \n \n //this.el.open('file:///' + __script_path__ + '/../builder.html');\n /*\n Gtk.drag_dest_set\n (\n this.el, //\n Gtk.DestDefaults.MOTION | Gtk.DestDefaults.HIGHLIGHT,\n null, // list of targets\n Gdk.DragAction.COPY // what to do with data after dropped \n );\n \n // print(\"RB: TARGETS : \" + LeftTree.atoms[\"STRING\"]);\n Gtk.drag_dest_set_target_list(this.el, this.get('/Window').targetList);\n */\n GLib.Timeout.add_seconds(1, () =>{\n //print(\"run refresh?\");\n if (this.el == null) {\n return false;\n }\n this.runRefresh(); \n return true;\n });\n \n \n}\n",
+ "| void reInit" : "() {\n print(\"reInit?\");\n // if this happens destroy the webkit..\n // recreate it..\n this.el.stop_loading();\n \n if (_this.viewbox.el.get_parent() == null) {\n return;\n }\n \n \n _this.viewbox.el.remove(_this.viewcontainer.el);\n _this.paned.el.remove(_this.inspectorcontainer.el); \n \n // destory seems to cause problems.\n //this.el.destroy();\n //_this.viewcontainer.el.destroy();\n //_this.inspectorcontainer.el.destroy();\n var inv =new Xcls_inspectorcontainer(_this);\n inv.ref();\n _this.paned.el.pack2(inv.el,true,true);\n \n \n this.el = null; \n var nv =new Xcls_viewcontainer(_this);\n nv.ref();\n _this.viewbox.el.pack_end(nv.el,true,true,0);\n \n \n inv.el.show_all();\n nv.el.show_all();\n //while(Gtk.events_pending ()) Gtk.main_iteration ();\n //_this.view.renderJS(true); \n _this.view.refreshRequired = true;\n}\n",
+ "* pack" : "add",
+ "redraws" : 0,
+ "xtype" : "WebView",
+ "# WebKit.WebInspector inspector" : "",
+ "# string runjs" : "\"\"",
+ "# int redraws" : 0,
+ "| void runRefresh" : " () \n{\n // this is run every 2 seconds from the init..\n\n \n \n if (!this.refreshRequired) {\n // print(\"no refresh required\");\n return;\n }\n\n if (this.lastRedraw != null) {\n // do not redraw if last redraw was less that 5 seconds ago.\n if ((int64)(new DateTime.now_local()).difference(this.lastRedraw) < 5000 ) {\n return;\n }\n }\n \n if (_this.file == null) {\n return;\n }\n \n \n this.refreshRequired = false;\n // print(\"HTML RENDERING\");\n \n \n //this.get('/BottomPane').el.show();\n //this.get('/BottomPane').el.set_current_page(2);// webkit inspector\n _this.file.webkit_page_id = this.el.get_page_id();\n \n var js = _this.file.toSourcePreview();\n\n if (js.length < 1) {\n print(\"no data\");\n return;\n }\n// var data = js[0];\n this.redraws++;\n \n var project = _this.file.project; \n\n //print (project.fn);\n // set it to non-empty.\n \n// runhtml = runhtml.length ? runhtml : '<script type=\"text/javascript\"></script>'; \n\n\n// this.runhtml = this.runhtml || '';\n \n \n // then we need to reload the browser using\n // load_html_string..\n\n // then trigger a redraw once it's loaded..\n this.pendingRedraw = true;\n\n var runhtml = \"<script type=\\\"text/javascript\\\">\\n\" ;\n string builderhtml;\n \n try {\n GLib.FileUtils.get_contents(BuilderApplication.configDirectory() + \"/resources/roo.builder.js\", out builderhtml);\n } catch (Error e) {\n builderhtml = \"\";\n }\n\n runhtml += builderhtml + \"\\n\";\n runhtml += \"</script>\\n\" ;\n\n // fix to make sure they are the same..\n this.runhtml = project.runhtml;\n // need to modify paths\n\n string inhtml;\n var base_template = _this.file.project.base_template;\n \n if (base_template.length > 0 && !FileUtils.test(\n BuilderApplication.configDirectory() + \"/resources/\" + base_template, FileTest.EXISTS) \n ) {\n print(\"invalid base_template name - using default: %s\\n\", base_template);\n base_template = \"\";\n \n }\n try {\n GLib.FileUtils.get_contents(\n BuilderApplication.configDirectory() + \"/resources/\" + \n (base_template.length > 0 ? base_template : \"roo.builder.html\")\n , out inhtml);\n \n } catch (Error e) {\n inhtml = \"\";\n } \n this.renderedData = js;\n\n\n string js_src = js + \"\\n\" +\n\t\"Roo.onReady(function() {\\n\" +\n\t\"if (\" + _this.file.name +\".show) \" + _this.file.name +\".show({});\\n\" +\n\t\"Roo.XComponent.build();\\n\" +\n\t\"});\\n\";\n\t\n // print(\"render js: \" + js);\n //if (!this.ready) {\n // console.log('not loaded yet');\n //}\n this.lastRedraw = new DateTime.now_local();\n\n\n //this.runjs = js_src;\n var fc = FakeServerCache.factory_with_data(js_src);\n this.runjs = fc.fname;\n \n var html = inhtml.replace(\"</head>\", runhtml + this.runhtml + \n \"<script type=\\\"text/javascript\\\" src=\\\"xhttp://localhost\" + fc.fname + \"\\\"></script>\" + \n // \"<script type=\\\"text/javascript\\\">\\n\" +\n // js_src + \"\\n\" + \n // \"</script>\" + \n \n \"</head>\");\n //print(\"LOAD HTML \" + html);\n \n var rootURL = _this.file.project.rootURL;\n \n \n \n this.el.load_html( html , \n //fixme - should be a config option!\n (rootURL.length > 0 ? rootURL : \"xhttp://localhost/app.Builder.js/\")\n );\n \n // force the inspector... \n // this.initInspector();\n \n // - no need for this, the builder javascript will call it when build is complete\n //GLib.Timeout.add_seconds(1, () => {\n // this.el.run_javascript(\"Builder.saveHTML()\",null);\n // return false;\n //});\n// print( \"before render\" + this.lastRedraw);\n// print( \"after render\" + (new Date()));\n \n}\n ",
+ "$ xns" : "WebKit",
+ "| void initInspector" : "() {\n \n /* if (this.inspector == this.el.get_inspector()) {\n this.inspector.show();\n this.inspector.open_window(); \n print(\"init inspecter called, and inspector is the same as existing\\n\");\n return;\n }\n print(\"new inspector?\\n\");\n*/\n this.inspector = this.el.get_inspector();\n this.inspector.ref();\n \n // got a new inspector...\n \n this.inspector.open_window.connect(() => {\n this.inspector = this.el.get_inspector();\n print(\"inspector attach\\n\");\n var wv = this.inspector.get_web_view();\n if (wv != null) {\n print(\"got inspector web view\\n\");\n \n var cn = _this.inspectorcontainer.el.get_child();\n if (cn != null) {\n _this.inspectorcontainer.el.remove(cn);\n }\n \n _this.inspectorcontainer.el.add(wv);\n wv.show();\n } else {\n //this.inspector.close();\n \n //this.inspector = null;\n \n \n }\n return true;\n \n });\n /*\n this.inspector.closed.connect(() => {\n print(\"inspector closed?!?\");\n // if this happens destroy the webkit..\n // recreate it..\n this.el.stop_loading();\n \n if (_this.viewbox.el.get_parent() == null) {\n return;\n }\n \n \n _this.viewbox.el.remove(_this.viewcontainer.el);\n _this.el.remove(_this.inspectorcontainer.el); \n \n // destory seems to cause problems.\n //this.el.destroy();\n //_this.viewcontainer.el.destroy();\n //_this.inspectorcontainer.el.destroy();\n\n this.el = null; \n var nv =new Xcls_viewcontainer(_this);\n nv.ref();\n _this.viewbox.el.pack_end(nv.el,true,true,0);\n \n var inv =new Xcls_inspectorcontainer(_this);\n inv.ref();\n _this.el.pack2(inv.el,true,true);\n \n inv.el.show_all();\n nv.el.show_all();\n //while(Gtk.events_pending ()) Gtk.main_iteration ();\n //_this.view.renderJS(true); \n _this.view.refreshRequired = true;\n \n }); \n */\n \n this.inspector.show();\n}\n",
+ "# GLib.DateTime lastRedraw" : "null",
+ "# string runhtml" : "\"\"",
+ "# bool pendingRedraw" : false,
+ "| void renderJS" : "(bool force) {\n\n // this is the public redraw call..\n // we refresh in a loop privately..\n var autodraw = _this.AutoRedraw.el.active;\n if (!autodraw && !force) {\n print(\"Skipping redraw - no force, and autodraw off\");\n return;\n }\n \n this.refreshRequired = true;\n}\n"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "id" : "inspectorcontainer",
+ "$ shadow_type" : "Gtk.ShadowType.IN",
+ "* init" : " this.el.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);\n \n",
+ "xtype" : "ScrolledWindow",
+ "* pack" : "pack2,true,true",
+ "$ xns" : "Gtk"
+ }
+ ]
+ },
+ {
+ "xtype" : "ScrolledWindow",
+ "* pack" : "append_page,_this.label_code.el",
+ "$ xns" : "Gtk",
+ "items" : [
+ {
+ "listeners" : {
+ "button_release_event" : "() => {\n\tthis.onCursorChanged();\n\n\treturn false;\n}",
+ "key_press_event" : "() => {\n\tthis.onCursorChanged();\n\treturn false; \n}"
+ },
+ "gboolean show_line_marks" : true,
+ "| void onCursorChanged" : "(/*ParamSpec ps*/) {\n\t if (this.loading) {\n return;\n }\n // if (ps.name != \"cursor-position\") {\n // return;\n // }\n\n var buf = this.el.get_buffer();\n print(\"cursor changed : %d\\n\", buf.cursor_position);\n Gtk.TextIter cpos;\n buf.get_iter_at_offset(out cpos, buf.cursor_position);\n \n var ln = cpos.get_line();\n\t\tprint(\"cursor changed line : %d\\n\", ln);\n var node = _this.file.lineToNode(ln+1);\n \n if (node == null) {\n print(\"can not find node\\n\");\n return;\n }\n var prop = node.lineToProp(ln+1);\n print(\"prop : %s\", prop == null ? \"???\" : prop);\n \n \n \n \n // ---------- this selects the tree's node...\n \n var ltree = _this.main_window.windowstate.left_tree;\n var tp = ltree.model.treePathFromNode(node);\n print(\"got tree path %s\\n\", tp);\n if (tp != \"\") {\n\t this.allow_node_scroll = false; /// block node scrolling..\n\t \n\t \n\t //print(\"changing cursor on tree..\\n\");\n\t \n \n \n // let's try allowing editing on the methods.\n // a little klunky at present..\n this.prop_selected = \"\";\n if (prop != null) {\n \t\t//see if we can find it..\n \t\tvar kv = prop.split(\":\");\n \t\tif (kv[0] == \"p\") {\n \t\t\n\t \t\t//var k = prop.get_key(kv[1]);\n\t \t\t// fixme -- need to determine if it's an editable property...\n\t \t\tthis.prop_selected = prop;\n\t \t\t\n \t\t} else if (kv[0] == \"l\") {\n \t\t\t this.prop_selected = prop;\n \t\t\t\n \t\t}\n }\n ltree.view.setCursor(tp, \"editor\");\n // ltree.view.el.set_cursor(new Gtk.TreePath.from_string(tp), null, false); \n this.nodeSelected(node,false);\n \n // scrolling is disabled... as node selection calls scroll 10ms after it changes.\n GLib.Timeout.add_full(GLib.Priority.DEFAULT,100 , () => {\n\t this.allow_node_scroll = true;\n\t return false;\n });\n }\n \n // highlight the node..\n}\n ",
+ "id" : "sourceview",
+ "| void clearGreySelection" : "() {\n // clear all the marks..\n var sbuf = (Gtk.SourceBuffer)this.el.buffer;\n \n Gtk.TextIter start;\n Gtk.TextIter end; \n \n sbuf.get_bounds (out start, out end);\n sbuf.remove_source_marks (start, end, \"grey\");\n \n \n}\n",
+ "* init" : "{\n \n var description = Pango.FontDescription.from_string(\"monospace\");\n description.set_size(8000);\n this.el.override_font(description);\n\n this.loading = true;\n //var buf = this.el.get_buffer();\n //buf.notify.connect(this.onCursorChanged);\n \n \n \n var attrs = new Gtk.SourceMarkAttributes();\n var pink = Gdk.RGBA();\n pink.parse ( \"pink\");\n attrs.set_background ( pink);\n attrs.set_icon_name ( \"process-stop\"); \n attrs.query_tooltip_text.connect(( mark) => {\n //print(\"tooltip query? %s\\n\", mark.name);\n return mark.name;\n });\n \n this.el.set_mark_attributes (\"ERR\", attrs, 1);\n \n var wattrs = new Gtk.SourceMarkAttributes();\n var blue = Gdk.RGBA();\n blue.parse ( \"#ABF4EB\");\n wattrs.set_background ( blue);\n wattrs.set_icon_name ( \"process-stop\"); \n wattrs.query_tooltip_text.connect(( mark) => {\n //print(\"tooltip query? %s\\n\", mark.name);\n return mark.name;\n });\n \n this.el.set_mark_attributes (\"WARN\", wattrs, 1);\n \n \n \n var dattrs = new Gtk.SourceMarkAttributes();\n var purple = Gdk.RGBA();\n purple.parse ( \"#EEA9FF\");\n dattrs.set_background ( purple);\n dattrs.set_icon_name ( \"process-stop\"); \n dattrs.query_tooltip_text.connect(( mark) => {\n //print(\"tooltip query? %s\\n\", mark.name);\n return mark.name;\n });\n \n this.el.set_mark_attributes (\"DEPR\", dattrs, 1);\n \n \n var gattrs = new Gtk.SourceMarkAttributes();\n var grey = Gdk.RGBA();\n grey.parse ( \"#ccc\");\n gattrs.set_background ( grey);\n \n \n this.el.set_mark_attributes (\"grey\", gattrs, 1);\n \n \n \n \n \n \n}\n ",
+ "| void nodeSelected" : "(JsRender.Node? sel, bool scroll ) {\n \n \n\t\n // this is connected in widnowstate\n\n\n\t// not sure why.... \n while(Gtk.events_pending()) {\n Gtk.main_iteration();\n }\n \n this.node_selected = sel;\n \n this.updateGreySelection(scroll);\n \n \n \n}\n\n \n",
+ "bool loading" : true,
+ "| string toString" : "() {\n Gtk.TextIter s;\n Gtk.TextIter e;\n this.el.get_buffer().get_start_iter(out s);\n this.el.get_buffer().get_end_iter(out e);\n var ret = this.el.get_buffer().get_text(s,e,true);\n //print(\"TO STRING? \" + ret);\n return ret;\n}\n",
+ "| void loadFile" : "( ) {\n this.loading = true;\n \n \n // get the cursor and scroll position....\n var buf = this.el.get_buffer();\n\tvar cpos = buf.cursor_position;\n \n print(\"BEFORE LOAD cursor = %d\\n\", cpos);\n \n var vadj_pos = this.el.get_vadjustment().get_value();\n \n \n \n buf.set_text(\"\",0);\n var sbuf = (Gtk.SourceBuffer) buf;\n\n \n\n if (_this.file == null || _this.file.xtype != \"Roo\") {\n print(\"xtype != Roo\");\n this.loading = false;\n return;\n }\n \n // get the string from the rendered tree...\n \n var str = _this.file.toSource();\n \n// print(\"setting str %d\\n\", str.length);\n buf.set_text(str, str.length);\n var lm = Gtk.SourceLanguageManager.get_default();\n \n //?? is javascript going to work as js?\n \n ((Gtk.SourceBuffer)(buf)) .set_language(lm.get_language(_this.file.language));\n \n \n Gtk.TextIter start;\n Gtk.TextIter end; \n \n sbuf.get_bounds (out start, out end);\n sbuf.remove_source_marks (start, end, null); // remove all marks..\n \n GLib.Timeout.add(500, () => {\n\n print(\"RESORTING cursor to = %d\\n\", cpos);\n\t\tGtk.TextIter cpos_iter;\n\t\tbuf.get_iter_at_offset(out cpos_iter, cpos);\n\t\tbuf.place_cursor(cpos_iter); \n\t\t\n\t\tthis.el.get_vadjustment().set_value(vadj_pos);;\n\t\t\n\n\t\tthis.onCursorChanged();\n\t\t\n\t\t\n\t\t_this.buffer.checkSyntax();\n\t\treturn false;\n\t});\n\t\t\n this.loading = false; \n _this.buffer.dirty = false;\n}\n",
+ "* pack" : "add",
+ "xtype" : "SourceView",
+ "bool allow_node_scroll" : true,
+ "$ string prop_selected" : "\"\"",
+ "| void updateGreySelection" : "(bool scroll) { \n\tvar sel = this.node_selected;\n\tprint(\"node selected\\n\");\n var buf = this.el.get_buffer();\n var sbuf = (Gtk.SourceBuffer) buf;\n\n \n this.clearGreySelection();\n \n \n \n if (sel == null) {\n\t print(\"no selected node\\n\");\n // no highlighting..\n return;\n }\n \n print(\"highlight region %d to %d\\n\", sel.line_start,sel.line_end);\n Gtk.TextIter iter; \n sbuf.get_iter_at_line(out iter, sel.line_start);\n \n \n Gtk.TextIter cur_iter;\n sbuf.get_iter_at_offset(out cur_iter, sbuf.cursor_position);\n \n var cursor_at_line = cur_iter.get_line();\n \n \n //var cur_line = cur_iter.get_line();\n //if (cur_line > sel.line_start && cur_line < sel.line_end) {\n \n //} else {\n if (scroll) {\n\t\tprint(\"scrolling to node -- should occur on node picking.\\n\");\n \tthis.el.scroll_to_iter(iter, 0.1f, true, 0.0f, 0.5f);\n\t}\n \n var start_line = sel.line_start;\n var end_line = sel.line_end;\n \n \n this.el.editable = false;\n \n var colon_pos = 0;\n \n // now if we have selected a property...\n if (this.prop_selected.length> 0 ) {\n\n\t\tint nstart, nend;\n\t\tif (sel.getPropertyRange(this.prop_selected, out nstart, out nend) && nend > nstart) {\n\t\t\tstart_line = nstart;\n\t\t\tend_line = nend;\n\t\t\tthis.el.editable = true;\n\t\t\tprint(\"start line = %d, end line = %d\\n\", start_line, end_line);\n\t\t\t\n\t\t\t\t// see if we are 'right of ':'\n\t\t\t\t// get an iter for the start of the line.\n\t\t\tGtk.TextIter start_line_iter,end_line_iter;\n\t\t\tthis.el.buffer.get_iter_at_line(out start_line_iter, start_line -1);\n\t\t\tthis.el.buffer.get_iter_at_line(out end_line_iter, start_line -1);\n\t\t\t \n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tif (end_line_iter.forward_to_line_end()) {\n\t\t\t\tvar first_line = this.el.buffer.get_text(start_line_iter, end_line_iter, false);\n\t\t\t\tprint(\"first line = %s\\n\", first_line);\n\t\t\t\tif (first_line.contains(\":\")) {\n\t\t\t\t\tcolon_pos = start_line_iter.get_offset() + first_line.index_of(\":\") + 1;\n\t\t\t\t}\n\t\t\t\tprint(\"colon_pos = %d\\n\", colon_pos);\n\t\t\t}\n\t\t\tprint(\"is cursor at line? %d ?= %d\\n\", start_line -1 , cursor_at_line);\n\t\t\tif (start_line - 1 == cursor_at_line) {\n\t\t\t\tprint(\"cursor is on current line.\\n\");\n\t\t\t\tvar before_cursor_string = this.el.buffer.get_text(start_line_iter, cur_iter, false);\n\t\t\t\tprint(\"before cursor string = %s\\n\", before_cursor_string);\n\t\t\t\tif (!before_cursor_string.contains(\":\")) {\n\t\t\t\t\tthis.el.editable = false;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\tprint(\"propSelected = %s range %d -> %d\\n\", this.prop_selected, start_line, end_line);\t\t\n\t\t\n\t\t\n }\n \n\tprint(\"checking selection\\n\");\n \n \n // check selection - if it's out of 'bounds'\n if (this.el.editable && sbuf.get_has_selection()) {\n\t\tGtk.TextIter sel_start_iter, sel_end_iter;\n\t\tsbuf.get_selection_bounds(out sel_start_iter, out sel_end_iter);\n\t\t\n\t\tif (sel_start_iter.get_line() < start_line || sel_end_iter.get_line() > end_line ||\n\t\t\tsel_start_iter.get_line() > end_line || sel_end_iter.get_line() < start_line\t\t\t) {\n\t\t\t// save?\n\t\t\tthis.el.editable = false;\n\t\t}\n\t\tif (colon_pos > 0 &&\n\t\t\t(sel_start_iter.get_offset() < colon_pos || sel_end_iter.get_offset() < colon_pos)\n\t\t\t\n\t\t) {\n\t\t\tthis.el.editable = false;\n\t\t}\n\t\t\n\t\t \n \n }\n \n \n \n \n for (var i = 0; i < buf.get_line_count();i++) {\n if (i < (start_line -1) || i > (end_line -1)) {\n \n sbuf.get_iter_at_line(out iter, i);\n sbuf.create_source_mark(null, \"grey\", iter);\n \n }\n \n }\n if (scroll && (cursor_at_line > end_line || cursor_at_line < start_line)) {\n\t Gtk.TextIter cpos_iter;\n\t\tbuf.get_iter_at_line(out cpos_iter, start_line);\n\t\t\n\t\tbuf.place_cursor(cpos_iter); \n\t}\n\n\n}",
+ "| void highlightErrorsJson" : " (string type, Json.Object obj) {\n // this is a hook for the vala code - it has no value in javascript \n // as we only have one error ususally....\n return ;\n \n \n\n\n}",
+ "JsRender.Node? node_selected" : "null",
+ "$ xns" : "Gtk",
+ "gboolean show_line_numbers" : true,
+ "gboolean editable" : false,
+ "items" : [
+ {
+ "listeners" : {
+ "changed" : " () => {\n // check syntax??\n // ??needed..??\n // _this.save_button.el.sensitive = true;\n ///?? has changed occured during loading?\n if (_this.sourceview.loading) {\n\t\treturn;\n\t}\n\t\n print(\"- PREVIEW EDITOR CHANGED--\");\n\n this.dirty = true; \n if (!this.checkSyntax()) {\n\t\treturn;\n\t}\t\t\n \n // what are we editing??\n \n\n\n\n\n return ;\n}\n\n \n"
+ },
+ "bool dirty" : false,
+ "int error_line" : "-1",
+ "id" : "buffer",
+ "| bool highlightErrors" : "( Gee.HashMap<int,string> validate_res) {\n \n this.error_line = validate_res.size;\n\t\n if (this.error_line < 1) {\n return true;\n }\n var tlines = this.el.get_line_count ();\n Gtk.TextIter iter;\n var valiter = validate_res.map_iterator();\n while (valiter.next()) {\n \n// print(\"get inter\\n\");\n var eline = valiter.get_key();\n if (eline > tlines) {\n continue;\n }\n this.el.get_iter_at_line( out iter, eline);\n //print(\"mark line\\n\");\n this.el.create_source_mark(valiter.get_value(), \"ERR\", iter);\n } \n return false;\n}",
+ "| string toString" : " () {\n \n Gtk.TextIter s;\n Gtk.TextIter e;\n this.el.get_start_iter(out s);\n this.el.get_end_iter(out e);\n var ret = this.el.get_text(s,e,true);\n //print(\"TO STRING? \" + ret);\n return ret;\n}\n ",
+ "| bool checkSyntax" : " () {\n \n \n var str = this.toString();\n \n // needed???\n if (this.error_line > 0) {\n Gtk.TextIter start;\n Gtk.TextIter end; \n this.el.get_bounds (out start, out end);\n\n this.el.remove_source_marks (start, end, null);\n }\n \n if (str.length < 1) {\n print(\"checkSyntax - empty string?\\n\");\n return false;\n }\n \n if (_this.file == null) {\n return false;\n }\n var p = Palete.factory(_this.file.xtype); // returns Roo | Gtk | PlainFile \n \n \n if (_this.file.language != \"js\") {\n\t\treturn false; // fake syntax error.\n\t}\n\t\n //Gee.HashMap<int,string> ret_x;\n\n\treturn p.javascriptHasErrors(\n\t\t_this.main_window.windowstate,\n str, \n \"\", // _this.key, \n \"file\", //_this.ptype,\n _this.file, \n null\n ); \n \n}\n",
+ "* pack" : "set_buffer",
+ "xtype" : "SourceBuffer",
+ "$ xns" : "Gtk"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file
--- /dev/null
+static Xcls_WindowRooView _WindowRooView;
+
+public class Xcls_WindowRooView : Object
+{
+ public Gtk.Box el;
+ private Xcls_WindowRooView _this;
+
+ public static Xcls_WindowRooView singleton()
+ {
+ if (_WindowRooView == null) {
+ _WindowRooView= new Xcls_WindowRooView();
+ }
+ return _WindowRooView;
+ }
+ public Xcls_notebook notebook;
+ public Xcls_label_preview label_preview;
+ public Xcls_label_code label_code;
+ public Xcls_paned paned;
+ public Xcls_viewbox viewbox;
+ public Xcls_AutoRedraw AutoRedraw;
+ public Xcls_viewcontainer viewcontainer;
+ public Xcls_view view;
+ public Xcls_inspectorcontainer inspectorcontainer;
+ public Xcls_sourceview sourceview;
+ public Xcls_buffer buffer;
+
+ // my vars (def)
+ public Gtk.Widget lastObj;
+ public int width;
+ public int last_search_end;
+ public Gtk.SourceSearchContext searchcontext;
+ public JsRender.JsRender file;
+ public int height;
+ public Xcls_MainWindow main_window;
+
+ // ctor
+ public Xcls_WindowRooView()
+ {
+ _this = this;
+ this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
+
+ // my vars (dec)
+ this.lastObj = null;
+ this.width = 0;
+ this.last_search_end = 0;
+ this.file = null;
+ this.height = 0;
+
+ // set gobject values
+ this.el.hexpand = true;
+ var child_0 = new Xcls_notebook( _this );
+ child_0.ref();
+ this.el.pack_start ( child_0.el , true,true,0 );
+ }
+
+ // user defined functions
+ public void scroll_to_line (int line) {
+ this.notebook.el.page = 1;// code preview...
+
+ GLib.Timeout.add(500, () => {
+
+
+
+
+ var buf = this.sourceview.el.get_buffer();
+
+ var sbuf = (Gtk.SourceBuffer) buf;
+
+
+ Gtk.TextIter iter;
+ sbuf.get_iter_at_line(out iter, line);
+ this.sourceview.el.scroll_to_iter(iter, 0.1f, true, 0.0f, 0.5f);
+ return false;
+ });
+
+
+ }
+ public void createThumb () {
+
+
+ if (this.file == null) {
+ return;
+ }
+ if (this.notebook.el.page > 0 ) {
+ return;
+ }
+
+ var filename = this.file.getIconFileName(false);
+
+ var win = this.el.get_parent_window();
+ var width = win.get_width();
+ // var height = win.get_height();
+ try {
+ Gdk.Pixbuf screenshot = Gdk.pixbuf_get_from_window(win, 0, 0, width, this.paned.el.position);
+ screenshot.save(filename,"png");
+ } catch(Error e) {
+ //noop
+ }
+
+
+
+
+
+ }
+ public void loadFile (JsRender.JsRender file)
+ {
+ this.file = file;
+ this.view.renderJS(true);
+ this.notebook.el.page = 0;// gtk preview
+ this.sourceview.loadFile();
+
+ }
+ public int search (string txt) {
+ this.notebook.el.page = 1;
+ var s = new Gtk.SourceSearchSettings();
+ var buf = (Gtk.SourceBuffer) this.sourceview.el.get_buffer();
+ this.searchcontext = new Gtk.SourceSearchContext(buf,s);
+ this.searchcontext.set_highlight(true);
+ s.set_search_text(txt);
+
+ Gtk.TextIter beg, st,en;
+
+ buf.get_start_iter(out beg);
+ this.searchcontext.forward(beg, out st, out en);
+ this.last_search_end = 0;
+ return this.searchcontext.get_occurrences_count();
+
+
+ }
+ public void requestRedraw () {
+ this.view.renderJS(false);
+ this.sourceview.loadFile();
+ }
+ public void forwardSearch (bool change_focus) {
+
+ if (this.searchcontext == null) {
+ return;
+ }
+ this.notebook.el.page = 1;
+ Gtk.TextIter beg, st,en, stl;
+
+ var buf = this.sourceview.el.get_buffer();
+ buf.get_iter_at_offset(out beg, this.last_search_end);
+ if (!this.searchcontext.forward(beg, out st, out en)) {
+ this.last_search_end = 0;
+ } else {
+ this.last_search_end = en.get_offset();
+ if (change_focus) {
+ this.sourceview.el.grab_focus();
+ }
+ buf.place_cursor(st);
+ var ln = st.get_line();
+ buf.get_iter_at_line(out stl,ln);
+
+ this.sourceview.el.scroll_to_iter(stl, 0.0f, true, 0.0f, 0.5f);
+ }
+
+ }
+ public class Xcls_notebook : Object
+ {
+ public Gtk.Notebook el;
+ private Xcls_WindowRooView _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_notebook(Xcls_WindowRooView _owner )
+ {
+ _this = _owner;
+ _this.notebook = this;
+ this.el = new Gtk.Notebook();
+
+ // my vars (dec)
+
+ // set gobject values
+ var child_0 = new Xcls_label_preview( _this );
+ child_0.ref();
+ var child_1 = new Xcls_label_code( _this );
+ child_1.ref();
+ var child_2 = new Xcls_paned( _this );
+ child_2.ref();
+ this.el.add ( child_2.el );
+ var child_3 = new Xcls_ScrolledWindow14( _this );
+ child_3.ref();
+ this.el.append_page ( child_3.el , _this.label_code.el );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_label_preview : Object
+ {
+ public Gtk.Label el;
+ private Xcls_WindowRooView _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_label_preview(Xcls_WindowRooView _owner )
+ {
+ _this = _owner;
+ _this.label_preview = this;
+ this.el = new Gtk.Label( "Preview" );
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_label_code : Object
+ {
+ public Gtk.Label el;
+ private Xcls_WindowRooView _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_label_code(Xcls_WindowRooView _owner )
+ {
+ _this = _owner;
+ _this.label_code = this;
+ this.el = new Gtk.Label( "Preview Generated Code" );
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_paned : Object
+ {
+ public Gtk.Paned el;
+ private Xcls_WindowRooView _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_paned(Xcls_WindowRooView _owner )
+ {
+ _this = _owner;
+ _this.paned = this;
+ this.el = new Gtk.Paned( Gtk.Orientation.VERTICAL );
+
+ // my vars (dec)
+
+ // set gobject values
+ var child_0 = new Xcls_viewbox( _this );
+ child_0.ref();
+ this.el.pack1 ( child_0.el , true,true );
+ var child_1 = new Xcls_inspectorcontainer( _this );
+ child_1.ref();
+ this.el.pack2 ( child_1.el , true,true );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_viewbox : Object
+ {
+ public Gtk.Box el;
+ private Xcls_WindowRooView _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_viewbox(Xcls_WindowRooView _owner )
+ {
+ _this = _owner;
+ _this.viewbox = this;
+ this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.homogeneous = false;
+ var child_0 = new Xcls_Box7( _this );
+ child_0.ref();
+ this.el.pack_start ( child_0.el , false,true,0 );
+ var child_1 = new Xcls_viewcontainer( _this );
+ child_1.ref();
+ this.el.pack_end ( child_1.el , true,true,0 );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Box7 : Object
+ {
+ public Gtk.Box el;
+ private Xcls_WindowRooView _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Box7(Xcls_WindowRooView _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.homogeneous = true;
+ this.el.height_request = 20;
+ this.el.vexpand = false;
+ var child_0 = new Xcls_Button8( _this );
+ child_0.ref();
+ this.el.pack_start ( child_0.el , false,false,0 );
+ var child_1 = new Xcls_AutoRedraw( _this );
+ child_1.ref();
+ this.el.pack_start ( child_1.el , false,false,0 );
+ var child_2 = new Xcls_Button10( _this );
+ child_2.ref();
+ this.el.pack_start ( child_2.el , false,false,0 );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Button8 : Object
+ {
+ public Gtk.Button el;
+ private Xcls_WindowRooView _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Button8(Xcls_WindowRooView _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Button();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.label = "Redraw";
+
+ //listeners
+ this.el.clicked.connect( ( ) => {
+ _this.view.renderJS( true);
+ });
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_AutoRedraw : Object
+ {
+ public Gtk.CheckButton el;
+ private Xcls_WindowRooView _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_AutoRedraw(Xcls_WindowRooView _owner )
+ {
+ _this = _owner;
+ _this.AutoRedraw = this;
+ this.el = new Gtk.CheckButton();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.active = true;
+ this.el.label = "Auto Redraw On";
+
+ //listeners
+ this.el.toggled.connect( (state) => {
+ this.el.set_label(this.el.active ? "Auto Redraw On" : "Auto Redraw Off");
+ });
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_Button10 : Object
+ {
+ public Gtk.Button el;
+ private Xcls_WindowRooView _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Button10(Xcls_WindowRooView _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Button();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.label = "Full Redraw";
+
+ //listeners
+ this.el.clicked.connect( () => {
+ _this.view.redraws = 99;
+ _this.view.el.web_context.clear_cache();
+ //_this.view.renderJS(true);
+ FakeServerCache.clear();
+ _this.view.reInit();
+
+ });
+ }
+
+ // user defined functions
+ }
+
+
+ public class Xcls_viewcontainer : Object
+ {
+ public Gtk.ScrolledWindow el;
+ private Xcls_WindowRooView _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_viewcontainer(Xcls_WindowRooView _owner )
+ {
+ _this = _owner;
+ _this.viewcontainer = this;
+ this.el = new Gtk.ScrolledWindow( null, null );
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.shadow_type = Gtk.ShadowType.IN;
+ var child_0 = new Xcls_view( _this );
+ child_0.ref();
+ this.el.add ( child_0.el );
+
+ // init method
+
+ this.el.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);
+ }
+
+ // user defined functions
+ }
+ public class Xcls_view : Object
+ {
+ public WebKit.WebView el;
+ private Xcls_WindowRooView _this;
+
+
+ // my vars (def)
+ public string renderedData;
+ public bool refreshRequired;
+ public WebKit.WebInspector inspector;
+ public string runjs;
+ public int redraws;
+ public GLib.DateTime lastRedraw;
+ public string runhtml;
+ public bool pendingRedraw;
+
+ // ctor
+ public Xcls_view(Xcls_WindowRooView _owner )
+ {
+ _this = _owner;
+ _this.view = this;
+ this.el = new WebKit.WebView();
+
+ // my vars (dec)
+ this.renderedData = "";
+ this.refreshRequired = false;
+ this.runjs = "";
+ this.redraws = 0;
+ this.lastRedraw = null;
+ this.runhtml = "";
+ this.pendingRedraw = false;
+
+ // set gobject values
+
+ // init method
+
+ {
+ // this may not work!?
+ var settings = this.el.get_settings();
+ settings.enable_developer_extras = true;
+
+
+ var fs= new FakeServer(this.el);
+ fs.ref();
+ // this was an attempt to change the url perms.. did not work..
+ // settings.enable_file_access_from_file_uris = true;
+ // settings.enable_offline_web_application_cache - true;
+ // settings.enable_universal_access_from_file_uris = true;
+
+
+
+
+
+
+ // FIXME - base url of script..
+ // we need it so some of the database features work.
+ this.el.load_html( "Render not ready" ,
+ //fixme - should be a config option!
+ // or should we catch stuff and fix it up..
+ "http://localhost/app.Builder/"
+ );
+
+
+ //this.el.open('file:///' + __script_path__ + '/../builder.html');
+ /*
+ Gtk.drag_dest_set
+ (
+ this.el, //
+ Gtk.DestDefaults.MOTION | Gtk.DestDefaults.HIGHLIGHT,
+ null, // list of targets
+ Gdk.DragAction.COPY // what to do with data after dropped
+ );
+
+ // print("RB: TARGETS : " + LeftTree.atoms["STRING"]);
+ Gtk.drag_dest_set_target_list(this.el, this.get('/Window').targetList);
+ */
+ GLib.Timeout.add_seconds(1, () =>{
+ //print("run refresh?");
+ if (this.el == null) {
+ return false;
+ }
+ this.runRefresh();
+ return true;
+ });
+
+
+ }
+
+ //listeners
+ this.el.script_dialog.connect( (dialog) => {
+ if (this.el == null) {
+ return true;
+ }
+
+ var msg = dialog.get_message();
+ if (msg.length < 4) {
+ return false;
+ }
+ if (msg.substring(0,4) != "IPC:") {
+ return false;
+ }
+ var ar = msg.split(":", 3);
+ if (ar.length < 3) {
+ return false;
+ }
+ switch(ar[1]) {
+ case "SAVEHTML":
+ _this.file.saveHTML(ar[2]);
+ return true;
+ default:
+ return false;
+ }
+
+ });
+ this.el.show.connect( ( ) => {
+ this.initInspector();;
+ });
+ this.el.drag_drop.connect( ( ctx, x, y,time, ud) => {
+ return false;
+ /*
+ print("TARGET: drag-drop");
+ var is_valid_drop_site = true;
+
+
+ Gtk.drag_get_data
+ (
+ w, // will receive 'drag-data-received' signal
+ ctx, /* represents the current state of the DnD
+ this.get('/Window').atoms["STRING"], /* the target type we want
+ time /* time stamp
+ );
+
+
+ /* No target offered by source => error
+
+
+ return is_valid_drop_site;
+ */
+ });
+ this.el.load_changed.connect( (le) => {
+ if (le != WebKit.LoadEvent.FINISHED) {
+ return;
+ }
+ if (this.runjs.length < 1) {
+ return;
+ }
+ // this.el.run_javascript(this.runjs, null);
+ FakeServerCache.remove( this.runjs);
+ this.runjs = "";
+ });
+ }
+
+ // user defined functions
+ public void reInit () {
+ print("reInit?");
+ // if this happens destroy the webkit..
+ // recreate it..
+ this.el.stop_loading();
+
+ if (_this.viewbox.el.get_parent() == null) {
+ return;
+ }
+
+
+ _this.viewbox.el.remove(_this.viewcontainer.el);
+ _this.paned.el.remove(_this.inspectorcontainer.el);
+
+ // destory seems to cause problems.
+ //this.el.destroy();
+ //_this.viewcontainer.el.destroy();
+ //_this.inspectorcontainer.el.destroy();
+ var inv =new Xcls_inspectorcontainer(_this);
+ inv.ref();
+ _this.paned.el.pack2(inv.el,true,true);
+
+
+ this.el = null;
+ var nv =new Xcls_viewcontainer(_this);
+ nv.ref();
+ _this.viewbox.el.pack_end(nv.el,true,true,0);
+
+
+ inv.el.show_all();
+ nv.el.show_all();
+ //while(Gtk.events_pending ()) Gtk.main_iteration ();
+ //_this.view.renderJS(true);
+ _this.view.refreshRequired = true;
+ }
+ public void runRefresh ()
+ {
+ // this is run every 2 seconds from the init..
+
+
+
+ if (!this.refreshRequired) {
+ // print("no refresh required");
+ return;
+ }
+
+ if (this.lastRedraw != null) {
+ // do not redraw if last redraw was less that 5 seconds ago.
+ if ((int64)(new DateTime.now_local()).difference(this.lastRedraw) < 5000 ) {
+ return;
+ }
+ }
+
+ if (_this.file == null) {
+ return;
+ }
+
+
+ this.refreshRequired = false;
+ // print("HTML RENDERING");
+
+
+ //this.get('/BottomPane').el.show();
+ //this.get('/BottomPane').el.set_current_page(2);// webkit inspector
+ _this.file.webkit_page_id = this.el.get_page_id();
+
+ var js = _this.file.toSourcePreview();
+
+ if (js.length < 1) {
+ print("no data");
+ return;
+ }
+ // var data = js[0];
+ this.redraws++;
+
+ var project = _this.file.project;
+
+ //print (project.fn);
+ // set it to non-empty.
+
+ // runhtml = runhtml.length ? runhtml : '<script type="text/javascript"></script>';
+
+
+ // this.runhtml = this.runhtml || '';
+
+
+ // then we need to reload the browser using
+ // load_html_string..
+
+ // then trigger a redraw once it's loaded..
+ this.pendingRedraw = true;
+
+ var runhtml = "<script type=\"text/javascript\">\n" ;
+ string builderhtml;
+
+ try {
+ GLib.FileUtils.get_contents(BuilderApplication.configDirectory() + "/resources/roo.builder.js", out builderhtml);
+ } catch (Error e) {
+ builderhtml = "";
+ }
+
+ runhtml += builderhtml + "\n";
+ runhtml += "</script>\n" ;
+
+ // fix to make sure they are the same..
+ this.runhtml = project.runhtml;
+ // need to modify paths
+
+ string inhtml;
+ var base_template = _this.file.project.base_template;
+
+ if (base_template.length > 0 && !FileUtils.test(
+ BuilderApplication.configDirectory() + "/resources/" + base_template, FileTest.EXISTS)
+ ) {
+ print("invalid base_template name - using default: %s\n", base_template);
+ base_template = "";
+
+ }
+ try {
+ GLib.FileUtils.get_contents(
+ BuilderApplication.configDirectory() + "/resources/" +
+ (base_template.length > 0 ? base_template : "roo.builder.html")
+ , out inhtml);
+
+ } catch (Error e) {
+ inhtml = "";
+ }
+ this.renderedData = js;
+
+
+ string js_src = js + "\n" +
+ "Roo.onReady(function() {\n" +
+ "if (" + _this.file.name +".show) " + _this.file.name +".show({});\n" +
+ "Roo.XComponent.build();\n" +
+ "});\n";
+
+ // print("render js: " + js);
+ //if (!this.ready) {
+ // console.log('not loaded yet');
+ //}
+ this.lastRedraw = new DateTime.now_local();
+
+
+ //this.runjs = js_src;
+ var fc = FakeServerCache.factory_with_data(js_src);
+ this.runjs = fc.fname;
+
+ var html = inhtml.replace("</head>", runhtml + this.runhtml +
+ "<script type=\"text/javascript\" src=\"xhttp://localhost" + fc.fname + "\"></script>" +
+ // "<script type=\"text/javascript\">\n" +
+ // js_src + "\n" +
+ // "</script>" +
+
+ "</head>");
+ //print("LOAD HTML " + html);
+
+ var rootURL = _this.file.project.rootURL;
+
+
+
+ this.el.load_html( html ,
+ //fixme - should be a config option!
+ (rootURL.length > 0 ? rootURL : "xhttp://localhost/app.Builder.js/")
+ );
+
+ // force the inspector...
+ // this.initInspector();
+
+ // - no need for this, the builder javascript will call it when build is complete
+ //GLib.Timeout.add_seconds(1, () => {
+ // this.el.run_javascript("Builder.saveHTML()",null);
+ // return false;
+ //});
+ // print( "before render" + this.lastRedraw);
+ // print( "after render" + (new Date()));
+
+ }
+ public void initInspector () {
+
+ /* if (this.inspector == this.el.get_inspector()) {
+ this.inspector.show();
+ this.inspector.open_window();
+ print("init inspecter called, and inspector is the same as existing\n");
+ return;
+ }
+ print("new inspector?\n");
+ */
+ this.inspector = this.el.get_inspector();
+ this.inspector.ref();
+
+ // got a new inspector...
+
+ this.inspector.open_window.connect(() => {
+ this.inspector = this.el.get_inspector();
+ print("inspector attach\n");
+ var wv = this.inspector.get_web_view();
+ if (wv != null) {
+ print("got inspector web view\n");
+
+ var cn = _this.inspectorcontainer.el.get_child();
+ if (cn != null) {
+ _this.inspectorcontainer.el.remove(cn);
+ }
+
+ _this.inspectorcontainer.el.add(wv);
+ wv.show();
+ } else {
+ //this.inspector.close();
+
+ //this.inspector = null;
+
+
+ }
+ return true;
+
+ });
+ /*
+ this.inspector.closed.connect(() => {
+ print("inspector closed?!?");
+ // if this happens destroy the webkit..
+ // recreate it..
+ this.el.stop_loading();
+
+ if (_this.viewbox.el.get_parent() == null) {
+ return;
+ }
+
+
+ _this.viewbox.el.remove(_this.viewcontainer.el);
+ _this.el.remove(_this.inspectorcontainer.el);
+
+ // destory seems to cause problems.
+ //this.el.destroy();
+ //_this.viewcontainer.el.destroy();
+ //_this.inspectorcontainer.el.destroy();
+
+ this.el = null;
+ var nv =new Xcls_viewcontainer(_this);
+ nv.ref();
+ _this.viewbox.el.pack_end(nv.el,true,true,0);
+
+ var inv =new Xcls_inspectorcontainer(_this);
+ inv.ref();
+ _this.el.pack2(inv.el,true,true);
+
+ inv.el.show_all();
+ nv.el.show_all();
+ //while(Gtk.events_pending ()) Gtk.main_iteration ();
+ //_this.view.renderJS(true);
+ _this.view.refreshRequired = true;
+
+ });
+ */
+
+ this.inspector.show();
+ }
+ public void renderJS (bool force) {
+
+ // this is the public redraw call..
+ // we refresh in a loop privately..
+ var autodraw = _this.AutoRedraw.el.active;
+ if (!autodraw && !force) {
+ print("Skipping redraw - no force, and autodraw off");
+ return;
+ }
+
+ this.refreshRequired = true;
+ }
+ }
+
+
+
+ public class Xcls_inspectorcontainer : Object
+ {
+ public Gtk.ScrolledWindow el;
+ private Xcls_WindowRooView _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_inspectorcontainer(Xcls_WindowRooView _owner )
+ {
+ _this = _owner;
+ _this.inspectorcontainer = this;
+ this.el = new Gtk.ScrolledWindow( null, null );
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.shadow_type = Gtk.ShadowType.IN;
+
+ // init method
+
+ this.el.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);
+ }
+
+ // user defined functions
+ }
+
+
+ public class Xcls_ScrolledWindow14 : Object
+ {
+ public Gtk.ScrolledWindow el;
+ private Xcls_WindowRooView _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_ScrolledWindow14(Xcls_WindowRooView _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.ScrolledWindow( null, null );
+
+ // my vars (dec)
+
+ // set gobject values
+ var child_0 = new Xcls_sourceview( _this );
+ child_0.ref();
+ this.el.add ( child_0.el );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_sourceview : Object
+ {
+ public Gtk.SourceView el;
+ private Xcls_WindowRooView _this;
+
+
+ // my vars (def)
+ public bool loading;
+ public bool allow_node_scroll;
+ public string prop_selected;
+ public JsRender.Node? node_selected;
+
+ // ctor
+ public Xcls_sourceview(Xcls_WindowRooView _owner )
+ {
+ _this = _owner;
+ _this.sourceview = this;
+ this.el = new Gtk.SourceView();
+
+ // my vars (dec)
+ this.loading = true;
+ this.allow_node_scroll = true;
+ this.prop_selected = "";
+ this.node_selected = null;
+
+ // set gobject values
+ this.el.editable = false;
+ this.el.show_line_marks = true;
+ this.el.show_line_numbers = true;
+ var child_0 = new Xcls_buffer( _this );
+ child_0.ref();
+ this.el.set_buffer ( child_0.el );
+
+ // init method
+
+ {
+
+ var description = Pango.FontDescription.from_string("monospace");
+ description.set_size(8000);
+ this.el.override_font(description);
+
+ this.loading = true;
+ //var buf = this.el.get_buffer();
+ //buf.notify.connect(this.onCursorChanged);
+
+
+
+ var attrs = new Gtk.SourceMarkAttributes();
+ var pink = Gdk.RGBA();
+ pink.parse ( "pink");
+ attrs.set_background ( pink);
+ attrs.set_icon_name ( "process-stop");
+ attrs.query_tooltip_text.connect(( mark) => {
+ //print("tooltip query? %s\n", mark.name);
+ return mark.name;
+ });
+
+ this.el.set_mark_attributes ("ERR", attrs, 1);
+
+ var wattrs = new Gtk.SourceMarkAttributes();
+ var blue = Gdk.RGBA();
+ blue.parse ( "#ABF4EB");
+ wattrs.set_background ( blue);
+ wattrs.set_icon_name ( "process-stop");
+ wattrs.query_tooltip_text.connect(( mark) => {
+ //print("tooltip query? %s\n", mark.name);
+ return mark.name;
+ });
+
+ this.el.set_mark_attributes ("WARN", wattrs, 1);
+
+
+
+ var dattrs = new Gtk.SourceMarkAttributes();
+ var purple = Gdk.RGBA();
+ purple.parse ( "#EEA9FF");
+ dattrs.set_background ( purple);
+ dattrs.set_icon_name ( "process-stop");
+ dattrs.query_tooltip_text.connect(( mark) => {
+ //print("tooltip query? %s\n", mark.name);
+ return mark.name;
+ });
+
+ this.el.set_mark_attributes ("DEPR", dattrs, 1);
+
+
+ var gattrs = new Gtk.SourceMarkAttributes();
+ var grey = Gdk.RGBA();
+ grey.parse ( "#ccc");
+ gattrs.set_background ( grey);
+
+
+ this.el.set_mark_attributes ("grey", gattrs, 1);
+
+
+
+
+
+
+ }
+
+ //listeners
+ this.el.button_release_event.connect( () => {
+ this.onCursorChanged();
+
+ return false;
+ });
+ this.el.key_press_event.connect( () => {
+ this.onCursorChanged();
+ return false;
+ });
+ }
+
+ // user defined functions
+ public void onCursorChanged (/*ParamSpec ps*/) {
+ if (this.loading) {
+ return;
+ }
+ // if (ps.name != "cursor-position") {
+ // return;
+ // }
+
+ var buf = this.el.get_buffer();
+ print("cursor changed : %d\n", buf.cursor_position);
+ Gtk.TextIter cpos;
+ buf.get_iter_at_offset(out cpos, buf.cursor_position);
+
+ var ln = cpos.get_line();
+ print("cursor changed line : %d\n", ln);
+ var node = _this.file.lineToNode(ln+1);
+
+ if (node == null) {
+ print("can not find node\n");
+ return;
+ }
+ var prop = node.lineToProp(ln+1);
+ print("prop : %s", prop == null ? "???" : prop);
+
+
+
+
+ // ---------- this selects the tree's node...
+
+ var ltree = _this.main_window.windowstate.left_tree;
+ var tp = ltree.model.treePathFromNode(node);
+ print("got tree path %s\n", tp);
+ if (tp != "") {
+ this.allow_node_scroll = false; /// block node scrolling..
+
+
+ //print("changing cursor on tree..\n");
+
+
+
+ // let's try allowing editing on the methods.
+ // a little klunky at present..
+ this.prop_selected = "";
+ if (prop != null) {
+ //see if we can find it..
+ var kv = prop.split(":");
+ if (kv[0] == "p") {
+
+ //var k = prop.get_key(kv[1]);
+ // fixme -- need to determine if it's an editable property...
+ this.prop_selected = prop;
+
+ } else if (kv[0] == "l") {
+ this.prop_selected = prop;
+
+ }
+ }
+ ltree.view.setCursor(tp, "editor");
+ // ltree.view.el.set_cursor(new Gtk.TreePath.from_string(tp), null, false);
+ this.nodeSelected(node,false);
+
+ // scrolling is disabled... as node selection calls scroll 10ms after it changes.
+ GLib.Timeout.add_full(GLib.Priority.DEFAULT,100 , () => {
+ this.allow_node_scroll = true;
+ return false;
+ });
+ }
+
+ // highlight the node..
+ }
+ public void clearGreySelection () {
+ // clear all the marks..
+ var sbuf = (Gtk.SourceBuffer)this.el.buffer;
+
+ Gtk.TextIter start;
+ Gtk.TextIter end;
+
+ sbuf.get_bounds (out start, out end);
+ sbuf.remove_source_marks (start, end, "grey");
+
+
+ }
+ public void nodeSelected (JsRender.Node? sel, bool scroll ) {
+
+
+
+ // this is connected in widnowstate
+
+
+ // not sure why....
+ while(Gtk.events_pending()) {
+ Gtk.main_iteration();
+ }
+
+ this.node_selected = sel;
+
+ this.updateGreySelection(scroll);
+
+
+
+ }
+ public string toString () {
+ Gtk.TextIter s;
+ Gtk.TextIter e;
+ this.el.get_buffer().get_start_iter(out s);
+ this.el.get_buffer().get_end_iter(out e);
+ var ret = this.el.get_buffer().get_text(s,e,true);
+ //print("TO STRING? " + ret);
+ return ret;
+ }
+ public void loadFile ( ) {
+ this.loading = true;
+
+
+ // get the cursor and scroll position....
+ var buf = this.el.get_buffer();
+ var cpos = buf.cursor_position;
+
+ print("BEFORE LOAD cursor = %d\n", cpos);
+
+ var vadj_pos = this.el.get_vadjustment().get_value();
+
+
+
+ buf.set_text("",0);
+ var sbuf = (Gtk.SourceBuffer) buf;
+
+
+
+ if (_this.file == null || _this.file.xtype != "Roo") {
+ print("xtype != Roo");
+ this.loading = false;
+ return;
+ }
+
+ // get the string from the rendered tree...
+
+ var str = _this.file.toSource();
+
+ // print("setting str %d\n", str.length);
+ buf.set_text(str, str.length);
+ var lm = Gtk.SourceLanguageManager.get_default();
+
+ //?? is javascript going to work as js?
+
+ ((Gtk.SourceBuffer)(buf)) .set_language(lm.get_language(_this.file.language));
+
+
+ Gtk.TextIter start;
+ Gtk.TextIter end;
+
+ sbuf.get_bounds (out start, out end);
+ sbuf.remove_source_marks (start, end, null); // remove all marks..
+
+ GLib.Timeout.add(500, () => {
+
+ print("RESORTING cursor to = %d\n", cpos);
+ Gtk.TextIter cpos_iter;
+ buf.get_iter_at_offset(out cpos_iter, cpos);
+ buf.place_cursor(cpos_iter);
+
+ this.el.get_vadjustment().set_value(vadj_pos);;
+
+
+ this.onCursorChanged();
+
+
+ _this.buffer.checkSyntax();
+ return false;
+ });
+
+ this.loading = false;
+ _this.buffer.dirty = false;
+ }
+ public void updateGreySelection (bool scroll) {
+ var sel = this.node_selected;
+ print("node selected\n");
+ var buf = this.el.get_buffer();
+ var sbuf = (Gtk.SourceBuffer) buf;
+
+
+ this.clearGreySelection();
+
+
+
+ if (sel == null) {
+ print("no selected node\n");
+ // no highlighting..
+ return;
+ }
+
+ print("highlight region %d to %d\n", sel.line_start,sel.line_end);
+ Gtk.TextIter iter;
+ sbuf.get_iter_at_line(out iter, sel.line_start);
+
+
+ Gtk.TextIter cur_iter;
+ sbuf.get_iter_at_offset(out cur_iter, sbuf.cursor_position);
+
+ var cursor_at_line = cur_iter.get_line();
+
+
+ //var cur_line = cur_iter.get_line();
+ //if (cur_line > sel.line_start && cur_line < sel.line_end) {
+
+ //} else {
+ if (scroll) {
+ print("scrolling to node -- should occur on node picking.\n");
+ this.el.scroll_to_iter(iter, 0.1f, true, 0.0f, 0.5f);
+ }
+
+ var start_line = sel.line_start;
+ var end_line = sel.line_end;
+
+
+ this.el.editable = false;
+
+ var colon_pos = 0;
+
+ // now if we have selected a property...
+ if (this.prop_selected.length> 0 ) {
+
+ int nstart, nend;
+ if (sel.getPropertyRange(this.prop_selected, out nstart, out nend) && nend > nstart) {
+ start_line = nstart;
+ end_line = nend;
+ this.el.editable = true;
+ print("start line = %d, end line = %d\n", start_line, end_line);
+
+ // see if we are 'right of ':'
+ // get an iter for the start of the line.
+ Gtk.TextIter start_line_iter,end_line_iter;
+ this.el.buffer.get_iter_at_line(out start_line_iter, start_line -1);
+ this.el.buffer.get_iter_at_line(out end_line_iter, start_line -1);
+
+
+
+
+ if (end_line_iter.forward_to_line_end()) {
+ var first_line = this.el.buffer.get_text(start_line_iter, end_line_iter, false);
+ print("first line = %s\n", first_line);
+ if (first_line.contains(":")) {
+ colon_pos = start_line_iter.get_offset() + first_line.index_of(":") + 1;
+ }
+ print("colon_pos = %d\n", colon_pos);
+ }
+ print("is cursor at line? %d ?= %d\n", start_line -1 , cursor_at_line);
+ if (start_line - 1 == cursor_at_line) {
+ print("cursor is on current line.\n");
+ var before_cursor_string = this.el.buffer.get_text(start_line_iter, cur_iter, false);
+ print("before cursor string = %s\n", before_cursor_string);
+ if (!before_cursor_string.contains(":")) {
+ this.el.editable = false;
+ }
+
+ }
+
+
+ }
+ print("propSelected = %s range %d -> %d\n", this.prop_selected, start_line, end_line);
+
+
+ }
+
+ print("checking selection\n");
+
+
+ // check selection - if it's out of 'bounds'
+ if (this.el.editable && sbuf.get_has_selection()) {
+ Gtk.TextIter sel_start_iter, sel_end_iter;
+ sbuf.get_selection_bounds(out sel_start_iter, out sel_end_iter);
+
+ if (sel_start_iter.get_line() < start_line || sel_end_iter.get_line() > end_line ||
+ sel_start_iter.get_line() > end_line || sel_end_iter.get_line() < start_line ) {
+ // save?
+ this.el.editable = false;
+ }
+ if (colon_pos > 0 &&
+ (sel_start_iter.get_offset() < colon_pos || sel_end_iter.get_offset() < colon_pos)
+
+ ) {
+ this.el.editable = false;
+ }
+
+
+
+ }
+
+
+
+
+ for (var i = 0; i < buf.get_line_count();i++) {
+ if (i < (start_line -1) || i > (end_line -1)) {
+
+ sbuf.get_iter_at_line(out iter, i);
+ sbuf.create_source_mark(null, "grey", iter);
+
+ }
+
+ }
+ if (scroll && (cursor_at_line > end_line || cursor_at_line < start_line)) {
+ Gtk.TextIter cpos_iter;
+ buf.get_iter_at_line(out cpos_iter, start_line);
+
+ buf.place_cursor(cpos_iter);
+ }
+
+
+ }
+ public void highlightErrorsJson (string type, Json.Object obj) {
+ // this is a hook for the vala code - it has no value in javascript
+ // as we only have one error ususally....
+ return ;
+
+
+
+
+ }
+ }
+ public class Xcls_buffer : Object
+ {
+ public Gtk.SourceBuffer el;
+ private Xcls_WindowRooView _this;
+
+
+ // my vars (def)
+ public bool dirty;
+ public int error_line;
+
+ // ctor
+ public Xcls_buffer(Xcls_WindowRooView _owner )
+ {
+ _this = _owner;
+ _this.buffer = this;
+ this.el = new Gtk.SourceBuffer( null );
+
+ // my vars (dec)
+ this.dirty = false;
+ this.error_line = -1;
+
+ // set gobject values
+
+ //listeners
+ this.el.changed.connect( () => {
+ // check syntax??
+ // ??needed..??
+ // _this.save_button.el.sensitive = true;
+ ///?? has changed occured during loading?
+ if (_this.sourceview.loading) {
+ return;
+ }
+
+ print("- PREVIEW EDITOR CHANGED--");
+
+ this.dirty = true;
+ if (!this.checkSyntax()) {
+ return;
+ }
+
+ // what are we editing??
+
+
+
+
+
+ return ;
+ });
+ }
+
+ // user defined functions
+ public bool highlightErrors ( Gee.HashMap<int,string> validate_res) {
+
+ this.error_line = validate_res.size;
+
+ if (this.error_line < 1) {
+ return true;
+ }
+ var tlines = this.el.get_line_count ();
+ Gtk.TextIter iter;
+ var valiter = validate_res.map_iterator();
+ while (valiter.next()) {
+
+ // print("get inter\n");
+ var eline = valiter.get_key();
+ if (eline > tlines) {
+ continue;
+ }
+ this.el.get_iter_at_line( out iter, eline);
+ //print("mark line\n");
+ this.el.create_source_mark(valiter.get_value(), "ERR", iter);
+ }
+ return false;
+ }
+ public string toString () {
+
+ Gtk.TextIter s;
+ Gtk.TextIter e;
+ this.el.get_start_iter(out s);
+ this.el.get_end_iter(out e);
+ var ret = this.el.get_text(s,e,true);
+ //print("TO STRING? " + ret);
+ return ret;
+ }
+ public bool checkSyntax () {
+
+
+ var str = this.toString();
+
+ // needed???
+ if (this.error_line > 0) {
+ Gtk.TextIter start;
+ Gtk.TextIter end;
+ this.el.get_bounds (out start, out end);
+
+ this.el.remove_source_marks (start, end, null);
+ }
+
+ if (str.length < 1) {
+ print("checkSyntax - empty string?\n");
+ return false;
+ }
+
+ if (_this.file == null) {
+ return false;
+ }
+ var p = Palete.factory(_this.file.xtype); // returns Roo | Gtk | PlainFile
+
+
+ if (_this.file.language != "js") {
+ return false; // fake syntax error.
+ }
+
+ //Gee.HashMap<int,string> ret_x;
+
+ return p.javascriptHasErrors(
+ _this.main_window.windowstate,
+ str,
+ "", // _this.key,
+ "file", //_this.ptype,
+ _this.file,
+ null
+ );
+
+ }
+ }
+
+
+
+
+}
--- /dev/null
+/**
+ * as state management is a bit too complicated inside the builder
+ * it's better to seperate this into this class
+ *
+ * This class has references to all the Class instances that make up the window..
+ *
+ */
+public class WindowState : Object
+{
+ public Xcls_MainWindow win;
+
+ public enum State {
+ NONE,
+ PREVIEW,
+ OBJECT,
+ PROP,
+ LISTENER,
+ CODE, // code editor.
+ CODEONLY,
+ FILES,
+ PROJECT, // project settings..
+ FILEPROJECT, // project when in file mode
+ PROJECTCODEONLY // when editing code...
+ }
+
+ public State state = State.NONE;
+
+ public bool children_loaded = false;
+
+
+ public Project.Project project;
+ public JsRender.JsRender file;
+
+
+ public Xcls_WindowLeftTree left_tree;
+ public Xcls_WindowAddProp add_props;
+ public Xcls_LeftProps left_props;
+ public Xcls_ProjectSettings projectsettings;
+ public ValaProjectSettings vala_projectsettings;
+ public Xcls_RightPalete rightpalete;
+ public Editor code_editor;
+ public Xcls_WindowRooView window_rooview;
+ public Xcls_GtkView window_gladeview;
+
+ public Xcls_ClutterFiles clutterfiles;
+
+ public Xcls_WindowLeftProjects left_projects; // can not see where this is initialized..
+
+ public DialogTemplateSelect template_select;
+
+ public Xcls_PopoverFileDetails file_details;
+
+
+ public Xcls_ValaCompileResults compile_results;
+
+ // dialogs??
+ public Xcls_DialogPluginWebkit webkit_plugin;
+
+
+ public Palete.ValaSource valasource; // the spawner that runs the vala compiler.
+ public Json.Object last_compile_result;
+
+ // ctor
+ public WindowState(Xcls_MainWindow win)
+ {
+ this.win = win;
+ // initialize
+
+ // left elements..
+ this.leftTreeInit();
+ this.propsListInit();
+
+ // on clutter space...
+ this.projectEditInit();
+ this.codeEditInit();
+ this.projectListInit();
+ this.fileViewInit();
+
+ // adding stuff
+ this.objectAddInit();
+ this.propsAddInit();
+
+
+ // previews...
+ this.gtkViewInit();
+ this.webkitViewInit();
+
+ // dialogs
+
+ this.fileDetailsInit();
+
+ this.webkit_plugin = new Xcls_DialogPluginWebkit();
+ this.template_select = new DialogTemplateSelect();
+ this.children_loaded = true;
+
+
+ this.valasource = new Palete.ValaSource();
+ this.valasource.compiled.connect(this.showCompileResult);
+
+ this.compile_results = new Xcls_ValaCompileResults();
+ this.compile_results.window = this.win;
+ this.valasource.compile_output.connect(this.compile_results.addLine);
+
+ this.win.statusbar_compilestatus_label.el.hide();
+ this.win.statusbar_run.el.hide();
+ this.win.search_results.el.hide();
+ }
+
+
+ // left tree
+
+ public void leftTreeInit()
+ {
+
+ this.left_tree = new Xcls_WindowLeftTree();
+ this.left_tree.ref();
+ this.left_tree.main_window = this.win;
+
+ this.win.tree.el.pack_start(this.left_tree.el,true, true,0);
+ this.left_tree.el.show_all();
+
+ this.left_tree.before_node_change.connect(() => {
+ // if the node change is caused by the editor (code preview)
+ if (this.left_tree.view.lastEventSource == "editor") {
+ return true;
+ }
+ return this.leftTreeBeforeChange();
+
+ });
+
+ this.left_tree.node_selected.connect((sel, source) => {
+ if (source == "editor") {
+ return;
+ }
+ if (this.file.xtype == "Roo") {
+ this.window_rooview.sourceview.nodeSelected(sel,true); // foce scroll.
+ } else {
+ this.window_gladeview.sourceview.nodeSelected(sel);
+ }
+ });
+
+ this.left_tree.node_selected.connect((sel, source) => {
+ this.leftTreeNodeSelected(sel, source);
+ });
+
+ this.left_tree.changed.connect(() => {
+ print("LEFT TREE: Changed fired\n");
+ this.file.save();
+ if (this.left_tree.getActiveFile().xtype == "Roo" ) {
+ this.window_rooview.requestRedraw();
+ } else {
+ this.window_gladeview.loadFile(this.left_tree.getActiveFile());
+ }
+
+ });
+
+ }
+
+ public bool leftTreeBeforeChange()
+ {
+ if (this.state != State.CODE) {
+ this.left_props.finish_editing();
+ return true;
+ }
+ if (!this.code_editor.saveContents()) {
+ return false;
+ }
+ return false;
+ }
+
+ public void leftTreeNodeSelected(JsRender.Node? sel, string source)
+ {
+
+ print("node_selected called %s\n", (sel == null) ? "NULL" : "a value");
+
+ if (sel == null) {
+ this.left_props.el.hide();
+ }
+ this.left_props.el.show();
+ this.left_props.load(this.left_tree.getActiveFile(), sel);
+ switch (this.state) {
+
+ case State.OBJECT:
+
+ if (sel == null) {
+ this.rightpalete.clear();
+ break;
+ }
+ this.rightpalete.load(this.left_tree.getActiveFile().palete(), sel.fqn());
+ break;
+
+
+ case State.PROP:
+ if (sel == null) {
+ this.add_props.clear();
+ break;
+ }
+ this.add_props.show(this.left_tree.getActiveFile().palete(), "props", sel.fqn());
+ break;
+
+ case State.LISTENER:
+
+ if (sel == null) {
+ this.add_props.clear();
+ break;
+ }
+ this.add_props.show(this.left_tree.getActiveFile().palete(), "signals", sel.fqn());
+ break;
+
+ case State.CODE:
+ this.switchState(State.PREVIEW);
+
+ break;
+
+
+ }
+
+
+ }
+
+
+
+
+ public void propsListInit()
+ {
+
+ this.left_props =new Xcls_LeftProps();
+ this.left_props.ref();
+ this.left_props.main_window = this.win;
+ this.win.props.el.pack_start(this.left_props.el,true, true,0);
+ this.left_props.el.show_all();
+
+ this.left_props.show_editor.connect( (file, node, type, key) => {
+ this.switchState(State.CODE);
+ this.code_editor.show(
+ file,
+ node,
+ type,
+ key
+ );
+
+
+ });
+
+
+ this.left_props.stop_editor.connect( () => {
+ if (this.state != State.CODE) {
+ return true;
+ }
+
+ var ret = this.code_editor.saveContents();
+ if (!ret) {
+ return false;
+ }
+ this.switchState(State.PREVIEW);
+ return ret;
+ });
+
+ this.left_props.changed.connect(() => {
+ if (this.left_tree.getActiveFile().xtype == "Roo" ) {
+ this.window_rooview.requestRedraw();
+ } else {
+ this.window_gladeview.loadFile(this.left_tree.getActiveFile());
+ }
+ this.left_tree.model.updateSelected();
+ this.file.save();
+ if (this.file.xtype=="Gtk") {
+ this.valasource.checkFileSpawn(this.file);
+ }
+ });
+
+
+
+ }
+
+ //------------- projects edit
+
+ public void projectEditInit()
+ {
+ this.projectsettings =new Xcls_ProjectSettings();
+ this.projectsettings.ref(); /// really?
+
+ this.vala_projectsettings =new ValaProjectSettings();
+ this.vala_projectsettings.ref();
+ this.vala_projectsettings.window = this.win;
+
+ ((Gtk.Container)(this.win.projecteditview.el.get_widget())).add(this.projectsettings.el);
+ //this.projectsettings.el.show_all();
+
+ var stage = this.win.projecteditview.el.get_stage();
+ stage.set_background_color( Clutter.Color.from_string("#000"));
+
+ this.projectsettings.buttonPressed.connect((btn) => {
+ if (this.left_tree.getActiveFile().xtype == "Roo" ) {
+ if (btn == "save") {
+ this.window_rooview.view.renderJS(true);
+ }
+ if (btn == "apply") {
+ this.window_rooview.view.renderJS(true);
+ return;
+ }
+ } else {
+ // do nothing for gtk..
+ }
+ if (btn == "save" || btn == "apply") {
+ this.win.project.save();
+
+ }
+ this.switchState (State.PREVIEW);
+
+ });
+
+ }
+ // ----------- object adding
+ public void objectAddInit()
+ {
+
+ this.rightpalete = new Xcls_RightPalete();
+ this.rightpalete.ref(); /// really?
+ ((Gtk.Container)(this.win.objectview.el.get_widget())).add(this.rightpalete.el);
+ //this.projectsettings.el.show_all();
+
+ var stage = this.win.objectview.el.get_stage();
+ stage.set_background_color( Clutter.Color.from_string("#000"));
+
+ }
+
+ // ----------- properties adding list...
+ // listener uses the properties
+ public void propsAddInit()
+ {
+ // Add properties
+ this.add_props = new Xcls_WindowAddProp();
+ this.add_props.ref(); /// really?
+ ((Gtk.Container)(this.win.addpropsview.el.get_widget())).add(this.add_props.el);
+ //this.projectsettings.el.show_all();
+
+ var stage = this.win.addpropsview.el.get_stage();
+ stage.set_background_color( Clutter.Color.from_string("#000"));
+
+
+ this.add_props.select.connect( (key,type,skel, etype) => {
+ this.left_props.addProp(etype, key, skel, type);
+ });
+
+ }
+ public void propsAddShow()
+ {
+
+ }
+ public void propsAddHide()
+ {
+
+ }
+
+
+
+
+ // ----------- Add / Edit listener
+ // listener uses the properties
+ //public void listenerInit() { }
+ public void listenerShow()
+ {
+
+ }
+ public void listenerHide()
+ {
+
+ }
+
+ // -------------- codeEditor
+
+ public void codeEditInit()
+ {
+ this.code_editor = new Editor();
+ //this.code_editor.ref(); /// really?
+ ((Gtk.Container)(this.win.codeeditview.el.get_widget())).add(this.code_editor.el);
+
+ this.code_editor.window = this.win;
+ //this.projectsettings.el.show_all();
+
+ var stage = this.win.codeeditview.el.get_stage();
+ stage.set_background_color( Clutter.Color.from_string("#000"));
+ // editor.save...
+
+ this.code_editor.save.connect( () => {
+ this.file.save();
+ this.left_tree.model.updateSelected();
+ if (this.left_tree.getActiveFile().xtype == "Roo" ) {
+ this.window_rooview.requestRedraw();
+ } else {
+ this.window_gladeview.loadFile(this.left_tree.getActiveFile());
+ }
+ // we do not need to call spawn... - as it's already called by the editor?
+
+ });
+
+ }
+
+ // ----------- list of projects on left
+ public void projectListInit()
+ {
+
+ this.left_projects = new Xcls_WindowLeftProjects();
+ this.left_projects.ref();
+ this.win.leftpane.el.pack_start(this.left_projects.el,true, true,0);
+ this.left_projects.el.show_all();
+ this.left_projects.project_selected.connect((proj) => {
+ this.buttonsShowHide();
+ proj.scanDirs();
+ this.clutterfiles.loadProject(proj);
+
+ });
+
+ }
+ // ----------- file view
+
+ public void fileViewInit()
+ {
+ var stage = this.win.rooview.el.get_stage(); // seems odd...
+ this.clutterfiles = new Xcls_ClutterFiles();
+ this.clutterfiles.ref();
+ stage.add_child(this.clutterfiles.el);
+ this.clutterfiles.el.show();
+
+
+ this.clutterfiles.open.connect((file) => {
+ this.fileViewOpen(file);
+ });
+ this.clutterfiles.el.transitions_completed.connect(() => {
+ if (this.state == State.FILES) {
+ this.win.rooview.el.hide();
+ } else {
+ this.clutterfiles.el.hide();
+ }
+
+
+ });
+
+ }
+
+ public void fileDetailsInit()
+ {
+ this.file_details = new Xcls_PopoverFileDetails();
+ this.file_details.mainwindow = this.win;
+ // force it modal to the main window..
+
+ this.file_details.success.connect((project,file) =>
+ {
+ this.fileViewOpen(file);
+ });
+
+ }
+
+ public void fileViewOpen(JsRender.JsRender file, int line = -1)
+ {
+ this.win.project = file.project;
+ this.project = file.project;
+ this.file = file;
+
+
+ if (file.xtype == "PlainFile") {
+ this.switchState (State.CODEONLY);
+ file.loadItems();
+ this.code_editor.show(file, null, "", "");
+ if (line> -1) {
+ this.code_editor.scroll_to_line(line);
+ }
+ } else {
+
+ this.switchState (State.PREVIEW);
+ // this triggers loadItems..
+ this.left_tree.model.loadFile(file);
+ if (file.project.xtype == "Gtk" && line> -1 ) {
+ this.window_gladeview.scroll_to_line(line);
+ }
+
+ }
+
+
+ var ctr= ((Gtk.Container)(this.win.rooview.el.get_widget()));
+ var ctr_p= ((Gtk.Container)(this.win.projecteditview.el.get_widget()));
+
+ if (file.project.xtype == "Roo" ) {
+ ctr.foreach( (w) => { ctr.remove(w); });
+ ctr_p.foreach( (w) => { ctr_p.remove(w); });
+ ctr.add(this.window_rooview.el);
+ ctr_p.add(this.projectsettings.el);
+ if (file.xtype != "PlainFile") {
+ this.window_rooview.loadFile(file);
+ this.window_rooview.el.show_all();
+ }
+ this.projectsettings.el.show_all();
+
+
+ } else {
+ ctr.foreach( (w) => { ctr.remove(w); });
+ ctr_p.foreach( (w) => { ctr_p.remove(w); });
+ ctr.add(this.window_gladeview.el);
+ ctr_p.add(this.vala_projectsettings.el);
+ if (file.xtype != "PlainFile") {
+ this.window_gladeview.loadFile(file);
+ this.window_gladeview.el.show_all();
+ }
+ this.vala_projectsettings.el.show_all();
+ }
+ print("OPEN : " + file.name);
+ if (file.xtype != "PlainFile") {
+ this.win.editpane.el.set_position(this.win.editpane.el.max_position);
+ }
+ this.win.setTitle(file.project.name + " : " + file.name);
+
+
+ }
+
+ // our project properties is different for Roo and Gtk
+ // it would be better to change the above code to use this,
+ public void attachProjectSettings() {
+
+ var ctr_p= ((Gtk.Container)(this.win.projecteditview.el.get_widget()));
+
+ if (this.win.project.xtype == "Roo" ) {
+ ctr_p.foreach( (w) => { ctr_p.remove(w); });
+ ctr_p.add(this.projectsettings.el);
+ this.projectsettings.el.show_all();
+
+ } else {
+ ctr_p.foreach( (w) => { ctr_p.remove(w); });
+ ctr_p.add(this.vala_projectsettings.el);
+ this.vala_projectsettings.el.show_all();
+ }
+ }
+ /*
+ public void fileViewOpenPlain(string fname)
+ {
+
+ this.switchState (State.CODEONLY);
+ this.code_editor.showPlainFile(fname);
+ }
+ */
+
+ // --------- webkit view
+ public void webkitViewInit()
+ {
+ this.window_rooview =new Xcls_WindowRooView();
+ this.window_rooview.main_window = this.win;
+ this.window_rooview.ref();
+ ((Gtk.Container)(this.win.rooview.el.get_widget())).add(this.window_rooview.el);
+ this.window_rooview.el.show_all();
+
+ var stage = this.win.rooview.el.get_stage();
+ stage.set_background_color( Clutter.Color.from_string("#000"));
+ }
+
+ // ------ Gtk - view
+
+ public void gtkViewInit()
+ {
+ this.window_gladeview =new Xcls_GtkView();
+ this.window_gladeview.ref();
+ this.window_gladeview.main_window = this.win;
+ }
+
+ public void easingSaveAll()
+ {
+ this.win.addpropsview.el.save_easing_state();
+ this.win.codeeditview.el.save_easing_state();
+ this.win.objectview.el.save_easing_state();
+ this.win.projecteditview.el.save_easing_state();
+ this.win.rooview.el.save_easing_state();
+ this.clutterfiles.el.save_easing_state();
+
+ }
+ public void easingRestoreAll()
+ {
+ this.win.addpropsview.el.restore_easing_state();
+ this.win.codeeditview.el.restore_easing_state();
+ this.win.objectview.el.restore_easing_state();
+ this.win.projecteditview.el.restore_easing_state();
+ this.win.rooview.el.restore_easing_state();
+ this.clutterfiles.el.restore_easing_state();
+
+ }
+ public void switchState(State new_state)
+ {
+
+ // if the new state and the old state are the same..
+
+ if (new_state == this.state) {
+ return;
+ }
+
+ // stop werid stuff happening
+
+ if (this.state == State.FILES
+ && new_state == State.FILEPROJECT
+ && this.left_projects.getSelectedProject() == null) {
+ return;
+ }
+ // save the easing state of everything..
+ this.easingSaveAll();
+
+ switch (this.state) {
+
+ case State.PREVIEW:
+ if (this.left_tree.getActiveFile() != null) {
+ if (this.left_tree.getActiveFile().xtype == "Roo" ) {
+ this.window_rooview.createThumb();
+ } else {
+ this.window_gladeview.createThumb();
+ }
+ }
+ // normally we are going from preview to another state.
+ // and different windows hide the preview in differnt ways..
+
+ break;
+
+
+ case State.LISTENER:
+ case State.PROP:
+
+ this.win.addpropsview.el.set_scale(0.0f,0.0f);
+ break;
+
+ case State.CODE:
+ this.code_editor.saveContents();
+
+ this.win.codeeditview.el.set_scale(0.0f,0.0f);
+ break;
+
+ case State.CODEONLY:
+ // going from codeonly..
+
+ // enable re-calc of canvas..
+
+ //this.code_editor.saveContents(); << not yet...
+ if (new_state != State.PROJECTCODEONLY) {
+ this.win.rooview.el.show();
+ this.win.leftpane.el.show();
+ this.win.codeeditview.el.set_scale(0.0f,0.0f);
+ } else {
+ this.win.codeeditview.el.set_pivot_point(0.0f,1.0f); // bottom left
+ this.win.codeeditview.el.set_scale(0.5f,0.5f);
+ }
+ while (Gtk.events_pending()) {
+ Gtk.main_iteration();
+ }
+
+ // hides it completely...
+
+ break;
+
+ case State.OBJECT:
+
+ this.win.objectview.el.set_scale(0.0f,0.0f);
+ break;
+
+ case State.FILEPROJECT:
+ case State.PROJECT:
+ case State.PROJECTCODEONLY:
+ if (this.win.project.xtype == "Gtk") {
+ this.vala_projectsettings.save();
+ }
+ if (this.state == State.FILEPROJECT) {
+ this.clutterfiles.el.set_scale(1.0f,1.0f);
+
+ }
+ this.win.projecteditview.el.set_scale(0.0f,0.0f);
+ break;
+
+ case State.FILES: // goes to preview or codeonly...
+ // hide files...
+
+
+ if (new_state == State.FILEPROJECT) {
+
+ this.clutterfiles.el.set_easing_duration(1000);
+ this.clutterfiles.el.set_pivot_point(0.5f,1.0f);
+ this.clutterfiles.el.set_scale(0.5f,0.5f);
+ break;
+ }
+
+ if (new_state == State.CODEONLY) {
+ this.win.rooview.el.hide();
+ } else {
+ this.win.rooview.el.show();
+ }
+
+ this.win.rooview.el.set_easing_duration(1000);
+ this.win.rooview.el.set_rotation_angle(Clutter.RotateAxis.Y_AXIS, 0.0f);
+ this.win.rooview.el.set_scale(1.0f,1.0f);
+ this.win.rooview.el.set_pivot_point(0.5f,0.5f);
+ this.win.rooview.el.set_opacity(0xff);
+
+ this.clutterfiles.el.set_easing_duration(1000);
+ this.clutterfiles.el.set_pivot_point(0.5f,0.5f);
+ this.clutterfiles.el.set_rotation_angle(Clutter.RotateAxis.Y_AXIS, -180.0f);
+ this.clutterfiles.el.set_opacity(0);
+
+
+ //this.clutterfiles.el.hide();
+
+
+ break;
+
+
+ }
+
+ var oldstate =this.state;
+ this.state = new_state;
+
+
+
+ this.buttonsShowHide();
+
+
+ switch (this.state) {
+
+ case State.PREVIEW: // this is the default state when working...
+ this.win.editpane.el.show(); // holder for tree and properties..
+
+
+ this.left_projects.el.hide();
+ if (oldstate != State.FILES) {
+ // it's handled above..
+ print ("changing state to preview from NOT files..");
+
+
+ this.win.rooview.el.set_scale(1.0f,1.0f);
+ }
+
+ break;
+
+
+ case State.LISTENER:
+ // same as prop?
+ case State.PROP:
+ var ae = this.left_tree.getActiveElement();
+ if (ae == null) {
+ this.state = oldstate;
+ this.buttonsShowHide();
+ this.resizeCanvasElements();
+ this.easingRestoreAll();
+ return;
+ }
+ this.add_props.el.show_all();
+ this.add_props.show(
+ Palete.factory(this.win.project.xtype),
+ this.state == State.LISTENER ? "signals" : "props",
+ ae.fqn()
+ );
+
+
+
+
+ // -- FIXME? this needs to be State aware?
+
+ this.win.rooview.el.set_pivot_point(1.0f,0.5f);
+
+ this.win.addpropsview.el.set_scale(1.0f,1.0f);
+ break;
+
+ case State.OBJECT:
+ var n = this.left_tree.getActiveElement();
+
+ if (this.file == null) {
+ this.state =oldstate;
+ this.buttonsShowHide();
+ this.resizeCanvasElements();
+ this.easingRestoreAll();
+ return;
+ }
+
+ if (n == null && this.file.tree != null) {
+ this.state = oldstate;
+ this.buttonsShowHide();
+ this.resizeCanvasElements();
+ this.easingRestoreAll();
+ return;
+ }
+
+ this.rightpalete.el.show_all();
+ this.rightpalete.load(this.left_tree.getActiveFile().palete(), n == null ? "*top" : n.fqn());
+
+
+
+ this.win.rooview.el.set_pivot_point(1.0f,0.5f);
+ this.win.objectview.el.set_scale(1.0f,1.0f);
+
+ break;
+
+
+ case State.CODE:
+ this.win.codeeditview.el.show();
+ this.code_editor.el.show_all();
+ // caller needs to call editor - show....
+ this.win.codeeditview.el.set_scale(1.0f,1.0f);
+ this.win.rooview.el.set_pivot_point(1.0f,0.5f);
+
+ break;
+
+ case State.CODEONLY:
+ // going to codeonly..
+ this.win.codeeditview.el.show();
+ // recalc canvas...
+ //while (Gtk.events_pending()) {
+ // Gtk.main_iteration();
+ //}
+
+ this.win.leftpane.el.hide();
+ this.win.codeeditview.el.show();
+ //while (Gtk.events_pending()) {
+ // Gtk.main_iteration();
+ //}
+
+
+ this.code_editor.el.show_all();
+
+ this.win.codeeditview.el.set_scale(1.0f,1.0f);
+ this.win.rooview.el.set_pivot_point(1.0f,0.5f);
+ break;
+
+ case State.PROJECTCODEONLY:
+ // going to project edit (when in code only)
+
+
+
+ if (this.win.project.xtype == "Roo") {
+ this.projectsettings.el.show_all();
+ this.projectsettings.show(this.win.project);
+ } else {
+ this.vala_projectsettings.el.show_all();
+ this.vala_projectsettings.show((Project.Gtk)this.win.project);
+ }
+
+ this.win.projecteditview.el.set_scale(1.0f,1.0f);
+
+ break;
+
+
+ case State.PROJECT:
+ this.win.rooview.el.set_pivot_point(1.0f,1.0f); // bottom right..
+
+ if (this.win.project.xtype == "Roo") {
+ this.projectsettings.el.show_all();
+ this.projectsettings.show(this.win.project);
+ } else {
+ this.vala_projectsettings.el.show_all();
+ this.vala_projectsettings.show((Project.Gtk)this.win.project);
+ }
+
+ this.win.projecteditview.el.set_scale(1.0f,1.0f);
+
+ break;
+
+ case State.FILEPROJECT:
+ var pr = this.left_projects.getSelectedProject();
+
+ this.win.project = pr;
+
+ this.attachProjectSettings();
+ print("FIlE PROJECT - show %s\n", pr.xtype);
+
+ if (pr.xtype == "Roo") {
+ this.projectsettings.el.show_all();
+ this.projectsettings.show(this.win.project);
+ } else {
+ this.vala_projectsettings.el.show_all();
+ this.vala_projectsettings.show((Project.Gtk)this.win.project);
+ }
+
+ this.win.projecteditview.el.set_scale(1.0f,1.0f);
+
+ break;
+
+ case State.FILES: // can only get here from PREVIEW (or code-only) state.. in theory..
+
+
+ this.win.editpane.el.hide(); // holder for tree and properties..
+
+ this.left_projects.el.show();
+
+ // rotate the preview to hidden...
+ this.win.rooview.el.set_easing_duration(1000);
+ this.win.rooview.el.set_pivot_point(0.5f,0.5f);
+ this.win.rooview.el.set_rotation_angle(Clutter.RotateAxis.Y_AXIS, 180.0f);
+ this.win.rooview.el.set_opacity(0);
+
+
+
+
+ if (this.win.project != null) {
+ this.left_projects.selectProject(this.win.project);
+ }
+
+
+ this.clutterfiles.el.show();
+
+ this.clutterfiles.el.set_easing_duration(1000);
+ this.clutterfiles.el.set_pivot_point(0.5f,0.5f);
+ this.clutterfiles.el.set_rotation_angle(Clutter.RotateAxis.Y_AXIS, 0.0f);
+ this.clutterfiles.el.set_opacity(0xff);
+
+
+
+ break;
+
+
+ }
+ this.resizeCanvasElements();
+ this.easingRestoreAll();
+
+ // run the animation.. - then load files...
+ GLib.Timeout.add(500, () =>{
+ this.resizeCanvasElements();
+ return false;
+ });
+
+ }
+
+ public int redraw_count = 0;
+ public void resizeCanvas() // called by window resize .. delays redraw
+ {
+ var rc = this.redraw_count;
+ this.redraw_count = 2;
+ if (rc == 0) {
+ GLib.Timeout.add(100, () =>{
+ return this.resizeCanvasQueue();
+ });
+ }
+ }
+ public bool resizeCanvasQueue()
+ {
+ //print("WindowState.resizeCanvasQueue %d\n", this.redraw_count);
+
+ if (this.redraw_count < 1) {
+ return false; // should not really happen...
+ }
+
+
+ this.redraw_count--;
+
+ if (this.redraw_count > 0) {
+ return true; // do it again in 1 second...
+ }
+ // got down to 0 or -1....
+ this.redraw_count = 0;
+ this.resizeCanvasElements();
+ return false;
+
+ }
+ public void resizeCanvasElements()
+ {
+ Gtk.Allocation alloc;
+ this.win.clutterembed.el.get_allocation(out alloc);
+
+ // print("WindowState.resizeCanvasElements\n");
+ if (!this.children_loaded || this.win.clutterembed == null) {
+ print("WindowState.resizeCanvasElements = ingnore not loaded or no clutterfiles\n");
+ return;
+ }
+
+ var avail = alloc.width < 50.0f ? 0 : alloc.width - 50.0f;
+ var palsize = avail < 300.0f ? avail : 300.0f;
+
+
+ // -------- code edit min 600
+
+ var codesize = avail < 800.0f ? avail : 800.0f;
+
+
+ //print("set code size %f\n", codesize);
+
+
+
+ switch ( this.state) {
+ case State.PREVIEW:
+
+ this.win.rooview.el.set_size(alloc.width-50, alloc.height);
+ break;
+
+ case State.FILES:
+ this.clutterfiles.set_size(alloc.width-50, alloc.height);
+ break;
+
+ case State.PROJECT:
+
+ this.win.projecteditview.el.set_size(alloc.width-50, alloc.height / 2.0f);
+
+ // this.win.rooview.el.save_easing_state();
+ //this.win.rooview.el.set_size(alloc.width / 2.0f, alloc.height / 2.0f);
+
+ this.win.rooview.el.set_scale(0.5f, 0.5f);
+ //this.win.rooview.el.restore_easing_state();
+ break;
+
+ case State.CODE:
+ this.win.codeeditview.el.set_size(codesize, alloc.height);
+ var scale = avail > 0.0f ? (avail - codesize -10 ) / avail : 0.0f;
+ //this.win.rooview.el.save_easing_state();
+
+ this.win.rooview.el.set_scale(scale,scale);
+ // this.win.rooview.el.restore_easing_state();
+ break;
+
+ case State.CODEONLY:
+ this.win.codeeditview.el.set_size(codesize, alloc.height);
+ var scale = avail > 0.0f ? (avail - codesize -10 ) / avail : 0.0f;
+ //this.win.rooview.el.save_easing_state();
+ this.win.rooview.el.hide();
+ this.win.rooview.el.set_scale(scale,scale);
+ // this.win.rooview.el.restore_easing_state();
+ break;
+ case State.PROP:
+ case State.LISTENER:
+ this.win.addpropsview.el.set_size(palsize, alloc.height);
+ var scale = avail > 0.0f ? (avail - palsize -10 ) / avail : 0.0f;
+ this.win.rooview.el.set_scale(scale,scale);
+ break;
+
+ case State.OBJECT:
+ this.win.objectview.el.set_size(palsize, alloc.height);
+ var scale = avail > 0.0f ? (avail - palsize -10 ) / avail : 0.0f;
+ //this.win.rooview.el.save_easing_state();
+ this.win.rooview.el.set_scale(scale,scale);
+ // this.win.rooview.el.restore_easing_state();
+ break;
+ }
+ }
+
+ // -- buttons show hide.....
+
+ public void buttonsShowHide()
+ {
+ // basically hide everything, then show the relivant..
+
+ // top bar btns
+ this.win.openbtn.el.hide();
+ this.win.openbackbtn.el.hide();
+
+ this.win.backbutton.el.hide();
+
+
+ this.win.editfilebutton.el.hide();
+ this.win.projecteditbutton.el.hide();
+
+
+ this.win.objectshowbutton.el.hide(); // add objects
+ this.win.addpropbutton.el.hide();
+ this.win.addlistenerbutton.el.hide();
+
+
+
+ this.win.addprojectbutton.el.hide();
+ this.win.addfilebutton.el.hide();
+ this.win.delprojectbutton.el.hide();
+
+ this.win.search_entry.el.hide();
+ this.win.search_results.el.hide();
+ switch (this.state) {
+
+ case State.PREVIEW: // this is the default state when working...
+
+
+ this.win.editfilebutton.el.show();
+ this.win.projecteditbutton.el.show();
+
+
+
+ this.win.objectshowbutton.el.show(); // add objects
+ this.win.addpropbutton.el.show();
+ this.win.addlistenerbutton.el.show();
+ this.win.search_entry.el.show();
+
+ this.win.openbtn.el.show();
+
+ break;
+
+ case State.CODEONLY:
+ this.win.openbtn.el.show();
+ this.win.projecteditbutton.el.show();
+ this.win.search_entry.el.show();
+ break;
+
+ case State.CODE:
+ this.win.search_entry.el.show();
+ this.win.backbutton.el.show();
+ this.win.objectshowbutton.el.show(); // add objects ?? can you do this from here?
+ this.win.addpropbutton.el.show();
+ this.win.addlistenerbutton.el.show();
+ break;
+ // continue thru..
+ case State.PROP:
+ case State.LISTENER:
+ case State.OBJECT:
+
+ this.win.backbutton.el.show();
+ this.win.objectshowbutton.el.show(); // add objects
+ this.win.addpropbutton.el.show();
+ this.win.addlistenerbutton.el.show();
+ break;
+
+ case State.PROJECT:
+ case State.FILEPROJECT:
+ case State.PROJECTCODEONLY:
+ // anything else?
+ this.win.backbutton.el.show();
+
+ break;
+
+
+ case State.FILES:
+ if (this.left_projects.getSelectedProject() != null ) {
+ if (this.left_tree.getActiveFile() != null) {
+
+ this.win.openbackbtn.el.show();
+ }
+ this.win.addfilebutton.el.show();
+ this.win.search_entry.el.show();
+ this.win.projecteditbutton.el.show();
+ }
+
+
+ this.win.addprojectbutton.el.show();
+ this.win.delprojectbutton.el.show();
+
+
+
+
+ break;
+ }
+
+
+
+ }
+
+
+ public void showCompileResult(Json.Object obj)
+ {
+ // vala has finished compiling...
+ print("vala compiled");
+ var generator = new Json.Generator ();
+ var n = new Json.Node(Json.NodeType.OBJECT);
+ n.init_object(obj);
+ generator.set_root (n);
+ print("result :%s", generator.to_data (null));
+
+
+ var buf = this.code_editor.buffer;
+ buf.check_running = false;
+ var has_errors = false;
+
+ if (obj.has_member("ERR-TOTAL")) {
+ if (obj.get_int_member("ERR-TOTAL")> 0) {
+ has_errors = true;
+ }
+ this.win.statusbar_errors.setNotices( obj.get_object_member("ERR") , (int) obj.get_int_member("ERR-TOTAL"));
+ } else {
+ this.win.statusbar_errors.setNotices( new Json.Object() , 0);
+ }
+
+ if (obj.has_member("WARN-TOTAL")) {
+
+ this.win.statusbar_warnings.setNotices(obj.get_object_member("WARN"), (int) obj.get_int_member("WARN-TOTAL"));
+ } else {
+ this.win.statusbar_warnings.setNotices( new Json.Object() , 0);
+
+ }
+ if (obj.has_member("DEPR-TOTAL")) {
+
+ this.win.statusbar_depricated.setNotices( obj.get_object_member("DEPR"), (int) obj.get_int_member("DEPR-TOTAL"));
+
+ } else {
+ this.win.statusbar_depricated.setNotices( new Json.Object(),0);
+ }
+ if (this.state == State.CODE || this.state == State.PROJECTCODEONLY) {
+ buf.highlightErrorsJson("ERR", obj);
+ buf.highlightErrorsJson("WARN", obj);
+ buf.highlightErrorsJson("DEPR", obj);
+ }
+
+ this.win.statusbar_compilestatus_label.el.hide();
+ this.win.statusbar_run.el.hide();
+ if (!has_errors) {
+ this.win.statusbar_compilestatus_label.el.show();
+ this.win.statusbar_run.el.show();
+ }
+ if (this.file.xtype == "Gtk") {
+ // not sure how this is working ok? - as highlighting is happening on the vala files at present..
+ var gbuf = this.window_gladeview.sourceview;
+ gbuf.highlightErrorsJson("ERR", obj);
+ gbuf.highlightErrorsJson("WARN", obj);
+ gbuf.highlightErrorsJson("DEPR", obj);
+
+ if (!has_errors) {
+ this.win.statusbar_run.el.show();
+ }
+
+ }
+
+ if (this.file.xtype == "Gtk") {
+ // not sure how this is working ok? - as highlighting is happening on the vala files at present..
+ var gbuf = this.window_rooview.sourceview;
+ gbuf.highlightErrorsJson("ERR", obj);
+ gbuf.highlightErrorsJson("WARN", obj);
+ gbuf.highlightErrorsJson("DEPR", obj);
+
+ }
+
+ this.last_compile_result = obj;
+
+
+ }
+
+}
+
+
--- /dev/null
+[
+ {
+ "name" : "builder",
+ "compile_flags" : "",
+ "execute_args" : "",
+ "target_bin" : "/tmp/builder",
+ "sources" : [
+ "../Builder4/About.vala",
+ "../Builder4/ClutterFiles.vala",
+ "../Builder4/DialogConfirm.vala",
+ "../Builder4/DialogPluginWebkit.vala",
+ "../Builder4/DialogSaveModule.vala",
+ "../Builder4/DialogSaveTemplate.vala",
+ "../Builder4/DialogTemplateSelect.vala",
+ "../Builder4/Editor.vala",
+ "../Builder4/EditProject.vala",
+ "../Builder4/FakeServer.vala",
+ "../Builder4/GtkView.vala",
+ "../Builder4/MainWindow.vala",
+ "../Builder4/ProjectSettings.vala",
+ "../Builder4/RooProjectProperties.vala",
+ "../Builder4/StandardErrorDialog.vala",
+ "../Builder4/ValaProjectSettings.vala",
+ "../Builder4/WindowAddProp.vala",
+ "../Builder4/WindowLeftProjects.vala",
+ "../Builder4/WindowLeftProps.vala",
+ "../Builder4/WindowLeftTree.vala",
+ "../Builder4/WindowRightPalete.vala",
+ "../Builder4/WindowRooView.vala",
+ "../Builder4/WindowState.vala",
+ "../Builder4",
+ "../JsRender/Gtk.vala",
+ "../JsRender/JsRender.vala",
+ "../JsRender/Lang.vala",
+ "../JsRender/NodeToGlade.vala",
+ "../JsRender/NodeToGtk.vala",
+ "../JsRender/NodeToJs.vala",
+ "../JsRender/NodeToVala.vala",
+ "../JsRender/Node.vala",
+ "../JsRender/RooDatabase.vala",
+ "../JsRender/Roo.vala",
+ "../JsRender",
+ "../Palete/Gir.vala",
+ "../Palete/Gtk.vala",
+ "../Palete/Javascript.vala",
+ "../Palete/Palete.vala",
+ "../Palete/RooDatabase.vala",
+ "../Palete/Roo.vala",
+ "../Palete/ValaSource.vala",
+ "../Palete",
+ "../Project/Gtk.vala",
+ "../Project/Project.vala",
+ "../Project/Roo.vala",
+ "../Project",
+ "../../src/Application.vala",
+ "../../src/Main.vala",
+ "../../src/Resources.vala",
+ "../../src",
+ "../c/jscore_object_call_as_function.c",
+ "../Palete/GirObject.vala",
+ "../Palete/VapiParser.vala",
+ "../Builder4/PopoverFileDetails.vala",
+ "../../src/Spawn.vala",
+ "../Builder4/ValaCompileErrors.vala",
+ "../Palete/ValaSourceCompiler.vala",
+ "../JsRender/PlainFile.vala",
+ "../Builder4/ValaCompileResults.vala",
+ "../Palete/CompletionProvider.vala",
+ "../Builder4/PopoverProperty.vala"
+ ],
+ "packages" : [
+ ]
+ },
+ {
+ "name" : "_default_",
+ "compile_flags" : "--thread -X -lm --target-glib=2.32 -g --pkg roojspacker-1.0",
+ "execute_args" : "",
+ "target_bin" : "",
+ "sources" : [
+ "../../../app.Builder.js",
+ "../Builder4",
+ "../../src",
+ "../JsRender",
+ "../Palete",
+ "../Project",
+ "../vapi",
+ "../c",
+ "../..//tests",
+ "../..//pixmaps"
+ ],
+ "packages" : [
+ "gdk-3.0",
+ "gtk+-3.0",
+ "gtksourceview-3.0",
+ "libgda-5.0",
+ "clutter-gtk-1.0",
+ "glib-2.0",
+ "gobject-introspection-1.0",
+ "gobject-2.0",
+ "javascriptcore",
+ "json-glib-1.0",
+ "libxml-2.0",
+ "libsoup-2.4",
+ "libvala-0.26",
+ "webkit2gtk-4.0",
+ "gee-1.0",
+ "posix",
+ "libvala-0.24",
+ "libvala-0.30",
+ "librsvg-2.0",
+ "libvala-0.32",
+ "roojspacker-1.0"
+ ]
+ }
+]
\ No newline at end of file
--- /dev/null
+/**
+ *
+ * this is the code represents a File when using the Gtk view..
+ *
+ * It ues NodeToGtk
+ *
+ *
+ */
+
+namespace JsRender {
+
+
+
+ int gid = 1;
+
+
+ public class Gtk : JsRender
+ {
+
+
+ public Gtk(Project.Project project, string path) {
+
+ base( project, path);
+ this.xtype = "Gtk";
+ this.language = "vala";
+
+
+ //this.items = false;
+ //if (cfg.json) {
+ // var jstr = JSON.parse(cfg.json);
+ // this.items = [ jstr ];
+ // //console.log(cfg.items.length);
+ // delete cfg.json; // not needed!
+ // }
+
+
+
+ // super?!?!
+ this.id = "file-gtk-%d".printf(gid++);
+ //console.dump(this);
+ // various loader methods..
+
+ // Class = list of arguments ... and which property to use as a value.
+
+
+
+
+ }
+
+
+ /*
+ setNSID : function(id)
+ {
+
+ this.items[0]['*class'] = id;
+
+
+ },
+ getType: function() {
+ return 'Gtk';
+ },
+ */
+
+ public override void removeFiles() {
+ var js = GLib.Path.get_dirname(this.path) +"/" + name + ".js";
+ if (FileUtils.test(js, FileTest.EXISTS)) {
+ GLib.FileUtils.remove(js);
+ }
+ var vala = GLib.Path.get_dirname(this.path) +"/" + name + ".vala";
+ if (FileUtils.test(vala, FileTest.EXISTS)) {
+ GLib.FileUtils.remove(vala);
+ }
+ }
+
+ public override void loadItems() throws GLib.Error // : function(cb, sync) == original was async.
+ {
+
+ print("load Items!\n");
+ if (this.tree != null) {
+ this.loaded = true;
+
+ return;
+ }
+ /*
+ print("load: %s\n" , this.path);
+ if (!GLib.FileUtils.test(this.path, GLib.FileTest.EXISTS)) {
+ // new file?!?
+ this.tree = null;
+ this.loaded = true;
+ return;
+ }
+ */
+
+ var pa = new Json.Parser();
+ pa.load_from_file(this.path);
+ var node = pa.get_root();
+
+ if (node.get_node_type () != Json.NodeType.OBJECT) {
+ throw new Error.INVALID_FORMAT ("Unexpected element type %s", node.type_name ());
+ }
+ var obj = node.get_object ();
+
+ this.name = obj.get_string_member("name");
+ this.parent = obj.get_string_member("parent");
+ this.title = obj.get_string_member("title");
+
+ if (obj.has_member("build_module")) { // should check type really..
+ this.build_module = obj.get_string_member("build_module");
+ }
+
+ // load items[0] ??? into tree...
+ var bjs_version_str = this.jsonHasOrEmpty(obj, "bjs-version");
+ bjs_version_str = bjs_version_str == "" ? "1" : bjs_version_str;
+
+ if (obj.has_member("items")
+ &&
+ obj.get_member("items").get_node_type() == Json.NodeType.ARRAY
+ &&
+ obj.get_array_member("items").get_length() > 0
+ ) {
+ var ar = obj.get_array_member("items");
+ var tree_base = ar.get_object_element(0);
+ this.tree = new Node();
+ this.tree.loadFromJson(tree_base, int.parse(bjs_version_str));
+
+ }
+ NodeToVala.mungeFile(this); // force line numbering..
+ this.loaded = true;
+
+ }
+
+
+
+ public override string toSourcePreview()
+ {
+ return "";
+ }
+ public override void setSource(string str) {}
+
+ public override string toSourceCode() // no seed support currently.
+ {
+ return NodeToVala.mungeFile(this);
+ }
+
+ // this is only used by dumping code...
+ public override string toSource() // no seed support currently.
+ {
+
+
+ /*
+ if (this.tree == null) {
+ return "";
+ }
+
+ // var data = JSON.parse(JSON.stringify(this.items[0]));
+ // we should base this on the objects in the tree really..
+ string[] inc = { "Gtk", "Gdk", "Pango", "GLib", "Gio", "GObject",
+ "GtkSource", "WebKit", "Vte" }; //, "GtkClutter" , "Gdl"];
+ var src = "";
+
+ for (var i=0; i< inc.length; i++) {
+ var e = inc[i];
+ src += e+" = imports.gi." + e +";\n";
+ }
+
+ src += "console = imports.console;\n"; // path?!!?
+ src += "XObject = imports.XObject.XObject;\n"; // path?!!?
+
+
+ src += this.name + "=new XObject("+ this.mungeToString(" ") + ");\n";
+ src += this.name + ".init();\n";
+ // register it in the cache
+ src += "XObject.cache['/" + this.name + "'] = " + this.name + ";\n";
+ return src;
+ */
+ return "";
+
+
+ }
+
+ public override void save() {
+ this.saveBJS();
+ // this.saveJS(); - disabled at present.. project settings will probably enable this later..
+
+ this.saveVala();
+ }
+ // ignore these calls.
+ public override void saveHTML ( string html ) {}
+
+
+ /**
+ * saveJS
+ *
+ * save as a javascript file. - not used currently
+ * why is this not save...???
+ *
+
+
+ void saveJS()
+ {
+
+ var fn = GLib.Path.get_dirname(this.path) + "/" + this.name + ".js";
+ print("WRITE :%s\n " , fn);
+ this.writeFile(fn, this.toSource());
+
+ }
+ */
+ void saveVala()
+ {
+ if (this.tree == null) {
+ return;
+ }
+ var fn = GLib.Path.get_dirname(this.path) + "/" + this.name + ".vala";
+ print("WRITE :%s\n " , fn);
+ this.writeFile(fn, NodeToVala.mungeFile(this));
+
+
+ }
+ /*
+ valaCompileCmd : function()
+ {
+
+ var fn = '/tmp/' + this.name + '.vala';
+ print("WRITE : " + fn);
+ File.write(fn, this.toVala(true));
+
+
+
+ return ["valac",
+ "--pkg", "gio-2.0",
+ "--pkg" , "posix" ,
+ "--pkg" , "gtk+-3.0",
+ "--pkg", "libnotify",
+ "--pkg", "gtksourceview-3.0",
+ "--pkg", "libwnck-3.0",
+ fn , "-o", "/tmp/" + this.name];
+
+
+
+
+ },
+ */
+
+
+ string getHelpUrl(string cls)
+ {
+ return "http://devel.akbkhome.com/seed/" + cls + ".html";
+ }
+ public override void findTransStrings(Node? node )
+ {
+ // not yet..
+ }
+
+
+
+
+
+
+ }
+}
+
+
+
--- /dev/null
+//<Script type="text/javascript">
+
+namespace JsRender {
+
+
+ public errordomain Error {
+ INVALID_FORMAT,
+ RENAME_FILE_EXISTS
+ }
+
+ public abstract class JsRender : Object {
+ /**
+ * @cfg {Array} doubleStringProps list of properties that can be double quoted.
+ */
+ public Gee.ArrayList<string> doubleStringProps;
+
+ public string id;
+ public string name; // is the JS name of the file.
+ public string fullname;
+ public string path; // is the full path to the file.
+ public string parent; // JS parent.
+ public string region; // RooJS - insert region.
+
+ public string title; // a title.. ?? nickname.. ??? -
+ public string build_module; // module to build if we compile (or are running tests...)
+
+
+ public string permname;
+ public string language;
+ public string content_type;
+ public string modOrder;
+ public string xtype;
+ public uint64 webkit_page_id; // set by webkit view - used to extract extension/etc..
+
+ public Project.Project project;
+ //Project : false, // link to container project!
+
+ public Node tree; // the tree of nodes.
+
+ public GLib.List<JsRender> cn; // child files.. (used by project ... should move code here..)
+
+ public bool hasParent;
+
+ public bool loaded;
+
+ public Gee.HashMap<string,string> transStrings; // map of md5 -> string.
+
+
+ public signal void changed (Node? node, string source);
+
+
+ public signal void compile_notice(string type, string file, int line, string message);
+ /**
+ * UI componenets
+ *
+ */
+ //public Xcls_Editor editor;
+
+
+
+ public JsRender(Project.Project project, string path) {
+
+ this.cn = new GLib.List<JsRender>();
+ this.path = path;
+ this.project = project;
+ this.hasParent = false;
+ this.parent = "";
+ this.tree = null;
+ this.title = "";
+ this.region = "";
+ this.permname = "";
+ this.modOrder = "";
+ this.language = "";
+ this.content_type = "";
+ this.build_module = "";
+ this.loaded = false;
+ //print("JsRender.cto() - reset transStrings\n");
+ this.transStrings = new Gee.HashMap<string,string> ();
+
+ // should use basename reallly...
+
+ var ar = this.path.split("/");
+ // name is in theory filename without .bjs (or .js eventually...)
+ try {
+ Regex regex = new Regex ("\\.(bjs|js)$");
+
+ this.name = ar.length > 0 ? regex.replace(ar[ar.length-1],ar[ar.length-1].length, 0 , "") : "";
+ } catch (GLib.Error e) {
+ this.name = "???";
+ }
+ this.fullname = (this.parent.length > 0 ? (this.parent + ".") : "" ) + this.name;
+
+ this.doubleStringProps = new Gee.ArrayList<string>();
+
+ }
+
+ public void renameTo(string name) throws Error
+ {
+ if (this.xtype == "PlainFile") {
+ return;
+ }
+ var bjs = GLib.Path.get_dirname(this.path) +"/" + name + ".bjs";
+ if (FileUtils.test(bjs, FileTest.EXISTS)) {
+ throw new Error.RENAME_FILE_EXISTS("File exists %s\n",name);
+ }
+ GLib.FileUtils.remove(this.path);
+ this.removeFiles();
+ // remove other files?
+
+ this.name = name;
+ this.path = bjs;
+
+ }
+
+
+
+ // not sure why xt is needed... -> project contains xtype..
+
+ public static JsRender factory(string xt, Project.Project project, string path) throws Error
+ {
+
+ switch (xt) {
+ case "Gtk":
+ return new Gtk(project, path);
+ case "Roo":
+ return new Roo(project, path);
+ case "PlainFile":
+ return new PlainFile(project, path);
+ }
+ throw new Error.INVALID_FORMAT("JsRender Factory called with xtype=%s", xt);
+ //return null;
+ }
+
+ public string toJsonString()
+ {
+ if (this.xtype == "PlainFile") {
+ return "";
+ }
+ var generator = new Json.Generator ();
+ generator.indent = 4;
+ generator.pretty = true;
+ var node = new Json.Node(Json.NodeType.OBJECT);
+ node.set_object(this.toJsonObject());
+ generator.set_root(node);
+ return generator.to_data(null);
+ }
+
+ public string nickType()
+ {
+ var ar = this.name.split(".");
+ string[] ret = {};
+ for (var i =0; i < ar.length -1; i++) {
+ ret += ar[i];
+ }
+ return string.joinv(".", ret);
+
+ }
+ public string nickName()
+ {
+ var ar = this.name.split(".");
+ return ar[ar.length-1];
+
+ }
+
+
+ public string getIconFileName(bool return_default)
+ {
+
+ var m5 = GLib.Checksum.compute_for_string(GLib.ChecksumType.MD5,this.path);
+
+ var dir = GLib.Environment.get_home_dir() + "/.Builder/icons";
+ try {
+ if (!FileUtils.test(dir, FileTest.IS_DIR)) {
+ File.new_for_path(dir).make_directory();
+ }
+ } catch (GLib.Error e) {
+ // eakk.. what to do here...
+ }
+ var fname = dir + "/" + m5 + ".png";
+
+ if (!return_default) {
+ print("getIconFileName return %s\n", fname);
+ return fname;
+ }
+
+ if (FileUtils.test(fname, FileTest.EXISTS)) {
+ print("getIconFileName return %s\n", fname);
+ return fname;
+ }
+ // we need to create this somehow...
+ print("getIconFileName return %s\n", GLib.Environment.get_home_dir() + "/.Builder/test.jpg");
+ return GLib.Environment.get_home_dir() + "/.Builder/test.jpg";
+
+ }
+
+
+ public void saveBJS()
+ {
+ if (!this.loaded) {
+ return;
+ }
+ if (this.xtype == "PlainFile") {
+ return;
+ }
+ var generator = new Json.Generator ();
+ generator.indent = 1;
+ generator.pretty = true;
+ var node = new Json.Node(Json.NodeType.OBJECT);
+ node.set_object(this.toJsonObject());
+ generator.set_root(node);
+
+ print("WRITE :%s\n " , this.path);// + "\n" + JSON.stringify(write));
+ try {
+ this.writeFile(this.path, generator.to_data(null));
+ //generator.to_file(this.path);
+ } catch(Error e) {
+ print("Save failed");
+ }
+ }
+
+
+
+ public abstract void loadItems() throws GLib.Error;
+
+
+
+
+ public string jsonHasOrEmpty(Json.Object obj, string key) {
+ return obj.has_member(key) ?
+ obj.get_string_member(key) : "";
+ }
+
+
+ public Json.Object toJsonObject ()
+ {
+
+
+ var ret = new Json.Object();
+ if (this.xtype == "PlainFile") {
+ return ret;
+ }
+
+ //ret.set_string_member("id", this.id); // not relivant..
+ ret.set_string_member("name", this.name);
+ ret.set_string_member("parent", this.parent == null ? "" : this.parent);
+ ret.set_string_member("title", this.title == null ? "" : this.title);
+ ret.set_string_member("path", this.path);
+ //ret.set_string_member("items", this.items);
+ ret.set_string_member("permname", this.permname == null ? "" : this.permname);
+ ret.set_string_member("modOrder", this.modOrder == null ? "" : this.modOrder);
+ if (this.project.xtype == "Gtk") {
+ ret.set_string_member("build_module", this.build_module == null ? "" : this.build_module);
+ }
+
+ if (this.transStrings.size > 0) {
+ var tr = new Json.Object();
+ var iter = this.transStrings.map_iterator();
+ while (iter.next()) {
+ tr.set_string_member(iter.get_value(), iter.get_key());
+ }
+ ret.set_object_member("strings", tr);
+ }
+
+
+
+ var ar = new Json.Array();
+ // empty files do not have a tree.
+ if (this.tree != null) {
+ ar.add_object_element(this.tree.toJsonObject());
+ }
+ ret.set_array_member("items", ar);
+
+ return ret;
+ }
+
+
+
+ public string getTitle ()
+ {
+ if (this.title.length > 0) {
+ return this.title;
+ }
+ var a = this.path.split("/");
+ return a[a.length-1];
+ }
+ public string getTitleTip()
+ {
+ if (this.title.length > 0) {
+ return "<b>" + this.title + "</b> " + this.path;
+ }
+ return this.path;
+ }
+ /*
+ sortCn: function()
+ {
+ this.cn.sort(function(a,b) {
+ return a.path > b.path;// ? 1 : -1;
+ });
+ },
+ */
+ // should be in palete provider really..
+
+
+ public Palete.Palete palete()
+ {
+ // error on plainfile?
+ return Palete.factory(this.project.xtype);
+
+ }
+
+ public string guessName(Node ar) // turns the object into full name.
+ {
+ // eg. xns: Roo, xtype: XXX -> Roo.xxx
+ if (!ar.hasXnsType()) {
+ return "";
+ }
+
+ return ar.get("* xns") + "." + ar.get("* xtype");
+
+
+ }
+ /**
+ * non-atomic write (replacement for put contents, as it creates temporary files.
+ */
+ public void writeFile(string path, string contents) throws GLib.IOError, GLib.Error
+ {
+
+
+ var f = GLib.File.new_for_path(path);
+ var data_out = new GLib.DataOutputStream(
+ f.replace(null, false, GLib.FileCreateFlags.NONE, null)
+ );
+ data_out.put_string(contents, null);
+ data_out.close(null);
+ }
+
+
+
+ public Node? lineToNode(int line)
+ {
+ if (this.tree == null) {
+ return null;
+ }
+ return this.tree.lineToNode(line);
+
+
+ }
+
+
+ public abstract void save();
+ public abstract void saveHTML(string html);
+ public abstract string toSource() ;
+ public abstract string toSourceCode() ; // used by commandline tester..
+ public abstract void setSource(string str);
+ public abstract string toSourcePreview() ;
+ public abstract void removeFiles() ;
+ public abstract void findTransStrings(Node? node );
+ }
+
+}
+
--- /dev/null
+//<script type="text/javscript">
+
+/**
+ @namespace
+*/
+// test
+// valac gitlive/app.Builder.js/JsRender/Lang.vala --pkg gee-1.0 -o /tmp/Lang ;/tmp/Lang
+
+/*
+void main () {
+ new JsRender.Lang_Class();
+ print(JsRender.Lang.keyword("delete") + "\n");
+}
+*/
+
+
+namespace JsRender {
+ public Lang_Class Lang = null;
+
+ public class Lang_Class : Object {
+
+ GLib.List<string> coreObjects;
+ Gee.HashMap<string,string> whitespaceNames;
+ Gee.HashMap<string,string> newlineNames;
+ Gee.HashMap<string,string> keywordNames;
+ Gee.HashMap<string,string> puncNames;
+ Gee.HashMap<string,string> matchingNames;
+ public Gee.ArrayList<string> match_strings;
+
+ public Lang_Class ()
+ {
+ if (Lang != null) {
+ //print("lang not null\n");
+ return;
+ }
+ //print("init\n");
+ this.init();
+ //print("init Lang");
+ Lang = this;
+
+ }
+
+
+ public bool isBuiltin(string name) {
+ return (this.coreObjects.index(name) > -1);
+ }
+
+ public string whitespace (string ch) {
+ return this.whitespaceNames.get(ch);
+ }
+ public string newline (string ch) {
+ return this.newlineNames.get(ch);
+ }
+ public string keyword(string word) {
+ return this.keywordNames.get("="+word);
+ }
+
+ public string matching(string name) {
+ return this.matchingNames.get(name);
+ }
+
+ public bool isKeyword(string word) {
+ return this.keywordNames.get("=" + word) != null;
+
+ }
+ public string punc (string ch) {
+ return this.puncNames[ch];
+ }
+
+ public bool isNumber (string str) {
+ return Regex.match_simple("^(\\.[0-9]|[0-9]+\\.|[0-9])[0-9]*([eE][+-][0-9]+)?$",str);
+ }
+
+ public bool isHexDec (string str) {
+ return Regex.match_simple("^0x[0-9A-F]+$",str);
+ }
+
+ public bool isWordChar (string str) {
+ return Regex.match_simple("^[a-zA-Z0-9$_.]+$", str);
+ }
+
+ public bool isSpace (string str) {
+ return this.whitespaceNames.get(str) != null;
+ }
+
+ public bool isNewline (string str) {
+ return this.newlineNames.get(str) != null;
+ }
+ public bool isBoolean (string str) {
+ var ss = str.down();
+ return ss == "false" || ss == "true";
+ }
+
+
+
+
+ void init() {
+
+ this.coreObjects = new GLib.List<string>();
+
+ this.whitespaceNames = new Gee.HashMap<string,string>();
+ this.newlineNames = new Gee.HashMap<string,string>();
+ this.keywordNames = new Gee.HashMap<string,string>();
+ this.puncNames = new Gee.HashMap<string,string>();
+ this.matchingNames = new Gee.HashMap<string,string>();
+ this.match_strings = new Gee.ArrayList<string>();
+
+
+ string[] co = { "_global_", "Array", "Boolean", "Date", "Error",
+ "Function", "Math", "Number", "Object", "RegExp", "String" };
+ for(var i =0; i< co.length;i++ ) {
+ this.coreObjects.append(co[i]);
+ this.match_strings.add(co[i]);
+ }
+ string[] ws = {
+ " :SPACE",
+ "\f:FORMFEED",
+ "\t:TAB" //,
+ // "\u0009:UNICODE_TAB",
+ // "\u000A:UNICODE_NBR",
+ // "\u0008:VERTICAL_TAB"
+ };
+ for(var i =0; i< ws.length;i++ ) {
+ var x = ws[i].split(":");
+ this.whitespaceNames.set(x[0],x[1]);
+ }
+
+ ws = {
+ "\n:NEWLINE",
+ "\r:RETURN" //,
+ // "\u000A:UNICODE_LF",
+ // "\u000D:UNICODE_CR",
+ // "\u2029:UNICODE_PS",
+ // "\u2028:UNICODE_LS"
+ };
+ for(var i =0; i< ws.length;i++ ) {
+ var x = ws[i].split(":");
+ this.newlineNames.set(x[0],x[1]);
+ }
+ ws = {
+ "=break:BREAK",
+ "=case:CASE",
+ "=catch:CATCH",
+ "=const:VAR",
+ "=continue:CONTINUE",
+ "=default:DEFAULT",
+ "=delete:DELETE",
+ "=do:DO",
+ "=else:ELSE",
+ "=false:FALSE",
+ "=finally:FINALLY",
+ "=for:FOR",
+ "=function:FUNCTION",
+ "=if:IF",
+ "=in:IN",
+ "=instanceof:INSTANCEOF",
+ "=new:NEW",
+ "=null:NULL",
+ "=return:RETURN",
+ "=switch:SWITCH",
+ "=this:THIS",
+ "=throw:THROW",
+ "=true:TRUE",
+ "=try:TRY",
+ "=typeof:TYPEOF",
+ "=void:VOID",
+ "=while:WHILE",
+ "=with:WITH",
+ "=var:VAR"
+ };
+ for(var i =0; i< ws.length;i++ ) {
+ var x = ws[i].split(":");
+ this.keywordNames.set(x[0],x[1]);
+ this.match_strings.add(x[0].substring(1));
+ }
+
+
+ ws={
+ "; SEMICOLON",
+ ", COMMA",
+ "? HOOK",
+ ": COLON",
+ "|| OR",
+ "&& AND",
+ "| BITWISE_OR",
+ "^ BITWISE_XOR",
+ "& BITWISE_AND",
+ "=== STRICT_EQ",
+ "== EQ",
+ "= ASSIGN",
+ "!== STRICT_NE",
+ "!= NE",
+ "<< LSH",
+ "<= LE",
+ "< LT",
+ ">>> URSH",
+ ">> RSH",
+ ">= GE",
+ "> GT",
+ "++ INCREMENT",
+ "-- DECREMENT",
+ "+ PLUS",
+ "- MINUS",
+ "* MUL",
+ "/ DIV",
+ "% MOD",
+ "! NOT",
+ "~ BITWISE_NOT",
+ ". DOT",
+ "[ LEFT_BRACE",
+ "] RIGHT_BRACE",
+ "{ LEFT_CURLY",
+ "} RIGHT_CURLY",
+ "( LEFT_PAREN",
+ ") RIGHT_PAREN"
+ };
+ for(var i =0; i< ws.length;i++ ) {
+ var x = ws[i].split(" ");
+ this.puncNames.set(x[0],x[1]);
+ }
+
+ ws = {
+ "LEFT_PAREN:RIGHT_PAREN",
+ "RIGHT_PAREN:LEFT_PAREN",
+ "LEFT_CURLY:RIGHT_CURLY",
+ "RIGHT_CURLY:LEFT_CURLY",
+ "LEFT_BRACE:RIGHT_BRACE",
+ "RIGHT_BRACE:LEFT_BRACE"
+ };
+ for(var i =0; i< ws.length;i++ ) {
+ var x = ws[i].split(":");
+ this.matchingNames.set(x[0],x[1]);
+ }
+
+
+
+
+ }
+
+
+ }
+}
\ No newline at end of file
--- /dev/null
+
+// test..
+// valac gitlive/app.Builder.js/JsRender/Lang.vala gitlive/app.Builder.js/JsRender/Node.vala --pkg gee-1.0 --pkg=json-glib-1.0 -o /tmp/Lang ;/tmp/Lang
+
+
+/*
+ *
+ * props:
+ *
+ * key value view of properties.
+ *
+ * Old standard..
+ * XXXXX : YYYYY -- standard - should be rendered as XXXX : "YYYY" usually.
+ * |XXXXX : YYYYY -- standard - should be rendered as XXXX : YYYY usually.
+ * |init -- the initialization...
+ * *prop : a property which is actually an object definition...
+ * *args : contructor args
+ * .ctor : Full contruct line...
+ *
+ * Newer code
+ * ".Gee.ArrayList<Xcls_fileitem>:fileitems" ==> # type name
+ * ".signal:void:open": "(JsRender.JsRender file)" ==> @ type name
+ * "|void:clearFiles": "() .... some code...." | type name
+ *
+ *
+ *
+ *
+ *
+ * Standardize this crap...
+ *
+ * standard properties (use to set)
+ * If they are long values show the dialog..
+ *
+ * bool is_xxx :: can show a pulldown.. (true/false)
+ * string html
+ * $ string html = string with value interpolated eg. baseURL + ".."
+ * Clutter.ActorAlign x_align (typed) -- shows pulldowns if type is ENUM?
+ * $ untypedvalue = javascript untyped value...
+ *
+ * object properties (not part of the GOjbect being wrapped?
+ * # Gee.ArrayList<Xcls_fileitem> fileitems
+ *
+ * signals
+ * @ void open
+ *
+ * methods -- always text editor..
+ * | void clearFiles
+ * | someJSmethod
+ *
+ * specials
+ * * prop -- string
+ * * args -- string
+ * * ctor -- string
+ * * init -- big string?
+ *
+ * event handlers (listeners)
+ * just shown
+ *
+ * -----------------
+ * special ID values
+ * +XXXX -- indicates it's a instance property / not glob...
+ * *XXXX -- skip writing glob property (used as classes that can be created...)
+ * _XXXX -- (string) a translatable string.
+ *
+ *
+ * FORMATING?
+.method {
+ color : green;
+ font-weight: bold;
+}
+.prop {
+ color : #333;
+}
+.prop-code {
+ font-style: italic;
+ }
+.listener {
+ color: #600;
+ font-weight: bold;
+}
+.special {
+ color : #00c; font-weight: bold;
+
+
+*/
+
+
+
+
+
+
+public class JsRender.Node : Object {
+
+
+ public static int uid_count = 0;
+
+ public Node parent;
+ public Gee.ArrayList<Node> items; // child items..
+
+ public Gee.HashMap<string,string> props; // the properties..
+ public Gee.HashMap<string,string> listeners; // the listeners..
+ public string xvala_cls;
+ public string xvala_xcls; // 'Xcls_' + id;
+ public string xvala_id; // item id or ""
+
+ // line markers..
+ public int line_start;
+ public int line_end;
+ public Gee.ArrayList<int> lines;
+ public Gee.HashMap<int,string> line_map; // store of l:xxx or p:....
+ public Gee.ArrayList<int> node_lines;
+ public Gee.HashMap<int,Node> node_lines_map; // store of l:xxx or p:....
+
+
+ public Node()
+ {
+ this.items = new Gee.ArrayList<Node>();
+ this.props = new Gee.HashMap<string,string>();
+ this.listeners = new Gee.HashMap<string,string>();
+ this.xvala_cls = "";
+ this.xvala_xcls = "";
+ this.xvala_id = "";
+ this.parent = null;
+ this.line_start = -1;
+ this.line_end = -1;
+ this.lines = new Gee.ArrayList<int>();
+ this.line_map = new Gee.HashMap<int,string>();
+ this.node_lines = new Gee.ArrayList<int>();
+ this.node_lines_map = new Gee.HashMap<int,Node>();
+
+ }
+
+ public void setNodeLine(int line, Node node) {
+ //print("Add node @ %d\n", line);
+ if (this.node_lines_map.has_key(line)) {
+ return;
+ }
+ this.node_lines.add(line);
+ this.node_lines_map.set(line, node);
+
+ }
+
+ public void setLine(int line, string type, string prop) {
+ if (this.line_map.has_key(line)) {
+ if (this.line_map.get(line) != "e:" ) {
+ return;
+ }
+ } else {
+ this.lines.add(line);
+ }
+ this.line_map.set(line, type + ":" + prop);
+ GLib.debug("setLine %d, %s", line, type + ":" + prop);
+ }
+ public void sortLines() {
+ //print("sortLines\n");
+ this.lines.sort((a,b) => {
+ return (int)a-(int)b;
+ });
+ this.node_lines.sort((a,b) => {
+ return (int)a-(int)b;
+ });
+ }
+ public Node? lineToNode(int line)
+ {
+ //print("Searching for line %d\n",line);
+ var l = -1;
+ //foreach(int el in this.node_lines) {
+ //print("all lines %d\n", el);
+ //}
+
+
+ foreach(int el in this.node_lines) {
+ //print("?match %d\n", el);
+ if (el < line) {
+
+ l = el;
+ //print("LESS\n");
+ continue;
+ }
+ if (el == line) {
+ //print("SAME\n");
+ l = el;
+ break;
+ }
+ if (l > -1) {
+ var ret = this.node_lines_map.get(l);
+ if (line > ret.line_end) {
+ return null;
+ }
+ //print("RETURNING NODE ON LINE %d", l);
+ return ret;
+ }
+ return null;
+
+ }
+ if (l > -1) {
+ var ret = this.node_lines_map.get(l);
+ if (line > ret.line_end) {
+ return null;
+ }
+ //print("RETURNING NODE ON LINE %d", l);
+ return ret;
+
+ }
+ return null;
+
+ }
+ public string lineToProp(int line)
+ {
+ // assume lineToNode called first...
+ var l = -1;
+ //foreach(int el in this.lines) {
+ // //print("all lines %d\n", el);
+ //
+
+
+ foreach(int el in this.lines) {
+ //print("?match %d\n", el);
+ if (el < line) {
+
+ l = el;
+ //print("LESS\n");
+ continue;
+ }
+ if (el == line) {
+ //print("SAME\n");
+ l = el;
+ break;
+ }
+ if (l > -1) {
+ //print("RETURNING NODE ON LINE %d", l);
+ return this.line_map.get(l);
+ }
+ return null;
+
+ }
+ if (l > -1) {
+ //print("RETURNING NODE ON LINE %d", l);
+ return this.line_map.get(l);
+ }
+ return null;
+
+ }
+
+ public bool getPropertyRange(string prop, out int start, out int end)
+ {
+ start = -1;
+ foreach(int el in this.lines) {
+ if (start < 0) {
+ if (this.line_map.get(el) == prop) {
+ start = el;
+ end = el;
+ }
+ continue;
+ }
+ end = el -1;
+ break;
+ }
+ return start > -1;
+
+
+ }
+
+ public void dumpProps(string indent = "")
+ {
+ print("%s:\n" , this.fqn());
+ foreach(int el in this.lines) {
+ print("%d: %s%s\n", el, indent, this.line_map.get(el));
+ }
+ foreach(Node n in this.items) {
+ n.dumpProps(indent + " ");
+ }
+ }
+
+
+
+ public string uid()
+ {
+ if (this.props.get("id") == null) {
+ uid_count++;
+ return "uid-%d".printf(uid_count);
+ }
+ return this.props.get("id");
+ }
+
+
+ public bool hasChildren()
+ {
+ return this.items.size > 0;
+ }
+ public bool hasXnsType()
+ {
+ if (this.props.get("$ xns") != null && this.props.get("xtype") != null) {
+ return true;
+
+ }
+ return false;
+ }
+ public string fqn()
+ {
+ if (!this.hasXnsType ()) {
+ return "";
+ }
+ return this.props.get("$ xns") + "." + this.props.get("xtype");
+
+ }
+ public void setFqn(string name)
+ {
+ var ar = name.split(".");
+ this.props.set("xtype", ar[ar.length-1]);
+ var l = name.length - (ar[ar.length-1].length +1);
+ this.props.set("$ xns", name.substring(0, l));
+ //print("setFQN %s to %s\n", name , this.fqn());
+
+
+ }
+ // wrapper around get props that returns empty string if not found.
+ public string get(string key)
+ {
+ var k = this.props.get(key);
+ if (k != null) {
+ return k;
+ }
+
+ k = this.props.get("$ " + key);
+ if (k != null) {
+ return k;
+ }
+
+ var iter = this.props.map_iterator();
+ while (iter.next()) {
+ var kk = iter.get_key().split(" ");
+ if (kk[kk.length-1] == key) {
+ return iter.get_value();
+ }
+ }
+
+
+ return "";
+
+ }
+
+ public string get_key(string key)
+ {
+ var k = this.props.get(key);
+ if (k != null) {
+ return key;
+ }
+
+ k = this.props.get("$ " + key);
+ if (k != null) {
+ return "$ " + key;
+ }
+
+ var iter = this.props.map_iterator();
+ while (iter.next()) {
+ var kk = iter.get_key().split(" ");
+ if (kk[kk.length-1] == key) {
+ return iter.get_key();
+ }
+ }
+
+
+ return "";
+
+ }
+ public void normalize_key(string key, out string kname, out string kflag, out string ktype)
+ {
+ // key formats : XXXX
+ // XXX - plain
+ // string XXX - with type
+ // $ XXX - with flag (no type)
+ // $ string XXX - with flag
+ kname = "";
+ ktype = ""; // these used to contain '-' ???
+ kflag = ""; // these used to contain '-' ???
+ var kkv = key.strip().split(" ");
+ string[] kk = {};
+ for (var i = 0; i < kkv.length; i++) {
+ if (kkv[i].length > 0 ) {
+ kk+= kkv[i];
+ }
+ }
+ //print("normalize %s => %s\n", key,string.joinv("=:=",kk));
+
+ switch(kk.length) {
+ case 1:
+ kname = kk[0];
+ return;
+ case 2:
+ kname = kk[1];
+ if (kk[0].length > 1) {
+ ktype = kk[0];
+ } else {
+ kflag = kk[0];
+ }
+ return;
+ case 3:
+ kname = kk[2];
+ kflag = kk[0];
+ ktype = kk[1];
+ return;
+ }
+ // everything blank otherwise...
+ }
+ public void set(string key, string value) {
+ this.props.set(key,value);
+ }
+ public bool has(string key)
+ {
+ var k = this.props.get(key);
+ if (k != null) {
+ return true;
+ }
+ var iter = this.props.map_iterator();
+ while (iter.next()) {
+ var kk = iter.get_key().strip().split(" ");
+ if (kk[kk.length-1] == key) {
+ return true;
+ }
+ }
+
+ return false;
+
+ }
+
+ public void remove()
+ {
+ if (this.parent == null) {
+
+
+ return;
+ }
+ var nlist = new Gee.ArrayList<Node>();
+ for (var i =0;i < this.parent.items.size; i++) {
+ if (this.parent.items.get(i) == this) {
+ continue;
+ }
+ nlist.add(this.parent.items.get(i));
+ }
+ this.parent.items = nlist;
+ this.parent = null;
+
+ }
+
+ /* creates javascript based on the rules */
+ public Node? findProp(string n) {
+ for(var i=0;i< this.items.size;i++) {
+ var p = this.items.get(i).get("* prop");
+ if (this.items.get(i).get("* prop").length < 1) {
+ continue;
+ }
+ if (p == n) {
+ return this.items.get(i);
+ }
+ }
+ return null;
+
+ }
+
+
+
+
+ static Json.Generator gen = null;
+
+ public string quoteString(string str)
+ {
+ if (Node.gen == null) {
+ Node.gen = new Json.Generator();
+ }
+ var n = new Json.Node(Json.NodeType.VALUE);
+ n.set_string(str);
+
+ Node.gen.set_root (n);
+ return Node.gen.to_data (null);
+ }
+
+ public void loadFromJson(Json.Object obj, int version) {
+ obj.foreach_member((o , key, value) => {
+ //print(key+"\n");
+ if (key == "items") {
+ var ar = value.get_array();
+ ar.foreach_element( (are, ix, el) => {
+ var node = new Node();
+ node.parent = this;
+ node.loadFromJson(el.get_object(), version);
+ this.items.add(node);
+ });
+ return;
+ }
+ if (key == "listeners") {
+ var li = value.get_object();
+ li.foreach_member((lio , li_key, li_value) => {
+ this.listeners.set(li_key, li_value.get_string());
+
+ });
+ return;
+ }
+ var v = value.get_value();
+ var sv = Value (typeof (string));
+ v.transform(ref sv);
+
+ var rkey = key;
+ if (version == 1) {
+ rkey = this.upgradeKey(key, (string)sv);
+ }
+
+
+ this.props.set(rkey, (string)sv);
+ });
+
+
+
+
+ }
+
+ public string upgradeKey(string key, string val)
+ {
+ // convert V1 to V2
+ if (key.length < 1) {
+ return key;
+ }
+ switch(key) {
+ case "*prop":
+ case "*args":
+ case ".ctor":
+ case "|init":
+ return "* " + key.substring(1);
+
+ case "pack":
+ return "* " + key;
+ }
+ if (key[0] == '.') { // v2 does not start with '.' ?
+ var bits = key.substring(1).split(":");
+ if (bits[0] == "signal") {
+ return "@" + string.joinv(" ", bits).substring(bits[0].length);
+ }
+ return "# " + string.joinv(" ", bits);
+ }
+ if (key[0] != '|' || key[1] == ' ') { // might be a v2 file..
+ return key;
+ }
+ var bits = key.substring(1).split(":");
+ // two types '$' or '|' << for methods..
+ // javascript
+ if (Regex.match_simple ("^function\\s*(", val.strip())) {
+ return "| " + key.substring(1);
+ }
+ // vala function..
+
+ if (Regex.match_simple ("^\\(", val.strip())) {
+
+ return "| " + string.joinv(" ", bits);
+ }
+
+ // guessing it's a property..
+ return "$ " + string.joinv(" ", bits);
+
+
+
+ }
+
+
+
+
+
+
+ public Node deepClone()
+ {
+ var n = new Node();
+ n.loadFromJson(this.toJsonObject(), 2);
+ return n;
+
+ }
+ public string toJsonString()
+ {
+ if (Node.gen == null) {
+ Node.gen = new Json.Generator();
+ gen.pretty = true;
+ gen.indent = 1;
+ }
+ var n = new Json.Node(Json.NodeType.OBJECT);
+ n.set_object(this.toJsonObject () );
+ Node.gen.set_root (n);
+ return Node.gen.to_data (null);
+ }
+
+ public Json.Object toJsonObject()
+ {
+ var ret = new Json.Object();
+
+ // listeners...
+ if (this.listeners.size > 0) {
+ var li = new Json.Object();
+ ret.set_object_member("listeners", li);
+ var liter = this.listeners.map_iterator();
+ while (liter.next()) {
+ li.set_string_member(liter.get_key(), liter.get_value());
+ }
+ }
+ //props
+ if (this.props.size > 0 ) {
+ var iter = this.props.map_iterator();
+ while (iter.next()) {
+ this.jsonObjectsetMember(ret, iter.get_key(), iter.get_value());
+ }
+ }
+ if (this.items.size > 0) {
+ var ar = new Json.Array();
+ ret.set_array_member("items", ar);
+
+ // children..
+ for(var i =0;i < this.items.size;i++) {
+ ar.add_object_element(this.items.get(i).toJsonObject());
+ }
+ }
+ return ret;
+
+
+ }
+
+ public void jsonObjectsetMember(Json.Object o, string key, string val) {
+ if (Lang.isBoolean(val)) {
+ o.set_boolean_member(key, val.down() == "false" ? false : true);
+ return;
+ }
+
+
+ if (Lang.isNumber(val)) {
+ if (val.contains(".")) {
+ //print( "ADD " + key + "=" + val + " as a double?\n");
+ o.set_double_member(key, double.parse (val));
+ return;
+
+ }
+ //print( "ADD " + key + "=" + val + " as a int?\n") ;
+ o.set_int_member(key,long.parse(val));
+ return;
+ }
+ ///print( "ADD " + key + "=" + val + " as a string?\n");
+ o.set_string_member(key,val);
+
+ }
+ public string nodeTip()
+ {
+ var ret = this.nodeTitle(true);
+ var funcs = "";
+ var props = "";
+ var listen = "";
+ var iter = this.props.map_iterator();
+ while (iter.next()) {
+ var i = iter.get_key().strip();
+ var val = iter.get_value().strip();
+ if (val == null || val.length < 1) {
+ continue;
+ }
+ if ( i[0] != '|') {
+ props += "\n\t<b>" +
+ GLib.Markup.escape_text(i) +"</b> : " +
+ GLib.Markup.escape_text(val.split("\n")[0]);
+
+ continue;
+ }
+
+ //if (i == "* init") {
+ // continue;
+ //}
+
+ if (Regex.match_simple("^\\s*function", val)) {
+ funcs += "\n\t<b>" +
+ GLib.Markup.escape_text(i.substring(1)).strip() +"</b> : " +
+ GLib.Markup.escape_text(val.split("\n")[0]);
+ continue;
+ }
+ if (Regex.match_simple("^\\s*\\(", val)) {
+ funcs += "\n\t<b>" + GLib.Markup.escape_text(i.substring(1)).strip() +
+ "</b> : " +
+ GLib.Markup.escape_text(val.split("\n")[0]);
+ continue;
+ }
+
+ }
+ iter = this.listeners.map_iterator();
+ while (iter.next()) {
+ var i = iter.get_key().strip();
+ var val = iter.get_value().strip();
+ if (val == null || val.length < 1) {
+ continue;
+ }
+ listen += "\n\t<b>" +
+ GLib.Markup.escape_text(i) +"</b> : " +
+ GLib.Markup.escape_text(val.split("\n")[0]);
+
+ }
+
+
+ if (props.length > 0) {
+ ret+="\n\nProperties:" + props;
+ }
+ if (funcs.length > 0) {
+ ret+="\n\nMethods:" + funcs;
+ }
+ if (listen.length > 0) {
+ ret+="\n\nListeners:" + listen;
+ }
+ return ret;
+
+ }
+ public string nodeTitle(bool for_tip = false) {
+ string[] txt = {};
+
+ //var sr = (typeof(c['+buildershow']) != 'undefined') && !c['+buildershow'] ? true : false;
+ //if (sr) txt.push('<s>');
+
+ if (this.has("* prop")) { txt += (GLib.Markup.escape_text(this.get("* prop")) + ":"); }
+
+ //if (renderfull && c['|xns']) {
+ var fqn = this.fqn();
+ var fqn_ar = fqn.split(".");
+ txt += for_tip || fqn.length < 1 ? fqn : fqn_ar[fqn_ar.length -1];
+
+ //}
+
+ //if (c.xtype) { txt.push(c.xtype); }
+
+ if (this.has("id")) { txt += ("<b>[id=" + GLib.Markup.escape_text(this.get("id")) + "]</b>"); }
+ if (this.has("fieldLabel")){ txt += ("[" + GLib.Markup.escape_text(this.get("fieldLabel")) + "]"); }
+ if (this.has("boxLabel")) { txt += ("[" + GLib.Markup.escape_text(this.get("boxLabel"))+ "]"); }
+
+
+ if (this.has("layout")) { txt += ("<i>" + GLib.Markup.escape_text(this.get("layout")) + "</i>"); }
+ if (this.has("title")) { txt += ("<b>" + GLib.Markup.escape_text(this.get("title")) + "</b>"); }
+ if (this.has("html") && this.get("html").length > 0) {
+ var ht = this.get("html").split("\n");
+ if (ht.length > 1) {
+ txt += ("<b>" + GLib.Markup.escape_text(ht[0]) + "...</b>");
+ } else {
+ txt += ("<b>" + GLib.Markup.escape_text(this.get("html")) + "</b>");
+ }
+ }
+ if (this.has("label")) { txt += ("<b>" + GLib.Markup.escape_text(this.get("label"))+ "</b>"); }
+ if (this.has("header")) { txt += ("<b>" + GLib.Markup.escape_text(this.get("header")) + "</b>"); }
+ if (this.has("legend")) { txt += ("<b>" + GLib.Markup.escape_text(this.get("legend")) + "</b>"); }
+ if (this.has("text")) { txt += ("<b>" + GLib.Markup.escape_text(this.get("text")) + "</b>"); }
+ if (this.has("name")) { txt += ("<b>" + GLib.Markup.escape_text(this.get("name"))+ "</b>"); }
+ if (this.has("region")) { txt += ("<i>(" + GLib.Markup.escape_text(this.get("region")) + ")</i>"); }
+ if (this.has("dataIndex")){ txt += ("[" + GLib.Markup.escape_text(this.get("dataIndex")) + "]"); }
+
+ // for flat classes...
+ //if (typeof(c["*class"]"))!= "undefined") { txt += ("<b>" + c["*class"]+ "</b>"); }
+ //if (typeof(c["*extends"]"))!= "undefined") { txt += (": <i>" + c["*extends"]+ "</i>"); }
+
+
+ //if (sr) txt.push('</s>');
+ return (txt.length == 0) ? "Element" : string.joinv(" ", txt);
+ }
+
+}
--- /dev/null
+/*
+
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.18.3 -->
+<interface>
+ <requires lib="gtk+" version="3.12"/>
+ <object class="GtkBox" id="box1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkButton" id="button1">
+ <property name="label" translatable="yes">button</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <object class="GtkToggleButton" id="togglebutton1">
+ <property name="label" translatable="yes">togglebutton</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+</interface>
+*/
+public class JsRender.NodeToGlade : Object {
+
+ Node node;
+ string pad;
+ Gee.ArrayList<string> els;
+ //Gee.ArrayList<string> skip;
+ Gee.HashMap<string,string> ar_props;
+ public static int vcnt = 0;
+
+ public NodeToGlade( Node node, string pad)
+ {
+ this.node = node;
+ this.pad = pad;
+ this.els = new Gee.ArrayList<string>();
+ //this.skip = new Gee.ArrayList<string>();
+ this.ar_props = new Gee.HashMap<string,string>();
+
+ }
+
+ public string munge ( )
+ {
+
+
+ this.pad += " ";
+
+ var cls = this.node.fqn().replace(".", "");
+ string res = "";
+ switch(cls) {
+ // things we can not do yet...
+ case "GtkDialog": // top level.. - named and referenced
+ case "GtkAboutDialog":
+ case "GtkMessageDialog":
+ case "GtkWindow": // top level.. - named and referenced
+ res = this.mungeOuter(true);
+ break;
+ default:
+ res = this.mungeOuter(false);
+ break;
+ }
+
+
+ if (res.length < 1) {
+ return "";
+ }
+ return "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
+ <!-- Generated with appBuilder 4.1 -->
+ <interface>
+ <requires lib=\"gtk+\" version=\"3.12\"/>
+ <!-- <requires lib=\"gtksourceview\" version=\"3.0\"/> -->
+ " +
+ res +
+ "</interface>\n";
+
+
+ }
+ public string mungeChild(string pad , Node cnode, bool with_packing = false)
+ {
+ var x = new NodeToGlade(cnode, pad);
+ return x.mungeNode(with_packing);
+ }
+
+ public string mungeNode(bool with_packing)
+ {
+ var pad = this.pad;
+ var cls = this.node.fqn().replace(".", "");
+
+ var b = new global::Gtk.Builder();
+
+ var gtype = b.get_type_from_name(cls);
+ print("Type: %s ?= %s\n", this.node.fqn(), gtype.name());
+
+
+
+ var ns = this.node.fqn().split(".")[0];
+ if (ns == "Clutter") {
+ return "";
+ }
+ //if (ns == "GtkClutter") {
+ // return "";
+ //}
+ if (ns == "WebKit") {
+ return "";
+ }
+ switch(cls) {
+ // things we can not do yet...
+ /*case "GtkDialog": // top level.. - named and referenced
+ case "GtkAboutDialog":
+ case "GtkWindow": // top level.. - named and referenced
+ return this.mungeWindow();
+
+
+ if (this.node.items.size > 0) {
+ return this.mungeChild(pad + " " , this.node.items.get(0), false );
+ }
+ return "";
+ */
+ //case "GtkView": // SourceView?
+ case "GtkTreeStore": // top level.. - named and referenced
+ case "GtkListStore": // top level.. - named and referenced
+ case "GtkTreeViewColumn": // part of liststore?!?!
+ case "GtkMenu": // top level..
+ case "GtkCellRendererText":
+ case "GtkSourceBuffer":
+ case "GtkClutterActor"://fixme..
+ ///case "GtkClutterEmbed"://fixme..
+ return "";
+ }
+
+
+ var id = this.node.uid();
+ var ret = @"$pad<object class=\"$cls\" id=\"$id\">\n";
+ // properties..
+ var props = Palete.Gir.factoryFqn(this.node.fqn()).props;
+ //var props = Palete.factory("Gtk").getPropertiesFor(this.node.fqn(), "props");
+
+ var pviter = props.map_iterator();
+ while (pviter.next()) {
+
+ // print("Check: " +cls + "::(" + pviter.get_value().propertyof + ")" + pviter.get_key() + " " );
+
+ // skip items we have already handled..
+ if (!this.node.has(pviter.get_key())) {
+ continue;
+ }
+ var k = pviter.get_key();
+ var val = GLib.Markup.escape_text(this.node.get(pviter.get_key()).strip());
+ ret += @"$pad <property name=\"$k\">$val</property>\n"; // es
+
+ }
+ // packing???
+
+ var pack = "";
+
+ if (with_packing ) {
+
+ pack = this.packString();
+
+
+ }
+ // children..
+
+ if (this.node.items.size < 1) {
+ return ret + @"$pad</object>\n" + pack;
+ }
+
+ for (var i = 0; i < this.node.items.size; i++ ) {
+
+ var add = this.mungeChild(pad + " " , this.node.items.get(i) , true);
+ if (add.length < 1) {
+ continue;
+ }
+
+ ret += @"$pad <child>\n";
+ ret += add;
+ ret += @"$pad </child>\n";
+ }
+
+ return ret + @"$pad</object>\n" + pack;
+
+
+
+
+ }
+
+
+ public string packString()
+ {
+
+
+
+
+ // pack is part of the parent element..
+ var p = node.parent;
+ string[] pk= { "add" };
+ var pfqn = "Gtk.Box";
+ if (p != null) {
+ pfqn = p.fqn();
+ if (this.node.props.get("* pack") == null) {
+ return "";
+ }
+ pk = this.node.get("* pack").split(",");
+ } else {
+ if (this.node.props.get("* pack") != null) {
+ pk = this.node.get("* pack").split(",");
+ }
+
+ }
+
+ if (pfqn == null) {
+ return "";
+ }
+ if (pfqn == "Gtk.ScrolledWindow") {
+ return "";
+ }
+ var p_parts =pfqn.split(".");
+
+
+ var ns = p_parts[0];
+ var gir = Palete.Gir.factory(ns);
+ var cls = gir.classes.get(p_parts[1]);
+ var mdef = cls.methods.get(pk[0]);
+ if (mdef == null) {
+ print("could not find method : %s\n", pk[0]);
+ return "";
+ }
+ /*
+ var generator = new Json.Generator ();
+ var n = new Json.Node(Json.NodeType.OBJECT);
+ n.set_object(mdef.toJSON());
+ generator.set_root(n);
+ generator.indent = 4;
+ generator.pretty = true;
+
+ print(generator.to_data(null));
+ */
+ string[] pbody = {};
+ switch(pk[0]) {
+
+ case "pack_start":
+ pbody += @"$pad <property name=\"pack_type\">start</property>\n";
+ break;
+
+ case "pack_end":
+ pbody += @"$pad <property name=\"pack_type\">start</property>\n";
+ break;
+
+ case "add":
+ //pbody += @"$pad <property name=\"pack_type\">start</property>\n";
+ pbody += @"$pad <property name=\"expand\">True</property>\n";
+ pbody += @"$pad <property name=\"fill\">True</property>\n";
+ //pbody += @"$pad <property name=\"position\">1</property>\n";
+ var pack = @"$pad<packing>\n" +
+ string.joinv("", pbody) +
+ @"$pad</packing>\n";
+ return pack;
+
+ case "set_model":
+ print ("set_model not handled yet..");
+ return "";
+
+ default:
+ print ("unknown pack type: %s", pk[0]);
+ return "";
+
+ }
+
+ var pad = this.pad;
+
+ for (var i = 2; i < mdef.paramset.params.size; i++) {
+ var poff = i - 1;
+ if (poff > (pk.length-1)) {
+ break;
+ }
+
+ var key = mdef.paramset.params.get(i).name;
+ var val = pk[poff];
+ pbody += @"$pad <property name=\"$key\">$val</property>\n";
+
+ }
+
+ if (pbody.length < 1) {
+ /*var generator = new Json.Generator ();
+ var n = new Json.Node(Json.NodeType.OBJECT);
+ n.set_object(mdef.toJSON());
+ generator.set_root(n);
+ generator.indent = 4;
+ generator.pretty = true;
+
+ print(generator.to_data(null));
+ */
+ print("skip - packing - no arguments (" + pk[0] + ")\n");
+ return "";
+ }
+
+ var pack = @"$pad<packing>\n" +
+ string.joinv("", pbody) +
+ @"$pad</packing>\n";
+ return pack;
+
+ }
+ public string mungeOuter(bool with_window)
+ {
+ var label = this.node.fqn() + ": " +
+ (this.node.has("title") ? this.node.get("title") : "No-title");
+
+ var ret = "";
+ ret+= "
+<object class=\"GtkBox\" id=\"fake-window1\">
+ <property name=\"visible\">True</property>
+ <property name=\"can_focus\">False</property>
+ <property name=\"orientation\">vertical</property>
+";
+ if (with_window) {
+ ret+="
+ <child>
+ <object class=\"GtkLabel\" id=\"fake-window-label-1\">
+ <property name=\"visible\">True</property>
+ <property name=\"can_focus\">False</property>
+ <property name=\"label\" translatable=\"yes\">" + label + "</property>
+ </object>
+ <packing>
+ <property name=\"expand\">False</property>
+ <property name=\"fill\">True</property>
+ <property name=\"position\">0</property>
+ </packing>
+ </child>
+ ";
+ }
+
+ ret+="
+ <child>
+ ";
+ if (with_window) {
+ var children = "";
+ if (this.node.items.size > 0) {
+
+ children = this.mungeChild(pad + " " , this.node.items.get(0), false);
+
+
+ }
+ children += (children.length > 0) ? "<packing>
+ <property name=\"expand\">True</property>
+ <property name=\"fill\">True</property>
+ <property name=\"position\">1</property>
+ </packing>" : "";
+
+ ret+= (children.length < 1 ) ? "<placeholder/>" : children;
+
+
+
+
+ } else {
+ ret+= this.mungeNode (true);
+ }
+
+ ret+="
+ </child>
+ ";
+ if (with_window) {
+ ret+="
+ <child>
+ <object class=\"GtkBox\" id=\"fake-footer\">
+ <property name=\"visible\">True</property>
+ <property name=\"can_focus\">False</property>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name=\"expand\">False</property>
+ <property name=\"fill\">True</property>
+ <property name=\"position\">2</property>
+ </packing>
+ </child>
+ ";
+ }
+ ret +="
+ </object>";
+
+ return ret;
+ }
+
+
+}
\ No newline at end of file
--- /dev/null
+/*
+
+* This code renders the Gtk tree into a set of Gtk elements.
+* principle = one NodeToGtk wraps around the original 'node'
+*
+* it's called by the view element with
+* var x = new JsRender.NodeToGtk(file.tree);
+ var obj = x.munge() as Gtk.Widget;
+
+*
+*
+* The idea behind the Javascript tools stuff is that we can
+* transform what is actually being requested to be rendered
+* -- eg. an AboutBox, and turn that into load of real widgets..
+* that could be displayed..
+*
+* we could go on the theory that we send the whole tree to the 'plugin'
+* and that would do all the transformations before rendering..
+* -- this would make more sense...
+* -- otherwise we would call it on each element, and might get really confused
+* about scope etc..
+*
+*
+*
+*/
+public class JsRender.NodeToGtk : Object {
+
+ Node node;
+ Object wrapped_object;
+ NodeToGtk parentObj;
+
+ Gee.ArrayList<NodeToGtk> children;
+
+ Gee.ArrayList<string> els;
+ //Gee.ArrayList<string> skip;
+ Gee.HashMap<string,string> ar_props;
+ public static int vcnt = 0;
+
+ public NodeToGtk( Node node , NodeToGtk? parent_obj = null)
+ {
+ this.node = node;
+ this.els = new Gee.ArrayList<string>();
+ this.children = new Gee.ArrayList<NodeToGtk>();
+ //this.skip = new Gee.ArrayList<string>();
+ this.ar_props = new Gee.HashMap<string,string>();
+ this.parentObj = parent_obj;
+
+ if (parent_obj == null) {
+ // then serialize up the node,
+ // send it to javascript for processsing,
+ // then rebuild node from return value..
+ try {
+ var ret = Palete.Javascript.singleton().executeFile(
+ BuilderApplication.configDirectory() + "/resources/node_to_gtk.js",
+ "node_to_gtk",
+ node.toJsonString()
+ );
+ var new_node = new Node();
+ var pa = new Json.Parser();
+ pa.load_from_data(ret);
+ var rnode = pa.get_root();
+
+
+ new_node.loadFromJson(rnode.get_object(), 2);
+ this.node = new_node;
+
+ } catch (Palete.JavascriptError e) {
+ print("Error: %s\n", e.message);
+ }
+
+
+ }
+
+ }
+
+ public Object? munge ( )
+ {
+ var ret = this.mungeNode();
+ if (ret == null) {
+ return null;
+ }
+
+ return ret.wrapped_object;
+
+ }
+ public NodeToGtk? mungeChild( Node cnode)
+ {
+ var x = new NodeToGtk(cnode, this);
+
+ return x.mungeNode();
+
+ }
+
+ public NodeToGtk? mungeNode()
+ {
+
+ var parent = this.parentObj != null ? this.parentObj.wrapped_object : null;
+ var cls = this.node.fqn().replace(".", "");
+ var ns = this.node.fqn().split(".")[0];
+ var gtkbuilder = new global::Gtk.Builder();
+
+ var cls_gtype = gtkbuilder.get_type_from_name(cls);
+ print("Type: %s ?= %s\n", this.node.fqn(), cls_gtype.name());
+
+ if (cls_gtype == GLib.Type.INVALID) {
+ print("SKIP - gtype is invalid\n");
+ return null;
+ }
+ // if it's a window... -- things we can not render....
+
+ if (cls_gtype.is_a(typeof(global::Gtk.Window))) {
+ // what if it has none...
+ if (this.node.items.size < 1) {
+ return null;
+ }
+ return this.mungeChild(this.node.items.get(0));
+ }
+ if (cls_gtype.is_a(typeof(global::Gtk.Popover))) {
+ // what if it has none...
+ if (this.node.items.size < 1) {
+ return null;
+ }
+ return this.mungeChild(this.node.items.get(0));
+ }
+
+ var ret = Object.new(cls_gtype);
+ ret.ref(); //??? problematic?
+ this.wrapped_object = ret;
+
+
+ switch(cls) {
+ // fixme
+ //case "GtkTreeStore": // top level.. - named and referenced
+ case "GtkListStore": // top level.. - named and referenced
+ //case "GtkTreeViewColumn": // part of liststore?!?!
+ //case "GtkMenu": // top level..
+ //case "GtkCellRendererText":
+ case "GtkSourceBuffer":
+ case "GtkClutterActor"://fixme..
+ case "GtkClutterEmbed"://fixme.. -- we can not nest embedded.. need to solve..
+
+ return null;
+ }
+
+ this.packParent();
+
+
+ // pack paramenters
+
+
+ if (parent != null && parent.get_type().is_a(typeof(global::Gtk.Container))) {
+ this.packContainerParams();
+ }
+
+ var cls_gir =Palete.Gir.factoryFqn(this.node.fqn());
+ if (cls_gir == null) {
+ return null;
+ }
+ //var id = this.node.uid();
+ //var ret = @"$pad<object class=\"$cls\" id=\"$id\">\n";
+ // properties..
+ var props = cls_gir.props;
+
+
+ var pviter = props.map_iterator();
+ while (pviter.next()) {
+
+ // print("Check: " +cls + "::(" + pviter.get_value().propertyof + ")" + pviter.get_key() + " " );
+ var k = pviter.get_key();
+ // skip items we have already handled..
+ if (!this.node.has(k)) {
+ continue;
+ }
+ // find out the type of the property...
+ var type = pviter.get_value().type;
+ type = Palete.Gir.fqtypeLookup(type, ns);
+
+ var ocl = (ObjectClass) cls_gtype.class_ref ();
+ var ps = ocl.find_property(k);
+
+ // attempt to read property type and enum...
+
+ if (ps != null) {
+ var vt = ps.value_type;
+ if (vt.is_enum()) {
+
+ var raw_val = this.node.get(k).strip();
+ var rv_s = raw_val.split(".");
+ if (rv_s.length > 0) {
+ raw_val = rv_s[rv_s.length-1];
+ EnumClass ec = (EnumClass) vt.class_ref ();
+ var foundit = false;
+ for (var i =0;i< ec.n_values; i++) {
+ var ev = ec.values[i].value_name;
+ var ev_s= ev.split("_");
+ if (raw_val == ev_s[ev_s.length-1]) {
+ var sval = GLib.Value(typeof(int));
+ sval.set_int(ec.values[i].value);
+ ret.set_property(k, sval);
+ foundit = true;
+ break;
+ }
+ }
+ if (foundit) {
+ continue;
+ }
+
+ }
+ }
+ }
+
+
+
+
+ var val = this.toValue(this.node.get(k).strip(), type);
+ if (val == null) {
+ print("skip (failed to transform value %s type = %s from %s\n",
+ cls + "." + k, type, this.node.get(k).strip());
+ continue;
+ }
+ print ("set_property ( %s , %s / %s)\n", k, this.node.get(k).strip(), val.strdup_contents());
+
+
+ ret.set_property(k, val);
+
+
+ }
+ // packing???
+ // for now... - just try the builder style packing
+
+
+
+ if (this.node.items.size < 1) {
+ return this;
+ }
+
+ for (var i = 0; i < this.node.items.size; i++ ) {
+
+ var ch = this.mungeChild(this.node.items.get(i));
+ if (ch != null) {
+ this.children.add(ch);
+ }
+
+ }
+
+ this.afterChildren();
+
+ return this;
+
+
+
+
+ }
+
+ public void afterChildren()
+ {
+ // things like GtkNotebook - we have to pack children after they have been created..
+ var cls = this.node.fqn().replace(".", "");
+
+ if (cls == "GtkNotebook") {
+ this.afterChildrenGtkNotebook();
+ }
+
+
+
+ }
+
+ public void afterChildrenGtkNotebook()
+ {
+ // we have a number of children..
+ // some are labels - this might need to be more complex...
+ // perhaps labels should be a special property labels[] of the notebook..
+ var labels = new Gee.ArrayList<NodeToGtk>();
+ var bodies = new Gee.ArrayList<NodeToGtk>();
+ for (var i = 0; i < this.children.size; i++) {
+ var cn = this.children.get(i).node.fqn().replace(".", "");
+ if (cn != "GtkLabel") {
+ bodies.add(this.children.get(i));
+ continue;
+ }
+ labels.add(this.children.get(i));
+ }
+ for (var i = 0; i < bodies.size; i++) {
+ var lbl = (i > (labels.size -1)) ? null : labels.get(i);
+
+ ((global::Gtk.Notebook)this.wrapped_object).append_page(
+ (global::Gtk.Notebook) bodies.get(i).wrapped_object,
+ lbl != null ? (global::Gtk.Notebook) lbl.wrapped_object : null
+ );
+
+
+ }
+
+
+ }
+
+
+ /**
+ * called after the this.object has been created
+ * and it needs to be packed onto parent.
+ */
+ public void packParent()
+ {
+ var cls = this.node.fqn().replace(".", "");
+
+ var gtkbuilder = new global::Gtk.Builder();
+ var cls_gtype = gtkbuilder.get_type_from_name(cls);
+
+ if (this.parentObj == null) {
+ return;
+ }
+
+
+ var parent = this.parentObj.wrapped_object;
+
+ var do_pack =true;
+
+ if (parent == null) { // no parent.. can not pack.
+ return; ///
+ }
+ // ------------- handle various special parents .. -----------
+
+ var par_type = this.parentObj.node.fqn().replace(".", "");
+
+ if (par_type == "GtkNotebook") {
+ // do not pack - it's done afterwards...
+ return;
+ }
+
+ // ------------- handle various child types.. -----------
+ // our overrides
+ if (cls == "GtkMenu") {
+ this.packMenu();
+ return;
+ }
+
+ if (cls == "GtkTreeStore") { // other stores?
+ // tree store is buildable??? ---
+ this.packTreeStore();
+ return;
+ }
+ if (cls =="GtkTreeViewColumn") { // other stores?
+ //?? treeview column is actually buildable -- but we do not use the builder???
+ this.packTreeViewColumn();
+ return;
+ }
+ if (cls_gtype.is_a(typeof(global::Gtk.CellRenderer))) { // other stores?
+ this.packCellRenderer();
+ return;
+ }
+
+
+
+ // -- handle buildable add_child..
+ if ( cls_gtype.is_a(typeof(global::Gtk.Buildable))
+ &&
+ parent.get_type().is_a(typeof(global::Gtk.Buildable))
+ )
+ {
+ ((global::Gtk.Buildable)parent).add_child(gtkbuilder,
+ this.wrapped_object, null);
+ return;
+ }
+ // other packing?
+
+
+
+ }
+
+ public void packMenu()
+ {
+
+
+ var parent = this.parentObj.wrapped_object;
+ if (!parent.get_type().is_a(typeof(global::Gtk.Widget))) {
+ print("skip menu pack - parent is not a widget");
+ return;
+ }
+
+ var p = (global::Gtk.Menu)this.wrapped_object;
+ ((global::Gtk.Widget)parent).button_press_event.connect((s, ev) => {
+ p.set_screen(Gdk.Screen.get_default());
+ p.show_all();
+ p.popup(null, null, null, ev.button, ev.time);
+ return true;
+ });
+ }
+
+ public void packTreeStore()
+ {
+ var parent = this.parentObj.wrapped_object;
+ if (!parent.get_type().is_a(typeof(global::Gtk.TreeView))) {
+ print("skip treestore pack - parent is not a treeview");
+ return;
+ }
+ ((global::Gtk.TreeView)parent).set_model((global::Gtk.TreeModel)this.wrapped_object);
+
+ }
+ public void packTreeViewColumn()
+ {
+ var parent = this.parentObj.wrapped_object;
+ if (!parent.get_type().is_a(typeof(global::Gtk.TreeView))) {
+ print("skip packGtkViewColumn pack - parent is not a treeview");
+ return;
+ }
+ ((global::Gtk.TreeView)parent).append_column((global::Gtk.TreeViewColumn)this.wrapped_object);
+ // init contains the add_attribute for what to render...
+
+ }
+
+
+ public void packCellRenderer()
+ {
+ var parent = this.parentObj.wrapped_object;
+ if (!parent.get_type().is_a(typeof(global::Gtk.TreeViewColumn))) {
+ print("skip packGtkViewColumn pack - parent is not a treeview");
+ return;
+ }
+ ((global::Gtk.TreeViewColumn)parent).pack_start((global::Gtk.CellRenderer)this.wrapped_object, false);
+ // init contains the add_attribute for what to render...
+
+ }
+
+
+ public void packContainerParams()
+ {
+
+ if (this.parentObj == null) {
+ return;
+ }
+ // child must be a widget..
+ if (!this.wrapped_object.get_type().is_a(typeof(global::Gtk.Widget))) {
+ return;
+ }
+
+ var parent_gir = Palete.Gir.factoryFqn(this.parentObj.node.fqn());
+
+ var parent = this.parentObj.wrapped_object;
+
+ if (parent_gir == null) {
+ return;
+ }
+
+ // let's test just setting expand to false...
+ var cls_methods = parent_gir.methods;
+ if (cls_methods == null) {
+ return;
+ }
+
+ if (!this.node.props.has_key("* pack") ||
+ this.node.props.get("* pack").length < 1) {
+ return;
+ }
+
+ var ns = this.parentObj.node.fqn().split(".")[0];
+
+ var pack = this.node.props.get("* pack").split(",");
+
+ // this tries to use the parameter names from the '*pack' function as properties in child_set_property.
+ // for a grid it's trying to do left/top/width/height.
+
+
+ if (cls_methods.has_key(pack[0])) {
+ var mparams = cls_methods.get(pack[0]).paramset.params;
+ for (var i = 1; i < mparams.size; i++ ) {
+ if (i > (pack.length -1)) {
+ continue;
+ }
+ Palete.Gir.checkParamOverride(mparams.get(i));
+ var k = mparams.get(i).name;
+
+ Value cur_val;
+
+ var type = mparams.get(i).type;
+ type = Palete.Gir.fqtypeLookup(type, ns);
+
+ var val = this.toValue(pack[i].strip(), type);
+ if (val == null) {
+ print("skip (failed to transform value %s type = %s from %s\n",
+ this.parentObj.node.fqn() + "." + k, type, pack[i].strip());
+ continue;
+ }
+ print ("pack:set_property ( %s , %s / %s)\n", k, pack[i].strip(), val.strdup_contents());
+
+ ((global::Gtk.Container)parent).child_set_property(
+ (global::Gtk.Widget)this.wrapped_object , k, val);
+
+ }
+
+ }
+
+
+
+
+ }
+
+
+ public GLib.Value? toValue(string val, string type) {
+
+
+ /*
+ if (type == "string") {
+ var qret = GLib.Value(typeof(string));
+ qret.set_string(val);
+ return qret;
+ }
+ * */
+ /*
+ *
+ * var gtkbuilder = new global::Gtk.Builder();
+ var prop_gtype = gtkbuilder.get_type_from_name(type);
+
+
+ if (prop_gtype == GLib.Type.INVALID) {
+
+ return null;
+ }
+ */
+
+
+
+
+ switch(type) {
+ case "bool":
+ var ret = GLib.Value(typeof(bool));
+ ret.set_boolean(val.down() == "false" ? false : true);
+ return ret;
+
+ case "uint":
+ var ret = GLib.Value(typeof(uint));
+ ret.set_uint(int.parse(val));
+ return ret;
+
+ case "int":
+ var ret = GLib.Value(typeof(int));
+ ret.set_int(int.parse(val));
+ return ret;
+
+ // uint64 ...??
+
+ case "long":
+ var ret = GLib.Value(typeof(long));
+ ret.set_long((long)int64.parse(val));
+ return ret;
+
+ case "ulong":
+ var ret = GLib.Value(typeof(ulong));
+ ret.set_ulong((ulong) uint64.parse(val));
+ return ret;
+
+ case "float":
+ var ret = GLib.Value(typeof(float));
+ ret.set_float((float)double.parse(val));
+ return ret;
+
+ case "string":
+ var ret = GLib.Value(typeof(string));
+ ret.set_string(val);
+ return ret;
+
+ default:
+ return null;
+ /*
+ var sval = GLib.Value(typeof(string));
+ sval.set_string(val);
+
+ if (!sval.transform(ref ret)) {
+
+ return null;
+ }
+ return ret;
+ */
+ }
+ // should not get here..
+ return null;
+ }
+
+
+
+
+}
--- /dev/null
+/**
+ *
+ * Code to convert node tree to Javascript...
+ *
+ * usage : x = (new JsRender.NodeToJs(node)).munge();
+ *
+ *
+ * We are changing this to output as we go.
+ * However... since line-endings on properties have ',' (not ;) like vala.
+ * we have to be a bit smarter about how to output.
+ *
+ *
+ *
+*/
+
+
+
+
+public class JsRender.NodeToJs : Object {
+
+ static uint indent = 1;
+ static string indent_str = " ";
+
+
+
+ Node node;
+ Gee.ArrayList<string> doubleStringProps; // need to think if this is a good idea like this
+ string pad;
+ public JsRender renderer;
+
+ Gee.HashMap<string,string> out_props;
+ Gee.HashMap<string,string> out_listeners;
+ Gee.HashMap<string,Node> out_nodeprops;
+ Gee.ArrayList<Node> out_children;
+ Gee.HashMap<string,Gee.ArrayList<Node>> out_props_array;
+ Gee.HashMap<string,Gee.ArrayList<string>> out_props_array_plain;
+
+ NodeToJs top;
+ public string ret;
+
+ public int cur_line;
+
+
+ public NodeToJs( Node node, Gee.ArrayList<string> doubleStringProps, string pad, NodeToJs? parent)
+ {
+ this.node = node;
+ this.doubleStringProps = doubleStringProps;
+ this.pad = pad;
+
+ //this.els = new Gee.ArrayList<string>();
+ //this.ar_props = new Gee.HashMap<string,string>();
+
+
+
+ // this is the bit that causes issues - we have to output as we go, otherwise we
+ // can not work out which line is which...
+
+ this.out_props = new Gee.HashMap<string,string>();
+ this.out_listeners = new Gee.HashMap<string,string>();
+
+
+ this.out_nodeprops = new Gee.HashMap<string,Node>() ;
+ this.out_children = new Gee.ArrayList<Node> ();
+
+ this.out_props_array = new Gee.HashMap<string,Gee.ArrayList<Node>>(); // filled in by 'checkChildren'
+ this.out_props_array_plain = new Gee.HashMap<string,Gee.ArrayList<string>>() ;
+
+
+
+ this.cur_line = parent == null ? 0 : parent.cur_line ; //-1 as we usuall concat onto the existin gline?
+ if (parent != null) {
+ this.renderer = parent.renderer;
+ }
+ this.ret = "";
+ this.top = parent == null ? this : parent.top;
+ // reset the maps...
+ if (parent == null) {
+ node.node_lines = new Gee.ArrayList<int>();
+ node.node_lines_map = new Gee.HashMap<int,Node>();
+ }
+ }
+
+
+
+
+
+
+ public string munge ( )
+ {
+ //return this.mungeToString(this.node);
+
+
+ this.checkChildren();
+ this.readProps();
+ //this.readArrayProps();
+ this.readListeners();
+
+ if (!this.node.props.has_key("* xinclude")) {
+ this.iterChildren();
+ }
+
+
+
+ // no properties to output...
+ //if (this.els.size < 1) {
+ // return "";
+ //}
+
+ this.mungeOut();
+ return this.ret;
+
+ }
+ /**
+
+ This currently works by creating a key/value array of this.els, which is just an array of properties..
+ this is so that join() works...
+
+ how this could work:
+ a) output header
+ b) output plan properties.
+ c) output listeners..
+ c) output *prop
+ g) output prop_arrays..
+ d) output children
+ e)
+
+
+
+ */
+
+ public Gee.ArrayList<string> orderedPropKeys() {
+
+ var ret = new Gee.ArrayList<string> ();
+ var niter = this.out_props.map_iterator();
+ while(niter.next()) {
+ ret.add(niter.get_key());
+ }
+
+ ret.sort(( a, b) => {
+ return ((string)a).collate((string)b);
+ //if (a == b) return 0;
+ //return a < b ? -1 : 1;
+ });
+ return ret;
+ }
+ public Gee.ArrayList<string> orderedListenerKeys() {
+
+ var ret = new Gee.ArrayList<string> ();
+ var niter = this.out_listeners.map_iterator();
+ while(niter.next()) {
+ ret.add(niter.get_key());
+ }
+
+ ret.sort(( a, b) => {
+ return ((string)a).collate((string)b);
+ //if (a == b) return 0;
+ //return a < b ? -1 : 1;
+ });
+ return ret;
+ }
+
+
+ public string mungeOut()
+ {
+ this.node.line_start = this.cur_line;
+ this.top.node.setNodeLine(this.cur_line, this.node);
+ var spad = this.pad.substring(0, this.pad.length-indent);
+
+ if (this.node.props.has_key("* xinclude")) {
+ this.addLine("Roo.apply(" + this.node.props.get("* xinclude") + "._tree(), {",0 );
+
+ } else {
+ this.addLine("{", 0);
+ }
+ var suffix = "";
+ // output the items...
+ // work out remaining items...
+
+ // output xns / xtype first..
+ if (this.out_props.has_key("xtype")) {
+ var v = this.out_props.get("xtype");
+ this.node.setLine(this.cur_line, "p","xtype");
+ this.addLine(this.pad + "xtype" + " : " + v + suffix, ',');
+ }
+
+ // plain properties.
+ var iter = this.orderedPropKeys().list_iterator();
+ while(iter.next()) {
+
+
+ var k = iter.get();
+ if (k == "xns" || k == "xtype") {
+ continue;
+ }
+
+ var v = this.out_props.get(k);
+ this.node.setLine(this.cur_line, "p",k);
+ this.addLine(this.pad + k + " : " + v + suffix, ',');
+
+ this.node.setLine(this.cur_line, "e", "");
+
+ }
+
+ // listeners..
+
+ if (this.out_listeners.size > 0 ) {
+
+ this.addLine(this.pad + "listeners : {", 0);
+ iter = this.orderedListenerKeys().list_iterator();
+
+ while(iter.next()) {
+
+ var k = iter.get();
+ var v = this.out_listeners.get(k);
+ this.node.setLine(this.cur_line, "l",k); //listener
+ this.addLine(this.pad + indent_str + k + " : " + v , ',');
+ this.node.setLine(this.cur_line, "e", "");
+ }
+
+ this.closeLine();
+ this.addLine(this.pad + "}" ,',');
+
+ }
+
+ //------- at this point it is the end of the code relating directly to the object..
+
+ if (this.out_props.has_key("xns")) {
+ var v = this.out_props.get("xns");
+ this.node.setLine(this.cur_line, "p","xns");
+ this.addLine(this.pad + "xns" + " : " + v + suffix, ',');
+ this.node.setLine(this.cur_line, "p","| xns");
+ this.addLine(this.pad + "'|xns' : '" + v + "'", ',');
+ this.node.setLine(this.cur_line, "e", "");
+ }
+
+ this.node.line_end = this.cur_line;
+
+ // * prop
+
+ var niter = this.out_nodeprops.map_iterator();
+
+ while(niter.next()) {
+ var addstr = this.mungeChildNew(this.pad + indent_str, niter.get_value());
+ //print("add str: %s\n", addstr);
+ this.node.setLine(this.cur_line, "p",niter.get_key());
+ this.addLine(this.pad + niter.get_key() + " : " + addstr, ',');
+
+ this.node.setLine(this.cur_line, "e", "");
+ }
+ // prop arrays...
+
+ var piter = this.out_props_array.map_iterator();
+
+ while(piter.next()) {
+ this.node.setLine(this.cur_line, "p",piter.get_key());
+ this.addLine(this.pad + piter.get_key() + " : [", 0);
+
+ var pliter = piter.get_value().list_iterator();
+ while (pliter.next()) {
+ var addstr = this.mungeChildNew(this.pad + indent_str + indent_str, pliter.get());
+ this.addLine(this.pad + indent_str + addstr, ',');
+ this.node.setLine(this.cur_line, "e", "");
+ }
+ this.closeLine();
+ this.addLine(this.pad + "]" , ',');
+ }
+
+ // children..
+ if (this.out_children.size > 0) {
+ this.addLine(this.pad + "items : [" , 0);
+ var cniter = this.out_children.list_iterator();
+ while (cniter.next()) {
+ suffix = cniter.has_next() ? "," : "";
+ var addstr = this.mungeChildNew(this.pad + indent_str + indent_str, cniter.get());
+ this.addLine(this.pad + indent_str + addstr, ',');
+ this.node.setLine(this.cur_line, "e", "");
+
+ }
+ this.closeLine();
+ this.addLine(this.pad + "]",',');
+ }
+ this.node.setLine(this.cur_line, "e", "");
+ this.closeLine();
+ if (this.node.props.has_key("* xinclude")) {
+ this.addLine(spad + "})",0);
+
+ } else {
+ this.addLine( spad + "}", 0);
+ }
+
+ this.node.sortLines();
+
+
+
+ return this.ret;
+
+ }
+
+ /**
+ * Line endings
+ * if we end with a ','
+ *
+ */
+
+ char last_line_end = '!';
+
+ /**
+ * add a line - note we will end up with an extra line break
+ * at beginning of nodes doing this..
+ *
+ * @param str = text to add..
+ * @param line_end = 0 (just add a line break)
+ * line_end = ',' and ","
+ *
+ */
+ public void addLine(string str, char line_end)
+ {
+ if (this.last_line_end != '!') {
+ this.ret += (this.last_line_end == 0 ? "" : this.last_line_end.to_string()) + "\n";
+ }
+ this.last_line_end = line_end;
+ this.cur_line += str.split("\n").length;
+ this.ret += str;
+
+
+ //this.ret += "/*%d(%d-%d)*/ ".printf(this.cur_line -1, this.node.line_start,this.node.line_end) + str + "\n";
+
+
+ }
+ public void closeLine() // send this before '}' or ']' to block output of ',' ...
+ {
+ this.last_line_end = 0;
+ }
+
+/* public void addMultiLine(str= "")
+ {
+
+ //this.ret += "/ * %d(%d-%d) * / ".printf(this.cur_line, this.node.line_start,this.node.line_end)+ str + "\n";
+ this.ret += str + "\n";
+ this.cur_line += str.split("\n").length;
+ }
+ */
+ public string mungeChildNew(string pad , Node cnode )
+ {
+ var x = new NodeToJs(cnode, this.doubleStringProps, pad, this);
+
+ x.munge();
+ return x.ret;
+ }
+
+ /**
+ * loop through items[] array see if any of the children have '* prop'
+ * -- which means they are a property of this node.
+ * -- ADD TO : this.opt_props_array
+ *
+ */
+
+ public void checkChildren ()
+ {
+
+
+ // look throught he chilren == looking for * prop.. -- fixme might not work..
+
+
+ if (!this.node.hasChildren()) {
+ return;
+ }
+ // look for '*props'
+
+ for (var ii =0; ii< this.node.items.size; ii++) {
+ var pl = this.node.items.get(ii);
+ if (!pl.props.has_key("* prop")) {
+ //newitems.add(pl);
+ continue;
+ }
+
+ //print(JSON.stringify(pl,null,4));
+ // we have a prop...
+ //var prop = pl['*prop'] + '';
+ //delete pl['*prop'];
+ var prop = pl.get("* prop");
+ //print("got prop "+ prop + "\n");
+
+ // name ends in [];
+ if (! Regex.match_simple("\\[\\]$", prop)) {
+ // it's a standard prop..
+
+ // munge property..??
+
+ this.out_nodeprops.set(prop, pl);
+
+ continue;
+ }
+
+
+
+
+ var sprop = prop.replace("[]", "");
+ //print("sprop is : " + sprop + "\n");
+
+ // it's an array type..
+ //var old = "";
+ if (!this.out_props_array.has_key(sprop)) {
+ this.out_props_array.set(sprop, new Gee.ArrayList<Node>());
+ }
+
+
+ this.out_props_array.get(sprop).add( pl);
+ //this.ar_props.set(sprop, nstr);
+
+
+ }
+
+ }
+ /*
+ * Standardize this crap...
+ *
+ * standard properties (use to set)
+ * If they are long values show the dialog..
+ *
+ * someprop : ....
+ * bool is_xxx :: can show a pulldown.. (true/false)
+ * string html
+ * $ string html = string with value interpolated eg. baseURL + ".."
+ * Clutter.ActorAlign x_align (typed) -- shows pulldowns if type is ENUM?
+ * $ untypedvalue = javascript untyped value...
+ * _ string html ... = translatable..
+
+ *
+ * object properties (not part of the GOjbect being wrapped?
+ * # Gee.ArrayList<Xcls_fileitem> fileitems
+ *
+ * signals
+ * @ void open
+ *
+ * methods -- always text editor..
+ * | void clearFiles
+ * | someJSmethod
+ *
+ * specials
+ * * prop -- string
+ * * args -- string
+ * * ctor -- string
+ * * init -- big string?
+ *
+ * event handlers (listeners)
+ * just shown
+ *
+ * -----------------
+ * special ID values
+ * +XXXX -- indicates it's a instance property / not glob...
+ * *XXXX -- skip writing glob property (used as classes that can be created...)
+ *
+ *
+ */
+ public void readProps()
+ {
+ string left;
+ Regex func_regex ;
+
+ try {
+ func_regex = new Regex("^\\s+|\\s+$");
+ } catch (RegexError e) {
+ print("failed to build regex");
+ return;
+ }
+ // sort the key's so they always get rendered in the same order..
+
+ var keys = new Gee.ArrayList<string>();
+ var piter = this.node.props.map_iterator();
+ while (piter.next() ) {
+ string k;
+ string ktype;
+ string kflag;
+ this.node.normalize_key(piter.get_key(), out k, out kflag, out ktype);
+
+ keys.add(k);
+ }
+
+ keys.sort(( a, b) => {
+ return ((string)a).collate((string)b);
+ //if (a == b) return 0;
+ //return a < b ? -1 : 1;
+ });
+
+ var has_cms = this.node.has("cms-id");
+
+ for (var i = 0; i< keys.size; i++) {
+ var key = this.node.get_key(keys.get(i));
+ //("ADD KEY %s\n", key);
+ string k;
+ string ktype;
+ string kflag;
+
+ this.node.normalize_key(key, out k, out kflag, out ktype);
+
+
+ var v = this.node.get(key);
+
+
+ //if (this.skip.contains(k) ) {
+ // continue;
+ //}
+ if ( Regex.match_simple("\\[\\]$", k)) {
+ // array .. not supported... here?
+
+
+ }
+
+ string leftv = k;
+ // skip builder stuff. prefixed with '.' .. just like unix fs..
+ if (kflag == ".") { // |. or . -- do not output..
+ continue;
+ }
+ if (kflag == "*") {
+ // ignore '* prop'; ???
+ continue;
+ }
+
+ // handle cms-id // html
+ if (has_cms && k == "cms-id") {
+ continue; // ignore it...
+ }
+ // html must not be a dynamic property...
+ // note - we do not translate this either...
+ if (has_cms && k == "html" && kflag != "$") {
+
+
+ this.out_props.set("html", "Pman.Cms.content(" +
+ this.node.quoteString(this.renderer.name + "::" + this.node.get("cms-id")) +
+ ", " +
+ this.node.quoteString(v) +
+ ")");
+
+ continue;
+ }
+
+
+
+
+ if (Lang.isKeyword(leftv) || Lang.isBuiltin(leftv)) {
+ left = "'" + leftv + "'";
+ } else if (Regex.match_simple("[^A-Za-z_]+",leftv)) { // not plain a-z... - quoted.
+ var val = this.node.quoteString(leftv);
+
+ left = "'" + val.substring(1, val.length-2).replace("'", "\\'") + "'";
+ } else {
+ left = leftv;
+ }
+
+
+ // next.. is it a function.. or a raw string..
+ if (
+ kflag == "|"
+ ||
+ kflag == "$"
+ ||
+ ktype == "function"
+
+ // ??? any others that are raw output..
+ ) {
+ // does not hapepnd with arrays..
+ if (v.length < 1) { //if (typeof(el) == 'string' && !obj[i].length) { //skip empty.
+ continue;
+ }
+ /*
+ print(v);
+ string str = "";
+ try {
+ str = func_regex.replace(v,v.length, 0, "");
+ } catch(Error e) {
+ print("regex failed");
+ return "";
+ }
+ */
+ var str = v.strip();
+
+ var lines = str.split("\n");
+ var nstr = "" + str;
+ if (lines.length > 0) {
+ nstr = string.joinv("\n" + this.pad, lines);
+ //nstr = string.joinv("\n", lines);
+ }
+ this.out_props.set(left, nstr);
+
+
+
+
+
+ //print("==> " + str + "\n");
+ //this.els.add(left + " : "+ nstr);
+ continue;
+ }
+ // standard..
+
+
+ if (
+ Lang.isNumber(v)
+ ||
+ Lang.isBoolean(v)
+ ||
+ ktype.down() == "boolean"
+ ||
+ ktype.down() == "bool"
+ ||
+ ktype.down() == "number"
+ ||
+ ktype.down() == "int"
+ ) { // boolean or number...?
+ this.out_props.set(left, v.down());
+ //this.els.add(left + " : " + v.down() );
+ continue;
+ }
+
+ // is it a translated string?
+
+
+
+
+ // strings..
+ //if (this.doubleStringProps.size < 1) {
+ // this.els.add(left + this.node.quoteString(v));
+ // continue;
+ //}
+
+ if ((this.doubleStringProps.index_of(k) > -1) ||
+ (ktype.down() == "string" && k[0] == '_')
+
+ ) {
+ // then use the translated version...
+
+ var com = " /* " +
+ (v.split("\n").length > 1 ?
+ ("\n" + this.pad + string.joinv(this.pad + "\n", v.split("\n")).replace("*/", "* - /") + "\n" + this.pad + "*/ ") :
+ (v.replace("*/", "* - /") + " */")
+ );
+
+ //this.els.add(left + " : _this._strings['" +
+ // GLib.Checksum.compute_for_string (ChecksumType.MD5, v) +
+ // "']"
+ //);
+ this.out_props.set(left, "_this._strings['" +
+ GLib.Checksum.compute_for_string (ChecksumType.MD5, v.strip()) +
+ "']" + com);
+ continue;
+ }
+
+ // otherwise it needs to be encapsulated.. as single quotes..
+
+ var vv = this.node.quoteString(v);
+ // single quote.. v.substring(1, v.length-1).replace("'", "\\'") + "'";
+ //this.els.add(left + " : " + "'" + vv.substring(1, vv.length-2).replace("'", "\\'") + "'");
+ this.out_props.set(left, "'" + vv.substring(1, vv.length-2).replace("'", "\\'") + "'");
+
+
+
+
+ }
+ }
+
+ public void readListeners()
+ {
+
+ if (this.node.listeners.size < 1) {
+ return;
+ }
+ // munge the listeners.
+ //print("ADDING listeners?");
+
+
+
+
+ var keys = new Gee.ArrayList<string>();
+ var piter = this.node.listeners.map_iterator();
+ while (piter.next() ) {
+
+ keys.add(piter.get_key());
+ }
+ keys.sort(( a, b) => {
+ return ((string)a).collate((string)b);
+ //if (a == b) return 0;
+ //return a < b ? -1 : 1;
+ });
+
+
+ for (var i = 0; i< keys.size; i++) {
+ var key = keys.get(i);
+ var val = this.node.listeners.get(key);
+
+
+ //
+ var str = val.strip();
+ var lines = str.split("\n");
+ if (lines.length > 0) {
+ //str = string.joinv("\n" + this.pad + " ", lines);
+ str = string.joinv("\n" + this.pad + indent_str + indent_str , lines);
+ }
+
+ this.out_listeners.set(key.replace("|", "") ,str);
+
+
+ }
+
+
+
+ }
+
+ public void iterChildren()
+ {
+
+
+ // finally munge the children...
+ if (this.node.items.size < 1) {
+ return;
+ }
+ var itms = "items : [\n";
+ //var n = 0;
+ for(var i = 0; i < this.node.items.size;i++) {
+ var ele = this.node.items.get(i);
+ if (ele.props.has_key("* prop")) {
+ continue;
+ }
+
+ this.out_children.add(ele);
+
+ }
+ itms += "\n"+ this.pad + "]" + "\n";
+ //this.els.add(itms);
+ }
+
+ // finally output listeners...
+
+ public void xIncludeToString()
+ {
+
+
+ }
+
+}
+
+
+
+
--- /dev/null
+/**
+ *
+ * Code to convert node tree to Vala...
+ *
+ * usage : x = (new JsRender.NodeToVala(node)).munge();
+ *
+ *
+ *
+ *
+ *
+*/
+
+
+
+
+public class JsRender.NodeToVala : Object {
+
+ Node node;
+
+ int depth;
+ string inpad;
+ string pad;
+ string ipad;
+ string cls;
+ string xcls;
+
+ string ret;
+
+ int cur_line;
+
+ Gee.ArrayList<string> ignoreList;
+ Gee.ArrayList<string> ignoreWrappedList;
+ Gee.ArrayList<string> myvars;
+ Gee.ArrayList<Node> vitems; // top level items
+ NodeToVala top;
+ JsRender file;
+
+ /*
+ * ctor - just initializes things
+ * - wraps a render node
+ */
+ public NodeToVala( Node node, int depth, NodeToVala? parent)
+ {
+
+
+ this.node = node;
+ this.depth = depth;
+ this.inpad = string.nfill(depth > 0 ? 4 : 0, ' ');
+ this.pad = this.inpad + " ";
+ this.ipad = this.inpad + " ";
+ this.cls = node.xvala_cls;
+ this.xcls = node.xvala_xcls;
+ this.ret = "";
+ this.cur_line = parent == null ? 0 : parent.cur_line;
+
+
+ this.top = parent == null ? this : parent.top;
+ this.ignoreList = new Gee.ArrayList<string>();
+ this.ignoreWrappedList = new Gee.ArrayList<string>();
+ this.myvars = new Gee.ArrayList<string>();
+ this.vitems = new Gee.ArrayList<Node>();
+ this.file = null;
+
+ // initialize line data..
+ node.line_start = this.cur_line;
+ node.line_end = this.cur_line;
+ node.lines = new Gee.ArrayList<int>();
+ node.line_map = new Gee.HashMap<int,string>();
+ if (parent == null) {
+ node.node_lines = new Gee.ArrayList<int>();
+ node.node_lines_map = new Gee.HashMap<int,Node>();
+ }
+
+ }
+
+ public int vcnt = 0;
+ string toValaNS(Node item)
+ {
+ var ns = item.get("xns") ;
+ if (ns == "GtkSource") {
+ return "Gtk.Source";
+ }
+ return ns + ".";
+ }
+ public void toValaName(Node item, int depth =0)
+ {
+ this.vcnt++;
+
+ var ns = this.toValaNS(item) ;
+ var cls = ns + item.get("xtype");
+
+
+ item.xvala_cls = cls;
+
+
+ string id = item.get("id").length > 0 ?
+ item.get("id") : "%s%d".printf(item.get("xtype"), this.vcnt);
+
+
+
+
+ if (id[0] == '*' || id[0] == '+') {
+ item.xvala_xcls = "Xcls_" + id.substring(1);
+ } else {
+ item.xvala_xcls = "Xcls_" + id;
+ }
+
+
+ item.xvala_id = id;
+ if (depth > 0) {
+ this.vitems.add(item);
+ } else if (!item.props.has_key("id")) {
+ // use the file name..
+ item.xvala_xcls = this.file.name;
+ // is id used?
+ item.xvala_id = this.file.name;
+
+ }
+ // loop children..
+
+ if (item.items.size < 1) {
+ return;
+ }
+ for(var i =0;i<item.items.size;i++) {
+ this.toValaName(item.items.get(i), depth+1);
+ }
+
+ }
+ /**
+ * Main entry point to convert a file into a string..
+ */
+ public static string mungeFile(JsRender file)
+ {
+ if (file.tree == null) {
+ return "";
+ }
+
+ var n = new NodeToVala(file.tree, 0, null);
+ n.file = file;
+ n.vcnt = 0;
+
+ n.toValaName(file.tree);
+
+
+ GLib.debug("top cls %s / xlcs %s\n ",file.tree.xvala_cls,file.tree.xvala_cls);
+ n.cls = file.tree.xvala_cls;
+ n.xcls = file.tree.xvala_xcls;
+ return n.munge();
+
+
+ }
+
+ public string munge ( )
+ {
+ //return this.mungeToString(this.node);
+
+ this.ignore("pack");
+ this.ignore("init");
+ this.ignore("xns");
+ this.ignore("xtype");
+ this.ignore("id");
+
+ this.globalVars();
+ this.classHeader();
+ this.addSingleton();
+ this.addTopProperties();
+ this.addMyVars();
+ this.addPlusProperties();
+ this.addValaCtor();
+ this.addUnderThis();
+ this.addWrappedCtor();
+
+ this.addInitMyVars();
+ this.addWrappedProperties();
+ this.addChildren();
+ this.addInit();
+ this.addListeners();
+ this.addEndCtor();
+ this.addUserMethods();
+ this.iterChildren();
+
+ return this.ret;
+
+
+ }
+ public string mungeChild( Node cnode)
+ {
+ var x = new NodeToVala(cnode, this.depth+1, this);
+ return x.munge();
+ }
+ public void addLine(string str= "")
+ {
+ this.cur_line++;
+ //this.ret += "/*%d*/ ".printf(this.cur_line-1) + str + "\n";
+ this.ret += str + "\n";
+ }
+ public void addMultiLine(string str= "")
+ {
+
+ this.cur_line += str.split("\n").length;
+ //this.ret += "/*%d*/ ".printf(l) + str + "\n";
+ this.ret += str + "\n";
+ }
+
+
+ public void globalVars()
+ {
+ if (this.depth > 0) {
+ return;
+ }
+ // Global Vars..??? when did this get removed..?
+ //this.ret += this.inpad + "public static " + this.xcls + " " + this.node.xvala_id+ ";\n\n";
+
+ this.addLine(this.inpad + "static " + this.xcls + " _" + this.node.xvala_id+ ";");
+ this.addLine();
+
+ }
+
+ void classHeader()
+ {
+
+ // class header..
+ // class xxx { WrappedGtk el; }
+ this.node.line_start = this.cur_line;
+
+ this.top.node.setNodeLine(this.cur_line, this.node);
+
+ this.addLine(inpad + "public class " + this.xcls + " : Object");
+ this.addLine(this.inpad + "{");
+
+
+ this.addLine(this.pad + "public " + this.cls + " el;");
+
+ this.addLine(this.pad + "private " + this.top.xcls + " _this;");
+ this.addLine();
+
+
+
+ // singleton
+ }
+ void addSingleton()
+ {
+ if (depth > 0) {
+ return;
+ }
+ this.addLine(pad + "public static " + xcls + " singleton()");
+ this.addLine(this.pad + "{");
+ this.addLine(this.ipad + "if (_" + this.node.xvala_id + " == null) {");
+ this.addLine(this.ipad + " _" + this.node.xvala_id + "= new "+ this.xcls + "();"); // what about args?
+ this.addLine(this.ipad + "}");
+ this.addLine(this.ipad + "return _" + this.node.xvala_id +";");
+ this.addLine(this.pad + "}");
+ }
+
+ /**
+ * when ID is used... on an element, it registeres a property on the top level...
+ * so that _this.ID always works..
+ *
+ */
+ void addTopProperties()
+ {
+ if (this.depth > 0) {
+ return;
+ }
+ // properties - global..??
+
+ var iter = this.vitems.list_iterator();
+ while(iter.next()) {
+ var n = iter.get();
+
+
+ if (!n.props.has_key("id") || n.xvala_id.length < 0) {
+ continue;
+
+ }
+ if (n.xvala_id[0] == '*') {
+ continue;
+ }
+ if (n.xvala_id[0] == '+') {
+ continue;
+ }
+ this.addLine(this.pad + "public " + n.xvala_xcls + " " + n.xvala_id + ";");
+
+ }
+
+ }
+ /**
+ * create properties that are not 'part of the wrapped element.
+ *
+ *
+ */
+
+ void addMyVars()
+ {
+ this.addLine();
+ this.addLine(this.ipad + "// my vars (def)");
+
+
+
+ var cls = Palete.Gir.factoryFqn(this.node.fqn());
+
+ if (cls == null) {
+ return;
+ }
+
+
+ // Key = TYPE:name
+ var iter = this.node.props.map_iterator();
+ while (iter.next()) {
+ var k = iter.get_key();
+ if (this.shouldIgnore(k)) {
+ continue;
+ }
+ var vv = k.strip().split(" ");
+ // user defined method
+ if (vv[0] == "|") {
+ continue;
+ }
+ if (vv[0] == "*") {
+ continue;
+ }
+
+ if (vv[0] == "@") {
+ this.node.setLine(this.cur_line, "p", k);
+ this.addLine(this.pad + "public signal" + k.substring(1) + " " + iter.get_value() + ";");
+
+ this.ignore(k);
+ continue;
+ }
+ var min = (vv[0] == "$" || vv[0] == "#") ? 3 : 2;
+ if (vv.length < min) {
+ // skip 'old js style properties without a type'
+ continue;
+ }
+
+ var kname = vv[vv.length-1];
+
+ if (this.shouldIgnore(kname)) {
+ continue;
+ }
+
+ // is it a class property...
+ if (cls.props.has_key(kname) && vv[0] != "#") {
+ continue;
+ }
+
+ this.myvars.add(k);
+ this.node.setLine(this.cur_line, "p", k);
+
+ this.addLine(this.pad + "public " +
+ (k[0] == '$' || k[0] == '#' ? k.substring(2) : k ) + ";");
+
+ this.ignore(k);
+
+
+ }
+ }
+
+ // if id of child is '+' then it's a property of this..
+ void addPlusProperties()
+ {
+ if (this.node.items.size < 1) {
+ return;
+ }
+ var iter = this.node.items.list_iterator();
+ while (iter.next()) {
+ var ci = iter.get();
+
+ if (ci.xvala_id[0] != '+') {
+ continue; // skip generation of children?
+
+ }
+
+ this.addLine(this.pad + "public " + ci.xvala_xcls + " " + ci.xvala_id.substring(1) + ";");
+
+
+ }
+ }
+ /**
+ * add the constructor definition..
+ */
+ void addValaCtor()
+ {
+
+
+ // .vala props..
+
+ string[] cargs = {};
+ var cargs_str = "";
+ // ctor..
+ this.addLine();
+ this.addLine(this.pad + "// ctor");
+
+ if (this.node.has("* args")) {
+ // not sure what this is supposed to be ding..
+
+ cargs_str = ", " + this.node.get("* args");
+ //var ar = this.node.get("* args");.split(",");
+ //for (var ari =0; ari < ar.length; ari++) {
+ // cargs += (ar[ari].trim().split(" ").pop();
+ // }
+ }
+
+ if (this.depth < 1) {
+
+ // top level - does not pass the top level element..
+ this.addLine(this.pad + "public " + this.xcls + "(" + cargs_str +")");
+ this.addLine(this.pad + "{");
+ } else {
+
+ // for sub classes = we passs the top level as _owner
+ this.addLine(this.pad + "public " + this.xcls + "(" + this.top.xcls + " _owner " + cargs_str + ")");
+ this.addLine(this.pad + "{");
+ }
+
+
+ }
+ /**
+ * make sure _this is defined..
+ */
+ void addUnderThis()
+ {
+ // public static?
+ if (depth < 1) {
+ this.addLine( this.ipad + "_this = this;");
+ return;
+ }
+ // for non top level = _this point to owner, and _this.ID is set
+
+ this.addLine( this.ipad + "_this = _owner;");
+
+ if (this.node.props.has_key("id")
+ &&
+ this.node.xvala_id != ""
+ &&
+ this.node.xvala_id[0] != '*'
+ &&
+ this.node.xvala_id[0] != '+'
+ ) {
+ this.addLine( this.ipad + "_this." + node.xvala_id + " = this;");
+
+ }
+
+ }
+ /**
+ * Initialize this.el to point to the wrapped element.
+ *
+ *
+ */
+
+ void addWrappedCtor()
+ {
+ // wrapped ctor..
+ // this may need to look up properties to fill in the arguments..
+ // introspection does not workk..... - as things like gtkmessagedialog
+ /*
+ if (cls == 'Gtk.Table') {
+
+ var methods = this.palete.getPropertiesFor(cls, 'methods');
+
+ print(JSON.stringify(this.palete.proplist[cls], null,4));
+ Seed.quit();
+ }
+ */
+ if (this.node.has("* ctor")) {
+ this.node.setLine(this.cur_line, "p", "* ctor");
+ this.addLine(this.ipad + "this.el = " + this.node.get("* ctor")+ ";");
+ return;
+ }
+
+ var default_ctor = Palete.Gir.factoryFqn(this.node.fqn() + ".new");
+
+
+ if (default_ctor != null && default_ctor.paramset != null && default_ctor.paramset.params.size > 0) {
+ string[] args = {};
+ var iter =default_ctor.paramset.params.list_iterator();
+ while (iter.next()) {
+ var n = iter.get().name;
+ if (!this.node.has(n)) {
+
+ if (iter.get().type.contains("int")) {
+ args += "0";
+ continue;
+ }
+ if (iter.get().type.contains("float")) {
+ args += "0f";
+ continue;
+ }
+ if (iter.get().type.contains("bool")) {
+ args += "true"; // always default to true?
+ continue;
+ }
+ // any other types???
+
+ args += "null";
+ continue;
+ }
+ this.ignoreWrapped(n);
+ this.ignore(n);
+
+ var v = this.node.get(n);
+
+ if (iter.get().type == "string") {
+ v = "\"" + v.escape("") + "\"";
+ }
+ if (v == "TRUE" || v == "FALSE") {
+ v = v.down();
+ }
+
+
+ args += v;
+
+ }
+ this.node.setLine(this.cur_line, "p", "* xtype");
+
+ this.addLine(this.ipad + "this.el = new " + cls + "( "+ string.joinv(", ",args) + " );") ;
+ return;
+
+ }
+ this.node.setLine(this.cur_line, "p", "* xtype");;
+
+ this.addLine(this.ipad + "this.el = new " + this.cls + "();");
+
+
+ }
+
+ void addInitMyVars()
+ {
+ //var meths = this.palete.getPropertiesFor(item['|xns'] + '.' + item.xtype, 'methods');
+ //print(JSON.stringify(meths,null,4));Seed.quit();
+
+
+
+ // initialize.. my vars..
+ this.addLine();
+ this.addLine( this.ipad + "// my vars (dec)");
+
+ var iter = this.myvars.list_iterator();
+ while(iter.next()) {
+
+ var k = iter.get();
+
+ var ar = k.strip().split(" ");
+ var kname = ar[ar.length-1];
+
+ var v = this.node.props.get(k);
+ // ignore signals..
+ if (v.length < 1) {
+ continue;
+ }
+ if (v == "FALSE" || v == "TRUE") {
+ v = v.down();
+ }
+ //FIXME -- check for raw string.. "string XXXX"
+
+ // if it's a string...
+
+
+ this.addLine(this.ipad + "this." + kname + " = " + v +";");
+ }
+ }
+
+
+
+
+
+ void addWrappedProperties()
+ {
+ var cls = Palete.Gir.factoryFqn(this.node.fqn());
+ if (cls == null) {
+ return;
+ }
+ // what are the properties of this class???
+ this.addLine();
+ this.addLine(this.ipad + "// set gobject values");
+
+
+ var iter = cls.props.map_iterator();
+ while (iter.next()) {
+ var p = iter.get_key();
+ //print("Check Write %s\n", p);
+ if (!this.node.has(p)) {
+ continue;
+ }
+ if (this.shouldIgnoreWrapped(p)) {
+ continue;
+ }
+
+ this.ignore(p);
+ var v = this.node.get(p);
+
+ var nodekey = this.node.get_key(p);
+
+ // user defined properties.
+ if (nodekey[0] == '#') {
+ continue;
+ }
+
+
+
+ var is_raw = nodekey[0] == '$';
+
+ // what's the type.. - if it's a string.. then we quote it..
+ if (iter.get_value().type == "string" && !is_raw) {
+ v = "\"" + v.escape("") + "\"";
+ }
+ if (v == "TRUE" || v == "FALSE") {
+ v = v.down();
+ }
+ if (iter.get_value().type == "float" && v[v.length-1] != 'f') {
+ v += "f";
+ }
+
+
+ this.addLine("%sthis.el.%s = %s;".printf(ipad,p,v)); // // %s, iter.get_value().type);
+
+ // got a property..
+
+
+ }
+
+ }
+ /**
+ * pack the children into the parent.
+ *
+ * if the child's id starts with '*' then it is not packed...
+ * - this allows you to define children and add them manually..
+ */
+
+ void addChildren()
+ {
+ //code
+ if (this.node.items.size < 1) {
+ return;
+ }
+
+ var iter = this.node.items.list_iterator();
+ var i = -1;
+ while (iter.next()) {
+ i++;
+
+ var ci = iter.get();
+
+ if (ci.xvala_id[0] == '*') {
+ continue; // skip generation of children?
+ }
+
+ var xargs = "";
+ if (ci.has("* args")) {
+
+ var ar = ci.get("* args").split(",");
+ for (var ari = 0 ; ari < ar.length; ari++ ) {
+ var arg = ar[ari].split(" ");
+ xargs += "," + arg[arg.length -1];
+ }
+ }
+ // create the element..
+ this.addLine(this.ipad + "var child_" + "%d".printf(i) + " = new " + ci.xvala_xcls +
+ "( _this " + xargs + ");" );
+
+ // this is only needed if it does not have an ID???
+ this.addLine(this.ipad + "child_" + "%d".printf(i) +".ref();"); // we need to reference increase unnamed children...
+
+ if (ci.has("* prop")) {
+ this.addLine(ipad + "this.el." + ci.get("* prop") + " = child_" + "%d".printf(i) + ".el;");
+ continue;
+ }
+
+
+ // not sure why we have 'true' in pack?!?
+ if (!ci.has("pack") || ci.get("pack").down() == "false" || ci.get("pack").down() == "true") {
+ continue;
+ }
+
+ string[] packing = { "add" };
+ if (ci.has("pack")) {
+ packing = ci.get("pack").split(",");
+ }
+
+ var pack = packing[0];
+ this.addLine(this.ipad + "this.el." + pack.strip() + " ( child_" + "%d".printf(i) + ".el " +
+ (packing.length > 1 ?
+ (", " + string.joinv(",", packing).substring(pack.length+1))
+ :
+ ""
+ ) + " );");
+
+
+ if (ci.xvala_id[0] != '+') {
+ continue; // skip generation of children?
+
+ }
+ // this.{id - without the '+'} = the element...
+ this.addLine(this.ipad + "this." + ci.xvala_id.substring(1) + " = child_" + "%d".printf(i) + ";");
+
+ }
+ }
+
+ void addInit()
+ {
+
+
+ if (!this.node.has("init")) {
+ return;
+ }
+ this.addLine();
+ this.addLine(ipad + "// init method");
+ this.addLine();
+ this.node.setLine(this.cur_line, "p", "init");
+
+ this.addMultiLine(ipad + this.padMultiline(ipad, this.node.get("init")) );
+
+ }
+ void addListeners()
+ {
+ if (this.node.listeners.size < 1) {
+ return;
+ }
+
+ this.addLine();
+ this.addLine(ipad + "//listeners");
+
+
+
+ var iter = this.node.listeners.map_iterator();
+ while (iter.next()) {
+ var k = iter.get_key();
+ var v = iter.get_value();
+
+ this.node.setLine(this.cur_line, "l", k);
+ this.addMultiLine(this.ipad + "this.el." + k + ".connect( " +
+ this.padMultiline(this.ipad,v) +");");
+
+ }
+ }
+ void addEndCtor()
+ {
+
+ // end ctor..
+ this.addLine(this.pad + "}");
+ }
+
+
+ /*
+ * Standardize this crap...
+ *
+ * standard properties (use to set)
+ * If they are long values show the dialog..
+ *
+ * someprop : ....
+ * bool is_xxx :: can show a pulldown.. (true/false)
+ * string html
+ * $ string html = string with value interpolated eg. baseURL + ".."
+ * Clutter.ActorAlign x_align (typed) -- shows pulldowns if type is ENUM?
+ * $ untypedvalue = javascript untyped value...
+ * _ string html ... = translatable..
+
+ *
+ * object properties (not part of the GOjbect being wrapped?
+ * # Gee.ArrayList<Xcls_fileitem> fileitems
+ *
+ * signals
+ * @ void open
+ *
+ * methods -- always text editor..
+ * | void clearFiles
+ * | someJSmethod
+ *
+ * specials
+ * * prop -- string
+ * * args -- string
+ * * ctor -- string
+ * * init -- big string?
+ *
+ * event handlers (listeners)
+ * just shown
+ *
+ * -----------------
+ * special ID values
+ * +XXXX -- indicates it's a instance property / not glob...
+ * *XXXX -- skip writing glob property (used as classes that can be created...)
+ *
+ *
+ */
+
+ void addUserMethods()
+ {
+ this.addLine();
+ this.addLine(this.pad + "// user defined functions");
+
+ // user defined functions...
+ var iter = this.node.props.map_iterator();
+ while(iter.next()) {
+ var k = iter.get_key();
+ if (this.shouldIgnore(k)) {
+ continue;
+ }
+ // HOW TO DETERIME if its a method?
+ if (k[0] != '|') {
+ //strbuilder("\n" + pad + "// skip " + k + " - not pipe \n");
+ continue;
+ }
+
+ // function in the format of {type} (args) { .... }
+ var kk = k.substring(2);
+ var vv = iter.get_value();
+ this.node.setLine(this.cur_line, "p", k);
+ this.addMultiLine(this.pad + "public " + kk + " " + this.padMultiline(this.pad, vv));;
+
+
+ }
+ }
+
+ void iterChildren()
+ {
+ this.node.line_end = this.cur_line;
+ this.node.sortLines();
+
+
+ if (this.depth > 0) {
+ this.addLine(this.inpad + "}");
+ }
+
+ var iter = this.node.items.list_iterator();
+
+ while (iter.next()) {
+ this.addMultiLine(this.mungeChild(iter.get()));
+ }
+
+ if (this.depth < 1) {
+ this.addLine(this.inpad + "}");
+ }
+
+ }
+
+ string padMultiline(string pad, string str)
+ {
+ var ar = str.strip().split("\n");
+ return string.joinv("\n" + pad , ar);
+ }
+
+ void ignore(string i) {
+ this.ignoreList.add(i);
+
+ }
+ void ignoreWrapped(string i) {
+ this.ignoreWrappedList.add(i);
+
+ }
+ bool shouldIgnore(string i)
+ {
+ return ignoreList.contains(i);
+ }
+ bool shouldIgnoreWrapped(string i)
+ {
+ return ignoreWrappedList.contains(i);
+ }
+
+}
+
+
+
+
+
+
--- /dev/null
+
+/**
+ *
+ * this is the code represents a File when using the Gtk view..
+ *
+ * It ues NodeToGtk
+ *
+ *
+ */
+
+namespace JsRender {
+
+
+
+ int plid = 1;
+
+
+ public class PlainFile : JsRender
+ {
+ string contents;
+
+ public PlainFile(Project.Project project, string path) {
+
+ base( project, path);
+ this.xtype = "PlainFile";
+
+ // if the file does not exist...
+ if (GLib.FileUtils.test(path, GLib.FileTest.EXISTS)) {
+ var f = File.new_for_path (path) ;
+ var info = f.query_info ("standard::*", 0);
+ var ct = info.get_content_type();
+ this.content_type = ct;
+ } else {
+ this.content_type = "text/plain"; // hopefully..
+// var ar = path.split(".");
+ // var ext = ar[ar.length -1]; // hopefully not fail...
+
+ // switch(ext) {
+ // case "vala";
+ this.loaded = true;
+
+
+ }
+
+ this.language = "";
+
+ // fixme...
+
+
+ this.contents = "";
+
+ // super?!?!
+ this.id = "file-plain-%d".printf(plid++);
+ //console.dump(this);
+ // various loader methods..
+
+ // Class = list of arguments ... and which property to use as a value.
+
+
+
+
+ }
+
+
+ /*
+ setNSID : function(id)
+ {
+
+ this.items[0]['*class'] = id;
+
+
+ },
+ getType: function() {
+ return 'Gtk';
+ },
+ */
+
+ public override void removeFiles() {
+ if (FileUtils.test(this.path, FileTest.EXISTS)) {
+ GLib.FileUtils.remove(this.path);
+ }
+
+ }
+
+ public override void loadItems() throws GLib.Error // : function(cb, sync) == original was async.
+ {
+ if (this.loaded) {
+ return;
+ }
+ GLib.FileUtils.get_contents(this.path, out this.contents);
+ this.loaded = true;
+ }
+
+
+
+ public override string toSourcePreview()
+ {
+ return "";
+ }
+ public override void setSource(string str) {
+ this.contents = str;
+ }
+ public override string toSource()
+ {
+ return this.contents;
+
+
+
+ }
+ public override string toSourceCode()
+ {
+ return this.contents;
+
+
+
+ }
+ public override void save() {
+ if (!this.loaded) {
+ print("Ignoring Save - as file was never loaded?\n");
+ return;
+ }
+ try {
+ this.writeFile(this.path, this.contents);
+ } catch (GLib.Error e) {
+ // error ???
+ }
+
+ }
+ // ignore these calls.
+ public override void saveHTML ( string html ) {}
+
+
+ /**
+ * saveJS
+ *
+ * save as a javascript file.
+ * why is this not save...???
+ *
+ */
+
+
+ string getHelpUrl(string cls)
+ {
+ return "";
+ }
+ public override void findTransStrings(Node? node )
+ {
+ // not yet..
+ }
+
+
+
+
+
+
+ }
+}
+
+
+
--- /dev/null
+/*
+ * Renderer for Javascript output (roo library based)
+ *
+ * - translation support
+ * - doubleStringProps contains elements that are 'translable'
+ * ** in the old method this our compression tool could extract them
+ * - the new idea is to make a list at the top of the javascript file
+ * and output a map...
+ *
+ *
+ *
+ *
+ *
+ */
+namespace JsRender {
+
+ static int rid = 0;
+
+ class Roo : JsRender
+ {
+ string region;
+ bool disabled;
+
+
+
+ public Roo(Project.Project project, string path) {
+ base( project, path);
+ this.xtype = "Roo";
+ this.language = "js";
+
+ this.content_type = "";
+
+ //this.items = false;
+ //if (cfg.json) {
+ // var jstr = JSON.parse(cfg.json);
+ // this.items = [ jstr ];
+ // //console.log(cfg.items.length);
+ // delete cfg.json; // not needed!
+ // }
+ this.modOrder = "001"; /// sequence id that this uses.
+ this.region = "center";
+ this.disabled = false;
+
+ // super?!?!
+ this.id = "file-roo-%d".printf(rid++);
+ //console.dump(this);
+ // various loader methods..
+
+ string[] dsp = {
+ "title",
+ "legend",
+ "loadingText",
+ "emptyText",
+ "qtip",
+ "value",
+ "text",
+ "emptyMsg",
+ "displayMsg",
+ "html",
+ "headline",
+ "header",
+ "placeholder",
+ "fieldLabel",
+
+ };
+ for (var i=0;i<dsp.length;i++) {
+ this.doubleStringProps.add(dsp[i]);
+ }
+
+
+ }
+
+
+
+ public override void removeFiles() {
+ var html = GLib.Path.get_dirname(this.path) +"/templates/" + name + ".html";
+ if (FileUtils.test(html, FileTest.EXISTS)) {
+ GLib.FileUtils.remove(html);
+ }
+ var js = GLib.Path.get_dirname(this.path) +"/" + name + ".html";
+ if (FileUtils.test(js, FileTest.EXISTS)) {
+ GLib.FileUtils.remove(js);
+ }
+ }
+
+ public override void loadItems() throws GLib.Error // : function(cb, sync) == original was async.
+ {
+
+
+ GLib.debug("load Items!");
+ if (this.tree != null) {
+ return;
+ }
+ GLib.debug("load " + this.path);
+
+ var pa = new Json.Parser();
+ pa.load_from_file(this.path);
+ var node = pa.get_root();
+
+ if (node.get_node_type () != Json.NodeType.OBJECT) {
+ throw new Error.INVALID_FORMAT ("Unexpected element type %s", node.type_name ());
+ }
+ var obj = node.get_object ();
+
+
+ this.modOrder = this.jsonHasOrEmpty(obj, "modOrder");
+ this.name = this.jsonHasOrEmpty(obj, "name");
+ this.parent = this.jsonHasOrEmpty(obj, "parent");
+ this.permname = this.jsonHasOrEmpty(obj, "permname");
+ this.title = this.jsonHasOrEmpty(obj, "title");
+ this.modOrder = this.jsonHasOrEmpty(obj, "modOrder");
+
+ var bjs_version_str = this.jsonHasOrEmpty(obj, "bjs-version");
+ bjs_version_str = bjs_version_str == "" ? "1" : bjs_version_str;
+
+
+ // load items[0] ??? into tree...
+ if (obj.has_member("items")
+ &&
+ obj.get_member("items").get_node_type() == Json.NodeType.ARRAY
+ &&
+ obj.get_array_member("items").get_length() > 0
+ ) {
+ this.tree = new Node();
+ var ar = obj.get_array_member("items");
+ var tree_base = ar.get_object_element(0);
+ this.tree.loadFromJson(tree_base, int.parse(bjs_version_str));
+ }
+ this.loaded = true;
+ this.toSource(); // force it to number the lines...
+
+
+ }
+
+
+ public override void save()
+ {
+
+ GLib.debug("--- JsRender.Roo.save");
+ GLib.debug("save() - reset transStrings\n");
+ this.transStrings = new Gee.HashMap<string,string>();
+ this.findTransStrings(this.tree);
+
+ this.saveBJS();
+
+ // no tree..
+ if (this.tree == null) {
+ return;
+ }
+ // now write the js file..
+ string js;
+ try {
+ Regex regex = new Regex("\\.(bjs|js)$");
+
+ js = regex.replace(this.path,this.path.length , 0 , ".js");
+ } catch (RegexError e) {
+ this.name = "???";
+ print("count not make filename from path");
+ return;
+ }
+
+
+ //var d = new Date();
+ var js_src = this.toSource();
+ //print("TO SOURCE in " + ((new Date()) - d) + "ms");
+ try {
+ this.writeFile(js, js_src);
+ } catch (FileError e ) {
+ print("Save failed\n");
+ }
+ // for bootstrap - we can write the HTML to the templates directory..
+
+ //var top = this.guessName(this.items[0]);
+ //print ("TOP = " + top)
+
+
+
+
+ }
+
+
+
+
+ public override void saveHTML ( string html )
+ {
+
+ var top = this.tree.fqn();
+ GLib.debug ("TOP = " + top + "\n" );
+ if (top.index_of("Roo.bootstrap.") < 0 &&
+ top.index_of("Roo.mailer.") < 0
+ ) {
+ return;
+ }
+
+
+ //now write the js file..
+ string fn;
+ try {
+ Regex regex = new Regex("\\.(bjs|js)$");
+
+ fn = regex.replace(this.path,this.path.length , 0 , ".html");
+ } catch (RegexError e) {
+ this.name = "???";
+ print("count not make filename from path");
+ return;
+ }
+ var bn = GLib.Path.get_basename(fn);
+ var dn = GLib.Path.get_dirname(fn);
+
+ var targetdir = dn + (
+ top.index_of("Roo.mailer.") < 0 ? "/templates" : "" );
+
+
+ if (!FileUtils.test(targetdir, FileTest.IS_DIR)) {
+ print("Skip save - templates folder does not exist : %s\n", targetdir);
+ return;
+ }
+ //print("SAVE HTML -- %s\n%s\n",targetdir + "/" + bn, html);
+ try {
+ this.writeFile(targetdir + "/" + bn , html);
+ } catch (FileError e ) {
+ print("SaveHtml failed\n");
+ }
+
+
+
+ }
+
+ public Gee.ArrayList<string> findxincludes(Node node, Gee.ArrayList<string> ret)
+ {
+
+ if (node.props.has_key("* xinclude")) {
+ ret.add(node.props.get("* xinclude"));
+ }
+ for (var i =0; i < node.items.size; i++) {
+ this.findxincludes(node.items.get(i), ret);
+ }
+ return ret;
+
+ }
+
+
+
+ public override void findTransStrings(Node? node )
+ {
+ // iterate properties...
+ // use doubleStringProps
+
+ // flagging a translatable string..
+ // the code would use string _astring to indicate a translatable string
+ // the to use it it would do String.format(this._message, somedata);
+
+ // loop through and find string starting with '_'
+ if (node == null) {
+ return;
+ }
+
+ var iter = node.props.map_iterator();
+ while (iter.next()) {
+ // key formats : XXXX
+ // XXX - plain
+ // string XXX - with type
+ // $ XXX - with flag (no type)
+ // $ string XXX - with flag
+ string kname;
+ string ktype;
+ string kflag;
+ node.normalize_key(iter.get_key(), out kname, out kflag, out ktype);
+ if (kflag == "$") {
+ continue;
+ }
+ // skip cms-id nodes...
+ if (kname == "html" && node.has("cms-id")) {
+ continue;
+ }
+
+ var str = iter.get_value();
+ if (this.doubleStringProps.index_of(kname) > -1) {
+ GLib.debug("flag=%s type=%s name=%s : %s\n", kflag,ktype,kname,str);
+ this.transStrings.set(str,
+ GLib.Checksum.compute_for_string (ChecksumType.MD5, str.strip())
+ );
+ continue;
+ }
+
+ if (ktype.down() == "string" && kname[0] == '_') {
+ GLib.debug("flag=%s type=%s name=%s : %s\n", kflag,ktype,kname,str);
+ this.transStrings.set(str,
+ GLib.Checksum.compute_for_string (ChecksumType.MD5, str.strip())
+ );
+ continue;
+ }
+
+ }
+
+
+
+ // iterate children..
+ for (var i =0; i < node.items.size; i++) {
+ this.findTransStrings(node.items.get(i) );
+ }
+
+
+ }
+
+ public string transStringsToJs()
+ {
+
+ GLib.debug("Roo.transStringsToJs()\n");
+ if (this.transStrings.size < 1) {
+ GLib.debug("Roo.transStringsToJs() size < 1?\n");
+ return "";
+ }
+
+ string[] kvs = {};
+ var iter = this.transStrings.map_iterator();
+ while (iter.next()) {
+ kvs += (" '" + iter.get_value() + "' :" +
+ this.tree.quoteString(iter.get_key())
+ );
+ }
+ return " _strings : {\n" + string.joinv(",\n", kvs) + "\n" +
+ " },";
+
+
+
+
+ }
+
+ /**
+ * javascript used in Webkit preview
+ */
+
+ public override string toSourcePreview()
+ {
+ print("toSourcePreview() - reset transStrings\n");
+ this.transStrings = new Gee.HashMap<string,string>();
+
+
+ print("to source preview\n");
+ if (this.tree == null) {
+ return "";
+ }
+ this.findTransStrings(this.tree);
+ var top = this.tree.fqn();
+ var xinc = new Gee.ArrayList<string>();
+
+ this.findxincludes(this.tree, xinc);
+ print("got %d xincludes\n", xinc.size);
+ var prefix_data = "";
+ if (xinc.size > 0 ) {
+ for(var i = 0; i < xinc.size; i++) {
+ print("check xinclude: %s\n", xinc.get(i));
+ var sf = this.project.getByName(xinc.get(i));
+ if (sf == null) {
+ print("Failed to find file by name?\n");
+ continue;
+ }
+
+ sf.loadItems();
+ sf.findTransStrings(sf.tree);
+ var xinc_str = sf.toSource();
+
+ //string xinc_str;
+ //FileUtils.get_contents(js, out xinc_str);
+ prefix_data += "\n" + xinc_str + "\n";
+
+ }
+
+ }
+
+
+
+ //print(JSON.stringify(this.items, null,4));
+
+ if (top == null) {
+ print ("guessname returned false");
+ return "";
+ }
+
+
+ if (top.contains("Dialog")) {
+ return prefix_data + this.toSourceDialog(true);
+ }
+
+ if (top.contains("Modal")) {
+ return prefix_data + this.toSourceModal(true);
+ }
+
+ return prefix_data + this.toSourceLayout(true);
+
+
+
+ }
+ public override void setSource(string str) {}
+ /**
+ * This needs to use some options on the project
+ * to determine how the file is output..
+ *
+ * At present we are hard coding it..
+ *
+ *
+ */
+ public override string toSourceCode()
+ {
+ this.transStrings = new Gee.HashMap<string,string>();
+ this.findTransStrings(this.tree);
+ return this.toSource();
+ }
+
+ public override string toSource()
+ {
+ // dump the file tree back out to a string.
+
+ // we have 2 types = dialogs and components
+ //
+
+
+ if (this.tree == null) {
+ return "";
+ }
+ var top = this.tree.fqn();
+ if (top == null) {
+ return "";
+ }
+
+
+
+ // get the translatable strings.. = we reload them again so calling methods get the right data...
+ this.transStrings = new Gee.HashMap<string,string>();
+ this.findTransStrings(this.tree);
+
+
+ if (top.contains("Dialog")) {
+ return this.toSourceDialog(false);
+ }
+
+ if (top.contains("Modal")) {
+ return this.toSourceModal(false);
+ }
+ return this.toSourceLayout(false);
+
+ /*
+ eventually support 'classes??'
+ return this.toSourceStdClass();
+ */
+
+ }
+
+ /**
+ *
+ * munge JSON tree into Javascript code.
+ *
+ * NOTE - needs a deep copy of original tree, before starting..
+ * - so that it does not modify current..
+ *
+ * FIXME: + or / prefixes to properties hide it from renderer.
+ * FIXME: '*props' - not supported by this.. ?? - upto rendering code..
+ * FIXME: needs to understand what properties might be translatable (eg. double quotes)
+ *
+ * @arg {object} obj the object or array to munge..
+ * @arg {boolean} isListener - is the array being sent a listener..
+ * @arg {string} pad - the padding to indent with.
+ */
+
+ public string mungeToStringWrap(string pad, string prefix, string suffix)
+ {
+ if (this.tree == null) {
+ return "";
+ }
+ var x = new NodeToJs(this.tree, this.doubleStringProps, pad, null);
+ x.renderer = this;
+ x.cur_line = prefix.split("\n").length;
+
+ var ret = x.munge();
+ //var nret = x.ret;
+
+ // output both files.. so we can diff them...
+ //this.writeFile("/tmp/old.js", ret);
+ //this.writeFile("/tmp/new.js", nret);
+ return prefix + ret + suffix;
+
+
+ }
+
+
+
+ public string outputHeader()
+ {
+ string[] s = {
+ "//<script type=\"text/javascript\">",
+ "",
+ "// Auto generated file - created by app.Builder.js- do not edit directly (at present!)",
+ ""
+
+ };
+ var ret= string.joinv("\n",s);
+ var bits = this.name.split(".");
+ if (bits.length > 1) {
+ ret += "\nRoo.namespace(\'" +
+ this.name.substring(0, this.name.length - (bits[bits.length-1].length + 1)) +
+ "');\n";
+
+ }
+ /// genericlly used..
+
+ return ret;
+
+
+ }
+ // a standard dialog module.
+ // fixme - this could be alot neater..
+ public string toSourceDialog(bool isPreview)
+ {
+
+ //var items = JSON.parse(JSON.stringify(this.items[0]));
+
+
+
+
+ string[] adda = { " = {",
+ "",
+ this.transStringsToJs() ,
+ "",
+ " dialog : false,",
+ " callback: false,",
+ "",
+ " show : function(data, cb)",
+ " {",
+ " if (!this.dialog) {",
+ " this.create();",
+ " }",
+ "",
+ " this.callback = cb;",
+ " this.data = data;",
+ " this.dialog.show(this.data._el);",
+ " if (this.form) {",
+ " this.form.reset();",
+ " this.form.setValues(data);",
+ " this.form.fireEvent('actioncomplete', this.form, { type: 'setdata', data: data });",
+ " }",
+ "",
+ " },",
+ "",
+ " create : function()",
+ " {",
+ " var _this = this;",
+ " this.dialog = Roo.factory("
+ };
+ string[] addb = {
+ ");",
+ " }",
+ "};",
+ ""
+ };
+
+ return this.mungeToStringWrap(" ",
+ this.outputHeader() + "\n" + this.name + string.joinv("\n", adda), //header
+ string.joinv("\n", addb) // footer
+ );
+
+
+
+
+ }
+ /**
+ Bootstrap modal dialog
+
+ */
+
+
+ public string toSourceModal(bool isPreview)
+ {
+
+
+ //var items = JSON.parse(JSON.stringify(this.items[0]));
+
+
+ string[] adda = { " = {",
+ "",
+ this.transStringsToJs() ,
+ "",
+ " dialog : false,",
+ " callback: false,",
+ "",
+ " show : function(data, cb)",
+ " {",
+ " if (!this.dialog) {",
+ " this.create();",
+ " }",
+ "",
+ " this.callback = cb;",
+ " this.data = data;",
+ " this.dialog.show(this.data._el);",
+ " if (this.form) {",
+ " this.form.reset();",
+ " this.form.setValues(data);",
+ " this.form.fireEvent('actioncomplete', this.form, { type: 'setdata', data: data });",
+ " }",
+ "",
+ " },",
+ "",
+ " create : function()",
+ " {",
+ " var _this = this;",
+ " this.dialog = Roo.factory("
+ };
+ string[] addb = {
+ " );",
+ " }",
+ "};",
+ ""
+ };
+ return this.mungeToStringWrap(" ",
+ this.outputHeader() + "\n" + this.name + string.joinv("\n", adda), // header
+ string.joinv("\n", addb) // footer
+ );
+
+
+
+ }
+
+
+
+
+
+ public string pathToPart()
+ {
+ var dir = Path.get_basename(Path.get_dirname(this.path));
+ var ar = dir.split(".");
+ var modname = ar[ar.length-1];
+
+ // now we have the 'module name'..
+ var fbits = Path.get_basename(this.path).split(".");
+
+
+ var npart = fbits[fbits.length - 2]; // this should be 'AdminProjectManager' for example...
+ if (modname.length < npart.length && npart.substring(0, modname.length) == modname) {
+ npart = npart.substring(modname.length);
+ }
+ return "[" + this.tree.quoteString(modname) + ", " + this.tree.quoteString(npart) + " ]";
+ //return ret;
+
+
+
+
+ }
+
+ // a layout compoent
+ public string toSourceLayout(bool isPreview)
+ {
+
+
+ if (isPreview) {
+ // topItem.region = 'center';
+ // topItem.background = false;
+ }
+
+ var modkey = this.modOrder + "-" + this.name;
+ try {
+ var reg = new Regex("[^A-Za-z.]+");
+
+ modkey = this.modOrder + "-" + reg.replace(this.name, this.name.length, 0 , "-");
+ } catch (RegexError e) {
+ //noop..
+ }
+ string parent = (this.parent.length > 0 ? "'" + this.parent + "'" : "false");
+
+
+
+ if (isPreview) {
+ // set to false to ensure this is the top level..
+ parent = "false";
+ var topnode = this.tree.fqn();
+ print("topnode = %s\n", topnode);
+ if (GLib.Regex.match_simple("^Roo\\.bootstrap\\.",topnode) &&
+ topnode != "Roo.bootstrap.Body"
+ ) {
+ parent = "\"#bootstrap-body\"";
+ }
+
+ }
+
+
+
+ var pref = this.outputHeader() + "\n" +
+
+ this.name + " = new Roo.XComponent({\n" +
+ "\n" +
+ this.transStringsToJs() + "\n" +
+ "\n" +
+ " part : "+ this.pathToPart() + ",\n" +
+ /// critical used by builder to associate modules/parts/persm
+ " order : '" +modkey+"',\n" +
+ " region : '" + this.region +"',\n" +
+ " parent : "+ parent + ",\n" +
+ " name : " + this.tree.quoteString(this.title.length > 0 ? this.title : "unnamed module") + ",\n" +
+ " disabled : " + (this.disabled ? "true" : "false") +", \n" +
+ " permname : '" + (this.permname.length > 0 ? this.permname : "") +"', \n" +
+
+ // " tree : function() { return this._tree(); },\n" + //BC
+ " _tree : function()\n" +
+ " {\n" +
+ " var _this = this;\n" + // bc
+ " var MODULE = this;\n" + /// this looks like a better name.
+ " return ";
+
+ return this.mungeToStringWrap(" ", pref, ";" +
+ " }\n" +
+ "});\n"
+ );
+
+
+ }
+
+ public new string? guessName (Node? ar) // turns the object into full name.
+ {
+ // eg. xns: Roo, xtype: XXX -> Roo.xxx
+ if (ar == null) {
+ return null;
+ }
+
+ string[] ret = {} ;
+ ret += (ar.get("|xns").length < 1 ? "Roo": ar.get("|xns"));
+
+
+ if ( ar.get("xtype").length < 1) {
+ return null;
+ }
+
+ var xtype = ar.get("xtype");
+
+ if (xtype[0] == '*') { // prefixes????
+ xtype = xtype.substring(1);
+ }
+ if (! Regex.match_simple("^Roo", xtype)) {
+
+ // already starts with roo...
+ ret = {};
+ }
+ ret += xtype;
+ var str = string.joinv(".", ret);
+
+ return str;
+ //
+ //Palete.Palete.factory("Roo").guessName(str);
+
+
+
+ }
+
+ string getHelpUrl(string cls)
+ {
+ return "http://www.roojs.com/roojs1/docs/symbols/" + cls + ".html";
+ }
+
+
+ }
+}
--- /dev/null
+/**
+ * Test the writer code...
+
+
+*/
+
+int main (string[] args) {
+
+
+
+
+ new JsRender.Lang_Class();
+
+ var app = BuilderApplication.singleton( args);
+
+ if (BuilderApplication.opt_debug || BuilderApplication.opt_compile_project == null) {
+ GLib.Log.set_handler(null,
+ GLib.LogLevelFlags.LEVEL_DEBUG | GLib.LogLevelFlags.LEVEL_WARNING,
+ (dom, lvl, msg) => {
+ print("%s: %s\n", dom, msg);
+ });
+ }
+
+
+ if (BuilderApplication.opt_list_projects) {
+
+ //BuilderApplication.compileBjs();
+ Project.Project.loadAll();
+ print("Projects\n %s\n", Project.Project.listAllToString());
+ GLib.Process.exit(Posix.EXIT_SUCCESS);
+ }
+ Project.Project.loadAll();
+
+ if (BuilderApplication.opt_list_projects) {
+
+ //BuilderApplication.compileBjs();
+
+ print("Projects\n %s\n", Project.Project.listAllToString());
+ GLib.Process.exit(Posix.EXIT_SUCCESS);
+ }
+ Project.Project cur_project = null;
+ if (BuilderApplication.opt_compile_project != null) {
+
+
+ cur_project = Project.Project.getProjectByHash( BuilderApplication.opt_compile_project);
+
+ if (cur_project == null) {
+ GLib.error("invalid project %s, use --list-projects to show project ids",BuilderApplication.opt_compile_project);
+ }
+ cur_project.scanDirs();
+
+
+ }
+
+ if (BuilderApplication.opt_list_files) {
+ if (cur_project == null) {
+ GLib.error("missing project, use --project to select which project");
+ }
+ print("Files for %s\n %s\n", cur_project.name, cur_project.listAllFilesToString());
+ GLib.Process.exit(Posix.EXIT_SUCCESS);
+ }
+
+ if (BuilderApplication.opt_bjs_compile != null) {
+ if (cur_project == null) {
+ GLib.error("missing project, use --project to select which project");
+ }
+ var file = cur_project.getByName(BuilderApplication.opt_bjs_compile);
+ if (file == null) {
+ GLib.error("missing file %s in project %s", BuilderApplication.opt_bjs_compile, cur_project.name);
+ }
+ //BuilderApplication.compileBjs();
+ file.loadItems();
+ var str = file.toSourceCode();
+
+
+ if (!BuilderApplication.opt_debug) {
+ print("%s", str);
+ GLib.Process.exit(Posix.EXIT_SUCCESS);
+ }
+
+ // dump the node tree
+ file.tree.dumpProps();
+
+
+ var str_ar = str.split("\n");
+ for(var i =0;i<str_ar.length;i++) {
+ var node = file.tree.lineToNode(i+1);
+ var prop = node == null ? null : node.lineToProp(i+1);
+ print("%d: %s : %s\n",
+ i+1,
+ node == null ? "......" : (prop == null ? "????????" : prop),
+ str_ar[i]
+ );
+ }
+
+ GLib.Process.exit(Posix.EXIT_SUCCESS);
+ }
+
+
+ if (BuilderApplication.opt_compile_target != null) {
+
+ Palete.ValaSourceCompiler.buildApplication();
+
+ GLib.Process.exit(Posix.EXIT_SUCCESS);
+ }
+
+
+
+ GLib.debug("project = %s\n", BuilderApplication.opt_compile_project);
+
+ Gtk.init (ref args);
+
+ GtkClutter.init (ref args);
+
+ GLib.Log.set_always_fatal(LogLevelFlags.LEVEL_ERROR | LogLevelFlags.LEVEL_CRITICAL);
+
+
+
+ // respond to other arguments
+
+ /*var proj = Project.Project.getProject("Pman.Core");
+ if (proj == null) {
+ print("could not load test project Pman.Core");
+ return 0;
+ }
+ proj.scanDirs();
+ */
+
+ var w = Xcls_MainWindow.singleton();
+ //w.ref();
+ //w.project = proj;
+
+ w.el.show_all();
+ // it looks like showall after children causes segfault on ubuntu 14.4
+ w.initChildren();
+ w.windowstate.switchState(WindowState.State.FILES);
+
+ Gtk.main();
+ app = null;
+
+ return 0;
+}
--- /dev/null
+
+
+if HAVE_LIBVALA22
+roobuilder_LIBVALA = --pkg libvala-0.22
+endif
+
+if HAVE_LIBVALA24
+roobuilder_LIBVALA = --pkg libvala-0.24
+endif
+
+if HAVE_LIBVALA26
+roobuilder_LIBVALA = --pkg libvala-0.26
+endif
+
+if HAVE_LIBVALA28
+roobuilder_LIBVALA = --pkg libvala-0.28
+endif
+
+if HAVE_LIBVALA30
+roobuilder_LIBVALA = --pkg libvala-0.30
+endif
+
+if HAVE_LIBVALA32
+roobuilder_LIBVALA = --pkg libvala-0.32
+endif
+
+# gda
+
+
+if HAVE_GDA5
+roobuilder_GDA = --pkg libgda-5.0
+endif
+
+if HAVE_GDA4
+roobuilder_GDA = --pkg libgda-4.0
+endif
+
+
+# webkit
+
+
+if HAVE_WEBKIT4
+roobuilder_WEBKKIT = --pkg webkit2gtk-4.0
+endif
+
+if HAVE_WEBKIT3
+roobuilder_WEBKKIT = --pkg webkit2gtk-3.0
+endif
+
+# vte
+
+if HAVE_VTE_2_91
+roobuilder_VTE = --pkg vte-2.91
+endif
+if HAVE_VTE_2_90
+roobuilder_VTE = --pkg vte-2.90
+endif
+
+# - not sure if needed....
+
+AM_CPPFLAGS = $(ROOBUILDER_CFLAGS) $(WEBKIT_CFLAGS) $(GDA_CFLAGS) $(LIBVALA_CFLAGS) $(JAVASCRIPTCOREGTK_CFLAGS) $(VTE_CFLAGS)
+
+
+bin_PROGRAMS = roobuilder
+
+
+roobuilder_PKGS = \
+ --pkg glib-2.0 \
+ --pkg gobject-2.0 \
+ --pkg gtk+-3.0 \
+ --pkg gtksourceview-3.0 \
+ --pkg libxml-2.0 \
+ --pkg json-glib-1.0 \
+ --pkg gee-1.0 \
+ --pkg gobject-introspection-1.0 \
+ --pkg clutter-gtk-1.0 \
+ --pkg gladeui-2.0 \
+ --pkg libsoup-2.4 \
+ --pkg javascriptcore \
+ --pkg roojspacker-1.0 \
+ $(roobuilder_LIBVALA) \
+ $(roobuilder_GDA) \
+ $(roobuilder_WEBKKIT) \
+ $(roobuilder_JAVASCRIPTCOREGTK) \
+ $(roobuilder_VTE) \
+ --pkg posix
+
+
+BUIDERJSRENDER = \
+ JsRender/Gtk.vala \
+ JsRender/PlainFile.vala \
+ JsRender/JsRender.vala \
+ JsRender/Lang.vala \
+ JsRender/NodeToGlade.vala \
+ JsRender/NodeToGtk.vala \
+ JsRender/NodeToJs.vala \
+ JsRender/NodeToVala.vala \
+ JsRender/Node.vala \
+ JsRender/Roo.vala
+
+BUIDERPALETE = \
+ Palete/Gir.vala \
+ Palete/GirObject.vala \
+ Palete/VapiParser.vala \
+ Palete/Gtk.vala \
+ Palete/RooDatabase.vala \
+ c/jscore_object_call_as_function.c \
+ Palete/Javascript.vala \
+ Palete/Palete.vala \
+ Palete/Roo.vala \
+ Palete/ValaSource.vala \
+ Palete/ValaSourceCompiler.vala \
+ Palete/CompletionProvider.vala
+
+BUIDERPROJECT = \
+ Project/Gtk.vala \
+ Project/Project.vala \
+ Project/Roo.vala
+
+
+BUIDERUI = \
+ Builder4/About.vala \
+ Builder4/DialogConfirm.vala \
+ Builder4/StandardErrorDialog.vala \
+ Builder4/DialogSaveTemplate.vala \
+ Builder4/DialogSaveModule.vala \
+ Builder4/DialogTemplateSelect.vala \
+ Builder4/EditProject.vala \
+ Builder4/Editor.vala \
+ Builder4/ProjectSettings.vala \
+ Builder4/WindowRightPalete.vala \
+ Builder4/WindowLeftTree.vala \
+ Builder4/WindowRooView.vala \
+ Builder4/WindowLeftProps.vala \
+ Builder4/ClutterFiles.vala \
+ Builder4/WindowLeftProjects.vala \
+ Builder4/WindowAddProp.vala \
+ Builder4/GtkView.vala \
+ Builder4/ValaProjectSettings.vala \
+ Builder4/MainWindow.vala \
+ Builder4/WindowState.vala \
+ Builder4/FakeServer.vala \
+ Builder4/DialogPluginWebkit.vala \
+ Builder4/DialogNewComponent.vala \
+ Builder4/PopoverFileDetails.vala \
+ Builder4/ValaCompileErrors.vala \
+ Builder4/ValaCompileResults.vala \
+ Builder4/PopoverProperty.vala
+
+roobuilder_SOURCES = \
+ Application.vala \
+ Main.vala \
+ Spawn.vala \
+ Resources.vala \
+ $(BUIDERJSRENDER) \
+ $(BUIDERPALETE) \
+ $(BUIDERPROJECT) \
+ $(BUIDERUI)
+
+
+
+
+
+
+roobuilder_VALAFLAGS = \
+ --thread -X -lm --target-glib=2.32 --vapidir=$(srcdir)/vapi -g $(roobuilder_PKGS)
+
+roobuilder_LDADD = $(ROOBUILDER_LIBS) $(LIBVALA_LIBS) $(GDA_LIBS) $(WEBKIT_LIBS) $(VTE_LIBS) $(JAVASCRIPTCOREGTK_LIBS)
+
+
+
+CLEANFILES = *.h *.c *.vapi *.stamp
--- /dev/null
+
+using Gtk;
+
+// not sure why - but extending Gtk.SourceCompletionProvider seems to give an error..
+namespace Palete {
+
+ public class CompletionProvider : Object, SourceCompletionProvider
+ {
+ Editor editor;
+ WindowState windowstate;
+ //public List<Gtk.SourceCompletionItem> filtered_proposals;
+
+ public CompletionProvider(Editor editor)
+ {
+ this.editor = editor;
+ this.windowstate = null; // not ready until the UI is built.
+
+ }
+
+ public string get_name ()
+ {
+ return "roojsbuilder";
+ }
+
+ public int get_priority ()
+ {
+ return 200;
+ }
+
+ public bool match (SourceCompletionContext context)
+ {
+ bool has_matches = false;
+ this.fetchMatches(context, out has_matches);
+ return has_matches;
+ }
+
+ public List<SourceCompletionItem>? fetchMatches(SourceCompletionContext context, out bool has_matches)
+ {
+ has_matches = false;
+
+ if (this.windowstate == null) {
+ this.windowstate = this.editor.window.windowstate;
+ }
+
+
+ var buffer = context.completion.view.buffer;
+ var mark = buffer.get_insert ();
+ TextIter end;
+
+ buffer.get_iter_at_mark (out end, mark);
+ var endpos = end;
+
+ var searchpos = endpos;
+
+ searchpos.backward_find_char(is_space, null);
+ searchpos.forward_char();
+ var search = endpos.get_text(searchpos);
+ print("got search %s\n", search);
+
+ if (search.length < 2) {
+ return null;
+ }
+
+ // now do our magic..
+ var filtered_proposals = this.windowstate.file.palete().suggestComplete(
+ this.windowstate.file,
+ this.editor.node,
+ this.editor.ptype,
+ this.editor.key,
+ search
+ );
+
+ print("GOT %d results\n", (int) filtered_proposals.length());
+
+ if (filtered_proposals.length() < 2) {
+ return null;
+ }
+
+ filtered_proposals.sort((a, b) => {
+ return ((string)(a.text)).collate((string)(b.text));
+ });
+ has_matches = true;
+ return filtered_proposals;
+
+ }
+
+ public void populate (SourceCompletionContext context)
+ {
+ bool has_matches = false;
+ var filtered_proposals = this.fetchMatches(context, out has_matches);
+ if (!has_matches) {
+ context.add_proposals (this, null, true);
+ return;
+ }
+ // add proposals triggers a critical error in Gtk - try running gtksourceview/tests/test-completion.
+ // see https://bugzilla.gnome.org/show_bug.cgi?id=758646
+ var fe = GLib.Log.set_always_fatal(0);
+ context.add_proposals (this, filtered_proposals, true);
+ GLib.Log.set_always_fatal(fe);
+ }
+
+
+
+ public bool activate_proposal (SourceCompletionProposal proposal, TextIter iter)
+ {
+ var istart = iter;
+ istart.backward_find_char(is_space, null);
+ istart.forward_char();
+
+ // var search = iter.get_text(istart);
+
+ var buffer = iter.get_buffer();
+ buffer.delete(ref istart, ref iter);
+ buffer.insert(ref istart, proposal.get_text(), -1);
+
+ return true;
+ }
+
+ public SourceCompletionActivation get_activation ()
+ {
+ //if(SettingsManager.Get_Setting("complete_auto") == "true"){
+ return SourceCompletionActivation.INTERACTIVE | SourceCompletionActivation.USER_REQUESTED;
+ //} else {
+ // return Gtk.SourceCompletionActivation.USER_REQUESTED;
+ //}
+ }
+
+ public int get_interactive_delay ()
+ {
+ return -1;
+ }
+
+ public bool get_start_iter (SourceCompletionContext context, SourceCompletionProposal proposal, out TextIter iter)
+ {
+ return false;
+ }
+
+ public void update_info (SourceCompletionProposal proposal, SourceCompletionInfo info)
+ {
+
+ }
+
+ private bool is_space(unichar space){
+ return space.isspace() || space.to_string() == "";
+ }
+
+ private bool is_forward_space(unichar space){
+ return !(
+ space.to_string() == " "
+ ||
+ space.to_string() == ""
+ ||
+ space.to_string() == "\n"
+ ||
+ space.to_string() == ")"
+ ||
+ space.to_string() == "("
+
+ );
+ }
+ }
+
+
+}
+
--- /dev/null
+
+// valac -g --pkg gee-1.0 --pkg libxml-2.0 --pkg gobject-introspection-1.0 --pkg json-glib-1.0 Palete/Gir.vala -o /tmp/Gir
+/*
+public static int main (string[] args) {
+
+ var g = Palete.Gir.factory("Gtk");
+ var test = g.classes.get("ToolButton");
+
+
+ var generator = new Json.Generator ();
+ var n = new Json.Node(Json.NodeType.OBJECT);
+ n.set_object(test.toJSON());
+ generator.set_root(n);
+ generator.indent = 4;
+ generator.pretty = true;
+
+ print(generator.to_data(null));
+ return 0;
+}
+ */
+namespace Palete {
+
+
+
+
+ // Gir - is the libvala based version -
+
+
+ public class Gir : GirObject {
+
+ //Gee.Hashmap<string,what> nodes;
+
+ public Gir (string ns)
+ {
+ base("Package",ns);
+
+ }
+
+ public string doc(string what)
+ {
+ var ar = what.split(".");
+ var cls = this.classes.get(ar[1]);
+ if (ar.length == 2) {
+ return cls.doctxt != null ? cls.doctxt : "";
+ }
+ // return the property.. by default..
+ var pr = cls.props.get(ar[2]);
+ return pr.doctxt != null ? pr.doctxt : "";
+
+ }
+ /**
+ * since constructors from the API from gir or vala do not map
+ * correctly to properties, we have an Gir.overides file in resources
+ * that changes the ctor's for some elements.
+ *
+ */
+
+ public static void checkParamOverride(GirObject c)
+ {
+
+ print("checkParamOverride :check %s\n", c.name);
+ var parset = c.gparent;
+ if (parset == null || parset.nodetype != "Paramset") {
+ print("skip parent not Paramset\n");
+ return;
+ }
+ var method = parset.gparent;
+ // we can do this for pack methods..
+ if (method == null) {
+ print("skip parent.parent is null\n");
+ return;
+ }
+ var cls = method.gparent;
+ if (cls == null || cls.nodetype != "Class") {
+ //print("skip parent.parent.parent not Class\n");
+ return;
+ }
+
+
+
+ c.name = fetchOverride( cls.name, method.name, c.name);
+ }
+ public static bool overrides_loaded = false;
+ public static Gee.HashMap<string,string> overrides;
+
+ public static string fetchOverride( string cls, string method, string param)
+ {
+ // overrides should be in a file Gir.overides
+ // in that "Gtk.Label.new.str" : "label"
+ loadOverrides();
+ var key = "%s.%s.%s".printf(cls,method,param);
+ //print("Chekcing for key %s\n", key);
+ if (!overrides.has_key(key)) {
+ return param;
+ }
+ return overrides.get(key);
+
+
+ }
+
+ public static void loadOverrides(bool force = false)
+ {
+ if (overrides_loaded && ! force) {
+ return;
+ }
+
+ var pa = new Json.Parser();
+ pa.load_from_file(BuilderApplication.configDirectory() + "/resources/Gir.overides");
+ var node = pa.get_root();
+
+ if (node.get_node_type () != Json.NodeType.OBJECT) {
+ throw new GirError.INVALID_FORMAT ("Error loading gir.overides : Unexpected element type %s", node.type_name ());
+ }
+ overrides = new Gee.HashMap<string,string>();
+
+
+ var obj = node.get_object ();
+
+
+ obj.foreach_member((o , key, value) => {
+ //print(key+"\n");
+ var v = obj.get_string_member(key);
+ overrides.set(key, v);
+ });
+
+ overrides_loaded = true;
+
+
+
+ }
+
+ /**
+ * == all static below here...
+ *
+ */
+ public static Gee.HashMap<string,Gir> cache = null;
+
+
+ public static Gir? factory(string ns)
+ {
+ if (cache == null) {
+ cache = new Gee.HashMap<string,Gir>();
+ var a = new VapiParser( );
+ a.create_valac_tree();
+
+ }
+ var ret = cache.get(ns);
+
+
+ /*
+ if (ret == null) {
+
+ var add = new Gir(ns);
+
+ cache.set(ns, add);
+
+ var iter = add.classes.map_iterator();
+ while(iter.next()) {
+ iter.get_value().overlayParent();
+ }
+ // loop again and add the ctor properties.
+ iter = add.classes.map_iterator();
+ while(iter.next()) {
+ iter.get_value().overlayCtorProperties();
+ }
+
+
+ ret = cache.get(ns);
+ }
+ */
+ if (ret != null && !ret.is_overlaid) {
+ ret.is_overlaid = true;
+ var iter = ret.classes.map_iterator();
+ while(iter.next()) {
+ iter.get_value().overlayParent();
+ }
+ // loop again and add the ctor properties.
+ iter = ret.classes.map_iterator();
+ while(iter.next()) {
+ iter.get_value().overlayCtorProperties();
+ }
+
+
+ }
+
+
+
+
+ return ret;
+
+ }
+ public static GirObject? factoryFqn(string fqn)
+ {
+ var bits = fqn.split(".");
+ if (bits.length < 1) {
+ return null;
+ }
+
+ var f = (GirObject)factory(bits[0]);
+
+ if (bits.length == 1 || f ==null) {
+ return f;
+ }
+ return f.fetchByFqn(fqn.substring(bits[0].length+1)); // since classes are stored in fqn format...?
+
+
+ }
+
+
+ /**
+ * guess the fqn of a type == eg. gboolean or Widget etc...
+ */
+ public static string fqtypeLookup(string type, string ns) {
+ var g = factory(ns);
+ if (g.classes.has_key(type)) {
+ return ns + "." + type;
+ }
+ // enums..
+ if (g.consts.has_key(type)) {
+ return ns + "." + type;
+ }
+
+
+ // look at includes..
+ var iter = g.includes.map_iterator();
+ while(iter.next()) {
+ // skip empty namespaces on include..?
+ if ( iter.get_key() == "") {
+ continue;
+ }
+ var ret = fqtypeLookup(type, iter.get_key());
+ if (ret != type) {
+ return ret;
+ }
+ }
+ return type;
+ }
+
+
+
+
+ // needed still - where's it called form..
+ public static string guessDefaultValueForType(string type) {
+ //print("guessDefaultValueForType: %s\n", type);
+ if (type.length < 1 || type.contains(".")) {
+ return "null";
+ }
+ switch(type) {
+ case "gboolean":
+ return "true";
+ case "guint":
+ return "0";
+ case "utf8":
+ return "\"\"";
+ default:
+ return "?"+ type + "?";
+ }
+
+ }
+
+
+
+
+
+
+ }
+
+
+}
--- /dev/null
+/**
+ * This is the old Gir File based API parser..
+ *
+ */
+namespace Palete {
+
+
+
+ public class Gir : GirObject {
+
+ public Gir (string ns)
+ {
+ base(ns);
+ this.load();
+ }
+
+ public void load () {
+
+ var xns = ns == "Glade" ? "Gladeui" : this.name;
+ var gi = GI.Repository.get_default();
+ gi.require(xns, null, 0);
+
+ var ver = gi.get_version(xns);
+ unowned GLib.SList<string> pth = GI.Repository.get_search_path ();
+ var gir_path = pth.nth_data(0).replace("/lib/girepository-1.0", "/share/gir-1.0");
+ // 64bit...
+ gir_path = gir_path.replace("/lib/x86_64-linux-gnu/girepository-1.0", "/share/gir-1.0");
+
+ //console.log(fn);
+
+
+
+ var file = gir_path + "/" + xns + "-" + ver + ".gir";
+ // print("ns: " + ns + "\n");
+ // print("ver: " + ver + "\n");
+ // print(file);
+
+
+ this.ns = ns;
+ //this.nodes = new Gee.Hashmap<string,what>();
+
+ var doc = Xml.Parser.parse_file (file);
+ var root = doc->get_root_element();
+ this.walk( root, (GirObject) this );
+
+ delete doc;
+
+ }
+
+ public void walk(Xml.Node* element, GirObject? parent)
+ {
+ var n = element->get_prop("name");
+ // ignore null or c:include...
+ if (n == null || (element->ns->prefix != null && element->ns->prefix == "c")) {
+ n = "";
+ }
+ //print("%s:%s (%s ==> %s\n", element->ns->prefix , element->name , parent.name , n);
+ switch (element->name) {
+ case "repository":
+ break;
+
+ case "include":
+ parent.includes.set(n, element->get_prop("version"));
+ break;
+
+ case "package":
+ parent.package = n;
+ break;
+
+ case "c:include":
+ break;
+
+ case "namespace":
+ parent.name = n;
+ break;
+
+ case "alias":
+ return;
+ //break; // not handled..
+
+ case "class":
+ var c = new GirObject("Class", parent.name + "." + n);
+ parent.classes.set(n, c);
+ c.ns = this.ns;
+ c.parent = element->get_prop("parent");
+ c.gparent = parent;
+ if (c.parent == null) {
+ c.parent = "";
+ }
+ parent = c;
+ break;
+
+ case "interface":
+ var c = new GirObject("Interface", parent.name + "." + n);
+ c.gparent = parent;
+ parent.classes.set(n, c);
+ c.ns = this.ns;
+ c.ns = parent.name;
+ c.parent = element->get_prop("parent");
+ if (c.parent == null) {
+ c.parent = "";
+ }
+ parent = c;
+ break;
+
+
+ case "doc":
+ parent.doctxt = element->get_content();
+ return;
+
+ case "implements":
+ parent.implements.add(n);
+
+ break;
+
+ case "constructor":
+ var c = new GirObject("Ctor",n);
+ c.ns = this.ns;
+ c.gparent = parent;
+ parent.ctors.set(n,c);
+ parent = c;
+ break;
+
+ case "return-value":
+ var c = new GirObject("Return", "return-value");
+ c.gparent = parent;
+ c.ns = this.ns;
+ parent.return_value = c;
+ parent = c;
+ break;
+
+ case "virtual-method": // not sure...
+ return;
+ /*
+ var c = new GirObject("Signal",n);
+ parent.signals.set(n,c);
+ parent = c;
+ break;
+ */
+ case "signal": // Glib:signal
+ var c = new GirObject("Signal",n.replace("-", "_"));
+ c.gparent = parent;
+ c.ns = this.ns;
+ parent.signals.set(n.replace("-", "_"),c);
+ parent = c;
+ break;
+
+
+
+ case "callback": // not sure...
+ return;
+
+
+ case "type":
+ parent.type = n;
+
+ return; // no children?
+ //break;
+
+ case "method":
+ var c = new GirObject("Method",n);
+ c.gparent = parent;
+ c.ns = this.ns;
+ c.propertyof = parent.name;
+ parent.methods.set(n,c);
+ parent = c;
+ break;
+
+ case "parameters":
+ var c = new GirObject("Paramset",n);
+ c.gparent = parent;
+ c.ns = this.ns;
+ parent.paramset = c;
+ parent = c;
+ break;
+
+ case "instance-parameter":
+ break;
+ // looks like this is the C first arg, that is ignored (as it is
+ // treated as 'this' )
+ var c = new GirObject("Param",n);
+ c.gparent = parent;
+ c.ns = this.ns;
+ c.is_instance = true;
+ parent.params.add(c);
+ parent = c;
+ break;
+
+ case "parameter":
+ var c = new GirObject("Param",n);
+ c.gparent = parent;
+ c.ns = this.ns;
+ parent.params.add(c);
+ parent = c;
+ this.checkParamOverride(c);
+ break;
+
+ case "property":
+ case "field":
+ var c = new GirObject("Prop",n.replace("-", "_"));
+ c.gparent = parent;
+ c.ns = this.ns;
+ c.propertyof = parent.name;
+ parent.props.set(n.replace("-", "_"),c);
+ parent = c;
+ break;
+
+ case "function":
+ var c = new GirObject("Function",n);
+ c.gparent = parent;
+ c.ns = this.ns;
+ parent.methods.set(n,c);
+ parent = c;
+ break;
+
+ case "array":
+ parent.is_array = true;
+ break; // type is added soon..
+
+ case "varargs":
+ parent.is_varargs= true;
+ return;
+
+ case "constant":
+ var c = new GirObject("Const",n);
+ c.gparent = parent;
+ c.value = element->get_prop("value");
+ c.ns = this.ns;
+ parent.consts.set(n,c);
+ parent = c;
+ return;
+ //break;
+ case "bitfield":
+ case "enumeration":
+ var c = new GirObject("Enum",n);
+ c.gparent = parent;
+ c.ns = this.ns;
+ parent.consts.set(n,c);
+
+ parent = c;
+ break;
+
+ case "member":
+ var c = new GirObject("EnumMember",n);
+ c.gparent = parent;
+ c.ns = this.ns;
+ c.value = element->get_prop("value");
+ parent.consts.set(n,c);
+ return;
+ break;
+
+
+ case "doc-deprecated":
+ return;
+
+ case "record": // struct?
+ return;
+
+
+ return;
+ case "prerequisite": // ignore?
+ return;
+ case "union": // ignore?
+ return;
+ default:
+ print("UNHANDLED Gir file element: " + element->name +"\n");
+ return;
+ }
+ /*
+ if (element->name == "signal") {
+ path += ".signal";
+ }
+
+
+ if (element->name == "return-value") {
+ path += ".return-value";
+ }
+ print(path + ":" + element->name + "\n");
+ */
+ //var d = getAttribute(element,'doc');
+ //if (d) {
+ // Seed.print(path + ':' + d);
+ // ret[path] = d;
+ //}
+ for (Xml.Node* iter = element->children; iter != null; iter = iter->next) {
+ if (iter->type == Xml.ElementType.TEXT_NODE) {
+ continue;
+ }
+ this.walk(iter, parent);
+ }
+
+ }
+
+
+ public void checkParamOverride(GirObject c)
+ {
+ var parset = c.gparent;
+ if (parset == null || parset.nodetype != "Paramset") {
+ return;
+ }
+ var method = parset.gparent;
+ if (method == null || method.nodetype != "Ctor") {
+ return;
+ }
+ var cls = method.gparent;
+ if (cls == null || cls.nodetype != "Class") {
+ return;
+ }
+
+
+
+ c.name = this.fetchOverride( cls.name, method.name, c.name);
+ }
+ public static bool overrides_loaded = false;
+ public static Gee.HashMap<string,string> overrides;
+
+ public string fetchOverride( string cls, string method, string param)
+ {
+ // overrides should be in a file Gir.overides
+ // in that "Gtk.Label.new.str" : "label"
+ this.loadOverrides();
+ var key = "%s.%s.%s".printf(cls,method,param);
+ //print("Chekcing for key %s\n", key);
+ if (!overrides.has_key(key)) {
+ return param;
+ }
+ return overrides.get(key);
+
+
+ }
+
+ public void loadOverrides(bool force = false)
+ {
+ if (overrides_loaded && ! force) {
+ return;
+ }
+
+ var pa = new Json.Parser();
+ pa.load_from_file(BuilderApplication.configDirectory() + "/resources/Gir.overides");
+ var node = pa.get_root();
+
+ if (node.get_node_type () != Json.NodeType.OBJECT) {
+ throw new GirError.INVALID_FORMAT ("Error loading gir.overides : Unexpected element type %s", node.type_name ());
+ }
+ overrides = new Gee.HashMap<string,string>();
+
+
+ var obj = node.get_object ();
+
+
+ obj.foreach_member((o , key, value) => {
+ //print(key+"\n");
+
+ var v = obj.get_string_member(key);
+
+
+ overrides.set(key, v);
+
+ });
+
+ overrides_loaded = true;
+
+
+
+ }
+
+ public string doc(string what)
+ {
+ var ar = what.split(".");
+ var cls = this.classes.get(ar[1]);
+ if (ar.length == 2) {
+ return cls.doctxt != null ? cls.doctxt : "";
+ }
+ // return the property.. by default..
+ var pr = cls.props.get(ar[2]);
+ return pr.doctxt != null ? pr.doctxt : "";
+
+ }
+
+ public static Gir? factory(string ns)
+ {
+ if (cache == null) {
+ cache = new Gee.HashMap<string,Gir>();
+ var a = new Palete.VapiParser( );
+ a.create_valac_tree();
+
+
+ }
+ var ret = cache.get(ns);
+ if (ret == null) {
+
+ var add = new Gir(ns);
+
+ cache.set(ns, add);
+
+ var iter = add.classes.map_iterator();
+ while(iter.next()) {
+ iter.get_value().overlayParent();
+ }
+ // loop again and add the ctor properties.
+ iter = add.classes.map_iterator();
+ while(iter.next()) {
+ iter.get_value().overlayCtorProperties();
+ }
+
+
+ ret = cache.get(ns);
+ }
+
+
+ return ret;
+
+ }
+ public static GirObject? factoryFqn(string fqn)
+ {
+ var bits = fqn.split(".");
+ if (bits.length < 1) {
+ return null;
+ }
+
+ var f = (GirObject)factory(bits[0]);
+
+ if (bits.length == 1 || f ==null) {
+ return f;
+ }
+ return f.fetchByFqn(fqn.substring(bits[0].length+1)); // since classes are stored in fqn format...?
+
+
+ }
+
+
+ /**
+ * guess the fqn of a type == eg. gboolean or Widget etc...
+ */
+ public static string fqtypeLookup(string type, string ns) {
+ var g = factory(ns);
+ if (g.classes.has_key(type)) {
+ return ns + "." + type;
+ }
+ // enums..
+ if (g.consts.has_key(type)) {
+ return ns + "." + type;
+ }
+
+
+ // look at includes..
+ var iter = g.includes.map_iterator();
+ while(iter.next()) {
+ // skip empty namespaces on include..?
+ if ( iter.get_key() == "") {
+ continue;
+ }
+ var ret = fqtypeLookup(type, iter.get_key());
+ if (ret != type) {
+ return ret;
+ }
+ }
+ return type;
+ }
+
+
+
+
+ // needed still - where's it called form..
+ public static string guessDefaultValueForType(string type) {
+ //print("guessDefaultValueForType: %s\n", type);
+ if (type.length < 1 || type.contains(".")) {
+ return "null";
+ }
+ switch(type) {
+ case "gboolean":
+ return "true";
+ case "guint":
+ return "0";
+ case "utf8":
+ return "\"\"";
+ default:
+ return "?"+ type + "?";
+ }
+
+ }
--- /dev/null
+/**
+ * This is the base class for representing the vala API
+ *
+ * it was originally based on parsing Gir files - but since then
+ * has evolved into using libvala
+ *
+ *
+ */
+
+
+
+namespace Palete {
+ public errordomain GirError {
+ INVALID_TYPE,
+ NEED_IMPLEMENTING,
+ MISSING_FILE,
+ INVALID_VALUE,
+ INVALID_FORMAT
+ }
+ public class GirObject: Object {
+ public string name;
+ public string ns;
+ public string propertyof;
+ public string type;
+ public string nodetype;
+ public string package;
+ public string direction; // used for vala in/out/ref...
+
+ public GirObject paramset = null;
+ public GirObject return_value = null;
+
+ public bool is_instance;
+ public bool is_array;
+ public bool is_varargs;
+ public bool ctor_only; // specially added ctor properties..
+ public string parent;
+ public string value;
+ // to be filled in...
+
+ public string sig;
+
+ public bool is_overlaid;
+
+ public GirObject gparent;
+ public Gee.ArrayList<GirObject> params;
+ public Gee.ArrayList<string> implements;
+ public Gee.ArrayList<string> inherits; // full list of all classes and interfaces...
+ public Gee.HashMap<string,GirObject> ctors;
+ public Gee.HashMap<string,GirObject> methods;
+ public Gee.HashMap<string,string> includes;
+ public Gee.HashMap<string,GirObject> classes;
+ public Gee.HashMap<string,GirObject> props;
+ public Gee.HashMap<string,GirObject> consts;
+ public Gee.HashMap<string,GirObject> signals;
+
+ public Gee.ArrayList<string> optvalues; // used by Roo only..
+ public string doctxt;
+
+
+
+ public GirObject(string nodetype, string n)
+ {
+ this.nodetype = nodetype;
+ this.name = n;
+ this.ns = "";
+ this.parent = "";
+ this.type = "";
+ this.propertyof = "";
+ this.is_array = false;
+ this.is_instance = false;
+ this.is_varargs = false;
+ this.ctor_only =false;
+ this.doctxt = "";
+
+ this.sig = "";
+
+ this.gparent = null;
+
+ this.implements = new Gee.ArrayList<string>();
+ this.inherits = new Gee.ArrayList<string>(); // list of all ancestors. (interfaces and parents)
+ this.includes = new Gee.HashMap<string,string>();
+
+ this.params = new Gee.ArrayList<GirObject>();
+ this.ctors = new Gee.HashMap<string,GirObject>();
+ this.methods =new Gee.HashMap<string,GirObject>();
+
+ this.classes = new Gee.HashMap<string,GirObject>();
+ this.props = new Gee.HashMap<string,GirObject>();
+ this.consts = new Gee.HashMap<string,GirObject>();
+ this.signals = new Gee.HashMap<string,GirObject>();
+
+ this.optvalues = new Gee.ArrayList<string>();
+ this.is_overlaid = false;
+ this.paramset = null;
+ }
+
+ public string[] inheritsToStringArray()
+ {
+ string[] ret = {};
+ for(var i =0;i< this.inherits.size; i++) {
+ ret += this.inherits.get(i);
+ }
+ return ret;
+
+ }
+
+
+ public void overlayParent()
+ {
+
+ if (this.parent.length < 1 || this.is_overlaid) {
+ this.is_overlaid = true;
+ return;
+ }
+
+ //print("Overlaying " +this.name + " with " + this.parent + "\n");
+
+ var pcls = this.clsToObject( this.parent);
+ if (pcls == null) {
+ return;
+ //throw new GirError.INVALID_VALUE("Could not find class : " +
+ // this.parent + " of " + this.name + " in " + this.ns);
+ }
+
+ pcls.overlayParent( );
+ this.copyFrom(pcls,false);
+ for(var i=0; i < this.implements.size; i++) {
+ var clsname = this.implements.get(i);
+ var picls = this.clsToObject(clsname);
+ this.copyFrom(picls,true);
+ }
+ this.is_overlaid = true;
+
+ }
+
+ public void overlayCtorProperties()
+ {
+ //print("Check overlay Ctor %s\n", this.name);
+ if (!this.ctors.has_key("new")) {
+ return;
+ }
+ var ctor = this.ctors.get("new");
+ if (ctor.paramset == null || ctor.paramset.params.size < 1) {
+ return;
+ }
+ //print("Found Ctor\n");
+ var iter = ctor.paramset.params.list_iterator();
+ while (iter.next()) {
+ var n = iter.get().name;
+
+ if (this.props.has_key(n)) {
+ continue;
+ }
+ if (n == "...") {
+ continue;
+ }
+ //print("Adding prop %s\n", n);
+
+ // it's a new prop..
+ var c = new GirObject("Prop",n);
+ c.gparent = this;
+ c.ns = this.ns;
+ c.propertyof = this.name;
+ c.type = iter.get().type;
+ c.ctor_only = true;
+ this.props.set(n, c);
+ }
+
+
+ }
+
+
+
+ public string fqn() {
+ // not sure if fqn really is correct here...
+ //
+ return this.nodetype == "Class" || this.nodetype=="Interface"
+ ? this.name : (this.ns + this.name);
+ }
+
+ public void copyFrom(GirObject pcls, bool is_interface)
+ {
+
+ this.inherits.add(pcls.fqn());
+
+ var liter = pcls.inherits.list_iterator();
+ while(liter.next()) {
+ if (this.inherits.contains(liter.get())) {
+ continue;
+ }
+ this.inherits.add(liter.get());
+ }
+
+
+ var iter = pcls.methods.map_iterator();
+ while(iter.next()) {
+ if (null != this.methods.get(iter.get_key())) {
+ continue;
+ }
+
+ this.methods.set(iter.get_key(), iter.get_value());
+ }
+
+ iter = pcls.props.map_iterator();
+ while(iter.next()) {
+ if (null != this.props.get(iter.get_key())) {
+ continue;
+ }
+
+ this.props.set(iter.get_key(), iter.get_value());
+ }
+
+ iter = pcls.signals.map_iterator();
+ while(iter.next()) {
+ if (null != this.signals.get(iter.get_key())) {
+ continue;
+ }
+
+ this.signals.set(iter.get_key(), iter.get_value());
+ }
+ }
+
+ public Json.Object toJSON()
+ {
+ var r = new Json.Object();
+ r.set_string_member("nodetype", this.nodetype);
+ r.set_string_member("name", this.name);
+ if (this.propertyof.length > 0) {
+ r.set_string_member("of", this.propertyof);
+ }
+ if (this.type.length > 0) {
+ r.set_string_member("type", this.type);
+ }
+ if (this.parent != null && this.parent.length > 0) {
+ r.set_string_member("parent", this.parent);
+ }
+ if (this.sig.length > 0) {
+ r.set_string_member("sig", this.sig);
+ }
+
+ // is_arary / is_instance / is_varargs..
+
+
+ if (this.inherits.size > 0) {
+ r.set_array_member("inherits", this.toJSONArrayString(this.inherits));
+ }
+
+ if (this.implements.size > 0) {
+ r.set_array_member("implements", this.toJSONArrayString(this.implements));
+ }
+
+ if (this.params.size > 0) {
+ r.set_array_member("params", this.toJSONArrayObject(this.params));
+ }
+ if (this.ctors.size > 0) {
+ r.set_object_member("ctors", this.toJSONObject(this.ctors));
+ }
+ if (this.methods.size > 0) {
+ r.set_object_member("methods", this.toJSONObject(this.methods));
+ }
+ if (this.includes.size > 0) {
+ r.set_object_member("includes", this.toJSONObjectString(this.includes));
+ }
+ if (this.classes.size > 0) {
+ r.set_object_member("classes", this.toJSONObject(this.classes));
+ }
+ if (this.props.size > 0) {
+ r.set_object_member("props", this.toJSONObject(this.props));
+ }
+ if (this.consts.size > 0) {
+ r.set_object_member("consts", this.toJSONObject(this.consts));
+ }
+ if (this.signals.size > 0) {
+ r.set_object_member("signals", this.toJSONObject(this.signals));
+ }
+ if (this.paramset != null) {
+ r.set_object_member("paramset", this.paramset.toJSON());
+ }
+ if (this.return_value != null) {
+ r.set_object_member("return_value", this.return_value.toJSON());
+ }
+ return r;
+ }
+ public Json.Object toJSONObject(Gee.HashMap<string,GirObject> map)
+ {
+ var r = new Json.Object();
+ var iter = map.map_iterator();
+ while(iter.next()) {
+ r.set_object_member(iter.get_key(), iter.get_value().toJSON());
+ }
+ return r;
+ }
+ public Json.Object toJSONObjectString(Gee.HashMap<string,string> map)
+ {
+ var r = new Json.Object();
+ var iter = map.map_iterator();
+ while(iter.next()) {
+ r.set_string_member(iter.get_key(), iter.get_value());
+ }
+ return r;
+ }
+ public Json.Array toJSONArrayString(Gee.ArrayList<string> map)
+ {
+ var r = new Json.Array();
+ for(var i =0;i< map.size;i++) {
+
+ r.add_string_element(map.get(i));
+ }
+ return r;
+ }
+ public Json.Array toJSONArrayObject(Gee.ArrayList<GirObject> map)
+ {
+ var r = new Json.Array();
+ for(var i =0;i< map.size;i++) {
+
+ r.add_object_element(map.get(i).toJSON());
+ }
+ return r;
+ }
+ public string asJSONString()
+ {
+ var generator = new Json.Generator ();
+ generator.indent = 4;
+ generator.pretty = true;
+ var n = new Json.Node(Json.NodeType.OBJECT);
+ n.set_object(this.toJSON());
+ generator.set_root(n);
+
+ return generator.to_data(null);
+ }
+
+
+ public GirObject fetchByFqn(string fqn) {
+ //print("Searching (%s)%s for %s\n", this.nodetype, this.name, fqn);
+ var bits = fqn.split(".");
+
+ var ret = this.classes.get(bits[0]);
+ if (ret != null) {
+ if (bits.length < 2) {
+ return ret;
+ }
+ return ret.fetchByFqn(fqn.substring(bits[0].length+1));
+ }
+
+ ret = this.ctors.get(bits[0]);
+ if (ret != null) {
+ if (bits.length < 2) {
+ return ret;
+ }
+ return ret.fetchByFqn(fqn.substring(bits[0].length+1));
+ }
+
+ ret = this.methods.get(bits[0]);
+ if (ret != null) {
+ if (bits.length < 2) {
+ return ret;
+ }
+ return ret.fetchByFqn(fqn.substring(bits[0].length+1));
+ }
+ ret = this.props.get(bits[0]);
+ if (ret != null) {
+ if (bits.length < 2) {
+ return ret;
+ }
+ return ret.fetchByFqn(fqn.substring(bits[0].length+1));
+ }
+ ret = this.consts.get(bits[0]);
+ if (ret != null) {
+ if (bits.length < 2) {
+ return ret;
+ }
+ return ret.fetchByFqn(fqn.substring(bits[0].length+1));
+ }
+
+ ret = this.signals.get(bits[0]);
+ if (ret != null) {
+ if (bits.length < 2) {
+ return ret;
+ }
+ return ret.fetchByFqn(fqn.substring(bits[0].length+1));
+ }
+ if (this.paramset == null) {
+ return null;
+ }
+ var iter = this.paramset.params.list_iterator();
+ while (iter.next()) {
+ var p = iter.get();
+ if (p.name != bits[0]) {
+ continue;
+ }
+ return p;
+ }
+
+ // fixme - other queires? - enums?
+ return null;
+ }
+ /**
+ * -----------------------------------------------
+ * code relating to the structure loader ....
+ *
+ */
+
+ public GirObject clsToObject(string in_pn)
+ {
+ var pn = in_pn;
+ /*
+
+
+ var gir = Gir.factory (this.ns);
+ if (in_pn.contains(".")) {
+ gir = Gir.factory(in_pn.split(".")[0]);
+ pn = in_pn.split(".")[1];
+ }
+ */
+
+ var gir = Gir.factory (this.ns);
+ if (in_pn.contains(".")) {
+ gir = Gir.factory(in_pn.split(".")[0]);
+ pn = in_pn.split(".")[1];
+ }
+
+
+ return gir.classes.get(pn);
+
+
+ }
+ public string fqtype() {
+ return Gir.fqtypeLookup(this.type, this.ns);
+
+ /* return Gir.fqtypeLookup(this.type, this.ns); */
+ }
+ }
+
+}
--- /dev/null
+using Gtk;
+
+namespace Palete {
+
+
+
+
+
+ public class Introspect.El : Object
+ {
+ public enum eltype {
+ NS,
+ CLASS,
+ METHOD,
+ PROP
+ }
+
+
+ public eltype type;
+ }
+
+
+ public class Gtk : Palete {
+
+ public Gee.ArrayList<string> package_cache;
+
+ public Gtk()
+ {
+
+
+
+ base();
+ this.name = "Gtk";
+ var context = new Vala.CodeContext ();
+
+ this.package_cache = this.loadPackages(Path.get_dirname (context.get_vapi_path("glib-2.0")));
+ this.package_cache.add_all(
+ this.loadPackages(Path.get_dirname (context.get_vapi_path("gee-1.0")))
+ );
+ //this.load();
+ // various loader methods..
+ //this.map = [];
+ //this.load();
+ //this.proplist = {};
+ //this.comments = { };
+ // no parent...
+ }
+
+ public override void load () {
+
+ this.loadUsageFile(BuilderApplication.configDirectory() + "/resources/GtkUsage.txt");
+
+
+ }
+
+ public string doc(string what) {
+ var ns = what.split(".")[0];
+ var gir = Gir.factory(ns);
+ return gir.doc(what);
+
+ //return typeof(this.comments[ns][what]) == 'undefined' ? '' : this.comments[ns][what];
+ }
+
+ // does not handle implements...
+ public override GirObject? getClass(string ename)
+ {
+
+ var es = ename.split(".");
+ var gir = Gir.factory(es[0]);
+
+ return gir.classes.get(es[1]);
+
+ }
+
+ public override Gee.HashMap<string,GirObject> getPropertiesFor(string ename, string type)
+ {
+ //print("Loading for " + ename);
+
+
+
+ // if (typeof(this.proplist[ename]) != 'undefined') {
+ //print("using cache");
+ // return this.proplist[ename][type];
+ //}
+ // use introspection to get lists..
+
+ var es = ename.split(".");
+ var gir = Gir.factory(es[0]);
+
+ var cls = gir.classes.get(es[1]);
+ if (cls == null) {
+ var ret = new Gee.HashMap<string,GirObject>();
+ return ret;
+ //throw new Error.INVALID_VALUE( "Could not find class: " + ename);
+
+ }
+
+ //cls.parseProps();
+ //cls.parseSignals(); // ?? needed for add handler..
+ //cls.parseMethods(); // ?? needed for ??..
+ //cls.parseConstructors(); // ?? needed for ??..
+
+ cls.overlayParent();
+
+ switch (type) {
+ case "props":
+ return cls.props;
+ case "signals":
+ return cls.signals;
+ case "methods":
+ return cls.methods;
+ case "ctors":
+ return cls.ctors;
+ default:
+ throw new Error.INVALID_VALUE( "getPropertiesFor called with: " + type);
+ //var ret = new Gee.HashMap<string,GirObject>();
+ //return ret;
+
+ }
+
+
+ //cls.overlayInterfaces(gir);
+
+
+
+ }
+ public string[] getInheritsFor(string ename)
+ {
+ string[] ret = {};
+
+ var cls = Gir.factoryFqn(ename);
+
+ if (cls == null || cls.nodetype != "Class") {
+ print("getInheritsFor:could not find cls: %s\n", ename);
+ return ret;
+ }
+
+ return cls.inheritsToStringArray();
+
+
+ }
+
+ public override void fillPack(JsRender.Node node,JsRender.Node parent)
+ {
+
+ string inherits = string.joinv(" ",
+ this.getInheritsFor (node.fqn())) + " ";
+ inherits += node.fqn() + " ";
+ //print ("fillPack:Inherits : %s\n", inherits);
+ // parent.fqn() method ( node.fqn()
+ var methods = this.getPropertiesFor (parent.fqn(), "methods");
+
+ var res = new Gee.HashMap<string,string>();
+ var map = methods.map_iterator();
+ while (map.next()) {
+
+ var n = map.get_key();
+ //print ("fillPack:checking method %s\n", n);
+
+ var meth = map.get_value();
+ if (meth.paramset == null || meth.paramset.params.size < 1) {
+ print ("fillPack:c -- no params\n");
+
+ continue;
+ }
+ var fp = meth.paramset.params.get(0);
+
+ var type = Gir.fqtypeLookup(fp.type, meth.ns);
+ print ("fillPack:first param type is %s\n", type);
+
+
+ if (!inherits.contains(" " + type + " ")) {
+ continue;
+ }
+
+
+ var pack = meth.name;
+ for(var i =1; i < meth.paramset.params.size; i++) {
+ var ty = Gir.fqtypeLookup(meth.paramset.params.get(i).type, meth.ns);
+ pack += "," + Gir.guessDefaultValueForType(ty);
+ }
+
+ print ("fillPack:add pack: -- %s\n",pack );
+
+ res.set(meth.name, pack);
+
+
+
+ }
+ if (res.size < 1) {
+ return ;
+ }
+ if (res.has_key("pack_start")) {
+ node.props.set("* pack", res.get("pack_start"));
+ return;
+ }
+ if (res.has_key("add")) {
+ node.props.set("* pack", res.get("add"));
+ return;
+ }
+ var riter = res.map_iterator();
+ while(riter.next()) {
+ node.props.set("* pack", riter.get_value());
+ return;
+ }
+
+
+ }
+ public Gee.ArrayList<string> packages(Project.Gtk gproject)
+ {
+ var vapidirs = gproject.vapidirs();
+ var ret = new Gee.ArrayList<string>();
+ ret.add_all(this.package_cache);
+ for(var i = 0; i < vapidirs.length;i++) {
+ var add = this.loadPackages(vapidirs[i]);
+ for (var j=0; j < add.size; j++) {
+ if (ret.contains(add.get(j))) {
+ continue;
+ }
+ ret.add(add.get(j));
+ }
+
+ }
+
+ return ret;
+ }
+
+ public Gee.ArrayList<string> loadPackages(string dirname)
+ {
+
+ var ret = new Gee.ArrayList<string>();
+ //this.package_cache = new Gee.ArrayList<string>();
+
+ if (!GLib.FileUtils.test(dirname, FileTest.IS_DIR)) {
+ print("opps package directory %s does not exist", dirname);
+ return ret;
+ }
+
+ var dir = File.new_for_path(dirname);
+
+
+ try {
+ var file_enum = dir.enumerate_children(
+ GLib.FileAttribute.STANDARD_DISPLAY_NAME,
+ GLib.FileQueryInfoFlags.NONE,
+ null
+ );
+
+
+ FileInfo next_file;
+ while ((next_file = file_enum.next_file(null)) != null) {
+ var fn = next_file.get_display_name();
+ if (!Regex.match_simple("\\.vapi$", fn)) {
+ continue;
+ }
+ ret.add(Path.get_basename(fn).replace(".vapi", ""));
+ }
+ } catch(Error e) {
+ print("oops - something went wrong scanning the packages\n");
+ }
+ return ret;
+
+
+ }
+ public override bool typeOptions(string fqn, string key, string type, out string[] opts)
+ {
+ opts = {};
+ print("get typeOptions %s (%s)%s", fqn, type, key);
+ if (type.up() == "BOOL" || type.up() == "BOOLEAN") {
+ opts = { "true", "false" };
+ return true;
+ }
+ var gir= Gir.factoryFqn(type) ;
+ if (gir == null) {
+ print("could not find Gir data for %s\n", key);
+ return false;
+ }
+ print ("Got type %s", gir.asJSONString());
+ if (gir.nodetype != "Enum") {
+ return false;
+ }
+ string[] ret = {};
+ var iter = gir.consts.map_iterator();
+ while(iter.next()) {
+
+ ret += (type + "." + iter.get_value().name);
+ }
+
+ if (ret.length > 0) {
+ opts = ret;
+ return true;
+ }
+
+
+ return false;
+
+ }
+
+ public override List<SourceCompletionItem> suggestComplete(
+ JsRender.JsRender file,
+ JsRender.Node? node,
+ string proptype,
+ string key,
+ string complete_string
+ ) {
+
+ var ret = new List<SourceCompletionItem>();
+ // completion rules??
+
+ // make sure data is loaded
+ Gir.factory("Gtk");
+
+ // Roo......
+
+ // this. (based on the node type)
+ // this.xxx // Node and any determination...
+
+ if (complete_string.index_of(".",0) < 0) {
+ // string does not have a '.'
+ // offer up vala keywords... / _this .. / look for var string = .. in the code..
+
+ var max = (int)Vala.TokenType.YIELD +1;
+ for (var i =0; i < max;i++) {
+ var m = (Vala.TokenType)i;
+ var s = m.to_string();
+ var ss = s.slice(1,-1);
+ if (s[0] == '`' && GLib.Regex.match_simple("^[a-z]+$", ss) &&
+ complete_string != ss && ss.index_of(complete_string,0) == 0 ) {
+ ret.append(new SourceCompletionItem (ss, ss, null, "vala : " + ss));
+ }
+ }
+ var miter = Gir.cache.map_iterator();
+ while (miter.next()) {
+ var ss = miter.get_key();
+
+ if (complete_string != ss && ss.index_of(complete_string,0) == 0 ) {
+ ret.append(new SourceCompletionItem (ss, ss, null, "vala namespace : " + ss));
+ }
+ }
+
+
+ if (complete_string != "_this" && "_this".index_of(complete_string,0) == 0 ) { // should we ignore exact matches... ???
+ ret.append(new SourceCompletionItem ("_this - the top level element", "_this", null, "Top level element"));
+ }
+ // basic types..
+
+ return ret;
+ }
+
+
+ // got at least one ".".
+ var parts = complete_string.split(".");
+ var curtype = "";
+ var cur_instance = false;
+ if (parts[0] == "this") {
+ // work out from the node, what the type is...
+ if (node == null) {
+ print("node is empty - no return\n");
+ return ret; // no idea..
+ }
+ curtype = "*" + node.fqn();
+ cur_instance = true;
+ } else {
+ if (Gir.cache.get(parts[0]) == null) {
+ return ret;
+ }
+ curtype = parts[0];
+ }
+ // all Gtk.... etc.. types...
+
+
+ //if (parts[0] == "Roo") {
+ // curtype = "Roo";
+ // cur_instance = false;
+ //}
+
+ var prevbits = parts[0] + ".";
+ for(var i =1; i < parts.length; i++) {
+ print("matching %d/%d\n", i, parts.length);
+ var is_last = i == parts.length -1;
+
+
+
+ // look up all the properties of the type...
+ var cls = Gir.factoryFqn(curtype);
+ if (cls == null && curtype[0] != '*') {
+ print("could not get class of curtype %s\n", curtype);
+ return ret;
+ }
+
+ if (!is_last) {
+
+ if (curtype[0] == '*' && parts[i] == "el") {
+ curtype = curtype.substring(1);
+ prevbits += parts[i] + ".";
+ continue;
+ }
+
+ // only exact matches from here on...
+ if (cur_instance) {
+ if (cls == null) {
+ return ret;
+ }
+ if (cls.props.has_key(parts[i])) {
+ var prop = cls.props.get(parts[i]);
+ if (prop.type.index_of(".",0) > -1) {
+ // type is another roo object..
+ curtype = prop.type;
+ prevbits += parts[i] + ".";
+ continue;
+ }
+ return ret;
+ }
+
+
+
+ // check methods?? - we do not export that at present..
+ return ret; //no idea...
+ }
+ var look = prevbits + parts[i];
+ var scls = Gir.factoryFqn(look);
+ if (scls == null) {
+ return ret;
+ }
+ curtype = look;
+ prevbits += parts[i] + ".";
+ continue;
+
+ }
+
+ // got to the last element..
+ print("Got last element\n");
+ if (curtype == "") { // should not happen.. we would have returned already..
+ return ret;
+ }
+ print("Got last element type %s\n",curtype);
+ if (!cur_instance) {
+ print("matching instance");
+ // it's a static reference..
+ var citer = cls.classes.map_iterator();
+ while (citer.next()) {
+ var scls = citer.get_key();
+
+ if (parts[i].length > 0 && scls.index_of(parts[i],0) != 0) {
+ continue;
+ }
+ // got a starting match..
+ ret.append(new SourceCompletionItem (
+ prevbits + scls,
+ prevbits + scls,
+ null,
+ scls));
+ }
+ // methods....
+ citer = cls.methods.map_iterator();
+ while (citer.next()) {
+ var scls = citer.get_key();
+
+ if (parts[i].length > 0 && scls.index_of(parts[i],0) != 0) {
+ continue;
+ }
+ // got a starting match..
+ ret.append(new SourceCompletionItem (
+ prevbits + scls + citer.get_value().sig ,
+ prevbits + scls,
+ null,
+ scls));
+ }
+
+ // enums....
+ citer = cls.consts.map_iterator();
+ while (citer.next()) {
+ var scls = citer.get_key();
+
+ if (parts[i].length > 0 && scls.index_of(parts[i],0) != 0) {
+ continue;
+ }
+ // got a starting match..
+ ret.append(new SourceCompletionItem (
+ prevbits + scls + citer.get_value().sig ,
+ prevbits + scls,
+ null,
+ scls));
+ }
+
+
+ return ret;
+ }
+ print("matching property");
+ if (cls == null) {
+ return ret;
+ }
+
+
+ var citer = cls.methods.map_iterator();
+ while (citer.next()) {
+ var prop = citer.get_value();
+ // does the name start with ...
+ if (parts[i].length > 0 && prop.name.index_of(parts[i],0) != 0) {
+ continue;
+ }
+ // got a matching property...
+ // return type?
+ ret.append(new SourceCompletionItem (
+ prop.name + prop.sig + " : ("+ prop.propertyof + ")",
+ prevbits + prop.name + "(",
+ null,
+ prop.doctxt));
+ }
+
+ // get the properties / methods and subclasses.. of cls..
+ // we have cls.. - see if the string matches any of the properties..
+ citer = cls.props.map_iterator();
+ while (citer.next()) {
+ var prop = citer.get_value();
+ // does the name start with ...
+ if (parts[i].length > 0 && prop.name.index_of(parts[i],0) != 0) {
+ continue;
+ }
+ // got a matching property...
+
+ ret.append(new SourceCompletionItem (
+ prop.name + " : " + prop.type + " ("+ prop.propertyof + ")",
+ prevbits + prop.name,
+ null,
+ prop.doctxt));
+ }
+
+
+ return ret;
+
+
+
+
+
+ }
+
+
+
+
+
+
+ return ret;
+ }
+
+ }
+}
+
--- /dev/null
+
+extern JSCore.Value jscore_object_call_as_function(
+ JSCore.Context ctx,
+ JSCore.Object object,
+ JSCore.Object thisObject,
+ string val,
+ out JSCore.Value exception
+ );
+
+
+
+
+namespace Palete {
+
+ public errordomain JavascriptError {
+ MISSING_METHOD,
+ MISSING_FILE
+
+ }
+
+ Javascript instance = null;
+
+ public class Javascript {
+
+
+ public static JSCore.Object class_constructor(
+ JSCore.Context ctx,
+ JSCore.Object constructor,
+ JSCore.Value[] arguments,
+ out JSCore.Value exception)
+ {
+ var c = new JSCore.Class (class_definition);
+ var o = new JSCore.Object (ctx, c, null);
+ exception = null;
+ return o;
+ }
+ static const JSCore.StaticFunction[] class_functions = {
+ { null, null, 0 }
+ };
+ static const JSCore.ClassDefinition class_definition = {
+ 0,
+ JSCore.ClassAttribute.None,
+ "App",
+ null,
+
+ null,
+ class_functions,
+
+ null,
+ null,
+
+ null,
+ null,
+ null,
+ null,
+
+ null,
+ null,
+ class_constructor,
+ null,
+ null
+ };
+
+
+ public JSCore.GlobalContext js_global_context = null;
+
+ public static Javascript singleton()
+ {
+ if (instance == null) {
+ instance = new Javascript();
+ }
+ return instance;
+ }
+ public Javascript()
+ {
+ var goc = new JSCore.Class( class_definition );
+ this.js_global_context = new JSCore.GlobalContext(goc);
+
+
+ }
+ public int validate(string code, out string res)
+ {
+ JSCore.Value ex;
+ unowned JSCore.GlobalContext ctx = this.js_global_context;
+ var ret = this.js_global_context.check_script_syntax(
+ new JSCore.String.with_utf8_c_string(code),
+ null,
+ 0,
+ out ex
+ );
+ res = "";
+ if (ex.is_null(ctx)) {
+ return -1;
+ }
+
+
+ var exo = ex.to_object(ctx, null);
+ unowned JSCore.PropertyNameArray property_names = exo.copy_property_names (ctx);
+
+
+
+
+ var js_string = new JSCore.String.with_utf8_c_string("line");
+ var line = exo.get_property(ctx, js_string, null).to_number(ctx,null);
+
+
+
+ // see if we can convert exception string
+ char *c_string = new char[1024];
+ var err_string = ex.to_string_copy (ctx, null);
+ err_string.get_utf8_c_string (c_string, 1023);
+ res = (string)c_string;
+ //print ("Error on line %d\n%s\n", (int)line, res);
+
+ var rline = (int) line;
+
+ return rline > 0 ? rline -1 : 0;
+
+
+ }
+ /**
+ * extension API concept..
+ * javascript file.. loaded into jscore,
+ * then a method is called, with a string argument (json encoded)
+ *
+ */
+ public string executeFile(string fname, string call_method, string js_data)
+ throws JavascriptError
+ {
+ string file_data;
+ if (!FileUtils.test (fname, FileTest.EXISTS)) {
+ throw new JavascriptError.MISSING_FILE("Plugin: file not found %s", fname);
+ }
+
+ FileUtils.get_contents(fname, out file_data);
+
+ var jfile_data = new JSCore.String.with_utf8_c_string(file_data);
+ var jmethod = new JSCore.String.with_utf8_c_string(call_method);
+ //var json_args = new JSCore.String.with_utf8_c_string(js_data);
+
+ JSCore.Value exa;
+ JSCore.Value exb;
+ unowned JSCore.Value exc;
+ JSCore.Value exd;
+ unowned JSCore.Value exe;
+
+ var goc = new JSCore.Class( class_definition );
+ var ctx = new JSCore.GlobalContext(goc);
+ var othis = ctx.get_global_object();
+
+ var eval = ctx.evaluate_script (
+ jfile_data,
+ othis,
+ null,
+ 0,
+ out exa
+ );
+
+
+ if (!othis.has_property(ctx,jmethod)) {
+ throw new JavascriptError.MISSING_METHOD ("Plugin: missing method %s", call_method);
+
+ }
+
+ var val = othis.get_property (ctx, jmethod, out exb);
+
+ if (!val.is_object(ctx)) {
+ throw new JavascriptError.MISSING_METHOD ("Plugin: not a property not found %s", call_method);
+ }
+ var oval = val.to_object(ctx, out exc);
+
+ if (!oval.is_function(ctx)) {
+ throw new JavascriptError.MISSING_METHOD ("Plugin: not a method %s", call_method);
+ }
+
+
+ var res = jscore_object_call_as_function(
+ ctx, oval, othis, js_data, out exd
+ );
+ // this will never work, as we can not create arrays of Values - due to no
+ // free function being available..
+ //var args = new JSCore.Value[1] ;
+ //args[0] = new JSCore.Value.string(ctx,json_args) ;
+
+ //unowned JSCore.Value res = oval.call_as_function(ctx, othis, null, out exd);
+ // extract the text value from res...
+ JSCore.String sv = res.to_string_copy ( ctx, out exe);
+ var length = sv.get_maximum_utf8_c_string_size();
+ var buf = new char[length];
+
+ sv.get_utf8_c_string( buf, length);
+
+
+ print("ret:%s\n",(string) buf);
+ return (string) buf;
+
+ }
+
+
+
+ }
+
+
+
+
+}
+
--- /dev/null
+
+using Gtk;
+namespace Palete
+{
+
+
+ public errordomain Error {
+ INVALID_TYPE,
+ NEED_IMPLEMENTING,
+ MISSING_FILE,
+ INVALID_VALUE
+ }
+
+ public class Usage : Object
+ {
+ public Gee.ArrayList<string> left;
+ public Gee.ArrayList<string> right;
+ public Usage(Gee.ArrayList<string> ileft, Gee.ArrayList<string> iright)
+ {
+ this.left = ileft;
+ this.right= iright;
+ }
+ public bool leftHas(string s)
+ {
+ for(var i = 0 ; i < this.left.size; i++) {
+ var m = this.left.get(i);
+ if (s == m) {
+ return true;
+ }
+ if (!m.contains(":")) {
+ continue;
+ }
+ var ar = m.split(":");
+ if (ar[0] == s) {
+ return true;
+ }
+ }
+ return false;
+
+ }
+
+
+ }
+
+
+
+ static Gee.HashMap<string,Palete>? cache = null;
+
+ public static Palete factory(string xtype)
+ {
+ if (cache == null) {
+ cache = new Gee.HashMap<string,Palete>();
+ }
+ if (cache.get(xtype) != null) {
+ return cache.get(xtype);
+ }
+ switch(xtype) {
+ case "Gtk":
+ cache.set(xtype, new Gtk());
+ break;
+ case "Roo":
+ cache.set(xtype, new Roo());
+ break;
+ default:
+ throw new Error.INVALID_TYPE("invalid argument to Palete factory");
+ }
+ return cache.get(xtype);
+ }
+
+
+ public abstract class Palete : Object
+ {
+
+
+ public string name;
+
+ public Gee.ArrayList<Usage> map;
+
+ public Gee.HashMap<string,GirObject> classes; // used in roo..
+
+ public Palete()
+ {
+ // nothing?
+ this.map = null;
+ this.classes = null;
+ }
+
+
+ //map : false, // array of mappings left: [] , right : []
+
+ //items : false, // the tree of nodes.
+
+
+
+
+ string guessName(JsRender.Node ar) throws Error // turns the object into full name.
+ {
+ throw new Error.NEED_IMPLEMENTING("xxx. guessName needs implimenting");
+ }
+
+
+
+
+
+
+ public string[] getChildList(string in_rval)
+ {
+
+ if (this.map == null) {
+ this.load();
+ }
+ // empty == *top
+
+ var rval = in_rval == "" ? "*top" : in_rval;
+
+ // should be a bit more than this..
+ // -> it should look for all elements that inherit
+ string[] ret = {};
+ var rt = new Gee.ArrayList<string>();
+ for (var i = 0; i < this.map.size; i++) {
+ var m = this.map.get(i);
+
+ if (!m.leftHas(rval)) {
+ continue;
+ }
+ print("found LEFT, adding right\n");
+
+ for(var ii =0; ii < m.right.size; ii++) {
+ var l = m.right.get(ii);
+
+ if (rt.index_of(l) > -1) {
+ continue;
+ }
+ //print("ADD " + string.joinv(", ", ret) + "\n");
+ ret += l;
+ rt.add(l);
+ }
+
+
+ }
+ print ("drop list for %s is:\n%s\n", rval, string.joinv("\n", ret));
+ //console.log("DROP LIST:");
+ //console.dump(ret);
+ return ret;
+
+ }
+
+
+ public string[] getDropList(string rval)
+ {
+
+ if (this.map == null) {
+ this.load();
+ }
+
+
+ // should be a bit more than this..
+ // -> it should look for all elements that inherit
+ string[] ret = {};
+ var rt = new Gee.ArrayList<string>();
+ for (var i = 0; i < this.map.size; i++) {
+ var m = this.map.get(i);
+
+ if (m.right.index_of(rval) < 0) {
+ continue;
+ }
+ //print("found RIGHT, adding left\n");
+
+ for(var ii =0; ii < m.left.size; ii++) {
+ var l = m.left.get(ii);
+
+ if (rt.index_of(l) > -1) {
+ continue;
+ }
+ //print("ADD " + string.joinv(", ", ret) + "\n");
+ ret += l;
+ rt.add(l);
+ }
+
+
+ }
+ print ("drop list for %s is:\n%s\n", rval, string.joinv("\n", ret));
+ //console.log("DROP LIST:");
+ //console.dump(ret);
+ return ret;
+
+ }
+
+ public void saveTemplate (string name, JsRender.Node data)
+ {
+
+ var gn = data.fqn();
+ // store it in user's directory..
+ var appdir = GLib.Environment.get_home_dir() + "/.Builder";
+
+
+ if (!GLib.FileUtils.test(appdir+ "/" + gn, GLib.FileTest.IS_DIR)) {
+ GLib.File.new_for_path (appdir+ "/" + gn).make_directory ();
+
+ }
+ GLib.FileUtils.set_contents(appdir+ "/" + gn + "/" + name + ".json", data.toJsonString());
+
+ }
+
+ /**
+ * list templates - in home directory (and app dir in future...)
+ * @param {String} name - eg. Gtk.Window..
+ * @return {Array} list of templates available..
+ */
+
+ public GLib.List<string> listTemplates (JsRender.Node node)
+ {
+
+ var gn = node.fqn();
+
+ var ret = new GLib.List<string>();
+ var dir= GLib.Environment.get_home_dir() + "/.Builder/" + gn;
+ if (!GLib.FileUtils.test(dir, GLib.FileTest.IS_DIR)) {
+ return ret;
+ }
+
+
+
+
+ var f = File.new_for_path(dir);
+
+ var file_enum = f.enumerate_children(GLib.FileAttribute.STANDARD_DISPLAY_NAME, GLib.FileQueryInfoFlags.NONE, null);
+
+ FileInfo next_file;
+ while ((next_file = file_enum.next_file(null)) != null) {
+ var n = next_file.get_display_name();
+ if (!Regex.match_simple ("\\.json$", n)) {
+ continue;
+ }
+ ret.append( dir + "/" + n);
+ }
+ return ret;
+
+ }
+
+ public JsRender.Node? loadTemplate(string path)
+ {
+
+ var pa = new Json.Parser();
+ pa.load_from_file(path);
+ var node = pa.get_root();
+
+ if (node.get_node_type () != Json.NodeType.OBJECT) {
+ return null;
+ }
+ var obj = node.get_object ();
+
+ var ret = new JsRender.Node();
+
+
+ ret.loadFromJson(obj, 1);
+ ret.ref(); // not sure if needed -- but we had a case where ret became uninitialized?
+
+ return ret;
+ }
+
+
+
+ public void loadUsageFile (string fname) {
+
+
+
+
+ print("Palete Load called\n");
+ string raw;
+ if (!FileUtils.test (fname, FileTest.EXISTS)) {
+ throw new Error.MISSING_FILE(fname + " not found");
+ }
+
+ FileUtils.get_contents(fname, out raw);
+ // print(data);
+ var data = raw.split("\n");
+ var state = 0;
+ var cfg = new Gee.ArrayList<Usage>();
+ var left = new Gee.ArrayList<string>();
+ var right = new Gee.ArrayList<string>();
+
+ for (var i = 0; i < data.length; i++) {
+ var d = data[i].strip();
+ //print("READ " + d + "\n");
+ if (
+ d.length < 1
+ ||
+ Regex.match_simple ("^\\s+$", d)
+ ||
+ Regex.match_simple ("^\\s*/", d)
+ ){
+ continue;
+ }
+
+ if (Regex.match_simple ("^left:", d)) {
+ state = 1;
+ if (left.size > 0 ){
+ cfg.add(new Usage( left, right));
+ }
+ left = new Gee.ArrayList<string>();
+ right = new Gee.ArrayList<string>();
+ continue;
+ }
+ if (Regex.match_simple ("^right:", d)) {
+ state = 2;
+ continue;
+ }
+ if (state == 1) {
+ //print("add left: " + d + "\n");
+ left.add(d);
+ continue;
+ }
+ //print("add Right: " + d + "\n");
+ right.add(d);
+ //Seed.quit();
+
+ }
+ if (left.size > 0 ){
+ cfg.add(new Usage( left, right));
+ }
+ this.map = cfg;
+
+ }
+
+
+ public void validateVala(
+ WindowState state,
+ string code,
+ string property,
+ string ptype,
+ JsRender.JsRender file,
+ JsRender.Node node
+ )
+ {
+
+ print("validate code (%s) %s\n", file.language, code);
+
+
+
+ if (file.language != "vala" ) { // not sure if we need to validate property
+ return;
+ }
+ // file.project , file.path, file.build_module, ""
+
+
+
+ //var cd = new JSCore.ClassDefinitionEmpty();
+ state.valasource.checkFileWithNodePropChange(
+ file,
+ node,
+ property,
+ ptype,
+ code
+ );
+
+
+ }
+
+
+
+
+ public bool javascriptHasErrors(
+ WindowState state,
+ string code,
+ string property,
+ string ptype,
+ JsRender.JsRender file,
+ out Gee.HashMap<int,string> errors
+ )
+ {
+
+ print("validate code (%s) ptype=%s property=%s\n", file.language, ptype, property);
+ errors = new Gee.HashMap<int,string>();
+
+ if (file.language != "js") {
+ return false;
+ }
+ if (ptype != "listener" && property.length > 0 && property[0] == '|') {
+ return false;
+ }
+
+ //var cd = new JSCore.ClassDefinitionEmpty();
+ //print("TESTING CODE %s\n", code);
+ string errmsg;
+ var testcode = ptype == "file" ? code : "var __aaa___ = " + code;
+ var line = Javascript.singleton().validate(
+ testcode, out errmsg);
+
+ if (line > -1) {
+ if (ptype == "file") {
+ var err = new Json.Object();
+ err.set_int_member("ERR-TOTAL", 1);
+ var files_obj = new Json.Object();
+ var lines_obj = new Json.Object();
+ var lines_ar = new Json.Array();
+ lines_ar.add_string_element(errmsg);
+ lines_obj.set_array_member(line.to_string(), lines_ar);
+ files_obj.set_object_member(file.path, lines_obj);
+
+ err.set_object_member("ERR", files_obj);
+
+ state.showCompileResult(err);
+ // do not set errors.. that's not done here..
+ return true;
+ }
+ errors.set(line, errmsg); // depricated - this is used by the editor currently -- but we are planning to switch from that..
+ print("got errors\n");
+ return true;
+
+ }
+ // now syntax is OK.. try the
+
+
+
+ if (ptype == "file") {
+ return this.javascriptHasCompressionErrors(file, state, code);
+ }
+ print("no errors\n");
+ return false;
+
+ }
+
+ public bool javascriptHasCompressionErrors(JsRender.JsRender file, WindowState state, string code)
+ {
+ // this uses the roojspacker code to try and compress the code.
+ // it should highlight errors before we actually push live the code.
+
+ // standard error format: file %s, line %s, Error
+
+ var p = new JSDOC.Packer();
+ p.keepWhite = false;
+ p.skipScope = false;
+ p.dumpTokens = false;
+ p.cleanup = false;
+
+
+ p.packFile(code, file.path,"");
+ state.showCompileResult(p.result);
+ if (p.hasErrors("")) {
+ return true;
+ }
+ return false;
+
+
+
+ }
+
+
+
+ public abstract void fillPack(JsRender.Node node,JsRender.Node parent);
+ public abstract void load();
+ public abstract Gee.HashMap<string,GirObject> getPropertiesFor(string ename, string type);
+ public abstract GirObject? getClass(string ename);
+
+ public abstract bool typeOptions(string fqn, string key, string type, out string[] opts);
+ public abstract List<SourceCompletionItem> suggestComplete(
+ JsRender.JsRender file,
+ JsRender.Node? node,
+ string proptype,
+ string key,
+ string complete_string
+ );
+ }
+
+
+}
+
+
+
--- /dev/null
+using Gtk;
+
+namespace Palete {
+
+
+/*
+
+
+ public class Introspect.El : Object
+ {
+ public enum eltype {
+ NS,
+ CLASS,
+ METHOD,
+ PROP
+ }
+
+
+ public eltype type;
+ }
+
+*/
+ public class Roo : Palete {
+
+
+ public Roo()
+ {
+
+
+
+ base();
+ this.name = "Roo";
+
+ }
+
+ Gee.HashMap<string,GirObject> propsFromJSONArray(string type, Json.Array ar, GirObject cls)
+ {
+
+ var ret = new Gee.HashMap<string,GirObject>();
+
+ for (var i =0 ; i < ar.get_length(); i++) {
+ var o = ar.get_object_element(i);
+ var name = o.get_string_member("name");
+ var prop = new GirObject(type, name );
+
+ prop.type = o.get_string_member("type");
+ prop.doctxt = o.get_string_member("desc");
+ prop.propertyof = o.has_member("memberOf") ? o.get_string_member("memberOf") : "";
+ if (prop.propertyof.length < 1) {
+ prop.propertyof = cls.name;
+ }
+ prop.sig = o.has_member("sig") ? o.get_string_member("sig") : "";
+
+ if (o.has_member("optvals") ) {
+ var oar = o.get_array_member("optvals");
+
+ for (var oi = 0; oi < oar.get_length(); oi++) {
+ prop.optvalues.add(oar.get_string_element(oi));
+ }
+
+ }
+
+
+
+ //print(type + ":" + name +"\n");
+ ret.set(name,prop);
+ }
+ return ret;
+ }
+
+ public override void load () {
+
+ if (this.classes != null) {
+ return;
+ }
+ this.loadUsageFile(BuilderApplication.configDirectory() + "/resources/RooUsage.txt");
+ this.classes = new Gee.HashMap<string,GirObject>();
+
+
+ var pa = new Json.Parser();
+ pa.load_from_file(BuilderApplication.configDirectory() + "/resources/roodata.json");
+ var node = pa.get_root();
+
+ var clist = node.get_object().get_object_member("data");
+ clist.foreach_member((o , key, value) => {
+ //print("cls:" + key+"\n");
+
+ var cls = new GirObject("class", key);
+ cls.props = this.propsFromJSONArray("prop", value.get_object().get_array_member("props"),cls);
+ cls.signals = this.propsFromJSONArray("signal", value.get_object().get_array_member("events"),cls);
+ if (value.get_object().has_member("methods")) {
+ cls.methods = this.propsFromJSONArray("method", value.get_object().get_array_member("methods"),cls);
+ }
+
+ this.classes.set(key, cls);
+ });
+
+
+
+
+ }
+
+
+ public string doc(string what) {
+ return "";
+ /*var ns = what.split(".")[0];
+
+
+
+
+ var gir = Gir.factory(ns);
+ return gir.doc(what);
+ */
+
+ //return typeof(this.comments[ns][what]) == 'undefined' ? '' : this.comments[ns][what];
+ }
+
+ // does not handle implements...
+ public override GirObject? getClass(string ename)
+ {
+ this.load();
+ return this.classes.get(ename);
+
+ }
+
+ public override Gee.HashMap<string,GirObject> getPropertiesFor(string ename, string type)
+ {
+ //print("Loading for " + ename);
+
+
+ this.load();
+ // if (typeof(this.proplist[ename]) != 'undefined') {
+ //print("using cache");
+ // return this.proplist[ename][type];
+ //}
+ // use introspection to get lists..
+
+
+ var cls = this.classes.get(ename);
+ var ret = new Gee.HashMap<string,GirObject>();
+ if (cls == null) {
+ print("could not find class: %s\n", ename);
+ return ret;
+ //throw new Error.INVALID_VALUE( "Could not find class: " + ename);
+
+ }
+
+ //cls.parseProps();
+ //cls.parseSignals(); // ?? needed for add handler..
+ //cls.parseMethods(); // ?? needed for ??..
+ //cls.parseConstructors(); // ?? needed for ??..
+
+ //cls.overlayParent();
+
+ switch (type) {
+
+
+ case "props":
+ return cls.props;
+ case "signals":
+ return cls.signals;
+ case "methods":
+ return ret;
+ case "ctors":
+ return ret;
+ default:
+ throw new Error.INVALID_VALUE( "getPropertiesFor called with: " + type);
+ //var ret = new Gee.HashMap<string,GirObject>();
+ //return ret;
+
+ }
+
+
+ //cls.overlayInterfaces(gir);
+
+
+
+ }
+ public string[] getInheritsFor(string ename)
+ {
+ string[] ret = {};
+ var es = ename.split(".");
+ var gir = Gir.factory(es[0]);
+
+ var cls = gir.classes.get(es[1]);
+ if (cls == null) {
+ return ret;
+ }
+ return cls.inheritsToStringArray();
+
+
+ }
+
+
+ public override void fillPack(JsRender.Node node,JsRender.Node parent)
+ {
+
+ return;
+ }
+ /*
+ * Pulldown options for type
+ */
+ public override bool typeOptions(string fqn, string key, string type, out string[] opts)
+ {
+ opts = {};
+ print("get typeOptions %s (%s)%s", fqn, type, key);
+ if (type.up() == "BOOL" || type.up() == "BOOLEAN") {
+ opts = { "true", "false" };
+ return true;
+ }
+
+ var props = this.getPropertiesFor(fqn, "props");
+ if (!props.has_key(key)) {
+ print("prop %s does not have key %s\n", fqn, key);
+ return false;
+ }
+ var pr = props.get(key);
+ if (pr.optvalues.size < 1) {
+ print("prop %s no optvalues for %s\n", fqn, key);
+ return false;
+ }
+ string[] ret = {};
+ for(var i = 0; i < pr.optvalues.size; i++) {
+ ret += pr.optvalues.get(i);
+ }
+ opts = ret;
+ print("prop %s returning optvalues for %s\n", fqn, key);
+ return true;
+
+ }
+ public override List<SourceCompletionItem> suggestComplete(
+ JsRender.JsRender file,
+ JsRender.Node? node,
+ string proptype,
+ string key,
+ string complete_string
+ ) {
+
+ var ret = new List<SourceCompletionItem>();
+ // completion rules??
+
+ // Roo......
+
+ // this. (based on the node type)
+ // this.xxx // Node and any determination...
+
+ if (complete_string.index_of(".",0) < 0) {
+ // string does not have a '.'
+ // offer up this / Roo / javascript keywords... / look for var string = .. in the code..
+ for(var i = 0; i < JsRender.Lang.match_strings.size ; i++) {
+ var str = JsRender.Lang.match_strings.get(i);
+ if (complete_string != str && str.index_of(complete_string,0) == 0 ) { // should we ignore exact matches... ???
+ ret.append(new SourceCompletionItem (str, str, null, "javascript : " + str));
+ }
+
+
+ }
+ if (complete_string != "Roo" && "Roo".index_of(complete_string,0) == 0 ) { // should we ignore exact matches... ???
+ ret.append(new SourceCompletionItem ("Roo - A Roo class", "Roo", null, "Roo library"));
+ }
+ if (complete_string != "_this" && "_this".index_of(complete_string,0) == 0 ) { // should we ignore exact matches... ???
+ ret.append(new SourceCompletionItem ("_this - the top level element", "_this", null, "Top level element"));
+ }
+ return ret;
+ }
+ // got at least one ".".
+ var parts = complete_string.split(".");
+ var curtype = "";
+ var cur_instance = false;
+ if (parts[0] == "this") {
+ // work out from the node, what the type is...
+ if (node == null) {
+ print("node is empty - no return\n");
+ return ret; // no idea..
+ }
+ curtype = node.fqn();
+ cur_instance = true;
+ }
+ if (parts[0] == "Roo") {
+ curtype = "Roo";
+ cur_instance = false;
+ }
+
+ var prevbits = parts[0] + ".";
+ for(var i =1; i < parts.length; i++) {
+ print("matching %d/%d\n", i, parts.length);
+ var is_last = i == parts.length -1;
+
+ // look up all the properties of the type...
+ var cls = this.getClass(curtype);
+ if (cls == null) {
+ print("could not get class of curtype %s\n", curtype);
+ return ret;
+ }
+
+ if (!is_last) {
+
+ // only exact matches from here on...
+ if (cur_instance) {
+ if (cls.props.has_key(parts[i])) {
+ var prop = cls.props.get(parts[i]);
+ if (prop.type.index_of(".",0) > -1) {
+ // type is another roo object..
+ curtype = prop.type;
+ prevbits += parts[i] + ".";
+ continue;
+ }
+ return ret;
+ }
+
+
+
+ // check methods?? - we do not export that at present..
+ return ret; //no idea...
+ }
+
+ // not a instance..
+ //look for child classes.
+ var citer = this.classes.map_iterator();
+ var foundit = false;
+ while (citer.next()) {
+ var scls = citer.get_key();
+ var look = prevbits + parts[i];
+ if (scls.index_of(look,0) != 0) {
+ continue;
+ }
+ // got a starting match..
+ curtype = look;
+ cur_instance = false;
+ foundit =true;
+ break;
+ }
+ if (!foundit) {
+ return ret;
+ }
+ prevbits += parts[i] + ".";
+ continue;
+ }
+ // got to the last element..
+ print("Got last element\n");
+ if (curtype == "") { // should not happen.. we would have returned already..
+ return ret;
+ }
+ print("Got last element type %s\n",curtype);
+ if (!cur_instance) {
+ print("matching instance");
+ // it's a static reference..
+ var citer = this.classes.map_iterator();
+ while (citer.next()) {
+ var scls = citer.get_key();
+ var look = prevbits + parts[i];
+ if (parts[i].length > 0 && scls.index_of(look,0) != 0) {
+ continue;
+ }
+ // got a starting match..
+ ret.append(new SourceCompletionItem (
+ scls,
+ scls,
+ null,
+ scls));
+ }
+ return ret;
+ }
+ print("matching property");
+
+
+
+ var citer = cls.methods.map_iterator();
+ while (citer.next()) {
+ var prop = citer.get_value();
+ // does the name start with ...
+ if (parts[i].length > 0 && prop.name.index_of(parts[i],0) != 0) {
+ continue;
+ }
+ // got a matching property...
+ // return type?
+ ret.append(new SourceCompletionItem (
+ prop.name + prop.sig + " : ("+ prop.propertyof + ")",
+ prevbits + prop.name + "(",
+ null,
+ prop.doctxt));
+ }
+
+ // get the properties / methods and subclasses.. of cls..
+ // we have cls.. - see if the string matches any of the properties..
+ citer = cls.props.map_iterator();
+ while (citer.next()) {
+ var prop = citer.get_value();
+ // does the name start with ...
+ if (parts[i].length > 0 && prop.name.index_of(parts[i],0) != 0) {
+ continue;
+ }
+ // got a matching property...
+
+ ret.append(new SourceCompletionItem (
+ prop.name + " : " + prop.type + " ("+ prop.propertyof + ")",
+ prevbits + prop.name,
+ null,
+ prop.doctxt));
+ }
+
+
+ return ret;
+
+
+
+
+
+ }
+
+
+
+
+
+
+ return ret;
+ }
+ }
+}
+
--- /dev/null
+/*
+ * Renderer for Roo Database code
+ *
+ * - Concept - this code does the SQL queries
+ * pulls data from information_schema (on mysql only at present..)
+ * Sends it down the line to the Javascript code. to generate structures
+ *
+ */
+
+ // should this be in palete...
+namespace Palete {
+
+
+ public class RooDatabase : Object
+ {
+ public Project.Project project;
+
+ public string DBTYPE;
+ public string DBNAME;
+
+ public Gda.Connection cnc;
+
+ public RooDatabase.from_project (Project.Project project)
+ {
+ this.project = project;
+ this.DBTYPE = this.project.get_string_member("DBTYPE");
+ this.DBNAME = this.project.get_string_member("DBNAME");
+ if (this.DBTYPE.length < 1) {
+ return;
+ }
+
+
+ try {
+
+ this.cnc = Gda.Connection.open_from_string (
+ this.DBTYPE,
+ "DB_NAME=" + this.DBNAME,
+ "USERNAME=" + this.project.get_string_member("DBUSERNAME") +
+ ";PASSWORD=" + this.project.get_string_member("DBPASSWORD"),
+ Gda.ConnectionOptions.NONE
+ );
+ } catch(Gda.ConfigError e) {
+ GLib.warning("%s\n", e.message);
+ this.cnc = null;
+ this.DBTYPE = "";
+ } catch(Gda.ConnectionError e) {
+ GLib.warning("%s\n", e.message);
+ this.cnc = null;
+ this.DBTYPE = "";
+ }
+
+ }
+
+ public RooDatabase.from_cfg (string dbtype, string dbname, string dbuser, string dbpass)
+ {
+ this.DBTYPE = dbtype;
+ this.DBNAME = dbname;
+ try {
+ this.cnc = Gda.Connection.open_from_string (
+ this.DBTYPE,
+ "DB_NAME=" + dbname,
+ "USERNAME=" + dbuser +
+ ";PASSWORD=" + dbpass,
+ Gda.ConnectionOptions.NONE
+ );
+ } catch(Gda.ConfigError e) {
+ this.cnc = null;
+ this.DBTYPE = "";
+ } catch(Gda.ConnectionError e) {
+ this.cnc = null;
+ this.DBTYPE = "";
+ }
+
+
+ }
+
+
+ public Json.Array readTables()
+ {
+ try {
+ if (this.DBTYPE == "PostgreSQL") {
+
+ return this.fetchAll(this.cnc.execute_select_command(
+ """select c.relname FROM pg_catalog.pg_class c
+ LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace
+ WHERE c.relkind IN ('r','') AND n.nspname NOT IN ('pg_catalog', 'pg_toast')
+ AND pg_catalog.pg_table_is_visible(c.oid)
+ """));
+
+ }
+ if (this.DBTYPE == "MySQL") {
+ return this.fetchAll(this.cnc.execute_select_command( "SHOW TABLES" ));
+ }
+ } catch (GLib.Error e) {
+ }
+ GLib.warning("Read tables failed DBTYPE = %s\n", this.DBTYPE);
+ return new Json.Array();
+
+ }
+ public Gee.ArrayList readTablesGee()
+ {
+ var ret = new Gee.ArrayList<string>();
+ var ar = this.readTables();
+ for(var i = 0; i < ar.get_length(); i++) {
+ ret.add(ar.get_string_element(i));
+ }
+ return ret;
+
+ }
+
+ public Json.Object readTable(string tablename)
+ {
+
+ Json.Array res_ar = new Json.Array();
+ var res = new Json.Object();
+ try {
+ switch (this.DBTYPE ) {
+ case "PostgreSQL":
+
+ res_ar = this.fetchAll(this.cnc.execute_select_command(
+ """
+
+ SELECT
+ f.attnum AS number,
+ f.attname AS Field,
+ f.attnum,
+ CASE WHEN f.attnotnull = 't' THEN 'NO' ELSE 'YES' END AS isNull,
+ pg_catalog.format_type(f.atttypid,f.atttypmod) AS Type,
+ CASE WHEN p.contype = 'p' THEN 't' ELSE 'f' END AS primarykey,
+ CASE WHEN p.contype = 'u' THEN 't' ELSE 'f' END AS uniquekey,
+ CASE WHEN p.contype = 'f' THEN g.relname END AS foreignkey,
+ CASE WHEN p.contype = 'f' THEN p.confkey END AS foreignkey_fieldnum,
+ CASE WHEN p.contype = 'f' THEN g.relname END AS foreignkey,
+ CASE WHEN p.contype = 'f' THEN p.conkey END AS foreignkey_connnum,
+ CASE WHEN f.atthasdef = 't' THEN d.adsrc END AS default
+ FROM pg_attribute f JOIN pg_class c ON c.oid = f.attrelid
+ JOIN pg_type t ON t.oid = f.atttypid
+ LEFT JOIN pg_attrdef d ON d.adrelid = c.oid AND d.adnum = f.attnum
+ LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
+ LEFT JOIN pg_constraint p ON p.conrelid = c.oid AND f.attnum = ANY ( p.conkey )
+ LEFT JOIN pg_class AS g ON p.confrelid = g.oid
+ WHERE c.relkind = 'r'::char AND n.nspname = 'public'
+ AND c.relname = '""" + tablename + """' AND f.attnum > 0 ORDER BY number;
+
+ """));
+ break;
+
+ case "MySQL":
+ res_ar = this.fetchAll(this.cnc.execute_select_command( "DESCRIBE " + tablename ));
+ break;
+
+ default:
+ return res;
+
+ }
+ } catch (GLib.Error e) {
+ return res;
+ }
+
+ for (var i =0; i < res_ar.get_length(); i++) {
+ var el = res_ar.get_object_element(i);
+ res.set_object_member( el.get_string_member("Field"), el);
+ }
+ return res;
+
+
+ }
+
+
+
+
+
+ public Json.Object readForeignKeys(string table)
+ {
+
+
+ var ret = this.readTable(table);
+ // technically we should use FK stuff in mysql, but for the momemnt use my hacky FK()
+ if (this.DBTYPE != "MySQL") {
+ return ret;
+ }
+
+ var query = """
+ SELECT
+ TABLE_COMMENT
+ FROM
+ information_schema.TABLES
+ WHERE
+ TABLE_NAME = '""" + table + """'
+ AND
+ TABLE_SCHEMA = '""" + this.DBNAME + """'
+ """;
+
+ var jarr = new Json.Array();
+ try {
+ jarr = this.fetchAll(this.cnc.execute_select_command(
+ query
+ ));
+ if (jarr.get_length() < 1) {
+ return ret;
+ }
+ } catch (GLib.Error e) {
+ return ret;
+ }
+ var contents = jarr.get_string_element(0);
+ GLib.debug(contents);
+ if (contents == null) {
+ return ret;
+ }
+
+ GLib.Regex exp = /FK\(([^\)]+)\)/;
+ string str = "";
+
+ GLib.MatchInfo mi;
+ if ( exp.match (contents, 0, out mi) ) {
+
+ str = mi.fetch(1);
+ GLib.debug("match = %s", str);
+ }
+
+ var ar = str.split("\n");
+ for (var i = 0; i < ar.length; i++) {
+ var kv = ar[i].split("=");
+ if (!ret.has_member(kv[0].strip())) {
+ continue;
+ }
+ var o = ret.get_object_member(kv[0].strip());
+
+ //o.set_string_member("key", kv[0].strip());
+ var lr = kv[1].split(":");
+ o.set_string_member("relates_to_table", lr[0].strip());
+ o.set_string_member("relates_to_col", lr[1].strip());
+ o.set_object_member("relates_to_schema", this.readTable(lr[0].strip()));
+ //ret.set_object_member(kv[0].strip(),o);
+
+
+ }
+ return ret;
+
+ }
+ public Json.Array fetchAll(Gda.DataModel qnr)
+ {
+ var cols = new Gee.ArrayList<string>();
+
+ for (var i =0;i < qnr.get_n_columns(); i++) {
+ cols.add(qnr.get_column_name(i));
+ }
+ //print(Json.stringify(cols, null,4));
+
+ var res = new Json.Array();
+ //print("ROWS %d\n", qnr.get_n_rows());
+
+ for (var r = 0; r < qnr.get_n_rows(); r++) {
+
+ // single clo..
+ //print("GOT ROW");
+ //print("COLS %d\n", cols.size);
+ if (cols.size == 1) {
+
+ //print("GOT %s\n",str);
+ try {
+ res.add_string_element(qnr.get_value_at(0,r).get_string());
+ } catch (GLib.Error e) {
+ res.add_string_element("");
+ }
+ continue;
+ }
+
+ var add = new Json.Object();
+
+ for (var i = 0; i < cols.size; i++) {
+ var n = cols.get(i);
+ try {
+ var val = qnr.get_value_at(i,r);
+ var type = val.type().name();
+ //print("%s\n",type);
+ switch(type) {
+ case "GdaBinary":
+ case "GdaBlob":
+ add.set_string_member(n, "?? big string ??");
+ break;
+
+ case "GdaNull":
+ add.set_null_member(n);
+ break;
+
+ default:
+ add.set_string_member(n, val.get_string());
+ break;
+ }
+ } catch (GLib.Error e ) {
+ add.set_string_member(n, "");
+ }
+
+ }
+
+ res.add_object_element(add);
+
+ }
+ return res;
+
+ }
+
+
+
+ }
+
+
+}
+// valac --pkg libgda-5.0 --pkg gee-1.0 --pkg json-glib-1.0 --pkg libxml-2.0 RooDatabase.vala -o /tmp/rdtest
+/*
+ void main() {
+ var x = new JsRender.RooDatabase.from_cfg("MySQL", "hydra", "root", "");
+ // var res = x.readTables();
+ //var res= x.readTable("Person");
+ var res= x.readForeignKeys("Person");
+
+ var generator = new Json.Generator ();
+ var root = new Json.Node(Json.NodeType.OBJECT);
+ root.init_object(res);
+ generator.set_root (root);
+
+ generator.pretty = true;
+ generator.indent = 4;
+
+
+ print("%s\n", generator.to_data (null));
+ }
+*/
--- /dev/null
+
+// valac TreeBuilder.vala --pkg libvala-0.24 --pkg posix -o /tmp/treebuilder
+
+/**
+ *
+ * This just deals with spawning the compiler and getting the results.
+ *
+ * each window should have one of these...
+ *
+ * x = new ValaSource();
+ * x.connect.compiled(... do something with results... );
+ *
+ * x.
+ *
+ */
+
+namespace Palete {
+
+ public errordomain ValaSourceError {
+ INVALID_FORMAT
+ }
+
+ //public delegate void ValaSourceResult(Json.Object res);
+
+
+
+ public class ValaSource : Object {
+
+
+ public signal void compiled(Json.Object res);
+ public signal void compile_output(string str);
+
+
+ JsRender.JsRender file;
+ public int line_offset = 0;
+
+ public Gee.ArrayList<Spawn> children;
+ public ValaSource( )
+ {
+ base();
+ this.compiler = null;
+ this.children = new Gee.ArrayList<Spawn>();
+
+ }
+ public void dumpCode(string str)
+ {
+ var ls = str.split("\n");
+ for (var i=0;i < ls.length; i++) {
+ print("%d : %s\n", i+1, ls[i]);
+ }
+ }
+
+ //public Gee.HashMap<int,string> checkFile()
+ //{
+ // return this.checkString(JsRender.NodeToVala.mungeFile(this.file));
+ //}
+
+ public bool checkFileWithNodePropChange(
+
+ JsRender.JsRender file,
+ JsRender.Node node,
+ string prop,
+ string ptype,
+ string val
+ )
+ {
+ this.file = file;
+
+ if (this.compiler != null) {
+ return false;
+ }
+
+
+ var hash = ptype == "listener" ? node.listeners : node.props;
+
+ // untill we get a smarter renderer..
+ // we have some scenarios where changing the value does not work
+ if (prop == "* xns" || prop == "xtype") {
+ return false;
+ }
+
+
+ var old = hash.get(prop);
+ var newval = "/*--VALACHECK-START--*/ " + val ;
+
+ hash.set(prop, newval);
+ var tmpstring = JsRender.NodeToVala.mungeFile(file);
+ hash.set(prop, old);
+ //print("%s\n", tmpstring);
+ var bits = tmpstring.split("/*--VALACHECK-START--*/");
+ var offset =0;
+ if (bits.length > 0) {
+ offset = bits[0].split("\n").length +1;
+ }
+
+ this.line_offset = offset;
+
+ //this.dumpCode(tmpstring);
+ //print("offset %d\n", offset);
+ return this.checkStringSpawn(tmpstring );
+
+ // modify report
+
+
+
+ }
+ Spawn compiler;
+
+ public bool checkStringSpawn(
+ string contents
+ )
+ {
+
+ if (this.compiler != null) {
+ return false;
+ }
+
+ FileIOStream iostream;
+ var tmpfile = File.new_tmp ("test-XXXXXX.vala", out iostream);
+ tmpfile.ref();
+
+ OutputStream ostream = iostream.output_stream;
+ DataOutputStream dostream = new DataOutputStream (ostream);
+ dostream.put_string (contents);
+
+ var valafn = "";
+ try {
+ var regex = new Regex("\\.bjs$");
+
+ valafn = regex.replace(this.file.path,this.file.path.length , 0 , ".vala");
+ } catch (GLib.RegexError e) {
+
+ return false;
+ }
+
+ string[] args = {};
+ args += BuilderApplication._self;
+ args += "--project";
+ args += this.file.project.fn;
+ args += "--target";
+ args += this.file.build_module;
+ args += "--add-file";
+ args += tmpfile.get_path();
+ args += "--skip-file";
+ args += valafn;
+
+
+
+ this.compiler = new Spawn("/tmp", args);
+ this.compiler.complete.connect(spawnResult);
+
+ try {
+ this.compiler.run();
+ } catch (GLib.SpawnError e) {
+ GLib.debug(e.message);
+ this.compiler = null;
+ return false;
+
+ }
+ return true;
+
+ }
+
+ public bool checkFileSpawn(JsRender.JsRender file )
+ {
+ // race condition..
+ if (this.compiler != null) {
+ return false;
+ }
+
+ this.file = file;
+ this.line_offset = 0;
+
+ string[] args = {};
+ args += BuilderApplication._self;
+ args += "--project";
+ args += this.file.project.fn;
+ args += "--target";
+ args += this.file.build_module;
+
+
+
+
+ try {
+ this.compiler = new Spawn("/tmp", args);
+ this.compiler.complete.connect(spawnResult);
+
+ this.compiler.run();
+
+
+ } catch (GLib.Error e) {
+ GLib.debug(e.message);
+ this.compiler = null;
+ return false;
+ }
+ return true;
+
+ }
+
+
+
+
+
+ public void spawnExecute(JsRender.JsRender file)
+ {
+ // race condition..
+ if (this.compiler != null) {
+ return;
+ }
+ if (!(file.project is Project.Gtk)) {
+ return;
+ }
+ var pr = (Project.Gtk)(file.project);
+
+
+ this.file = file;
+ this.line_offset = 0;
+
+ string[] args = {};
+ args += BuilderApplication._self;
+ args += "--project";
+ args += this.file.project.fn;
+ args += "--target";
+ if (this.file.build_module.length > 0 ) {
+ args += this.file.build_module;
+ } else {
+ args += pr.firstBuildModule();
+ }
+ //args += "--output"; -- set up by the module -- defaults to testrun
+ //args += "/tmp/testrun";
+
+ // assume code is in home...
+ try {
+ this.compiler = new Spawn( GLib.Environment.get_home_dir(), args);
+ this.compiler.output_line.connect(compile_output_line);
+ this.compiler.complete.connect(runResult);
+ this.compiler.run();
+ this.children.add(this.compiler); //keep a reference...
+
+ } catch (GLib.Error e) {
+ GLib.debug(e.message);
+ this.compiler = null;
+
+ }
+ return;
+
+ }
+ public void compile_output_line( string str )
+ {
+ this.compile_output(str);
+ }
+ /**
+ * Used to compile a non builder file..
+ */
+
+
+ public bool checkPlainFileSpawn( JsRender.JsRender file, string contents )
+
+ {
+ // race condition..
+ if (this.compiler != null) {
+ return false;
+ }
+ var pr = (Project.Gtk)(file.project);
+
+ var m = pr.firstBuildModule();
+ var cg = pr.compilegroups.get(m);
+ var foundit = false;
+ for (var i = 0; i < cg.sources.size; i++) {
+ var path = pr.resolve_path(
+ pr.resolve_path_combine_path(pr.firstPath(),cg.sources.get(i)));
+ if (path == file.path) {
+ foundit = true;
+ break;
+ }
+
+ }
+ if (!foundit) {
+
+ this.compiler = null;
+
+ return false; // do not run the compile..
+ }
+ // is the file in the module?
+
+
+ FileIOStream iostream;
+ var tmpfile = File.new_tmp ("test-XXXXXX.vala", out iostream);
+ tmpfile.ref();
+
+ OutputStream ostream = iostream.output_stream;
+ DataOutputStream dostream = new DataOutputStream (ostream);
+ dostream.put_string (contents);
+
+ var target = pr.firstBuildModule();
+ if (target.length < 1) {
+ return false;
+ }
+
+ this.file = null;
+ this.line_offset = 0;
+
+ string[] args = {};
+ args += BuilderApplication._self;
+ args += "--project";
+ args += file.project.fn;
+ args += "--target";
+
+ args += pr.firstBuildModule();
+ args += "--add-file";
+ args += tmpfile.get_path();
+ args += "--skip-file";
+ args += file.path;
+
+
+
+
+ try {
+ this.compiler = new Spawn("/tmp", args);
+ this.compiler.complete.connect(spawnResult);
+ this.compiler.run();
+ } catch (GLib.Error e) {
+
+ this.compiler = null;
+ return false;
+ }
+ return true;
+
+ }
+
+
+ public void spawnResult(int res, string output, string stderr)
+ {
+
+
+ try {
+ //GLib.debug("GOT output %s", output);
+
+ var pa = new Json.Parser();
+ pa.load_from_data(output);
+ var node = pa.get_root();
+
+ if (node.get_node_type () != Json.NodeType.OBJECT) {
+ var ret = new Json.Object();
+ ret.set_boolean_member("success", false);
+ ret.set_string_member("message",
+ "Compiler returned Unexpected element type %s".printf(
+ node.type_name ()
+ )
+ );
+ this.compiled(ret);
+ this.compiler = null;
+ }
+ var ret = node.get_object ();
+ ret.set_int_member("line_offset", this.line_offset);
+
+ this.compiled(ret);
+
+
+ } catch (GLib.Error e) {
+ var ret = new Json.Object();
+ ret.set_boolean_member("success", false);
+ ret.set_string_member("message", e.message);
+ this.compiled(ret);
+ }
+ this.compiler = null;
+ //compiler.unref();
+ //tmpfile.unref();
+
+
+
+ }
+
+ public void runResult(int res, string output, string stderr)
+ {
+ this.compiler = null;
+ var exe = "/tmp/testrun";
+ var mod = "";
+ var pr = (Project.Gtk)(this.file.project);
+
+
+
+ if (this.file.build_module.length > 0 ) {
+ mod = this.file.build_module;
+ } else {
+ mod = pr.firstBuildModule();
+ }
+ if (mod.length < 1) {
+ return;
+ }
+ var cg = pr.compilegroups.get(mod);
+ if (cg.target_bin.length > 0) {
+ exe = cg.target_bin;
+ }
+
+
+ if (!GLib.FileUtils.test(exe, GLib.FileTest.EXISTS)) {
+ print("Missing output file: %s\n",exe);
+ return;
+ }
+ string[] args = "/usr/bin/gnome-terminal -x /usr/bin/gdb -ex=r --args".split(" ");
+
+
+ // runs gnome-terminal, with gdb .. running the application..
+ // fixme -- need a system/which
+
+ args += exe;
+ if (cg.execute_args.length > 0) {
+ var aa = cg.execute_args.split(" ");
+ for (var i =0; i < aa.length; i++) {
+ args += aa[i];
+ }
+ }
+
+ print("OUT: %s\n\n----\nERR:%s\n", output, stderr);
+
+ // should be home directory...
+
+
+
+ var exec = new Spawn(GLib.Environment.get_home_dir() , args);
+ exec.detach = true;
+ exec.run();
+
+ }
+ }
+
+}
+/*
+int main (string[] args) {
+
+ var a = new ValaSource(file);
+ a.create_valac_tree();
+ return 0;
+}
+*/
+
+
--- /dev/null
+
+// valac TreeBuilder.vala --pkg libvala-0.24 --pkg posix -o /tmp/treebuilder
+
+/**
+ * this only deals with the compiling (when builder is run with different args..)
+ *
+ */
+
+
+namespace Palete {
+
+
+ public class ValaSourceReport : Vala.Report {
+
+ public string filepath;
+
+ public string tmpname;
+
+ //public Gee.ArrayList<ValaSourceNotice> notices;
+ public Json.Object result;
+
+ //public Gee.HashMap<int,string> line_errors;
+
+ public void compile_notice(string type, string filename, int line, string message) {
+
+ if (!this.result.has_member(type+"-TOTAL")) {
+ this.result.set_int_member(type+"-TOTAL", 1);
+ } else {
+ this.result.set_int_member(type+"-TOTAL",
+ this.result.get_int_member(type+"-TOTAL") +1
+ );
+ }
+
+
+ if (!this.result.has_member(type)) {
+ this.result.set_object_member(type, new Json.Object());
+ }
+ var t = this.result.get_object_member(type);
+ if (!t.has_member(filename)) {
+ t.set_object_member(filename, new Json.Object());
+ }
+ var tt = t.get_object_member(filename);
+ if (!tt.has_member(line.to_string())) {
+ tt.set_array_member(line.to_string(), new Json.Array());
+ }
+ var tl = tt.get_array_member(line.to_string());
+ tl.add_string_element(message);
+
+ }
+
+
+
+ public ValaSourceReport(string filepath, string tmpname)
+ {
+ base();
+ this.filepath = filepath;
+ this.tmpname = tmpname;
+ this.result = new Json.Object();
+ this.result.set_boolean_member("success", true);
+ this.result.set_string_member("message", "");
+
+
+
+ //this.line_errors = new Gee.HashMap<int,string> ();
+ //this.notices = new Gee.ArrayList<ValaSourceNotice>();
+ }
+
+ public override void warn (Vala.SourceReference? source, string message) {
+
+ if (source == null) {
+ return;
+ //stderr.printf ("My error: %s\n", message);
+ }
+
+ if (source.file.filename != this.tmpname) {
+ this.compile_notice("WARN", source.file.filename , source.begin.line, message);
+ return;
+ }
+ this.compile_notice("WARN", this.filepath, source.begin.line, message);
+
+ }
+ public override void depr (Vala.SourceReference? source, string message) {
+
+ if (source == null) {
+ return;
+ //stderr.printf ("My error: %s\n", message);
+ }
+
+ if (source.file.filename != this.tmpname) {
+ this.compile_notice("DEPR", source.file.filename, source.begin.line, message);
+ return;
+ }
+ this.compile_notice("DEPR", this.filepath, source.begin.line, message);
+
+ }
+
+ public override void err (Vala.SourceReference? source, string message) {
+ errors++;
+ if (source == null) {
+ return;
+ //stderr.printf ("My error: %s\n", message);
+ }
+ if (source.file.filename != this.tmpname) {
+ this.compile_notice("ERR", source.file.filename, source.begin.line, message);
+ GLib.debug ("Other file: Got error error: %d: %s\n", source.begin.line, message);
+ return;
+ }
+
+
+ this.compile_notice("ERR", this.filepath, source.begin.line, message);
+ GLib.debug ("Test file: Got error error: %d: %s\n", source.begin.line, message);
+ }
+ /*
+ public void dump()
+ {
+ var iter = this.line_errors.map_iterator();
+ while (iter.next()) {
+ print ("%d : %s\n\n", iter.get_key(), iter.get_value());
+ }
+ }
+ */
+
+ }
+
+ public class ValaSourceCompiler : Object {
+
+ public static void jerr(string str)
+ {
+ var ret = new Json.Object();
+ ret.set_boolean_member("success", false);
+ ret.set_string_member("message", str);
+
+ var generator = new Json.Generator ();
+ var root = new Json.Node(Json.NodeType.OBJECT);
+ root.init_object(ret);
+ generator.set_root (root);
+
+ generator.pretty = true;
+ generator.indent = 4;
+
+
+ print("%s\n", generator.to_data (null));
+ GLib.Process.exit(Posix.EXIT_FAILURE);
+
+ }
+
+ public static void buildApplication()
+ {
+ //print("build based on Application settings\n");
+
+ if (BuilderApplication.opt_compile_target == null) {
+ jerr("missing compile target --target");
+ }
+
+ Project.Project.loadAll();
+ var proj = Project.Project.getProjectByHash(BuilderApplication.opt_compile_project);
+
+ if (proj == null) {
+ jerr("could not load test project %s".printf( BuilderApplication.opt_compile_project));
+ }
+
+ if (proj.xtype != "Gtk") {
+ jerr("%s is not a Gtk Project".printf( BuilderApplication.opt_compile_project));
+ }
+ var gproj = (Project.Gtk)proj;
+
+
+ if (!gproj.compilegroups.has_key(BuilderApplication.opt_compile_target)) {
+ jerr("missing compile target %s".printf(BuilderApplication.opt_compile_target));
+ }
+ var skip_file = "";
+ if (BuilderApplication.opt_compile_skip != null) {
+ skip_file = BuilderApplication.opt_compile_skip;
+ }
+ var add_file = "";
+ if (BuilderApplication.opt_compile_add != null) {
+ add_file = BuilderApplication.opt_compile_add;
+ }
+
+
+ var vs = new ValaSourceCompiler(gproj, add_file, BuilderApplication.opt_compile_target, skip_file);
+ if (BuilderApplication.opt_compile_output != null) {
+ vs.output = BuilderApplication.opt_compile_output;
+ }
+ vs.compile();
+
+
+ }
+
+ Vala.CodeContext context;
+ ValaSourceReport report;
+ Project.Gtk project;
+ public string build_module;
+ public string filepath;
+ public string original_filepath;
+ public int line_offset = 0;
+ public string output;
+
+ // file.project , file.path, file.build_module, ""
+ public ValaSourceCompiler(Project.Gtk project, string filepath, string build_module, string original_filepath) {
+ base();
+ //this.file = file;
+ this.filepath = filepath;
+ this.build_module = build_module;
+ this.original_filepath = original_filepath;
+ this.project = project;
+ this.output = "";
+
+ }
+ public void dumpCode(string str)
+ {
+ var ls = str.split("\n");
+ for (var i=0;i < ls.length; i++) {
+ print("%d : %s\n", i+1, ls[i]);
+ }
+ }
+
+
+
+ public void compile( )
+ {
+ // init context:
+ var valac = "valac " ;
+
+ context = new Vala.CodeContext ();
+ Vala.CodeContext.push (context);
+
+ context.experimental = false;
+ context.experimental_non_null = false;
+#if VALA_0_32
+ var ver=32;
+#elif VALA_0_30
+ var ver=30;
+#elif VALA_0_28
+ var ver=28;
+#elif VALA_0_26
+ var ver=26;
+#elif VALA_0_24
+ var ver=24;
+#elif VALA_0_22
+ var ver=22;
+#endif
+
+ for (int i = 2; i <= ver; i += 2) {
+ context.add_define ("VALA_0_%d".printf (i));
+ }
+
+
+
+
+ var vapidirs = this.project.vapidirs();
+ // order is important ...
+ vapidirs += Path.get_dirname (context.get_vapi_path("gee-1.0")) ; //usr/share/vala/vapi
+ vapidirs += Path.get_dirname (context.get_vapi_path("glib-2.0")) ; // usr/share/vala-XXX/vapi
+
+ for(var i =0 ; i < vapidirs.length; i++) {
+ valac += " --vapidir=" + vapidirs[i];
+ }
+
+
+ context.vapi_directories = vapidirs;
+ context.report.enable_warnings = true;
+ context.metadata_directories = { };
+ context.gir_directories = {};
+ context.thread = true;
+ valac += " --thread ";
+
+ // we should parse the compilegroup to find out the flags..
+ context.debug = true;
+ valac += " -g ";
+
+ this.report = new ValaSourceReport(this.original_filepath, this.filepath);
+ context.report = this.report;
+
+ valac += " -b " + GLib.Environment.get_home_dir() + " ";
+ context.basedir = GLib.Environment.get_home_dir(); //Posix.realpath (".");
+
+ context.directory = null; //??? causes target to end up in the right place at present..
+
+
+ // add default packages:
+ //if (settings.profile == "gobject-2.0" || settings.profile == "gobject" || settings.profile == null) {
+ context.profile = Vala.Profile.GOBJECT;
+
+ var ns_ref = new Vala.UsingDirective (new Vala.UnresolvedSymbol (null, "GLib", null));
+ context.root.add_using_directive (ns_ref);
+
+ var source_file = new Vala.SourceFile (
+ context,
+ Vala.SourceFileType.SOURCE,
+ this.filepath
+ );
+ source_file.add_using_directive (ns_ref);
+ context.add_source_file (source_file);
+
+ // add all the files (except the current one) - this.file.path
+ var pr = this.project;
+
+
+ if (this.build_module.length > 0) {
+ var cg = pr.compilegroups.get(this.build_module);
+ if (this.output.length < 1 && cg.target_bin.length > 0) {
+ this.output = cg.target_bin;
+ }
+
+
+ for (var i = 0; i < cg.sources.size; i++) {
+ var path = pr.resolve_path(
+ pr.resolve_path_combine_path(pr.firstPath(),cg.sources.get(i)));
+
+ if (!FileUtils.test(path, FileTest.EXISTS)) {
+ continue;
+ }
+ // skip thie original
+ if (path == this.original_filepath) {
+ valac += " " + path;
+ continue;
+ }
+ if (FileUtils.test(path, FileTest.IS_DIR)) {
+ continue;
+ }
+ //print("Add source file %s\n", path);
+
+ valac += " " + path;
+
+ if (Regex.match_simple("\\.c$", path)) {
+ context.add_c_source_file(path);
+ continue;
+ }
+
+
+ var xsf = new Vala.SourceFile (
+ context,
+ Vala.SourceFileType.SOURCE,
+ path
+ );
+ xsf.add_using_directive (ns_ref);
+ context.add_source_file(xsf);
+
+ }
+ }
+
+ // print("%s\n", valac); -
+ // default.. packages..
+ context.add_external_package ("glib-2.0");
+ context.add_external_package ("gobject-2.0");
+ // user defined ones..
+
+ var dcg = pr.compilegroups.get("_default_");
+ for (var i = 0; i < dcg.packages.size; i++) {
+
+ var pkg = dcg.packages.get(i);
+ // do not add libvala versions except the one that matches the one we are compiled against..
+ if (Regex.match_simple("^libvala", pkg) && pkg != ("libvala-0." + ver.to_string())) {
+ continue;
+ }
+ valac += " --pkg " + dcg.packages.get(i);
+ if (!this.has_vapi(context.vapi_directories, dcg.packages.get(i))) {
+ GLib.debug("Skip vapi '%s' - does not exist", dcg.packages.get(i));
+ continue;
+ }
+
+ context.add_external_package (dcg.packages.get(i));
+ }
+
+ //Vala.Config.PACKAGE_SUFFIX.substring (1)
+
+ // add the modules...
+
+ context.output = this.output == "" ? "/tmp/testrun" : this.output;
+ valac += " -o " + context.output;
+ GLib.debug("%s", valac);
+
+ context.target_glib_major = 2;
+ context.target_glib_minor = 32;
+ valac += " --target-glib=2.32 ";
+
+ //add_documented_files (context, settings.source_files);
+
+ Vala.Parser parser = new Vala.Parser ();
+ parser.parse (context);
+ //gir_parser.parse (context);
+ if (context.report.get_errors () > 0) {
+ Vala.CodeContext.pop ();
+ GLib.debug("parse got errors");
+ //((ValaSourceReport)context.report).dump();
+ this.report.result.set_boolean_member("success", false);
+ this.report.result.set_string_member("message", "Parse failed");
+
+ this.outputResult();
+ return;
+ }
+
+
+
+ // check context:
+ context.check ();
+ if (context.report.get_errors () > 0) {
+ Vala.CodeContext.pop ();
+ GLib.debug("check got errors");
+ //((ValaSourceReport)context.report).dump();
+ this.report.result.set_boolean_member("success", false);
+ this.report.result.set_string_member("message", "Check failed");
+
+ this.outputResult();
+ return;
+ }
+
+ if (this.output == "") {
+ Vala.CodeContext.pop ();
+ this.outputResult();
+ return;
+ }
+
+ context.codegen = new Vala.GDBusServerModule ();
+
+
+ context.codegen.emit (context);
+
+ var ccompiler = new Vala.CCodeCompiler ();
+ var cc_command = Environment.get_variable ("CC");
+
+
+ string [] cc_options = { "-lm", "-pg" };
+ valac += " -X -lm -X -pg";
+
+#if VALA_0_28 || VALA_0_30 || VALA_0_32
+ var pkg_config_command = Environment.get_variable ("PKG_CONFIG");
+ ccompiler.compile (context, cc_command, cc_options, pkg_config_command);
+#else
+ ccompiler.compile (context, cc_command, cc_options);
+#endif
+
+ print("%s\n", valac);
+ Vala.CodeContext.pop ();
+ GLib.Process.exit(Posix.EXIT_SUCCESS);
+ //this.outputResult();
+
+ }
+ public bool has_vapi(string[] dirs, string vapi)
+ {
+ for(var i =0 ; i < dirs.length; i++) {
+ GLib.debug("check VAPI - %s", dirs[i] + "/" + vapi + ".vapi");
+ if (!FileUtils.test( dirs[i] + "/" + vapi + ".vapi", FileTest.EXISTS)) {
+ continue;
+ }
+ return true;
+ }
+ return false;
+
+ }
+
+ public void outputResult()
+ {
+ var generator = new Json.Generator ();
+ generator.indent = 1;
+ generator.pretty = true;
+ var node = new Json.Node(Json.NodeType.OBJECT);
+ node.set_object(this.report.result);
+
+ generator.set_root(node);
+
+ generator.pretty = true;
+ generator.indent = 4;
+
+
+ print("%s\n", generator.to_data (null));
+ GLib.Process.exit(Posix.EXIT_SUCCESS);
+
+
+ }
+
+ }
+}
+/*
+int main (string[] args) {
+
+ var a = new ValaSource(file);
+ a.create_valac_tree();
+ return 0;
+}
+*/
+
+
--- /dev/null
+
+
+ // valac -g --pkg libvala-0.26 --pkg gee-1.0 --pkg json-glib-1.0 --pkg gtk+-3.0 VapiParser.vala Gir.vala GirObject.vala -o /tmp/vdoc
+
+namespace Palete {
+
+ public errordomain VapiParserError {
+ PARSE_FAILED
+ }
+
+
+ public class VapiParser : Vala.CodeVisitor {
+
+ Vala.CodeContext context;
+
+ public VapiParser() {
+ base();
+ // should not really happen..
+ if (Gir.cache == null) {
+ Gir.cache = new Gee.HashMap<string,Gir>();
+ }
+ }
+
+
+
+ public override void visit_namespace (Vala.Namespace element)
+ {
+ if (element == null) {
+
+ return;
+ }
+
+
+ //print("parsing namespace %s\n", element.name);
+ if (element.name == null) {
+ element.accept_children(this); // catch sub namespaces..
+ return;
+ }
+ this.add_namespace(null, element);
+ }
+ public void add_namespace(GirObject? parent, Vala.Namespace element)
+ {
+
+
+ var g = new GirObject("Package",element.name) ;
+ if (parent == null) {
+ Gir.cache.set(element.name, (Gir)g);
+ } else {
+ // we add it as a class of the package.. even though its a namespace..
+ parent.classes.set(element.name, g);
+ }
+
+
+ foreach(var c in element.get_classes()) {
+ this.add_class(g, c);
+ }
+ foreach(var c in element.get_enums()) {
+ this.add_enum(g, c);
+ }
+ foreach(var c in element.get_interfaces()) {
+ this.add_interface(g, c);
+ }
+ foreach(var c in element.get_namespaces()) {
+ this.add_namespace(g, c);
+ }
+ foreach(var c in element.get_methods()) {
+ this.add_method(g, c);
+ }
+ element.accept_children(this); // catch sub namespaces..
+
+
+ }
+
+
+ public void add_enum(GirObject parent, Vala.Enum cls)
+ {
+
+ var c = new GirObject("Enum", cls.name);
+ parent.consts.set(cls.name, c);
+ c.ns = parent.name;
+
+ c.gparent = parent;
+
+ foreach(var e in cls.get_values()) {
+ var em = new GirObject("EnumMember",e.name);
+ em.gparent = c;
+ em.ns = c.ns;
+ em.type = e.type_reference == null || e.type_reference.data_type == null ? "" : e.type_reference.data_type.get_full_name();
+ // unlikely to get value..
+ //c.value = element->get_prop("value");
+ c.consts.set(e.name,em);
+ }
+
+
+
+
+ }
+
+ public void add_interface(GirObject parent, Vala.Interface cls)
+ {
+
+ var c = new GirObject("Interface", parent.name + "." + cls.name);
+ parent.classes.set(cls.name, c);
+ c.ns = parent.name;
+ //c.parent = cls.base_class == null ? "" : cls.base_class.get_full_name() ; // extends...
+ c.gparent = parent;
+
+ foreach(var p in cls.get_properties()) {
+ this.add_property(c, p);
+ }
+ // methods...
+ foreach(var p in cls.get_signals()) {
+ this.add_signal(c, p);
+ }
+
+ foreach(var p in cls.get_methods()) {
+ // skip static methods..
+ if (p.binding != Vala.MemberBinding.INSTANCE &&
+ !(p is Vala.CreationMethod)
+ ) {
+ continue;
+ }
+
+ this.add_method(c, p);
+ }
+
+ //if (cls.base_class != null) {
+ // c.inherits.add(cls.base_class.get_full_name());
+ //}
+ //foreach(var p in cls.get_base_types()) {
+ // if (p.data_type != null) {
+ // c.implements.add(p.data_type.get_full_name());
+ // }
+ //}
+
+
+
+
+ }
+
+ public void add_class(GirObject parent, Vala.Class cls)
+ {
+
+ var c = new GirObject("Class", parent.name + "." + cls.name);
+ parent.classes.set(cls.name, c);
+ c.ns = parent.name;
+ c.parent = cls.base_class == null ? "" : cls.base_class.get_full_name() ; // extends...
+ c.gparent = parent;
+
+ foreach(var p in cls.get_properties()) {
+ this.add_property(c, p);
+ }
+ // methods...
+ foreach(var p in cls.get_signals()) {
+ this.add_signal(c, p);
+ }
+
+ foreach(var p in cls.get_methods()) {
+ // skip static methods..
+ if (p.binding != Vala.MemberBinding.INSTANCE &&
+ !(p is Vala.CreationMethod)
+ ) {
+ continue;
+ }
+
+ this.add_method(c, p);
+ }
+
+ if (cls.base_class != null) {
+ c.inherits.add(cls.base_class.get_full_name());
+ }
+ foreach(var p in cls.get_base_types()) {
+ if (p.data_type != null) {
+ c.implements.add(p.data_type.get_full_name());
+ }
+ }
+
+
+
+
+ }
+ public void add_property(GirObject parent, Vala.Property prop)
+ {
+ var c = new GirObject("Prop",prop.name);
+ c.gparent = parent;
+ c.ns = parent.ns;
+ c.propertyof = parent.name;
+
+ c.type = prop.property_type.data_type == null ? "" : prop.property_type.data_type.get_full_name();
+ parent.props.set(prop.name,c);
+
+ }
+ public void add_signal(GirObject parent, Vala.Signal sig)
+ {
+ var c = new GirObject("Signal",sig.name);
+ c.gparent = parent;
+ c.ns = parent.ns;
+
+ if (sig.return_type.data_type != null) {
+ //print("creating return type on signal %s\n", sig.name);
+ var cc = new GirObject("Return", "return-value");
+ cc.gparent = c;
+ cc.ns = c.ns;
+ cc.type = sig.return_type.data_type.get_full_name();
+ c.return_value = cc;
+ }
+ parent.signals.set(sig.name,c);
+
+ var params = sig.get_parameters() ;
+ if (params.size < 1) {
+ return;
+ }
+ var cc = new GirObject("Paramset",sig.name); // what's the name on this?
+ cc.gparent = c;
+ cc.ns = c.ns;
+ c.paramset = cc;
+
+
+ foreach(var p in params) {
+ this.add_param(cc, p);
+ }
+
+ }
+
+ public void add_method(GirObject parent, Vala.Method met)
+ {
+ var n = met.name == null ? "" : met.name;
+ var ty = "Method";
+ if (met is Vala.CreationMethod) {
+ ty = "Ctor";
+ if(n == "" || n == ".new") {
+ n = "new";
+ }
+
+ }
+ //print("add_method : %s\n", n);
+
+ var c = new GirObject(ty,n);
+ c.gparent = parent;
+ c.ns = parent.ns;
+
+ if (met.return_type.data_type != null) {
+ //print("creating return type on method %s\n", met.name);
+ var cc = new GirObject("Return", "return-value");
+ cc.gparent = c;
+ cc.ns = c.ns;
+ cc.type = met.return_type.data_type.get_full_name();
+ c.return_value = cc;
+ }
+ if (met is Vala.CreationMethod) {
+ parent.ctors.set(c.name,c);
+ } else {
+ parent.methods.set(met.name,c);
+ }
+
+ var params = met.get_parameters() ;
+ if (params.size < 1) {
+ return;
+ }
+ var cc = new GirObject("Paramset",met.name); // what's the name on this?
+ cc.gparent = c;
+ cc.ns = c.ns;
+ c.paramset = cc;
+ c.sig = "(";
+
+ foreach(var p in params) {
+ if (p.name == null && !p.ellipsis) {
+ continue;
+ }
+ var pp = this.add_param(cc, p);
+ c.sig += (c.sig == "(" ? "" : ",");
+ c.sig += " " + (pp.direction == "in" ? "" : pp.direction) + " " + pp.type + " " + pp.name;
+ }
+ c.sig += (c.sig == "(" ? ")" : " )");
+
+ }
+
+ public GirObject add_param(GirObject parent, Vala.Parameter pam)
+ {
+
+ var n = pam.name;
+ if (pam.ellipsis) {
+ n = "___";
+ }
+ var c = new GirObject("Param",n);
+ c.gparent = parent;
+ c.ns = parent.ns;
+ c.direction = "??";
+ switch (pam.direction) {
+ case Vala.ParameterDirection.IN:
+ c.direction = "in";
+ break;
+ case Vala.ParameterDirection.OUT:
+ c.direction = "out";
+ break;
+ case Vala.ParameterDirection.REF:
+ c.direction = "ref";
+ break;
+ }
+
+ parent.params.add(c);
+
+ if (!pam.ellipsis) {
+ c.type = pam.variable_type.data_type == null ? "" : pam.variable_type.data_type.get_full_name();
+ }
+ Gir.checkParamOverride(c);
+ return c;
+
+ }
+
+ public void create_valac_tree( )
+ {
+ // init context:
+ context = new Vala.CodeContext ();
+ Vala.CodeContext.push (context);
+
+ context.experimental = false;
+ context.experimental_non_null = false;
+#if VALA_0_32
+ var ver=32;
+#elif VALA_0_30
+ var ver=30;
+#elif VALA_0_28
+ var ver=28;
+#elif VALA_0_26
+ var ver=26;
+#elif VALA_0_24
+ var ver=24;
+#elif VALA_0_22
+ var ver=22;
+#endif
+
+ for (int i = 2; i <= ver; i += 2) {
+ context.add_define ("VALA_0_%d".printf (i));
+ }
+
+
+ //var vapidirs = ((Project.Gtk)this.file.project).vapidirs();
+ // what's the current version of vala???
+
+
+ //vapidirs += Path.get_dirname (context.get_vapi_path("glib-2.0")) ;
+
+ var vapidirs = context.vapi_directories;
+
+ vapidirs += (BuilderApplication.configDirectory() + "/resources/vapi");
+ context.vapi_directories = vapidirs;
+ // or context.get_vapi_path("glib-2.0"); // should return path..
+ //context.vapi_directories = vapidirs;
+ context.report.enable_warnings = true;
+ context.metadata_directories = { };
+ context.gir_directories = {};
+ context.thread = true;
+
+
+ //this.report = new ValaSourceReport(this.file);
+ //context.report = this.report;
+
+
+ context.basedir = "/tmp"; //Posix.realpath (".");
+
+ context.directory = context.basedir;
+
+
+ // add default packages:
+ //if (settings.profile == "gobject-2.0" || settings.profile == "gobject" || settings.profile == null) {
+ context.profile = Vala.Profile.GOBJECT;
+
+ var ns_ref = new Vala.UsingDirective (new Vala.UnresolvedSymbol (null, "GLib", null));
+ context.root.add_using_directive (ns_ref);
+
+ context.add_external_package ("glib-2.0");
+ context.add_external_package ("gobject-2.0");
+
+ // core packages we are interested in for the builder..
+ // some of these may fail... - we probalby need a better way to handle this..
+
+ context.add_external_package ("gtk+-3.0");
+ context.add_external_package ("libsoup-2.4");
+ if (!context.add_external_package ("webkit2gtk-4.0")) {
+ context.add_external_package ("webkit2gtk-3.0");
+ }
+ // these are supposed to be in the 'deps' file, but it's not getting read..
+ context.add_external_package ("cogl-1.0");
+ context.add_external_package ("json-glib-1.0");
+ context.add_external_package ("clutter-gtk-1.0");
+
+
+
+ context.add_external_package ("gdl-3.0");
+ context.add_external_package ("gtksourceview-3.0");
+ context.add_external_package ("vte-2.90"); //??? -- hopefullly that works..
+ //add_documented_files (context, settings.source_files);
+
+ Vala.Parser parser = new Vala.Parser ();
+ parser.parse (context);
+ //gir_parser.parse (context);
+ if (context.report.get_errors () > 0) {
+
+ throw new VapiParserError.PARSE_FAILED("failed parse VAPIS, so we can not write file correctly");
+
+ print("parse got errors");
+
+
+ Vala.CodeContext.pop ();
+ return ;
+ }
+
+
+
+ // check context:
+ context.check ();
+ if (context.report.get_errors () > 0) {
+ print("check got errors");
+ throw new VapiParserError.PARSE_FAILED("failed check VAPIS, so we can not write file correctly");
+ Vala.CodeContext.pop ();
+
+ return;
+
+ }
+
+
+
+ context.accept(this);
+
+ context = null;
+ // dump the tree for Gtk?
+
+ Vala.CodeContext.pop ();
+
+ print("ALL OK?\n");
+
+ }
+ //
+ // startpoint:
+ //
+
+ }
+}
+ /*
+int main (string[] args) {
+
+ var g = Palete.Gir.factoryFqn("Gtk.SourceView");
+ print("%s\n", g.asJSONString());
+
+ return 0;
+}
+
+
+*/
--- /dev/null
+//<Script type="text/javascript">
+/**
+ * Gtk projects - normally vala based now..
+ *
+ * should have a few extra features..
+ *
+ * like:
+ * compile flags etc..
+ * different versions (eg. different files can compile different versions - eg. for testing.
+ *
+ * If we model this like adjuta - then we would need a 'project' file that is actually in
+ * the directory somewhere... - and is revision controlled etc..
+ *
+ * builder.config ??
+ *
+ *
+ *
+ *
+ */
+
+
+namespace Project {
+ static int gtk_id = 1;
+
+
+ public class Gtk : Project
+ {
+
+ public Gtk(string path) {
+
+
+ base(path);
+ this.xtype = "Gtk";
+ var gid = "project-gtk-%d".printf(gtk_id++);
+ this.id = gid;
+ try {
+ this.loadConfig();
+ } catch (GLib.Error e ) {
+ // is tihs ok?
+ }
+
+ }
+ public Gee.HashMap<string,GtkValaSettings> compilegroups;
+
+ public void loadConfig() throws GLib.Error
+ {
+ // load a builder.config JSON file.
+ //
+ this.compilegroups = new Gee.HashMap<string,GtkValaSettings>();
+
+
+ var fn = this.firstPath() + "/config1.builder";
+ GLib.debug("load: " + fn );
+
+ if (!FileUtils.test(fn, FileTest.EXISTS)) {
+ this.compilegroups.set("_default_", new GtkValaSettings("_default_") );
+ return;
+ }
+
+ var pa = new Json.Parser();
+ pa.load_from_file(fn);
+ var node = pa.get_root();
+
+ // should be an array really.
+ if (node.get_node_type () != Json.NodeType.ARRAY) {
+ throw new Error.INVALID_FORMAT ("Unexpected element type %s", node.type_name ());
+ }
+
+ var obj = node.get_array ();
+ for(var i= 0;i<obj.get_length();i++) {
+ var el = obj.get_object_element(i);
+ var vs = new GtkValaSettings.from_json(el);
+ if (vs.name != "_default_") {
+ vs.parent = this.compilegroups.get("_default_");
+ }
+ this.compilegroups.set(vs.name,vs);
+ }
+ GLib.debug("%s\n",this.configToString ());
+
+ }
+ public string configToString()
+ {
+ var ar = new Json.Array();
+ var iter = this.compilegroups.map_iterator();
+ while(iter.next()) {
+
+ ar.add_object_element(iter.get_value().toJson());
+ }
+
+ var generator = new Json.Generator ();
+ generator.indent = 4;
+ generator.pretty = true;
+ var node = new Json.Node(Json.NodeType.ARRAY);
+ node.set_array(ar);
+ generator.set_root(node);
+ return generator.to_data(null);
+ }
+
+ public void writeConfig()
+ {
+ var fn = this.firstPath() + "/config1.builder";
+ GLib.debug("write: " + fn );
+
+
+ var f = GLib.File.new_for_path(fn);
+ var data_out = new GLib.DataOutputStream(
+ f.replace(null, false, GLib.FileCreateFlags.NONE, null)
+ );
+ data_out.put_string(this.configToString(), null);
+ data_out.close(null);
+
+ return ;
+
+ }
+ /**
+ * perhaps we should select the default in the window somewhere...
+ */
+ public string firstBuildModule()
+ {
+ var iter = this.compilegroups.map_iterator();
+ while(iter.next()) {
+
+ if (iter.get_value().name == "__default__") {
+ continue;
+ }
+
+ return iter.get_value().name;
+ }
+ return "";
+ }
+
+
+ public string relPath(string target)
+ {
+ var basename = this.firstPath();
+ // eg. base = /home/xxx/fred/blogs
+ // target = /home/xxx/fred/jones
+
+ // this does not work correctly...
+ var bb = basename;
+ var prefix = "";
+ while (true) {
+ if ( bb.length < target.length &&
+ target.substring(0, bb.length) == bb) {
+
+ return prefix + target.substring(bb.length );
+ }
+ if (bb.length < 1) {
+ throw new Error.INVALID_FORMAT ("Could not work out relative path %s to %s",
+ basename, target);
+ }
+ bb = GLib.Path.get_dirname(bb);
+ prefix += "../";
+
+ }
+
+ }
+ /**
+ * get a list of files for a folder..
+ *
+ * - in the project manager this has to list all possible compilable
+ * files - eg. exclue XXX.vala.c or XXX.c with the same name as
+ * a vala file (so to ignore the generated files)
+ *
+ * - for the editor navigation - this should exclude all files that
+ * are vala based on a bjs file..
+ *
+ */
+
+ public Gee.ArrayList<string> filesAll(string in_path,bool abspath = true)
+ {
+ var ret = new Gee.ArrayList<string>();
+
+ var dirname = this.resolve_path(
+ this.resolve_path_combine_path(this.firstPath(),in_path));
+
+ GLib.debug("SCAN %s", dirname);
+ // scan the directory for files -- ending with vala || c
+
+
+ var dir = File.new_for_path(dirname);
+ if (!dir.query_exists()) {
+ GLib.debug("SCAN %s - skip - does not exist\n", dirname);
+ return ret;
+ }
+ var pathprefix = abspath ? dirname : in_path;
+
+ try {
+ var file_enum = dir.enumerate_children(
+ "standard::*",
+ GLib.FileQueryInfoFlags.NONE,
+ null
+ );
+
+
+ FileInfo next_file;
+ while ((next_file = file_enum.next_file(null)) != null) {
+ var fn = next_file.get_display_name();
+
+ if (next_file.get_file_type () == GLib.FileType.DIRECTORY) {
+
+ GLib.debug("SKIP %s not regular ", fn);
+ continue;
+ }
+ if (!Regex.match_simple("^text", next_file.get_content_type())) {
+ continue;
+ }
+ GLib.debug("SCAN ADD %s : %s", fn, next_file.get_content_type());
+ ret.add(pathprefix + "/" + fn);
+
+ // any other valid types???
+
+ }
+
+ } catch(Error e) {
+ GLib.warning("oops - something went wrong scanning the projects\n");
+ }
+
+ return ret;
+ }
+
+ public Gee.ArrayList<string> filesForCompile(string in_path, bool abspath = true)
+ {
+ var allfiles = this.filesAll(in_path,abspath);
+ var ret = new Gee.ArrayList<string>();
+
+
+ for (var i = 0; i < allfiles.size; i ++) {
+ var fn = allfiles.get(i);
+ try {
+ if (Regex.match_simple("\\.vala$", fn)) {
+ ret.add( fn);
+ continue;
+ }
+ // vala.c -- ignore..
+ if (Regex.match_simple("\\.vala\\.c$", fn)) {
+ continue;
+ }
+ // not a c file...
+ if (!Regex.match_simple("\\.c$", fn)) {
+ continue;
+ }
+
+ // is the c file the same as a vala file...
+
+
+
+ var vv = (new Regex("\\.c$")).replace( fn, fn.length, 0, ".vala");
+
+
+
+ if (allfiles.index_of( vv) > -1) {
+ continue;
+ }
+ // add the 'c' file..
+ ret.add(fn);
+ } catch (Error e) {
+ continue;
+ }
+ }
+ // sort.
+ ret.sort((fa,fb) => {
+ return ((string)fa).collate((string) fb);
+ });
+ return ret;
+
+ }
+
+ public Gee.ArrayList<string> filesForOpen(string in_path)
+ {
+ var allfiles = this.filesAll(in_path);
+ var ret = new Gee.ArrayList<string>();
+ GLib.debug("SCAN %s - %d files",in_path, allfiles.size);
+
+ for (var i = 0; i < allfiles.size; i ++) {
+ var fn = allfiles.get(i);
+ var bn = GLib.Path.get_basename(fn);
+ try {
+
+ if (Regex.match_simple("\\.vala\\.c$", fn)) {
+ GLib.debug("SKIP %s - vala.c",fn);
+
+ continue;
+ }
+
+ if (Regex.match_simple("\\.bjs$", fn)) {
+ GLib.debug("SKIP %s - .bjs",fn);
+ continue;
+ }
+
+ if (Regex.match_simple("\\~$", fn)) {
+ GLib.debug("SKIP %s - ~",fn);
+ continue;
+ }
+ if (Regex.match_simple("\\.stamp$", fn)) {
+ GLib.debug("SKIP %s - .o",fn);
+ continue;
+ }
+ if ("stamp-h1" == bn) {
+ GLib.debug("SKIP %s - .o",fn);
+ continue;
+ }
+
+ // confgure.am
+ if ("config.h" == bn || "config.h.in" == bn || "config.log" == bn || "configure" == bn ) {
+ if (allfiles.index_of( in_path +"/configure.ac") > -1) {
+ continue;
+ }
+ }
+ // makefile
+ if ("Makefile" == bn || "Makefile.in" == bn ) {
+ if (allfiles.index_of( in_path +"/Makefile.am") > -1) {
+ continue;
+ }
+ }
+
+ if (Regex.match_simple("^\\.", bn)) {
+ GLib.debug("SKIP %s - hidden",fn);
+ continue;
+ }
+ if (Regex.match_simple("\\.vala$", fn)) {
+ var vv = (new Regex("\\.vala$")).replace( fn, fn.length, 0, ".bjs");
+ if (allfiles.index_of( vv) > -1) {
+ GLib.debug("SKIP %s - .vala (got bjs)",fn);
+ continue;
+ }
+ GLib.debug("ADD %s",fn);
+ ret.add( fn);
+ continue;
+ }
+ // vala.c -- ignore..
+
+ // not a c file...
+ if (Regex.match_simple("\\.c$", fn)) {
+
+ var vv = (new Regex("\\.c$")).replace( fn, fn.length, 0, ".vala");
+ if (allfiles.index_of( vv) > -1) {
+ GLib.debug("SKIP %s - .c (got vala)",fn);
+ continue;
+ }
+ GLib.debug("ADD %s",fn);
+ ret.add( fn);
+ continue;
+ }
+
+ if (GLib.Path.get_basename( fn) == "config1.builder") {
+ continue;
+ }
+ // not .c / not .vala /not .bjs.. -- other type of file..
+ // allow ???
+ GLib.debug("ADD %s",fn);
+ // add the 'c' file..
+ ret.add(fn);
+ } catch (Error e) {
+ GLib.debug("Exception %s",e.message);
+ continue;
+ }
+ }
+ // sort.
+ ret.sort((fa,fb) => {
+ return ((string)fa).collate((string) fb);
+ });
+ return ret;
+
+ }
+
+
+
+
+
+ public string resolve_path_combine_path(string first, string second)
+ {
+ string ret = first;
+ if (first.length > 0 && second.length > 0 && !first.has_suffix("/") && !second.has_prefix("/"))
+ {
+ ret += "/";
+ }
+ //print("combined path = %s", ret + second);
+ return ret + second;
+ }
+ public string resolve_path_times(string part, int times, string? clue = null)
+ {
+ string ret = "";
+ for (int i = 0; i < times; i++)
+ {
+ if (clue != null && i > 0)
+ {
+ ret += clue;
+ }
+ ret += part;
+ }
+ return ret;
+ }
+ public string resolve_path(string _path, string? relative = null)
+ {
+ string path = _path;
+ if (relative != null)
+ {
+ path = this.resolve_path_combine_path(path, relative);
+ }
+ string[] parts = path.split("/");
+ string[] ret = {};
+ int relative_parts = 0;
+
+ foreach (var part in parts)
+ {
+ if (part.length < 1 || part == ".")
+ {
+ continue;
+ }
+
+ if (part == "..")
+ {
+ if (ret.length > 0)
+ {
+ ret = ret[0: ret.length -1];
+ }
+ else
+ {
+ relative_parts++;
+ }
+ continue;
+ }
+
+ ret += part;
+ }
+
+ path = this.resolve_path_combine_path(this.resolve_path_times("..", relative_parts, "/"), string.joinv("/", ret));
+ if (_path.has_prefix("/"))
+ {
+ path = "/" + path;
+ }
+ return path;
+ }
+
+ public string[] vapidirs()
+ {
+ string[] ret = {};
+ var sources = this.compilegroups.get("_default_").sources;
+ for(var i =0; i< sources.size; i++) {
+
+ var path = this.resolve_path( this.firstPath(), sources.get(i));
+
+ if (Path.get_basename (path) == "vapi") {
+ GLib.debug("Adding VAPIDIR: %s\n", path);
+ ret += path;
+ }
+
+ }
+ return ret;
+
+ }
+ public string[] sourcedirs()
+ {
+ string[] ret = {};
+ var sources = this.compilegroups.get("_default_").sources;
+ ret += this.firstPath();
+ for(var i =0; i< sources.size; i++) {
+
+ var path = this.resolve_path( this.firstPath(), sources.get(i));
+ if (path == this.firstPath()) {
+ continue;
+ }
+ if (Path.get_basename (path) == "vapi") {
+ continue;
+
+ }
+ // GLib.debug("Adding VAPIDIR: %s\n", path);
+ ret += path;
+ }
+ return ret;
+
+ }
+
+ }
+ // an object describing a build config (or generic ...)
+ public class GtkValaSettings : Object {
+ public string name;
+ public GtkValaSettings? parent;
+
+ public string compile_flags; // generic to all.
+ public Gee.ArrayList<string> packages; // list of packages?? some might be genericly named?
+ public Gee.ArrayList<string> sources; // list of files+dirs (relative to project)
+ public string target_bin;
+
+ public string execute_args;
+
+
+ public GtkValaSettings(string name)
+ {
+ this.name = name;
+ this.compile_flags = "";
+ this.target_bin = "";
+ this.packages = new Gee.ArrayList<string>();
+ this.sources = new Gee.ArrayList<string>();
+ this.execute_args = "";
+
+ }
+
+
+ public GtkValaSettings.from_json(Json.Object el) {
+
+
+ this.name = el.get_string_member("name");
+ this.compile_flags = el.get_string_member("compile_flags");
+ if ( el.has_member("execute_args")) {
+ this.execute_args = el.get_string_member("execute_args");
+ } else {
+ this.execute_args = "";
+ }
+ this.target_bin = el.get_string_member("target_bin");
+ // sources and packages.
+ this.sources = this.readArray(el.get_array_member("sources"));
+ this.packages = this.readArray(el.get_array_member("packages"));
+
+ }
+
+ // why not array of strings?
+
+ public Gee.ArrayList<string> readArray(Json.Array ar)
+ {
+ var ret = new Gee.ArrayList<string>();
+ for(var i =0; i< ar.get_length(); i++) {
+ ret.add(ar.get_string_element(i));
+ }
+ return ret;
+ }
+
+ public Json.Object toJson()
+ {
+ var ret = new Json.Object();
+ ret.set_string_member("name", this.name);
+ ret.set_string_member("compile_flags", this.compile_flags);
+ ret.set_string_member("execute_args", this.execute_args);
+ ret.set_string_member("target_bin", this.target_bin);
+ ret.set_array_member("sources", this.writeArray(this.sources));
+ ret.set_array_member("packages", this.writeArray(this.packages));
+ return ret;
+ }
+ public Json.Array writeArray(Gee.ArrayList<string> ar) {
+ var ret = new Json.Array();
+ for(var i =0; i< ar.size; i++) {
+ ret.add_string_element(ar.get(i));
+ }
+ return ret;
+ }
+
+
+ }
+
+
+}
--- /dev/null
+//<Script type="text/javascript">
+
+/**
+ * Project Object
+ *
+ * Projects can only contain one directory... - it can import other projects..(later)
+ *
+ * we need to sort out that - paths is currently a key/value array..
+ *
+ *
+ *
+ */
+namespace Project {
+ public errordomain Error {
+ INVALID_TYPE,
+ NEED_IMPLEMENTING,
+ MISSING_FILE,
+ INVALID_VALUE,
+ INVALID_FORMAT
+ }
+
+ // static array of all projects.
+ public Gee.HashMap<string,Project> projects;
+
+
+ public bool projects_loaded = false;
+
+
+ public class Project : Object {
+
+ public signal void on_changed ();
+
+ public string id;
+ public string fn = ""; // just a md5...
+ public string name = "";
+ public string runhtml = "";
+ public string base_template = "";
+ public string rootURL = "";
+ public Gee.HashMap<string,string> paths;
+ public Gee.HashMap<string,JsRender.JsRender> files ;
+ //tree : false,
+ public string xtype;
+
+ public Json.Object json_project_data;
+ public Palete.RooDatabase roo_database;
+
+ bool is_scanned;
+
+
+ public Project (string path) {
+
+ this.name = GLib.Path.get_basename(path); // default..
+ this.json_project_data = new Json.Object();
+
+ this.is_scanned = false;
+ this.paths = new Gee.HashMap<string,string>();
+ this.files = new Gee.HashMap<string,JsRender.JsRender>();
+ //XObject.extend(this, cfg);
+ //this.files = { };
+ if (path.length > 0) {
+ this.paths.set(path, "dir");
+ }
+ // dummy roo database...
+ this.initRooDatabase();
+
+
+
+ }
+ public void initRooDatabase()
+ {
+
+ this.roo_database = new Palete.RooDatabase.from_project(this);
+ }
+
+
+
+ public static void loadAll(bool force = false)
+ {
+ if (projects_loaded && !force) {
+ return;
+ }
+
+ var dirname = GLib.Environment.get_home_dir() + "/.Builder";
+ var dir = File.new_for_path(dirname);
+ if (!dir.query_exists()) {
+ dir.make_directory();
+ return;
+ }
+ projects = new Gee.HashMap<string,Project>();
+
+
+ try {
+ var file_enum = dir.enumerate_children(
+ GLib.FileAttribute.STANDARD_DISPLAY_NAME,
+ GLib.FileQueryInfoFlags.NONE,
+ null
+ );
+
+
+ FileInfo next_file;
+ while ((next_file = file_enum.next_file(null)) != null) {
+ var fn = next_file.get_display_name();
+ if (!Regex.match_simple("\\.json$", fn)) {
+ continue;
+ }
+ factoryFromFile(dirname + "/" + fn);
+ }
+ } catch(Error e) {
+ GLib.warning("oops - something went wrong scanning the projects\n");
+ }
+
+
+ }
+
+ public static Gee.ArrayList<Project> allProjectsByName()
+ {
+ var ret = new Gee.ArrayList<Project>();
+ var iter = projects.map_iterator();
+ while (iter.next()) {
+ ret.add(iter.get_value());
+ }
+ // fixme -- sort...
+ return ret;
+
+ }
+
+ public static Project getProject(string name)
+ {
+
+ var iter = projects.map_iterator();
+ while (iter.next()) {
+ if (iter.get_value().name == name) {
+ return iter.get_value();
+ }
+
+ }
+
+ return null;
+
+ }
+
+ public static string listAllToString()
+ {
+ var all = new Gee.ArrayList<Project>();
+
+ var fiter = projects.map_iterator();
+
+ while(fiter.next()) {
+ all.add(fiter.get_value());
+ }
+
+ all.sort((fa,fb) => {
+ return ((Project)fa).name.collate(((Project)fb).name);
+
+ });
+
+ var iter = all.list_iterator();
+ var ret = "ID\tName\tDirectory\n";
+ while (iter.next()) {
+ ret += "%s\t%s\t%s\n".printf(
+ iter.get().fn,
+ iter.get().name,
+ iter.get().firstPath()
+ );
+
+
+ }
+
+ return ret;
+
+ }
+
+
+
+ public static Project getProjectByHash(string fn)
+ {
+
+ var iter = projects.map_iterator();
+ while (iter.next()) {
+ if (iter.get_value().fn == fn) {
+ return iter.get_value();
+ }
+
+ }
+
+ return null;
+
+ }
+
+ // load project data from project file.
+ public static void factoryFromFile(string jsonfile)
+ {
+
+ GLib.debug("parse %s", jsonfile);
+
+ var pa = new Json.Parser();
+ pa.load_from_file(jsonfile);
+ var node = pa.get_root();
+
+
+ if (node == null || node.get_node_type () != Json.NodeType.OBJECT) {
+ GLib.debug("SKIP " + jsonfile + " - invalid format?");
+ return;
+ }
+
+ var obj = node.get_object ();
+ var xtype = obj.get_string_member("xtype");
+
+
+ var paths = obj.get_object_member("paths");
+ var i = 0;
+ var fpath = "";
+ paths.foreach_member((sobj, key, val) => {
+ if (i ==0 ) {
+ fpath = key;
+ }
+
+ });
+
+
+ var proj = factory(xtype, fpath);
+
+ proj.json_project_data = obj; // store the original object...
+
+ proj.fn = Path.get_basename(jsonfile).split(".")[0];
+
+ // might not exist?
+
+ if (obj.has_member("runhtml")) {
+ proj.runhtml = obj.get_string_member("runhtml");
+ }
+ // might not exist?
+ if (obj.has_member("base_template")) {
+ proj.base_template = obj.get_string_member("base_template");
+ }
+ // might not exist?
+ if (obj.has_member("rootURL")) {
+ proj.rootURL = obj.get_string_member("rootURL");
+ }
+
+ proj.name = obj.get_string_member("name");
+
+
+ paths.foreach_member((sobj, key, val) => {
+ proj.paths.set(key, "dir");
+ });
+ proj.initRooDatabase();
+
+ GLib.debug("Add Project %s", proj.id);
+
+ projects.set(proj.id,proj);
+
+
+
+
+ }
+
+
+ public static Project factory(string xtype, string path)
+ {
+
+ // check to see if it's already loaded..
+
+
+ var iter = projects.map_iterator();
+ while (iter.next()) {
+ if (iter.get_value().hasPath( path)) {
+ return iter.get_value();
+ }
+ }
+
+
+ switch(xtype) {
+ case "Gtk":
+ return new Gtk(path);
+ case "Roo":
+ return new Roo(path);
+ }
+ throw new Error.INVALID_TYPE("invalid project type");
+
+ }
+
+
+
+ public static void remove(Project project)
+ {
+ // delete the file..
+ var dirname = GLib.Environment.get_home_dir() + "/.Builder";
+
+ FileUtils.unlink(dirname + "/" + project.fn + ".json");
+ projects.unset(project.id,null);
+
+
+ }
+
+
+ public void save()
+ {
+ // fixme..
+
+ if (this.fn.length < 1) {
+ // make the filename..
+ //var t = new DateTime.now_local ();
+ //TimeVal tv;
+ //t.to_timeval(out tv);
+ //var str = "%l:%l".printf(tv.tv_sec,tv.tv_usec);
+ var str = this.firstPath();
+
+ this.fn = GLib.Checksum.compute_for_string(GLib.ChecksumType.MD5, str, str.length);
+ }
+
+ var dirname = GLib.Environment.get_home_dir() + "/.Builder";
+ var s = this.toJSON(false);
+ FileUtils.set_contents(dirname + "/" + this.fn + ".json", s, s.length);
+
+
+ }
+
+
+
+ public string toJSON(bool show_all)
+ {
+
+
+ this.json_project_data.set_string_member("name", this.name);
+ this.json_project_data.set_string_member("fn", this.fn);
+ this.json_project_data.set_string_member("xtype", this.xtype);
+ this.json_project_data.set_string_member("runhtml", this.runhtml);
+ this.json_project_data.set_string_member("rootURL", this.rootURL);
+ this.json_project_data.set_string_member("base_template", this.base_template);
+ this.json_project_data.set_string_member("rootURL", this.rootURL);
+
+ var paths = new Json.Object();
+
+
+ var iter = this.paths.map_iterator();
+ while (iter.next()) {
+ paths.set_string_member(iter.get_key(), "path");
+ }
+ this.json_project_data.set_object_member("paths", paths);
+
+
+ if (show_all) {
+ var files = new Json.Array();
+
+
+ var fiter = this.files.map_iterator();
+ while (fiter.next()) {
+ files.add_string_element (fiter.get_key());
+ }
+ this.json_project_data.set_array_member("files", files);
+
+ }
+
+
+ var generator = new Json.Generator ();
+ var root = new Json.Node(Json.NodeType.OBJECT);
+ root.init_object(this.json_project_data);
+ generator.set_root (root);
+ if (show_all) {
+ generator.pretty = true;
+ generator.indent = 4;
+ }
+
+ return generator.to_data (null);
+
+
+ }
+ public string firstPath()
+ {
+ var iter = this.paths.map_iterator();
+ while (iter.next()) {
+ return iter.get_key();
+ }
+
+ return "";
+ }
+
+ public bool hasPath(string path)
+ {
+ var iter = this.paths.map_iterator();
+ while (iter.next()) {
+ if (iter.get_key() == path) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+
+ // returns the first path
+ public string getName()
+ {
+ var iter = this.paths.map_iterator();
+ while (iter.next()) {
+ return GLib.Path.get_basename(iter.get_key());
+ }
+
+ return "";
+ }
+
+ public Gee.ArrayList<JsRender.JsRender> sortedFiles()
+ {
+ var files = new Gee.ArrayList<JsRender.JsRender>();
+
+ var fiter = this.files.map_iterator();
+ while(fiter.next()) {
+ files.add(fiter.get_value());
+ }
+ files.sort((fa,fb) => {
+ return ((JsRender.JsRender)fa).name.collate(((JsRender.JsRender)fb).name);
+
+ });
+ return files;
+
+ }
+
+
+
+ public string listAllFilesToString()
+ {
+ this.scanDirs();
+ var iter = this.sortedFiles().list_iterator();
+ var ret = "ID\tName\tDirectory\n";
+ while (iter.next()) {
+ ret += "%s\n".printf(
+
+ iter.get().name
+
+ );
+
+
+ }
+
+ return ret;
+
+ }
+
+
+
+
+ public JsRender.JsRender? getByName(string name)
+ {
+
+ var fiter = files.map_iterator();
+ while(fiter.next()) {
+
+ var f = fiter.get_value();
+
+
+ GLib.debug ("Project.getByName: %s ?= %s" ,f.name , name);
+ if (f.name == name) {
+ return f;
+ }
+ };
+ return null;
+ }
+ public JsRender.JsRender? getByPath(string path)
+ {
+
+ var fiter = files.map_iterator();
+ while(fiter.next()) {
+
+ var f = fiter.get_value();
+
+
+ //GLib.debug ("Project.getByName: %s ?= %s" ,f.name , name);
+ if (f.path == path) {
+ return f;
+ }
+ };
+ return null;
+ }
+
+ public JsRender.JsRender? getById(string id)
+ {
+
+ var fiter = files.map_iterator();
+ while(fiter.next()) {
+
+ var f = fiter.get_value();
+
+
+ //console.log(f.id + '?=' + id);
+ if (f.id == id) {
+ return f;
+ }
+ };
+ return null;
+ }
+
+ public JsRender.JsRender newFile (string name)
+ {
+ var ret = JsRender.JsRender.factory(this.xtype,
+ this,
+ this.firstPath() + "/" + name + ".bjs");
+ this.addFile(ret);
+ return ret;
+ }
+
+ public JsRender.JsRender loadFileOnly (string path)
+ {
+ var xt = this.xtype;
+ return JsRender.JsRender.factory(xt, this, path);
+
+ }
+
+ public JsRender.JsRender create(string filename)
+ {
+ var ret = this.loadFileOnly(filename);
+ ret.save();
+ this.addFile(ret);
+ return ret;
+
+ }
+
+
+ public void addFile(JsRender.JsRender pfile) { // add a single file, and trigger changed.
+
+
+ this.files.set(pfile.path, pfile); // duplicate check?
+ this.on_changed();
+ }
+
+ public void add(string path, string type)
+ {
+ this.paths.set(path,type);
+ //Seed.print(" type is '" + type + "'");
+ if (type == "dir") {
+ this.scanDir(path);
+ // console.dump(this.files);
+ }
+ if (type == "file" ) {
+
+ this.files.set(path,this.loadFileOnly( path ));
+ }
+ this.on_changed();
+
+ }
+ public void scanDirs() // cached version
+ {
+ if (this.is_scanned) {
+ return;
+ }
+ this.scanDirsForce();
+ //console.dump(this.files);
+
+ }
+
+ public void scanDirsForce()
+ {
+ this.is_scanned = true;
+ var iter = this.paths.map_iterator();
+ while (iter.next()) {
+ //print("path: " + iter.get_key() + " : " + iter.get_value() +"\n");
+ if (iter.get_value() != "dir") {
+ continue;
+ }
+ this.scanDir(iter.get_key());
+ }
+ //console.dump(this.files);
+
+ }
+ // list files.
+ public void scanDir(string dir, int dp =0 )
+ {
+ //dp = dp || 0;
+ //print("Project.Base: Running scandir on " + dir +"\n");
+ if (dp > 5) { // no more than 5 deep?
+ return;
+ }
+ // this should be done async -- but since we are getting the proto up ...
+
+ var subs = new GLib.List<string>();;
+ var f = File.new_for_path(dir);
+ try {
+ var file_enum = f.enumerate_children(GLib.FileAttribute.STANDARD_DISPLAY_NAME, GLib.FileQueryInfoFlags.NONE, null);
+
+
+ FileInfo next_file;
+ while ((next_file = file_enum.next_file(null)) != null) {
+ var fn = next_file.get_display_name();
+
+
+ //print("trying" + dir + "/" + fn +"\n");
+
+ if (fn[0] == '.') { // skip hidden
+ continue;
+ }
+
+ if (FileUtils.test(dir + "/" + fn, GLib.FileTest.IS_DIR)) {
+ subs.append(dir + "/" + fn);
+ continue;
+ }
+
+ if (!Regex.match_simple("\\.bjs$", fn)) {
+ //print("no a bjs\n");
+ continue;
+ }
+ /*
+ var parent = "";
+ //if (dp > 0 ) {
+
+ var sp = dir.split("/");
+ var parent = "";
+ for (var i = 0; i < sp.length; i++) {
+
+ }
+
+ /*
+ sp = sp.splice(sp.length - (dp +1), (dp +1));
+ parent = sp.join('.');
+
+
+ if (typeof(_this.files[dir + '/' + fn]) != 'undefined') {
+ // we already have it..
+ _this.files[dir + '/' + fn].parent = parent;
+ return;
+ }
+ */
+ var xt = this.xtype;
+ var el = JsRender.JsRender.factory(xt,this, dir + "/" + fn);
+ this.files.set( dir + "/" + fn, el);
+ // parent ??
+
+
+ }
+ } catch (Error e) {
+ GLib.warning("Project::scanDirs failed : " + e.message + "\n");
+ } catch (GLib.Error e) {
+ GLib.warning("Project::scanDirs failed : " + e.message + "\n");
+ }
+ for (var i = 0; i < subs.length(); i++) {
+
+ this.scanDir(subs.nth_data(i), dp+1);
+ }
+
+ }
+ // wrapper around the javascript data...
+ public string get_string_member(string key) {
+
+ if (!this.json_project_data.has_member(key)) {
+ return "";
+ }
+ var ret = this.json_project_data.get_string_member(key);
+ if (ret == null) {
+ return "";
+ }
+ return ret;
+
+ }
+
+ }
+}
+
--- /dev/null
+
+
+static int rid = 1;
+
+public class Project.Roo : Project {
+
+
+
+ public Roo(string path) {
+
+
+ base(path);
+ this.xtype = "Roo";
+ // various loader methods..
+ this.id = "project-roo-%d".printf(rid++);
+
+ }
+}
+
+
\ No newline at end of file
--- /dev/null
+/**
+ * Resources
+ *
+ * Idea is to manage resourse used by the app.
+ *
+ * The original code downloaded all the resources before it renders the main window
+ *
+ * This is a bit annoying as although they do change quite a bit, it's not on every app start
+ *
+ * So the Resource fetching behaviour should be a button on the File view page
+ * That starts the refresh of the resources.
+ *
+ * I'm not quite sure how we should flow this - if we do them all at once.. might be a bit of a server
+ * overload... so sequentially may be best...
+*/
+
+public class ResourcesItem : Object {
+ public string target;
+ public string src;
+ public string new_sha;
+ public string cur_sha;
+ public ResourcesItem(string src, string target, string new_sha)
+ {
+ this.target = target;
+ this.src = src;
+ this.new_sha = new_sha;
+ this.cur_sha = "";
+ this.update_cur_sha();
+ print("New ResourcesItem %s (%s) => (%s) %s\n", target , this.cur_sha , new_sha, src);
+ }
+ public void update_cur_sha()
+ {
+ if (this.target.contains("*")) {
+ return;
+ }
+ var tfn = BuilderApplication.configDirectory() + "/resources/" + this.target;
+ if (!GLib.FileUtils.test (tfn, FileTest.IS_REGULAR)) {
+ return;
+ }
+ uint8[] data;
+ uint8[] zero = { 0 };
+ GLib.FileUtils.get_data(tfn, out data);
+
+ var file = File.new_for_path (tfn);
+
+ var info = file.query_info(
+ "standard::*",
+ FileQueryInfoFlags.NONE
+ );
+ var csdata = new GLib.ByteArray.take("blob %s".printf(info.get_size().to_string()).data);
+ csdata.append(zero);
+ csdata.append(data);
+
+ // git method... blob %d\0...string...
+ this.cur_sha = GLib.Checksum.compute_for_data(GLib.ChecksumType.SHA1, csdata.data );
+ }
+
+}
+
+
+public class Resources : Object
+{
+
+ public signal void updateProgress(uint cur_pos, uint total);
+
+ static Resources singleton_val;
+
+
+ Gee.ArrayList<ResourcesItem> fetch_files;
+
+ public static Resources singleton()
+ {
+ if (singleton_val == null) {
+ singleton_val = new Resources();
+ singleton_val.ref();
+ }
+ return singleton_val;
+
+ }
+ public Resources ()
+ {
+ this.initFiles();
+ }
+
+
+ public void initFiles()
+ {
+ string[] avail_files = {
+ "roodata.json",
+ "*",
+ "Editors/*.js",
+ "vapi/*"
+
+ };
+ this.fetch_files = new Gee.ArrayList<ResourcesItem>();
+ for (var i=0;i < avail_files.length; i++) {
+ var target = avail_files[i];
+ var src = "https://raw.githubusercontent.com/roojs/app.Builder.js/master/resources/" + target;
+
+ if (target == "roodata.json") {
+ src = "https://raw.githubusercontent.com/roojs/roojs1/master/docs/json/roodata.json";
+ //src = "http://git.roojs.org/?p=roojs1;a=blob_plain;f=docs/json/roodata.json";
+ }
+ if (target.contains("*")) {
+ var split = target.split("*");
+
+ src = "https://api.github.com/repos/roojs/app.Builder.js/contents/resources/" + split[0];
+ if (split[0] == "vapi/") {
+ src = "https://api.github.com/repos/roojs/app.Builder.js/contents/src/vapi";
+
+ }
+
+ }
+
+ this.fetch_files.add(new ResourcesItem(src,target, ""));
+ }
+
+ }
+
+
+ int fetch_pos = 0;
+ public void fetchStart()
+ {
+ this.initFiles();
+ if (this.fetch_pos > 0) { // only fetch one at a time...
+ return;
+ }
+ this.fetch_pos =0;
+ this.fetchNext();
+
+ }
+ public void fetchNext()
+ {
+ var cur = this.fetch_pos;
+ this.fetch_pos++;
+ this.updateProgress(this.fetch_pos, this.fetch_files.size); // min=0;
+
+
+ if (this.fetch_pos > this.fetch_files.size) {
+ this.updateProgress(0,0);
+ this.fetch_pos = 0;
+ return;
+
+ }
+
+ this.fetchResourceFrom ( this.fetch_files.get(cur) );
+
+
+ }
+ /**
+ * called on start to check we have all the required files..
+ */
+ public void checkResources()
+ {
+ bool needsload = false;
+
+ // this has to check the required files, not the list...
+ string[] required = {
+ "bootstrap.builder.html",
+ "Gir.overides",
+ "GtkUsage.txt",
+ "mailer.builder.html",
+ "roo.builder.html",
+ "roo.builder.js",
+ "roodata.json",
+ "RooUsage.txt"
+ };
+
+ for (var i = 0; i < required.length; i++ ) {
+
+ if (!FileUtils.test(
+ BuilderApplication.configDirectory() + "/resources/" + required[i],
+ FileTest.EXISTS
+ )) {
+ needsload = true;
+ }
+ }
+ if (!needsload) {
+ return;
+ }
+ this.fetchStart();
+ }
+
+ public void parseDirectory(string json, string target)
+ {
+ print("%s\n", json);
+ var pa = new Json.Parser();
+ pa.load_from_data(json);
+ var node = pa.get_root();
+ if (node.get_node_type () != Json.NodeType.ARRAY) {
+ return;
+ //throw new Error.INVALID_FORMAT ("Unexpected element type %s", node.type_name ());
+ }
+
+ var split = target.split("*");
+ var ar = node.get_array ();
+ for(var i = 0; i < ar.get_length(); i++) {
+ var ob = ar.get_object_element(i);
+ var n = ob.get_string_member("name");
+ if (ob.get_string_member("type") == "dir") {
+ continue;
+ }
+ if (split.length > 1 && !n.has_suffix(split[1])) {
+ // not needed..
+ continue;
+ }
+ if (this.files_has_target(split[0] + n)) {
+ continue;
+ }
+
+
+
+ var src = ob.get_string_member("download_url");
+ // "https://raw.githubusercontent.com/roojs/app.Builder.js/master/resources/" + split[0] + n;
+ var add = new ResourcesItem(src, split[0] + n, ob.get_string_member("sha") );
+ //add.new_sha = ob.get_string_member("sha");
+ this.fetch_files.add(add);
+
+ }
+ }
+ public bool files_has_target(string target)
+ {
+ for (var i = 0; i < this.fetch_files.size; i++ ) {
+ if (this.fetch_files.get(i).target == target) {
+ return true;
+ }
+ }
+ return false;
+
+ }
+
+
+
+
+ public void fetchResourceFrom(ResourcesItem item)
+ {
+ if (item.new_sha != "" && item.new_sha == item.cur_sha) {
+ this.fetchNext();
+ return;
+ }
+
+ // fetch...
+ print("downloading %s \nto : %s\n", item.src,item.target);
+ var session = new Soup.Session ();
+ session.user_agent = "App Builder ";
+ var message = new Soup.Message ("GET", item.src );
+ session.queue_message (message, (sess, mess) => {
+
+ if (item.target.contains("*")) {
+ // then it's a directory listing in JSON, and we need to add any new items to our list..
+ // it's used to fetch Editors (and maybe other stuff..)
+ this.parseDirectory((string) message.response_body.data,item.target );
+ this.fetchNext();
+ return;
+ }
+
+
+ var tfn = BuilderApplication.configDirectory() + "/resources/" + item.target;
+
+
+ // create parent directory if needed
+ if (!GLib.FileUtils.test (GLib.Path.get_dirname(tfn), FileTest.IS_DIR)) {
+ var f = GLib.File.new_for_path(GLib.Path.get_dirname(tfn));
+ f.make_directory_with_parents ();
+ }
+
+
+
+
+ // set data??? - if it's binary?
+ FileUtils.set_contents( tfn, (string) message.response_body.data );
+
+ switch (item.target) {
+ case "Gir.overides":
+ Palete.Gir.factory("Gtk").loadOverrides(true);
+ break;
+
+ case "GtkUsage.txt":
+ Palete.factory("Gtk").load();
+ break;
+
+ case "roodata.json":
+ Palete.factory("Roo").classes = null;
+ Palete.factory("Roo").load();
+ break;
+
+ default:
+ break;
+ }
+
+
+
+
+
+
+ this.fetchNext();
+
+ });
+
+
+ }
+}
--- /dev/null
+
+/// # valac --pkg gio-2.0 --pkg posix Spawn.vala -o /tmp/Spawn
+
+using GLib;
+
+
+/**
+ * Revised version?
+ *
+ * x = new Spawn( "/tmp", {"ls", "-l" })
+ *
+ * // these are optionall..
+ * x.env = ..... (if you need to set one...
+ * x.output_line.connect((string str) => {
+ * if ( Gtk.events_pending()) { Gtk.main_iteration(); }
+ * });
+ * x.input_line.connect(() => { return string });
+ *
+ * x.run((int res, string output, string stderr) => { ... });
+
+ *
+ *
+ */
+
+
+
+public errordomain SpawnError {
+ NO_ARGS,
+ WRITE_ERROR,
+ EXECUTE_ERROR
+
+}
+
+/**
+ * @class Spawn
+ * @param cwd {String} working directory. (defaults to home directory)
+ * @param args {Array} arguments eg. [ 'ls', '-l' ]
+ *
+
+ * @arg env {Array} enviroment eg. [ 'GITDIR=/home/test' ]
+ * @arg is_async {Boolean} (optional)return instantly, or wait for exit. (default no)
+ * @arg trhow_exceptions {Boolean} throw exception on failure (default no)
+
+ *
+ */
+
+public class Spawn : Object
+{
+ /**
+ * @signal input called at start to send input when process starts?
+ * @return the string or null
+ */
+ public signal string? input();
+ /**
+ * @signal complete called at when the command has completed.
+ *
+ */
+ public signal void complete(int res, string str, string stderr);
+ /**
+ * @signal output_line called when a line is recieved from the process.
+ * Note you may want to connect this and run
+ * if ( Gtk.events_pending()) { Gtk.main_iteration(); }
+ *
+ * @param {string} str
+ */
+ public signal void output_line(string str);
+
+ public string cwd;
+ public string[] args;
+ public string[] env;
+
+ public bool is_async = true;
+ public bool throw_exceptions = false;
+ public bool detach = false;
+
+ public Spawn(string cwd, string[] args) throws Error
+ {
+
+
+ this.cwd = cwd;
+ this.args = args;
+ this.env = {};
+
+ this.output = "";
+ this.stderr = "";
+
+ this.cwd = this.cwd.length < 1 ? GLib.Environment.get_home_dir() : this.cwd;
+ if (this.args.length < 0) {
+ throw new SpawnError.NO_ARGS("No arguments");
+ }
+
+
+ }
+
+
+ MainLoop ctx = null; // the mainloop ctx.
+
+ /**
+ * @property output {String} resulting output
+ */
+ public string output;
+ /**
+ * @property stderr {String} resulting output from stderr
+ */
+ public string stderr;
+ /**
+ * @property result {Number} execution result.
+ */
+ public int result= 0;
+ /**
+ * @property pid {Number} pid of child process (of false if it's not running)
+ */
+ int pid = -1;
+ /**
+ * @property in_ch {GLib.IOChannel} input io channel
+ */
+ IOChannel in_ch = null;
+ /**
+ * @property out_ch {GLib.IOChannel} output io channel
+ */
+ IOChannel out_ch = null;
+ /**
+ * @property err_ch {GLib.IOChannel} stderr io channel
+ */
+ IOChannel err_ch = null;
+ /**
+ * @property err_src {int} the watch for errors
+ */
+
+ int err_src = -1;
+ /**
+ * @property err_src {int} the watch for output
+ */
+ int out_src = -1;
+
+ /**
+ *
+ * @method run
+ * Run the configured command.
+ * result is applied to object properties (eg. '?' or 'stderr')
+ * @returns {Object} self.
+ */
+ public void run( ) throws SpawnError, GLib.SpawnError, GLib.IOChannelError
+ {
+
+
+ err_src = -1;
+ out_src = -1;
+ int standard_input;
+ int standard_output;
+ int standard_error;
+
+
+
+ GLib.debug("cd %s; %s" , this.cwd , string.joinv(" ", this.args));
+
+ if (this.detach) {
+ Process.spawn_async_with_pipes (
+ this.cwd,
+ this.args,
+ this.env.length > 0 ? this.env : null,
+ SpawnFlags.SEARCH_PATH | SpawnFlags.DO_NOT_REAP_CHILD,
+ null,
+ out this.pid);
+ ChildWatch.add (this.pid, (pid, status) => {
+ // Triggered when the child indicated by child_pid exits
+ Process.close_pid (pid);
+
+ });
+
+ return;
+
+ }
+ Process.spawn_async_with_pipes (
+ this.cwd,
+ this.args,
+ this.env.length > 0 ? this.env : null,
+ SpawnFlags.SEARCH_PATH | SpawnFlags.DO_NOT_REAP_CHILD,
+ null,
+ out this.pid,
+ out standard_input,
+ out standard_output,
+ out standard_error);
+
+ // stdout:
+
+
+ //print(JSON.stringify(gret));
+
+ GLib.debug("PID: %d" ,this.pid);
+
+
+ this.in_ch = new GLib.IOChannel.unix_new(standard_input);
+ this.out_ch = new GLib.IOChannel.unix_new(standard_output);
+ this.err_ch = new GLib.IOChannel.unix_new(standard_error);
+
+ // make everything non-blocking!
+
+
+
+ // using NONBLOCKING only works if io_add_watch
+ //returns true/false in right conditions
+ this.in_ch.set_flags (GLib.IOFlags.NONBLOCK);
+ this.out_ch.set_flags (GLib.IOFlags.NONBLOCK);
+ this.err_ch.set_flags (GLib.IOFlags.NONBLOCK);
+
+
+
+
+ ChildWatch.add (this.pid, (w_pid, result) => {
+
+ this.result = result;
+ GLib.debug("child_watch_add : result:%d ", result);
+
+
+ this.read(this.out_ch);
+ this.read(this.err_ch);
+
+
+ Process.close_pid(this.pid);
+ this.pid = -1;
+ if (this.ctx != null) {
+ this.ctx.quit();
+ this.ctx = null;
+ }
+ this.tidyup();
+ //print("DONE TIDYUP");
+
+ this.complete(this.result, this.output, this.stderr);
+
+ });
+
+
+
+
+
+
+ // add handlers for output and stderr.
+
+ this.out_src = (int) this.out_ch.add_watch (
+ IOCondition.OUT | IOCondition.IN | IOCondition.PRI | IOCondition.HUP | IOCondition.ERR ,
+ (channel, condition) => {
+ return this.read(this.out_ch);
+ }
+ );
+ this.err_src = (int) this.err_ch.add_watch (
+ IOCondition.OUT | IOCondition.IN | IOCondition.PRI | IOCondition.HUP | IOCondition.ERR ,
+ (channel, condition) => {
+ return this.read(this.err_ch);
+ }
+ );
+
+
+ // call input..
+ if (this.pid > -1) {
+ // child can exit before we get this far..
+ var input = this.input();
+ if (input != null) {
+
+ try {
+ this.write(input);
+ // this probably needs to be a bit smarter...
+ //but... let's close input now..
+ this.in_ch.shutdown(true);
+ this.in_ch = null;
+
+
+ } catch (Error e) {
+ this.tidyup();
+ return;
+ // throw e;
+
+ }
+
+ }
+
+ }
+ // async - if running - return..
+ if (this.is_async && this.pid > -1) {
+ return;
+ }
+
+ // start mainloop if not async..
+
+ if (this.pid > -1) {
+ GLib.debug("starting main loop");
+ //if (this.cfg.debug) {
+ //
+ // }
+ this.ctx = new MainLoop ();
+ this.ctx.run(); // wait fore exit?
+
+ GLib.debug("main_loop done!");
+ } else {
+ this.tidyup(); // tidyup get's called in main loop.
+ }
+
+ if (this.throw_exceptions && this.result != 0) {
+
+ throw new SpawnError.EXECUTE_ERROR(this.stderr);
+ //this.toString = function() { return this.stderr; };
+ ///throw new Exception this; // we throw self...
+ }
+
+ // finally throw, or return self..
+
+ return;
+
+ }
+
+
+
+ private void tidyup()
+ {
+ if (this.pid > -1) {
+ Process.close_pid(this.pid); // hopefully kills it..
+ this.pid = -1;
+ }
+ try {
+ if (this.in_ch != null) this.in_ch.shutdown(true);
+ if (this.out_ch != null) this.out_ch.shutdown(true);
+ if (this.err_ch != null) this.err_ch.shutdown(true);
+ } catch (Error e) {
+ // error shutting donw.
+ }
+ // blank out channels
+ this.in_ch = null;
+ this.err_ch = null;
+ this.out_ch = null;
+ // rmeove listeners !! important otherwise we kill the CPU
+ //if (this.err_src > -1 ) GLib.source_remove(this.err_src);
+ //if (this.out_src > -1 ) GLib.source_remove(this.out_src);
+ this.err_src = -1;
+ this.out_src = -1;
+
+ }
+
+
+ /**
+ * write to stdin of process
+ * @arg str {String} string to write to stdin of process
+ * @returns GLib.IOStatus (0 == error, 1= NORMAL)
+ */
+ private int write(string str) throws Error // write a line to
+ {
+ if (this.in_ch == null) {
+ return 0; // input is closed
+ }
+ //print("write: " + str);
+ // NEEDS GIR FIX! for return value.. let's ignore for the time being..
+ //var ret = {};
+ size_t written;
+ var res = this.in_ch.write_chars(str.to_utf8(), out written);
+
+ //print("write_char retunred:" + JSON.stringify(res) + ' ' +JSON.stringify(ret) );
+
+ if (res != GLib.IOStatus.NORMAL) {
+ throw new SpawnError.WRITE_ERROR("Write failed");
+ }
+ //return ret.value;
+ return str.length;
+
+ }
+
+
+
+ /**
+ * read from pipe and call appropriate listerner and add to output or stderr string.
+ * @arg giochannel to read from.
+ * @returns none
+ */
+ private bool read(IOChannel ch)
+ {
+ // string prop = (ch == this.out_ch) ? "output" : "stderr";
+ // print("prop: " + prop);
+
+
+ //print(JSON.stringify(ch, null,4));
+ while (true) {
+ string buffer;
+ size_t term_pos;
+ size_t len;
+ IOStatus status;
+ try {
+ status = ch.read_line( out buffer, out len, out term_pos );
+ } catch (Error e) {
+ //FIXme
+ break; // ??
+
+ }
+
+ // print('status: ' +JSON.stringify(status));
+ // print(JSON.stringify(x));
+ switch(status) {
+ case GLib.IOStatus.NORMAL:
+
+ //write(fn, x.str);
+
+ //if (this.listeners[prop]) {
+ // this.listeners[prop].call(this, x.str_return);
+ //}
+ if (ch == this.out_ch) {
+ this.output += buffer;
+ this.output_line( buffer);
+
+ } else {
+ this.stderr += buffer;
+ this.output_line( buffer);
+ }
+ //_this[prop] += x.str_return;
+ //if (this.cfg.debug) {
+ //GLib.debug("%s : %s", prop , buffer);
+ //}
+ if (this.is_async) {
+
+ //if ( Gtk.events_pending()) {
+ // Gtk.main_iteration();
+ //}
+
+ }
+
+ //this.ctx.iteration(true);
+ continue;
+ case GLib.IOStatus.AGAIN:
+ //print("Should be called again.. waiting for more data..");
+ return true;
+ //break;
+ case GLib.IOStatus.ERROR:
+ case GLib.IOStatus.EOF:
+ return false;
+ //break;
+
+ }
+ break;
+ }
+
+ //print("RETURNING");
+ return false; // allow it to be called again..
+ }
+
+}
+/*
+
+int main (string[] args) {
+ GLib.Log.set_handler(null,
+ GLib.LogLevelFlags.LEVEL_DEBUG | GLib.LogLevelFlags.LEVEL_WARNING,
+ (dom, lvl, msg) => {
+ print("%s: %s\n", dom, msg);
+ });
+
+ var ctx = new GLib.MainLoop ();
+ var a = new Spawn("", { "ls" , "-l"});
+ a.run((res, str, stderr) => {
+ print(str);
+ ctx.quit();
+ });
+
+
+ ctx.run(); // wait for exit?
+
+ return 0;
+}
+ */
--- /dev/null
+#include <JavaScriptCore/JavaScript.h>
+#include <glib.h>
+#include <glib-object.h>
+/**
+ a wrapper around call as function, as Value[] arrays do not work in Vala...
+
+*/
+
+
+JSValueRef jscore_object_call_as_function(
+ JSContextRef ctx,
+ JSObjectRef object,
+ JSObjectRef thisObject,
+ gchar * val,
+ JSValueRef* exception
+
+) {
+ JSValueRef ex = 0;
+ JSValueRef res;
+ JSValueRef *jsargs;
+
+
+ JSStringRef jsstr = JSStringCreateWithUTF8CString (val);
+ JSValueRef valstr = JSValueMakeString (ctx, jsstr);
+ //JSStringRelease (jsstr); //??
+
+ jsargs = (JSValueRef *) g_newa (JSValueRef, 1);
+ jsargs[0] = valstr;
+
+ res = JSObjectCallAsFunction(
+ ctx,
+ object,
+ 0,
+ 1,
+ jsargs,
+ &ex
+ );
+ // free the args..
+
+ return res;
+
+
+}
+
--- /dev/null
+atk
+cairo
+pango
+cogl-1.0
+json-glib-1.0
--- /dev/null
+/* clutter-1.0.vapi generated by vapigen, do not modify. */
+
+[CCode (cprefix = "Clutter", gir_namespace = "Clutter", gir_version = "1.0", lower_case_cprefix = "clutter_")]
+namespace Clutter {
+ namespace FrameSource {
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ [Deprecated (since = "1.6")]
+ public static uint add (uint fps, GLib.SourceFunc func);
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ [Deprecated (since = "1.6")]
+ public static uint add_full (int priority, uint fps, owned GLib.SourceFunc func);
+ }
+ namespace Key {
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_0")]
+ public const int @0;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_1")]
+ public const int @1;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_2")]
+ public const int @2;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_3")]
+ public const int @3;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_3270_AltCursor")]
+ public const int @3270_AltCursor;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_3270_Attn")]
+ public const int @3270_Attn;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_3270_BackTab")]
+ public const int @3270_BackTab;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_3270_ChangeScreen")]
+ public const int @3270_ChangeScreen;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_3270_Copy")]
+ public const int @3270_Copy;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_3270_CursorBlink")]
+ public const int @3270_CursorBlink;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_3270_CursorSelect")]
+ public const int @3270_CursorSelect;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_3270_DeleteWord")]
+ public const int @3270_DeleteWord;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_3270_Duplicate")]
+ public const int @3270_Duplicate;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_3270_Enter")]
+ public const int @3270_Enter;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_3270_EraseEOF")]
+ public const int @3270_EraseEOF;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_3270_EraseInput")]
+ public const int @3270_EraseInput;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_3270_ExSelect")]
+ public const int @3270_ExSelect;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_3270_FieldMark")]
+ public const int @3270_FieldMark;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_3270_Ident")]
+ public const int @3270_Ident;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_3270_Jump")]
+ public const int @3270_Jump;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_3270_KeyClick")]
+ public const int @3270_KeyClick;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_3270_Left2")]
+ public const int @3270_Left2;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_3270_PA1")]
+ public const int @3270_PA1;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_3270_PA2")]
+ public const int @3270_PA2;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_3270_PA3")]
+ public const int @3270_PA3;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_3270_Play")]
+ public const int @3270_Play;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_3270_PrintScreen")]
+ public const int @3270_PrintScreen;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_3270_Quit")]
+ public const int @3270_Quit;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_3270_Record")]
+ public const int @3270_Record;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_3270_Reset")]
+ public const int @3270_Reset;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_3270_Right2")]
+ public const int @3270_Right2;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_3270_Rule")]
+ public const int @3270_Rule;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_3270_Setup")]
+ public const int @3270_Setup;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_3270_Test")]
+ public const int @3270_Test;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_4")]
+ public const int @4;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_5")]
+ public const int @5;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_6")]
+ public const int @6;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_7")]
+ public const int @7;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_8")]
+ public const int @8;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_9")]
+ public const int @9;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_A")]
+ public const int A;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_AE")]
+ public const int AE;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Aacute")]
+ public const int Aacute;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Abelowdot")]
+ public const int Abelowdot;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Abreve")]
+ public const int Abreve;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Abreveacute")]
+ public const int Abreveacute;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Abrevebelowdot")]
+ public const int Abrevebelowdot;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Abrevegrave")]
+ public const int Abrevegrave;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Abrevehook")]
+ public const int Abrevehook;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Abrevetilde")]
+ public const int Abrevetilde;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_AccessX_Enable")]
+ public const int AccessX_Enable;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_AccessX_Feedback_Enable")]
+ public const int AccessX_Feedback_Enable;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Acircumflex")]
+ public const int Acircumflex;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Acircumflexacute")]
+ public const int Acircumflexacute;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Acircumflexbelowdot")]
+ public const int Acircumflexbelowdot;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Acircumflexgrave")]
+ public const int Acircumflexgrave;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Acircumflexhook")]
+ public const int Acircumflexhook;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Acircumflextilde")]
+ public const int Acircumflextilde;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_AddFavorite")]
+ public const int AddFavorite;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Adiaeresis")]
+ public const int Adiaeresis;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Agrave")]
+ public const int Agrave;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Ahook")]
+ public const int Ahook;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Alt_L")]
+ public const int Alt_L;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Alt_R")]
+ public const int Alt_R;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Amacron")]
+ public const int Amacron;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Aogonek")]
+ public const int Aogonek;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ApplicationLeft")]
+ public const int ApplicationLeft;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ApplicationRight")]
+ public const int ApplicationRight;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_0")]
+ public const int Arabic_0;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_1")]
+ public const int Arabic_1;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_2")]
+ public const int Arabic_2;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_3")]
+ public const int Arabic_3;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_4")]
+ public const int Arabic_4;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_5")]
+ public const int Arabic_5;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_6")]
+ public const int Arabic_6;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_7")]
+ public const int Arabic_7;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_8")]
+ public const int Arabic_8;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_9")]
+ public const int Arabic_9;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_ain")]
+ public const int Arabic_ain;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_alef")]
+ public const int Arabic_alef;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_alefmaksura")]
+ public const int Arabic_alefmaksura;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_beh")]
+ public const int Arabic_beh;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_comma")]
+ public const int Arabic_comma;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_dad")]
+ public const int Arabic_dad;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_dal")]
+ public const int Arabic_dal;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_damma")]
+ public const int Arabic_damma;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_dammatan")]
+ public const int Arabic_dammatan;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_ddal")]
+ public const int Arabic_ddal;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_farsi_yeh")]
+ public const int Arabic_farsi_yeh;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_fatha")]
+ public const int Arabic_fatha;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_fathatan")]
+ public const int Arabic_fathatan;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_feh")]
+ public const int Arabic_feh;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_fullstop")]
+ public const int Arabic_fullstop;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_gaf")]
+ public const int Arabic_gaf;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_ghain")]
+ public const int Arabic_ghain;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_ha")]
+ public const int Arabic_ha;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_hah")]
+ public const int Arabic_hah;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_hamza")]
+ public const int Arabic_hamza;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_hamza_above")]
+ public const int Arabic_hamza_above;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_hamza_below")]
+ public const int Arabic_hamza_below;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_hamzaonalef")]
+ public const int Arabic_hamzaonalef;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_hamzaonwaw")]
+ public const int Arabic_hamzaonwaw;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_hamzaonyeh")]
+ public const int Arabic_hamzaonyeh;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_hamzaunderalef")]
+ public const int Arabic_hamzaunderalef;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_heh")]
+ public const int Arabic_heh;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_heh_doachashmee")]
+ public const int Arabic_heh_doachashmee;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_heh_goal")]
+ public const int Arabic_heh_goal;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_jeem")]
+ public const int Arabic_jeem;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_jeh")]
+ public const int Arabic_jeh;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_kaf")]
+ public const int Arabic_kaf;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_kasra")]
+ public const int Arabic_kasra;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_kasratan")]
+ public const int Arabic_kasratan;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_keheh")]
+ public const int Arabic_keheh;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_khah")]
+ public const int Arabic_khah;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_lam")]
+ public const int Arabic_lam;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_madda_above")]
+ public const int Arabic_madda_above;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_maddaonalef")]
+ public const int Arabic_maddaonalef;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_meem")]
+ public const int Arabic_meem;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_noon")]
+ public const int Arabic_noon;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_noon_ghunna")]
+ public const int Arabic_noon_ghunna;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_peh")]
+ public const int Arabic_peh;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_percent")]
+ public const int Arabic_percent;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_qaf")]
+ public const int Arabic_qaf;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_question_mark")]
+ public const int Arabic_question_mark;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_ra")]
+ public const int Arabic_ra;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_rreh")]
+ public const int Arabic_rreh;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_sad")]
+ public const int Arabic_sad;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_seen")]
+ public const int Arabic_seen;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_semicolon")]
+ public const int Arabic_semicolon;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_shadda")]
+ public const int Arabic_shadda;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_sheen")]
+ public const int Arabic_sheen;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_sukun")]
+ public const int Arabic_sukun;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_superscript_alef")]
+ public const int Arabic_superscript_alef;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_switch")]
+ public const int Arabic_switch;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_tah")]
+ public const int Arabic_tah;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_tatweel")]
+ public const int Arabic_tatweel;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_tcheh")]
+ public const int Arabic_tcheh;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_teh")]
+ public const int Arabic_teh;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_tehmarbuta")]
+ public const int Arabic_tehmarbuta;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_thal")]
+ public const int Arabic_thal;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_theh")]
+ public const int Arabic_theh;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_tteh")]
+ public const int Arabic_tteh;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_veh")]
+ public const int Arabic_veh;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_waw")]
+ public const int Arabic_waw;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_yeh")]
+ public const int Arabic_yeh;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_yeh_baree")]
+ public const int Arabic_yeh_baree;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_zah")]
+ public const int Arabic_zah;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Arabic_zain")]
+ public const int Arabic_zain;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Aring")]
+ public const int Aring;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_AT")]
+ public const int Armenian_AT;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_AYB")]
+ public const int Armenian_AYB;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_BEN")]
+ public const int Armenian_BEN;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_CHA")]
+ public const int Armenian_CHA;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_DA")]
+ public const int Armenian_DA;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_DZA")]
+ public const int Armenian_DZA;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_E")]
+ public const int Armenian_E;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_FE")]
+ public const int Armenian_FE;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_GHAT")]
+ public const int Armenian_GHAT;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_GIM")]
+ public const int Armenian_GIM;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_HI")]
+ public const int Armenian_HI;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_HO")]
+ public const int Armenian_HO;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_INI")]
+ public const int Armenian_INI;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_JE")]
+ public const int Armenian_JE;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_KE")]
+ public const int Armenian_KE;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_KEN")]
+ public const int Armenian_KEN;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_KHE")]
+ public const int Armenian_KHE;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_LYUN")]
+ public const int Armenian_LYUN;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_MEN")]
+ public const int Armenian_MEN;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_NU")]
+ public const int Armenian_NU;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_O")]
+ public const int Armenian_O;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_PE")]
+ public const int Armenian_PE;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_PYUR")]
+ public const int Armenian_PYUR;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_RA")]
+ public const int Armenian_RA;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_RE")]
+ public const int Armenian_RE;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_SE")]
+ public const int Armenian_SE;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_SHA")]
+ public const int Armenian_SHA;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_TCHE")]
+ public const int Armenian_TCHE;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_TO")]
+ public const int Armenian_TO;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_TSA")]
+ public const int Armenian_TSA;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_TSO")]
+ public const int Armenian_TSO;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_TYUN")]
+ public const int Armenian_TYUN;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_VEV")]
+ public const int Armenian_VEV;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_VO")]
+ public const int Armenian_VO;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_VYUN")]
+ public const int Armenian_VYUN;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_YECH")]
+ public const int Armenian_YECH;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_ZA")]
+ public const int Armenian_ZA;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_ZHE")]
+ public const int Armenian_ZHE;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_accent")]
+ public const int Armenian_accent;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_amanak")]
+ public const int Armenian_amanak;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_apostrophe")]
+ public const int Armenian_apostrophe;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_at")]
+ public const int Armenian_at;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_ayb")]
+ public const int Armenian_ayb;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_ben")]
+ public const int Armenian_ben;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_but")]
+ public const int Armenian_but;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_cha")]
+ public const int Armenian_cha;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_da")]
+ public const int Armenian_da;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_dza")]
+ public const int Armenian_dza;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_e")]
+ public const int Armenian_e;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_exclam")]
+ public const int Armenian_exclam;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_fe")]
+ public const int Armenian_fe;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_full_stop")]
+ public const int Armenian_full_stop;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_ghat")]
+ public const int Armenian_ghat;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_gim")]
+ public const int Armenian_gim;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_hi")]
+ public const int Armenian_hi;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_ho")]
+ public const int Armenian_ho;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_hyphen")]
+ public const int Armenian_hyphen;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_ini")]
+ public const int Armenian_ini;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_je")]
+ public const int Armenian_je;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_ke")]
+ public const int Armenian_ke;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_ken")]
+ public const int Armenian_ken;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_khe")]
+ public const int Armenian_khe;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_ligature_ew")]
+ public const int Armenian_ligature_ew;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_lyun")]
+ public const int Armenian_lyun;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_men")]
+ public const int Armenian_men;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_nu")]
+ public const int Armenian_nu;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_o")]
+ public const int Armenian_o;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_paruyk")]
+ public const int Armenian_paruyk;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_pe")]
+ public const int Armenian_pe;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_pyur")]
+ public const int Armenian_pyur;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_question")]
+ public const int Armenian_question;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_ra")]
+ public const int Armenian_ra;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_re")]
+ public const int Armenian_re;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_se")]
+ public const int Armenian_se;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_separation_mark")]
+ public const int Armenian_separation_mark;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_sha")]
+ public const int Armenian_sha;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_shesht")]
+ public const int Armenian_shesht;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_tche")]
+ public const int Armenian_tche;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_to")]
+ public const int Armenian_to;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_tsa")]
+ public const int Armenian_tsa;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_tso")]
+ public const int Armenian_tso;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_tyun")]
+ public const int Armenian_tyun;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_verjaket")]
+ public const int Armenian_verjaket;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_vev")]
+ public const int Armenian_vev;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_vo")]
+ public const int Armenian_vo;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_vyun")]
+ public const int Armenian_vyun;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_yech")]
+ public const int Armenian_yech;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_yentamna")]
+ public const int Armenian_yentamna;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_za")]
+ public const int Armenian_za;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Armenian_zhe")]
+ public const int Armenian_zhe;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Atilde")]
+ public const int Atilde;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_AudibleBell_Enable")]
+ public const int AudibleBell_Enable;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_AudioCycleTrack")]
+ public const int AudioCycleTrack;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_AudioForward")]
+ public const int AudioForward;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_AudioLowerVolume")]
+ public const int AudioLowerVolume;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_AudioMedia")]
+ public const int AudioMedia;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_AudioMicMute")]
+ public const int AudioMicMute;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_AudioMute")]
+ public const int AudioMute;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_AudioNext")]
+ public const int AudioNext;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_AudioPause")]
+ public const int AudioPause;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_AudioPlay")]
+ public const int AudioPlay;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_AudioPrev")]
+ public const int AudioPrev;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_AudioRaiseVolume")]
+ public const int AudioRaiseVolume;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_AudioRandomPlay")]
+ public const int AudioRandomPlay;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_AudioRecord")]
+ public const int AudioRecord;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_AudioRepeat")]
+ public const int AudioRepeat;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_AudioRewind")]
+ public const int AudioRewind;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_AudioStop")]
+ public const int AudioStop;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Away")]
+ public const int Away;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_B")]
+ public const int B;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Babovedot")]
+ public const int Babovedot;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Back")]
+ public const int Back;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_BackForward")]
+ public const int BackForward;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_BackSpace")]
+ public const int BackSpace;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Battery")]
+ public const int Battery;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Begin")]
+ public const int Begin;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Blue")]
+ public const int Blue;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Bluetooth")]
+ public const int Bluetooth;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Book")]
+ public const int Book;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_BounceKeys_Enable")]
+ public const int BounceKeys_Enable;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Break")]
+ public const int Break;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_BrightnessAdjust")]
+ public const int BrightnessAdjust;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Byelorussian_SHORTU")]
+ public const int Byelorussian_SHORTU;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Byelorussian_shortu")]
+ public const int Byelorussian_shortu;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_C")]
+ public const int C;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_CD")]
+ public const int CD;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_CH")]
+ public const int CH;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_C_H")]
+ public const int C_H;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_C_h")]
+ public const int C_h;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cabovedot")]
+ public const int Cabovedot;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cacute")]
+ public const int Cacute;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Calculator")]
+ public const int Calculator;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Calendar")]
+ public const int Calendar;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cancel")]
+ public const int Cancel;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Caps_Lock")]
+ public const int Caps_Lock;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Ccaron")]
+ public const int Ccaron;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Ccedilla")]
+ public const int Ccedilla;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Ccircumflex")]
+ public const int Ccircumflex;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Ch")]
+ public const int Ch;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Clear")]
+ public const int Clear;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ClearGrab")]
+ public const int ClearGrab;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Close")]
+ public const int Close;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Codeinput")]
+ public const int Codeinput;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ColonSign")]
+ public const int ColonSign;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Community")]
+ public const int Community;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ContrastAdjust")]
+ public const int ContrastAdjust;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Control_L")]
+ public const int Control_L;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Control_R")]
+ public const int Control_R;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Copy")]
+ public const int Copy;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_CruzeiroSign")]
+ public const int CruzeiroSign;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cut")]
+ public const int Cut;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_CycleAngle")]
+ public const int CycleAngle;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_A")]
+ public const int Cyrillic_A;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_BE")]
+ public const int Cyrillic_BE;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_CHE")]
+ public const int Cyrillic_CHE;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_CHE_descender")]
+ public const int Cyrillic_CHE_descender;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_CHE_vertstroke")]
+ public const int Cyrillic_CHE_vertstroke;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_DE")]
+ public const int Cyrillic_DE;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_DZHE")]
+ public const int Cyrillic_DZHE;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_E")]
+ public const int Cyrillic_E;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_EF")]
+ public const int Cyrillic_EF;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_EL")]
+ public const int Cyrillic_EL;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_EM")]
+ public const int Cyrillic_EM;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_EN")]
+ public const int Cyrillic_EN;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_EN_descender")]
+ public const int Cyrillic_EN_descender;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_ER")]
+ public const int Cyrillic_ER;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_ES")]
+ public const int Cyrillic_ES;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_GHE")]
+ public const int Cyrillic_GHE;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_GHE_bar")]
+ public const int Cyrillic_GHE_bar;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_HA")]
+ public const int Cyrillic_HA;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_HARDSIGN")]
+ public const int Cyrillic_HARDSIGN;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_HA_descender")]
+ public const int Cyrillic_HA_descender;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_I")]
+ public const int Cyrillic_I;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_IE")]
+ public const int Cyrillic_IE;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_IO")]
+ public const int Cyrillic_IO;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_I_macron")]
+ public const int Cyrillic_I_macron;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_JE")]
+ public const int Cyrillic_JE;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_KA")]
+ public const int Cyrillic_KA;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_KA_descender")]
+ public const int Cyrillic_KA_descender;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_KA_vertstroke")]
+ public const int Cyrillic_KA_vertstroke;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_LJE")]
+ public const int Cyrillic_LJE;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_NJE")]
+ public const int Cyrillic_NJE;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_O")]
+ public const int Cyrillic_O;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_O_bar")]
+ public const int Cyrillic_O_bar;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_PE")]
+ public const int Cyrillic_PE;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_SCHWA")]
+ public const int Cyrillic_SCHWA;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_SHA")]
+ public const int Cyrillic_SHA;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_SHCHA")]
+ public const int Cyrillic_SHCHA;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_SHHA")]
+ public const int Cyrillic_SHHA;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_SHORTI")]
+ public const int Cyrillic_SHORTI;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_SOFTSIGN")]
+ public const int Cyrillic_SOFTSIGN;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_TE")]
+ public const int Cyrillic_TE;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_TSE")]
+ public const int Cyrillic_TSE;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_U")]
+ public const int Cyrillic_U;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_U_macron")]
+ public const int Cyrillic_U_macron;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_U_straight")]
+ public const int Cyrillic_U_straight;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_U_straight_bar")]
+ public const int Cyrillic_U_straight_bar;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_VE")]
+ public const int Cyrillic_VE;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_YA")]
+ public const int Cyrillic_YA;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_YERU")]
+ public const int Cyrillic_YERU;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_YU")]
+ public const int Cyrillic_YU;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_ZE")]
+ public const int Cyrillic_ZE;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_ZHE")]
+ public const int Cyrillic_ZHE;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_ZHE_descender")]
+ public const int Cyrillic_ZHE_descender;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_a")]
+ public const int Cyrillic_a;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_be")]
+ public const int Cyrillic_be;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_che")]
+ public const int Cyrillic_che;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_che_descender")]
+ public const int Cyrillic_che_descender;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_che_vertstroke")]
+ public const int Cyrillic_che_vertstroke;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_de")]
+ public const int Cyrillic_de;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_dzhe")]
+ public const int Cyrillic_dzhe;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_e")]
+ public const int Cyrillic_e;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_ef")]
+ public const int Cyrillic_ef;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_el")]
+ public const int Cyrillic_el;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_em")]
+ public const int Cyrillic_em;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_en")]
+ public const int Cyrillic_en;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_en_descender")]
+ public const int Cyrillic_en_descender;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_er")]
+ public const int Cyrillic_er;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_es")]
+ public const int Cyrillic_es;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_ghe")]
+ public const int Cyrillic_ghe;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_ghe_bar")]
+ public const int Cyrillic_ghe_bar;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_ha")]
+ public const int Cyrillic_ha;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_ha_descender")]
+ public const int Cyrillic_ha_descender;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_hardsign")]
+ public const int Cyrillic_hardsign;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_i")]
+ public const int Cyrillic_i;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_i_macron")]
+ public const int Cyrillic_i_macron;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_ie")]
+ public const int Cyrillic_ie;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_io")]
+ public const int Cyrillic_io;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_je")]
+ public const int Cyrillic_je;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_ka")]
+ public const int Cyrillic_ka;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_ka_descender")]
+ public const int Cyrillic_ka_descender;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_ka_vertstroke")]
+ public const int Cyrillic_ka_vertstroke;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_lje")]
+ public const int Cyrillic_lje;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_nje")]
+ public const int Cyrillic_nje;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_o")]
+ public const int Cyrillic_o;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_o_bar")]
+ public const int Cyrillic_o_bar;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_pe")]
+ public const int Cyrillic_pe;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_schwa")]
+ public const int Cyrillic_schwa;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_sha")]
+ public const int Cyrillic_sha;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_shcha")]
+ public const int Cyrillic_shcha;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_shha")]
+ public const int Cyrillic_shha;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_shorti")]
+ public const int Cyrillic_shorti;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_softsign")]
+ public const int Cyrillic_softsign;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_te")]
+ public const int Cyrillic_te;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_tse")]
+ public const int Cyrillic_tse;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_u")]
+ public const int Cyrillic_u;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_u_macron")]
+ public const int Cyrillic_u_macron;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_u_straight")]
+ public const int Cyrillic_u_straight;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_u_straight_bar")]
+ public const int Cyrillic_u_straight_bar;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_ve")]
+ public const int Cyrillic_ve;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_ya")]
+ public const int Cyrillic_ya;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_yeru")]
+ public const int Cyrillic_yeru;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_yu")]
+ public const int Cyrillic_yu;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_ze")]
+ public const int Cyrillic_ze;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_zhe")]
+ public const int Cyrillic_zhe;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Cyrillic_zhe_descender")]
+ public const int Cyrillic_zhe_descender;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_D")]
+ public const int D;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_DOS")]
+ public const int DOS;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Dabovedot")]
+ public const int Dabovedot;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Dcaron")]
+ public const int Dcaron;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Delete")]
+ public const int Delete;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Display")]
+ public const int Display;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Documents")]
+ public const int Documents;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_DongSign")]
+ public const int DongSign;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Down")]
+ public const int Down;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Dstroke")]
+ public const int Dstroke;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_E")]
+ public const int E;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ENG")]
+ public const int ENG;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ETH")]
+ public const int ETH;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_EZH")]
+ public const int EZH;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Eabovedot")]
+ public const int Eabovedot;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Eacute")]
+ public const int Eacute;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Ebelowdot")]
+ public const int Ebelowdot;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Ecaron")]
+ public const int Ecaron;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Ecircumflex")]
+ public const int Ecircumflex;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Ecircumflexacute")]
+ public const int Ecircumflexacute;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Ecircumflexbelowdot")]
+ public const int Ecircumflexbelowdot;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Ecircumflexgrave")]
+ public const int Ecircumflexgrave;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Ecircumflexhook")]
+ public const int Ecircumflexhook;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Ecircumflextilde")]
+ public const int Ecircumflextilde;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_EcuSign")]
+ public const int EcuSign;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Ediaeresis")]
+ public const int Ediaeresis;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Egrave")]
+ public const int Egrave;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Ehook")]
+ public const int Ehook;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Eisu_Shift")]
+ public const int Eisu_Shift;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Eisu_toggle")]
+ public const int Eisu_toggle;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Eject")]
+ public const int Eject;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Emacron")]
+ public const int Emacron;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_End")]
+ public const int End;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Eogonek")]
+ public const int Eogonek;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Escape")]
+ public const int Escape;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Eth")]
+ public const int Eth;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Etilde")]
+ public const int Etilde;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_EuroSign")]
+ public const int EuroSign;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Excel")]
+ public const int Excel;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Execute")]
+ public const int Execute;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Explorer")]
+ public const int Explorer;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_F")]
+ public const int F;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_F1")]
+ public const int F1;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_F10")]
+ public const int F10;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_F11")]
+ public const int F11;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_F12")]
+ public const int F12;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_F13")]
+ public const int F13;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_F14")]
+ public const int F14;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_F15")]
+ public const int F15;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_F16")]
+ public const int F16;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_F17")]
+ public const int F17;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_F18")]
+ public const int F18;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_F19")]
+ public const int F19;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_F2")]
+ public const int F2;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_F20")]
+ public const int F20;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_F21")]
+ public const int F21;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_F22")]
+ public const int F22;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_F23")]
+ public const int F23;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_F24")]
+ public const int F24;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_F25")]
+ public const int F25;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_F26")]
+ public const int F26;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_F27")]
+ public const int F27;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_F28")]
+ public const int F28;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_F29")]
+ public const int F29;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_F3")]
+ public const int F3;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_F30")]
+ public const int F30;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_F31")]
+ public const int F31;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_F32")]
+ public const int F32;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_F33")]
+ public const int F33;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_F34")]
+ public const int F34;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_F35")]
+ public const int F35;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_F4")]
+ public const int F4;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_F5")]
+ public const int F5;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_F6")]
+ public const int F6;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_F7")]
+ public const int F7;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_F8")]
+ public const int F8;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_F9")]
+ public const int F9;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_FFrancSign")]
+ public const int FFrancSign;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Fabovedot")]
+ public const int Fabovedot;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Farsi_0")]
+ public const int Farsi_0;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Farsi_1")]
+ public const int Farsi_1;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Farsi_2")]
+ public const int Farsi_2;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Farsi_3")]
+ public const int Farsi_3;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Farsi_4")]
+ public const int Farsi_4;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Farsi_5")]
+ public const int Farsi_5;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Farsi_6")]
+ public const int Farsi_6;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Farsi_7")]
+ public const int Farsi_7;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Farsi_8")]
+ public const int Farsi_8;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Farsi_9")]
+ public const int Farsi_9;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Farsi_yeh")]
+ public const int Farsi_yeh;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Favorites")]
+ public const int Favorites;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Finance")]
+ public const int Finance;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Find")]
+ public const int Find;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_First_Virtual_Screen")]
+ public const int First_Virtual_Screen;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Forward")]
+ public const int Forward;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_FrameBack")]
+ public const int FrameBack;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_FrameForward")]
+ public const int FrameForward;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_G")]
+ public const int G;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Gabovedot")]
+ public const int Gabovedot;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Game")]
+ public const int Game;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Gbreve")]
+ public const int Gbreve;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Gcaron")]
+ public const int Gcaron;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Gcedilla")]
+ public const int Gcedilla;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Gcircumflex")]
+ public const int Gcircumflex;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Georgian_an")]
+ public const int Georgian_an;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Georgian_ban")]
+ public const int Georgian_ban;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Georgian_can")]
+ public const int Georgian_can;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Georgian_char")]
+ public const int Georgian_char;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Georgian_chin")]
+ public const int Georgian_chin;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Georgian_cil")]
+ public const int Georgian_cil;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Georgian_don")]
+ public const int Georgian_don;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Georgian_en")]
+ public const int Georgian_en;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Georgian_fi")]
+ public const int Georgian_fi;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Georgian_gan")]
+ public const int Georgian_gan;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Georgian_ghan")]
+ public const int Georgian_ghan;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Georgian_hae")]
+ public const int Georgian_hae;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Georgian_har")]
+ public const int Georgian_har;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Georgian_he")]
+ public const int Georgian_he;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Georgian_hie")]
+ public const int Georgian_hie;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Georgian_hoe")]
+ public const int Georgian_hoe;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Georgian_in")]
+ public const int Georgian_in;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Georgian_jhan")]
+ public const int Georgian_jhan;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Georgian_jil")]
+ public const int Georgian_jil;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Georgian_kan")]
+ public const int Georgian_kan;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Georgian_khar")]
+ public const int Georgian_khar;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Georgian_las")]
+ public const int Georgian_las;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Georgian_man")]
+ public const int Georgian_man;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Georgian_nar")]
+ public const int Georgian_nar;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Georgian_on")]
+ public const int Georgian_on;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Georgian_par")]
+ public const int Georgian_par;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Georgian_phar")]
+ public const int Georgian_phar;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Georgian_qar")]
+ public const int Georgian_qar;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Georgian_rae")]
+ public const int Georgian_rae;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Georgian_san")]
+ public const int Georgian_san;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Georgian_shin")]
+ public const int Georgian_shin;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Georgian_tan")]
+ public const int Georgian_tan;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Georgian_tar")]
+ public const int Georgian_tar;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Georgian_un")]
+ public const int Georgian_un;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Georgian_vin")]
+ public const int Georgian_vin;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Georgian_we")]
+ public const int Georgian_we;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Georgian_xan")]
+ public const int Georgian_xan;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Georgian_zen")]
+ public const int Georgian_zen;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Georgian_zhar")]
+ public const int Georgian_zhar;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Go")]
+ public const int Go;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_ALPHA")]
+ public const int Greek_ALPHA;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_ALPHAaccent")]
+ public const int Greek_ALPHAaccent;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_BETA")]
+ public const int Greek_BETA;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_CHI")]
+ public const int Greek_CHI;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_DELTA")]
+ public const int Greek_DELTA;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_EPSILON")]
+ public const int Greek_EPSILON;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_EPSILONaccent")]
+ public const int Greek_EPSILONaccent;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_ETA")]
+ public const int Greek_ETA;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_ETAaccent")]
+ public const int Greek_ETAaccent;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_GAMMA")]
+ public const int Greek_GAMMA;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_IOTA")]
+ public const int Greek_IOTA;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_IOTAaccent")]
+ public const int Greek_IOTAaccent;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_IOTAdiaeresis")]
+ public const int Greek_IOTAdiaeresis;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_IOTAdieresis")]
+ public const int Greek_IOTAdieresis;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_KAPPA")]
+ public const int Greek_KAPPA;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_LAMBDA")]
+ public const int Greek_LAMBDA;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_LAMDA")]
+ public const int Greek_LAMDA;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_MU")]
+ public const int Greek_MU;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_NU")]
+ public const int Greek_NU;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_OMEGA")]
+ public const int Greek_OMEGA;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_OMEGAaccent")]
+ public const int Greek_OMEGAaccent;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_OMICRON")]
+ public const int Greek_OMICRON;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_OMICRONaccent")]
+ public const int Greek_OMICRONaccent;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_PHI")]
+ public const int Greek_PHI;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_PI")]
+ public const int Greek_PI;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_PSI")]
+ public const int Greek_PSI;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_RHO")]
+ public const int Greek_RHO;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_SIGMA")]
+ public const int Greek_SIGMA;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_TAU")]
+ public const int Greek_TAU;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_THETA")]
+ public const int Greek_THETA;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_UPSILON")]
+ public const int Greek_UPSILON;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_UPSILONaccent")]
+ public const int Greek_UPSILONaccent;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_UPSILONdieresis")]
+ public const int Greek_UPSILONdieresis;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_XI")]
+ public const int Greek_XI;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_ZETA")]
+ public const int Greek_ZETA;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_accentdieresis")]
+ public const int Greek_accentdieresis;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_alpha")]
+ public const int Greek_alpha;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_alphaaccent")]
+ public const int Greek_alphaaccent;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_beta")]
+ public const int Greek_beta;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_chi")]
+ public const int Greek_chi;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_delta")]
+ public const int Greek_delta;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_epsilon")]
+ public const int Greek_epsilon;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_epsilonaccent")]
+ public const int Greek_epsilonaccent;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_eta")]
+ public const int Greek_eta;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_etaaccent")]
+ public const int Greek_etaaccent;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_finalsmallsigma")]
+ public const int Greek_finalsmallsigma;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_gamma")]
+ public const int Greek_gamma;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_horizbar")]
+ public const int Greek_horizbar;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_iota")]
+ public const int Greek_iota;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_iotaaccent")]
+ public const int Greek_iotaaccent;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_iotaaccentdieresis")]
+ public const int Greek_iotaaccentdieresis;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_iotadieresis")]
+ public const int Greek_iotadieresis;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_kappa")]
+ public const int Greek_kappa;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_lambda")]
+ public const int Greek_lambda;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_lamda")]
+ public const int Greek_lamda;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_mu")]
+ public const int Greek_mu;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_nu")]
+ public const int Greek_nu;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_omega")]
+ public const int Greek_omega;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_omegaaccent")]
+ public const int Greek_omegaaccent;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_omicron")]
+ public const int Greek_omicron;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_omicronaccent")]
+ public const int Greek_omicronaccent;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_phi")]
+ public const int Greek_phi;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_pi")]
+ public const int Greek_pi;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_psi")]
+ public const int Greek_psi;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_rho")]
+ public const int Greek_rho;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_sigma")]
+ public const int Greek_sigma;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_switch")]
+ public const int Greek_switch;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_tau")]
+ public const int Greek_tau;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_theta")]
+ public const int Greek_theta;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_upsilon")]
+ public const int Greek_upsilon;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_upsilonaccent")]
+ public const int Greek_upsilonaccent;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_upsilonaccentdieresis")]
+ public const int Greek_upsilonaccentdieresis;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_upsilondieresis")]
+ public const int Greek_upsilondieresis;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_xi")]
+ public const int Greek_xi;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Greek_zeta")]
+ public const int Greek_zeta;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Green")]
+ public const int Green;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_H")]
+ public const int H;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul")]
+ public const int Hangul;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_A")]
+ public const int Hangul_A;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_AE")]
+ public const int Hangul_AE;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_AraeA")]
+ public const int Hangul_AraeA;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_AraeAE")]
+ public const int Hangul_AraeAE;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_Banja")]
+ public const int Hangul_Banja;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_Cieuc")]
+ public const int Hangul_Cieuc;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_Codeinput")]
+ public const int Hangul_Codeinput;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_Dikeud")]
+ public const int Hangul_Dikeud;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_E")]
+ public const int Hangul_E;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_EO")]
+ public const int Hangul_EO;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_EU")]
+ public const int Hangul_EU;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_End")]
+ public const int Hangul_End;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_Hanja")]
+ public const int Hangul_Hanja;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_Hieuh")]
+ public const int Hangul_Hieuh;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_I")]
+ public const int Hangul_I;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_Ieung")]
+ public const int Hangul_Ieung;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_J_Cieuc")]
+ public const int Hangul_J_Cieuc;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_J_Dikeud")]
+ public const int Hangul_J_Dikeud;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_J_Hieuh")]
+ public const int Hangul_J_Hieuh;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_J_Ieung")]
+ public const int Hangul_J_Ieung;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_J_Jieuj")]
+ public const int Hangul_J_Jieuj;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_J_Khieuq")]
+ public const int Hangul_J_Khieuq;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_J_Kiyeog")]
+ public const int Hangul_J_Kiyeog;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_J_KiyeogSios")]
+ public const int Hangul_J_KiyeogSios;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_J_KkogjiDalrinIeung")]
+ public const int Hangul_J_KkogjiDalrinIeung;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_J_Mieum")]
+ public const int Hangul_J_Mieum;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_J_Nieun")]
+ public const int Hangul_J_Nieun;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_J_NieunHieuh")]
+ public const int Hangul_J_NieunHieuh;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_J_NieunJieuj")]
+ public const int Hangul_J_NieunJieuj;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_J_PanSios")]
+ public const int Hangul_J_PanSios;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_J_Phieuf")]
+ public const int Hangul_J_Phieuf;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_J_Pieub")]
+ public const int Hangul_J_Pieub;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_J_PieubSios")]
+ public const int Hangul_J_PieubSios;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_J_Rieul")]
+ public const int Hangul_J_Rieul;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_J_RieulHieuh")]
+ public const int Hangul_J_RieulHieuh;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_J_RieulKiyeog")]
+ public const int Hangul_J_RieulKiyeog;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_J_RieulMieum")]
+ public const int Hangul_J_RieulMieum;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_J_RieulPhieuf")]
+ public const int Hangul_J_RieulPhieuf;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_J_RieulPieub")]
+ public const int Hangul_J_RieulPieub;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_J_RieulSios")]
+ public const int Hangul_J_RieulSios;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_J_RieulTieut")]
+ public const int Hangul_J_RieulTieut;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_J_Sios")]
+ public const int Hangul_J_Sios;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_J_SsangKiyeog")]
+ public const int Hangul_J_SsangKiyeog;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_J_SsangSios")]
+ public const int Hangul_J_SsangSios;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_J_Tieut")]
+ public const int Hangul_J_Tieut;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_J_YeorinHieuh")]
+ public const int Hangul_J_YeorinHieuh;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_Jamo")]
+ public const int Hangul_Jamo;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_Jeonja")]
+ public const int Hangul_Jeonja;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_Jieuj")]
+ public const int Hangul_Jieuj;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_Khieuq")]
+ public const int Hangul_Khieuq;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_Kiyeog")]
+ public const int Hangul_Kiyeog;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_KiyeogSios")]
+ public const int Hangul_KiyeogSios;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_KkogjiDalrinIeung")]
+ public const int Hangul_KkogjiDalrinIeung;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_Mieum")]
+ public const int Hangul_Mieum;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_MultipleCandidate")]
+ public const int Hangul_MultipleCandidate;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_Nieun")]
+ public const int Hangul_Nieun;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_NieunHieuh")]
+ public const int Hangul_NieunHieuh;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_NieunJieuj")]
+ public const int Hangul_NieunJieuj;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_O")]
+ public const int Hangul_O;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_OE")]
+ public const int Hangul_OE;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_PanSios")]
+ public const int Hangul_PanSios;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_Phieuf")]
+ public const int Hangul_Phieuf;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_Pieub")]
+ public const int Hangul_Pieub;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_PieubSios")]
+ public const int Hangul_PieubSios;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_PostHanja")]
+ public const int Hangul_PostHanja;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_PreHanja")]
+ public const int Hangul_PreHanja;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_PreviousCandidate")]
+ public const int Hangul_PreviousCandidate;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_Rieul")]
+ public const int Hangul_Rieul;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_RieulHieuh")]
+ public const int Hangul_RieulHieuh;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_RieulKiyeog")]
+ public const int Hangul_RieulKiyeog;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_RieulMieum")]
+ public const int Hangul_RieulMieum;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_RieulPhieuf")]
+ public const int Hangul_RieulPhieuf;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_RieulPieub")]
+ public const int Hangul_RieulPieub;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_RieulSios")]
+ public const int Hangul_RieulSios;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_RieulTieut")]
+ public const int Hangul_RieulTieut;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_RieulYeorinHieuh")]
+ public const int Hangul_RieulYeorinHieuh;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_Romaja")]
+ public const int Hangul_Romaja;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_SingleCandidate")]
+ public const int Hangul_SingleCandidate;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_Sios")]
+ public const int Hangul_Sios;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_Special")]
+ public const int Hangul_Special;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_SsangDikeud")]
+ public const int Hangul_SsangDikeud;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_SsangJieuj")]
+ public const int Hangul_SsangJieuj;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_SsangKiyeog")]
+ public const int Hangul_SsangKiyeog;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_SsangPieub")]
+ public const int Hangul_SsangPieub;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_SsangSios")]
+ public const int Hangul_SsangSios;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_Start")]
+ public const int Hangul_Start;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_SunkyeongeumMieum")]
+ public const int Hangul_SunkyeongeumMieum;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_SunkyeongeumPhieuf")]
+ public const int Hangul_SunkyeongeumPhieuf;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_SunkyeongeumPieub")]
+ public const int Hangul_SunkyeongeumPieub;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_Tieut")]
+ public const int Hangul_Tieut;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_U")]
+ public const int Hangul_U;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_WA")]
+ public const int Hangul_WA;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_WAE")]
+ public const int Hangul_WAE;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_WE")]
+ public const int Hangul_WE;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_WEO")]
+ public const int Hangul_WEO;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_WI")]
+ public const int Hangul_WI;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_YA")]
+ public const int Hangul_YA;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_YAE")]
+ public const int Hangul_YAE;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_YE")]
+ public const int Hangul_YE;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_YEO")]
+ public const int Hangul_YEO;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_YI")]
+ public const int Hangul_YI;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_YO")]
+ public const int Hangul_YO;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_YU")]
+ public const int Hangul_YU;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_YeorinHieuh")]
+ public const int Hangul_YeorinHieuh;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hangul_switch")]
+ public const int Hangul_switch;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hankaku")]
+ public const int Hankaku;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hcircumflex")]
+ public const int Hcircumflex;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hebrew_switch")]
+ public const int Hebrew_switch;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Help")]
+ public const int Help;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Henkan")]
+ public const int Henkan;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Henkan_Mode")]
+ public const int Henkan_Mode;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hibernate")]
+ public const int Hibernate;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hiragana")]
+ public const int Hiragana;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hiragana_Katakana")]
+ public const int Hiragana_Katakana;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_History")]
+ public const int History;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Home")]
+ public const int Home;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_HomePage")]
+ public const int HomePage;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_HotLinks")]
+ public const int HotLinks;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hstroke")]
+ public const int Hstroke;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hyper_L")]
+ public const int Hyper_L;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Hyper_R")]
+ public const int Hyper_R;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_I")]
+ public const int I;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ISO_Center_Object")]
+ public const int ISO_Center_Object;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ISO_Continuous_Underline")]
+ public const int ISO_Continuous_Underline;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ISO_Discontinuous_Underline")]
+ public const int ISO_Discontinuous_Underline;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ISO_Emphasize")]
+ public const int ISO_Emphasize;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ISO_Enter")]
+ public const int ISO_Enter;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ISO_Fast_Cursor_Down")]
+ public const int ISO_Fast_Cursor_Down;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ISO_Fast_Cursor_Left")]
+ public const int ISO_Fast_Cursor_Left;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ISO_Fast_Cursor_Right")]
+ public const int ISO_Fast_Cursor_Right;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ISO_Fast_Cursor_Up")]
+ public const int ISO_Fast_Cursor_Up;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ISO_First_Group")]
+ public const int ISO_First_Group;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ISO_First_Group_Lock")]
+ public const int ISO_First_Group_Lock;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ISO_Group_Latch")]
+ public const int ISO_Group_Latch;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ISO_Group_Lock")]
+ public const int ISO_Group_Lock;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ISO_Group_Shift")]
+ public const int ISO_Group_Shift;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ISO_Last_Group")]
+ public const int ISO_Last_Group;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ISO_Last_Group_Lock")]
+ public const int ISO_Last_Group_Lock;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ISO_Left_Tab")]
+ public const int ISO_Left_Tab;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ISO_Level2_Latch")]
+ public const int ISO_Level2_Latch;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ISO_Level3_Latch")]
+ public const int ISO_Level3_Latch;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ISO_Level3_Lock")]
+ public const int ISO_Level3_Lock;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ISO_Level3_Shift")]
+ public const int ISO_Level3_Shift;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ISO_Level5_Latch")]
+ public const int ISO_Level5_Latch;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ISO_Level5_Lock")]
+ public const int ISO_Level5_Lock;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ISO_Level5_Shift")]
+ public const int ISO_Level5_Shift;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ISO_Lock")]
+ public const int ISO_Lock;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ISO_Move_Line_Down")]
+ public const int ISO_Move_Line_Down;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ISO_Move_Line_Up")]
+ public const int ISO_Move_Line_Up;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ISO_Next_Group")]
+ public const int ISO_Next_Group;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ISO_Next_Group_Lock")]
+ public const int ISO_Next_Group_Lock;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ISO_Partial_Line_Down")]
+ public const int ISO_Partial_Line_Down;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ISO_Partial_Line_Up")]
+ public const int ISO_Partial_Line_Up;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ISO_Partial_Space_Left")]
+ public const int ISO_Partial_Space_Left;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ISO_Partial_Space_Right")]
+ public const int ISO_Partial_Space_Right;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ISO_Prev_Group")]
+ public const int ISO_Prev_Group;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ISO_Prev_Group_Lock")]
+ public const int ISO_Prev_Group_Lock;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ISO_Release_Both_Margins")]
+ public const int ISO_Release_Both_Margins;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ISO_Release_Margin_Left")]
+ public const int ISO_Release_Margin_Left;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ISO_Release_Margin_Right")]
+ public const int ISO_Release_Margin_Right;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ISO_Set_Margin_Left")]
+ public const int ISO_Set_Margin_Left;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ISO_Set_Margin_Right")]
+ public const int ISO_Set_Margin_Right;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Iabovedot")]
+ public const int Iabovedot;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Iacute")]
+ public const int Iacute;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Ibelowdot")]
+ public const int Ibelowdot;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Ibreve")]
+ public const int Ibreve;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Icircumflex")]
+ public const int Icircumflex;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Idiaeresis")]
+ public const int Idiaeresis;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Igrave")]
+ public const int Igrave;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Ihook")]
+ public const int Ihook;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Imacron")]
+ public const int Imacron;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Insert")]
+ public const int Insert;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Iogonek")]
+ public const int Iogonek;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Itilde")]
+ public const int Itilde;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_J")]
+ public const int J;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Jcircumflex")]
+ public const int Jcircumflex;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_K")]
+ public const int K;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_KP_0")]
+ public const int KP_0;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_KP_1")]
+ public const int KP_1;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_KP_2")]
+ public const int KP_2;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_KP_3")]
+ public const int KP_3;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_KP_4")]
+ public const int KP_4;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_KP_5")]
+ public const int KP_5;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_KP_6")]
+ public const int KP_6;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_KP_7")]
+ public const int KP_7;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_KP_8")]
+ public const int KP_8;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_KP_9")]
+ public const int KP_9;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_KP_Add")]
+ public const int KP_Add;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_KP_Begin")]
+ public const int KP_Begin;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_KP_Decimal")]
+ public const int KP_Decimal;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_KP_Delete")]
+ public const int KP_Delete;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_KP_Divide")]
+ public const int KP_Divide;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_KP_Down")]
+ public const int KP_Down;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_KP_End")]
+ public const int KP_End;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_KP_Enter")]
+ public const int KP_Enter;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_KP_Equal")]
+ public const int KP_Equal;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_KP_F1")]
+ public const int KP_F1;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_KP_F2")]
+ public const int KP_F2;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_KP_F3")]
+ public const int KP_F3;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_KP_F4")]
+ public const int KP_F4;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_KP_Home")]
+ public const int KP_Home;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_KP_Insert")]
+ public const int KP_Insert;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_KP_Left")]
+ public const int KP_Left;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_KP_Multiply")]
+ public const int KP_Multiply;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_KP_Next")]
+ public const int KP_Next;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_KP_Page_Down")]
+ public const int KP_Page_Down;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_KP_Page_Up")]
+ public const int KP_Page_Up;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_KP_Prior")]
+ public const int KP_Prior;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_KP_Right")]
+ public const int KP_Right;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_KP_Separator")]
+ public const int KP_Separator;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_KP_Space")]
+ public const int KP_Space;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_KP_Subtract")]
+ public const int KP_Subtract;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_KP_Tab")]
+ public const int KP_Tab;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_KP_Up")]
+ public const int KP_Up;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Kana_Lock")]
+ public const int Kana_Lock;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Kana_Shift")]
+ public const int Kana_Shift;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Kanji")]
+ public const int Kanji;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Kanji_Bangou")]
+ public const int Kanji_Bangou;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Katakana")]
+ public const int Katakana;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_KbdBrightnessDown")]
+ public const int KbdBrightnessDown;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_KbdBrightnessUp")]
+ public const int KbdBrightnessUp;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_KbdLightOnOff")]
+ public const int KbdLightOnOff;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Kcedilla")]
+ public const int Kcedilla;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Korean_Won")]
+ public const int Korean_Won;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_L")]
+ public const int L;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_L1")]
+ public const int L1;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_L10")]
+ public const int L10;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_L2")]
+ public const int L2;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_L3")]
+ public const int L3;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_L4")]
+ public const int L4;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_L5")]
+ public const int L5;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_L6")]
+ public const int L6;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_L7")]
+ public const int L7;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_L8")]
+ public const int L8;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_L9")]
+ public const int L9;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Lacute")]
+ public const int Lacute;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Last_Virtual_Screen")]
+ public const int Last_Virtual_Screen;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Launch0")]
+ public const int Launch0;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Launch1")]
+ public const int Launch1;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Launch2")]
+ public const int Launch2;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Launch3")]
+ public const int Launch3;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Launch4")]
+ public const int Launch4;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Launch5")]
+ public const int Launch5;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Launch6")]
+ public const int Launch6;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Launch7")]
+ public const int Launch7;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Launch8")]
+ public const int Launch8;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Launch9")]
+ public const int Launch9;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_LaunchA")]
+ public const int LaunchA;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_LaunchB")]
+ public const int LaunchB;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_LaunchC")]
+ public const int LaunchC;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_LaunchD")]
+ public const int LaunchD;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_LaunchE")]
+ public const int LaunchE;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_LaunchF")]
+ public const int LaunchF;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Lbelowdot")]
+ public const int Lbelowdot;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Lcaron")]
+ public const int Lcaron;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Lcedilla")]
+ public const int Lcedilla;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Left")]
+ public const int Left;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_LightBulb")]
+ public const int LightBulb;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Linefeed")]
+ public const int Linefeed;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_LiraSign")]
+ public const int LiraSign;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_LogGrabInfo")]
+ public const int LogGrabInfo;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_LogOff")]
+ public const int LogOff;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_LogWindowTree")]
+ public const int LogWindowTree;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Lstroke")]
+ public const int Lstroke;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_M")]
+ public const int M;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Mabovedot")]
+ public const int Mabovedot;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Macedonia_DSE")]
+ public const int Macedonia_DSE;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Macedonia_GJE")]
+ public const int Macedonia_GJE;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Macedonia_KJE")]
+ public const int Macedonia_KJE;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Macedonia_dse")]
+ public const int Macedonia_dse;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Macedonia_gje")]
+ public const int Macedonia_gje;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Macedonia_kje")]
+ public const int Macedonia_kje;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Mae_Koho")]
+ public const int Mae_Koho;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Mail")]
+ public const int Mail;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_MailForward")]
+ public const int MailForward;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Market")]
+ public const int Market;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Massyo")]
+ public const int Massyo;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Meeting")]
+ public const int Meeting;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Memo")]
+ public const int Memo;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Menu")]
+ public const int Menu;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_MenuKB")]
+ public const int MenuKB;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_MenuPB")]
+ public const int MenuPB;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Messenger")]
+ public const int Messenger;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Meta_L")]
+ public const int Meta_L;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Meta_R")]
+ public const int Meta_R;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_MillSign")]
+ public const int MillSign;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ModeLock")]
+ public const int ModeLock;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Mode_switch")]
+ public const int Mode_switch;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_MonBrightnessDown")]
+ public const int MonBrightnessDown;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_MonBrightnessUp")]
+ public const int MonBrightnessUp;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_MouseKeys_Accel_Enable")]
+ public const int MouseKeys_Accel_Enable;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_MouseKeys_Enable")]
+ public const int MouseKeys_Enable;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Muhenkan")]
+ public const int Muhenkan;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Multi_key")]
+ public const int Multi_key;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_MultipleCandidate")]
+ public const int MultipleCandidate;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Music")]
+ public const int Music;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_MyComputer")]
+ public const int MyComputer;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_MySites")]
+ public const int MySites;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_N")]
+ public const int N;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Nacute")]
+ public const int Nacute;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_NairaSign")]
+ public const int NairaSign;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Ncaron")]
+ public const int Ncaron;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Ncedilla")]
+ public const int Ncedilla;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_New")]
+ public const int New;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_NewSheqelSign")]
+ public const int NewSheqelSign;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_News")]
+ public const int News;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Next")]
+ public const int Next;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Next_VMode")]
+ public const int Next_VMode;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Next_Virtual_Screen")]
+ public const int Next_Virtual_Screen;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Ntilde")]
+ public const int Ntilde;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Num_Lock")]
+ public const int Num_Lock;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_O")]
+ public const int O;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_OE")]
+ public const int OE;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Oacute")]
+ public const int Oacute;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Obarred")]
+ public const int Obarred;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Obelowdot")]
+ public const int Obelowdot;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Ocaron")]
+ public const int Ocaron;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Ocircumflex")]
+ public const int Ocircumflex;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Ocircumflexacute")]
+ public const int Ocircumflexacute;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Ocircumflexbelowdot")]
+ public const int Ocircumflexbelowdot;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Ocircumflexgrave")]
+ public const int Ocircumflexgrave;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Ocircumflexhook")]
+ public const int Ocircumflexhook;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Ocircumflextilde")]
+ public const int Ocircumflextilde;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Odiaeresis")]
+ public const int Odiaeresis;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Odoubleacute")]
+ public const int Odoubleacute;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_OfficeHome")]
+ public const int OfficeHome;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Ograve")]
+ public const int Ograve;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Ohook")]
+ public const int Ohook;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Ohorn")]
+ public const int Ohorn;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Ohornacute")]
+ public const int Ohornacute;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Ohornbelowdot")]
+ public const int Ohornbelowdot;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Ohorngrave")]
+ public const int Ohorngrave;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Ohornhook")]
+ public const int Ohornhook;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Ohorntilde")]
+ public const int Ohorntilde;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Omacron")]
+ public const int Omacron;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Ooblique")]
+ public const int Ooblique;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Open")]
+ public const int Open;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_OpenURL")]
+ public const int OpenURL;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Option")]
+ public const int Option;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Oslash")]
+ public const int Oslash;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Otilde")]
+ public const int Otilde;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Overlay1_Enable")]
+ public const int Overlay1_Enable;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Overlay2_Enable")]
+ public const int Overlay2_Enable;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_P")]
+ public const int P;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Pabovedot")]
+ public const int Pabovedot;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Page_Down")]
+ public const int Page_Down;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Page_Up")]
+ public const int Page_Up;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Paste")]
+ public const int Paste;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Pause")]
+ public const int Pause;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_PesetaSign")]
+ public const int PesetaSign;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Phone")]
+ public const int Phone;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Pictures")]
+ public const int Pictures;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Pointer_Accelerate")]
+ public const int Pointer_Accelerate;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Pointer_Button1")]
+ public const int Pointer_Button1;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Pointer_Button2")]
+ public const int Pointer_Button2;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Pointer_Button3")]
+ public const int Pointer_Button3;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Pointer_Button4")]
+ public const int Pointer_Button4;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Pointer_Button5")]
+ public const int Pointer_Button5;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Pointer_Button_Dflt")]
+ public const int Pointer_Button_Dflt;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Pointer_DblClick1")]
+ public const int Pointer_DblClick1;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Pointer_DblClick2")]
+ public const int Pointer_DblClick2;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Pointer_DblClick3")]
+ public const int Pointer_DblClick3;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Pointer_DblClick4")]
+ public const int Pointer_DblClick4;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Pointer_DblClick5")]
+ public const int Pointer_DblClick5;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Pointer_DblClick_Dflt")]
+ public const int Pointer_DblClick_Dflt;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Pointer_DfltBtnNext")]
+ public const int Pointer_DfltBtnNext;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Pointer_DfltBtnPrev")]
+ public const int Pointer_DfltBtnPrev;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Pointer_Down")]
+ public const int Pointer_Down;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Pointer_DownLeft")]
+ public const int Pointer_DownLeft;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Pointer_DownRight")]
+ public const int Pointer_DownRight;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Pointer_Drag1")]
+ public const int Pointer_Drag1;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Pointer_Drag2")]
+ public const int Pointer_Drag2;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Pointer_Drag3")]
+ public const int Pointer_Drag3;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Pointer_Drag4")]
+ public const int Pointer_Drag4;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Pointer_Drag5")]
+ public const int Pointer_Drag5;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Pointer_Drag_Dflt")]
+ public const int Pointer_Drag_Dflt;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Pointer_EnableKeys")]
+ public const int Pointer_EnableKeys;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Pointer_Left")]
+ public const int Pointer_Left;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Pointer_Right")]
+ public const int Pointer_Right;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Pointer_Up")]
+ public const int Pointer_Up;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Pointer_UpLeft")]
+ public const int Pointer_UpLeft;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Pointer_UpRight")]
+ public const int Pointer_UpRight;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_PowerDown")]
+ public const int PowerDown;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_PowerOff")]
+ public const int PowerOff;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Prev_VMode")]
+ public const int Prev_VMode;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Prev_Virtual_Screen")]
+ public const int Prev_Virtual_Screen;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_PreviousCandidate")]
+ public const int PreviousCandidate;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Print")]
+ public const int Print;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Prior")]
+ public const int Prior;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Q")]
+ public const int Q;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_R")]
+ public const int R;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_R1")]
+ public const int R1;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_R10")]
+ public const int R10;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_R11")]
+ public const int R11;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_R12")]
+ public const int R12;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_R13")]
+ public const int R13;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_R14")]
+ public const int R14;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_R15")]
+ public const int R15;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_R2")]
+ public const int R2;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_R3")]
+ public const int R3;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_R4")]
+ public const int R4;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_R5")]
+ public const int R5;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_R6")]
+ public const int R6;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_R7")]
+ public const int R7;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_R8")]
+ public const int R8;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_R9")]
+ public const int R9;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Racute")]
+ public const int Racute;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Rcaron")]
+ public const int Rcaron;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Rcedilla")]
+ public const int Rcedilla;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Red")]
+ public const int Red;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Redo")]
+ public const int Redo;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Refresh")]
+ public const int Refresh;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Reload")]
+ public const int Reload;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_RepeatKeys_Enable")]
+ public const int RepeatKeys_Enable;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Reply")]
+ public const int Reply;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Return")]
+ public const int Return;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Right")]
+ public const int Right;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_RockerDown")]
+ public const int RockerDown;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_RockerEnter")]
+ public const int RockerEnter;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_RockerUp")]
+ public const int RockerUp;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Romaji")]
+ public const int Romaji;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_RotateWindows")]
+ public const int RotateWindows;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_RotationKB")]
+ public const int RotationKB;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_RotationPB")]
+ public const int RotationPB;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_RupeeSign")]
+ public const int RupeeSign;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_S")]
+ public const int S;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_SCHWA")]
+ public const int SCHWA;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sabovedot")]
+ public const int Sabovedot;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sacute")]
+ public const int Sacute;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Save")]
+ public const int Save;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Scaron")]
+ public const int Scaron;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Scedilla")]
+ public const int Scedilla;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Scircumflex")]
+ public const int Scircumflex;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ScreenSaver")]
+ public const int ScreenSaver;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ScrollClick")]
+ public const int ScrollClick;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ScrollDown")]
+ public const int ScrollDown;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ScrollUp")]
+ public const int ScrollUp;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Scroll_Lock")]
+ public const int Scroll_Lock;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Search")]
+ public const int Search;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Select")]
+ public const int Select;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_SelectButton")]
+ public const int SelectButton;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Send")]
+ public const int Send;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Serbian_DJE")]
+ public const int Serbian_DJE;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Serbian_DZE")]
+ public const int Serbian_DZE;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Serbian_JE")]
+ public const int Serbian_JE;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Serbian_LJE")]
+ public const int Serbian_LJE;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Serbian_NJE")]
+ public const int Serbian_NJE;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Serbian_TSHE")]
+ public const int Serbian_TSHE;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Serbian_dje")]
+ public const int Serbian_dje;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Serbian_dze")]
+ public const int Serbian_dze;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Serbian_je")]
+ public const int Serbian_je;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Serbian_lje")]
+ public const int Serbian_lje;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Serbian_nje")]
+ public const int Serbian_nje;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Serbian_tshe")]
+ public const int Serbian_tshe;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Shift_L")]
+ public const int Shift_L;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Shift_Lock")]
+ public const int Shift_Lock;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Shift_R")]
+ public const int Shift_R;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Shop")]
+ public const int Shop;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_SingleCandidate")]
+ public const int SingleCandidate;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_a")]
+ public const int Sinh_a;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_aa")]
+ public const int Sinh_aa;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_aa2")]
+ public const int Sinh_aa2;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_ae")]
+ public const int Sinh_ae;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_ae2")]
+ public const int Sinh_ae2;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_aee")]
+ public const int Sinh_aee;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_aee2")]
+ public const int Sinh_aee2;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_ai")]
+ public const int Sinh_ai;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_ai2")]
+ public const int Sinh_ai2;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_al")]
+ public const int Sinh_al;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_au")]
+ public const int Sinh_au;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_au2")]
+ public const int Sinh_au2;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_ba")]
+ public const int Sinh_ba;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_bha")]
+ public const int Sinh_bha;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_ca")]
+ public const int Sinh_ca;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_cha")]
+ public const int Sinh_cha;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_dda")]
+ public const int Sinh_dda;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_ddha")]
+ public const int Sinh_ddha;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_dha")]
+ public const int Sinh_dha;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_dhha")]
+ public const int Sinh_dhha;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_e")]
+ public const int Sinh_e;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_e2")]
+ public const int Sinh_e2;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_ee")]
+ public const int Sinh_ee;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_ee2")]
+ public const int Sinh_ee2;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_fa")]
+ public const int Sinh_fa;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_ga")]
+ public const int Sinh_ga;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_gha")]
+ public const int Sinh_gha;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_h2")]
+ public const int Sinh_h2;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_ha")]
+ public const int Sinh_ha;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_i")]
+ public const int Sinh_i;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_i2")]
+ public const int Sinh_i2;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_ii")]
+ public const int Sinh_ii;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_ii2")]
+ public const int Sinh_ii2;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_ja")]
+ public const int Sinh_ja;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_jha")]
+ public const int Sinh_jha;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_jnya")]
+ public const int Sinh_jnya;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_ka")]
+ public const int Sinh_ka;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_kha")]
+ public const int Sinh_kha;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_kunddaliya")]
+ public const int Sinh_kunddaliya;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_la")]
+ public const int Sinh_la;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_lla")]
+ public const int Sinh_lla;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_lu")]
+ public const int Sinh_lu;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_lu2")]
+ public const int Sinh_lu2;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_luu")]
+ public const int Sinh_luu;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_luu2")]
+ public const int Sinh_luu2;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_ma")]
+ public const int Sinh_ma;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_mba")]
+ public const int Sinh_mba;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_na")]
+ public const int Sinh_na;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_ndda")]
+ public const int Sinh_ndda;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_ndha")]
+ public const int Sinh_ndha;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_ng")]
+ public const int Sinh_ng;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_ng2")]
+ public const int Sinh_ng2;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_nga")]
+ public const int Sinh_nga;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_nja")]
+ public const int Sinh_nja;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_nna")]
+ public const int Sinh_nna;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_nya")]
+ public const int Sinh_nya;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_o")]
+ public const int Sinh_o;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_o2")]
+ public const int Sinh_o2;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_oo")]
+ public const int Sinh_oo;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_oo2")]
+ public const int Sinh_oo2;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_pa")]
+ public const int Sinh_pa;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_pha")]
+ public const int Sinh_pha;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_ra")]
+ public const int Sinh_ra;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_ri")]
+ public const int Sinh_ri;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_rii")]
+ public const int Sinh_rii;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_ru2")]
+ public const int Sinh_ru2;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_ruu2")]
+ public const int Sinh_ruu2;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_sa")]
+ public const int Sinh_sa;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_sha")]
+ public const int Sinh_sha;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_ssha")]
+ public const int Sinh_ssha;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_tha")]
+ public const int Sinh_tha;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_thha")]
+ public const int Sinh_thha;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_tta")]
+ public const int Sinh_tta;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_ttha")]
+ public const int Sinh_ttha;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_u")]
+ public const int Sinh_u;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_u2")]
+ public const int Sinh_u2;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_uu")]
+ public const int Sinh_uu;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_uu2")]
+ public const int Sinh_uu2;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_va")]
+ public const int Sinh_va;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sinh_ya")]
+ public const int Sinh_ya;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sleep")]
+ public const int Sleep;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_SlowKeys_Enable")]
+ public const int SlowKeys_Enable;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Spell")]
+ public const int Spell;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_SplitScreen")]
+ public const int SplitScreen;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Standby")]
+ public const int Standby;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Start")]
+ public const int Start;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_StickyKeys_Enable")]
+ public const int StickyKeys_Enable;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Stop")]
+ public const int Stop;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Subtitle")]
+ public const int Subtitle;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Super_L")]
+ public const int Super_L;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Super_R")]
+ public const int Super_R;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Support")]
+ public const int Support;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Suspend")]
+ public const int Suspend;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Switch_VT_1")]
+ public const int Switch_VT_1;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Switch_VT_10")]
+ public const int Switch_VT_10;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Switch_VT_11")]
+ public const int Switch_VT_11;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Switch_VT_12")]
+ public const int Switch_VT_12;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Switch_VT_2")]
+ public const int Switch_VT_2;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Switch_VT_3")]
+ public const int Switch_VT_3;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Switch_VT_4")]
+ public const int Switch_VT_4;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Switch_VT_5")]
+ public const int Switch_VT_5;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Switch_VT_6")]
+ public const int Switch_VT_6;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Switch_VT_7")]
+ public const int Switch_VT_7;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Switch_VT_8")]
+ public const int Switch_VT_8;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Switch_VT_9")]
+ public const int Switch_VT_9;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Sys_Req")]
+ public const int Sys_Req;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_T")]
+ public const int T;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_THORN")]
+ public const int THORN;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Tab")]
+ public const int Tab;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Tabovedot")]
+ public const int Tabovedot;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_TaskPane")]
+ public const int TaskPane;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Tcaron")]
+ public const int Tcaron;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Tcedilla")]
+ public const int Tcedilla;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Terminal")]
+ public const int Terminal;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Terminate_Server")]
+ public const int Terminate_Server;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_baht")]
+ public const int Thai_baht;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_bobaimai")]
+ public const int Thai_bobaimai;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_chochan")]
+ public const int Thai_chochan;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_chochang")]
+ public const int Thai_chochang;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_choching")]
+ public const int Thai_choching;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_chochoe")]
+ public const int Thai_chochoe;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_dochada")]
+ public const int Thai_dochada;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_dodek")]
+ public const int Thai_dodek;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_fofa")]
+ public const int Thai_fofa;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_fofan")]
+ public const int Thai_fofan;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_hohip")]
+ public const int Thai_hohip;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_honokhuk")]
+ public const int Thai_honokhuk;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_khokhai")]
+ public const int Thai_khokhai;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_khokhon")]
+ public const int Thai_khokhon;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_khokhuat")]
+ public const int Thai_khokhuat;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_khokhwai")]
+ public const int Thai_khokhwai;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_khorakhang")]
+ public const int Thai_khorakhang;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_kokai")]
+ public const int Thai_kokai;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_lakkhangyao")]
+ public const int Thai_lakkhangyao;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_lekchet")]
+ public const int Thai_lekchet;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_lekha")]
+ public const int Thai_lekha;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_lekhok")]
+ public const int Thai_lekhok;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_lekkao")]
+ public const int Thai_lekkao;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_leknung")]
+ public const int Thai_leknung;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_lekpaet")]
+ public const int Thai_lekpaet;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_leksam")]
+ public const int Thai_leksam;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_leksi")]
+ public const int Thai_leksi;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_leksong")]
+ public const int Thai_leksong;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_leksun")]
+ public const int Thai_leksun;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_lochula")]
+ public const int Thai_lochula;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_loling")]
+ public const int Thai_loling;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_lu")]
+ public const int Thai_lu;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_maichattawa")]
+ public const int Thai_maichattawa;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_maiek")]
+ public const int Thai_maiek;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_maihanakat")]
+ public const int Thai_maihanakat;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_maihanakat_maitho")]
+ public const int Thai_maihanakat_maitho;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_maitaikhu")]
+ public const int Thai_maitaikhu;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_maitho")]
+ public const int Thai_maitho;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_maitri")]
+ public const int Thai_maitri;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_maiyamok")]
+ public const int Thai_maiyamok;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_moma")]
+ public const int Thai_moma;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_ngongu")]
+ public const int Thai_ngongu;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_nikhahit")]
+ public const int Thai_nikhahit;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_nonen")]
+ public const int Thai_nonen;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_nonu")]
+ public const int Thai_nonu;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_oang")]
+ public const int Thai_oang;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_paiyannoi")]
+ public const int Thai_paiyannoi;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_phinthu")]
+ public const int Thai_phinthu;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_phophan")]
+ public const int Thai_phophan;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_phophung")]
+ public const int Thai_phophung;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_phosamphao")]
+ public const int Thai_phosamphao;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_popla")]
+ public const int Thai_popla;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_rorua")]
+ public const int Thai_rorua;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_ru")]
+ public const int Thai_ru;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_saraa")]
+ public const int Thai_saraa;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_saraaa")]
+ public const int Thai_saraaa;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_saraae")]
+ public const int Thai_saraae;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_saraaimaimalai")]
+ public const int Thai_saraaimaimalai;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_saraaimaimuan")]
+ public const int Thai_saraaimaimuan;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_saraam")]
+ public const int Thai_saraam;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_sarae")]
+ public const int Thai_sarae;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_sarai")]
+ public const int Thai_sarai;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_saraii")]
+ public const int Thai_saraii;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_sarao")]
+ public const int Thai_sarao;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_sarau")]
+ public const int Thai_sarau;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_saraue")]
+ public const int Thai_saraue;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_sarauee")]
+ public const int Thai_sarauee;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_sarauu")]
+ public const int Thai_sarauu;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_sorusi")]
+ public const int Thai_sorusi;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_sosala")]
+ public const int Thai_sosala;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_soso")]
+ public const int Thai_soso;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_sosua")]
+ public const int Thai_sosua;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_thanthakhat")]
+ public const int Thai_thanthakhat;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_thonangmontho")]
+ public const int Thai_thonangmontho;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_thophuthao")]
+ public const int Thai_thophuthao;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_thothahan")]
+ public const int Thai_thothahan;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_thothan")]
+ public const int Thai_thothan;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_thothong")]
+ public const int Thai_thothong;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_thothung")]
+ public const int Thai_thothung;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_topatak")]
+ public const int Thai_topatak;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_totao")]
+ public const int Thai_totao;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_wowaen")]
+ public const int Thai_wowaen;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_yoyak")]
+ public const int Thai_yoyak;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thai_yoying")]
+ public const int Thai_yoying;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Thorn")]
+ public const int Thorn;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Time")]
+ public const int Time;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ToDoList")]
+ public const int ToDoList;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Tools")]
+ public const int Tools;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_TopMenu")]
+ public const int TopMenu;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_TouchpadOff")]
+ public const int TouchpadOff;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_TouchpadOn")]
+ public const int TouchpadOn;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_TouchpadToggle")]
+ public const int TouchpadToggle;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Touroku")]
+ public const int Touroku;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Travel")]
+ public const int Travel;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Tslash")]
+ public const int Tslash;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_U")]
+ public const int U;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_UWB")]
+ public const int UWB;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Uacute")]
+ public const int Uacute;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Ubelowdot")]
+ public const int Ubelowdot;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Ubreve")]
+ public const int Ubreve;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Ucircumflex")]
+ public const int Ucircumflex;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Udiaeresis")]
+ public const int Udiaeresis;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Udoubleacute")]
+ public const int Udoubleacute;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Ugrave")]
+ public const int Ugrave;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Uhook")]
+ public const int Uhook;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Uhorn")]
+ public const int Uhorn;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Uhornacute")]
+ public const int Uhornacute;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Uhornbelowdot")]
+ public const int Uhornbelowdot;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Uhorngrave")]
+ public const int Uhorngrave;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Uhornhook")]
+ public const int Uhornhook;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Uhorntilde")]
+ public const int Uhorntilde;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Ukrainian_GHE_WITH_UPTURN")]
+ public const int Ukrainian_GHE_WITH_UPTURN;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Ukrainian_I")]
+ public const int Ukrainian_I;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Ukrainian_IE")]
+ public const int Ukrainian_IE;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Ukrainian_YI")]
+ public const int Ukrainian_YI;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Ukrainian_ghe_with_upturn")]
+ public const int Ukrainian_ghe_with_upturn;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Ukrainian_i")]
+ public const int Ukrainian_i;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Ukrainian_ie")]
+ public const int Ukrainian_ie;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Ukrainian_yi")]
+ public const int Ukrainian_yi;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Ukranian_I")]
+ public const int Ukranian_I;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Ukranian_JE")]
+ public const int Ukranian_JE;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Ukranian_YI")]
+ public const int Ukranian_YI;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Ukranian_i")]
+ public const int Ukranian_i;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Ukranian_je")]
+ public const int Ukranian_je;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Ukranian_yi")]
+ public const int Ukranian_yi;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Umacron")]
+ public const int Umacron;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Undo")]
+ public const int Undo;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Ungrab")]
+ public const int Ungrab;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Uogonek")]
+ public const int Uogonek;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Up")]
+ public const int Up;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Uring")]
+ public const int Uring;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_User1KB")]
+ public const int User1KB;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_User2KB")]
+ public const int User2KB;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_UserPB")]
+ public const int UserPB;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Utilde")]
+ public const int Utilde;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_V")]
+ public const int V;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_VendorHome")]
+ public const int VendorHome;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Video")]
+ public const int Video;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_View")]
+ public const int View;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_VoidSymbol")]
+ public const int VoidSymbol;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_W")]
+ public const int W;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_WLAN")]
+ public const int WLAN;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_WWW")]
+ public const int WWW;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Wacute")]
+ public const int Wacute;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_WakeUp")]
+ public const int WakeUp;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Wcircumflex")]
+ public const int Wcircumflex;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Wdiaeresis")]
+ public const int Wdiaeresis;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_WebCam")]
+ public const int WebCam;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Wgrave")]
+ public const int Wgrave;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_WheelButton")]
+ public const int WheelButton;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_WindowClear")]
+ public const int WindowClear;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_WonSign")]
+ public const int WonSign;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Word")]
+ public const int Word;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_X")]
+ public const int X;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Xabovedot")]
+ public const int Xabovedot;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Xfer")]
+ public const int Xfer;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Y")]
+ public const int Y;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Yacute")]
+ public const int Yacute;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Ybelowdot")]
+ public const int Ybelowdot;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Ycircumflex")]
+ public const int Ycircumflex;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Ydiaeresis")]
+ public const int Ydiaeresis;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Yellow")]
+ public const int Yellow;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Ygrave")]
+ public const int Ygrave;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Yhook")]
+ public const int Yhook;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Ytilde")]
+ public const int Ytilde;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Z")]
+ public const int Z;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Zabovedot")]
+ public const int Zabovedot;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Zacute")]
+ public const int Zacute;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Zcaron")]
+ public const int Zcaron;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Zen_Koho")]
+ public const int Zen_Koho;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Zenkaku")]
+ public const int Zenkaku;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Zenkaku_Hankaku")]
+ public const int Zenkaku_Hankaku;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ZoomIn")]
+ public const int ZoomIn;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ZoomOut")]
+ public const int ZoomOut;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_Zstroke")]
+ public const int Zstroke;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_a")]
+ public const int a;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_aacute")]
+ public const int aacute;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_abelowdot")]
+ public const int abelowdot;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_abovedot")]
+ public const int abovedot;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_abreve")]
+ public const int abreve;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_abreveacute")]
+ public const int abreveacute;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_abrevebelowdot")]
+ public const int abrevebelowdot;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_abrevegrave")]
+ public const int abrevegrave;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_abrevehook")]
+ public const int abrevehook;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_abrevetilde")]
+ public const int abrevetilde;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_acircumflex")]
+ public const int acircumflex;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_acircumflexacute")]
+ public const int acircumflexacute;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_acircumflexbelowdot")]
+ public const int acircumflexbelowdot;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_acircumflexgrave")]
+ public const int acircumflexgrave;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_acircumflexhook")]
+ public const int acircumflexhook;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_acircumflextilde")]
+ public const int acircumflextilde;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_acute")]
+ public const int acute;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_adiaeresis")]
+ public const int adiaeresis;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ae")]
+ public const int ae;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_agrave")]
+ public const int agrave;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ahook")]
+ public const int ahook;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_amacron")]
+ public const int amacron;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ampersand")]
+ public const int ampersand;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_aogonek")]
+ public const int aogonek;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_apostrophe")]
+ public const int apostrophe;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_approxeq")]
+ public const int approxeq;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_approximate")]
+ public const int approximate;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_aring")]
+ public const int aring;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_asciicircum")]
+ public const int asciicircum;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_asciitilde")]
+ public const int asciitilde;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_asterisk")]
+ public const int asterisk;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_at")]
+ public const int at;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_atilde")]
+ public const int atilde;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_b")]
+ public const int b;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_babovedot")]
+ public const int babovedot;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_backslash")]
+ public const int backslash;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ballotcross")]
+ public const int ballotcross;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_bar")]
+ public const int bar;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_because")]
+ public const int because;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_blank")]
+ public const int blank;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_botintegral")]
+ public const int botintegral;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_botleftparens")]
+ public const int botleftparens;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_botleftsqbracket")]
+ public const int botleftsqbracket;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_botleftsummation")]
+ public const int botleftsummation;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_botrightparens")]
+ public const int botrightparens;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_botrightsqbracket")]
+ public const int botrightsqbracket;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_botrightsummation")]
+ public const int botrightsummation;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_bott")]
+ public const int bott;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_botvertsummationconnector")]
+ public const int botvertsummationconnector;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braceleft")]
+ public const int braceleft;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braceright")]
+ public const int braceright;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_bracketleft")]
+ public const int bracketleft;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_bracketright")]
+ public const int bracketright;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_blank")]
+ public const int braille_blank;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dot_1")]
+ public const int braille_dot_1;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dot_10")]
+ public const int braille_dot_10;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dot_2")]
+ public const int braille_dot_2;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dot_3")]
+ public const int braille_dot_3;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dot_4")]
+ public const int braille_dot_4;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dot_5")]
+ public const int braille_dot_5;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dot_6")]
+ public const int braille_dot_6;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dot_7")]
+ public const int braille_dot_7;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dot_8")]
+ public const int braille_dot_8;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dot_9")]
+ public const int braille_dot_9;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_1")]
+ public const int braille_dots_1;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_12")]
+ public const int braille_dots_12;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_123")]
+ public const int braille_dots_123;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_1234")]
+ public const int braille_dots_1234;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_12345")]
+ public const int braille_dots_12345;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_123456")]
+ public const int braille_dots_123456;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_1234567")]
+ public const int braille_dots_1234567;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_12345678")]
+ public const int braille_dots_12345678;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_1234568")]
+ public const int braille_dots_1234568;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_123457")]
+ public const int braille_dots_123457;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_1234578")]
+ public const int braille_dots_1234578;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_123458")]
+ public const int braille_dots_123458;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_12346")]
+ public const int braille_dots_12346;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_123467")]
+ public const int braille_dots_123467;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_1234678")]
+ public const int braille_dots_1234678;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_123468")]
+ public const int braille_dots_123468;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_12347")]
+ public const int braille_dots_12347;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_123478")]
+ public const int braille_dots_123478;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_12348")]
+ public const int braille_dots_12348;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_1235")]
+ public const int braille_dots_1235;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_12356")]
+ public const int braille_dots_12356;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_123567")]
+ public const int braille_dots_123567;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_1235678")]
+ public const int braille_dots_1235678;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_123568")]
+ public const int braille_dots_123568;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_12357")]
+ public const int braille_dots_12357;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_123578")]
+ public const int braille_dots_123578;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_12358")]
+ public const int braille_dots_12358;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_1236")]
+ public const int braille_dots_1236;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_12367")]
+ public const int braille_dots_12367;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_123678")]
+ public const int braille_dots_123678;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_12368")]
+ public const int braille_dots_12368;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_1237")]
+ public const int braille_dots_1237;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_12378")]
+ public const int braille_dots_12378;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_1238")]
+ public const int braille_dots_1238;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_124")]
+ public const int braille_dots_124;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_1245")]
+ public const int braille_dots_1245;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_12456")]
+ public const int braille_dots_12456;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_124567")]
+ public const int braille_dots_124567;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_1245678")]
+ public const int braille_dots_1245678;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_124568")]
+ public const int braille_dots_124568;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_12457")]
+ public const int braille_dots_12457;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_124578")]
+ public const int braille_dots_124578;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_12458")]
+ public const int braille_dots_12458;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_1246")]
+ public const int braille_dots_1246;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_12467")]
+ public const int braille_dots_12467;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_124678")]
+ public const int braille_dots_124678;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_12468")]
+ public const int braille_dots_12468;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_1247")]
+ public const int braille_dots_1247;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_12478")]
+ public const int braille_dots_12478;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_1248")]
+ public const int braille_dots_1248;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_125")]
+ public const int braille_dots_125;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_1256")]
+ public const int braille_dots_1256;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_12567")]
+ public const int braille_dots_12567;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_125678")]
+ public const int braille_dots_125678;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_12568")]
+ public const int braille_dots_12568;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_1257")]
+ public const int braille_dots_1257;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_12578")]
+ public const int braille_dots_12578;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_1258")]
+ public const int braille_dots_1258;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_126")]
+ public const int braille_dots_126;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_1267")]
+ public const int braille_dots_1267;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_12678")]
+ public const int braille_dots_12678;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_1268")]
+ public const int braille_dots_1268;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_127")]
+ public const int braille_dots_127;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_1278")]
+ public const int braille_dots_1278;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_128")]
+ public const int braille_dots_128;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_13")]
+ public const int braille_dots_13;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_134")]
+ public const int braille_dots_134;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_1345")]
+ public const int braille_dots_1345;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_13456")]
+ public const int braille_dots_13456;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_134567")]
+ public const int braille_dots_134567;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_1345678")]
+ public const int braille_dots_1345678;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_134568")]
+ public const int braille_dots_134568;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_13457")]
+ public const int braille_dots_13457;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_134578")]
+ public const int braille_dots_134578;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_13458")]
+ public const int braille_dots_13458;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_1346")]
+ public const int braille_dots_1346;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_13467")]
+ public const int braille_dots_13467;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_134678")]
+ public const int braille_dots_134678;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_13468")]
+ public const int braille_dots_13468;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_1347")]
+ public const int braille_dots_1347;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_13478")]
+ public const int braille_dots_13478;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_1348")]
+ public const int braille_dots_1348;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_135")]
+ public const int braille_dots_135;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_1356")]
+ public const int braille_dots_1356;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_13567")]
+ public const int braille_dots_13567;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_135678")]
+ public const int braille_dots_135678;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_13568")]
+ public const int braille_dots_13568;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_1357")]
+ public const int braille_dots_1357;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_13578")]
+ public const int braille_dots_13578;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_1358")]
+ public const int braille_dots_1358;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_136")]
+ public const int braille_dots_136;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_1367")]
+ public const int braille_dots_1367;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_13678")]
+ public const int braille_dots_13678;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_1368")]
+ public const int braille_dots_1368;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_137")]
+ public const int braille_dots_137;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_1378")]
+ public const int braille_dots_1378;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_138")]
+ public const int braille_dots_138;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_14")]
+ public const int braille_dots_14;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_145")]
+ public const int braille_dots_145;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_1456")]
+ public const int braille_dots_1456;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_14567")]
+ public const int braille_dots_14567;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_145678")]
+ public const int braille_dots_145678;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_14568")]
+ public const int braille_dots_14568;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_1457")]
+ public const int braille_dots_1457;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_14578")]
+ public const int braille_dots_14578;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_1458")]
+ public const int braille_dots_1458;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_146")]
+ public const int braille_dots_146;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_1467")]
+ public const int braille_dots_1467;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_14678")]
+ public const int braille_dots_14678;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_1468")]
+ public const int braille_dots_1468;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_147")]
+ public const int braille_dots_147;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_1478")]
+ public const int braille_dots_1478;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_148")]
+ public const int braille_dots_148;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_15")]
+ public const int braille_dots_15;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_156")]
+ public const int braille_dots_156;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_1567")]
+ public const int braille_dots_1567;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_15678")]
+ public const int braille_dots_15678;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_1568")]
+ public const int braille_dots_1568;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_157")]
+ public const int braille_dots_157;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_1578")]
+ public const int braille_dots_1578;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_158")]
+ public const int braille_dots_158;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_16")]
+ public const int braille_dots_16;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_167")]
+ public const int braille_dots_167;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_1678")]
+ public const int braille_dots_1678;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_168")]
+ public const int braille_dots_168;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_17")]
+ public const int braille_dots_17;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_178")]
+ public const int braille_dots_178;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_18")]
+ public const int braille_dots_18;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_2")]
+ public const int braille_dots_2;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_23")]
+ public const int braille_dots_23;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_234")]
+ public const int braille_dots_234;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_2345")]
+ public const int braille_dots_2345;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_23456")]
+ public const int braille_dots_23456;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_234567")]
+ public const int braille_dots_234567;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_2345678")]
+ public const int braille_dots_2345678;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_234568")]
+ public const int braille_dots_234568;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_23457")]
+ public const int braille_dots_23457;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_234578")]
+ public const int braille_dots_234578;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_23458")]
+ public const int braille_dots_23458;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_2346")]
+ public const int braille_dots_2346;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_23467")]
+ public const int braille_dots_23467;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_234678")]
+ public const int braille_dots_234678;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_23468")]
+ public const int braille_dots_23468;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_2347")]
+ public const int braille_dots_2347;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_23478")]
+ public const int braille_dots_23478;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_2348")]
+ public const int braille_dots_2348;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_235")]
+ public const int braille_dots_235;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_2356")]
+ public const int braille_dots_2356;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_23567")]
+ public const int braille_dots_23567;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_235678")]
+ public const int braille_dots_235678;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_23568")]
+ public const int braille_dots_23568;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_2357")]
+ public const int braille_dots_2357;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_23578")]
+ public const int braille_dots_23578;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_2358")]
+ public const int braille_dots_2358;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_236")]
+ public const int braille_dots_236;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_2367")]
+ public const int braille_dots_2367;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_23678")]
+ public const int braille_dots_23678;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_2368")]
+ public const int braille_dots_2368;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_237")]
+ public const int braille_dots_237;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_2378")]
+ public const int braille_dots_2378;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_238")]
+ public const int braille_dots_238;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_24")]
+ public const int braille_dots_24;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_245")]
+ public const int braille_dots_245;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_2456")]
+ public const int braille_dots_2456;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_24567")]
+ public const int braille_dots_24567;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_245678")]
+ public const int braille_dots_245678;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_24568")]
+ public const int braille_dots_24568;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_2457")]
+ public const int braille_dots_2457;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_24578")]
+ public const int braille_dots_24578;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_2458")]
+ public const int braille_dots_2458;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_246")]
+ public const int braille_dots_246;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_2467")]
+ public const int braille_dots_2467;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_24678")]
+ public const int braille_dots_24678;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_2468")]
+ public const int braille_dots_2468;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_247")]
+ public const int braille_dots_247;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_2478")]
+ public const int braille_dots_2478;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_248")]
+ public const int braille_dots_248;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_25")]
+ public const int braille_dots_25;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_256")]
+ public const int braille_dots_256;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_2567")]
+ public const int braille_dots_2567;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_25678")]
+ public const int braille_dots_25678;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_2568")]
+ public const int braille_dots_2568;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_257")]
+ public const int braille_dots_257;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_2578")]
+ public const int braille_dots_2578;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_258")]
+ public const int braille_dots_258;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_26")]
+ public const int braille_dots_26;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_267")]
+ public const int braille_dots_267;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_2678")]
+ public const int braille_dots_2678;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_268")]
+ public const int braille_dots_268;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_27")]
+ public const int braille_dots_27;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_278")]
+ public const int braille_dots_278;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_28")]
+ public const int braille_dots_28;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_3")]
+ public const int braille_dots_3;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_34")]
+ public const int braille_dots_34;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_345")]
+ public const int braille_dots_345;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_3456")]
+ public const int braille_dots_3456;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_34567")]
+ public const int braille_dots_34567;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_345678")]
+ public const int braille_dots_345678;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_34568")]
+ public const int braille_dots_34568;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_3457")]
+ public const int braille_dots_3457;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_34578")]
+ public const int braille_dots_34578;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_3458")]
+ public const int braille_dots_3458;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_346")]
+ public const int braille_dots_346;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_3467")]
+ public const int braille_dots_3467;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_34678")]
+ public const int braille_dots_34678;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_3468")]
+ public const int braille_dots_3468;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_347")]
+ public const int braille_dots_347;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_3478")]
+ public const int braille_dots_3478;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_348")]
+ public const int braille_dots_348;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_35")]
+ public const int braille_dots_35;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_356")]
+ public const int braille_dots_356;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_3567")]
+ public const int braille_dots_3567;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_35678")]
+ public const int braille_dots_35678;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_3568")]
+ public const int braille_dots_3568;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_357")]
+ public const int braille_dots_357;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_3578")]
+ public const int braille_dots_3578;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_358")]
+ public const int braille_dots_358;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_36")]
+ public const int braille_dots_36;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_367")]
+ public const int braille_dots_367;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_3678")]
+ public const int braille_dots_3678;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_368")]
+ public const int braille_dots_368;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_37")]
+ public const int braille_dots_37;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_378")]
+ public const int braille_dots_378;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_38")]
+ public const int braille_dots_38;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_4")]
+ public const int braille_dots_4;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_45")]
+ public const int braille_dots_45;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_456")]
+ public const int braille_dots_456;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_4567")]
+ public const int braille_dots_4567;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_45678")]
+ public const int braille_dots_45678;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_4568")]
+ public const int braille_dots_4568;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_457")]
+ public const int braille_dots_457;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_4578")]
+ public const int braille_dots_4578;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_458")]
+ public const int braille_dots_458;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_46")]
+ public const int braille_dots_46;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_467")]
+ public const int braille_dots_467;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_4678")]
+ public const int braille_dots_4678;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_468")]
+ public const int braille_dots_468;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_47")]
+ public const int braille_dots_47;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_478")]
+ public const int braille_dots_478;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_48")]
+ public const int braille_dots_48;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_5")]
+ public const int braille_dots_5;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_56")]
+ public const int braille_dots_56;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_567")]
+ public const int braille_dots_567;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_5678")]
+ public const int braille_dots_5678;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_568")]
+ public const int braille_dots_568;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_57")]
+ public const int braille_dots_57;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_578")]
+ public const int braille_dots_578;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_58")]
+ public const int braille_dots_58;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_6")]
+ public const int braille_dots_6;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_67")]
+ public const int braille_dots_67;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_678")]
+ public const int braille_dots_678;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_68")]
+ public const int braille_dots_68;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_7")]
+ public const int braille_dots_7;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_78")]
+ public const int braille_dots_78;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_braille_dots_8")]
+ public const int braille_dots_8;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_breve")]
+ public const int breve;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_brokenbar")]
+ public const int brokenbar;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_c")]
+ public const int c;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_c_h")]
+ public const int c_h;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_cabovedot")]
+ public const int cabovedot;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_cacute")]
+ public const int cacute;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_careof")]
+ public const int careof;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_caret")]
+ public const int caret;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_caron")]
+ public const int caron;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ccaron")]
+ public const int ccaron;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ccedilla")]
+ public const int ccedilla;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ccircumflex")]
+ public const int ccircumflex;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_cedilla")]
+ public const int cedilla;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_cent")]
+ public const int cent;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ch")]
+ public const int ch;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_checkerboard")]
+ public const int checkerboard;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_checkmark")]
+ public const int checkmark;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_circle")]
+ public const int circle;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_club")]
+ public const int club;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_colon")]
+ public const int colon;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_comma")]
+ public const int comma;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_containsas")]
+ public const int containsas;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_copyright")]
+ public const int copyright;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_cr")]
+ public const int cr;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_crossinglines")]
+ public const int crossinglines;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_cuberoot")]
+ public const int cuberoot;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_currency")]
+ public const int currency;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_cursor")]
+ public const int cursor;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_d")]
+ public const int d;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_dabovedot")]
+ public const int dabovedot;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_dagger")]
+ public const int dagger;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_dcaron")]
+ public const int dcaron;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_dead_A")]
+ public const int dead_A;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_dead_E")]
+ public const int dead_E;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_dead_I")]
+ public const int dead_I;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_dead_O")]
+ public const int dead_O;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_dead_U")]
+ public const int dead_U;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_dead_a")]
+ public const int dead_a;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_dead_abovecomma")]
+ public const int dead_abovecomma;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_dead_abovedot")]
+ public const int dead_abovedot;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_dead_abovereversedcomma")]
+ public const int dead_abovereversedcomma;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_dead_abovering")]
+ public const int dead_abovering;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_dead_aboveverticalline")]
+ public const int dead_aboveverticalline;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_dead_acute")]
+ public const int dead_acute;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_dead_belowbreve")]
+ public const int dead_belowbreve;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_dead_belowcircumflex")]
+ public const int dead_belowcircumflex;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_dead_belowcomma")]
+ public const int dead_belowcomma;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_dead_belowdiaeresis")]
+ public const int dead_belowdiaeresis;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_dead_belowdot")]
+ public const int dead_belowdot;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_dead_belowmacron")]
+ public const int dead_belowmacron;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_dead_belowring")]
+ public const int dead_belowring;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_dead_belowtilde")]
+ public const int dead_belowtilde;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_dead_belowverticalline")]
+ public const int dead_belowverticalline;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_dead_breve")]
+ public const int dead_breve;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_dead_capital_schwa")]
+ public const int dead_capital_schwa;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_dead_caron")]
+ public const int dead_caron;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_dead_cedilla")]
+ public const int dead_cedilla;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_dead_circumflex")]
+ public const int dead_circumflex;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_dead_currency")]
+ public const int dead_currency;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_dead_dasia")]
+ public const int dead_dasia;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_dead_diaeresis")]
+ public const int dead_diaeresis;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_dead_doubleacute")]
+ public const int dead_doubleacute;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_dead_doublegrave")]
+ public const int dead_doublegrave;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_dead_e")]
+ public const int dead_e;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_dead_grave")]
+ public const int dead_grave;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_dead_greek")]
+ public const int dead_greek;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_dead_hook")]
+ public const int dead_hook;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_dead_horn")]
+ public const int dead_horn;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_dead_i")]
+ public const int dead_i;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_dead_invertedbreve")]
+ public const int dead_invertedbreve;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_dead_iota")]
+ public const int dead_iota;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_dead_longsolidusoverlay")]
+ public const int dead_longsolidusoverlay;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_dead_lowline")]
+ public const int dead_lowline;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_dead_macron")]
+ public const int dead_macron;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_dead_o")]
+ public const int dead_o;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_dead_ogonek")]
+ public const int dead_ogonek;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_dead_perispomeni")]
+ public const int dead_perispomeni;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_dead_psili")]
+ public const int dead_psili;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_dead_semivoiced_sound")]
+ public const int dead_semivoiced_sound;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_dead_small_schwa")]
+ public const int dead_small_schwa;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_dead_stroke")]
+ public const int dead_stroke;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_dead_tilde")]
+ public const int dead_tilde;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_dead_u")]
+ public const int dead_u;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_dead_voiced_sound")]
+ public const int dead_voiced_sound;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_decimalpoint")]
+ public const int decimalpoint;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_degree")]
+ public const int degree;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_diaeresis")]
+ public const int diaeresis;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_diamond")]
+ public const int diamond;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_digitspace")]
+ public const int digitspace;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_dintegral")]
+ public const int dintegral;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_division")]
+ public const int division;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_dollar")]
+ public const int dollar;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_doubbaselinedot")]
+ public const int doubbaselinedot;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_doubleacute")]
+ public const int doubleacute;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_doubledagger")]
+ public const int doubledagger;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_doublelowquotemark")]
+ public const int doublelowquotemark;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_downarrow")]
+ public const int downarrow;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_downcaret")]
+ public const int downcaret;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_downshoe")]
+ public const int downshoe;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_downstile")]
+ public const int downstile;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_downtack")]
+ public const int downtack;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_dstroke")]
+ public const int dstroke;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_e")]
+ public const int e;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_eabovedot")]
+ public const int eabovedot;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_eacute")]
+ public const int eacute;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ebelowdot")]
+ public const int ebelowdot;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ecaron")]
+ public const int ecaron;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ecircumflex")]
+ public const int ecircumflex;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ecircumflexacute")]
+ public const int ecircumflexacute;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ecircumflexbelowdot")]
+ public const int ecircumflexbelowdot;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ecircumflexgrave")]
+ public const int ecircumflexgrave;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ecircumflexhook")]
+ public const int ecircumflexhook;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ecircumflextilde")]
+ public const int ecircumflextilde;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ediaeresis")]
+ public const int ediaeresis;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_egrave")]
+ public const int egrave;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ehook")]
+ public const int ehook;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_eightsubscript")]
+ public const int eightsubscript;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_eightsuperior")]
+ public const int eightsuperior;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_elementof")]
+ public const int elementof;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ellipsis")]
+ public const int ellipsis;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_em3space")]
+ public const int em3space;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_em4space")]
+ public const int em4space;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_emacron")]
+ public const int emacron;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_emdash")]
+ public const int emdash;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_emfilledcircle")]
+ public const int emfilledcircle;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_emfilledrect")]
+ public const int emfilledrect;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_emopencircle")]
+ public const int emopencircle;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_emopenrectangle")]
+ public const int emopenrectangle;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_emptyset")]
+ public const int emptyset;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_emspace")]
+ public const int emspace;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_endash")]
+ public const int endash;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_enfilledcircbullet")]
+ public const int enfilledcircbullet;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_enfilledsqbullet")]
+ public const int enfilledsqbullet;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_eng")]
+ public const int eng;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_enopencircbullet")]
+ public const int enopencircbullet;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_enopensquarebullet")]
+ public const int enopensquarebullet;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_enspace")]
+ public const int enspace;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_eogonek")]
+ public const int eogonek;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_equal")]
+ public const int equal;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_eth")]
+ public const int eth;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_etilde")]
+ public const int etilde;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_exclam")]
+ public const int exclam;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_exclamdown")]
+ public const int exclamdown;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ezh")]
+ public const int ezh;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_f")]
+ public const int f;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_fabovedot")]
+ public const int fabovedot;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_femalesymbol")]
+ public const int femalesymbol;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ff")]
+ public const int ff;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_figdash")]
+ public const int figdash;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_filledlefttribullet")]
+ public const int filledlefttribullet;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_filledrectbullet")]
+ public const int filledrectbullet;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_filledrighttribullet")]
+ public const int filledrighttribullet;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_filledtribulletdown")]
+ public const int filledtribulletdown;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_filledtribulletup")]
+ public const int filledtribulletup;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_fiveeighths")]
+ public const int fiveeighths;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_fivesixths")]
+ public const int fivesixths;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_fivesubscript")]
+ public const int fivesubscript;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_fivesuperior")]
+ public const int fivesuperior;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_fourfifths")]
+ public const int fourfifths;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_foursubscript")]
+ public const int foursubscript;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_foursuperior")]
+ public const int foursuperior;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_fourthroot")]
+ public const int fourthroot;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_function")]
+ public const int function;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_g")]
+ public const int g;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_gabovedot")]
+ public const int gabovedot;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_gbreve")]
+ public const int gbreve;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_gcaron")]
+ public const int gcaron;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_gcedilla")]
+ public const int gcedilla;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_gcircumflex")]
+ public const int gcircumflex;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_grave")]
+ public const int grave;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_greater")]
+ public const int greater;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_greaterthanequal")]
+ public const int greaterthanequal;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_guillemotleft")]
+ public const int guillemotleft;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_guillemotright")]
+ public const int guillemotright;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_h")]
+ public const int h;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_hairspace")]
+ public const int hairspace;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_hcircumflex")]
+ public const int hcircumflex;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_heart")]
+ public const int heart;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_hebrew_aleph")]
+ public const int hebrew_aleph;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_hebrew_ayin")]
+ public const int hebrew_ayin;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_hebrew_bet")]
+ public const int hebrew_bet;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_hebrew_beth")]
+ public const int hebrew_beth;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_hebrew_chet")]
+ public const int hebrew_chet;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_hebrew_dalet")]
+ public const int hebrew_dalet;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_hebrew_daleth")]
+ public const int hebrew_daleth;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_hebrew_doublelowline")]
+ public const int hebrew_doublelowline;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_hebrew_finalkaph")]
+ public const int hebrew_finalkaph;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_hebrew_finalmem")]
+ public const int hebrew_finalmem;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_hebrew_finalnun")]
+ public const int hebrew_finalnun;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_hebrew_finalpe")]
+ public const int hebrew_finalpe;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_hebrew_finalzade")]
+ public const int hebrew_finalzade;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_hebrew_finalzadi")]
+ public const int hebrew_finalzadi;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_hebrew_gimel")]
+ public const int hebrew_gimel;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_hebrew_gimmel")]
+ public const int hebrew_gimmel;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_hebrew_he")]
+ public const int hebrew_he;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_hebrew_het")]
+ public const int hebrew_het;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_hebrew_kaph")]
+ public const int hebrew_kaph;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_hebrew_kuf")]
+ public const int hebrew_kuf;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_hebrew_lamed")]
+ public const int hebrew_lamed;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_hebrew_mem")]
+ public const int hebrew_mem;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_hebrew_nun")]
+ public const int hebrew_nun;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_hebrew_pe")]
+ public const int hebrew_pe;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_hebrew_qoph")]
+ public const int hebrew_qoph;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_hebrew_resh")]
+ public const int hebrew_resh;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_hebrew_samech")]
+ public const int hebrew_samech;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_hebrew_samekh")]
+ public const int hebrew_samekh;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_hebrew_shin")]
+ public const int hebrew_shin;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_hebrew_taf")]
+ public const int hebrew_taf;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_hebrew_taw")]
+ public const int hebrew_taw;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_hebrew_tet")]
+ public const int hebrew_tet;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_hebrew_teth")]
+ public const int hebrew_teth;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_hebrew_waw")]
+ public const int hebrew_waw;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_hebrew_yod")]
+ public const int hebrew_yod;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_hebrew_zade")]
+ public const int hebrew_zade;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_hebrew_zadi")]
+ public const int hebrew_zadi;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_hebrew_zain")]
+ public const int hebrew_zain;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_hebrew_zayin")]
+ public const int hebrew_zayin;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_hexagram")]
+ public const int hexagram;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_horizconnector")]
+ public const int horizconnector;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_horizlinescan1")]
+ public const int horizlinescan1;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_horizlinescan3")]
+ public const int horizlinescan3;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_horizlinescan5")]
+ public const int horizlinescan5;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_horizlinescan7")]
+ public const int horizlinescan7;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_horizlinescan9")]
+ public const int horizlinescan9;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_hstroke")]
+ public const int hstroke;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ht")]
+ public const int ht;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_hyphen")]
+ public const int hyphen;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_i")]
+ public const int i;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_iTouch")]
+ public const int iTouch;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_iacute")]
+ public const int iacute;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ibelowdot")]
+ public const int ibelowdot;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ibreve")]
+ public const int ibreve;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_icircumflex")]
+ public const int icircumflex;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_identical")]
+ public const int identical;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_idiaeresis")]
+ public const int idiaeresis;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_idotless")]
+ public const int idotless;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ifonlyif")]
+ public const int ifonlyif;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_igrave")]
+ public const int igrave;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ihook")]
+ public const int ihook;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_imacron")]
+ public const int imacron;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_implies")]
+ public const int implies;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_includedin")]
+ public const int includedin;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_includes")]
+ public const int includes;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_infinity")]
+ public const int infinity;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_integral")]
+ public const int integral;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_intersection")]
+ public const int intersection;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_iogonek")]
+ public const int iogonek;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_itilde")]
+ public const int itilde;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_j")]
+ public const int j;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_jcircumflex")]
+ public const int jcircumflex;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_jot")]
+ public const int jot;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_k")]
+ public const int k;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_kana_A")]
+ public const int kana_A;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_kana_CHI")]
+ public const int kana_CHI;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_kana_E")]
+ public const int kana_E;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_kana_FU")]
+ public const int kana_FU;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_kana_HA")]
+ public const int kana_HA;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_kana_HE")]
+ public const int kana_HE;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_kana_HI")]
+ public const int kana_HI;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_kana_HO")]
+ public const int kana_HO;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_kana_HU")]
+ public const int kana_HU;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_kana_I")]
+ public const int kana_I;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_kana_KA")]
+ public const int kana_KA;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_kana_KE")]
+ public const int kana_KE;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_kana_KI")]
+ public const int kana_KI;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_kana_KO")]
+ public const int kana_KO;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_kana_KU")]
+ public const int kana_KU;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_kana_MA")]
+ public const int kana_MA;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_kana_ME")]
+ public const int kana_ME;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_kana_MI")]
+ public const int kana_MI;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_kana_MO")]
+ public const int kana_MO;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_kana_MU")]
+ public const int kana_MU;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_kana_N")]
+ public const int kana_N;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_kana_NA")]
+ public const int kana_NA;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_kana_NE")]
+ public const int kana_NE;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_kana_NI")]
+ public const int kana_NI;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_kana_NO")]
+ public const int kana_NO;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_kana_NU")]
+ public const int kana_NU;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_kana_O")]
+ public const int kana_O;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_kana_RA")]
+ public const int kana_RA;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_kana_RE")]
+ public const int kana_RE;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_kana_RI")]
+ public const int kana_RI;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_kana_RO")]
+ public const int kana_RO;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_kana_RU")]
+ public const int kana_RU;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_kana_SA")]
+ public const int kana_SA;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_kana_SE")]
+ public const int kana_SE;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_kana_SHI")]
+ public const int kana_SHI;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_kana_SO")]
+ public const int kana_SO;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_kana_SU")]
+ public const int kana_SU;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_kana_TA")]
+ public const int kana_TA;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_kana_TE")]
+ public const int kana_TE;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_kana_TI")]
+ public const int kana_TI;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_kana_TO")]
+ public const int kana_TO;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_kana_TSU")]
+ public const int kana_TSU;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_kana_TU")]
+ public const int kana_TU;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_kana_U")]
+ public const int kana_U;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_kana_WA")]
+ public const int kana_WA;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_kana_WO")]
+ public const int kana_WO;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_kana_YA")]
+ public const int kana_YA;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_kana_YO")]
+ public const int kana_YO;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_kana_YU")]
+ public const int kana_YU;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_kana_a")]
+ public const int kana_a;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_kana_closingbracket")]
+ public const int kana_closingbracket;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_kana_comma")]
+ public const int kana_comma;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_kana_conjunctive")]
+ public const int kana_conjunctive;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_kana_e")]
+ public const int kana_e;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_kana_fullstop")]
+ public const int kana_fullstop;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_kana_i")]
+ public const int kana_i;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_kana_middledot")]
+ public const int kana_middledot;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_kana_o")]
+ public const int kana_o;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_kana_openingbracket")]
+ public const int kana_openingbracket;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_kana_switch")]
+ public const int kana_switch;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_kana_tsu")]
+ public const int kana_tsu;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_kana_tu")]
+ public const int kana_tu;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_kana_u")]
+ public const int kana_u;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_kana_ya")]
+ public const int kana_ya;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_kana_yo")]
+ public const int kana_yo;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_kana_yu")]
+ public const int kana_yu;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_kappa")]
+ public const int kappa;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_kcedilla")]
+ public const int kcedilla;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_kra")]
+ public const int kra;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_l")]
+ public const int l;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_lacute")]
+ public const int lacute;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_latincross")]
+ public const int latincross;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_lbelowdot")]
+ public const int lbelowdot;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_lcaron")]
+ public const int lcaron;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_lcedilla")]
+ public const int lcedilla;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_leftanglebracket")]
+ public const int leftanglebracket;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_leftarrow")]
+ public const int leftarrow;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_leftcaret")]
+ public const int leftcaret;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_leftdoublequotemark")]
+ public const int leftdoublequotemark;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_leftmiddlecurlybrace")]
+ public const int leftmiddlecurlybrace;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_leftopentriangle")]
+ public const int leftopentriangle;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_leftpointer")]
+ public const int leftpointer;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_leftradical")]
+ public const int leftradical;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_leftshoe")]
+ public const int leftshoe;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_leftsinglequotemark")]
+ public const int leftsinglequotemark;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_leftt")]
+ public const int leftt;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_lefttack")]
+ public const int lefttack;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_less")]
+ public const int less;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_lessthanequal")]
+ public const int lessthanequal;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_lf")]
+ public const int lf;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_logicaland")]
+ public const int logicaland;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_logicalor")]
+ public const int logicalor;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_lowleftcorner")]
+ public const int lowleftcorner;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_lowrightcorner")]
+ public const int lowrightcorner;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_lstroke")]
+ public const int lstroke;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_m")]
+ public const int m;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_mabovedot")]
+ public const int mabovedot;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_macron")]
+ public const int macron;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_malesymbol")]
+ public const int malesymbol;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_maltesecross")]
+ public const int maltesecross;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_marker")]
+ public const int marker;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_masculine")]
+ public const int masculine;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_minus")]
+ public const int minus;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_minutes")]
+ public const int minutes;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_mu")]
+ public const int mu;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_multiply")]
+ public const int multiply;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_musicalflat")]
+ public const int musicalflat;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_musicalsharp")]
+ public const int musicalsharp;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_n")]
+ public const int n;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_nabla")]
+ public const int nabla;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_nacute")]
+ public const int nacute;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ncaron")]
+ public const int ncaron;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ncedilla")]
+ public const int ncedilla;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ninesubscript")]
+ public const int ninesubscript;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ninesuperior")]
+ public const int ninesuperior;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_nl")]
+ public const int nl;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_nobreakspace")]
+ public const int nobreakspace;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_notapproxeq")]
+ public const int notapproxeq;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_notelementof")]
+ public const int notelementof;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_notequal")]
+ public const int notequal;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_notidentical")]
+ public const int notidentical;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_notsign")]
+ public const int notsign;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ntilde")]
+ public const int ntilde;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_numbersign")]
+ public const int numbersign;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_numerosign")]
+ public const int numerosign;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_o")]
+ public const int o;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_oacute")]
+ public const int oacute;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_obarred")]
+ public const int obarred;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_obelowdot")]
+ public const int obelowdot;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ocaron")]
+ public const int ocaron;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ocircumflex")]
+ public const int ocircumflex;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ocircumflexacute")]
+ public const int ocircumflexacute;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ocircumflexbelowdot")]
+ public const int ocircumflexbelowdot;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ocircumflexgrave")]
+ public const int ocircumflexgrave;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ocircumflexhook")]
+ public const int ocircumflexhook;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ocircumflextilde")]
+ public const int ocircumflextilde;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_odiaeresis")]
+ public const int odiaeresis;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_odoubleacute")]
+ public const int odoubleacute;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_oe")]
+ public const int oe;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ogonek")]
+ public const int ogonek;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ograve")]
+ public const int ograve;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ohook")]
+ public const int ohook;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ohorn")]
+ public const int ohorn;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ohornacute")]
+ public const int ohornacute;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ohornbelowdot")]
+ public const int ohornbelowdot;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ohorngrave")]
+ public const int ohorngrave;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ohornhook")]
+ public const int ohornhook;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ohorntilde")]
+ public const int ohorntilde;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_omacron")]
+ public const int omacron;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_oneeighth")]
+ public const int oneeighth;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_onefifth")]
+ public const int onefifth;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_onehalf")]
+ public const int onehalf;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_onequarter")]
+ public const int onequarter;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_onesixth")]
+ public const int onesixth;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_onesubscript")]
+ public const int onesubscript;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_onesuperior")]
+ public const int onesuperior;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_onethird")]
+ public const int onethird;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ooblique")]
+ public const int ooblique;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_openrectbullet")]
+ public const int openrectbullet;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_openstar")]
+ public const int openstar;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_opentribulletdown")]
+ public const int opentribulletdown;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_opentribulletup")]
+ public const int opentribulletup;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ordfeminine")]
+ public const int ordfeminine;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_oslash")]
+ public const int oslash;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_otilde")]
+ public const int otilde;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_overbar")]
+ public const int overbar;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_overline")]
+ public const int overline;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_p")]
+ public const int p;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_pabovedot")]
+ public const int pabovedot;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_paragraph")]
+ public const int paragraph;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_parenleft")]
+ public const int parenleft;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_parenright")]
+ public const int parenright;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_partdifferential")]
+ public const int partdifferential;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_partialderivative")]
+ public const int partialderivative;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_percent")]
+ public const int percent;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_period")]
+ public const int period;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_periodcentered")]
+ public const int periodcentered;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_permille")]
+ public const int permille;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_phonographcopyright")]
+ public const int phonographcopyright;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_plus")]
+ public const int plus;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_plusminus")]
+ public const int plusminus;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_prescription")]
+ public const int prescription;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_prolongedsound")]
+ public const int prolongedsound;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_punctspace")]
+ public const int punctspace;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_q")]
+ public const int q;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_quad")]
+ public const int quad;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_question")]
+ public const int question;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_questiondown")]
+ public const int questiondown;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_quotedbl")]
+ public const int quotedbl;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_quoteleft")]
+ public const int quoteleft;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_quoteright")]
+ public const int quoteright;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_r")]
+ public const int r;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_racute")]
+ public const int racute;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_radical")]
+ public const int radical;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_rcaron")]
+ public const int rcaron;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_rcedilla")]
+ public const int rcedilla;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_registered")]
+ public const int registered;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_rightanglebracket")]
+ public const int rightanglebracket;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_rightarrow")]
+ public const int rightarrow;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_rightcaret")]
+ public const int rightcaret;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_rightdoublequotemark")]
+ public const int rightdoublequotemark;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_rightmiddlecurlybrace")]
+ public const int rightmiddlecurlybrace;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_rightmiddlesummation")]
+ public const int rightmiddlesummation;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_rightopentriangle")]
+ public const int rightopentriangle;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_rightpointer")]
+ public const int rightpointer;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_rightshoe")]
+ public const int rightshoe;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_rightsinglequotemark")]
+ public const int rightsinglequotemark;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_rightt")]
+ public const int rightt;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_righttack")]
+ public const int righttack;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_s")]
+ public const int s;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_sabovedot")]
+ public const int sabovedot;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_sacute")]
+ public const int sacute;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_scaron")]
+ public const int scaron;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_scedilla")]
+ public const int scedilla;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_schwa")]
+ public const int schwa;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_scircumflex")]
+ public const int scircumflex;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_script_switch")]
+ public const int script_switch;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_seconds")]
+ public const int seconds;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_section")]
+ public const int section;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_semicolon")]
+ public const int semicolon;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_semivoicedsound")]
+ public const int semivoicedsound;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_seveneighths")]
+ public const int seveneighths;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_sevensubscript")]
+ public const int sevensubscript;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_sevensuperior")]
+ public const int sevensuperior;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_signaturemark")]
+ public const int signaturemark;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_signifblank")]
+ public const int signifblank;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_similarequal")]
+ public const int similarequal;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_singlelowquotemark")]
+ public const int singlelowquotemark;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_sixsubscript")]
+ public const int sixsubscript;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_sixsuperior")]
+ public const int sixsuperior;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_slash")]
+ public const int slash;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_soliddiamond")]
+ public const int soliddiamond;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_space")]
+ public const int space;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_squareroot")]
+ public const int squareroot;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ssharp")]
+ public const int ssharp;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_sterling")]
+ public const int sterling;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_stricteq")]
+ public const int stricteq;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_t")]
+ public const int t;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_tabovedot")]
+ public const int tabovedot;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_tcaron")]
+ public const int tcaron;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_tcedilla")]
+ public const int tcedilla;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_telephone")]
+ public const int telephone;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_telephonerecorder")]
+ public const int telephonerecorder;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_therefore")]
+ public const int therefore;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_thinspace")]
+ public const int thinspace;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_thorn")]
+ public const int thorn;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_threeeighths")]
+ public const int threeeighths;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_threefifths")]
+ public const int threefifths;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_threequarters")]
+ public const int threequarters;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_threesubscript")]
+ public const int threesubscript;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_threesuperior")]
+ public const int threesuperior;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_tintegral")]
+ public const int tintegral;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_topintegral")]
+ public const int topintegral;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_topleftparens")]
+ public const int topleftparens;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_topleftradical")]
+ public const int topleftradical;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_topleftsqbracket")]
+ public const int topleftsqbracket;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_topleftsummation")]
+ public const int topleftsummation;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_toprightparens")]
+ public const int toprightparens;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_toprightsqbracket")]
+ public const int toprightsqbracket;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_toprightsummation")]
+ public const int toprightsummation;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_topt")]
+ public const int topt;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_topvertsummationconnector")]
+ public const int topvertsummationconnector;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_trademark")]
+ public const int trademark;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_trademarkincircle")]
+ public const int trademarkincircle;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_tslash")]
+ public const int tslash;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_twofifths")]
+ public const int twofifths;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_twosubscript")]
+ public const int twosubscript;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_twosuperior")]
+ public const int twosuperior;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_twothirds")]
+ public const int twothirds;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_u")]
+ public const int u;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_uacute")]
+ public const int uacute;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ubelowdot")]
+ public const int ubelowdot;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ubreve")]
+ public const int ubreve;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ucircumflex")]
+ public const int ucircumflex;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_udiaeresis")]
+ public const int udiaeresis;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_udoubleacute")]
+ public const int udoubleacute;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ugrave")]
+ public const int ugrave;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_uhook")]
+ public const int uhook;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_uhorn")]
+ public const int uhorn;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_uhornacute")]
+ public const int uhornacute;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_uhornbelowdot")]
+ public const int uhornbelowdot;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_uhorngrave")]
+ public const int uhorngrave;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_uhornhook")]
+ public const int uhornhook;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_uhorntilde")]
+ public const int uhorntilde;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_umacron")]
+ public const int umacron;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_underbar")]
+ public const int underbar;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_underscore")]
+ public const int underscore;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_union")]
+ public const int union;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_uogonek")]
+ public const int uogonek;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_uparrow")]
+ public const int uparrow;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_upcaret")]
+ public const int upcaret;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_upleftcorner")]
+ public const int upleftcorner;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_uprightcorner")]
+ public const int uprightcorner;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_upshoe")]
+ public const int upshoe;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_upstile")]
+ public const int upstile;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_uptack")]
+ public const int uptack;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_uring")]
+ public const int uring;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_utilde")]
+ public const int utilde;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_v")]
+ public const int v;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_variation")]
+ public const int variation;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_vertbar")]
+ public const int vertbar;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_vertconnector")]
+ public const int vertconnector;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_voicedsound")]
+ public const int voicedsound;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_vt")]
+ public const int vt;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_w")]
+ public const int w;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_wacute")]
+ public const int wacute;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_wcircumflex")]
+ public const int wcircumflex;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_wdiaeresis")]
+ public const int wdiaeresis;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_wgrave")]
+ public const int wgrave;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_x")]
+ public const int x;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_xabovedot")]
+ public const int xabovedot;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_y")]
+ public const int y;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_yacute")]
+ public const int yacute;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ybelowdot")]
+ public const int ybelowdot;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ycircumflex")]
+ public const int ycircumflex;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ydiaeresis")]
+ public const int ydiaeresis;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_yen")]
+ public const int yen;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ygrave")]
+ public const int ygrave;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_yhook")]
+ public const int yhook;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_ytilde")]
+ public const int ytilde;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_z")]
+ public const int z;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_zabovedot")]
+ public const int zabovedot;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_zacute")]
+ public const int zacute;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_zcaron")]
+ public const int zcaron;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_zerosubscript")]
+ public const int zerosubscript;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_zerosuperior")]
+ public const int zerosuperior;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_KEY_zstroke")]
+ public const int zstroke;
+ }
+ namespace Threads {
+ namespace FrameSource {
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "clutter_threads_add_frame_source")]
+ [Deprecated (since = "1.6")]
+ public static uint add (uint fps, GLib.SourceFunc func);
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "clutter_threads_add_frame_source_full")]
+ [Deprecated (since = "1.6")]
+ public static uint add_full (int priority, uint fps, owned GLib.SourceFunc func);
+ }
+ namespace Idle {
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "clutter_threads_add_idle")]
+ public static uint add (GLib.SourceFunc func);
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "clutter_threads_add_idle_full")]
+ public static uint add_full (int priority, owned GLib.SourceFunc func);
+ }
+ namespace Timeout {
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "clutter_threads_add_timeout")]
+ public static uint add (uint interval, GLib.SourceFunc func);
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "clutter_threads_add_timeout_full")]
+ public static uint add_full (int priority, uint interval, owned GLib.SourceFunc func);
+ }
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ public static uint add_repaint_func (owned GLib.SourceFunc func);
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ public static uint add_repaint_func_full (Clutter.RepaintFlags flags, owned GLib.SourceFunc func);
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ [Deprecated (since = "1.12")]
+ public static void enter ();
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ [Deprecated (since = "1.10")]
+ public static void init ();
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ [Deprecated (since = "1.12")]
+ public static void leave ();
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ public static void remove_repaint_func (uint handle_id);
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ public static void set_lock_functions (GLib.Callback enter_fn, GLib.Callback leave_fn);
+ }
+ namespace Util {
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "clutter_util_next_p2")]
+ [Deprecated (since = "1.2")]
+ public static int next_power_of_2 (int a);
+ }
+ namespace Value {
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ public static Clutter.PaintNode dup_paint_node (GLib.Value value);
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ public static unowned Clutter.Color? get_color (GLib.Value value);
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ [Deprecated (since = "1.10")]
+ public static unowned Cogl.Fixed? get_fixed (GLib.Value value);
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ public static unowned Clutter.PaintNode get_paint_node (GLib.Value value);
+ [CCode (array_length_pos = 1.1, array_length_type = "gsize", cheader_filename = "clutter/clutter.h")]
+ public static unowned float[] get_shader_float (GLib.Value value);
+ [CCode (array_length_pos = 1.1, array_length_type = "gsize", cheader_filename = "clutter/clutter.h")]
+ public static unowned int[] get_shader_int (GLib.Value value);
+ [CCode (array_length_pos = 1.1, array_length_type = "gsize", cheader_filename = "clutter/clutter.h")]
+ public static unowned float[] get_shader_matrix (GLib.Value value);
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ public static unowned Clutter.Units? get_units (GLib.Value value);
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ public static void set_color (GLib.Value value, Clutter.Color color);
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ [Deprecated (since = "1.10")]
+ public static void set_fixed (GLib.Value value, Cogl.Fixed fixed_);
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ public static void set_paint_node (GLib.Value value, Clutter.PaintNode? node);
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ public static void set_shader_float (GLib.Value value, [CCode (array_length_cname = "size", array_length_pos = 1.5)] float[] floats);
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ public static void set_shader_int (GLib.Value value, [CCode (array_length_cname = "size", array_length_pos = 1.5)] int[] ints);
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ public static void set_shader_matrix (GLib.Value value, [CCode (array_length_cname = "size", array_length_pos = 1.5)] float[] matrix);
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ public static void set_units (GLib.Value value, Clutter.Units units);
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ public static void take_paint_node (GLib.Value value, Clutter.PaintNode? node);
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_action_get_type ()")]
+ public abstract class Action : Clutter.ActorMeta {
+ [CCode (has_construct_function = false)]
+ protected Action ();
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_actor_get_type ()")]
+ public class Actor : GLib.InitiallyUnowned, Atk.Implementor, Clutter.Animatable, Clutter.Container, Clutter.Scriptable {
+ public uint32 flags;
+ [CCode (has_construct_function = false)]
+ public Actor ();
+ public void add_action (Clutter.Action action);
+ public void add_action_with_name (string name, Clutter.Action action);
+ public void add_child (Clutter.Actor child);
+ public void add_constraint (Clutter.Constraint constraint);
+ public void add_constraint_with_name (string name, Clutter.Constraint constraint);
+ public void add_effect (Clutter.Effect effect);
+ public void add_effect_with_name (string name, Clutter.Effect effect);
+ public void add_transition (string name, Clutter.Transition transition);
+ public virtual void allocate (Clutter.ActorBox box, Clutter.AllocationFlags flags);
+ public void allocate_align_fill (Clutter.ActorBox box, double x_align, double y_align, bool x_fill, bool y_fill, Clutter.AllocationFlags flags);
+ public void allocate_available_size (float x, float y, float available_width, float available_height, Clutter.AllocationFlags flags);
+ public void allocate_preferred_size (Clutter.AllocationFlags flags);
+ [Deprecated (since = "1.12")]
+ public unowned Clutter.Animation animate (ulong mode, uint duration, ...);
+ [Deprecated (since = "1.10")]
+ public unowned Clutter.Animation animate_with_alpha (Clutter.Alpha alpha, ...);
+ [Deprecated (since = "1.10")]
+ public unowned Clutter.Animation animate_with_alphav (Clutter.Alpha alpha, [CCode (array_length_cname = "n_properties", array_length_pos = 1.5)] string[] properties, [CCode (array_length_cname = "n_properties", array_length_pos = 1.5)] GLib.Value[] values);
+ [Deprecated (since = "1.12")]
+ public unowned Clutter.Animation animate_with_timeline (ulong mode, Clutter.Timeline timeline, ...);
+ [Deprecated (since = "1.12")]
+ public unowned Clutter.Animation animate_with_timelinev (ulong mode, Clutter.Timeline timeline, [CCode (array_length_cname = "n_properties", array_length_pos = 2.5)] string[] properties, [CCode (array_length_cname = "n_properties", array_length_pos = 2.5)] GLib.Value[] values);
+ [Deprecated (since = "1.12")]
+ public unowned Clutter.Animation animatev (ulong mode, uint duration, [CCode (array_length_cname = "n_properties", array_length_pos = 2.5)] string[] properties, [CCode (array_length_cname = "n_properties", array_length_pos = 2.5)] GLib.Value[] values);
+ public Clutter.Vertex apply_relative_transform_to_point (Clutter.Actor? ancestor, Clutter.Vertex point);
+ [NoWrapper]
+ public virtual void apply_transform (ref Clutter.Matrix matrix);
+ public Clutter.Vertex apply_transform_to_point (Clutter.Vertex point);
+ public void bind_model (GLib.ListModel model, owned Clutter.ActorCreateChildFunc create_child_func);
+ public void clear_actions ();
+ public void clear_constraints ();
+ public void clear_effects ();
+ public bool contains (Clutter.Actor descendant);
+ public void continue_paint ();
+ public Pango.Context create_pango_context ();
+ public Pango.Layout create_pango_layout (string? text);
+ public void destroy_all_children ();
+ [Deprecated (since = "1.12")]
+ public void detach_animation ();
+ [CCode (cname = "clutter_actor_event")]
+ public bool emit_event (Clutter.Event event, bool capture);
+ public void get_abs_allocation_vertices ([CCode (array_length = false)] Clutter.Vertex[] verts);
+ public virtual unowned Atk.Object get_accessible ();
+ public unowned Clutter.Action get_action (string name);
+ public GLib.List<weak Clutter.Action> get_actions ();
+ public Clutter.ActorBox get_allocation_box ();
+ [Deprecated (since = "1.12")]
+ public Clutter.Geometry get_allocation_geometry ();
+ public void get_allocation_vertices (Clutter.Actor? ancestor, [CCode (array_length = false)] Clutter.Vertex[] verts);
+ [Deprecated (since = "1.12")]
+ public void get_anchor_point (out float anchor_x, out float anchor_y);
+ [Deprecated (since = "1.12")]
+ public Clutter.Gravity get_anchor_point_gravity ();
+ [Deprecated (since = "1.12")]
+ public unowned Clutter.Animation get_animation ();
+ public Clutter.Color get_background_color ();
+ [CCode (cname = "clutter_get_actor_by_gid")]
+ [Deprecated (since = "1.8")]
+ public static unowned Clutter.Actor get_by_gid (uint32 id_);
+ public unowned Clutter.Actor get_child_at_index (int index_);
+ public Clutter.Matrix get_child_transform ();
+ public GLib.List<weak Clutter.Actor> get_children ();
+ public void get_clip (out float xoff, out float yoff, out float width, out float height);
+ public bool get_clip_to_allocation ();
+ public unowned Clutter.Constraint get_constraint (string name);
+ public GLib.List<weak Clutter.Constraint> get_constraints ();
+ public unowned Clutter.Content get_content ();
+ public Clutter.ActorBox get_content_box ();
+ public Clutter.ContentGravity get_content_gravity ();
+ public Clutter.ContentRepeat get_content_repeat ();
+ public void get_content_scaling_filters (out Clutter.ScalingFilter min_filter, out Clutter.ScalingFilter mag_filter);
+ public unowned Clutter.PaintVolume get_default_paint_volume ();
+ [Deprecated (since = "1.12")]
+ public float get_depth ();
+ public uint get_easing_delay ();
+ public uint get_easing_duration ();
+ public Clutter.AnimationMode get_easing_mode ();
+ public unowned Clutter.Effect get_effect (string name);
+ public GLib.List<weak Clutter.Effect> get_effects ();
+ public unowned Clutter.Actor get_first_child ();
+ public bool get_fixed_position_set ();
+ public Clutter.ActorFlags get_flags ();
+ [Deprecated (since = "1.10")]
+ public Clutter.Geometry get_geometry ();
+ [Deprecated (since = "1.8")]
+ public uint32 get_gid ();
+ [CCode (cname = "clutter_actor_has_pointer")]
+ public bool get_has_pointer ();
+ public float get_height ();
+ public unowned Clutter.Actor get_last_child ();
+ public unowned Clutter.LayoutManager get_layout_manager ();
+ public void get_margin (Clutter.Margin margin);
+ public float get_margin_bottom ();
+ public float get_margin_left ();
+ public float get_margin_right ();
+ public float get_margin_top ();
+ public int get_n_children ();
+ public unowned string get_name ();
+ public unowned Clutter.Actor get_next_sibling ();
+ public Clutter.OffscreenRedirect get_offscreen_redirect ();
+ public uint8 get_opacity ();
+ public bool get_paint_box (out Clutter.ActorBox box);
+ public uint8 get_paint_opacity ();
+ public bool get_paint_visibility ();
+ [NoWrapper]
+ public virtual bool get_paint_volume (Clutter.PaintVolume volume);
+ public unowned Pango.Context get_pango_context ();
+ public unowned Clutter.Actor? get_parent ();
+ public void get_pivot_point (out float pivot_x, out float pivot_y);
+ public float get_pivot_point_z ();
+ public void get_position (out float x, out float y);
+ public virtual void get_preferred_height (float for_width, out float min_height_p, out float natural_height_p);
+ public void get_preferred_size (out float min_width_p, out float min_height_p, out float natural_width_p, out float natural_height_p);
+ public virtual void get_preferred_width (float for_height, out float min_width_p, out float natural_width_p);
+ public unowned Clutter.Actor get_previous_sibling ();
+ public bool get_reactive ();
+ public Clutter.RequestMode get_request_mode ();
+ [Deprecated (since = "1.12")]
+ public double get_rotation (Clutter.RotateAxis axis, out float x, out float y, out float z);
+ public double get_rotation_angle (Clutter.RotateAxis axis);
+ public void get_scale (out double scale_x, out double scale_y);
+ [Deprecated (since = "1.12")]
+ public void get_scale_center (out float center_x, out float center_y);
+ [Deprecated (since = "1.12")]
+ public Clutter.Gravity get_scale_gravity ();
+ public double get_scale_z ();
+ [Deprecated (since = "1.8")]
+ public unowned Clutter.Shader get_shader ();
+ public void get_size (out float width, out float height);
+ public unowned Clutter.Stage get_stage ();
+ public Clutter.TextDirection get_text_direction ();
+ public Clutter.Matrix get_transform ();
+ [Deprecated (since = "1.12")]
+ public Clutter.Matrix get_transformation_matrix ();
+ public unowned Clutter.PaintVolume get_transformed_paint_volume (Clutter.Actor relative_to_ancestor);
+ public void get_transformed_position (out float x, out float y);
+ public void get_transformed_size (out float width, out float height);
+ public unowned Clutter.Transition get_transition (string name);
+ public void get_translation (out float translate_x, out float translate_y, out float translate_z);
+ public float get_width ();
+ public float get_x ();
+ public Clutter.ActorAlign get_x_align ();
+ public bool get_x_expand ();
+ public float get_y ();
+ public Clutter.ActorAlign get_y_align ();
+ public bool get_y_expand ();
+ public float get_z_position ();
+ [Deprecated (since = "1.12")]
+ public Clutter.Gravity get_z_rotation_gravity ();
+ public void grab_key_focus ();
+ public bool has_actions ();
+ public bool has_allocation ();
+ public bool has_constraints ();
+ public bool has_effects ();
+ public bool has_key_focus ();
+ public virtual bool has_overlaps ();
+ [Deprecated (since = "1.10")]
+ public virtual void hide_all ();
+ public void insert_child_above (Clutter.Actor child, Clutter.Actor? sibling);
+ public void insert_child_at_index (Clutter.Actor child, int index_);
+ public void insert_child_below (Clutter.Actor child, Clutter.Actor? sibling);
+ public bool is_in_clone_paint ();
+ public bool is_mapped ();
+ public bool is_realized ();
+ public bool is_rotated ();
+ public bool is_scaled ();
+ public bool is_visible ();
+ [Deprecated (since = "1.10")]
+ public void lower (Clutter.Actor? above);
+ [Deprecated (since = "1.10")]
+ public void lower_bottom ();
+ public virtual void map ();
+ [Deprecated (since = "1.12")]
+ public void move_anchor_point (float anchor_x, float anchor_y);
+ [Deprecated (since = "1.12")]
+ public void move_anchor_point_from_gravity (Clutter.Gravity gravity);
+ public void move_by (float dx, float dy);
+ public bool needs_expand (Clutter.Orientation orientation);
+ [NoWrapper]
+ public virtual void paint_node (Clutter.PaintNode root);
+ [Deprecated (since = "1.10")]
+ public void pop_internal ();
+ [Deprecated (since = "1.10")]
+ public void push_internal ();
+ public void queue_redraw ();
+ public void queue_redraw_with_clip (Cairo.RectangleInt? clip);
+ [Deprecated (since = "1.10")]
+ public void raise (Clutter.Actor? below);
+ [Deprecated (since = "1.10")]
+ public void raise_top ();
+ public void remove_action (Clutter.Action action);
+ public void remove_action_by_name (string name);
+ public void remove_all_children ();
+ public void remove_all_transitions ();
+ public void remove_child (Clutter.Actor child);
+ public void remove_clip ();
+ public void remove_constraint (Clutter.Constraint constraint);
+ public void remove_constraint_by_name (string name);
+ public void remove_effect (Clutter.Effect effect);
+ public void remove_effect_by_name (string name);
+ public void remove_transition (string name);
+ [Deprecated (since = "1.10")]
+ public void reparent (Clutter.Actor new_parent);
+ public void replace_child (Clutter.Actor old_child, Clutter.Actor new_child);
+ public void restore_easing_state ();
+ public void save_easing_state ();
+ public void set_allocation (Clutter.ActorBox box, Clutter.AllocationFlags flags);
+ [Deprecated (since = "1.12")]
+ public void set_anchor_point (float anchor_x, float anchor_y);
+ [Deprecated (since = "1.12")]
+ public void set_anchor_point_from_gravity (Clutter.Gravity gravity);
+ public void set_background_color (Clutter.Color? color);
+ public void set_child_above_sibling (Clutter.Actor child, Clutter.Actor? sibling);
+ public void set_child_at_index (Clutter.Actor child, int index_);
+ public void set_child_below_sibling (Clutter.Actor child, Clutter.Actor? sibling);
+ public void set_child_transform (Clutter.Matrix? transform);
+ public void set_clip (float xoff, float yoff, float width, float height);
+ public void set_clip_to_allocation (bool clip_set);
+ public void set_content (Clutter.Content? content);
+ public void set_content_gravity (Clutter.ContentGravity gravity);
+ public void set_content_repeat (Clutter.ContentRepeat repeat);
+ public void set_content_scaling_filters (Clutter.ScalingFilter min_filter, Clutter.ScalingFilter mag_filter);
+ [Deprecated (since = "1.12")]
+ public void set_depth (float depth);
+ public void set_easing_delay (uint msecs);
+ public void set_easing_duration (uint msecs);
+ public void set_easing_mode (Clutter.AnimationMode mode);
+ public void set_fixed_position_set (bool is_set);
+ public void set_flags (Clutter.ActorFlags flags);
+ [Deprecated (since = "1.10")]
+ public void set_geometry (Clutter.Geometry geometry);
+ public void set_height (float height);
+ public void set_layout_manager (Clutter.LayoutManager? manager);
+ public void set_margin (Clutter.Margin margin);
+ public void set_margin_bottom (float margin);
+ public void set_margin_left (float margin);
+ public void set_margin_right (float margin);
+ public void set_margin_top (float margin);
+ public void set_name (string name);
+ public void set_offscreen_redirect (Clutter.OffscreenRedirect redirect);
+ public void set_opacity (uint8 opacity);
+ [Deprecated (since = "1.10")]
+ public void set_parent (Clutter.Actor parent);
+ public void set_pivot_point (float pivot_x, float pivot_y);
+ public void set_pivot_point_z (float pivot_z);
+ public void set_position (float x, float y);
+ public void set_reactive (bool reactive);
+ public void set_request_mode (Clutter.RequestMode mode);
+ [Deprecated (since = "1.12")]
+ public void set_rotation (Clutter.RotateAxis axis, double angle, float x, float y, float z);
+ public void set_rotation_angle (Clutter.RotateAxis axis, double angle);
+ public void set_scale (double scale_x, double scale_y);
+ [Deprecated (since = "1.12")]
+ public void set_scale_full (double scale_x, double scale_y, float center_x, float center_y);
+ [Deprecated (since = "1.12")]
+ public void set_scale_with_gravity (double scale_x, double scale_y, Clutter.Gravity gravity);
+ public void set_scale_z (double scale_z);
+ [Deprecated (since = "1.8")]
+ public bool set_shader (Clutter.Shader? shader);
+ [Deprecated (since = "1.8")]
+ public void set_shader_param (string param, GLib.Value value);
+ [Deprecated (since = "1.8")]
+ public void set_shader_param_float (string param, float value);
+ [Deprecated (since = "1.8")]
+ public void set_shader_param_int (string param, int value);
+ public void set_size (float width, float height);
+ public void set_text_direction (Clutter.TextDirection text_dir);
+ public void set_transform (Clutter.Matrix? transform);
+ public void set_translation (float translate_x, float translate_y, float translate_z);
+ public void set_width (float width);
+ public void set_x (float x);
+ public void set_x_align (Clutter.ActorAlign x_align);
+ public void set_x_expand (bool expand);
+ public void set_y (float y);
+ public void set_y_align (Clutter.ActorAlign y_align);
+ public void set_y_expand (bool expand);
+ public void set_z_position (float z_position);
+ [Deprecated (since = "1.12")]
+ public void set_z_rotation_from_gravity (double angle, Clutter.Gravity gravity);
+ public bool should_pick_paint ();
+ [Deprecated (since = "1.10")]
+ public virtual void show_all ();
+ public bool transform_stage_point (float x, float y, out float x_out, out float y_out);
+ public virtual void unmap ();
+ [Deprecated (since = "1.10")]
+ public void unparent ();
+ public void unset_flags (Clutter.ActorFlags flags);
+ [NoAccessorMethod]
+ public Clutter.Action actions { set; }
+ [NoAccessorMethod]
+ public Clutter.ActorBox allocation { get; }
+ [Deprecated (since = "1.12")]
+ [NoAccessorMethod]
+ public Clutter.Gravity anchor_gravity { get; set; }
+ [Deprecated (since = "1.12")]
+ [NoAccessorMethod]
+ public float anchor_x { get; set; }
+ [Deprecated (since = "1.12")]
+ [NoAccessorMethod]
+ public float anchor_y { get; set; }
+ public Clutter.Color background_color { get; set; }
+ [NoAccessorMethod]
+ public bool background_color_set { get; }
+ [NoAccessorMethod]
+ public bool child_transform_set { get; }
+ [Deprecated (since = "1.12")]
+ [NoAccessorMethod]
+ public Clutter.Geometry clip { get; set; }
+ [NoAccessorMethod]
+ public Clutter.Rect clip_rect { owned get; set; }
+ public bool clip_to_allocation { get; set; }
+ [NoAccessorMethod]
+ public Clutter.Constraint constraints { set; }
+ public Clutter.Content content { get; set; }
+ public Clutter.ActorBox content_box { get; }
+ public Clutter.ContentGravity content_gravity { get; set; }
+ public Clutter.ContentRepeat content_repeat { get; set; }
+ [Deprecated (since = "1.12")]
+ public float depth { get; set; }
+ [NoAccessorMethod]
+ public Clutter.Effect effect { set; }
+ public Clutter.Actor first_child { get; }
+ public bool fixed_position_set { get; set; }
+ [NoAccessorMethod]
+ public float fixed_x { get; set; }
+ [NoAccessorMethod]
+ public float fixed_y { get; set; }
+ [NoAccessorMethod]
+ public bool has_clip { get; }
+ [NoAccessorMethod]
+ public bool has_pointer { get; }
+ public float height { get; set; }
+ public Clutter.Actor last_child { get; }
+ public Clutter.LayoutManager layout_manager { get; set; }
+ [NoAccessorMethod]
+ public Clutter.ScalingFilter magnification_filter { get; set; }
+ [NoAccessorMethod]
+ public bool mapped { get; }
+ public float margin_bottom { get; set; }
+ public float margin_left { get; set; }
+ public float margin_right { get; set; }
+ public float margin_top { get; set; }
+ [NoAccessorMethod]
+ public float min_height { get; set; }
+ [NoAccessorMethod]
+ public bool min_height_set { get; set; }
+ [NoAccessorMethod]
+ public float min_width { get; set; }
+ [NoAccessorMethod]
+ public bool min_width_set { get; set; }
+ [NoAccessorMethod]
+ public Clutter.ScalingFilter minification_filter { get; set; }
+ public string name { get; set; }
+ [NoAccessorMethod]
+ public float natural_height { get; set; }
+ [NoAccessorMethod]
+ public bool natural_height_set { get; set; }
+ [NoAccessorMethod]
+ public float natural_width { get; set; }
+ [NoAccessorMethod]
+ public bool natural_width_set { get; set; }
+ public Clutter.OffscreenRedirect offscreen_redirect { get; set; }
+ public uint opacity { get; set; }
+ [NoAccessorMethod]
+ public Clutter.Point pivot_point { owned get; set; }
+ public float pivot_point_z { get; set; }
+ [NoAccessorMethod]
+ public Clutter.Point position { owned get; set; }
+ public bool reactive { get; set; }
+ [NoAccessorMethod]
+ public bool realized { get; }
+ public Clutter.RequestMode request_mode { get; set; }
+ [NoAccessorMethod]
+ public double rotation_angle_x { get; set; }
+ [NoAccessorMethod]
+ public double rotation_angle_y { get; set; }
+ [NoAccessorMethod]
+ public double rotation_angle_z { get; set; }
+ [Deprecated (since = "1.12")]
+ [NoAccessorMethod]
+ public Clutter.Vertex rotation_center_x { get; set; }
+ [Deprecated (since = "1.12")]
+ [NoAccessorMethod]
+ public Clutter.Vertex rotation_center_y { get; set; }
+ [Deprecated (since = "1.12")]
+ [NoAccessorMethod]
+ public Clutter.Vertex rotation_center_z { get; set; }
+ [Deprecated (since = "1.12")]
+ [NoAccessorMethod]
+ public Clutter.Gravity rotation_center_z_gravity { get; set; }
+ [Deprecated (since = "1.12")]
+ [NoAccessorMethod]
+ public float scale_center_x { get; set; }
+ [Deprecated (since = "1.12")]
+ [NoAccessorMethod]
+ public float scale_center_y { get; set; }
+ [Deprecated (since = "1.12")]
+ [NoAccessorMethod]
+ public Clutter.Gravity scale_gravity { get; set; }
+ [NoAccessorMethod]
+ public double scale_x { get; set; }
+ [NoAccessorMethod]
+ public double scale_y { get; set; }
+ public double scale_z { get; set; }
+ [NoAccessorMethod]
+ public bool show_on_set_parent { get; set; }
+ [NoAccessorMethod]
+ public Clutter.Size size { owned get; set; }
+ public Clutter.TextDirection text_direction { get; set; }
+ [NoAccessorMethod]
+ public bool transform_set { get; }
+ [NoAccessorMethod]
+ public float translation_x { get; set; }
+ [NoAccessorMethod]
+ public float translation_y { get; set; }
+ [NoAccessorMethod]
+ public float translation_z { get; set; }
+ [NoAccessorMethod]
+ public bool visible { get; set; }
+ public float width { get; set; }
+ public float x { get; set; }
+ public Clutter.ActorAlign x_align { get; set; }
+ public bool x_expand { get; set; }
+ public float y { get; set; }
+ public Clutter.ActorAlign y_align { get; set; }
+ public bool y_expand { get; set; }
+ public float z_position { get; set; }
+ public signal void allocation_changed (Clutter.ActorBox box, Clutter.AllocationFlags flags);
+ public virtual signal bool button_press_event (Clutter.ButtonEvent event);
+ public virtual signal bool button_release_event (Clutter.ButtonEvent event);
+ public virtual signal bool captured_event (Clutter.Event event);
+ [HasEmitter]
+ public virtual signal void destroy ();
+ public virtual signal bool enter_event (Clutter.CrossingEvent event);
+ public virtual signal bool event (Clutter.Event event);
+ [HasEmitter]
+ public virtual signal void hide ();
+ public virtual signal void key_focus_in ();
+ public virtual signal void key_focus_out ();
+ public virtual signal bool key_press_event (Clutter.KeyEvent event);
+ public virtual signal bool key_release_event (Clutter.KeyEvent event);
+ public virtual signal bool leave_event (Clutter.CrossingEvent event);
+ public virtual signal bool motion_event (Clutter.MotionEvent event);
+ [Deprecated (since = "1.12")]
+ [HasEmitter]
+ public virtual signal void paint ();
+ public virtual signal void parent_set (Clutter.Actor? old_parent);
+ [Deprecated (since = "1.12")]
+ public virtual signal void pick (Clutter.Color color);
+ [HasEmitter]
+ public virtual signal void queue_relayout ();
+ [Deprecated (since = "1.16")]
+ [HasEmitter]
+ public virtual signal void realize ();
+ public virtual signal bool scroll_event (Clutter.ScrollEvent event);
+ [HasEmitter]
+ public virtual signal void show ();
+ public virtual signal bool touch_event (Clutter.Event event);
+ public signal void transition_stopped (string name, bool is_finished);
+ public signal void transitions_completed ();
+ [Deprecated (since = "1.16")]
+ [HasEmitter]
+ public virtual signal void unrealize ();
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_actor_meta_get_type ()")]
+ public abstract class ActorMeta : GLib.InitiallyUnowned {
+ [CCode (has_construct_function = false)]
+ protected ActorMeta ();
+ public unowned Clutter.Actor get_actor ();
+ public bool get_enabled ();
+ public unowned string get_name ();
+ [NoWrapper]
+ public virtual void set_actor (Clutter.Actor? actor);
+ public void set_enabled (bool is_enabled);
+ public void set_name (string name);
+ public Clutter.Actor actor { get; }
+ public bool enabled { get; set; }
+ public string name { get; set; }
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_align_constraint_get_type ()")]
+ public class AlignConstraint : Clutter.Constraint {
+ [CCode (has_construct_function = false, type = "ClutterConstraint*")]
+ public AlignConstraint (Clutter.Actor? source, Clutter.AlignAxis axis, float factor);
+ public Clutter.AlignAxis get_align_axis ();
+ public float get_factor ();
+ public unowned Clutter.Actor get_source ();
+ public void set_align_axis (Clutter.AlignAxis axis);
+ public void set_factor (float factor);
+ public void set_source (Clutter.Actor? source);
+ public Clutter.AlignAxis align_axis { get; set construct; }
+ public float factor { get; set construct; }
+ public Clutter.Actor source { get; set construct; }
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_alpha_get_type ()")]
+ [Deprecated (since = "1.12")]
+ public class Alpha : GLib.InitiallyUnowned, Clutter.Scriptable {
+ [CCode (has_construct_function = false)]
+ public Alpha ();
+ [CCode (has_construct_function = false)]
+ public Alpha.full (Clutter.Timeline timeline, ulong mode);
+ public double get_alpha ();
+ public ulong get_mode ();
+ public unowned Clutter.Timeline get_timeline ();
+ public static ulong register_closure (GLib.Closure closure);
+ public static ulong register_func (Clutter.AlphaFunc func);
+ public void set_closure (GLib.Closure closure);
+ public void set_func (owned Clutter.AlphaFunc func);
+ public void set_mode (ulong mode);
+ public void set_timeline (Clutter.Timeline timeline);
+ [CCode (has_construct_function = false)]
+ public Alpha.with_func (Clutter.Timeline timeline, owned Clutter.AlphaFunc func);
+ public double alpha { get; }
+ public ulong mode { get; set construct; }
+ public Clutter.Timeline timeline { get; set; }
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_animation_get_type ()")]
+ [Deprecated (since = "1.12")]
+ public class Animation : GLib.Object, Clutter.Scriptable {
+ [CCode (has_construct_function = false)]
+ public Animation ();
+ public unowned Clutter.Animation bind (string property_name, GLib.Value final);
+ public unowned Clutter.Animation bind_interval (string property_name, owned Clutter.Interval interval);
+ [Deprecated (since = "1.10")]
+ public unowned Clutter.Alpha get_alpha ();
+ public uint get_duration ();
+ public unowned Clutter.Interval get_interval (string property_name);
+ public bool get_loop ();
+ public ulong get_mode ();
+ public unowned GLib.Object get_object ();
+ public unowned Clutter.Timeline get_timeline ();
+ public bool has_property (string property_name);
+ [Deprecated (since = "1.10")]
+ public void set_alpha (Clutter.Alpha alpha);
+ public void set_duration (uint msecs);
+ public void set_loop (bool loop);
+ public void set_mode (ulong mode);
+ public void set_object (GLib.Object object);
+ public void set_timeline (Clutter.Timeline? timeline);
+ public void unbind_property (string property_name);
+ public unowned Clutter.Animation update (string property_name, GLib.Value final);
+ public void update_interval (string property_name, Clutter.Interval interval);
+ [Deprecated (since = "1.10")]
+ public Clutter.Alpha alpha { get; set; }
+ public uint duration { get; set; }
+ public bool loop { get; set; }
+ public ulong mode { get; set; }
+ public GLib.Object object { get; set; }
+ public Clutter.Timeline timeline { get; set; }
+ [HasEmitter]
+ public virtual signal void completed ();
+ public virtual signal void started ();
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_animator_get_type ()")]
+ [Deprecated (since = "1.12")]
+ public class Animator : GLib.Object, Clutter.Scriptable {
+ [CCode (has_construct_function = false)]
+ public Animator ();
+ public bool compute_value (GLib.Object object, string property_name, double progress, GLib.Value value);
+ public uint get_duration ();
+ public GLib.List<weak Clutter.AnimatorKey> get_keys (GLib.Object? object, string? property_name, double progress);
+ public unowned Clutter.Timeline get_timeline ();
+ public bool property_get_ease_in (GLib.Object object, string property_name);
+ public Clutter.Interpolation property_get_interpolation (GLib.Object object, string property_name);
+ public void property_set_ease_in (GLib.Object object, string property_name, bool ease_in);
+ public void property_set_interpolation (GLib.Object object, string property_name, Clutter.Interpolation interpolation);
+ public void remove_key (GLib.Object? object, string? property_name, double progress);
+ public void @set (void* first_object, string first_property_name, uint first_mode, ...);
+ public void set_duration (uint duration);
+ public unowned Clutter.Animator set_key (GLib.Object object, string property_name, uint mode, double progress, GLib.Value value);
+ public void set_timeline (Clutter.Timeline timeline);
+ public unowned Clutter.Timeline start ();
+ public uint duration { get; set; }
+ public Clutter.Timeline timeline { get; set; }
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "clutter_animator_key_get_type ()")]
+ [Compact]
+ [Deprecated (since = "1.12")]
+ public class AnimatorKey {
+ public ulong get_mode ();
+ public unowned GLib.Object get_object ();
+ public double get_progress ();
+ public unowned string get_property_name ();
+ public GLib.Type get_property_type ();
+ public bool get_value (GLib.Value value);
+ }
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ public class Backend : GLib.Object {
+ [CCode (has_construct_function = false)]
+ protected Backend ();
+ [NoWrapper]
+ public virtual void add_options (GLib.OptionGroup group);
+ [NoWrapper]
+ public virtual bool create_context () throws GLib.Error;
+ [NoWrapper]
+ public virtual unowned Clutter.StageWindow create_stage (Clutter.Stage wrapper) throws GLib.Error;
+ [NoWrapper]
+ public virtual void ensure_context (Clutter.Stage stage);
+ [NoWrapper]
+ public virtual unowned Clutter.DeviceManager get_device_manager ();
+ [Deprecated (since = "1.4")]
+ public uint get_double_click_distance ();
+ [Deprecated (since = "1.4")]
+ public uint get_double_click_time ();
+ [NoWrapper]
+ public virtual Clutter.FeatureFlags get_features ();
+ [Deprecated (since = "1.4")]
+ public unowned string get_font_name ();
+ public unowned Cairo.FontOptions get_font_options ();
+ public double get_resolution ();
+ [NoWrapper]
+ public virtual void init_events ();
+ [NoWrapper]
+ public virtual void init_features ();
+ [NoWrapper]
+ public virtual bool post_parse () throws GLib.Error;
+ [NoWrapper]
+ public virtual bool pre_parse () throws GLib.Error;
+ [NoWrapper]
+ public virtual void redraw (Clutter.Stage stage);
+ [Deprecated (since = "1.4")]
+ public void set_double_click_distance (uint distance);
+ [Deprecated (since = "1.4")]
+ public void set_double_click_time (uint msec);
+ [Deprecated (since = "1.4")]
+ public void set_font_name (string font_name);
+ public void set_font_options (Cairo.FontOptions options);
+ [Deprecated (since = "1.4")]
+ public void set_resolution (double dpi);
+ public signal void font_changed ();
+ public signal void resolution_changed ();
+ public signal void settings_changed ();
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_behaviour_get_type ()")]
+ [Deprecated (since = "1.6")]
+ public abstract class Behaviour : GLib.Object, Clutter.Scriptable {
+ [CCode (has_construct_function = false)]
+ protected Behaviour ();
+ public void actors_foreach (Clutter.BehaviourForeachFunc func);
+ [NoWrapper]
+ public virtual void alpha_notify (double alpha_value);
+ public void apply (Clutter.Actor actor);
+ public GLib.SList<weak Clutter.Actor> get_actors ();
+ public unowned Clutter.Alpha get_alpha ();
+ public int get_n_actors ();
+ public unowned Clutter.Actor get_nth_actor (int index_);
+ public bool is_applied (Clutter.Actor actor);
+ public void remove (Clutter.Actor actor);
+ public void remove_all ();
+ public void set_alpha (Clutter.Alpha alpha);
+ public Clutter.Alpha alpha { get; set; }
+ public virtual signal void applied (Clutter.Actor actor);
+ public virtual signal void removed (Clutter.Actor actor);
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_behaviour_depth_get_type ()")]
+ [Deprecated (since = "1.6")]
+ public class BehaviourDepth : Clutter.Behaviour, Clutter.Scriptable {
+ [CCode (has_construct_function = false, type = "ClutterBehaviour*")]
+ public BehaviourDepth (Clutter.Alpha? alpha, int depth_start, int depth_end);
+ public void get_bounds (out int depth_start, out int depth_end);
+ public void set_bounds (int depth_start, int depth_end);
+ [NoAccessorMethod]
+ public int depth_end { get; set; }
+ [NoAccessorMethod]
+ public int depth_start { get; set; }
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_behaviour_ellipse_get_type ()")]
+ [Deprecated (since = "1.6")]
+ public class BehaviourEllipse : Clutter.Behaviour, Clutter.Scriptable {
+ [CCode (has_construct_function = false, type = "ClutterBehaviour*")]
+ public BehaviourEllipse (Clutter.Alpha? alpha, int x, int y, int width, int height, Clutter.RotateDirection direction, double start, double end);
+ public double get_angle_end ();
+ public double get_angle_start ();
+ public double get_angle_tilt (Clutter.RotateAxis axis);
+ public void get_center (out int x, out int y);
+ public Clutter.RotateDirection get_direction ();
+ public int get_height ();
+ public void get_tilt (out double angle_tilt_x, out double angle_tilt_y, out double angle_tilt_z);
+ public int get_width ();
+ public void set_angle_end (double angle_end);
+ public void set_angle_start (double angle_start);
+ public void set_angle_tilt (Clutter.RotateAxis axis, double angle_tilt);
+ public void set_center (int x, int y);
+ public void set_direction (Clutter.RotateDirection direction);
+ public void set_height (int height);
+ public void set_tilt (double angle_tilt_x, double angle_tilt_y, double angle_tilt_z);
+ public void set_width (int width);
+ public double angle_end { get; set; }
+ public double angle_start { get; set; }
+ [NoAccessorMethod]
+ public double angle_tilt_x { get; set; }
+ [NoAccessorMethod]
+ public double angle_tilt_y { get; set; }
+ [NoAccessorMethod]
+ public double angle_tilt_z { get; set; }
+ [NoAccessorMethod]
+ public Clutter.Knot center { get; set; }
+ public Clutter.RotateDirection direction { get; set; }
+ public int height { get; set; }
+ public int width { get; set; }
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_behaviour_opacity_get_type ()")]
+ [Deprecated (since = "1.6")]
+ public class BehaviourOpacity : Clutter.Behaviour, Clutter.Scriptable {
+ [CCode (has_construct_function = false, type = "ClutterBehaviour*")]
+ public BehaviourOpacity (Clutter.Alpha? alpha, uint8 opacity_start, uint8 opacity_end);
+ public void get_bounds (out uint8 opacity_start, out uint8 opacity_end);
+ public void set_bounds (uint8 opacity_start, uint8 opacity_end);
+ [NoAccessorMethod]
+ public uint opacity_end { get; set; }
+ [NoAccessorMethod]
+ public uint opacity_start { get; set; }
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_behaviour_path_get_type ()")]
+ [Deprecated (since = "1.6")]
+ public class BehaviourPath : Clutter.Behaviour, Clutter.Scriptable {
+ [CCode (has_construct_function = false, type = "ClutterBehaviour*")]
+ public BehaviourPath (Clutter.Alpha? alpha, Clutter.Path path);
+ public unowned Clutter.Path get_path ();
+ public void set_path (Clutter.Path path);
+ [CCode (has_construct_function = false, type = "ClutterBehaviour*")]
+ public BehaviourPath.with_description (Clutter.Alpha? alpha, string desc);
+ [CCode (has_construct_function = false, type = "ClutterBehaviour*")]
+ public BehaviourPath.with_knots (Clutter.Alpha? alpha, [CCode (array_length_cname = "n_knots", array_length_pos = 2.1, array_length_type = "guint")] Clutter.Knot[] knots);
+ public Clutter.Path path { get; set; }
+ public virtual signal void knot_reached (uint knot_num);
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_behaviour_rotate_get_type ()")]
+ [Deprecated (since = "1.6")]
+ public class BehaviourRotate : Clutter.Behaviour, Clutter.Scriptable {
+ [CCode (has_construct_function = false, type = "ClutterBehaviour*")]
+ public BehaviourRotate (Clutter.Alpha? alpha, Clutter.RotateAxis axis, Clutter.RotateDirection direction, double angle_start, double angle_end);
+ public Clutter.RotateAxis get_axis ();
+ public void get_bounds (out double angle_start, out double angle_end);
+ public void get_center (out int x, out int y, out int z);
+ public Clutter.RotateDirection get_direction ();
+ public void set_axis (Clutter.RotateAxis axis);
+ public void set_bounds (double angle_start, double angle_end);
+ public void set_center (int x, int y, int z);
+ public void set_direction (Clutter.RotateDirection direction);
+ [NoAccessorMethod]
+ public double angle_end { get; set; }
+ [NoAccessorMethod]
+ public double angle_start { get; set; }
+ public Clutter.RotateAxis axis { get; set; }
+ [NoAccessorMethod]
+ public int center_x { get; set; }
+ [NoAccessorMethod]
+ public int center_y { get; set; }
+ [NoAccessorMethod]
+ public int center_z { get; set; }
+ public Clutter.RotateDirection direction { get; set; }
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_behaviour_scale_get_type ()")]
+ [Deprecated (since = "1.6")]
+ public class BehaviourScale : Clutter.Behaviour, Clutter.Scriptable {
+ [CCode (has_construct_function = false, type = "ClutterBehaviour*")]
+ public BehaviourScale (Clutter.Alpha? alpha, double x_scale_start, double y_scale_start, double x_scale_end, double y_scale_end);
+ public void get_bounds (out double x_scale_start, out double y_scale_start, out double x_scale_end, out double y_scale_end);
+ public void set_bounds (double x_scale_start, double y_scale_start, double x_scale_end, double y_scale_end);
+ [NoAccessorMethod]
+ public double x_scale_end { get; set; }
+ [NoAccessorMethod]
+ public double x_scale_start { get; set; }
+ [NoAccessorMethod]
+ public double y_scale_end { get; set; }
+ [NoAccessorMethod]
+ public double y_scale_start { get; set; }
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_bin_layout_get_type ()")]
+ public class BinLayout : Clutter.LayoutManager {
+ [CCode (has_construct_function = false, type = "ClutterLayoutManager*")]
+ public BinLayout (Clutter.BinAlignment x_align = Clutter.BinAlignment.START, Clutter.BinAlignment y_align = Clutter.BinAlignment.START);
+ [Deprecated (since = "1.12")]
+ public void add (Clutter.Actor child, Clutter.BinAlignment x_align, Clutter.BinAlignment y_align);
+ [Deprecated (since = "1.12")]
+ public void get_alignment (Clutter.Actor? child, out Clutter.BinAlignment x_align, out Clutter.BinAlignment y_align);
+ [Deprecated (since = "1.12")]
+ public void set_alignment (Clutter.Actor? child, Clutter.BinAlignment x_align, Clutter.BinAlignment y_align);
+ [Deprecated (since = "1.12")]
+ [NoAccessorMethod]
+ public Clutter.BinAlignment x_align { get; set; }
+ [Deprecated (since = "1.12")]
+ [NoAccessorMethod]
+ public Clutter.BinAlignment y_align { get; set; }
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_bind_constraint_get_type ()")]
+ public class BindConstraint : Clutter.Constraint {
+ [CCode (has_construct_function = false, type = "ClutterConstraint*")]
+ public BindConstraint (Clutter.Actor? source, Clutter.BindCoordinate coordinate, float offset);
+ public Clutter.BindCoordinate get_coordinate ();
+ public float get_offset ();
+ public unowned Clutter.Actor get_source ();
+ public void set_coordinate (Clutter.BindCoordinate coordinate);
+ public void set_offset (float offset);
+ public void set_source (Clutter.Actor? source);
+ public Clutter.BindCoordinate coordinate { get; set construct; }
+ public float offset { get; set construct; }
+ public Clutter.Actor source { get; set construct; }
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_binding_pool_get_type ()")]
+ public class BindingPool : GLib.Object {
+ [CCode (has_construct_function = false)]
+ public BindingPool (string name);
+ public bool activate (uint key_val, Clutter.ModifierType modifiers, GLib.Object gobject);
+ public void block_action (string action_name);
+ public static unowned Clutter.BindingPool find (string name);
+ public unowned string find_action (uint key_val, Clutter.ModifierType modifiers);
+ public static unowned Clutter.BindingPool get_for_class (void* klass);
+ public void install_action (string action_name, uint key_val, Clutter.ModifierType modifiers, owned Clutter.BindingActionFunc callback);
+ public void install_closure (string action_name, uint key_val, Clutter.ModifierType modifiers, GLib.Closure closure);
+ public void override_action (uint key_val, Clutter.ModifierType modifiers, owned GLib.Callback callback);
+ public void override_closure (uint key_val, Clutter.ModifierType modifiers, GLib.Closure closure);
+ public void remove_action (uint key_val, Clutter.ModifierType modifiers);
+ public void unblock_action (string action_name);
+ [NoAccessorMethod]
+ public string name { owned get; construct; }
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_blur_effect_get_type ()")]
+ public class BlurEffect : Clutter.OffscreenEffect {
+ [CCode (has_construct_function = false, type = "ClutterEffect*")]
+ public BlurEffect ();
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_box_get_type ()")]
+ public class Box : Clutter.Actor, Atk.Implementor, Clutter.Animatable, Clutter.Container, Clutter.Scriptable {
+ [CCode (has_construct_function = false, type = "ClutterActor*")]
+ [Deprecated (since = "1.10")]
+ public Box (Clutter.LayoutManager manager);
+ [Deprecated (since = "1.10")]
+ public Clutter.Color get_color ();
+ [Deprecated (since = "1.10")]
+ public unowned Clutter.LayoutManager get_layout_manager ();
+ [Deprecated (since = "1.10")]
+ public void pack (Clutter.Actor actor, ...);
+ [Deprecated (since = "1.10")]
+ public void pack_after (Clutter.Actor actor, Clutter.Actor? sibling, ...);
+ [Deprecated (since = "1.10")]
+ public void pack_at (Clutter.Actor actor, int position, ...);
+ [Deprecated (since = "1.10")]
+ public void pack_before (Clutter.Actor actor, Clutter.Actor? sibling, ...);
+ [Deprecated (since = "1.10")]
+ public void packv (Clutter.Actor actor, [CCode (array_length_cname = "n_properties", array_length_pos = 1.5, array_length_type = "guint")] string[] properties, [CCode (array_length_cname = "n_properties", array_length_pos = 1.5, array_length_type = "guint")] GLib.Value[] values);
+ [Deprecated (since = "1.10")]
+ public void set_color (Clutter.Color? color);
+ [Deprecated (since = "1.10")]
+ public void set_layout_manager (Clutter.LayoutManager manager);
+ [Deprecated (since = "1.10")]
+ public Clutter.Color color { get; set; }
+ [Deprecated (since = "1.10")]
+ [NoAccessorMethod]
+ public bool color_set { get; set; }
+ public Clutter.LayoutManager layout_manager { get; set; }
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_box_layout_get_type ()")]
+ public class BoxLayout : Clutter.LayoutManager {
+ [CCode (has_construct_function = false, type = "ClutterLayoutManager*")]
+ public BoxLayout ();
+ [Deprecated (since = "1.12")]
+ public void get_alignment (Clutter.Actor actor, out Clutter.BoxAlignment x_align, out Clutter.BoxAlignment y_align);
+ [Deprecated (since = "1.12")]
+ public uint get_easing_duration ();
+ [Deprecated (since = "1.12")]
+ public ulong get_easing_mode ();
+ [Deprecated (since = "1.12")]
+ public bool get_expand (Clutter.Actor actor);
+ [Deprecated (since = "1.12")]
+ public void get_fill (Clutter.Actor actor, out bool x_fill, out bool y_fill);
+ public bool get_homogeneous ();
+ public Clutter.Orientation get_orientation ();
+ public bool get_pack_start ();
+ public uint get_spacing ();
+ [Deprecated (since = "1.12")]
+ public bool get_use_animations ();
+ [Deprecated (since = "1.12")]
+ public bool get_vertical ();
+ [Deprecated (since = "1.12")]
+ public void pack (Clutter.Actor actor, bool expand, bool x_fill, bool y_fill, Clutter.BoxAlignment x_align, Clutter.BoxAlignment y_align);
+ [Deprecated (since = "1.12")]
+ public void set_alignment (Clutter.Actor actor, Clutter.BoxAlignment x_align, Clutter.BoxAlignment y_align);
+ [Deprecated (since = "1.12")]
+ public void set_easing_duration (uint msecs);
+ [Deprecated (since = "1.12")]
+ public void set_easing_mode (ulong mode);
+ [Deprecated (since = "1.12")]
+ public void set_expand (Clutter.Actor actor, bool expand);
+ [Deprecated (since = "1.12")]
+ public void set_fill (Clutter.Actor actor, bool x_fill, bool y_fill);
+ public void set_homogeneous (bool homogeneous);
+ public void set_orientation (Clutter.Orientation orientation);
+ public void set_pack_start (bool pack_start);
+ public void set_spacing (uint spacing);
+ [Deprecated (since = "1.12")]
+ public void set_use_animations (bool animate);
+ [Deprecated (since = "1.12")]
+ public void set_vertical (bool vertical);
+ [Deprecated (since = "1.12")]
+ public uint easing_duration { get; set; }
+ [Deprecated (since = "1.12")]
+ public ulong easing_mode { get; set; }
+ public bool homogeneous { get; set; }
+ public Clutter.Orientation orientation { get; set; }
+ public bool pack_start { get; set; }
+ public uint spacing { get; set; }
+ [Deprecated (since = "1.12")]
+ public bool use_animations { get; set; }
+ [Deprecated (since = "1.12")]
+ public bool vertical { get; set; }
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_brightness_contrast_effect_get_type ()")]
+ public class BrightnessContrastEffect : Clutter.OffscreenEffect {
+ [CCode (has_construct_function = false, type = "ClutterEffect*")]
+ public BrightnessContrastEffect ();
+ public void get_brightness (out float red, out float green, out float blue);
+ public void get_contrast (out float red, out float green, out float blue);
+ public void set_brightness (float brightness);
+ public void set_brightness_full (float red, float green, float blue);
+ public void set_contrast (float contrast);
+ public void set_contrast_full (float red, float green, float blue);
+ [NoAccessorMethod]
+ public Clutter.Color brightness { get; set; }
+ [NoAccessorMethod]
+ public Clutter.Color contrast { get; set; }
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_cairo_texture_get_type ()")]
+ [Deprecated (since = "1.12")]
+ public class CairoTexture : Clutter.Texture, Atk.Implementor, Clutter.Animatable, Clutter.Container, Clutter.Scriptable {
+ [CCode (has_construct_function = false, type = "ClutterActor*")]
+ public CairoTexture (uint width, uint height);
+ public void clear ();
+ [Deprecated (since = "1.8")]
+ public Cairo.Context create ();
+ [Deprecated (since = "1.8")]
+ public Cairo.Context create_region (int x_offset, int y_offset, int width, int height);
+ public bool get_auto_resize ();
+ public void get_surface_size (out uint width, out uint height);
+ public void invalidate ();
+ public void invalidate_rectangle (Cairo.RectangleInt? rect);
+ public void set_auto_resize (bool value);
+ public void set_surface_size (uint width, uint height);
+ public bool auto_resize { get; set; }
+ [NoAccessorMethod]
+ public uint surface_height { get; set; }
+ [NoAccessorMethod]
+ public uint surface_width { get; set; }
+ public virtual signal Cairo.Surface create_surface (uint width, uint height);
+ public virtual signal bool draw (Cairo.Context cr);
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_canvas_get_type ()")]
+ public class Canvas : GLib.Object, Clutter.Content {
+ [CCode (has_construct_function = false)]
+ protected Canvas ();
+ public int get_scale_factor ();
+ public static Clutter.Content @new ();
+ public void set_scale_factor (int scale);
+ public bool set_size (int width, int height);
+ [NoAccessorMethod]
+ public int height { get; set; }
+ public int scale_factor { get; set; }
+ [NoAccessorMethod]
+ public bool scale_factor_set { get; }
+ [NoAccessorMethod]
+ public int width { get; set; }
+ public virtual signal bool draw (Cairo.Context cr, int width, int height);
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_child_meta_get_type ()")]
+ public abstract class ChildMeta : GLib.Object {
+ [CCode (has_construct_function = false)]
+ protected ChildMeta ();
+ public unowned Clutter.Actor get_actor ();
+ public unowned Clutter.Container get_container ();
+ public Clutter.Actor actor { get; construct; }
+ public Clutter.Container container { get; construct; }
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_click_action_get_type ()")]
+ public class ClickAction : Clutter.Action {
+ [CCode (has_construct_function = false, type = "ClutterAction*")]
+ public ClickAction ();
+ public uint get_button ();
+ public void get_coords (out float press_x, out float press_y);
+ public Clutter.ModifierType get_state ();
+ public void release ();
+ [NoAccessorMethod]
+ public bool held { get; }
+ [NoAccessorMethod]
+ public int long_press_duration { get; set; }
+ [NoAccessorMethod]
+ public int long_press_threshold { get; set; }
+ [NoAccessorMethod]
+ public bool pressed { get; }
+ public virtual signal void clicked (Clutter.Actor actor);
+ public virtual signal bool long_press (Clutter.Actor actor, Clutter.LongPressState state);
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_clip_node_get_type ()")]
+ public class ClipNode : Clutter.PaintNode {
+ [CCode (has_construct_function = false, type = "ClutterPaintNode*")]
+ public ClipNode ();
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_clone_get_type ()")]
+ public class Clone : Clutter.Actor, Atk.Implementor, Clutter.Animatable, Clutter.Container, Clutter.Scriptable {
+ [CCode (has_construct_function = false, type = "ClutterActor*")]
+ public Clone (Clutter.Actor source);
+ public unowned Clutter.Actor get_source ();
+ public void set_source (Clutter.Actor? source);
+ public Clutter.Actor source { get; set construct; }
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_color_node_get_type ()")]
+ public class ColorNode : Clutter.PipelineNode {
+ [CCode (has_construct_function = false, type = "ClutterPaintNode*")]
+ public ColorNode (Clutter.Color? color);
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_colorize_effect_get_type ()")]
+ public class ColorizeEffect : Clutter.OffscreenEffect {
+ [CCode (has_construct_function = false, type = "ClutterEffect*")]
+ public ColorizeEffect (Clutter.Color tint);
+ public Clutter.Color get_tint ();
+ public void set_tint (Clutter.Color tint);
+ public Clutter.Color tint { get; set; }
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_constraint_get_type ()")]
+ public abstract class Constraint : Clutter.ActorMeta {
+ [CCode (has_construct_function = false)]
+ protected Constraint ();
+ [NoWrapper]
+ public virtual void update_allocation (Clutter.Actor actor, Clutter.ActorBox allocation);
+ [NoWrapper]
+ public virtual void update_preferred_size (Clutter.Actor actor, Clutter.Orientation direction, float for_size, float minimum_size, float natural_size);
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_deform_effect_get_type ()")]
+ public abstract class DeformEffect : Clutter.OffscreenEffect {
+ [CCode (has_construct_function = false)]
+ protected DeformEffect ();
+ [NoWrapper]
+ public virtual void deform_vertex (float width, float height, Cogl.TextureVertex vertex);
+ public unowned Cogl.Handle get_back_material ();
+ public void get_n_tiles (out uint x_tiles, out uint y_tiles);
+ public void invalidate ();
+ public void set_back_material (Cogl.Handle? material);
+ public void set_n_tiles (uint x_tiles, uint y_tiles);
+ [NoAccessorMethod]
+ public uint x_tiles { get; set; }
+ [NoAccessorMethod]
+ public uint y_tiles { get; set; }
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_desaturate_effect_get_type ()")]
+ public class DesaturateEffect : Clutter.OffscreenEffect {
+ [CCode (has_construct_function = false, type = "ClutterEffect*")]
+ public DesaturateEffect (double factor);
+ public double get_factor ();
+ public void set_factor (double factor);
+ public double factor { get; set; }
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_device_manager_get_type ()")]
+ public abstract class DeviceManager : GLib.Object {
+ [CCode (has_construct_function = false)]
+ protected DeviceManager ();
+ [NoWrapper]
+ public virtual void add_device (Clutter.InputDevice device);
+ public virtual unowned Clutter.InputDevice get_core_device (Clutter.InputDeviceType device_type);
+ public static unowned Clutter.DeviceManager get_default ();
+ public virtual unowned Clutter.InputDevice get_device (int device_id);
+ public GLib.SList<weak Clutter.InputDevice> list_devices ();
+ public unowned GLib.SList<Clutter.InputDevice> peek_devices ();
+ [NoWrapper]
+ public virtual void remove_device (Clutter.InputDevice device);
+ [NoWrapper]
+ public virtual void select_stage_events (Clutter.Stage stage);
+ [NoAccessorMethod]
+ public Clutter.Backend backend { owned get; construct; }
+ public signal void device_added (Clutter.InputDevice device);
+ public signal void device_removed (Clutter.InputDevice device);
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_drag_action_get_type ()")]
+ public class DragAction : Clutter.Action {
+ [CCode (has_construct_function = false, type = "ClutterAction*")]
+ public DragAction ();
+ public bool get_drag_area (Clutter.Rect drag_area);
+ public Clutter.DragAxis get_drag_axis ();
+ public unowned Clutter.Actor get_drag_handle ();
+ public void get_drag_threshold (out uint x_threshold, out uint y_threshold);
+ public void get_motion_coords (out float motion_x, out float motion_y);
+ public void get_press_coords (out float press_x, out float press_y);
+ public void set_drag_area (Clutter.Rect? drag_area);
+ public void set_drag_axis (Clutter.DragAxis axis);
+ public void set_drag_handle (Clutter.Actor? handle);
+ public void set_drag_threshold (int x_threshold, int y_threshold);
+ [NoAccessorMethod]
+ public Clutter.Rect drag_area { owned get; set; }
+ [NoAccessorMethod]
+ public bool drag_area_set { get; }
+ public Clutter.DragAxis drag_axis { get; set; }
+ public Clutter.Actor drag_handle { get; set; }
+ [NoAccessorMethod]
+ public int x_drag_threshold { get; set; }
+ [NoAccessorMethod]
+ public int y_drag_threshold { get; set; }
+ public virtual signal void drag_begin (Clutter.Actor actor, float event_x, float event_y, Clutter.ModifierType modifiers);
+ public virtual signal void drag_end (Clutter.Actor actor, float event_x, float event_y, Clutter.ModifierType modifiers);
+ public virtual signal void drag_motion (Clutter.Actor actor, float delta_x, float delta_y);
+ public virtual signal bool drag_progress (Clutter.Actor actor, float delta_x, float delta_y);
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_drop_action_get_type ()")]
+ public class DropAction : Clutter.Action {
+ [CCode (has_construct_function = false, type = "ClutterAction*")]
+ public DropAction ();
+ public virtual signal bool can_drop (Clutter.Actor actor, float event_x, float event_y);
+ public virtual signal void drop (Clutter.Actor actor, float event_x, float event_y);
+ public signal void drop_cancel (Clutter.Actor actor, float event_x, float event_y);
+ public virtual signal void over_in (Clutter.Actor actor);
+ public virtual signal void over_out (Clutter.Actor actor);
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_effect_get_type ()")]
+ public abstract class Effect : Clutter.ActorMeta {
+ [CCode (has_construct_function = false)]
+ protected Effect ();
+ [NoWrapper]
+ public virtual bool get_paint_volume (Clutter.PaintVolume volume);
+ [NoWrapper]
+ public virtual void paint (Clutter.EffectPaintFlags flags);
+ [NoWrapper]
+ public virtual void pick (Clutter.EffectPaintFlags flags);
+ [NoWrapper]
+ public virtual void post_paint ();
+ [NoWrapper]
+ public virtual bool pre_paint ();
+ public void queue_repaint ();
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "clutter_event_get_type ()")]
+ [Compact]
+ public class Event {
+ public Clutter.AnyEvent any;
+ public Clutter.ButtonEvent button;
+ public Clutter.CrossingEvent crossing;
+ public Clutter.KeyEvent key;
+ public Clutter.MotionEvent motion;
+ public Clutter.ScrollEvent scroll;
+ public Clutter.StageStateEvent stage_state;
+ public Clutter.TouchEvent touch;
+ public Clutter.TouchpadPinchEvent touchpad_pinch;
+ public Clutter.TouchpadSwipeEvent touchpad_swipe;
+ public Clutter.EventType type;
+ [CCode (has_construct_function = false)]
+ public Event (Clutter.EventType type);
+ public static uint add_filter (Clutter.Stage? stage, [CCode (delegate_target_pos = 2.2, destroy_notify_pos = 2.1)] owned Clutter.EventFilterFunc func);
+ public Clutter.Event copy ();
+ public void free ();
+ public static Clutter.Event @get ();
+ public double get_angle (Clutter.Event target);
+ public double get_axes (out uint n_axes);
+ public uint32 get_button ();
+ public uint get_click_count ();
+ public void get_coords (out float x, out float y);
+ public unowned Clutter.InputDevice get_device ();
+ public int get_device_id ();
+ public Clutter.InputDeviceType get_device_type ();
+ public float get_distance (Clutter.Event target);
+ public unowned Clutter.EventSequence get_event_sequence ();
+ public Clutter.EventFlags get_flags ();
+ public void get_gesture_motion_delta (out double dx, out double dy);
+ public Clutter.TouchpadGesturePhase get_gesture_phase ();
+ public double get_gesture_pinch_angle_delta ();
+ public double get_gesture_pinch_scale ();
+ public uint get_gesture_swipe_finger_count ();
+ public uint16 get_key_code ();
+ public uint get_key_symbol ();
+ public unichar get_key_unicode ();
+ public void get_position (Clutter.Point position);
+ public unowned Clutter.Actor get_related ();
+ public void get_scroll_delta (out double dx, out double dy);
+ public Clutter.ScrollDirection get_scroll_direction ();
+ public unowned Clutter.Actor get_source ();
+ public unowned Clutter.InputDevice get_source_device ();
+ public unowned Clutter.Stage get_stage ();
+ public Clutter.ModifierType get_state ();
+ public void get_state_full (out Clutter.ModifierType button_state, out Clutter.ModifierType base_state, out Clutter.ModifierType latched_state, out Clutter.ModifierType locked_state, out Clutter.ModifierType effective_state);
+ public uint32 get_time ();
+ [CCode (cname = "clutter_event_type")]
+ public Clutter.EventType get_type ();
+ public bool has_control_modifier ();
+ public bool has_shift_modifier ();
+ public bool is_pointer_emulated ();
+ public static unowned Clutter.Event peek ();
+ public void put ();
+ public static void remove_filter (uint id);
+ public void set_button (uint32 button);
+ public void set_coords (float x, float y);
+ public void set_device (Clutter.InputDevice? device);
+ public void set_flags (Clutter.EventFlags flags);
+ public void set_key_code (uint16 key_code);
+ public void set_key_symbol (uint key_sym);
+ public void set_key_unicode (unichar key_unicode);
+ public void set_related (Clutter.Actor? actor);
+ public void set_scroll_delta (double dx, double dy);
+ public void set_scroll_direction (Clutter.ScrollDirection direction);
+ public void set_source (Clutter.Actor? actor);
+ public void set_source_device (Clutter.InputDevice? device);
+ public void set_stage (Clutter.Stage? stage);
+ public void set_state (Clutter.ModifierType state);
+ public void set_time (uint32 time_);
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "clutter_event_sequence_get_type ()")]
+ [Compact]
+ public class EventSequence {
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_fixed_layout_get_type ()")]
+ public class FixedLayout : Clutter.LayoutManager {
+ [CCode (has_construct_function = false, type = "ClutterLayoutManager*")]
+ public FixedLayout ();
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_flow_layout_get_type ()")]
+ public class FlowLayout : Clutter.LayoutManager {
+ [CCode (has_construct_function = false, type = "ClutterLayoutManager*")]
+ public FlowLayout (Clutter.FlowOrientation orientation);
+ public float get_column_spacing ();
+ public void get_column_width (out float min_width, out float max_width);
+ public bool get_homogeneous ();
+ public Clutter.FlowOrientation get_orientation ();
+ public void get_row_height (out float min_height, out float max_height);
+ public float get_row_spacing ();
+ public bool get_snap_to_grid ();
+ public void set_column_spacing (float spacing);
+ public void set_column_width (float min_width, float max_width);
+ public void set_homogeneous (bool homogeneous);
+ public void set_orientation (Clutter.FlowOrientation orientation);
+ public void set_row_height (float min_height, float max_height);
+ public void set_row_spacing (float spacing);
+ public void set_snap_to_grid (bool snap_to_grid);
+ public float column_spacing { get; set; }
+ public bool homogeneous { get; set; }
+ [NoAccessorMethod]
+ public float max_column_width { get; set; }
+ [NoAccessorMethod]
+ public float max_row_height { get; set; }
+ [NoAccessorMethod]
+ public float min_column_width { get; set; }
+ [NoAccessorMethod]
+ public float min_row_height { get; set; }
+ public Clutter.FlowOrientation orientation { get; set construct; }
+ public float row_spacing { get; set; }
+ public bool snap_to_grid { get; set; }
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_gesture_action_get_type ()")]
+ public class GestureAction : Clutter.Action {
+ [CCode (has_construct_function = false, type = "ClutterAction*")]
+ public GestureAction ();
+ public void cancel ();
+ [NoWrapper]
+ public virtual bool gesture_prepare (Clutter.Actor actor);
+ public unowned Clutter.InputDevice get_device (uint point);
+ public unowned Clutter.Event get_last_event (uint point);
+ public void get_motion_coords (uint point, out float motion_x, out float motion_y);
+ public float get_motion_delta (uint point, out float delta_x, out float delta_y);
+ public uint get_n_current_points ();
+ public int get_n_touch_points ();
+ public void get_press_coords (uint point, out float press_x, out float press_y);
+ public void get_release_coords (uint point, out float release_x, out float release_y);
+ public unowned Clutter.EventSequence get_sequence (uint point);
+ public void get_threshold_trigger_distance (out float x, out float y);
+ public Clutter.GestureTriggerEdge get_threshold_trigger_edge ();
+ [Deprecated (since = "1.20")]
+ public Clutter.GestureTriggerEdge get_threshold_trigger_egde ();
+ public float get_velocity (uint point, out float velocity_x, out float velocity_y);
+ public void set_n_touch_points (int nb_points);
+ public void set_threshold_trigger_distance (float x, float y);
+ public void set_threshold_trigger_edge (Clutter.GestureTriggerEdge edge);
+ public int n_touch_points { get; set; }
+ [NoAccessorMethod]
+ public float threshold_trigger_distance_x { get; construct; }
+ [NoAccessorMethod]
+ public float threshold_trigger_distance_y { get; construct; }
+ public Clutter.GestureTriggerEdge threshold_trigger_edge { get; construct; }
+ public virtual signal bool gesture_begin (Clutter.Actor actor);
+ public virtual signal void gesture_cancel (Clutter.Actor actor);
+ public virtual signal void gesture_end (Clutter.Actor actor);
+ public virtual signal bool gesture_progress (Clutter.Actor actor);
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_grid_layout_get_type ()")]
+ public class GridLayout : Clutter.LayoutManager {
+ [CCode (has_construct_function = false, type = "ClutterLayoutManager*")]
+ public GridLayout ();
+ public void attach (Clutter.Actor child, int left, int top, int width, int height);
+ public void attach_next_to (Clutter.Actor child, Clutter.Actor? sibling, Clutter.GridPosition side, int width, int height);
+ public unowned Clutter.Actor get_child_at (int left, int top);
+ public bool get_column_homogeneous ();
+ public uint get_column_spacing ();
+ public Clutter.Orientation get_orientation ();
+ public bool get_row_homogeneous ();
+ public uint get_row_spacing ();
+ public void insert_column (int position);
+ public void insert_next_to (Clutter.Actor sibling, Clutter.GridPosition side);
+ public void insert_row (int position);
+ public void set_column_homogeneous (bool homogeneous);
+ public void set_column_spacing (uint spacing);
+ public void set_orientation (Clutter.Orientation orientation);
+ public void set_row_homogeneous (bool homogeneous);
+ public void set_row_spacing (uint spacing);
+ public bool column_homogeneous { get; set; }
+ public uint column_spacing { get; set; }
+ public Clutter.Orientation orientation { get; set; }
+ public bool row_homogeneous { get; set; }
+ public uint row_spacing { get; set; }
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_group_get_type ()")]
+ public class Group : Clutter.Actor, Atk.Implementor, Clutter.Animatable, Clutter.Container, Clutter.Scriptable {
+ [CCode (has_construct_function = false, type = "ClutterActor*")]
+ [Deprecated (since = "1.10")]
+ public Group ();
+ [Deprecated (since = "1.10")]
+ public int get_n_children ();
+ [Deprecated (since = "1.10")]
+ public unowned Clutter.Actor get_nth_child (int index_);
+ [Deprecated (since = "1.10")]
+ public void remove_all ();
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_image_get_type ()")]
+ public class Image : GLib.Object, Clutter.Content {
+ [CCode (has_construct_function = false)]
+ protected Image ();
+ public static Clutter.Content @new ();
+ public bool set_area ([CCode (array_length = false)] uint8[] data, Cogl.PixelFormat pixel_format, Cairo.RectangleInt rect, uint row_stride) throws GLib.Error;
+ public bool set_bytes (GLib.Bytes data, Cogl.PixelFormat pixel_format, uint width, uint height, uint row_stride) throws GLib.Error;
+ public bool set_data ([CCode (array_length = false)] uint8[] data, Cogl.PixelFormat pixel_format, uint width, uint height, uint row_stride) throws GLib.Error;
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_input_device_get_type ()")]
+ public class InputDevice : GLib.Object {
+ [CCode (has_construct_function = false)]
+ protected InputDevice ();
+ public unowned Clutter.InputDevice get_associated_device ();
+ public Clutter.InputAxis get_axis (uint index_);
+ public bool get_axis_value ([CCode (array_length = false)] double[] axes, Clutter.InputAxis axis, out double value);
+ public bool get_coords (Clutter.EventSequence? sequence, Clutter.Point point);
+ [Deprecated (since = "1.12")]
+ public void get_device_coords (out int x, out int y);
+ public int get_device_id ();
+ public Clutter.InputMode get_device_mode ();
+ public unowned string get_device_name ();
+ public Clutter.InputDeviceType get_device_type ();
+ public bool get_enabled ();
+ [CCode (cname = "clutter_get_input_device_for_id")]
+ [Deprecated (since = "1.10")]
+ public static unowned Clutter.InputDevice get_for_id (int id_);
+ public unowned Clutter.Actor get_grabbed_actor ();
+ public bool get_has_cursor ();
+ public bool get_key (uint index_, out uint keyval, out Clutter.ModifierType modifiers);
+ public Clutter.ModifierType get_modifier_state ();
+ public uint get_n_axes ();
+ public uint get_n_keys ();
+ public unowned Clutter.Actor get_pointer_actor ();
+ public unowned Clutter.Stage get_pointer_stage ();
+ public unowned string get_product_id ();
+ public GLib.List<weak Clutter.InputDevice> get_slave_devices ();
+ public unowned string get_vendor_id ();
+ public void grab (Clutter.Actor actor);
+ public bool keycode_to_evdev (uint hardware_keycode, uint evdev_keycode);
+ public unowned Clutter.Actor sequence_get_grabbed_actor (Clutter.EventSequence sequence);
+ public void sequence_grab (Clutter.EventSequence sequence, Clutter.Actor actor);
+ public void sequence_ungrab (Clutter.EventSequence sequence);
+ public void set_enabled (bool enabled);
+ public void set_key (uint index_, uint keyval, Clutter.ModifierType modifiers);
+ public void ungrab ();
+ public void update_from_event (Clutter.Event event, bool update_stage);
+ [NoAccessorMethod]
+ public Clutter.Backend backend { owned get; construct; }
+ [NoAccessorMethod]
+ public Clutter.DeviceManager device_manager { owned get; construct; }
+ public Clutter.InputMode device_mode { get; construct; }
+ public Clutter.InputDeviceType device_type { get; construct; }
+ public bool enabled { get; set; }
+ public bool has_cursor { get; construct; }
+ [NoAccessorMethod]
+ public int id { get; construct; }
+ public uint n_axes { get; }
+ [NoAccessorMethod]
+ public string name { owned get; construct; }
+ public string product_id { get; construct; }
+ public string vendor_id { get; construct; }
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_interval_get_type ()")]
+ public class Interval : GLib.InitiallyUnowned, Clutter.Scriptable {
+ [CCode (has_construct_function = false)]
+ public Interval (GLib.Type gtype, ...);
+ public Clutter.Interval clone ();
+ public unowned GLib.Value? compute (double factor);
+ public virtual bool compute_value (double factor, out GLib.Value value);
+ public GLib.Value get_final_value ();
+ public GLib.Value get_initial_value ();
+ public void get_interval (...);
+ public GLib.Type get_value_type ();
+ public bool is_valid ();
+ public unowned GLib.Value? peek_final_value ();
+ public unowned GLib.Value? peek_initial_value ();
+ public static void register_progress_func (GLib.Type value_type, Clutter.ProgressFunc func);
+ public void set_final (...);
+ public void set_final_value (GLib.Value value);
+ public void set_initial (...);
+ public void set_initial_value (GLib.Value value);
+ public void set_interval (...);
+ public virtual bool validate (GLib.ParamSpec pspec);
+ [CCode (has_construct_function = false)]
+ public Interval.with_values (GLib.Type gtype, GLib.Value? initial, GLib.Value? final);
+ [NoAccessorMethod]
+ public GLib.Value final { owned get; set; }
+ [NoAccessorMethod]
+ public GLib.Value initial { owned get; set; }
+ public GLib.Type value_type { get; construct; }
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_keyframe_transition_get_type ()")]
+ public class KeyframeTransition : Clutter.PropertyTransition, Clutter.Scriptable {
+ [CCode (has_construct_function = false, type = "ClutterTransition*")]
+ public KeyframeTransition (string property_name);
+ public void clear ();
+ public void get_key_frame (uint index_, out double key, out Clutter.AnimationMode mode, out GLib.Value value);
+ public uint get_n_key_frames ();
+ public void set_key_frame (uint index_, double key, Clutter.AnimationMode mode, GLib.Value value);
+ public void set_key_frames ([CCode (array_length_cname = "n_key_frames", array_length_pos = 0.5, array_length_type = "guint")] double[] key_frames);
+ public void set_modes ([CCode (array_length_cname = "n_modes", array_length_pos = 0.5, array_length_type = "guint")] Clutter.AnimationMode[] modes);
+ public void set_values ([CCode (array_length_cname = "n_values", array_length_pos = 0.5, array_length_type = "guint")] GLib.Value[] values);
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_layout_manager_get_type ()")]
+ public abstract class LayoutManager : GLib.InitiallyUnowned {
+ [CCode (has_construct_function = false)]
+ protected LayoutManager ();
+ public virtual void allocate (Clutter.Container container, Clutter.ActorBox allocation, Clutter.AllocationFlags flags);
+ [Deprecated (since = "1.12")]
+ public virtual unowned Clutter.Alpha begin_animation (uint duration, ulong mode);
+ public void child_get (Clutter.Container container, Clutter.Actor actor, ...);
+ public void child_get_property (Clutter.Container container, Clutter.Actor actor, string property_name, GLib.Value value);
+ public void child_set (Clutter.Container container, Clutter.Actor actor, ...);
+ public void child_set_property (Clutter.Container container, Clutter.Actor actor, string property_name, GLib.Value value);
+ [NoWrapper]
+ public virtual unowned Clutter.LayoutMeta create_child_meta (Clutter.Container container, Clutter.Actor actor);
+ [Deprecated (since = "1.12")]
+ public virtual void end_animation ();
+ public unowned GLib.ParamSpec find_child_property (string name);
+ [Deprecated (since = "1.12")]
+ public virtual double get_animation_progress ();
+ public unowned Clutter.LayoutMeta get_child_meta (Clutter.Container container, Clutter.Actor actor);
+ [NoWrapper]
+ public virtual GLib.Type get_child_meta_type ();
+ public virtual void get_preferred_height (Clutter.Container container, float for_width, out float min_height_p, out float nat_height_p);
+ public virtual void get_preferred_width (Clutter.Container container, float for_height, out float min_width_p, out float nat_width_p);
+ [CCode (array_length_pos = 0.1, array_length_type = "guint")]
+ public GLib.ParamSpec[] list_child_properties ();
+ public virtual void set_container (Clutter.Container? container);
+ [HasEmitter]
+ public virtual signal void layout_changed ();
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_layout_meta_get_type ()")]
+ public abstract class LayoutMeta : Clutter.ChildMeta {
+ [CCode (has_construct_function = false)]
+ protected LayoutMeta ();
+ public unowned Clutter.LayoutManager get_manager ();
+ public Clutter.LayoutManager manager { get; construct; }
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_list_model_get_type ()")]
+ [Deprecated (since = "1.24")]
+ public class ListModel : Clutter.Model, Clutter.Scriptable {
+ [CCode (has_construct_function = false, type = "ClutterModel*")]
+ public ListModel (uint n_columns, ...);
+ [CCode (cname = "clutter_list_model_newv", has_construct_function = false, type = "ClutterModel*")]
+ public ListModel.newv ([CCode (array_length_cname = "n_columns", array_length_pos = 0.5, array_length_type = "guint")] GLib.Type[] types, [CCode (array_length_cname = "n_columns", array_length_pos = 0.5, array_length_type = "guint")] string[] names);
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "clutter_margin_get_type ()")]
+ [Compact]
+ public class Margin {
+ public float bottom;
+ public float left;
+ public float right;
+ public float top;
+ [CCode (has_construct_function = false)]
+ public Margin ();
+ public Clutter.Margin copy ();
+ public void free ();
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_model_get_type ()")]
+ [Deprecated (since = "1.24")]
+ public abstract class Model : GLib.Object, Clutter.Scriptable {
+ [CCode (has_construct_function = false)]
+ protected Model ();
+ public void append (...);
+ public void appendv ([CCode (array_length_cname = "n_columns", array_length_pos = 0.5, array_length_type = "guint")] uint[] columns, [CCode (array_length_cname = "n_columns", array_length_pos = 0.5, array_length_type = "guint")] GLib.Value[] values);
+ public bool filter_iter (Clutter.ModelIter iter);
+ public bool filter_row (uint row);
+ public void @foreach (Clutter.ModelForeachFunc func);
+ public virtual unowned string get_column_name (uint column);
+ public virtual GLib.Type get_column_type (uint column);
+ public bool get_filter_set ();
+ public Clutter.ModelIter get_first_iter ();
+ public virtual Clutter.ModelIter get_iter_at_row (uint row);
+ public Clutter.ModelIter get_last_iter ();
+ public virtual uint get_n_columns ();
+ public virtual uint get_n_rows ();
+ public int get_sorting_column ();
+ public void insert (uint row, ...);
+ [NoWrapper]
+ public virtual unowned Clutter.ModelIter insert_row (int index_);
+ public void insert_value (uint row, uint column, GLib.Value value);
+ public void insertv (uint row, [CCode (array_length_cname = "n_columns", array_length_pos = 1.5, array_length_type = "guint")] uint[] columns, [CCode (array_length_cname = "n_columns", array_length_pos = 1.5, array_length_type = "guint")] GLib.Value[] values);
+ public void prepend (...);
+ public void prependv ([CCode (array_length_cname = "n_columns", array_length_pos = 0.5, array_length_type = "guint")] uint[] columns, [CCode (array_length_cname = "n_columns", array_length_pos = 0.5, array_length_type = "guint")] GLib.Value[] values);
+ public void remove (uint row);
+ [NoWrapper]
+ public virtual void remove_row (uint row);
+ public void resort ();
+ public void set_filter (owned Clutter.ModelFilterFunc? func);
+ public void set_names ([CCode (array_length_cname = "n_columns", array_length_pos = 0.5, array_length_type = "guint")] string[] names);
+ public void set_sort (int column, owned Clutter.ModelSortFunc? func);
+ public void set_sorting_column (int column);
+ public void set_types ([CCode (array_length_cname = "n_columns", array_length_pos = 0.5, array_length_type = "guint")] GLib.Type[] types);
+ public bool filter_set { get; }
+ public virtual signal void filter_changed ();
+ public virtual signal void row_added (Clutter.ModelIter iter);
+ public virtual signal void row_changed (Clutter.ModelIter iter);
+ public virtual signal void row_removed (Clutter.ModelIter iter);
+ public virtual signal void sort_changed ();
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_model_iter_get_type ()")]
+ [Deprecated (since = "1.24")]
+ public abstract class ModelIter : GLib.Object {
+ [CCode (has_construct_function = false)]
+ protected ModelIter ();
+ public virtual Clutter.ModelIter copy ();
+ public void @get (...);
+ public virtual unowned Clutter.Model get_model ();
+ public virtual uint get_row ();
+ public virtual GLib.Value get_value (uint column);
+ public virtual bool is_first ();
+ public virtual bool is_last ();
+ public virtual unowned Clutter.ModelIter next ();
+ public virtual unowned Clutter.ModelIter prev ();
+ public void @set (...);
+ public virtual void set_value (uint column, GLib.Value value);
+ [NoAccessorMethod]
+ public Clutter.Model model { owned get; set; }
+ [NoAccessorMethod]
+ public uint row { get; set; }
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_offscreen_effect_get_type ()")]
+ public abstract class OffscreenEffect : Clutter.Effect {
+ [CCode (has_construct_function = false)]
+ protected OffscreenEffect ();
+ public virtual Cogl.Handle create_texture (float width, float height);
+ public unowned Cogl.Material get_target ();
+ public bool get_target_rect (out unowned Clutter.Rect rect);
+ [Deprecated (since = "1.14")]
+ public bool get_target_size (out float width, out float height);
+ public unowned Cogl.Handle get_texture ();
+ public virtual void paint_target ();
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_page_turn_effect_get_type ()")]
+ public class PageTurnEffect : Clutter.DeformEffect {
+ [CCode (has_construct_function = false, type = "ClutterEffect*")]
+ public PageTurnEffect (double period, double angle, float radius);
+ public double get_angle ();
+ public double get_period ();
+ public float get_radius ();
+ public void set_angle (double angle);
+ public void set_period (double period);
+ public void set_radius (float radius);
+ public double angle { get; set; }
+ public double period { get; set; }
+ public float radius { get; set; }
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_paint_node_get_type ()")]
+ public abstract class PaintNode {
+ [CCode (has_construct_function = false)]
+ protected PaintNode ();
+ public void add_child (Clutter.PaintNode child);
+ public void add_rectangle (Clutter.ActorBox rect);
+ public void add_texture_rectangle (Clutter.ActorBox rect, float x_1, float y_1, float x_2, float y_2);
+ public Clutter.PaintNode @ref ();
+ public void set_name (string name);
+ public void unref ();
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "clutter_paint_volume_get_type ()")]
+ [Compact]
+ public class PaintVolume {
+ public Clutter.PaintVolume copy ();
+ public void free ();
+ public float get_depth ();
+ public float get_height ();
+ public Clutter.Vertex get_origin ();
+ public float get_width ();
+ public void set_depth (float depth);
+ public bool set_from_allocation (Clutter.Actor actor);
+ public void set_height (float height);
+ public void set_origin (Clutter.Vertex origin);
+ public void set_width (float width);
+ public void union (Clutter.PaintVolume another_pv);
+ public void union_box (Clutter.ActorBox box);
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_pan_action_get_type ()")]
+ public class PanAction : Clutter.GestureAction {
+ [CCode (has_construct_function = false, type = "ClutterAction*")]
+ public PanAction ();
+ public double get_acceleration_factor ();
+ public float get_constrained_motion_delta (uint point, out float delta_x, out float delta_y);
+ public double get_deceleration ();
+ public bool get_interpolate ();
+ public void get_interpolated_coords (out float interpolated_x, out float interpolated_y);
+ public float get_interpolated_delta (out float delta_x, out float delta_y);
+ public void get_motion_coords (uint point, out float motion_x, out float motion_y);
+ public float get_motion_delta (uint point, out float delta_x, out float delta_y);
+ public Clutter.PanAxis get_pan_axis ();
+ public void set_acceleration_factor (double factor);
+ public void set_deceleration (double rate);
+ public void set_interpolate (bool should_interpolate);
+ public void set_pan_axis (Clutter.PanAxis axis);
+ public double acceleration_factor { get; set; }
+ public double deceleration { get; set; }
+ public bool interpolate { get; set; }
+ public Clutter.PanAxis pan_axis { get; set; }
+ public virtual signal bool pan (Clutter.Actor actor, bool is_interpolated);
+ public virtual signal void pan_stopped (Clutter.Actor actor);
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", lower_case_csuffix = "param_units", type_id = "clutter_param_units_get_type ()")]
+ public class ParamSpecUnit : GLib.ParamSpec {
+ [CCode (has_construct_function = false)]
+ protected ParamSpecUnit ();
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_path_get_type ()")]
+ public class Path : GLib.InitiallyUnowned {
+ [CCode (has_construct_function = false)]
+ public Path ();
+ public void add_cairo_path (Cairo.Path cpath);
+ public void add_close ();
+ public void add_curve_to (int x_1, int y_1, int x_2, int y_2, int x_3, int y_3);
+ public void add_line_to (int x, int y);
+ public void add_move_to (int x, int y);
+ public void add_node (Clutter.PathNode node);
+ public void add_rel_curve_to (int x_1, int y_1, int x_2, int y_2, int x_3, int y_3);
+ public void add_rel_line_to (int x, int y);
+ public void add_rel_move_to (int x, int y);
+ public bool add_string (string str);
+ public void clear ();
+ public void @foreach (Clutter.PathCallback callback);
+ public string get_description ();
+ public uint get_length ();
+ public uint get_n_nodes ();
+ public Clutter.PathNode get_node (uint index_);
+ public GLib.SList<weak Clutter.PathNode> get_nodes ();
+ public uint get_position (double progress, out Clutter.Knot position);
+ public void insert_node (int index_, Clutter.PathNode node);
+ public void remove_node (uint index_);
+ public void replace_node (uint index_, Clutter.PathNode node);
+ public bool set_description (string str);
+ public void to_cairo_path (Cairo.Context cr);
+ [CCode (has_construct_function = false)]
+ public Path.with_description (string desc);
+ [NoAccessorMethod]
+ public string description { owned get; set; }
+ public uint length { get; }
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_path_constraint_get_type ()")]
+ public class PathConstraint : Clutter.Constraint {
+ [CCode (has_construct_function = false, type = "ClutterConstraint*")]
+ public PathConstraint (Clutter.Path? path, float offset);
+ public float get_offset ();
+ public unowned Clutter.Path get_path ();
+ public void set_offset (float offset);
+ public void set_path (Clutter.Path? path);
+ public float offset { get; set; }
+ public Clutter.Path path { get; set; }
+ public signal void node_reached (Clutter.Actor actor, uint index);
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_pipeline_node_get_type ()")]
+ public class PipelineNode : Clutter.PaintNode {
+ [CCode (has_construct_function = false)]
+ protected PipelineNode ();
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "clutter_point_get_type ()")]
+ [Compact]
+ public class Point {
+ public float x;
+ public float y;
+ public static Clutter.Point alloc ();
+ public Clutter.Point copy ();
+ public float distance (Clutter.Point b, out float x_distance, out float y_distance);
+ public bool equals (Clutter.Point b);
+ public void free ();
+ public unowned Clutter.Point init (float x, float y);
+ public static unowned Clutter.Point zero ();
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_property_transition_get_type ()")]
+ public class PropertyTransition : Clutter.Transition, Clutter.Scriptable {
+ [CCode (has_construct_function = false, type = "ClutterTransition*")]
+ public PropertyTransition (string? property_name);
+ public unowned string get_property_name ();
+ public void set_property_name (string? property_name);
+ public string property_name { get; set; }
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "clutter_rect_get_type ()")]
+ [Compact]
+ public class Rect {
+ public weak Clutter.Point origin;
+ public weak Clutter.Size size;
+ public static Clutter.Rect alloc ();
+ public void clamp_to_pixel ();
+ public bool contains_point (Clutter.Point point);
+ public bool contains_rect (Clutter.Rect b);
+ public Clutter.Rect copy ();
+ public bool equals (Clutter.Rect b);
+ public void free ();
+ public void get_center (Clutter.Point center);
+ public float get_height ();
+ public float get_width ();
+ public float get_x ();
+ public float get_y ();
+ public unowned Clutter.Rect init (float x, float y, float width, float height);
+ public void inset (float d_x, float d_y);
+ public bool intersection (Clutter.Rect b, Clutter.Rect? res);
+ public Clutter.Rect normalize ();
+ public void offset (float d_x, float d_y);
+ public void union (Clutter.Rect b, Clutter.Rect res);
+ public static unowned Clutter.Rect zero ();
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_rectangle_get_type ()")]
+ public class Rectangle : Clutter.Actor, Atk.Implementor, Clutter.Animatable, Clutter.Container, Clutter.Scriptable {
+ [CCode (has_construct_function = false, type = "ClutterActor*")]
+ [Deprecated (since = "1.10")]
+ public Rectangle ();
+ [Deprecated (since = "1.10")]
+ public Clutter.Color get_border_color ();
+ [Deprecated (since = "1.10")]
+ public uint get_border_width ();
+ [Deprecated (since = "1.10")]
+ public Clutter.Color get_color ();
+ [Deprecated (since = "1.10")]
+ public void set_border_color (Clutter.Color color);
+ [Deprecated (since = "1.10")]
+ public void set_border_width (uint width);
+ [Deprecated (since = "1.10")]
+ public void set_color (Clutter.Color color);
+ [CCode (has_construct_function = false, type = "ClutterActor*")]
+ [Deprecated (since = "1.10")]
+ public Rectangle.with_color (Clutter.Color color);
+ public Clutter.Color border_color { get; set; }
+ public uint border_width { get; set; }
+ public Clutter.Color color { get; set; }
+ [NoAccessorMethod]
+ public bool has_border { get; set; }
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_rotate_action_get_type ()")]
+ public class RotateAction : Clutter.GestureAction {
+ [CCode (has_construct_function = false, type = "ClutterAction*")]
+ public RotateAction ();
+ public virtual signal bool rotate (Clutter.Actor actor, double angle);
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_score_get_type ()")]
+ public class Score : GLib.Object {
+ [CCode (has_construct_function = false)]
+ [Deprecated (since = "1.8")]
+ public Score ();
+ [Deprecated (since = "1.8")]
+ public ulong append (Clutter.Timeline? parent, Clutter.Timeline timeline);
+ [Deprecated (since = "1.8")]
+ public ulong append_at_marker (Clutter.Timeline parent, string marker_name, Clutter.Timeline timeline);
+ [Deprecated (since = "1.8")]
+ public bool get_loop ();
+ [Deprecated (since = "1.8")]
+ public unowned Clutter.Timeline get_timeline (ulong id_);
+ [Deprecated (since = "1.8")]
+ public bool is_playing ();
+ [Deprecated (since = "1.8")]
+ public GLib.SList<weak Clutter.Timeline> list_timelines ();
+ [Deprecated (since = "1.8")]
+ public void pause ();
+ [Deprecated (since = "1.8")]
+ public void remove (ulong id_);
+ [Deprecated (since = "1.8")]
+ public void remove_all ();
+ [Deprecated (since = "1.8")]
+ public void rewind ();
+ [Deprecated (since = "1.8")]
+ public void set_loop (bool loop);
+ [Deprecated (since = "1.8")]
+ public void start ();
+ [Deprecated (since = "1.8")]
+ public void stop ();
+ [Deprecated (since = "1.8")]
+ public bool loop { get; set; }
+ [Deprecated (since = "1.8")]
+ public virtual signal void completed ();
+ [Deprecated (since = "1.8")]
+ public virtual signal void paused ();
+ [Deprecated (since = "1.8")]
+ public virtual signal void started ();
+ [Deprecated (since = "1.8")]
+ public virtual signal void timeline_completed (Clutter.Timeline timeline);
+ [Deprecated (since = "1.8")]
+ public virtual signal void timeline_started (Clutter.Timeline timeline);
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_script_get_type ()")]
+ public class Script : GLib.Object {
+ [CCode (has_construct_function = false)]
+ public Script ();
+ public void add_search_paths ([CCode (array_length_cname = "n_paths", array_length_pos = 1.1, array_length_type = "gsize")] string[] paths);
+ [Deprecated (since = "1.12")]
+ public void add_states (string? name, Clutter.State state);
+ public void connect_signals (void* user_data);
+ public void connect_signals_full (Clutter.ScriptConnectFunc func);
+ public void ensure_objects ();
+ public unowned GLib.Object get_object (string name);
+ public int get_objects (...);
+ [Deprecated (since = "1.12")]
+ public unowned Clutter.State get_states (string? name);
+ public unowned string get_translation_domain ();
+ public virtual GLib.Type get_type_from_name (string type_name);
+ public GLib.List<weak GLib.Object> list_objects ();
+ public uint load_from_data (string data, ssize_t length) throws GLib.Error;
+ public uint load_from_file (string filename) throws GLib.Error;
+ public uint load_from_resource (string resource_path) throws GLib.Error;
+ public string lookup_filename (string filename);
+ public void set_translation_domain (string? domain);
+ public void unmerge_objects (uint merge_id);
+ [NoAccessorMethod]
+ public string filename { owned get; }
+ [NoAccessorMethod]
+ public bool filename_set { get; }
+ public string translation_domain { get; set; }
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_scroll_actor_get_type ()")]
+ public class ScrollActor : Clutter.Actor, Atk.Implementor, Clutter.Animatable, Clutter.Container, Clutter.Scriptable {
+ [CCode (has_construct_function = false, type = "ClutterActor*")]
+ public ScrollActor ();
+ public Clutter.ScrollMode get_scroll_mode ();
+ public void scroll_to_point (Clutter.Point point);
+ public void scroll_to_rect (Clutter.Rect rect);
+ public void set_scroll_mode (Clutter.ScrollMode mode);
+ public Clutter.ScrollMode scroll_mode { get; set; }
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_settings_get_type ()")]
+ public class Settings : GLib.Object {
+ [CCode (has_construct_function = false)]
+ protected Settings ();
+ public static unowned Clutter.Settings get_default ();
+ [Deprecated (since = "1.10")]
+ public Clutter.Backend backend { construct; }
+ [NoAccessorMethod]
+ public int dnd_drag_threshold { get; set; }
+ [NoAccessorMethod]
+ public int double_click_distance { get; set; }
+ [NoAccessorMethod]
+ public int double_click_time { get; set; }
+ [NoAccessorMethod]
+ public int font_antialias { get; set; }
+ [NoAccessorMethod]
+ public int font_dpi { get; set; }
+ [NoAccessorMethod]
+ public string font_hint_style { owned get; set; }
+ [NoAccessorMethod]
+ public int font_hinting { get; set; }
+ [NoAccessorMethod]
+ public string font_name { owned get; set; }
+ [NoAccessorMethod]
+ public string font_subpixel_order { owned get; set; }
+ [NoAccessorMethod]
+ public uint fontconfig_timestamp { set; }
+ [NoAccessorMethod]
+ public int long_press_duration { get; set; }
+ [NoAccessorMethod]
+ public uint password_hint_time { get; set; }
+ [NoAccessorMethod]
+ public int unscaled_font_dpi { set; }
+ [NoAccessorMethod]
+ public int window_scaling_factor { get; set; }
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_shader_get_type ()")]
+ [Deprecated (since = "1.8")]
+ public class Shader : GLib.Object {
+ [CCode (has_construct_function = false)]
+ public Shader ();
+ public bool compile () throws GLib.Error;
+ public unowned Cogl.Handle get_cogl_fragment_shader ();
+ public unowned Cogl.Handle get_cogl_program ();
+ public unowned Cogl.Handle get_cogl_vertex_shader ();
+ public unowned string get_fragment_source ();
+ public bool get_is_enabled ();
+ public unowned string get_vertex_source ();
+ public bool is_compiled ();
+ public void release ();
+ public void set_fragment_source (string data, ssize_t length);
+ public void set_is_enabled (bool enabled);
+ public void set_uniform (string name, GLib.Value value);
+ public void set_vertex_source (string data, ssize_t length);
+ [NoAccessorMethod]
+ public bool compiled { get; }
+ [NoAccessorMethod]
+ public bool enabled { get; set; }
+ [NoAccessorMethod]
+ public string fragment_source { owned get; set; }
+ [NoAccessorMethod]
+ public string vertex_source { owned get; set; }
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_shader_effect_get_type ()")]
+ public class ShaderEffect : Clutter.OffscreenEffect {
+ [CCode (has_construct_function = false, type = "ClutterEffect*")]
+ public ShaderEffect (Clutter.ShaderType shader_type);
+ public unowned Cogl.Handle get_program ();
+ public unowned Cogl.Handle get_shader ();
+ [NoWrapper]
+ public virtual string get_static_shader_source ();
+ public bool set_shader_source (string source);
+ public void set_uniform_value (string name, GLib.Value value);
+ public Clutter.ShaderType shader_type { construct; }
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_shader_float_get_type ()")]
+ public class ShaderFloat {
+ [CCode (has_construct_function = false)]
+ protected ShaderFloat ();
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_shader_int_get_type ()")]
+ public class ShaderInt {
+ [CCode (has_construct_function = false)]
+ protected ShaderInt ();
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_shader_matrix_get_type ()")]
+ public class ShaderMatrix {
+ [CCode (has_construct_function = false)]
+ protected ShaderMatrix ();
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "clutter_size_get_type ()")]
+ [Compact]
+ public class Size {
+ public float height;
+ public float width;
+ public static Clutter.Size alloc ();
+ public Clutter.Size copy ();
+ public bool equals (Clutter.Size b);
+ public void free ();
+ public unowned Clutter.Size init (float width, float height);
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_snap_constraint_get_type ()")]
+ public class SnapConstraint : Clutter.Constraint {
+ [CCode (has_construct_function = false, type = "ClutterConstraint*")]
+ public SnapConstraint (Clutter.Actor? source, Clutter.SnapEdge from_edge, Clutter.SnapEdge to_edge, float offset);
+ public void get_edges (out Clutter.SnapEdge from_edge, out Clutter.SnapEdge to_edge);
+ public float get_offset ();
+ public unowned Clutter.Actor get_source ();
+ public void set_edges (Clutter.SnapEdge from_edge, Clutter.SnapEdge to_edge);
+ public void set_offset (float offset);
+ public void set_source (Clutter.Actor? source);
+ [NoAccessorMethod]
+ public Clutter.SnapEdge from_edge { get; set construct; }
+ public float offset { get; set construct; }
+ public Clutter.Actor source { get; set construct; }
+ [NoAccessorMethod]
+ public Clutter.SnapEdge to_edge { get; set construct; }
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_stage_get_type ()")]
+ public class Stage : Clutter.Group, Atk.Implementor, Clutter.Animatable, Clutter.Container, Clutter.Scriptable, Atk.Implementor, Clutter.Animatable, Clutter.Container, Clutter.Scriptable {
+ [CCode (has_construct_function = false, type = "ClutterActor*")]
+ public Stage ();
+ [CCode (cname = "clutter_stage_event")]
+ public bool emit_event (Clutter.Event event);
+ public void ensure_current ();
+ public void ensure_redraw ();
+ public void ensure_viewport ();
+ public bool get_accept_focus ();
+ public unowned Clutter.Actor get_actor_at_pos (Clutter.PickMode pick_mode, int x, int y);
+ [Deprecated (since = "1.10")]
+ public Clutter.Color get_color ();
+ [Deprecated (since = "1.10")]
+ public static unowned Clutter.Stage get_default ();
+ [Deprecated (since = "1.10")]
+ public Clutter.Fog get_fog ();
+ public bool get_fullscreen ();
+ public unowned Clutter.Actor get_key_focus ();
+ public void get_minimum_size (out uint width, out uint height);
+ public bool get_motion_events_enabled ();
+ public bool get_no_clear_hint ();
+ public Clutter.Perspective get_perspective ();
+ public Cairo.RectangleInt get_redraw_clip_bounds ();
+ public bool get_throttle_motion_events ();
+ public unowned string get_title ();
+ public bool get_use_alpha ();
+ [Deprecated (since = "1.10")]
+ public bool get_use_fog ();
+ public bool get_user_resizable ();
+ public void hide_cursor ();
+ [Deprecated (since = "1.10")]
+ public bool is_default ();
+ [Deprecated (since = "1.10")]
+ public void queue_redraw ();
+ [CCode (array_length = false)]
+ public uint8[] read_pixels (int x, int y, int width = -1, int height = -1);
+ [CCode (cname = "clutter_redraw")]
+ public void redraw ();
+ public void set_accept_focus (bool accept_focus);
+ [Deprecated (since = "1.10")]
+ public void set_color (Clutter.Color color);
+ [Deprecated (since = "1.10")]
+ public void set_fog (Clutter.Fog fog);
+ public void set_fullscreen (bool fullscreen);
+ public void set_key_focus (Clutter.Actor? actor);
+ public void set_minimum_size (uint width, uint height);
+ public void set_motion_events_enabled (bool enabled);
+ public void set_no_clear_hint (bool no_clear);
+ public void set_perspective (Clutter.Perspective perspective);
+ public void set_throttle_motion_events (bool throttle);
+ public void set_title (string title);
+ public void set_use_alpha (bool use_alpha);
+ [Deprecated (since = "1.10")]
+ public void set_use_fog (bool fog);
+ public void set_user_resizable (bool resizable);
+ public void show_cursor ();
+ public bool accept_focus { get; set; }
+ [Deprecated (since = "1.10")]
+ public Clutter.Color color { get; set; }
+ [NoAccessorMethod]
+ public bool cursor_visible { get; set; }
+ [Deprecated (since = "1.10")]
+ public Clutter.Fog fog { get; set; }
+ [NoAccessorMethod]
+ public bool fullscreen_set { get; }
+ public Clutter.Actor key_focus { get; set; }
+ public bool no_clear_hint { get; set; }
+ [Deprecated (since = "1.10")]
+ [NoAccessorMethod]
+ public bool offscreen { get; set; }
+ public Clutter.Perspective perspective { get; set; }
+ public string title { get; set; }
+ public bool use_alpha { get; set; }
+ [Deprecated (since = "1.10")]
+ public bool use_fog { get; set; }
+ public bool user_resizable { get; set; }
+ public virtual signal void activate ();
+ public signal void after_paint ();
+ public virtual signal void deactivate ();
+ public virtual signal bool delete_event (Clutter.Event event);
+ public virtual signal void fullscreen ();
+ public virtual signal void unfullscreen ();
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_stage_manager_get_type ()")]
+ public class StageManager : GLib.Object {
+ [CCode (has_construct_function = false)]
+ protected StageManager ();
+ public static unowned Clutter.StageManager get_default ();
+ public unowned Clutter.Stage get_default_stage ();
+ public GLib.SList<weak Clutter.Stage> list_stages ();
+ public unowned GLib.SList<Clutter.Stage> peek_stages ();
+ [Deprecated (since = "1.2")]
+ public void set_default_stage (Clutter.Stage stage);
+ public Clutter.Stage default_stage { get; }
+ public virtual signal void stage_added (Clutter.Stage stage);
+ public virtual signal void stage_removed (Clutter.Stage stage);
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_state_get_type ()")]
+ public class State : GLib.Object, Clutter.Scriptable {
+ [CCode (has_construct_function = false)]
+ [Deprecated (since = "1.12")]
+ public State ();
+ [Deprecated (since = "1.12")]
+ public unowned Clutter.Animator get_animator (string source_state_name, string target_state_name);
+ [Deprecated (since = "1.12")]
+ public uint get_duration (string? source_state_name, string? target_state_name);
+ [Deprecated (since = "1.12")]
+ public GLib.List<weak Clutter.StateKey> get_keys (string? source_state_name, string? target_state_name, GLib.Object? object, string? property_name);
+ [Deprecated (since = "1.12")]
+ public unowned string get_state ();
+ [Deprecated (since = "1.12")]
+ public GLib.List<weak string> get_states ();
+ [Deprecated (since = "1.12")]
+ public unowned Clutter.Timeline get_timeline ();
+ [Deprecated (since = "1.12")]
+ public void remove_key (string? source_state_name, string? target_state_name, GLib.Object? object, string? property_name);
+ [Deprecated (since = "1.12")]
+ public void set_animator (string source_state_name, string target_state_name, Clutter.Animator? animator);
+ [Deprecated (since = "1.12")]
+ public void set_duration (string? source_state_name, string? target_state_name, uint duration);
+ [Deprecated (since = "1.12")]
+ public unowned Clutter.State set_key (string? source_state_name, string target_state_name, GLib.Object object, string property_name, uint mode, GLib.Value value, double pre_delay, double post_delay);
+ [Deprecated (since = "1.12")]
+ public unowned Clutter.Timeline set_state (string target_state_name);
+ [Deprecated (since = "1.12")]
+ public unowned Clutter.Timeline warp_to_state (string target_state_name);
+ [Deprecated (since = "1.12")]
+ [NoAccessorMethod]
+ public uint duration { get; set; }
+ [Deprecated (since = "1.12")]
+ [NoAccessorMethod]
+ public string state { owned get; set; }
+ [Deprecated (since = "1.12")]
+ public virtual signal void completed ();
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "clutter_state_key_get_type ()")]
+ [Compact]
+ public class StateKey {
+ [Deprecated (since = "1.12")]
+ public ulong get_mode ();
+ [Deprecated (since = "1.12")]
+ public unowned GLib.Object get_object ();
+ [Deprecated (since = "1.12")]
+ public double get_post_delay ();
+ [Deprecated (since = "1.12")]
+ public double get_pre_delay ();
+ [Deprecated (since = "1.12")]
+ public unowned string get_property_name ();
+ [Deprecated (since = "1.12")]
+ public GLib.Type get_property_type ();
+ [Deprecated (since = "1.12")]
+ public unowned string get_source_state_name ();
+ [Deprecated (since = "1.12")]
+ public unowned string get_target_state_name ();
+ [Deprecated (since = "1.12")]
+ public bool get_value (GLib.Value value);
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_swipe_action_get_type ()")]
+ public class SwipeAction : Clutter.GestureAction {
+ [CCode (has_construct_function = false, type = "ClutterAction*")]
+ public SwipeAction ();
+ [Deprecated (since = "1.14")]
+ public virtual signal void swept (Clutter.Actor actor, Clutter.SwipeDirection direction);
+ public virtual signal bool swipe (Clutter.Actor actor, Clutter.SwipeDirection direction);
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_table_layout_get_type ()")]
+ [Deprecated (since = "1.18")]
+ public class TableLayout : Clutter.LayoutManager {
+ [CCode (has_construct_function = false, type = "ClutterLayoutManager*")]
+ public TableLayout ();
+ [Deprecated (since = "1.12")]
+ public void get_alignment (Clutter.Actor actor, out Clutter.TableAlignment x_align, out Clutter.TableAlignment y_align);
+ public int get_column_count ();
+ public uint get_column_spacing ();
+ [Deprecated (since = "1.12")]
+ public uint get_easing_duration ();
+ [Deprecated (since = "1.12")]
+ public ulong get_easing_mode ();
+ [Deprecated (since = "1.12")]
+ public void get_expand (Clutter.Actor actor, out bool x_expand, out bool y_expand);
+ [Deprecated (since = "1.12")]
+ public void get_fill (Clutter.Actor actor, out bool x_fill, out bool y_fill);
+ public int get_row_count ();
+ public uint get_row_spacing ();
+ public void get_span (Clutter.Actor actor, out int column_span, out int row_span);
+ [Deprecated (since = "1.12")]
+ public bool get_use_animations ();
+ public void pack (Clutter.Actor actor, int column, int row);
+ [Deprecated (since = "1.12")]
+ public void set_alignment (Clutter.Actor actor, Clutter.TableAlignment x_align, Clutter.TableAlignment y_align);
+ public void set_column_spacing (uint spacing);
+ [Deprecated (since = "1.12")]
+ public void set_easing_duration (uint msecs);
+ [Deprecated (since = "1.12")]
+ public void set_easing_mode (ulong mode);
+ [Deprecated (since = "1.12")]
+ public void set_expand (Clutter.Actor actor, bool x_expand, bool y_expand);
+ [Deprecated (since = "1.12")]
+ public void set_fill (Clutter.Actor actor, bool x_fill, bool y_fill);
+ public void set_row_spacing (uint spacing);
+ public void set_span (Clutter.Actor actor, int column_span, int row_span);
+ [Deprecated (since = "1.12")]
+ public void set_use_animations (bool animate);
+ public uint column_spacing { get; set; }
+ [Deprecated (since = "1.12")]
+ public uint easing_duration { get; set; }
+ [Deprecated (since = "1.12")]
+ public ulong easing_mode { get; set; }
+ public uint row_spacing { get; set; }
+ [Deprecated (since = "1.12")]
+ public bool use_animations { get; set; }
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_tap_action_get_type ()")]
+ public class TapAction : Clutter.GestureAction {
+ [CCode (has_construct_function = false, type = "ClutterAction*")]
+ public TapAction ();
+ public virtual signal void tap (Clutter.Actor actor);
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_text_get_type ()")]
+ public class Text : Clutter.Actor, Atk.Implementor, Clutter.Animatable, Clutter.Container, Clutter.Scriptable {
+ [CCode (has_construct_function = false, type = "ClutterActor*")]
+ public Text ();
+ public int coords_to_position (float x, float y);
+ public void delete_chars (uint n_chars);
+ public bool delete_selection ();
+ [CCode (has_construct_function = false, type = "ClutterActor*")]
+ public Text.full (string font_name, string text, Clutter.Color color);
+ public bool get_activatable ();
+ public unowned Pango.AttrList get_attributes ();
+ public unowned Clutter.TextBuffer get_buffer ();
+ public string get_chars (ssize_t start_pos, ssize_t end_pos);
+ public Clutter.Color get_color ();
+ public Clutter.Color get_cursor_color ();
+ public int get_cursor_position ();
+ public void get_cursor_rect (out unowned Clutter.Rect rect);
+ public uint get_cursor_size ();
+ public bool get_cursor_visible ();
+ public bool get_editable ();
+ public Pango.EllipsizeMode get_ellipsize ();
+ public Pango.FontDescription get_font_description ();
+ public unowned string get_font_name ();
+ public bool get_justify ();
+ public unowned Pango.Layout get_layout ();
+ public void get_layout_offsets (out int x, out int y);
+ public Pango.Alignment get_line_alignment ();
+ public bool get_line_wrap ();
+ public Pango.WrapMode get_line_wrap_mode ();
+ public int get_max_length ();
+ public unichar get_password_char ();
+ public bool get_selectable ();
+ public Clutter.Color get_selected_text_color ();
+ public string get_selection ();
+ public int get_selection_bound ();
+ public Clutter.Color get_selection_color ();
+ public bool get_single_line_mode ();
+ public unowned string get_text ();
+ public bool get_use_markup ();
+ public void insert_text (string text, ssize_t position);
+ public void insert_unichar (unichar wc);
+ public bool position_to_coords (int position, out float x, out float y, out float line_height = null);
+ public void set_activatable (bool activatable);
+ public void set_attributes (Pango.AttrList? attrs);
+ public void set_buffer (Clutter.TextBuffer buffer);
+ public void set_color (Clutter.Color color);
+ public void set_cursor_color (Clutter.Color? color);
+ public void set_cursor_position (int position);
+ public void set_cursor_size (int size);
+ public void set_cursor_visible (bool cursor_visible);
+ public void set_editable (bool editable);
+ public void set_ellipsize (Pango.EllipsizeMode mode);
+ public void set_font_description (Pango.FontDescription font_desc);
+ public void set_font_name (string? font_name);
+ public void set_justify (bool justify);
+ public void set_line_alignment (Pango.Alignment alignment);
+ public void set_line_wrap (bool line_wrap);
+ public void set_line_wrap_mode (Pango.WrapMode wrap_mode);
+ public void set_markup (string? markup);
+ public void set_max_length (int max);
+ public void set_password_char (unichar wc);
+ public void set_preedit_string (string? preedit_str, Pango.AttrList? preedit_attrs, uint cursor_pos);
+ public void set_selectable (bool selectable);
+ public void set_selected_text_color (Clutter.Color? color);
+ public void set_selection (ssize_t start_pos, ssize_t end_pos);
+ public void set_selection_bound (int selection_bound);
+ public void set_selection_color (Clutter.Color? color);
+ public void set_single_line_mode (bool single_line);
+ public void set_text (string? text);
+ public void set_use_markup (bool setting);
+ [CCode (cname = "clutter_text_activate")]
+ public bool try_activate ();
+ [CCode (has_construct_function = false, type = "ClutterActor*")]
+ public Text.with_buffer (Clutter.TextBuffer buffer);
+ [CCode (has_construct_function = false, type = "ClutterActor*")]
+ public Text.with_text (string? font_name, string text);
+ public bool activatable { get; set; }
+ public Pango.AttrList attributes { get; set; }
+ public Clutter.TextBuffer buffer { get; set; }
+ public Clutter.Color color { get; set; }
+ public Clutter.Color cursor_color { get; set; }
+ [NoAccessorMethod]
+ public bool cursor_color_set { get; }
+ public int cursor_position { get; set; }
+ public int cursor_size { get; set; }
+ public bool cursor_visible { get; set; }
+ public bool editable { get; set; }
+ public Pango.EllipsizeMode ellipsize { get; set; }
+ public Pango.FontDescription font_description { owned get; set; }
+ public string font_name { get; set; }
+ public bool justify { get; set; }
+ public Pango.Alignment line_alignment { get; set; }
+ public bool line_wrap { get; set; }
+ public Pango.WrapMode line_wrap_mode { get; set; }
+ public int max_length { get; set; }
+ public uint password_char { get; set; }
+ [Deprecated (since = "1.12")]
+ [NoAccessorMethod]
+ public int position { get; set; }
+ public bool selectable { get; set; }
+ public Clutter.Color selected_text_color { get; set; }
+ [NoAccessorMethod]
+ public bool selected_text_color_set { get; }
+ public int selection_bound { get; set; }
+ public Clutter.Color selection_color { get; set; }
+ [NoAccessorMethod]
+ public bool selection_color_set { get; }
+ public bool single_line_mode { get; set; }
+ public string text { get; set; }
+ public bool use_markup { get; set; }
+ public virtual signal void activate ();
+ public virtual signal void cursor_changed ();
+ [Deprecated (since = "1.16")]
+ public virtual signal void cursor_event (Clutter.Geometry geometry);
+ [HasEmitter]
+ public signal void delete_text (int start_pos, int end_pos);
+ public virtual signal void text_changed ();
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_text_buffer_get_type ()")]
+ public class TextBuffer : GLib.Object {
+ [CCode (has_construct_function = false)]
+ public TextBuffer ();
+ public virtual uint delete_text (uint position, uint n_chars);
+ public void emit_deleted_text (uint position, uint n_chars);
+ public void emit_inserted_text (uint position, string chars, uint n_chars);
+ public size_t get_bytes ();
+ public virtual uint get_length ();
+ public int get_max_length ();
+ public unowned string get_text ();
+ [CCode (vfunc_name = "get_text")]
+ [NoWrapper]
+ public virtual unowned string get_text_with_length (size_t n_bytes);
+ public virtual uint insert_text (uint position, string chars, uint n_chars);
+ public void set_max_length (int max_length);
+ public void set_text (string chars, int n_chars);
+ [CCode (has_construct_function = false)]
+ public TextBuffer.with_text (string? text, ssize_t text_len);
+ public uint length { get; }
+ public int max_length { get; set; }
+ public string text { get; }
+ public virtual signal void deleted_text (uint position, uint n_chars);
+ public virtual signal void inserted_text (uint position, string chars, uint n_chars);
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_text_node_get_type ()")]
+ public class TextNode : Clutter.PaintNode {
+ [CCode (has_construct_function = false, type = "ClutterPaintNode*")]
+ public TextNode (Pango.Layout? layout, Clutter.Color? color);
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_texture_get_type ()")]
+ public class Texture : Clutter.Actor, Atk.Implementor, Clutter.Animatable, Clutter.Scriptable, Atk.Implementor, Clutter.Animatable, Clutter.Container, Clutter.Scriptable {
+ [CCode (has_construct_function = false, type = "ClutterActor*")]
+ [Deprecated (since = "1.12")]
+ public Texture ();
+ [CCode (has_construct_function = false, type = "ClutterActor*")]
+ [Deprecated (since = "1.8")]
+ public Texture.from_actor (Clutter.Actor actor);
+ [CCode (has_construct_function = false, type = "ClutterActor*")]
+ [Deprecated (since = "1.12")]
+ public Texture.from_file (string filename) throws Clutter.TextureError;
+ [Deprecated (since = "1.12")]
+ public void get_base_size (out int width, out int height);
+ [Deprecated (since = "1.12")]
+ public unowned Cogl.Handle get_cogl_material ();
+ [Deprecated (since = "1.12")]
+ public unowned Cogl.Handle get_cogl_texture ();
+ [Deprecated (since = "1.12")]
+ public Clutter.TextureQuality get_filter_quality ();
+ [Deprecated (since = "1.12")]
+ public bool get_keep_aspect_ratio ();
+ [Deprecated (since = "1.12")]
+ public bool get_load_async ();
+ [Deprecated (since = "1.12")]
+ public bool get_load_data_async ();
+ [Deprecated (since = "1.12")]
+ public int get_max_tile_waste ();
+ [Deprecated (since = "1.12")]
+ public bool get_pick_with_alpha ();
+ [Deprecated (since = "1.12")]
+ public Cogl.PixelFormat get_pixel_format ();
+ [Deprecated (since = "1.12")]
+ public void get_repeat (out bool repeat_x, out bool repeat_y);
+ [Deprecated (since = "1.12")]
+ public bool get_sync_size ();
+ [Deprecated (since = "1.12")]
+ public bool set_area_from_rgb_data ([CCode (array_length = false)] uint8[] data, bool has_alpha, int x, int y, int width, int height, int rowstride, int bpp, Clutter.TextureFlags flags) throws GLib.Error;
+ [Deprecated (since = "1.12")]
+ public void set_cogl_material (Cogl.Handle cogl_material);
+ [Deprecated (since = "1.12")]
+ public void set_cogl_texture (Cogl.Handle cogl_tex);
+ [Deprecated (since = "1.12")]
+ public void set_filter_quality (Clutter.TextureQuality filter_quality);
+ [Deprecated (since = "1.12")]
+ public bool set_from_file (string filename) throws GLib.Error;
+ [Deprecated (since = "1.12")]
+ public bool set_from_rgb_data ([CCode (array_length = false)] uint8[] data, bool has_alpha, int width, int height, int rowstride, int bpp, Clutter.TextureFlags flags) throws GLib.Error;
+ [Deprecated (since = "1.10")]
+ public bool set_from_yuv_data ([CCode (array_length = false)] uint8[] data, int width, int height, Clutter.TextureFlags flags) throws GLib.Error;
+ [Deprecated (since = "1.12")]
+ public void set_keep_aspect_ratio (bool keep_aspect);
+ [Deprecated (since = "1.12")]
+ public void set_load_async (bool load_async);
+ [Deprecated (since = "1.12")]
+ public void set_load_data_async (bool load_async);
+ [Deprecated (since = "1.12")]
+ public void set_pick_with_alpha (bool pick_with_alpha);
+ [Deprecated (since = "1.12")]
+ public void set_repeat (bool repeat_x, bool repeat_y);
+ [Deprecated (since = "1.12")]
+ public void set_sync_size (bool sync_size);
+ public Cogl.Material cogl_material { get; set; }
+ public Cogl.Texture cogl_texture { get; set; }
+ [NoAccessorMethod]
+ public bool disable_slicing { get; construct; }
+ [Deprecated (since = "1.12")]
+ [NoAccessorMethod]
+ public string filename { owned get; set; }
+ public Clutter.TextureQuality filter_quality { get; set construct; }
+ public bool keep_aspect_ratio { get; set; }
+ [Deprecated (since = "1.12")]
+ public bool load_async { set; }
+ [Deprecated (since = "1.12")]
+ public bool load_data_async { set; }
+ public bool pick_with_alpha { get; set; }
+ public Cogl.PixelFormat pixel_format { get; }
+ [NoAccessorMethod]
+ public bool repeat_x { get; set; }
+ [NoAccessorMethod]
+ public bool repeat_y { get; set; }
+ public bool sync_size { get; set; }
+ [NoAccessorMethod]
+ public int tile_waste { get; }
+ [Deprecated (since = "1.12")]
+ public virtual signal void load_finished (GLib.Error error);
+ [Deprecated (since = "1.12")]
+ public virtual signal void pixbuf_change ();
+ [Deprecated (since = "1.12")]
+ public virtual signal void size_change (int width, int height);
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_texture_node_get_type ()")]
+ public class TextureNode : Clutter.PipelineNode {
+ [CCode (has_construct_function = false, type = "ClutterPaintNode*")]
+ public TextureNode (Cogl.Texture texture, Clutter.Color? color, Clutter.ScalingFilter min_filter, Clutter.ScalingFilter mag_filter);
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_timeline_get_type ()")]
+ public class Timeline : GLib.Object, Clutter.Scriptable {
+ [CCode (has_construct_function = false)]
+ public Timeline (uint msecs);
+ public void add_marker (string marker_name, double progress);
+ public void add_marker_at_time (string marker_name, uint msecs);
+ public void advance (uint msecs);
+ public void advance_to_marker (string marker_name);
+ [Deprecated (since = "1.10")]
+ public Clutter.Timeline clone ();
+ public bool get_auto_reverse ();
+ public bool get_cubic_bezier_progress (Clutter.Point c_1, Clutter.Point c_2);
+ public int get_current_repeat ();
+ public uint get_delay ();
+ public uint get_delta ();
+ public Clutter.TimelineDirection get_direction ();
+ public uint get_duration ();
+ public int64 get_duration_hint ();
+ public uint get_elapsed_time ();
+ [Deprecated (since = "1.10")]
+ public bool get_loop ();
+ public double get_progress ();
+ public Clutter.AnimationMode get_progress_mode ();
+ public int get_repeat_count ();
+ public bool get_step_progress (out int n_steps, out Clutter.StepMode step_mode);
+ public bool has_marker (string marker_name);
+ public bool is_playing ();
+ [CCode (array_length_pos = 1.1, array_length_type = "gsize", array_null_terminated = true)]
+ public string[] list_markers (int msecs);
+ public void pause ();
+ public void remove_marker (string marker_name);
+ public void rewind ();
+ public void set_auto_reverse (bool reverse);
+ public void set_cubic_bezier_progress (Clutter.Point c_1, Clutter.Point c_2);
+ public void set_delay (uint msecs);
+ public void set_direction (Clutter.TimelineDirection direction);
+ public void set_duration (uint msecs);
+ [Deprecated (since = "1.10")]
+ public void set_loop (bool loop);
+ public void set_progress_func (owned Clutter.TimelineProgressFunc? func);
+ public void set_progress_mode (Clutter.AnimationMode mode);
+ public void set_repeat_count (int count);
+ public void set_step_progress (int n_steps, Clutter.StepMode step_mode);
+ public void skip (uint msecs);
+ public void start ();
+ public void stop ();
+ public bool auto_reverse { get; set; }
+ public uint delay { get; set; }
+ public Clutter.TimelineDirection direction { get; set; }
+ public uint duration { get; set; }
+ [Deprecated (since = "1.10")]
+ public bool loop { get; set; }
+ public Clutter.AnimationMode progress_mode { get; set; }
+ public int repeat_count { get; set; }
+ public virtual signal void completed ();
+ public virtual signal void marker_reached (string marker_name, int msecs);
+ public virtual signal void new_frame (int msecs);
+ public virtual signal void paused ();
+ public virtual signal void started ();
+ public virtual signal void stopped (bool is_finished);
+ }
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ [Compact]
+ [Deprecated (since = "1.6")]
+ public class TimeoutPool {
+ [CCode (has_construct_function = false)]
+ public TimeoutPool (int priority);
+ public uint add (uint fps, owned GLib.SourceFunc func);
+ public void remove (uint id_);
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_transition_get_type ()")]
+ public abstract class Transition : Clutter.Timeline, Clutter.Scriptable {
+ [CCode (has_construct_function = false)]
+ protected Transition ();
+ [NoWrapper]
+ public virtual void attached (Clutter.Animatable animatable);
+ [NoWrapper]
+ public virtual void compute_value (Clutter.Animatable animatable, Clutter.Interval interval, double progress);
+ [NoWrapper]
+ public virtual void detached (Clutter.Animatable animatable);
+ public unowned Clutter.Animatable get_animatable ();
+ public unowned Clutter.Interval get_interval ();
+ public bool get_remove_on_complete ();
+ public void set_animatable (Clutter.Animatable? animatable);
+ public void set_from_value (GLib.Value value);
+ public void set_interval (Clutter.Interval? interval);
+ public void set_remove_on_complete (bool remove_complete);
+ public void set_to_value (GLib.Value value);
+ public Clutter.Animatable animatable { get; set; }
+ public Clutter.Interval interval { get; set; }
+ public bool remove_on_complete { get; set; }
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_transition_group_get_type ()")]
+ public class TransitionGroup : Clutter.Transition, Clutter.Scriptable {
+ [CCode (has_construct_function = false, type = "ClutterTransition*")]
+ public TransitionGroup ();
+ public void add_transition (Clutter.Transition transition);
+ public void remove_all ();
+ public void remove_transition (Clutter.Transition transition);
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_zoom_action_get_type ()")]
+ public class ZoomAction : Clutter.GestureAction {
+ [CCode (has_construct_function = false, type = "ClutterAction*")]
+ public ZoomAction ();
+ public void get_focal_point (Clutter.Point point);
+ public void get_transformed_focal_point (Clutter.Point point);
+ public Clutter.ZoomAxis get_zoom_axis ();
+ public void set_zoom_axis (Clutter.ZoomAxis axis);
+ public Clutter.ZoomAxis zoom_axis { get; set; }
+ public virtual signal bool zoom (Clutter.Actor actor, Clutter.Point focal_point, double factor);
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_animatable_get_type ()")]
+ public interface Animatable : GLib.Object {
+ [Deprecated (since = "1.8")]
+ public abstract bool animate_property (Clutter.Animation animation, string property_name, GLib.Value initial_value, GLib.Value final_value, double progress, GLib.Value value);
+ public abstract unowned GLib.ParamSpec find_property (string property_name);
+ public abstract void get_initial_state (string property_name, GLib.Value value);
+ public abstract bool interpolate_value (string property_name, Clutter.Interval interval, double progress, out GLib.Value value);
+ public abstract void set_final_state (string property_name, GLib.Value value);
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_container_get_type ()")]
+ public interface Container : GLib.Object {
+ public void add (params Clutter.Actor[] actors);
+ [CCode (vfunc_name = "add")]
+ [Deprecated (since = "1.10")]
+ public abstract void add_actor (Clutter.Actor actor);
+ [Deprecated (since = "1.10")]
+ public void add_valist (Clutter.Actor first_actor, va_list var_args);
+ public void child_get (Clutter.Actor actor, ...);
+ public void child_get_property (Clutter.Actor child, string property, GLib.Value value);
+ public void child_set (Clutter.Actor actor, ...);
+ public void child_set_property (Clutter.Actor child, string property, GLib.Value value);
+ public static unowned GLib.ParamSpec class_find_child_property (GLib.ObjectClass klass, string property_name);
+ [CCode (array_length_pos = 1.1, array_length_type = "guint")]
+ public static GLib.ParamSpec[] class_list_child_properties (GLib.ObjectClass klass);
+ public virtual void create_child_meta (Clutter.Actor actor);
+ public virtual void destroy_child_meta (Clutter.Actor actor);
+ public unowned Clutter.Actor find_child_by_name (string child_name);
+ [CCode (cname = "clutter_container_class_find_child_property")]
+ public class unowned GLib.ParamSpec find_child_property (string property_name);
+ [Deprecated (since = "1.10")]
+ public abstract void @foreach (Clutter.Callback callback);
+ [Deprecated (since = "1.10")]
+ public virtual void foreach_with_internals (Clutter.Callback callback);
+ public virtual unowned Clutter.ChildMeta get_child_meta (Clutter.Actor actor);
+ [Deprecated (since = "1.10")]
+ public GLib.List<weak Clutter.Actor> get_children ();
+ [CCode (cname = "clutter_container_class_list_child_properties")]
+ public class unowned GLib.ParamSpec[] list_child_properties ();
+ [CCode (vfunc_name = "lower")]
+ [Deprecated (since = "1.10")]
+ public virtual void lower_child (Clutter.Actor actor, Clutter.Actor? sibling = null);
+ [CCode (vfunc_name = "raise")]
+ [Deprecated (since = "1.10")]
+ public virtual void raise_child (Clutter.Actor actor, Clutter.Actor? sibling = null);
+ [Deprecated (since = "1.10")]
+ public void remove (...);
+ [CCode (vfunc_name = "remove")]
+ [Deprecated (since = "1.10")]
+ public abstract void remove_actor (Clutter.Actor actor);
+ [Deprecated (since = "1.10")]
+ public void remove_valist (Clutter.Actor first_actor, va_list var_args);
+ [Deprecated (since = "1.10")]
+ public abstract void sort_depth_order ();
+ public virtual signal void actor_added (Clutter.Actor actor);
+ public virtual signal void actor_removed (Clutter.Actor actor);
+ [HasEmitter]
+ public virtual signal void child_notify (Clutter.Actor child, GLib.ParamSpec pspec);
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_content_get_type ()")]
+ public interface Content : GLib.Object {
+ public abstract bool get_preferred_size (out float width, out float height);
+ public abstract void invalidate ();
+ [NoWrapper]
+ public abstract void paint_content (Clutter.Actor actor, Clutter.PaintNode node);
+ public virtual signal void attached (Clutter.Actor actor);
+ public virtual signal void detached (Clutter.Actor actor);
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_media_get_type ()")]
+ public interface Media : GLib.Object {
+ [Deprecated (since = "1.12")]
+ public double get_audio_volume ();
+ [Deprecated (since = "1.12")]
+ public double get_buffer_fill ();
+ [Deprecated (since = "1.12")]
+ public bool get_can_seek ();
+ [Deprecated (since = "1.12")]
+ public double get_duration ();
+ [Deprecated (since = "1.12")]
+ public bool get_playing ();
+ [Deprecated (since = "1.12")]
+ public double get_progress ();
+ [Deprecated (since = "1.12")]
+ public string get_subtitle_font_name ();
+ [Deprecated (since = "1.12")]
+ public string get_subtitle_uri ();
+ [Deprecated (since = "1.12")]
+ public string get_uri ();
+ [Deprecated (since = "1.12")]
+ public void set_audio_volume (double volume);
+ [Deprecated (since = "1.12")]
+ public void set_filename (string filename);
+ [Deprecated (since = "1.12")]
+ public void set_playing (bool playing);
+ [Deprecated (since = "1.12")]
+ public void set_progress (double progress);
+ [Deprecated (since = "1.12")]
+ public void set_subtitle_font_name (string font_name);
+ [Deprecated (since = "1.12")]
+ public void set_subtitle_uri (string uri);
+ [Deprecated (since = "1.12")]
+ public void set_uri (string uri);
+ [ConcreteAccessor]
+ [Deprecated (since = "1.12")]
+ public abstract double audio_volume { get; set; }
+ [ConcreteAccessor]
+ [Deprecated (since = "1.12")]
+ public abstract double buffer_fill { get; }
+ [ConcreteAccessor]
+ [Deprecated (since = "1.12")]
+ public abstract bool can_seek { get; }
+ [ConcreteAccessor]
+ [Deprecated (since = "1.12")]
+ public abstract double duration { get; }
+ [ConcreteAccessor]
+ [Deprecated (since = "1.12")]
+ public abstract bool playing { get; set; }
+ [ConcreteAccessor]
+ [Deprecated (since = "1.12")]
+ public abstract double progress { get; set; }
+ [ConcreteAccessor]
+ [Deprecated (since = "1.12")]
+ public abstract string subtitle_font_name { owned get; set; }
+ [ConcreteAccessor]
+ [Deprecated (since = "1.12")]
+ public abstract string subtitle_uri { owned get; set; }
+ [ConcreteAccessor]
+ [Deprecated (since = "1.12")]
+ public abstract string uri { owned get; set; }
+ [Deprecated (since = "1.12")]
+ public virtual signal void eos ();
+ [Deprecated (since = "1.12")]
+ public virtual signal void error (GLib.Error error);
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_scriptable_get_type ()")]
+ public interface Scriptable : GLib.Object {
+ public abstract unowned string get_id ();
+ public abstract bool parse_custom_node (Clutter.Script script, GLib.Value value, string name, Json.Node node);
+ public abstract void set_custom_property (Clutter.Script script, string name, GLib.Value value);
+ public abstract void set_id (string id_);
+ }
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ public interface StageWindow : GLib.Object {
+ [NoWrapper]
+ public abstract void add_redraw_clip (Clutter.Geometry stage_rectangle);
+ [NoWrapper]
+ public abstract void get_geometry (Clutter.Geometry geometry);
+ [NoWrapper]
+ public abstract int get_pending_swaps ();
+ [NoWrapper]
+ public abstract unowned Clutter.Actor get_wrapper ();
+ [NoWrapper]
+ public abstract bool has_redraw_clips ();
+ [NoWrapper]
+ public abstract void hide ();
+ [NoWrapper]
+ public abstract bool ignoring_redraw_clips ();
+ [NoWrapper]
+ public abstract bool realize ();
+ [NoWrapper]
+ public abstract void resize (int width, int height);
+ [NoWrapper]
+ public abstract void set_cursor_visible (bool cursor_visible);
+ [NoWrapper]
+ public abstract void set_fullscreen (bool is_fullscreen);
+ [NoWrapper]
+ public abstract void set_title (string title);
+ [NoWrapper]
+ public abstract void set_user_resizable (bool is_resizable);
+ [NoWrapper]
+ public abstract void show (bool do_raise);
+ [NoWrapper]
+ public abstract void unrealize ();
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "CLUTTER_TYPE_ACTOR_BOX")]
+ public struct ActorBox {
+ public float x1;
+ public float y1;
+ public float x2;
+ public float y2;
+ public static Clutter.ActorBox? alloc ();
+ public void clamp_to_pixel ();
+ public bool contains (float x, float y);
+ public Clutter.ActorBox? copy ();
+ public bool equal (Clutter.ActorBox box_b);
+ public void free ();
+ [CCode (cname = "clutter_actor_box_from_vertices")]
+ public ActorBox.from_vertices (Clutter.Vertex[] verts);
+ public float get_area ();
+ public float get_height ();
+ public void get_origin (out float x, out float y);
+ public void get_size (out float width, out float height);
+ public float get_width ();
+ public float get_x ();
+ public float get_y ();
+ public unowned Clutter.ActorBox? init (float x_1, float y_1, float x_2, float y_2);
+ public void init_rect (float x, float y, float width, float height);
+ public Clutter.ActorBox interpolate (Clutter.ActorBox final, double progress);
+ public void set_origin (float x, float y);
+ public void set_size (float width, float height);
+ public Clutter.ActorBox union (Clutter.ActorBox b);
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", has_type_id = false)]
+ public struct ActorIter {
+ public void destroy ();
+ public void init (Clutter.Actor root);
+ public bool is_valid ();
+ public bool next (out unowned Clutter.Actor child);
+ public bool prev (out unowned Clutter.Actor child);
+ public void remove ();
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", has_type_id = false)]
+ public struct AnyEvent {
+ public Clutter.EventType type;
+ public uint32 time;
+ public Clutter.EventFlags flags;
+ public weak Clutter.Stage stage;
+ public weak Clutter.Actor source;
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", has_type_id = false)]
+ public struct ButtonEvent {
+ public Clutter.EventType type;
+ public uint32 time;
+ public Clutter.EventFlags flags;
+ public weak Clutter.Stage stage;
+ public weak Clutter.Actor source;
+ public float x;
+ public float y;
+ public Clutter.ModifierType modifier_state;
+ public uint32 button;
+ public uint click_count;
+ public double axes;
+ public weak Clutter.InputDevice device;
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "CLUTTER_TYPE_COLOR")]
+ public struct Color {
+ public uint8 red;
+ public uint8 green;
+ public uint8 blue;
+ public uint8 alpha;
+ public Clutter.Color add (Clutter.Color b);
+ public static Clutter.Color? alloc ();
+ public Clutter.Color? copy ();
+ public Clutter.Color darken ();
+ public bool equal (Clutter.Color v2);
+ public void free ();
+ [CCode (cname = "clutter_color_from_hls")]
+ public Color.from_hls (float hue, float luminance, float saturation);
+ [CCode (cname = "clutter_color_from_pixel")]
+ public Color.from_pixel (uint32 pixel);
+ [CCode (cname = "clutter_color_from_string")]
+ public Color.from_string (string str);
+ public static unowned Clutter.Color? get_static (Clutter.StaticColor color);
+ public uint hash ();
+ public unowned Clutter.Color? init (uint8 red, uint8 green, uint8 blue, uint8 alpha);
+ public Clutter.Color interpolate (Clutter.Color final, double progress);
+ public Clutter.Color lighten ();
+ [CCode (cname = "clutter_color_from_string")]
+ public bool parse_string (string str);
+ public Clutter.Color shade (double factor);
+ public Clutter.Color subtract (Clutter.Color b);
+ public void to_hls (out float hue, out float luminance, out float saturation);
+ public uint32 to_pixel ();
+ public string to_string ();
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", has_type_id = false)]
+ public struct CrossingEvent {
+ public Clutter.EventType type;
+ public uint32 time;
+ public Clutter.EventFlags flags;
+ public weak Clutter.Stage stage;
+ public weak Clutter.Actor source;
+ public float x;
+ public float y;
+ public weak Clutter.InputDevice device;
+ public weak Clutter.Actor related;
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_fog_get_type ()")]
+ [Deprecated (since = "1.10")]
+ public struct Fog {
+ public float z_near;
+ public float z_far;
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_geometry_get_type ()")]
+ [Deprecated (since = "1.16")]
+ public struct Geometry {
+ public int x;
+ public int y;
+ public uint width;
+ public uint height;
+ public bool intersects (Clutter.Geometry geometry1);
+ public Clutter.Geometry union (Clutter.Geometry geometry_b);
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", has_type_id = false)]
+ public struct KeyEvent {
+ public Clutter.EventType type;
+ public uint32 time;
+ public Clutter.EventFlags flags;
+ public weak Clutter.Stage stage;
+ public weak Clutter.Actor source;
+ public Clutter.ModifierType modifier_state;
+ public uint keyval;
+ public uint16 hardware_keycode;
+ public unichar unicode_value;
+ public weak Clutter.InputDevice device;
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_knot_get_type ()")]
+ public struct Knot {
+ public int x;
+ public int y;
+ public Clutter.Knot? copy ();
+ public bool equal (Clutter.Knot knot_b);
+ public void free ();
+ }
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ public struct Matrix : Cogl.Matrix {
+ public static Clutter.Matrix? alloc ();
+ public static void free (Clutter.Matrix? matrix);
+ public static GLib.Type get_type ();
+ public static unowned Clutter.Matrix? init_from_array (Clutter.Matrix matrix, [CCode (array_length = false)] float[] values);
+ public static unowned Clutter.Matrix? init_from_matrix (Clutter.Matrix a, Clutter.Matrix b);
+ public static unowned Clutter.Matrix? init_identity (Clutter.Matrix matrix);
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", has_type_id = false)]
+ public struct MotionEvent {
+ public Clutter.EventType type;
+ public uint32 time;
+ public Clutter.EventFlags flags;
+ public weak Clutter.Stage stage;
+ public weak Clutter.Actor source;
+ public float x;
+ public float y;
+ public Clutter.ModifierType modifier_state;
+ public double axes;
+ public weak Clutter.InputDevice device;
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_path_node_get_type ()")]
+ public struct PathNode {
+ public Clutter.PathNodeType type;
+ [CCode (array_length = false, array_null_terminated = true)]
+ public weak Clutter.Knot[] points;
+ public Clutter.PathNode? copy ();
+ public bool equal (Clutter.PathNode node_b);
+ public void free ();
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_perspective_get_type ()")]
+ public struct Perspective {
+ public float fovy;
+ public float aspect;
+ public float z_near;
+ public float z_far;
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", has_type_id = false)]
+ public class ScrollEvent : Event {
+ public Clutter.EventType type;
+ public uint32 time;
+ public Clutter.EventFlags flags;
+ public weak Clutter.Stage stage;
+ public weak Clutter.Actor source;
+ public float x;
+ public float y;
+ public Clutter.ScrollDirection direction;
+ public Clutter.ModifierType modifier_state;
+ public double axes;
+ public weak Clutter.InputDevice device;
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", has_type_id = false)]
+ public struct StageStateEvent {
+ public Clutter.EventType type;
+ public uint32 time;
+ public Clutter.EventFlags flags;
+ public weak Clutter.Stage stage;
+ public weak Clutter.Actor source;
+ public Clutter.StageState changed_mask;
+ public Clutter.StageState new_state;
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", has_type_id = false)]
+ public struct TouchEvent {
+ public Clutter.EventType type;
+ public uint32 time;
+ public Clutter.EventFlags flags;
+ public weak Clutter.Stage stage;
+ public weak Clutter.Actor source;
+ public float x;
+ public float y;
+ public weak Clutter.EventSequence sequence;
+ public Clutter.ModifierType modifier_state;
+ public double axes;
+ public weak Clutter.InputDevice device;
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", has_type_id = false)]
+ public struct TouchpadPinchEvent {
+ public Clutter.EventType type;
+ public uint32 time;
+ public Clutter.EventFlags flags;
+ public weak Clutter.Stage stage;
+ public weak Clutter.Actor source;
+ public Clutter.TouchpadGesturePhase phase;
+ public float x;
+ public float y;
+ public float dx;
+ public float dy;
+ public float angle_delta;
+ public float scale;
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", has_type_id = false)]
+ public struct TouchpadSwipeEvent {
+ public Clutter.EventType type;
+ public uint32 time;
+ public Clutter.EventFlags flags;
+ public weak Clutter.Stage stage;
+ public weak Clutter.Actor source;
+ public Clutter.TouchpadGesturePhase phase;
+ public uint n_fingers;
+ public float x;
+ public float y;
+ public float dx;
+ public float dy;
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "CLUTTER_TYPE_UNITS")]
+ public struct Units {
+ public Clutter.Units? copy ();
+ public void free ();
+ [CCode (cname = "clutter_units_from_cm")]
+ public Units.from_cm (float cm);
+ [CCode (cname = "clutter_units_from_em")]
+ public Units.from_em (float em);
+ [CCode (cname = "clutter_units_from_em_for_font")]
+ public Units.from_em_for_font (string font_name, float em);
+ [CCode (cname = "clutter_units_from_mm")]
+ public Units.from_mm (float mm);
+ [CCode (cname = "clutter_units_from_pixels")]
+ public Units.from_pixels (int px);
+ [CCode (cname = "clutter_units_from_pt")]
+ public Units.from_pt (float pt);
+ [CCode (cname = "clutter_units_from_string")]
+ public Units.from_string (string str);
+ public Clutter.UnitType get_unit_type ();
+ public float get_unit_value ();
+ public float to_pixels ();
+ public string to_string ();
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_vertex_get_type ()")]
+ public struct Vertex {
+ public float x;
+ public float y;
+ public float z;
+ public static Clutter.Vertex? alloc ();
+ public Clutter.Vertex? copy ();
+ public bool equal (Clutter.Vertex vertex_b);
+ public void free ();
+ public unowned Clutter.Vertex? init (float x, float y, float z);
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_ACTOR_ALIGN_", type_id = "clutter_actor_align_get_type ()")]
+ public enum ActorAlign {
+ FILL,
+ START,
+ CENTER,
+ END
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_ACTOR_", type_id = "clutter_actor_flags_get_type ()")]
+ [Flags]
+ public enum ActorFlags {
+ MAPPED,
+ REALIZED,
+ REACTIVE,
+ VISIBLE,
+ NO_LAYOUT
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_ALIGN_", type_id = "clutter_align_axis_get_type ()")]
+ public enum AlignAxis {
+ X_AXIS,
+ Y_AXIS,
+ BOTH
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_", type_id = "clutter_allocation_flags_get_type ()")]
+ [Flags]
+ public enum AllocationFlags {
+ ALLOCATION_NONE,
+ ABSOLUTE_ORIGIN_CHANGED,
+ DELEGATE_LAYOUT
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_", type_id = "clutter_animation_mode_get_type ()")]
+ public enum AnimationMode {
+ CUSTOM_MODE,
+ LINEAR,
+ EASE_IN_QUAD,
+ EASE_OUT_QUAD,
+ EASE_IN_OUT_QUAD,
+ EASE_IN_CUBIC,
+ EASE_OUT_CUBIC,
+ EASE_IN_OUT_CUBIC,
+ EASE_IN_QUART,
+ EASE_OUT_QUART,
+ EASE_IN_OUT_QUART,
+ EASE_IN_QUINT,
+ EASE_OUT_QUINT,
+ EASE_IN_OUT_QUINT,
+ EASE_IN_SINE,
+ EASE_OUT_SINE,
+ EASE_IN_OUT_SINE,
+ EASE_IN_EXPO,
+ EASE_OUT_EXPO,
+ EASE_IN_OUT_EXPO,
+ EASE_IN_CIRC,
+ EASE_OUT_CIRC,
+ EASE_IN_OUT_CIRC,
+ EASE_IN_ELASTIC,
+ EASE_OUT_ELASTIC,
+ EASE_IN_OUT_ELASTIC,
+ EASE_IN_BACK,
+ EASE_OUT_BACK,
+ EASE_IN_OUT_BACK,
+ EASE_IN_BOUNCE,
+ EASE_OUT_BOUNCE,
+ EASE_IN_OUT_BOUNCE,
+ STEPS,
+ STEP_START,
+ STEP_END,
+ CUBIC_BEZIER,
+ EASE,
+ EASE_IN,
+ EASE_OUT,
+ EASE_IN_OUT,
+ ANIMATION_LAST
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_BIN_ALIGNMENT_", type_id = "clutter_bin_alignment_get_type ()")]
+ public enum BinAlignment {
+ [Deprecated]
+ FIXED,
+ [Deprecated]
+ FILL,
+ START,
+ [Deprecated]
+ END,
+ [Deprecated]
+ CENTER
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_BIND_", type_id = "clutter_bind_coordinate_get_type ()")]
+ public enum BindCoordinate {
+ X,
+ Y,
+ WIDTH,
+ HEIGHT,
+ POSITION,
+ SIZE,
+ ALL
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_BOX_ALIGNMENT_", type_id = "clutter_box_alignment_get_type ()")]
+ public enum BoxAlignment {
+ START,
+ END,
+ CENTER
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_CONTENT_GRAVITY_", type_id = "clutter_content_gravity_get_type ()")]
+ public enum ContentGravity {
+ TOP_LEFT,
+ TOP,
+ TOP_RIGHT,
+ LEFT,
+ CENTER,
+ RIGHT,
+ BOTTOM_LEFT,
+ BOTTOM,
+ BOTTOM_RIGHT,
+ RESIZE_FILL,
+ RESIZE_ASPECT
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_REPEAT_", type_id = "clutter_content_repeat_get_type ()")]
+ [Flags]
+ public enum ContentRepeat {
+ NONE,
+ X_AXIS,
+ Y_AXIS,
+ BOTH
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_DRAG_", type_id = "clutter_drag_axis_get_type ()")]
+ public enum DragAxis {
+ AXIS_NONE,
+ X_AXIS,
+ Y_AXIS
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_EFFECT_PAINT_ACTOR_", type_id = "clutter_effect_paint_flags_get_type ()")]
+ [Flags]
+ public enum EffectPaintFlags {
+ [CCode (cname = "CLUTTER_EFFECT_PAINT_ACTOR_DIRTY")]
+ ACTOR_DIRTY
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_EVENT_", type_id = "clutter_event_flags_get_type ()")]
+ [Flags]
+ public enum EventFlags {
+ NONE,
+ FLAG_SYNTHETIC
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_", type_id = "clutter_event_type_get_type ()")]
+ public enum EventType {
+ NOTHING,
+ KEY_PRESS,
+ KEY_RELEASE,
+ MOTION,
+ ENTER,
+ LEAVE,
+ BUTTON_PRESS,
+ BUTTON_RELEASE,
+ SCROLL,
+ STAGE_STATE,
+ DESTROY_NOTIFY,
+ CLIENT_MESSAGE,
+ DELETE,
+ TOUCH_BEGIN,
+ TOUCH_UPDATE,
+ TOUCH_END,
+ TOUCH_CANCEL,
+ TOUCHPAD_PINCH,
+ TOUCHPAD_SWIPE,
+ EVENT_LAST
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_FEATURE_")]
+ [Flags]
+ public enum FeatureFlags {
+ TEXTURE_NPOT,
+ SYNC_TO_VBLANK,
+ TEXTURE_YUV,
+ TEXTURE_READ_PIXELS,
+ STAGE_STATIC,
+ STAGE_USER_RESIZE,
+ STAGE_CURSOR,
+ SHADERS_GLSL,
+ OFFSCREEN,
+ STAGE_MULTIPLE,
+ SWAP_EVENTS;
+ [CCode (cname = "clutter_feature_available")]
+ public bool is_available ();
+ [CCode (cname = "clutter_feature_get_all")]
+ public static Clutter.FeatureFlags @get ();
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_FLOW_", type_id = "clutter_flow_orientation_get_type ()")]
+ public enum FlowOrientation {
+ HORIZONTAL,
+ VERTICAL
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_FONT_", type_id = "clutter_font_flags_get_type ()")]
+ [Deprecated (since = "1.22")]
+ [Flags]
+ public enum FontFlags {
+ MIPMAPPING,
+ HINTING
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_GESTURE_TRIGGER_EDGE_", type_id = "clutter_gesture_trigger_edge_get_type ()")]
+ public enum GestureTriggerEdge {
+ NONE,
+ AFTER,
+ BEFORE
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_GRAVITY_", type_id = "clutter_gravity_get_type ()")]
+ [Deprecated (since = "1.22")]
+ public enum Gravity {
+ NONE,
+ NORTH,
+ NORTH_EAST,
+ EAST,
+ SOUTH_EAST,
+ SOUTH,
+ SOUTH_WEST,
+ WEST,
+ NORTH_WEST,
+ CENTER
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_GRID_POSITION_", type_id = "clutter_grid_position_get_type ()")]
+ public enum GridPosition {
+ LEFT,
+ RIGHT,
+ TOP,
+ BOTTOM
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_INIT_", type_id = "clutter_init_error_get_type ()")]
+ public enum InitError {
+ SUCCESS,
+ ERROR_UNKNOWN,
+ ERROR_THREADS,
+ ERROR_BACKEND,
+ ERROR_INTERNAL;
+ public static GLib.Quark quark ();
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_INPUT_AXIS_", type_id = "clutter_input_axis_get_type ()")]
+ public enum InputAxis {
+ IGNORE,
+ X,
+ Y,
+ PRESSURE,
+ XTILT,
+ YTILT,
+ WHEEL,
+ DISTANCE,
+ LAST
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_", type_id = "clutter_input_device_type_get_type ()")]
+ public enum InputDeviceType {
+ POINTER_DEVICE,
+ KEYBOARD_DEVICE,
+ EXTENSION_DEVICE,
+ JOYSTICK_DEVICE,
+ TABLET_DEVICE,
+ TOUCHPAD_DEVICE,
+ TOUCHSCREEN_DEVICE,
+ PEN_DEVICE,
+ ERASER_DEVICE,
+ CURSOR_DEVICE,
+ N_DEVICE_TYPES
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_INPUT_MODE_", type_id = "clutter_input_mode_get_type ()")]
+ public enum InputMode {
+ MASTER,
+ SLAVE,
+ FLOATING
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_INTERPOLATION_", type_id = "clutter_interpolation_get_type ()")]
+ [Deprecated (since = "1.22")]
+ public enum Interpolation {
+ LINEAR,
+ CUBIC
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_LONG_PRESS_", type_id = "clutter_long_press_state_get_type ()")]
+ public enum LongPressState {
+ QUERY,
+ ACTIVATE,
+ CANCEL
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_", type_id = "clutter_modifier_type_get_type ()")]
+ [Flags]
+ public enum ModifierType {
+ SHIFT_MASK,
+ LOCK_MASK,
+ CONTROL_MASK,
+ MOD1_MASK,
+ MOD2_MASK,
+ MOD3_MASK,
+ MOD4_MASK,
+ MOD5_MASK,
+ BUTTON1_MASK,
+ BUTTON2_MASK,
+ BUTTON3_MASK,
+ BUTTON4_MASK,
+ BUTTON5_MASK,
+ MODIFIER_RESERVED_13_MASK,
+ MODIFIER_RESERVED_14_MASK,
+ MODIFIER_RESERVED_15_MASK,
+ MODIFIER_RESERVED_16_MASK,
+ MODIFIER_RESERVED_17_MASK,
+ MODIFIER_RESERVED_18_MASK,
+ MODIFIER_RESERVED_19_MASK,
+ MODIFIER_RESERVED_20_MASK,
+ MODIFIER_RESERVED_21_MASK,
+ MODIFIER_RESERVED_22_MASK,
+ MODIFIER_RESERVED_23_MASK,
+ MODIFIER_RESERVED_24_MASK,
+ MODIFIER_RESERVED_25_MASK,
+ SUPER_MASK,
+ HYPER_MASK,
+ META_MASK,
+ MODIFIER_RESERVED_29_MASK,
+ RELEASE_MASK,
+ MODIFIER_MASK
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_OFFSCREEN_REDIRECT_", type_id = "clutter_offscreen_redirect_get_type ()")]
+ [Flags]
+ public enum OffscreenRedirect {
+ AUTOMATIC_FOR_OPACITY,
+ ALWAYS
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_ORIENTATION_", type_id = "clutter_orientation_get_type ()")]
+ public enum Orientation {
+ HORIZONTAL,
+ VERTICAL
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_PAN_", type_id = "clutter_pan_axis_get_type ()")]
+ public enum PanAxis {
+ AXIS_NONE,
+ X_AXIS,
+ Y_AXIS,
+ AXIS_AUTO
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_PATH_", type_id = "clutter_path_node_type_get_type ()")]
+ public enum PathNodeType {
+ MOVE_TO,
+ LINE_TO,
+ CURVE_TO,
+ CLOSE,
+ REL_MOVE_TO,
+ REL_LINE_TO,
+ REL_CURVE_TO
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_PICK_", type_id = "clutter_pick_mode_get_type ()")]
+ public enum PickMode {
+ NONE,
+ REACTIVE,
+ ALL
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_REPAINT_FLAGS_", type_id = "clutter_repaint_flags_get_type ()")]
+ [Flags]
+ public enum RepaintFlags {
+ PRE_PAINT,
+ POST_PAINT,
+ QUEUE_REDRAW_ON_ADD
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_REQUEST_", type_id = "clutter_request_mode_get_type ()")]
+ public enum RequestMode {
+ HEIGHT_FOR_WIDTH,
+ WIDTH_FOR_HEIGHT,
+ CONTENT_SIZE
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_", type_id = "clutter_rotate_axis_get_type ()")]
+ public enum RotateAxis {
+ X_AXIS,
+ Y_AXIS,
+ Z_AXIS
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_ROTATE_", type_id = "clutter_rotate_direction_get_type ()")]
+ [Deprecated (since = "1.22")]
+ public enum RotateDirection {
+ CW,
+ CCW
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_SCALING_FILTER_", type_id = "clutter_scaling_filter_get_type ()")]
+ public enum ScalingFilter {
+ LINEAR,
+ NEAREST,
+ TRILINEAR
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_SCROLL_", type_id = "clutter_scroll_direction_get_type ()")]
+ public enum ScrollDirection {
+ UP,
+ DOWN,
+ LEFT,
+ RIGHT,
+ SMOOTH
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_SCROLL_", type_id = "clutter_scroll_mode_get_type ()")]
+ [Flags]
+ public enum ScrollMode {
+ NONE,
+ HORIZONTALLY,
+ VERTICALLY,
+ BOTH
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_", type_id = "clutter_shader_type_get_type ()")]
+ public enum ShaderType {
+ VERTEX_SHADER,
+ FRAGMENT_SHADER
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_SNAP_EDGE_", type_id = "clutter_snap_edge_get_type ()")]
+ public enum SnapEdge {
+ TOP,
+ RIGHT,
+ BOTTOM,
+ LEFT
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_STAGE_STATE_", type_id = "clutter_stage_state_get_type ()")]
+ [Flags]
+ public enum StageState {
+ FULLSCREEN,
+ OFFSCREEN,
+ ACTIVATED
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_COLOR_", type_id = "clutter_static_color_get_type ()")]
+ public enum StaticColor {
+ WHITE,
+ BLACK,
+ RED,
+ DARK_RED,
+ GREEN,
+ DARK_GREEN,
+ BLUE,
+ DARK_BLUE,
+ CYAN,
+ DARK_CYAN,
+ MAGENTA,
+ DARK_MAGENTA,
+ YELLOW,
+ DARK_YELLOW,
+ GRAY,
+ DARK_GRAY,
+ LIGHT_GRAY,
+ BUTTER,
+ BUTTER_LIGHT,
+ BUTTER_DARK,
+ ORANGE,
+ ORANGE_LIGHT,
+ ORANGE_DARK,
+ CHOCOLATE,
+ CHOCOLATE_LIGHT,
+ CHOCOLATE_DARK,
+ CHAMELEON,
+ CHAMELEON_LIGHT,
+ CHAMELEON_DARK,
+ SKY_BLUE,
+ SKY_BLUE_LIGHT,
+ SKY_BLUE_DARK,
+ PLUM,
+ PLUM_LIGHT,
+ PLUM_DARK,
+ SCARLET_RED,
+ SCARLET_RED_LIGHT,
+ SCARLET_RED_DARK,
+ ALUMINIUM_1,
+ ALUMINIUM_2,
+ ALUMINIUM_3,
+ ALUMINIUM_4,
+ ALUMINIUM_5,
+ ALUMINIUM_6,
+ TRANSPARENT
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_STEP_MODE_", type_id = "clutter_step_mode_get_type ()")]
+ public enum StepMode {
+ START,
+ END
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_SWIPE_DIRECTION_", type_id = "clutter_swipe_direction_get_type ()")]
+ [Flags]
+ public enum SwipeDirection {
+ UP,
+ DOWN,
+ LEFT,
+ RIGHT
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_TABLE_ALIGNMENT_", type_id = "clutter_table_alignment_get_type ()")]
+ [Deprecated (since = "1.22")]
+ public enum TableAlignment {
+ START,
+ CENTER,
+ END
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_TEXT_DIRECTION_", type_id = "clutter_text_direction_get_type ()")]
+ public enum TextDirection {
+ DEFAULT,
+ LTR,
+ RTL
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_TEXTURE_", type_id = "clutter_texture_flags_get_type ()")]
+ [Deprecated (since = "1.22")]
+ [Flags]
+ public enum TextureFlags {
+ NONE,
+ RGB_FLAG_BGR,
+ RGB_FLAG_PREMULT,
+ YUV_FLAG_YUV2
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_TEXTURE_QUALITY_", type_id = "clutter_texture_quality_get_type ()")]
+ [Deprecated (since = "1.22")]
+ public enum TextureQuality {
+ LOW,
+ MEDIUM,
+ HIGH
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_TIMELINE_", type_id = "clutter_timeline_direction_get_type ()")]
+ public enum TimelineDirection {
+ FORWARD,
+ BACKWARD
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_TOUCHPAD_GESTURE_PHASE_", type_id = "clutter_touchpad_gesture_phase_get_type ()")]
+ public enum TouchpadGesturePhase {
+ BEGIN,
+ UPDATE,
+ END,
+ CANCEL
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_UNIT_", type_id = "clutter_unit_type_get_type ()")]
+ public enum UnitType {
+ PIXEL,
+ EM,
+ MM,
+ POINT,
+ CM
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_ZOOM_", type_id = "clutter_zoom_axis_get_type ()")]
+ public enum ZoomAxis {
+ X_AXIS,
+ Y_AXIS,
+ BOTH
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_IMAGE_ERROR_INVALID_")]
+ public errordomain ImageError {
+ DATA;
+ public static GLib.Quark quark ();
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_SCRIPT_ERROR_INVALID_")]
+ public errordomain ScriptError {
+ TYPE_FUNCTION,
+ PROPERTY,
+ VALUE;
+ public static GLib.Quark quark ();
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_SHADER_ERROR_")]
+ [Deprecated (since = "1.8")]
+ public errordomain ShaderError {
+ NO_ASM,
+ NO_GLSL,
+ COMPILE;
+ public static GLib.Quark quark ();
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_TEXTURE_ERROR_")]
+ public errordomain TextureError {
+ OUT_OF_MEMORY,
+ NO_YUV,
+ BAD_FORMAT;
+ public static GLib.Quark quark ();
+ }
+ [CCode (cheader_filename = "clutter/clutter.h", instance_pos = 1.9)]
+ public delegate Clutter.Actor ActorCreateChildFunc (GLib.Object item);
+ [CCode (cheader_filename = "clutter/clutter.h", instance_pos = 1.9)]
+ [Deprecated (since = "1.12")]
+ public delegate double AlphaFunc (Clutter.Alpha alpha);
+ [CCode (cheader_filename = "clutter/clutter.h", instance_pos = 2.9)]
+ [Deprecated (since = "1.6")]
+ public delegate void BehaviourForeachFunc (Clutter.Behaviour behaviour, Clutter.Actor actor);
+ [CCode (cheader_filename = "clutter/clutter.h", instance_pos = 4.9)]
+ public delegate bool BindingActionFunc (GLib.Object gobject, string action_name, uint key_val, Clutter.ModifierType modifiers);
+ [CCode (cheader_filename = "clutter/clutter.h", instance_pos = 1.9)]
+ public delegate void Callback (Clutter.Actor actor);
+ [CCode (cheader_filename = "clutter/clutter.h", instance_pos = 1.9)]
+ public delegate bool EventFilterFunc (Clutter.Event event);
+ [CCode (cheader_filename = "clutter/clutter.h", instance_pos = 2.9)]
+ [Deprecated (since = "1.24")]
+ public delegate bool ModelFilterFunc (Clutter.Model model, Clutter.ModelIter iter);
+ [CCode (cheader_filename = "clutter/clutter.h", instance_pos = 2.9)]
+ [Deprecated (since = "1.24")]
+ public delegate bool ModelForeachFunc (Clutter.Model model, Clutter.ModelIter iter);
+ [CCode (cheader_filename = "clutter/clutter.h", instance_pos = 3.9)]
+ [Deprecated (since = "1.24")]
+ public delegate int ModelSortFunc (Clutter.Model model, GLib.Value a, GLib.Value b);
+ [CCode (cheader_filename = "clutter/clutter.h", instance_pos = 1.9)]
+ public delegate void PathCallback (Clutter.PathNode node);
+ [CCode (cheader_filename = "clutter/clutter.h", has_target = false)]
+ public delegate bool ProgressFunc (GLib.Value a, GLib.Value b, double progress, GLib.Value retval);
+ [CCode (cheader_filename = "clutter/clutter.h", instance_pos = 6.9)]
+ public delegate void ScriptConnectFunc (Clutter.Script script, GLib.Object object, string signal_name, string handler_name, GLib.Object connect_object, GLib.ConnectFlags flags);
+ [CCode (cheader_filename = "clutter/clutter.h", instance_pos = 3.9)]
+ public delegate double TimelineProgressFunc (Clutter.Timeline timeline, double elapsed, double total);
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_COGL")]
+ [Deprecated (since = "1.10")]
+ public const string COGL;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_CURRENT_TIME")]
+ public const int CURRENT_TIME;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_FLAVOUR")]
+ [Deprecated (since = "1.10")]
+ public const string FLAVOUR;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_MAJOR_VERSION")]
+ public const int MAJOR_VERSION;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_MICRO_VERSION")]
+ public const int MICRO_VERSION;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_MINOR_VERSION")]
+ public const int MINOR_VERSION;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_PATH_RELATIVE")]
+ public const int PATH_RELATIVE;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_PRIORITY_REDRAW")]
+ public const int PRIORITY_REDRAW;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_VERSION")]
+ public const double VERSION;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_VERSION_HEX")]
+ public const int VERSION_HEX;
+ [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_VERSION_S")]
+ public const string VERSION_S;
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ public static void base_init ();
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ public static void cairo_clear (Cairo.Context cr);
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ public static void cairo_set_source_color (Cairo.Context cr, Clutter.Color color);
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ public static bool check_version (uint major, uint minor, uint micro);
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ public static bool check_windowing_backend (string backend_type);
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ [Deprecated (since = "1.10")]
+ public static void clear_glyph_cache ();
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ public static void disable_accessibility ();
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ public static void do_event (Clutter.Event event);
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ public static bool events_pending ();
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ public static bool get_accessibility_enabled ();
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ public static unowned Clutter.Event get_current_event ();
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ public static uint32 get_current_event_time ();
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ [Deprecated (since = "1.10")]
+ public static bool get_debug_enabled ();
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ public static unowned Clutter.Backend get_default_backend ();
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ public static uint get_default_frame_rate ();
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ public static Clutter.TextDirection get_default_text_direction ();
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ [Deprecated (since = "1.10")]
+ public static Clutter.FontFlags get_font_flags ();
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ public static unowned Pango.FontMap get_font_map ();
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ public static unowned Clutter.Actor get_keyboard_grab ();
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ [Deprecated (since = "1.8")]
+ public static bool get_motion_events_enabled ();
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ public static GLib.OptionGroup get_option_group ();
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ public static GLib.OptionGroup get_option_group_without_init ();
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ public static unowned Clutter.Actor get_pointer_grab ();
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ public static unowned string get_script_id (GLib.Object gobject);
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ [Deprecated (since = "1.10")]
+ public static bool get_show_fps ();
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ [Deprecated (since = "1.10")]
+ public static ulong get_timestamp ();
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ public static void grab_keyboard (Clutter.Actor actor);
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ public static void grab_pointer (Clutter.Actor actor);
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ [Deprecated (since = "1.10")]
+ public static void grab_pointer_for_device (Clutter.Actor actor, int id_);
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ public static Clutter.InitError init ([CCode (array_length_cname = "argc", array_length_pos = 0.5)] ref unowned string[]? argv);
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ public static Clutter.InitError init_with_args ([CCode (array_length_cname = "argc", array_length_pos = 0.5)] ref unowned string[]? argv, string? parameter_string, [CCode (array_length = false)] GLib.OptionEntry[]? entries, string? translation_domain) throws GLib.Error;
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ public static uint32 keysym_to_unicode (uint keyval);
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ public static void main ();
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ public static int main_level ();
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ public static void main_quit ();
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ [Deprecated (since = "1.10")]
+ public static void set_default_frame_rate (uint frames_per_sec);
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ [Deprecated (since = "1.10")]
+ public static void set_font_flags (Clutter.FontFlags flags);
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ [Deprecated (since = "1.8")]
+ public static void set_motion_events_enabled (bool enable);
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ public static void set_windowing_backend (string backend_type);
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ public static void test_add_data_full (string test_path, owned GLib.TestDataFunc test_func);
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ public static bool test_check_actor_at_point (Clutter.Actor stage, Clutter.Point point, Clutter.Actor actor, out Clutter.Actor? result);
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ public static bool test_check_color_at_point (Clutter.Actor stage, Clutter.Point point, Clutter.Color color, out Clutter.Color result);
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ public static unowned Clutter.Actor test_get_stage ();
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ public static void test_init (int argc, string argv);
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ public static int test_run ();
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ [Deprecated (replacement = "Threads.add_repaint_func", since = "vala-0.14")]
+ public static uint threads_add_repaint_func (GLib.SourceFunc func, void* data, GLib.DestroyNotify notify);
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ [Deprecated (replacement = "Threads.remove_repaint_func", since = "vala-0.14")]
+ public static void threads_remove_repaint_func (uint handle_id);
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ public static void ungrab_keyboard ();
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ public static void ungrab_pointer ();
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ [Deprecated (since = "1.10")]
+ public static void ungrab_pointer_for_device (int id_);
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ public static uint unicode_to_keysym (uint32 wc);
+}
--- /dev/null
+/* gladeui-2.0.vapi generated by vapigen, do not modify. */
+
+namespace Glade {
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public class App : GLib.Object {
+ [CCode (has_construct_function = false)]
+ public App ();
+ public static void add_project (Glade.Project project);
+ public static int config_save ();
+ public static bool do_event (Gdk.Event event);
+ public static unowned Glade.App @get ();
+ public static unowned Gtk.AccelGroup get_accel_group ();
+ public static unowned string get_bin_dir ();
+ public static unowned Glade.Catalog get_catalog (string name);
+ public static bool get_catalog_version (string name, int major, int minor);
+ public static unowned GLib.List<Glade.Catalog> get_catalogs ();
+ public static unowned string get_catalogs_dir ();
+ public static unowned Glade.Clipboard get_clipboard ();
+ public static unowned GLib.KeyFile get_config ();
+ public static unowned string get_locale_dir ();
+ public static unowned string get_modules_dir ();
+ public static unowned string get_pixmaps_dir ();
+ public static unowned string get_plugins_dir ();
+ public static unowned Glade.Project get_project_by_path (string project_path);
+ public static unowned GLib.List<Glade.Project> get_projects ();
+ public static unowned Gtk.Widget get_window ();
+ [NoWrapper]
+ public virtual void glade_reserved1 ();
+ [NoWrapper]
+ public virtual void glade_reserved2 ();
+ [NoWrapper]
+ public virtual void glade_reserved3 ();
+ [NoWrapper]
+ public virtual void glade_reserved4 ();
+ [NoWrapper]
+ public virtual void glade_reserved5 ();
+ [NoWrapper]
+ public virtual void glade_reserved6 ();
+ public static bool is_project_loaded (string project_path);
+ public static void remove_project (Glade.Project project);
+ public static void search_docs (string book, string page, string search);
+ public static void set_accel_group (Gtk.AccelGroup accel_group);
+ public static void set_window (Gtk.Widget window);
+ public virtual signal void doc_search (string p0, string p1, string p2);
+ public virtual signal void signal_editor_created (GLib.Object p0);
+ }
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public class BaseEditor : Gtk.VBox, Atk.Implementor, Gtk.Buildable, Gtk.Orientable {
+ [CCode (has_construct_function = false)]
+ public BaseEditor (GLib.Object container, Glade.Editable main_editable);
+ public void add_default_properties (Glade.Widget gchild);
+ public void add_editable (Glade.Widget gchild, Glade.EditorPageType page);
+ public void add_label (string str);
+ public void add_properties (Glade.Widget gchild, bool packing);
+ public void append_types (GLib.Type parent_type);
+ [NoWrapper]
+ public virtual void glade_reserved1 ();
+ [NoWrapper]
+ public virtual void glade_reserved2 ();
+ [NoWrapper]
+ public virtual void glade_reserved3 ();
+ [NoWrapper]
+ public virtual void glade_reserved4 ();
+ [NoWrapper]
+ public virtual void glade_reserved5 ();
+ [NoWrapper]
+ public virtual void glade_reserved6 ();
+ public unowned Gtk.Widget pack_new_window (string title, string help_markup);
+ public void set_show_signal_editor (bool val);
+ [NoAccessorMethod]
+ public GLib.Object container { owned get; set; }
+ public virtual signal unowned GLib.Object build_child (GLib.Object p0, uint p1);
+ public virtual signal bool change_type (GLib.Object p0, uint p1);
+ public virtual signal void child_selected (GLib.Object p0);
+ public virtual signal bool delete_child (GLib.Object p0, GLib.Object p1);
+ public virtual signal unowned string get_display_name (GLib.Object p0);
+ public virtual signal bool move_child (GLib.Object p0, GLib.Object p1);
+ }
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ [Compact]
+ public class Catalog {
+ public static void destroy_all ();
+ public unowned GLib.List<Glade.WidgetAdaptor> get_adaptors ();
+ public unowned string get_book ();
+ public unowned string get_domain ();
+ public unowned string get_icon_prefix ();
+ public uint16 get_major_version ();
+ public uint16 get_minor_version ();
+ public unowned string get_name ();
+ public unowned GLib.List<Glade.TargetableVersion> get_targets ();
+ public unowned GLib.List<Glade.WidgetGroup> get_widget_groups ();
+ public static bool is_loaded (string name);
+ public static unowned GLib.List load_all ();
+ public bool supports_gtkbuilder ();
+ public bool supports_libglade ();
+ }
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public class CellRendererIcon : Gtk.CellRendererPixbuf {
+ [CCode (has_construct_function = false, type = "GtkCellRenderer*")]
+ public CellRendererIcon ();
+ public bool get_activatable ();
+ public bool get_active ();
+ public void set_activatable (bool setting);
+ public void set_active (bool setting);
+ public bool activatable { get; set; }
+ public bool active { get; set; }
+ public virtual signal void activate (string path);
+ }
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public class Clipboard : GLib.Object {
+ [CCode (has_construct_function = false)]
+ public Clipboard ();
+ public void add (GLib.List<Glade.Widget> widgets);
+ public void clear ();
+ public bool get_has_selection ();
+ [NoWrapper]
+ public virtual void glade_reserved1 ();
+ [NoWrapper]
+ public virtual void glade_reserved2 ();
+ [NoWrapper]
+ public virtual void glade_reserved3 ();
+ [NoWrapper]
+ public virtual void glade_reserved4 ();
+ public unowned GLib.List<Glade.Widget> widgets ();
+ public bool has_selection { get; }
+ }
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public class Command : GLib.Object {
+ [CCode (has_construct_function = false)]
+ protected Command ();
+ public static void add (GLib.List<Glade.Widget> widgets, Glade.Widget parent, Glade.Placeholder placeholder, Glade.Project project, bool pasting);
+ public static void add_signal (Glade.Widget glade_widget, Glade.Signal @signal);
+ public static void change_signal (Glade.Widget glade_widget, Glade.Signal old_signal, Glade.Signal new_signal);
+ public virtual void collapse (Glade.Command other);
+ public static unowned Glade.Widget create (Glade.WidgetAdaptor adaptor, Glade.Widget parent, Glade.Placeholder placeholder, Glade.Project project);
+ public static void cut (GLib.List<Glade.Widget> widgets);
+ public static void @delete (GLib.List<Glade.Widget> widgets);
+ public unowned string description ();
+ public static void dnd (GLib.List<Glade.Widget> widgets, Glade.Widget parent, Glade.Placeholder placeholder);
+ public virtual bool execute ();
+ public static int get_group_depth ();
+ [NoWrapper]
+ public virtual void glade_reserved1 ();
+ [NoWrapper]
+ public virtual void glade_reserved2 ();
+ [NoWrapper]
+ public virtual void glade_reserved3 ();
+ [NoWrapper]
+ public virtual void glade_reserved4 ();
+ public int group_id ();
+ public static void lock_widget (Glade.Widget widget, Glade.Widget @lock);
+ public static void paste (GLib.List<Glade.Widget> widgets, Glade.Widget parent, Glade.Placeholder placeholder, Glade.Project project);
+ public static void pop_group ();
+ public static void push_group (string fmt);
+ public static void remove_signal (Glade.Widget glade_widget, Glade.Signal @signal);
+ public static void set_i18n (Glade.Property property, bool translatable, string context, string comment);
+ public static void set_name (Glade.Widget glade_widget, string name);
+ public static void set_properties (Glade.Property property, GLib.Value old_value, GLib.Value new_value);
+ public static void set_properties_list (Glade.Project project, GLib.List<Glade.Property> props);
+ public static void set_property (Glade.Property property);
+ public static void set_property_value (Glade.Property property, GLib.Value value);
+ public virtual bool undo ();
+ public virtual bool unifies (Glade.Command other);
+ public static void unlock_widget (Glade.Widget widget);
+ }
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ [Compact]
+ public class Cursor {
+ public weak Gdk.Cursor add_widget;
+ public weak Gdk.Pixbuf add_widget_pixbuf;
+ public weak Gdk.Cursor drag;
+ public weak Gdk.Cursor resize_bottom;
+ public weak Gdk.Cursor resize_bottom_left;
+ public weak Gdk.Cursor resize_bottom_right;
+ public weak Gdk.Cursor resize_left;
+ public weak Gdk.Cursor resize_right;
+ public weak Gdk.Cursor resize_top;
+ public weak Gdk.Cursor resize_top_left;
+ public weak Gdk.Cursor resize_top_right;
+ public weak Gdk.Cursor selector;
+ public static unowned Gdk.Pixbuf get_add_widget_pixbuf ();
+ public static void init ();
+ public static void @set (Glade.Project project, Gdk.Window window, Glade.CursorType type);
+ }
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public class DesignView : Gtk.VBox, Atk.Implementor, Gtk.Buildable, Gtk.Orientable {
+ [CCode (has_construct_function = false, type = "GtkWidget*")]
+ public DesignView (Glade.Project project);
+ public static unowned Glade.DesignView get_from_project (Glade.Project project);
+ public unowned Glade.Project get_project ();
+ [NoWrapper]
+ public virtual void glade_reserved1 ();
+ [NoWrapper]
+ public virtual void glade_reserved2 ();
+ [NoWrapper]
+ public virtual void glade_reserved3 ();
+ [NoWrapper]
+ public virtual void glade_reserved4 ();
+ public Glade.Project project { get; construct; }
+ }
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public class EPropBool : Glade.EditorProperty, Atk.Implementor, Gtk.Buildable, Gtk.Orientable {
+ [CCode (has_construct_function = false)]
+ protected EPropBool ();
+ }
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public class EPropColor : Glade.EditorProperty, Atk.Implementor, Gtk.Buildable, Gtk.Orientable {
+ [CCode (has_construct_function = false)]
+ protected EPropColor ();
+ }
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public class EPropEnum : Glade.EditorProperty, Atk.Implementor, Gtk.Buildable, Gtk.Orientable {
+ [CCode (has_construct_function = false)]
+ protected EPropEnum ();
+ }
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public class EPropFlags : Glade.EditorProperty, Atk.Implementor, Gtk.Buildable, Gtk.Orientable {
+ [CCode (has_construct_function = false)]
+ protected EPropFlags ();
+ }
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public class EPropNamedIcon : Glade.EditorProperty, Atk.Implementor, Gtk.Buildable, Gtk.Orientable {
+ [CCode (has_construct_function = false)]
+ protected EPropNamedIcon ();
+ }
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public class EPropNumeric : Glade.EditorProperty, Atk.Implementor, Gtk.Buildable, Gtk.Orientable {
+ [CCode (has_construct_function = false)]
+ protected EPropNumeric ();
+ }
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public class EPropObject : Glade.EditorProperty, Atk.Implementor, Gtk.Buildable, Gtk.Orientable {
+ [CCode (has_construct_function = false)]
+ protected EPropObject ();
+ }
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public class EPropObjects : Glade.EditorProperty, Atk.Implementor, Gtk.Buildable, Gtk.Orientable {
+ [CCode (has_construct_function = false)]
+ protected EPropObjects ();
+ }
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public class EPropText : Glade.EditorProperty, Atk.Implementor, Gtk.Buildable, Gtk.Orientable {
+ [CCode (has_construct_function = false)]
+ protected EPropText ();
+ }
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public class EPropUnichar : Glade.EditorProperty, Atk.Implementor, Gtk.Buildable, Gtk.Orientable {
+ [CCode (has_construct_function = false)]
+ protected EPropUnichar ();
+ }
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public class Editor : Gtk.VBox, Atk.Implementor, Gtk.Buildable, Gtk.Orientable {
+ [CCode (has_construct_function = false)]
+ public Editor ();
+ public static unowned Gtk.Widget dialog_for_widget (Glade.Widget widget);
+ [NoWrapper]
+ public virtual void glade_reserved1 ();
+ [NoWrapper]
+ public virtual void glade_reserved2 ();
+ [NoWrapper]
+ public virtual void glade_reserved3 ();
+ [NoWrapper]
+ public virtual void glade_reserved4 ();
+ public void hide_info ();
+ public void load_widget (Glade.Widget widget);
+ public static bool query_dialog (Glade.Widget widget);
+ public void show_info ();
+ [NoAccessorMethod]
+ public Glade.Widget widget { owned get; set; }
+ }
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public class EditorProperty : Gtk.HBox, Atk.Implementor, Gtk.Buildable, Gtk.Orientable {
+ [CCode (has_construct_function = false)]
+ protected EditorProperty ();
+ [NoWrapper]
+ public virtual void* changed (Glade.Property p2);
+ public void commit_no_callback (GLib.Value value);
+ [NoWrapper]
+ public virtual unowned Gtk.Widget create_input ();
+ public unowned Gtk.Widget get_item_label ();
+ public unowned Glade.PropertyClass get_pclass ();
+ public unowned Glade.Property get_property ();
+ [NoWrapper]
+ public virtual void glade_reserved1 ();
+ [NoWrapper]
+ public virtual void glade_reserved2 ();
+ [NoWrapper]
+ public virtual void glade_reserved3 ();
+ [NoWrapper]
+ public virtual void glade_reserved4 ();
+ public virtual void load (Glade.Property property);
+ public void load_by_widget (Glade.Widget widget);
+ public bool loading ();
+ public static bool show_i18n_dialog (Gtk.Widget parent, string text, string context, string comment, bool translatable);
+ public static bool show_object_dialog (Glade.Project project, string title, Gtk.Widget parent, GLib.Type object_type, Glade.Widget exception, out unowned Glade.Widget object);
+ public static bool show_resource_dialog (Glade.Project project, Gtk.Widget parent, string filename);
+ [NoAccessorMethod]
+ public void* property_class { get; construct; }
+ [NoAccessorMethod]
+ public bool use_command { get; set; }
+ public virtual signal void commit (void* p0);
+ public virtual signal void value_changed (Glade.Property p0);
+ }
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public class EditorTable : Gtk.Grid, Atk.Implementor, Gtk.Buildable, Gtk.Orientable, Glade.Editable {
+ [CCode (has_construct_function = false, type = "GtkWidget*")]
+ public EditorTable (Glade.WidgetAdaptor adaptor, Glade.EditorPageType type);
+ [NoWrapper]
+ public virtual void glade_reserved1 ();
+ [NoWrapper]
+ public virtual void glade_reserved2 ();
+ [NoWrapper]
+ public virtual void glade_reserved3 ();
+ [NoWrapper]
+ public virtual void glade_reserved4 ();
+ }
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ [Compact]
+ public class GCSetPropData {
+ public GLib.Value new_value;
+ public GLib.Value old_value;
+ public weak Glade.Property property;
+ }
+ [CCode (cheader_filename = "gladeui/glade.h", type_id = "glade_glist_get_type ()")]
+ [Compact]
+ public class GList {
+ }
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public class GObjectAdaptor : GLib.Object {
+ [CCode (has_construct_function = false)]
+ protected GObjectAdaptor ();
+ [NoAccessorMethod]
+ public string book { owned get; construct; }
+ [NoAccessorMethod]
+ public string catalog { owned get; construct; }
+ [NoAccessorMethod]
+ public void* cursor { get; }
+ [NoAccessorMethod]
+ public string generic_name { owned get; construct; }
+ [NoAccessorMethod]
+ public string icon_name { owned get; construct; }
+ [NoAccessorMethod]
+ public string name { owned get; construct; }
+ [NoAccessorMethod]
+ public string special_child_type { owned get; construct; }
+ [NoAccessorMethod]
+ public string title { owned get; set; }
+ [NoAccessorMethod]
+ public GLib.Type type { get; construct; }
+ }
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public class Inspector : Gtk.VBox, Atk.Implementor, Gtk.Buildable, Gtk.Orientable {
+ [CCode (has_construct_function = false, type = "GtkWidget*")]
+ public Inspector ();
+ public unowned Glade.Project get_project ();
+ public unowned GLib.List<Glade.Widget> get_selected_items ();
+ [NoWrapper]
+ public virtual void glade_reserved1 ();
+ [NoWrapper]
+ public virtual void glade_reserved2 ();
+ [NoWrapper]
+ public virtual void glade_reserved3 ();
+ [NoWrapper]
+ public virtual void glade_reserved4 ();
+ public void set_project (Glade.Project project);
+ [CCode (has_construct_function = false, type = "GtkWidget*")]
+ public Inspector.with_project (Glade.Project project);
+ public Glade.Project project { get; set; }
+ public virtual signal void item_activated ();
+ public virtual signal void selection_changed ();
+ }
+ [CCode (cheader_filename = "gladeui/glade.h", free_function = "glade_name_context_destroy")]
+ [Compact]
+ public class NameContext {
+ [CCode (has_construct_function = false)]
+ public NameContext ();
+ public bool add_name (string name);
+ public unowned string dual_new_name (Glade.NameContext another_context, string base_name);
+ public bool has_name (string name);
+ public uint n_names ();
+ [CCode (has_construct_function = false, type = "gchar*")]
+ public NameContext.name (Glade.NameContext context, string base_name);
+ public void release_name (string name);
+ }
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public class Palette : Gtk.VBox, Atk.Implementor, Gtk.Buildable, Gtk.Orientable {
+ [CCode (has_construct_function = false, type = "GtkWidget*")]
+ public Palette ();
+ public Glade.ItemAppearance get_item_appearance ();
+ public unowned Glade.Project get_project ();
+ public bool get_show_selector_button ();
+ public bool get_use_small_item_icons ();
+ [NoWrapper]
+ public virtual void glade_reserved1 ();
+ [NoWrapper]
+ public virtual void glade_reserved2 ();
+ [NoWrapper]
+ public virtual void glade_reserved3 ();
+ [NoWrapper]
+ public virtual void glade_reserved4 ();
+ public void set_item_appearance (Glade.ItemAppearance item_appearance);
+ public void set_project (Glade.Project project);
+ public void set_show_selector_button (bool show_selector_button);
+ public void set_use_small_item_icons (bool use_small_item_icons);
+ public Glade.ItemAppearance item_appearance { get; set; }
+ public Glade.Project project { get; set; }
+ public bool show_selector_button { get; set; }
+ public bool use_small_item_icons { get; set; }
+ public virtual signal void refresh ();
+ }
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ [Compact]
+ public class ParamSpecObjects {
+ public void set_type (GLib.Type type);
+ }
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public class Placeholder : Gtk.Widget, Atk.Implementor, Gtk.Buildable, Gtk.Scrollable {
+ [CCode (has_construct_function = false, type = "GtkWidget*")]
+ public Placeholder ();
+ public unowned Glade.Widget get_parent ();
+ public unowned Glade.Project get_project ();
+ [NoWrapper]
+ public virtual void glade_reserved1 ();
+ [NoWrapper]
+ public virtual void glade_reserved2 ();
+ [NoWrapper]
+ public virtual void glade_reserved3 ();
+ [NoWrapper]
+ public virtual void glade_reserved4 ();
+ public unowned GLib.List<Glade.WidgetAction> packing_actions ();
+ }
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public class Project : GLib.Object, Gtk.TreeModel {
+ [CCode (has_construct_function = false)]
+ public Project ();
+ public virtual void add_object (GLib.Object object);
+ public bool available_widget_name (Glade.Widget widget, string name);
+ public void cancel_load ();
+ public void check_reordered (Glade.Widget parent, GLib.List<Glade.Widget> old_order);
+ public void command_cut ();
+ public void command_delete ();
+ public void command_paste (Glade.Placeholder placeholder);
+ public void copy_selection ();
+ public unowned string display_dependencies ();
+ public unowned Glade.WidgetAdaptor get_add_item ();
+ public ulong get_file_mtime ();
+ public bool get_has_selection ();
+ public bool get_modified ();
+ public unowned string get_name ();
+ public unowned GLib.List<GLib.Object> get_objects ();
+ public Glade.PointerMode get_pointer_mode ();
+ public bool get_readonly ();
+ public void get_target_version (string catalog, int major, int minor);
+ public unowned Glade.Widget get_widget_by_name (string name);
+ [NoWrapper]
+ public virtual void glade_reserved1 ();
+ [NoWrapper]
+ public virtual void glade_reserved2 ();
+ [NoWrapper]
+ public virtual void glade_reserved3 ();
+ [NoWrapper]
+ public virtual void glade_reserved4 ();
+ [NoWrapper]
+ public virtual void glade_reserved5 ();
+ [NoWrapper]
+ public virtual void glade_reserved6 ();
+ [NoWrapper]
+ public virtual void glade_reserved7 ();
+ [NoWrapper]
+ public virtual void glade_reserved8 ();
+ public bool has_object (GLib.Object object);
+ public bool is_loading ();
+ public bool is_selected (GLib.Object object);
+ public static unowned Glade.Project load (string path);
+ public bool load_cancelled ();
+ public bool load_from_file (string path);
+ public virtual unowned Glade.Command next_redo_item ();
+ public virtual unowned Glade.Command next_undo_item ();
+ public static unowned Gdk.Pixbuf pointer_mode_render_icon (Glade.PointerMode mode, Gtk.IconSize size);
+ public void preview (Glade.Widget gwidget);
+ public void properties ();
+ public void push_progress ();
+ public virtual void push_undo (Glade.Command cmd);
+ public void queue_selection_changed ();
+ public virtual void redo ();
+ public unowned Gtk.Widget redo_items ();
+ public virtual void remove_object (GLib.Object object);
+ public unowned GLib.List<string> required_libs ();
+ public void reset_path ();
+ public unowned string resource_fullpath (string resource);
+ public bool save (string path) throws GLib.Error;
+ public void selection_add (GLib.Object object, bool emit_signal);
+ public void selection_clear (bool emit_signal);
+ public unowned GLib.List selection_get ();
+ public void selection_remove (GLib.Object object, bool emit_signal);
+ public void selection_set (GLib.Object object, bool emit_signal);
+ public void set_add_item (Glade.WidgetAdaptor adaptor);
+ public void set_pointer_mode (Glade.PointerMode mode);
+ public void set_widget_name (Glade.Widget widget, string name);
+ public unowned GLib.List toplevels ();
+ public virtual void undo ();
+ public unowned Gtk.Widget undo_items ();
+ public static void verify_property (Glade.Property property);
+ public static void verify_signal (Glade.Widget widget, Glade.Signal @signal);
+ public unowned string verify_widget_adaptor (Glade.WidgetAdaptor adaptor, Glade.SupportMask mask);
+ public void widget_changed (Glade.Widget gwidget);
+ [CCode (has_construct_function = false, type = "gchar*")]
+ public Project.widget_name (Glade.Project project, Glade.Widget widget, string base_name);
+ public Glade.GObjectAdaptor add_item { get; }
+ public bool has_selection { get; }
+ public bool modified { get; }
+ [NoAccessorMethod]
+ public string path { owned get; }
+ public Glade.PointerMode pointer_mode { get; }
+ [NoAccessorMethod]
+ public bool read_only { get; }
+ public virtual signal void add_widget (Glade.Widget p0);
+ public virtual signal void changed (Glade.Command command, bool forward);
+ public virtual signal void close ();
+ public virtual signal void load_progress (int p0, int p1);
+ public virtual signal void parse_began ();
+ public virtual signal void parse_finished ();
+ public virtual signal void remove_widget (Glade.Widget p0);
+ public virtual signal void selection_changed ();
+ public virtual signal void targets_changed ();
+ public virtual signal void widget_name_changed (Glade.Widget widget);
+ public virtual signal void widget_visibility_changed (Glade.Widget p0, bool p1);
+ }
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public class Property : GLib.Object {
+ [CCode (has_construct_function = false)]
+ public Property (Glade.PropertyClass klass, Glade.Widget widget, GLib.Value value);
+ public void add_object (GLib.Object object);
+ public bool @default ();
+ public unowned Glade.Property dup (Glade.Widget widget);
+ public bool equals ();
+ public bool equals_value (GLib.Value value);
+ public void @get ();
+ public unowned Glade.PropertyClass get_class ();
+ public void get_default (GLib.Value value);
+ public bool get_enabled ();
+ public bool get_save_always ();
+ public bool get_sensitive ();
+ public Glade.PropertyState get_state ();
+ public unowned string get_support_warning ();
+ public void get_va_list (void* vl);
+ public void get_value (GLib.Value value);
+ public unowned Glade.Widget get_widget ();
+ public unowned string i18n_get_comment ();
+ public unowned string i18n_get_context ();
+ public bool i18n_get_translatable ();
+ public void i18n_set_comment (string str);
+ public void i18n_set_context (string str);
+ public void i18n_set_translatable (bool translatable);
+ public GLib.Value inline_value ();
+ public void load ();
+ public unowned string make_string ();
+ public bool original_default ();
+ public void original_reset ();
+ public static void pop_superuser ();
+ public static void push_superuser ();
+ public void read (Glade.Project project, Glade.XmlNode node);
+ public void remove_object (GLib.Object object);
+ public void reset ();
+ public bool @set ();
+ public void set_enabled (bool enabled);
+ public void set_save_always (bool setting);
+ public void set_sensitive (bool sensitive, string reason);
+ public void set_support_warning (bool disable, string reason);
+ public bool set_va_list (void* vl);
+ public bool set_value (GLib.Value value);
+ public void set_widget (Glade.Widget widget);
+ public static bool superuser ();
+ public void sync ();
+ public void write (Glade.XmlContext context, Glade.XmlNode node);
+ public void* @class { get; construct; }
+ public bool enabled { get; set; }
+ [NoAccessorMethod]
+ public string i18n_comment { owned get; set; }
+ [NoAccessorMethod]
+ public string i18n_context { owned get; set; }
+ [NoAccessorMethod]
+ public bool i18n_translatable { get; set; }
+ public bool sensitive { get; set; }
+ public int state { get; }
+ public virtual signal void tooltip_changed (string p0, string p1, string p2);
+ public virtual signal void value_changed (void* p0, void* p1);
+ }
+ [CCode (cheader_filename = "gladeui/glade.h", free_function = "glade_property_class_free")]
+ [Compact]
+ public class PropertyClass {
+ [CCode (cname = "glade_property_class_new", has_construct_function = false)]
+ public PropertyClass (Glade.WidgetAdaptor adaptor, string id);
+ [CCode (cname = "glade_property_class_atk")]
+ public bool atk ();
+ [CCode (cname = "glade_property_class_clone")]
+ public unowned Glade.PropertyClass clone (bool reset_version);
+ [CCode (cname = "glade_property_class_common")]
+ public bool common ();
+ [CCode (cname = "glade_property_class_compare")]
+ public int compare (GLib.Value value1, GLib.Value value2);
+ [CCode (cname = "glade_property_class_create_type")]
+ public unowned string create_type ();
+ [CCode (cname = "glade_property_class_custom_layout")]
+ public bool custom_layout ();
+ [CCode (cname = "glade_property_class_new_from_spec", has_construct_function = false)]
+ public PropertyClass.from_spec (Glade.WidgetAdaptor adaptor, GLib.ParamSpec spec);
+ [CCode (cname = "glade_property_class_new_from_spec_full", has_construct_function = false)]
+ public PropertyClass.from_spec_full (Glade.WidgetAdaptor adaptor, GLib.ParamSpec spec, bool need_handle);
+ [CCode (cname = "glade_property_class_get_adaptor")]
+ public unowned Glade.WidgetAdaptor get_adaptor ();
+ [CCode (cname = "glade_property_class_get_construct_only")]
+ public bool get_construct_only ();
+ [CCode (cname = "glade_property_class_get_default")]
+ public GLib.Value get_default ();
+ [CCode (cname = "glade_property_class_get_default_from_spec")]
+ public static GLib.Value get_default_from_spec (GLib.ParamSpec spec);
+ [CCode (cname = "glade_property_class_get_from_gvalue")]
+ public void get_from_gvalue (GLib.Value value);
+ [CCode (cname = "glade_property_class_get_ignore")]
+ public bool get_ignore ();
+ [CCode (cname = "glade_property_class_get_is_packing")]
+ public bool get_is_packing ();
+ [CCode (cname = "glade_property_class_get_name")]
+ public unowned string get_name ();
+ [CCode (cname = "glade_property_class_get_original_default")]
+ public GLib.Value get_original_default ();
+ [CCode (cname = "glade_property_class_get_pspec")]
+ public unowned GLib.ParamSpec get_pspec ();
+ [CCode (cname = "glade_property_class_get_tooltip")]
+ public unowned string get_tooltip ();
+ [CCode (cname = "glade_property_class_get_virtual")]
+ public bool get_virtual ();
+ [CCode (cname = "glade_property_class_id")]
+ public unowned string id ();
+ [CCode (cname = "glade_property_class_is_object")]
+ public bool is_object ();
+ [CCode (cname = "glade_property_class_is_visible")]
+ public bool is_visible ();
+ [CCode (cname = "glade_property_class_load_defaults_from_spec")]
+ public void load_defaults_from_spec ();
+ [CCode (cname = "glade_property_class_make_adjustment")]
+ public unowned Gtk.Adjustment make_adjustment ();
+ [CCode (cname = "glade_property_class_make_gvalue")]
+ public GLib.Value make_gvalue ();
+ [CCode (cname = "glade_property_class_make_gvalue_from_string")]
+ public GLib.Value make_gvalue_from_string (string str, Glade.Project project);
+ [CCode (cname = "glade_property_class_make_gvalue_from_vl")]
+ public GLib.Value make_gvalue_from_vl (void* vl);
+ [CCode (cname = "glade_property_class_make_string_from_gvalue")]
+ public unowned string make_string_from_gvalue (GLib.Value value);
+ [CCode (cname = "glade_property_class_match")]
+ public bool match (Glade.PropertyClass comp);
+ [CCode (cname = "glade_property_class_multiline")]
+ public bool multiline ();
+ [CCode (cname = "glade_property_class_needs_sync")]
+ public bool needs_sync ();
+ [CCode (cname = "glade_property_class_optional")]
+ public bool optional ();
+ [CCode (cname = "glade_property_class_optional_default")]
+ public bool optional_default ();
+ [CCode (cname = "glade_property_class_parentless_widget")]
+ public bool parentless_widget ();
+ [CCode (cname = "glade_property_class_query")]
+ public bool query ();
+ [CCode (cname = "glade_property_class_save")]
+ public bool save ();
+ [CCode (cname = "glade_property_class_save_always")]
+ public bool save_always ();
+ [CCode (cname = "glade_property_class_set_adaptor")]
+ public void set_adaptor (Glade.WidgetAdaptor adaptor);
+ [CCode (cname = "glade_property_class_set_construct_only")]
+ public void set_construct_only (bool construct_only);
+ [CCode (cname = "glade_property_class_set_ignore")]
+ public void set_ignore (bool ignore);
+ [CCode (cname = "glade_property_class_set_is_packing")]
+ public void set_is_packing (bool is_packing);
+ [CCode (cname = "glade_property_class_set_name")]
+ public void set_name (string name);
+ [CCode (cname = "glade_property_class_set_pspec")]
+ public void set_pspec (GLib.ParamSpec pspec);
+ [CCode (cname = "glade_property_class_set_tooltip")]
+ public void set_tooltip (string tooltip);
+ [CCode (cname = "glade_property_class_set_virtual")]
+ public void set_virtual (bool value);
+ [CCode (cname = "glade_property_class_set_vl_from_gvalue")]
+ public void set_vl_from_gvalue (GLib.Value value, void* vl);
+ [CCode (cname = "glade_property_class_set_weights")]
+ public static void set_weights (GLib.List<Glade.Property> properties, GLib.Type parent);
+ [CCode (cname = "glade_property_class_since_major")]
+ public uint16 since_major ();
+ [CCode (cname = "glade_property_class_since_minor")]
+ public uint16 since_minor ();
+ [CCode (cname = "glade_property_class_stock")]
+ public bool stock ();
+ [CCode (cname = "glade_property_class_stock_icon")]
+ public bool stock_icon ();
+ [CCode (cname = "glade_property_class_themed_icon")]
+ public bool themed_icon ();
+ [CCode (cname = "glade_property_class_transfer_on_paste")]
+ public bool transfer_on_paste ();
+ [CCode (cname = "glade_property_class_translatable")]
+ public bool translatable ();
+ [CCode (cname = "glade_property_class_update_from_node")]
+ public static bool update_from_node (Glade.XmlNode node, GLib.Type object_type, out unowned Glade.PropertyClass property_class, string domain);
+ [CCode (cname = "glade_property_class_void_value")]
+ public bool void_value (GLib.Value value);
+ [CCode (cname = "glade_property_class_weight")]
+ public double weight ();
+ }
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ [Compact]
+ public class PropertyKlass {
+ public weak GLib.Callback dup;
+ public weak GLib.Callback equals_value;
+ public weak GLib.Callback get_value;
+ public weak GLib.Callback glade_reserved1;
+ public weak GLib.Callback glade_reserved2;
+ public weak GLib.Callback glade_reserved3;
+ public weak GLib.Callback glade_reserved4;
+ public weak GLib.Callback glade_reserved5;
+ public weak GLib.Callback glade_reserved6;
+ public weak GLib.Callback load;
+ public weak GLib.ObjectClass parent_class;
+ public weak GLib.Callback set_value;
+ public weak GLib.Callback sync;
+ public weak GLib.Callback tooltip_changed;
+ public weak GLib.Callback value_changed;
+ }
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public class Signal : GLib.Object {
+ [CCode (has_construct_function = false)]
+ public Signal (Glade.SignalClass sig_class, string handler, string userdata, bool after, bool swapped);
+ public unowned Glade.Signal clone ();
+ public bool equal (Glade.Signal sig2);
+ public bool get_after ();
+ public unowned Glade.SignalClass get_class ();
+ public unowned string get_handler ();
+ public unowned string get_name ();
+ public unowned string get_support_warning ();
+ public bool get_swapped ();
+ public unowned string get_userdata ();
+ public static unowned Glade.Signal read (Glade.XmlNode node, Glade.WidgetAdaptor adaptor);
+ public void set_after (bool after);
+ public void set_handler (string handler);
+ public void set_support_warning (string support_warning);
+ public void set_swapped (bool swapped);
+ public void set_userdata (string userdata);
+ public void write (Glade.XmlContext context, Glade.XmlNode node);
+ public bool after { get; set; }
+ public void* @class { get; construct; }
+ public string handler { get; set; }
+ public string support_warning { get; set; }
+ public bool swapped { get; set; }
+ public string userdata { get; set; }
+ }
+ [CCode (cheader_filename = "gladeui/glade.h", free_function = "glade_signal_class_free")]
+ [Compact]
+ public class SignalClass {
+ [CCode (cname = "glade_signal_class_new", has_construct_function = false)]
+ public SignalClass (Glade.WidgetAdaptor adaptor, GLib.Type for_type, uint signal_id);
+ [CCode (cname = "glade_signal_class_get_adaptor")]
+ public unowned Glade.WidgetAdaptor get_adaptor ();
+ [CCode (cname = "glade_signal_class_get_flags")]
+ public GLib.SignalFlags get_flags ();
+ [CCode (cname = "glade_signal_class_get_name")]
+ public unowned string get_name ();
+ [CCode (cname = "glade_signal_class_set_since")]
+ public void set_since (uint16 since_major, uint16 since_minor);
+ [CCode (cname = "glade_signal_class_since_major")]
+ public uint16 since_major ();
+ [CCode (cname = "glade_signal_class_since_minor")]
+ public uint16 since_minor ();
+ [CCode (cname = "glade_signal_class_update_from_node")]
+ public void update_from_node (Glade.XmlNode node, string domain);
+ }
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public class SignalEditor : Gtk.VBox, Atk.Implementor, Gtk.Buildable, Gtk.Orientable {
+ [CCode (has_construct_function = false)]
+ public SignalEditor ();
+ public void construct_signals_list ();
+ public void enable_dnd (bool enabled);
+ public unowned Glade.Widget get_widget ();
+ [NoWrapper]
+ public virtual void glade_reserved1 ();
+ [NoWrapper]
+ public virtual void glade_reserved2 ();
+ [NoWrapper]
+ public virtual void glade_reserved3 ();
+ [NoWrapper]
+ public virtual void glade_reserved4 ();
+ [NoWrapper]
+ public virtual void glade_reserved5 ();
+ public void load_widget (Glade.Widget widget);
+ [NoAccessorMethod]
+ public Gtk.TreeModel glade_widget { owned get; set; }
+ public virtual signal unowned string[] callback_suggestions (Glade.Signal @signal);
+ public virtual signal void signal_activated (Glade.Signal p0);
+ }
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ [Compact]
+ public class SignalKlass {
+ public weak GLib.Callback glade_reserved1;
+ public weak GLib.Callback glade_reserved2;
+ public weak GLib.Callback glade_reserved3;
+ public weak GLib.Callback glade_reserved4;
+ public weak GLib.ObjectClass object_class;
+ }
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public class SignalModel : GLib.Object, Gtk.TreeModel, Gtk.TreeDragSource {
+ [CCode (has_construct_function = false, type = "GtkTreeModel*")]
+ public SignalModel (Glade.Widget widget, GLib.HashTable signals);
+ public void* signals { construct; }
+ public Glade.Widget widget { construct; }
+ }
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ [Compact]
+ public class TargetableVersion {
+ public int major;
+ public int minor;
+ }
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public class Widget : GLib.InitiallyUnowned {
+ [CCode (has_construct_function = false)]
+ protected Widget ();
+ public virtual void add_child (Glade.Widget child, bool at_mouse);
+ public void add_prop_ref (Glade.Property property);
+ public bool add_verify (Glade.Widget child, bool user_feedback);
+ public void child_get_property (Glade.Widget child, string property_name, GLib.Value value);
+ public void child_set_property (Glade.Widget child, string property_name, GLib.Value value);
+ public void copy_properties (Glade.Widget template_widget, bool copy_parentless, bool exact);
+ public void copy_signals (Glade.Widget template_widget);
+ public unowned Glade.EditorProperty create_editor_property (string property, bool packing, bool use_command);
+ public unowned Glade.Widget dup (bool exact);
+ public unowned GLib.List<Glade.Property> dup_properties (GLib.List<Glade.Property> template_props, bool as_load, bool copy_parentless, bool exact);
+ public virtual bool event (Gdk.Event event);
+ public unowned Glade.Widget find_child (string name);
+ public unowned string generate_path_name ();
+ public unowned Glade.WidgetAction get_action (string action_path);
+ public unowned GLib.List<Glade.WidgetAction> get_actions ();
+ public unowned Glade.WidgetAdaptor get_adaptor ();
+ public unowned GLib.List<Glade.Widget> get_children ();
+ public static unowned Glade.Widget get_from_gobject (void* object);
+ public unowned string get_internal ();
+ public unowned Glade.Widget get_locker ();
+ public unowned string get_name ();
+ public unowned GLib.Object get_object ();
+ public unowned Glade.WidgetAction get_pack_action (string action_path);
+ public unowned GLib.List<Glade.WidgetAction> get_pack_actions ();
+ public unowned Glade.Property get_pack_property (string id_property);
+ public unowned GLib.List<Glade.Property> get_packing_properties ();
+ public unowned Glade.Widget get_parent ();
+ public unowned GLib.List<Glade.Widget> get_parentless_reffed_widgets ();
+ public unowned Glade.Property get_parentless_widget_ref ();
+ public unowned Glade.Project get_project ();
+ public unowned GLib.List<Glade.Property> get_properties ();
+ public unowned Glade.Property get_property (string id_property);
+ public unowned GLib.List<Glade.Signal> get_signal_list ();
+ public unowned Gtk.TreeModel get_signal_model ();
+ public unowned Glade.Widget get_toplevel ();
+ [NoWrapper]
+ public virtual void glade_reserved1 ();
+ [NoWrapper]
+ public virtual void glade_reserved2 ();
+ [NoWrapper]
+ public virtual void glade_reserved3 ();
+ [NoWrapper]
+ public virtual void glade_reserved4 ();
+ [NoWrapper]
+ public virtual void glade_reserved5 ();
+ [NoWrapper]
+ public virtual void glade_reserved6 ();
+ [NoWrapper]
+ public virtual void glade_reserved7 ();
+ [NoWrapper]
+ public virtual void glade_reserved8 ();
+ public bool has_decendant (GLib.Type type);
+ public void hide ();
+ public bool in_project ();
+ public bool is_ancestor (Glade.Widget ancestor);
+ public unowned GLib.List<Glade.Widget> list_locked_widgets ();
+ public unowned GLib.List list_prop_refs ();
+ public unowned GLib.PtrArray list_signal_handlers (string signal_name);
+ public void @lock (Glade.Widget locked);
+ public void object_get_property (string property_name, GLib.Value value);
+ public void object_set_property (string property_name, GLib.Value value);
+ public bool pack_property_default (string id_property);
+ public bool pack_property_get (string id_property);
+ public bool pack_property_reset (string id_property);
+ public bool pack_property_set (string id_property);
+ public bool pack_property_set_enabled (string id_property, bool enabled);
+ public bool pack_property_set_save_always (string id_property, bool setting);
+ public bool pack_property_set_sensitive (string id_property, bool sensitive, string reason);
+ public unowned string pack_property_string (string id_property, GLib.Value value);
+ public bool placeholder_relation (Glade.Widget widget);
+ public static void pop_superuser ();
+ public bool property_default (string id_property);
+ public bool property_get (string id_property);
+ public bool property_original_default (string id_property);
+ public bool property_reset (string id_property);
+ public bool property_set (string id_property);
+ public bool property_set_enabled (string id_property, bool enabled);
+ public bool property_set_save_always (string id_property, bool setting);
+ public bool property_set_sensitive (string id_property, bool sensitive, string reason);
+ public unowned string property_string (string id_property, GLib.Value value);
+ public static void push_superuser ();
+ public static unowned Glade.Widget read (Glade.Project project, Glade.Widget parent, Glade.XmlNode node, string @internal);
+ public void read_child (Glade.XmlNode node);
+ public void rebuild ();
+ public virtual void remove_child (Glade.Widget child);
+ public void remove_prop_ref (Glade.Property property);
+ public void remove_property (string id_property);
+ public void replace (GLib.Object old_object, GLib.Object new_object);
+ [NoWrapper]
+ public virtual void replace_child (GLib.Object p2, GLib.Object p3);
+ public bool set_action_sensitive (string action_path, bool sensitive);
+ public bool set_action_visible (string action_path, bool sensitive);
+ public void set_child_type_from_node (GLib.Object child, Glade.XmlNode node);
+ public void set_in_project (bool in_project);
+ public void set_internal (string @internal);
+ public void set_name (string name);
+ public bool set_pack_action_sensitive (string action_path, bool sensitive);
+ public bool set_pack_action_visible (string action_path, bool sensitive);
+ public void set_packing_properties (Glade.Widget container);
+ public void set_parent (Glade.Widget parent);
+ public void set_project (Glade.Project project);
+ public void set_support_warning (string warning);
+ public void show ();
+ public static bool superuser ();
+ public void unlock ();
+ public void write (Glade.XmlContext context, Glade.XmlNode node);
+ public void write_child (Glade.Widget child, Glade.XmlContext context, Glade.XmlNode node);
+ public void write_placeholder (GLib.Object object, Glade.XmlContext context, Glade.XmlNode node);
+ public void write_signals (Glade.XmlContext context, Glade.XmlNode node);
+ public void write_special_child_prop (GLib.Object object, Glade.XmlContext context, Glade.XmlNode node);
+ public Glade.GObjectAdaptor adaptor { get; construct; }
+ [NoAccessorMethod]
+ public bool anarchist { get; construct; }
+ public string @internal { get; set construct; }
+ public string internal_name { construct; }
+ public string name { get; set construct; }
+ [NoAccessorMethod]
+ public GLib.Object object { owned get; set construct; }
+ public Glade.Widget parent { get; set construct; }
+ public Glade.Project project { get; set construct; }
+ public void* properties { get; construct; }
+ [NoAccessorMethod]
+ public int reason { get; construct; }
+ [NoAccessorMethod]
+ public string support_warning { owned get; }
+ public Glade.Widget template { construct; }
+ public bool template_exact { construct; }
+ [NoAccessorMethod]
+ public int toplevel_height { get; set; }
+ [NoAccessorMethod]
+ public int toplevel_width { get; set; }
+ [NoAccessorMethod]
+ public bool visible { get; }
+ public virtual signal void add_signal_handler (Glade.Signal p0);
+ public virtual signal bool button_press_event (Gdk.Event p0);
+ public virtual signal bool button_release_event (Gdk.Event p0);
+ public virtual signal void change_signal_handler (Glade.Signal p0);
+ public virtual signal bool motion_notify_event (Gdk.Event p0);
+ public virtual signal void remove_signal_handler (Glade.Signal p0);
+ public virtual signal void support_changed ();
+ }
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public class WidgetAction : GLib.Object {
+ [CCode (has_construct_function = false)]
+ protected WidgetAction ();
+ public static unowned Glade.WidgetActionClass class_new (string path);
+ [CCode (cname = "glade_widget_action_class_clone")]
+ public class unowned Glade.WidgetActionClass clone ();
+ [CCode (cname = "glade_widget_action_class_free")]
+ public class void free ();
+ public unowned GLib.List<Glade.WidgetAction> get_children ();
+ public unowned Glade.WidgetActionClass get_class ();
+ public bool get_sensitive ();
+ public bool get_visible ();
+ [NoWrapper]
+ public virtual void glade_reserved1 ();
+ [NoWrapper]
+ public virtual void glade_reserved2 ();
+ [NoWrapper]
+ public virtual void glade_reserved3 ();
+ [NoWrapper]
+ public virtual void glade_reserved4 ();
+ [CCode (cname = "glade_widget_action_class_set_important")]
+ public class void set_important (bool important);
+ [CCode (cname = "glade_widget_action_class_set_label")]
+ public class void set_label (string label);
+ public void set_sensitive (bool sensitive);
+ [CCode (cname = "glade_widget_action_class_set_stock")]
+ public class void set_stock (string stock);
+ public void set_visible (bool visible);
+ public void* @class { construct; }
+ public bool sensitive { get; set; }
+ public bool visible { get; set; }
+ }
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ [Compact]
+ public class WidgetActionClass {
+ public weak GLib.List<Glade.WidgetAction> actions;
+ public weak string id;
+ public bool important;
+ public weak string label;
+ public weak string path;
+ public weak string stock;
+ }
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ [Compact]
+ public class WidgetAdaptor {
+ public weak GLib.Object parent_instance;
+ public weak Glade.WidgetAdaptorClass priv;
+ public void action_activate (GLib.Object object, string action_path);
+ public bool action_add (string action_path, string label, string stock, bool important);
+ public bool action_remove (string action_path);
+ public unowned Gtk.Widget action_submenu (GLib.Object object, string action_path);
+ public unowned GLib.List<Glade.WidgetAction> actions_new ();
+ public void add (GLib.Object container, GLib.Object child);
+ public bool add_verify (GLib.Object container, GLib.Object child, bool user_feedback);
+ public void child_action_activate (GLib.Object container, GLib.Object object, string action_path);
+ public void child_get_property (GLib.Object container, GLib.Object child, string property_name, GLib.Value value);
+ public void child_set_property (GLib.Object container, GLib.Object child, string property_name, GLib.Value value);
+ public bool child_verify_property (GLib.Object container, GLib.Object child, string property_name, GLib.Value value);
+ public unowned GLib.Object construct_object (uint n_parameters, GLib.Parameter parameters);
+ public unowned Glade.Editable create_editable (Glade.EditorPageType type);
+ public unowned Glade.EditorProperty create_eprop (Glade.PropertyClass klass, bool use_command);
+ public unowned Glade.EditorProperty create_eprop_by_name (string property_id, bool packing, bool use_command);
+ public static unowned Glade.Widget create_internal (Glade.Widget parent, GLib.Object internal_object, string internal_name, string parent_name, bool anarchist, Glade.CreateReason reason);
+ public static unowned Glade.Widget create_widget_real (bool query, ...);
+ public GLib.Parameter default_params (bool @construct, uint n_params);
+ public bool depends (Glade.Widget widget, Glade.Widget another);
+ // public static unowned Glade.WidgetAdaptor from_catalog (Glade.Catalog catalog, Glade.XmlNode class_node, GLib.Module module);
+ public unowned Glade.WidgetAdaptor from_pspec (GLib.ParamSpec spec);
+ public static unowned Glade.WidgetAdaptor get_by_name (string name);
+ public static unowned Glade.WidgetAdaptor get_by_type (GLib.Type type);
+ public unowned GLib.List<Glade.WidgetAdaptor> get_children (GLib.Object container);
+ public unowned string get_generic_name ();
+ public unowned string get_icon_name ();
+ public unowned GLib.Object get_internal_child (GLib.Object object, string internal_name);
+ public unowned string get_missing_icon ();
+ public unowned string get_name ();
+ public GLib.Type get_object_type ();
+ public unowned Glade.PropertyClass get_pack_property_class (string name);
+ public unowned string get_packing_default (Glade.WidgetAdaptor container_adaptor, string id);
+ public unowned GLib.List<Glade.Property> get_packing_props ();
+ public unowned Glade.WidgetAdaptor get_parent_adaptor ();
+ public unowned GLib.List<Glade.Property> get_properties ();
+ public void get_property (GLib.Object object, string property_name, GLib.Value value);
+ public unowned Glade.PropertyClass get_property_class (string name);
+ public unowned Glade.SignalClass get_signal_class (string name);
+ public unowned GLib.List<Glade.Signal> get_signals ();
+ public unowned string get_title ();
+ public bool has_child (GLib.Object container, GLib.Object child);
+ public bool has_internal_children ();
+ public bool is_container ();
+ public static unowned GLib.List<Glade.WidgetAdaptor> list_adaptors ();
+ public bool pack_action_add (string action_path, string label, string stock, bool important);
+ public bool pack_action_remove (string action_path);
+ public unowned GLib.List<Glade.WidgetAction> pack_actions_new ();
+ public void post_create (GLib.Object object, Glade.CreateReason reason);
+ public bool query ();
+ public void read_child (Glade.Widget widget, Glade.XmlNode node);
+ public void read_widget (Glade.Widget widget, Glade.XmlNode node);
+ public void register ();
+ public void remove (GLib.Object container, GLib.Object child);
+ public void replace_child (GLib.Object container, GLib.Object old_obj, GLib.Object new_obj);
+ public void set_property (GLib.Object object, string property_name, GLib.Value value);
+ public unowned string string_from_value (Glade.PropertyClass klass, GLib.Value value);
+ public bool verify_property (GLib.Object object, string property_name, GLib.Value value);
+ public void write_child (Glade.Widget widget, Glade.XmlContext context, Glade.XmlNode node);
+ public void write_widget (Glade.Widget widget, Glade.XmlContext context, Glade.XmlNode node);
+ }
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ [Compact]
+ public class WidgetAdaptorClass {
+ public weak Glade.ActionActivateFunc action_activate;
+ public weak Glade.ActionSubmenuFunc action_submenu;
+ public weak Glade.AddChildFunc add;
+ public weak Glade.AddChildVerifyFunc add_verify;
+ public weak Glade.ChildActionActivateFunc child_action_activate;
+ public weak Glade.ChildGetPropertyFunc child_get_property;
+ public weak Glade.ChildSetPropertyFunc child_set_property;
+ public weak Glade.ChildVerifyPropertyFunc child_verify_property;
+ public weak Glade.ConstructObjectFunc construct_object;
+ public weak Glade.CreateEditableFunc create_editable;
+ public weak Glade.CreateEPropFunc create_eprop;
+ public weak Glade.CreateWidgetFunc create_widget;
+ public weak Glade.PostCreateFunc deep_post_create;
+ public int16 default_height;
+ public int16 default_width;
+ public weak Glade.DependsFunc depends;
+ public uint deprecated;
+ public weak Glade.GetChildrenFunc get_children;
+ public weak Glade.GetInternalFunc get_internal_child;
+ public weak Glade.GetPropertyFunc get_property;
+ public weak GLib.Callback glade_reserved1;
+ public weak GLib.Callback glade_reserved2;
+ public weak GLib.Callback glade_reserved3;
+ public weak GLib.Callback glade_reserved4;
+ public weak GLib.Callback glade_reserved5;
+ public weak GLib.Callback glade_reserved6;
+ public weak GLib.Callback glade_reserved7;
+ public weak GLib.Callback glade_reserved8;
+ public weak GLib.ObjectClass parent_class;
+ public weak Glade.PostCreateFunc post_create;
+ public weak Glade.ReadWidgetFunc read_child;
+ public weak Glade.ReadWidgetFunc read_widget;
+ public weak Glade.RemoveChildFunc remove;
+ public weak Glade.ReplaceChildFunc replace_child;
+ public weak Glade.SetPropertyFunc set_property;
+ public weak Glade.StringFromValueFunc string_from_value;
+ public uint toplevel;
+ public uint use_placeholders;
+ public weak Glade.VerifyPropertyFunc verify_property;
+ public uint16 version_since_major;
+ public uint16 version_since_minor;
+ public weak Glade.WriteWidgetFunc write_child;
+ public weak Glade.WriteWidgetFunc write_widget;
+ }
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ [Compact]
+ public class WidgetGroup {
+ public unowned GLib.List<Glade.WidgetAdaptor> get_adaptors ();
+ public bool get_expanded ();
+ public unowned string get_name ();
+ public unowned string get_title ();
+ }
+ [CCode (cheader_filename = "gladeui/glade.h", free_function = "glade_xml_context_destroy")]
+ [Compact]
+ public class XmlContext {
+ [CCode (has_construct_function = false)]
+ public XmlContext (Glade.XmlDoc doc, string name_space);
+ public void free ();
+ [CCode (has_construct_function = false)]
+ public XmlContext.from_path (string full_path, string nspace, string root_name);
+ public unowned Glade.XmlDoc get_doc ();
+ }
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ [Compact]
+ public class XmlDoc {
+ [CCode (has_construct_function = false)]
+ public XmlDoc ();
+ public unowned Glade.XmlNode get_root ();
+ public int save (string full_path);
+ public void set_root (Glade.XmlNode node);
+ }
+ [CCode (cheader_filename = "gladeui/glade.h", copy_function = "glade_xml_node_copy")]
+ [Compact]
+ public class XmlNode {
+ [CCode (has_construct_function = false)]
+ public XmlNode (Glade.XmlContext context, string name);
+ public void append_child (Glade.XmlNode child);
+ [CCode (has_construct_function = false)]
+ public XmlNode.comment (Glade.XmlContext context, string comment);
+ public unowned Glade.XmlNode copy ();
+ public void @delete ();
+ public unowned Glade.XmlNode get_children ();
+ public unowned Glade.XmlNode get_children_with_comments ();
+ public unowned string get_name ();
+ public unowned Glade.XmlNode get_parent ();
+ public bool is_comment ();
+ public unowned Glade.XmlNode next ();
+ public unowned Glade.XmlNode next_with_comments ();
+ public void remove ();
+ public void set_property_boolean (string name, bool value);
+ public void set_property_string (string name, string str);
+ public bool verify (string name);
+ public bool verify_silent (string name);
+ }
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public interface Editable : Gtk.Widget {
+ public void block ();
+ public abstract void load (Glade.Widget widget);
+ public unowned Glade.Widget loaded_widget ();
+ public bool loading ();
+ public abstract void set_show_name (bool show_name);
+ public void unblock ();
+ }
+ [CCode (cheader_filename = "gladeui/glade.h", cprefix = "GLADE_CREATE_")]
+ public enum CreateReason {
+ USER,
+ COPY,
+ LOAD,
+ REBUILD
+ }
+ [CCode (cheader_filename = "gladeui/glade.h", cprefix = "GLADE_CURSOR_", has_type_id = false)]
+ public enum CursorType {
+ SELECTOR,
+ ADD_WIDGET,
+ RESIZE_TOP_LEFT,
+ RESIZE_TOP_RIGHT,
+ RESIZE_BOTTOM_LEFT,
+ RESIZE_BOTTOM_RIGHT,
+ RESIZE_LEFT,
+ RESIZE_RIGHT,
+ RESIZE_TOP,
+ RESIZE_BOTTOM,
+ DRAG
+ }
+ [CCode (cheader_filename = "gladeui/glade.h", cprefix = "GLADE_PAGE_", has_type_id = false)]
+ public enum EditorPageType {
+ GENERAL,
+ COMMON,
+ PACKING,
+ ATK,
+ QUERY
+ }
+ [CCode (cheader_filename = "gladeui/glade.h", cprefix = "GLADE_ITEM_")]
+ public enum ItemAppearance {
+ ICON_AND_LABEL,
+ ICON_ONLY,
+ LABEL_ONLY
+ }
+ [CCode (cheader_filename = "gladeui/glade.h", cprefix = "")]
+ public enum PointerMode {
+ select,
+ add,
+ drag_resize,
+ margin_edit,
+ align_edit
+ }
+ [CCode (cheader_filename = "gladeui/glade.h", cprefix = "GLADE_PROJECT_MODEL_", has_type_id = false)]
+ public enum ProjectModelColumns {
+ COLUMN_ICON_NAME,
+ COLUMN_NAME,
+ COLUMN_TYPE_NAME,
+ COLUMN_OBJECT,
+ COLUMN_MISC,
+ N_COLUMNS
+ }
+ [CCode (cheader_filename = "gladeui/glade.h", cprefix = "GLADE_STATE_", has_type_id = false)]
+ public enum PropertyState {
+ NORMAL,
+ CHANGED,
+ UNSUPPORTED,
+ SUPPORT_DISABLED
+ }
+ [CCode (cheader_filename = "gladeui/glade.h", cprefix = "GLADE_SIGNAL_", has_type_id = false)]
+ public enum SignalModelColumns {
+ COLUMN_NAME,
+ COLUMN_SHOW_NAME,
+ COLUMN_HANDLER,
+ COLUMN_OBJECT,
+ COLUMN_SWAP,
+ COLUMN_AFTER,
+ COLUMN_TOOLTIP,
+ COLUMN_SIGNAL,
+ N_COLUMNS
+ }
+ [CCode (cheader_filename = "gladeui/glade.h", cprefix = "")]
+ public enum Stock {
+ About,
+ Add,
+ Apply,
+ Ascending,
+ Back,
+ BestFit,
+ Bold,
+ _Bottom,
+ CDROM,
+ Cancel,
+ Center,
+ Clear,
+ Close,
+ Color,
+ Connect,
+ Convert,
+ Copy,
+ Cut,
+ DecreaseIndent,
+ Delete,
+ Descending,
+ Discard,
+ Disconnect,
+ Down,
+ Edit,
+ Error,
+ Execute,
+ File,
+ Fill,
+ Find,
+ FindandReplace,
+ First,
+ Floppy,
+ Font,
+ Forward,
+ Fullscreen,
+ HardDisk,
+ Help,
+ Home,
+ IncreaseIndent,
+ Index,
+ Information,
+ Italic,
+ Jumpto,
+ Landscape,
+ Last,
+ LeaveFullscreen,
+ Left,
+ Network,
+ New,
+ Next,
+ No,
+ NormalSize,
+ OK,
+ Open,
+ PageSetup,
+ Paste,
+ Pause,
+ Play,
+ Portrait,
+ Preferences,
+ Previous,
+ Print,
+ PrintPreview,
+ Properties,
+ Question,
+ Quit,
+ Record,
+ Redo,
+ Refresh,
+ Remove,
+ Reverselandscape,
+ Reverseportrait,
+ Revert,
+ Rewind,
+ Right,
+ Save,
+ SaveAs,
+ SelectAll,
+ SpellCheck,
+ Stop,
+ Strikethrough,
+ Top,
+ Undelete,
+ Underline,
+ Undo,
+ Up,
+ Warning,
+ Yes,
+ ZoomIn,
+ ZoomOut
+ }
+ [CCode (cheader_filename = "gladeui/glade.h", cprefix = "")]
+ public enum StockImage {
+ About,
+ Add,
+ Apply,
+ Ascending,
+ Back,
+ BestFit,
+ Bold,
+ Bottom,
+ CDROM,
+ Cancel,
+ Center,
+ Clear,
+ Close,
+ Color,
+ Connect,
+ Convert,
+ Copy,
+ Cut,
+ DecreaseIndent,
+ Delete,
+ Descending,
+ Discard,
+ Disconnect,
+ Down,
+ Edit,
+ Error,
+ Execute,
+ File,
+ Fill,
+ Find,
+ FindandReplace,
+ First,
+ Floppy,
+ Font,
+ Forward,
+ Fullscreen,
+ HardDisk,
+ Help,
+ Home,
+ IncreaseIndent,
+ Index,
+ Information,
+ Italic,
+ Jumpto,
+ Landscape,
+ Last,
+ LeaveFullscreen,
+ Left,
+ Network,
+ New,
+ Next,
+ No,
+ NormalSize,
+ OK,
+ Open,
+ PageSetup,
+ Paste,
+ Pause,
+ Play,
+ Portrait,
+ Preferences,
+ Previous,
+ Print,
+ PrintPreview,
+ Properties,
+ Question,
+ Quit,
+ Record,
+ Redo,
+ Refresh,
+ Remove,
+ Reverselandscape,
+ Reverseportrait,
+ Revert,
+ Rewind,
+ Right,
+ Save,
+ SaveAs,
+ SelectAll,
+ SpellCheck,
+ Stop,
+ Strikethrough,
+ Top,
+ Undelete,
+ Underline,
+ Undo,
+ Up,
+ Warning,
+ Yes,
+ ZoomIn,
+ ZoomOut,
+ gtk_color_picker,
+ gtk_dialog_authentication,
+ gtk_directory,
+ gtk_dnd,
+ gtk_dnd_multiple,
+ gtk_file,
+ gtk_missing_image
+ }
+ [CCode (cheader_filename = "gladeui/glade.h", cprefix = "GLADE_SUPPORT_", has_type_id = false)]
+ public enum SupportMask {
+ OK,
+ DEPRECATED,
+ MISMATCH
+ }
+ [CCode (cheader_filename = "gladeui/glade.h", cprefix = "GLADE_UI_", has_type_id = false)]
+ public enum UIMessageType {
+ INFO,
+ WARN,
+ ERROR,
+ ARE_YOU_SURE,
+ YES_OR_NO
+ }
+ [CCode (cheader_filename = "gladeui/glade.h", cprefix = "GLADE_FILE_DIALOG_ACTION_", has_type_id = false)]
+ public enum UtilFileDialogType {
+ OPEN,
+ SAVE
+ }
+ [CCode (cheader_filename = "gladeui/glade.h", has_target = false)]
+ public delegate void ActionActivateFunc (Glade.WidgetAdaptor adaptor, GLib.Object object, string action_path);
+ [CCode (cheader_filename = "gladeui/glade.h", has_target = false)]
+ public delegate unowned Gtk.Widget ActionSubmenuFunc (Glade.WidgetAdaptor adaptor, GLib.Object object, string action_path);
+ [CCode (cheader_filename = "gladeui/glade.h", has_target = false)]
+ public delegate void AddChildFunc (Glade.WidgetAdaptor adaptor, GLib.Object parent, GLib.Object child);
+ [CCode (cheader_filename = "gladeui/glade.h", has_target = false)]
+ public delegate bool AddChildVerifyFunc (Glade.WidgetAdaptor adaptor, GLib.Object parent, GLib.Object child, bool user_feedback);
+ [CCode (cheader_filename = "gladeui/glade.h", has_target = false)]
+ public delegate void CatalogInitFunc (string name);
+ [CCode (cheader_filename = "gladeui/glade.h", has_target = false)]
+ public delegate void ChildActionActivateFunc (Glade.WidgetAdaptor adaptor, GLib.Object container, GLib.Object object, string action_path);
+ [CCode (cheader_filename = "gladeui/glade.h", has_target = false)]
+ public delegate void ChildGetPropertyFunc (Glade.WidgetAdaptor adaptor, GLib.Object container, GLib.Object child, string property_name, GLib.Value value);
+ [CCode (cheader_filename = "gladeui/glade.h", has_target = false)]
+ public delegate void ChildSetPropertyFunc (Glade.WidgetAdaptor adaptor, GLib.Object container, GLib.Object child, string property_name, GLib.Value value);
+ [CCode (cheader_filename = "gladeui/glade.h", has_target = false)]
+ public delegate bool ChildVerifyPropertyFunc (Glade.WidgetAdaptor adaptor, GLib.Object container, GLib.Object child, string property_name, GLib.Value value);
+ [CCode (cheader_filename = "gladeui/glade.h", has_target = false)]
+ public delegate unowned GLib.Object ConstructObjectFunc (Glade.WidgetAdaptor adaptor, uint n_parameters, GLib.Parameter parameters);
+ [CCode (cheader_filename = "gladeui/glade.h", has_target = false)]
+ public delegate unowned Glade.EditorProperty CreateEPropFunc (Glade.WidgetAdaptor adaptor, Glade.PropertyClass klass, bool use_command);
+ [CCode (cheader_filename = "gladeui/glade.h", has_target = false)]
+ public delegate unowned Glade.Editable CreateEditableFunc (Glade.WidgetAdaptor adaptor, Glade.EditorPageType type);
+ [CCode (cheader_filename = "gladeui/glade.h", has_target = false)]
+ public delegate unowned Glade.Widget CreateWidgetFunc (Glade.WidgetAdaptor adaptor, string first_property_name, void* var_args);
+ [CCode (cheader_filename = "gladeui/glade.h", has_target = false)]
+ public delegate bool DependsFunc (Glade.WidgetAdaptor adaptor, Glade.Widget widget, Glade.Widget another);
+ [CCode (cheader_filename = "gladeui/glade.h", has_target = false)]
+ public delegate unowned GLib.List<Glade.WidgetAdaptor> GetChildrenFunc (Glade.WidgetAdaptor adaptor, GLib.Object container);
+ [CCode (cheader_filename = "gladeui/glade.h", has_target = false)]
+ public delegate unowned GLib.Object GetInternalFunc (Glade.WidgetAdaptor adaptor, GLib.Object parent, string name);
+ [CCode (cheader_filename = "gladeui/glade.h", has_target = false)]
+ public delegate void GetPropertyFunc (Glade.WidgetAdaptor adaptor, GLib.Object object, string property_name, GLib.Value value);
+ [CCode (cheader_filename = "gladeui/glade.h", has_target = false)]
+ public delegate void PostCreateFunc (Glade.WidgetAdaptor adaptor, GLib.Object object, Glade.CreateReason reason);
+ [CCode (cheader_filename = "gladeui/glade.h", has_target = false)]
+ public delegate void ReadWidgetFunc (Glade.WidgetAdaptor adaptor, Glade.Widget widget, Glade.XmlNode node);
+ [CCode (cheader_filename = "gladeui/glade.h", has_target = false)]
+ public delegate void RemoveChildFunc (Glade.WidgetAdaptor adaptor, GLib.Object parent, GLib.Object child);
+ [CCode (cheader_filename = "gladeui/glade.h", has_target = false)]
+ public delegate void ReplaceChildFunc (Glade.WidgetAdaptor adaptor, GLib.Object container, GLib.Object old_obj, GLib.Object new_obj);
+ [CCode (cheader_filename = "gladeui/glade.h", has_target = false)]
+ public delegate void SetPropertyFunc (Glade.WidgetAdaptor adaptor, GLib.Object object, string property_name, GLib.Value value);
+ [CCode (cheader_filename = "gladeui/glade.h", has_target = false)]
+ public delegate unowned string StringFromValueFunc (Glade.WidgetAdaptor adaptor, Glade.PropertyClass klass, GLib.Value value);
+ [CCode (cheader_filename = "gladeui/glade.h", has_target = false)]
+ public delegate bool VerifyPropertyFunc (Glade.WidgetAdaptor adaptor, GLib.Object object, string property_name, GLib.Value value);
+ [CCode (cheader_filename = "gladeui/glade.h", has_target = false)]
+ public delegate void WriteWidgetFunc (Glade.WidgetAdaptor adaptor, Glade.Widget widget, Glade.XmlContext context, Glade.XmlNode node);
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string DEVHELP_FALLBACK_ICON_FILE;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string DEVHELP_ICON_NAME;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string ENV_CATALOG_PATH;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string ENV_MODULE_PATH;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string GPC_OBJECT_DELIMITER;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const int GPC_PROPERTY_NAMELEN;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const int GTKBUILDER_VERSIONING_BASE_MAJOR;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const int GTKBUILDER_VERSIONING_BASE_MINOR;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_ACTION;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_ACTIONS;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_ACTION_ACTIVATE_FUNCTION;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_ACTION_SUBMENU_FUNCTION;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_ADAPTOR;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_ADD_CHILD_FUNCTION;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_ADD_CHILD_VERIFY_FUNCTION;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_ANARCHIST;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_ATK_PROPERTY;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_BOOK;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_BUILDER_SINCE;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_CHILD_ACTION_ACTIVATE_FUNCTION;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_CHILD_GET_PROP_FUNCTION;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_CHILD_PROPERTY;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_CHILD_SET_PROP_FUNCTION;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_CHILD_VERIFY_FUNCTION;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_COMMENT;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_COMMON;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_CONSTRUCTOR_FUNCTION;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_CONSTRUCT_OBJECT_FUNCTION;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_CONSTRUCT_ONLY;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_CONTEXT;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_CREATE_EDITABLE_FUNCTION;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_CREATE_EPROP_FUNCTION;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_CREATE_TYPE;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_CREATE_WIDGET_FUNCTION;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_CUSTOM_LAYOUT;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_DEEP_POST_CREATE_FUNCTION;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_DEFAULT;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_DEFAULT_HEIGHT;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_DEFAULT_PALETTE_STATE;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_DEFAULT_WIDTH;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_DEPENDS;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_DEPENDS_FUNCTION;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_DEPRECATED;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_DISABLED;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_DISPLAYABLE_VALUES;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_DOMAIN;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_EDITABLE;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_EVENT_HANDLER_CONNECTED;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_EXPANDED;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_FALSE;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_GENERIC_NAME;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_GET_CHILDREN_FUNCTION;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_GET_FUNCTION;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_GET_INTERNAL_CHILD_FUNCTION;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_GET_TYPE_FUNCTION;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_GLADE_CATALOG;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_GLADE_WIDGET_CLASS;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_GLADE_WIDGET_CLASSES;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_GLADE_WIDGET_CLASS_REF;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_GLADE_WIDGET_GROUP;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_HAS_CONTEXT;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_ICON_NAME;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_ICON_PREFIX;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_ID;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_IGNORE;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_IMPORTANT;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_INIT_FUNCTION;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_INTERNAL_CHILDREN;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_KEY;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_LIBRARY;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_MAX_VALUE;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_MIN_VALUE;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_MULTILINE;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_NAME;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_NEEDS_SYNC;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_NICK;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_NO;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_OPTIONAL;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_OPTIONAL_DEFAULT;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_PACKING_ACTIONS;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_PACKING_DEFAULTS;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_PACKING_PROPERTIES;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_PARENT;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_PARENTLESS_WIDGET;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_PARENT_CLASS;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_POST_CREATE_FUNCTION;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_PROPERTIES;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_PROPERTY;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_QUERY;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_READ_CHILD_FUNCTION;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_READ_WIDGET_FUNCTION;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_REMOVE_CHILD_FUNCTION;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_REPLACE_CHILD_FUNCTION;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_RESOURCE;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_SAVE;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_SAVE_ALWAYS;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_SET_FUNCTION;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_SIGNAL;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_SIGNALS;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_SPEC;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_SPECIAL_CHILD_TYPE;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_SPECIFICATIONS;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_STOCK;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_STOCK_ICON;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_STRING_FROM_VALUE_FUNCTION;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_TARGETABLE;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_THEMED_ICON;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_TITLE;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_TOOLTIP;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_TOPLEVEL;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_TRANSFER_ON_PASTE;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_TRANSLATABLE;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_TRUE;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_TYPE;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_USE_PLACEHOLDERS;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_VALUE;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_VALUE_TYPE;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_VERIFY_FUNCTION;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_VERSION;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_VERSION_SINCE;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_VISIBLE;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_WEIGHT;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_WRITE_CHILD_FUNCTION;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_WRITE_WIDGET_FUNCTION;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string TAG_YES;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string XML_TAG_AFTER;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string XML_TAG_CHILD;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string XML_TAG_CLASS;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string XML_TAG_FILENAME;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string XML_TAG_HANDLER;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string XML_TAG_I18N_TRUE;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string XML_TAG_ID;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string XML_TAG_INTERNAL_CHILD;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string XML_TAG_LIB;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string XML_TAG_NAME;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string XML_TAG_OBJECT;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string XML_TAG_PACKING;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string XML_TAG_PLACEHOLDER;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string XML_TAG_PROJECT;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string XML_TAG_PROPERTY;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string XML_TAG_REQUIRES;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string XML_TAG_SIGNAL;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string XML_TAG_SIGNAL_FALSE;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string XML_TAG_SIGNAL_TRUE;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string XML_TAG_SOURCE;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string XML_TAG_SOURCES;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string XML_TAG_STOCK_ID;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string XML_TAG_SWAPPED;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string XML_TAG_TYPE;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string XML_TAG_VERSION;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public const string XML_TAG_WIDGET;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static unowned string get_displayable_value (GLib.Type type, string value);
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static unowned string get_value_from_displayable (GLib.Type type, string displayabe);
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static GLib.Type param_objects_get_type ();
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static unowned GLib.ParamSpec param_spec_objects (string name, string nick, string blurb, GLib.Type accepted_type, GLib.ParamFlags flags);
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static unowned string propert_get_insensitive_tooltip (Glade.Property property);
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static void register_displayable_value (GLib.Type type, string value, string domain, string str);
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static void register_translated_value (GLib.Type type, string value, string str);
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static void setup_log_handlers ();
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static unowned GLib.ParamSpec standard_boolean_spec ();
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static unowned GLib.ParamSpec standard_float_spec ();
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static unowned GLib.ParamSpec standard_gdkcolor_spec ();
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static unowned GLib.ParamSpec standard_int_spec ();
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static unowned GLib.ParamSpec standard_objects_spec ();
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static unowned GLib.ParamSpec standard_pixbuf_spec ();
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static void standard_stock_append_prefix (string prefix);
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static unowned GLib.ParamSpec standard_stock_image_spec ();
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static unowned GLib.ParamSpec standard_stock_spec ();
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static unowned GLib.ParamSpec standard_string_spec ();
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static unowned GLib.ParamSpec standard_strv_spec ();
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static unowned GLib.ParamSpec standard_uint_spec ();
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static bool type_has_displayable_values (GLib.Type type);
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static unowned GLib.List util_added_in_list (GLib.List old_list, GLib.List new_list);
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static unowned string util_canonical_path (string path);
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static bool util_check_and_warn_scrollable (Glade.Widget parent, Glade.WidgetAdaptor child_adaptor, Gtk.Widget parent_widget);
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static int util_compare_stock_labels (void* a, void* b);
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static unowned GLib.List util_container_get_all_children (Gtk.Container container);
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static int util_count_placeholders (Glade.Widget parent);
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static unowned string util_duplicate_underscores (string name);
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static unowned Gtk.Widget util_file_dialog_new (string title, Glade.Project project, Gtk.Window parent, Glade.UtilFileDialogType action);
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static bool util_file_is_writeable (string path);
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static unowned string util_filename_to_icon_name (string value);
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static Gtk.TreeIter util_find_iter_by_widget (Gtk.TreeModel model, Glade.Widget findme, int column);
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static void util_flash_message (Gtk.Widget statusbar, uint context_id, string format);
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static unowned Gtk.Widget util_get_devhelp_icon (Gtk.IconSize size);
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static ulong util_get_file_mtime (string filename) throws GLib.Error;
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static unowned Gtk.Widget util_get_placeholder_from_pointer (Gtk.Container container);
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static GLib.Type util_get_type_from_name (string name, bool have_func);
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static bool util_have_devhelp ();
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static unowned string util_icon_name_to_filename (string value);
+ // [CCode (cheader_filename = "gladeui/glade.h")]
+ // public static unowned GLib.Module util_load_library (string library_name);
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static bool util_object_is_loading (GLib.Object object);
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static unowned GLib.List util_purify_list (GLib.List list);
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static unowned string util_read_prop_name (string str);
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static unowned GLib.List util_removed_from_list (GLib.List old_list, GLib.List new_list);
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static void util_replace (string str, char a, char b);
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static void util_search_devhelp (string book, string page, string search);
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static bool util_ui_message (Gtk.Widget parent, Glade.UIMessageType type, Gtk.Widget widget, string format);
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static bool util_url_show (string url);
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static void utils_cairo_draw_line (Cairo.Context cr, Gdk.Color color, int x1, int y1, int x2, int y2);
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static void utils_cairo_draw_rectangle (Cairo.Context cr, Gdk.Color color, bool filled, int x, int y, int width, int height);
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static unowned string utils_enum_string_from_value (GLib.Type enum_type, int value);
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static unowned string utils_enum_string_from_value_displayable (GLib.Type flags_type, int value);
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static int utils_enum_value_from_string (GLib.Type enum_type, string strval);
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static unowned string utils_flags_string_from_value (GLib.Type enum_type, int value);
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static unowned string utils_flags_string_from_value_displayable (GLib.Type flags_type, int value);
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static int utils_flags_value_from_string (GLib.Type enum_type, string strval);
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static unowned GLib.ParamSpec utils_get_pspec_from_funcname (string funcname);
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static int utils_hijack_key_press (Gtk.Window win, Gdk.EventKey event);
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static unowned Gtk.ListStore utils_liststore_from_enum_type (GLib.Type enum_type, bool include_empty);
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static unowned string utils_replace_home_dir_with_tilde (string path);
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static unowned string utils_string_from_value (GLib.Value value);
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static GLib.Value utils_value_from_string (GLib.Type type, string str, Glade.Project project);
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static unowned string xml_dump_from_context (Glade.XmlContext context);
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static bool xml_get_boolean (Glade.XmlNode node, string name, bool _default);
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static unowned string xml_get_content (Glade.XmlNode node_in);
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static bool xml_get_property_boolean (Glade.XmlNode node_in, string name, bool _default);
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static double xml_get_property_double (Glade.XmlNode node_in, string name, double _default);
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static int xml_get_property_int (Glade.XmlNode node_in, string name, int _default);
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static unowned string xml_get_property_string (Glade.XmlNode node_in, string name);
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static unowned string xml_get_property_string_required (Glade.XmlNode node_in, string name, string xtra);
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static unowned GLib.List xml_get_property_targetable_versions (Glade.XmlNode node_in, string name);
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static bool xml_get_property_version (Glade.XmlNode node_in, string name, uint16 major, uint16 minor);
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static bool xml_get_value_int (Glade.XmlNode node_in, string name, int val);
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static bool xml_get_value_int_required (Glade.XmlNode node, string name, int val);
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static unowned string xml_get_value_string (Glade.XmlNode node, string name);
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static unowned string xml_get_value_string_required (Glade.XmlNode node, string name, string xtra_info);
+ // [CCode (cheader_filename = "gladeui/glade.h")]
+ // public static bool xml_load_sym_from_node (Glade.XmlNode node_in, GLib.Module module, string tagname, void* sym_location);
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static unowned Glade.XmlNode xml_search_child (Glade.XmlNode node, string name);
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static unowned Glade.XmlNode xml_search_child_required (Glade.XmlNode tree, string name);
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static void xml_set_content (Glade.XmlNode node_in, string content);
+ [CCode (cheader_filename = "gladeui/glade.h")]
+ public static void xml_set_value (Glade.XmlNode node_in, string name, string val);
+}
--- /dev/null
+/* gobject-introspection-1.0.vapi generated by vapigen, do not modify. */
+
+[CCode (cprefix = "GI", gir_namespace = "GIRepository", gir_version = "2.0", lower_case_cprefix = "g_")]
+namespace GI {
+ [CCode (cheader_filename = "girepository.h")]
+ public class ArgInfo : GI.BaseInfo {
+ [CCode (has_construct_function = false)]
+ protected ArgInfo ();
+ public static int get_closure (GI.ArgInfo info);
+ public static int get_destroy (GI.ArgInfo info);
+ public static GI.Direction get_direction (GI.ArgInfo info);
+ public static GI.Transfer get_ownership_transfer (GI.ArgInfo info);
+ public static GI.ScopeType get_scope (GI.ArgInfo info);
+ public static GI.TypeInfo get_type (GI.ArgInfo info);
+ public static bool is_caller_allocates (GI.ArgInfo info);
+ public static bool is_optional (GI.ArgInfo info);
+ public static bool is_return_value (GI.ArgInfo info);
+ public static bool is_skip (GI.ArgInfo info);
+ public static void load_type (GI.ArgInfo info, out unowned GI.TypeInfo type);
+ public static bool may_be_null (GI.ArgInfo info);
+ }
+ [CCode (cheader_filename = "girepository.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", lower_case_csuffix = "base_info_gtype", type_id = "g_base_info_gtype_get_type ()")]
+ [Compact]
+ public class BaseInfo {
+ [CCode (cname = "g_base_info_equal")]
+ public bool equal (GI.BaseInfo info2);
+ [CCode (cname = "g_base_info_get_attribute")]
+ public unowned string get_attribute (string name);
+ [CCode (cname = "g_base_info_get_container")]
+ public unowned GI.BaseInfo get_container ();
+ [CCode (cname = "g_base_info_get_name")]
+ public unowned string get_name ();
+ [CCode (cname = "g_base_info_get_namespace")]
+ public unowned string get_namespace ();
+ [CCode (cname = "g_base_info_get_type")]
+ public GI.InfoType get_type ();
+ [CCode (cname = "g_base_info_get_typelib")]
+ public unowned GI.Typelib get_typelib ();
+ [CCode (cname = "g_base_info_is_deprecated")]
+ public bool is_deprecated ();
+ [CCode (cname = "g_base_info_iterate_attributes")]
+ public bool iterate_attributes (GI.AttributeIter iterator, out unowned string name, out unowned string value);
+ }
+ [CCode (cheader_filename = "girepository.h")]
+ public class CallableInfo : GI.BaseInfo {
+ [CCode (has_construct_function = false)]
+ protected CallableInfo ();
+ public static bool can_throw_gerror (GI.CallableInfo info);
+ public static GI.ArgInfo get_arg (GI.CallableInfo info, int n);
+ public static GI.Transfer get_caller_owns (GI.CallableInfo info);
+ public static int get_n_args (GI.CallableInfo info);
+ public static unowned string get_return_attribute (GI.CallableInfo info, string name);
+ public static GI.TypeInfo get_return_type (GI.CallableInfo info);
+ public static bool invoke (GI.CallableInfo info, void* function, GI.Argument in_args, int n_in_args, GI.Argument out_args, int n_out_args, GI.Argument return_value, bool is_method, bool @throws) throws GLib.Error;
+ public static bool is_method (GI.CallableInfo info);
+ public static bool iterate_return_attributes (GI.CallableInfo info, GI.AttributeIter iterator, out unowned string name, out unowned string value);
+ public static void load_arg (GI.CallableInfo info, int n, out unowned GI.ArgInfo arg);
+ public static void load_return_type (GI.CallableInfo info, out unowned GI.TypeInfo type);
+ public static bool may_return_null (GI.CallableInfo info);
+ public static bool skip_return (GI.CallableInfo info);
+ }
+ [CCode (cheader_filename = "girepository.h")]
+ public class CallbackInfo : GI.BaseInfo {
+ [CCode (has_construct_function = false)]
+ protected CallbackInfo ();
+ }
+ [CCode (cheader_filename = "girepository.h")]
+ public class ConstantInfo : GI.BaseInfo {
+ [CCode (has_construct_function = false)]
+ protected ConstantInfo ();
+ public static GI.TypeInfo get_type (GI.ConstantInfo info);
+ }
+ [CCode (cheader_filename = "girepository.h")]
+ public class EnumInfo : GI.BaseInfo {
+ [CCode (has_construct_function = false)]
+ protected EnumInfo ();
+ public static unowned string get_error_domain (GI.EnumInfo info);
+ public static GI.FunctionInfo get_method (GI.EnumInfo info, int n);
+ public static int get_n_methods (GI.EnumInfo info);
+ public static int get_n_values (GI.EnumInfo info);
+ public static GI.TypeTag get_storage_type (GI.EnumInfo info);
+ public static GI.ValueInfo get_value (GI.EnumInfo info, int n);
+ }
+ [CCode (cheader_filename = "girepository.h")]
+ public class FieldInfo : GI.BaseInfo {
+ [CCode (has_construct_function = false)]
+ protected FieldInfo ();
+ public static GI.FieldInfoFlags get_flags (GI.FieldInfo info);
+ public static int get_offset (GI.FieldInfo info);
+ public static int get_size (GI.FieldInfo info);
+ public static GI.TypeInfo get_type (GI.FieldInfo info);
+ }
+ [CCode (cheader_filename = "girepository.h")]
+ public class FunctionInfo : GI.BaseInfo {
+ [CCode (has_construct_function = false)]
+ protected FunctionInfo ();
+ public static GI.FunctionInfoFlags get_flags (GI.FunctionInfo info);
+ public static GI.PropertyInfo get_property (GI.FunctionInfo info);
+ public static unowned string get_symbol (GI.FunctionInfo info);
+ public static GI.VFuncInfo get_vfunc (GI.FunctionInfo info);
+ }
+ [CCode (cheader_filename = "girepository.h")]
+ public class InterfaceInfo : GI.BaseInfo {
+ [CCode (has_construct_function = false)]
+ protected InterfaceInfo ();
+ public static GI.FunctionInfo find_method (GI.InterfaceInfo info, string name);
+ public static GI.SignalInfo find_signal (GI.InterfaceInfo info, string name);
+ public static GI.VFuncInfo find_vfunc (GI.InterfaceInfo info, string name);
+ public static GI.ConstantInfo get_constant (GI.InterfaceInfo info, int n);
+ public static GI.StructInfo get_iface_struct (GI.InterfaceInfo info);
+ public static GI.FunctionInfo get_method (GI.InterfaceInfo info, int n);
+ public static int get_n_constants (GI.InterfaceInfo info);
+ public static int get_n_methods (GI.InterfaceInfo info);
+ public static int get_n_prerequisites (GI.InterfaceInfo info);
+ public static int get_n_properties (GI.InterfaceInfo info);
+ public static int get_n_signals (GI.InterfaceInfo info);
+ public static int get_n_vfuncs (GI.InterfaceInfo info);
+ public static GI.BaseInfo get_prerequisite (GI.InterfaceInfo info, int n);
+ public static GI.PropertyInfo get_property (GI.InterfaceInfo info, int n);
+ public static GI.SignalInfo get_signal (GI.InterfaceInfo info, int n);
+ public static GI.VFuncInfo get_vfunc (GI.InterfaceInfo info, int n);
+ }
+ [CCode (cheader_filename = "girepository.h")]
+ public class ObjectInfo : GI.BaseInfo {
+ [CCode (has_construct_function = false)]
+ protected ObjectInfo ();
+ public static GI.FunctionInfo find_method (GI.ObjectInfo info, string name);
+ public static GI.FunctionInfo find_method_using_interfaces (GI.ObjectInfo info, string name, out GI.ObjectInfo implementor);
+ public static GI.SignalInfo find_signal (GI.ObjectInfo info, string name);
+ public static GI.VFuncInfo find_vfunc (GI.ObjectInfo info, string name);
+ public static GI.VFuncInfo find_vfunc_using_interfaces (GI.ObjectInfo info, string name, out GI.ObjectInfo implementor);
+ public static bool get_abstract (GI.ObjectInfo info);
+ public static GI.StructInfo get_class_struct (GI.ObjectInfo info);
+ public static GI.ConstantInfo get_constant (GI.ObjectInfo info, int n);
+ public static GI.FieldInfo get_field (GI.ObjectInfo info, int n);
+ public static bool get_fundamental (GI.ObjectInfo info);
+ public static unowned string get_get_value_function (GI.ObjectInfo info);
+ public static GI.InterfaceInfo get_interface (GI.ObjectInfo info, int n);
+ public static GI.FunctionInfo get_method (GI.ObjectInfo info, int n);
+ public static int get_n_constants (GI.ObjectInfo info);
+ public static int get_n_fields (GI.ObjectInfo info);
+ public static int get_n_interfaces (GI.ObjectInfo info);
+ public static int get_n_methods (GI.ObjectInfo info);
+ public static int get_n_properties (GI.ObjectInfo info);
+ public static int get_n_signals (GI.ObjectInfo info);
+ public static int get_n_vfuncs (GI.ObjectInfo info);
+ public static GI.ObjectInfo get_parent (GI.ObjectInfo info);
+ public static GI.PropertyInfo get_property (GI.ObjectInfo info, int n);
+ public static unowned string get_ref_function (GI.ObjectInfo info);
+ public static unowned string get_set_value_function (GI.ObjectInfo info);
+ public static GI.SignalInfo get_signal (GI.ObjectInfo info, int n);
+ public static unowned string get_type_init (GI.ObjectInfo info);
+ public static unowned string get_type_name (GI.ObjectInfo info);
+ public static unowned string get_unref_function (GI.ObjectInfo info);
+ public static GI.VFuncInfo get_vfunc (GI.ObjectInfo info, int n);
+ }
+ [CCode (cheader_filename = "girepository.h")]
+ public class PropertyInfo : GI.BaseInfo {
+ [CCode (has_construct_function = false)]
+ protected PropertyInfo ();
+ public static GLib.ParamFlags get_flags (GI.PropertyInfo info);
+ public static GI.Transfer get_ownership_transfer (GI.PropertyInfo info);
+ public static GI.TypeInfo get_type (GI.PropertyInfo info);
+ }
+ [CCode (cheader_filename = "girepository.h")]
+ public class RegisteredTypeInfo : GI.BaseInfo {
+ [CCode (has_construct_function = false)]
+ protected RegisteredTypeInfo ();
+ public static GLib.Type get_g_type (GI.RegisteredTypeInfo info);
+ public static unowned string get_type_init (GI.RegisteredTypeInfo info);
+ public static unowned string get_type_name (GI.RegisteredTypeInfo info);
+ }
+ [CCode (cheader_filename = "girepository.h", lower_case_csuffix = "irepository", type_id = "g_irepository_get_type ()")]
+ public class Repository : GLib.Object {
+ [CCode (has_construct_function = false)]
+ protected Repository ();
+ public static bool dump (string arg) throws GLib.Error;
+ public GLib.List<string> enumerate_versions (string namespace_);
+ public static GLib.Quark error_quark ();
+ public GI.EnumInfo find_by_error_domain (GLib.Quark domain);
+ public GI.BaseInfo find_by_gtype (GLib.Type gtype);
+ public GI.BaseInfo find_by_name (string namespace_, string name);
+ public unowned string get_c_prefix (string namespace_);
+ public static unowned GI.Repository get_default ();
+ [CCode (array_length = false, array_null_terminated = true)]
+ public string[] get_dependencies (string namespace_);
+ public GI.BaseInfo get_info (string namespace_, int index);
+ [CCode (array_length = false, array_null_terminated = true)]
+ public string[] get_loaded_namespaces ();
+ public int get_n_infos (string namespace_);
+ public static unowned GLib.SList<string> get_search_path ();
+ public unowned string get_shared_library (string namespace_);
+ public unowned string get_typelib_path (string namespace_);
+ public unowned string get_version (string namespace_);
+ public bool is_registered (string namespace_, string? version);
+ public unowned string load_typelib (GI.Typelib typelib, GI.RepositoryLoadFlags flags) throws GLib.Error;
+ public static void prepend_library_path (string directory);
+ public static void prepend_search_path (string directory);
+ public unowned GI.Typelib require (string namespace_, string? version, GI.RepositoryLoadFlags flags) throws GLib.Error;
+ public unowned GI.Typelib require_private (string typelib_dir, string namespace_, string? version, GI.RepositoryLoadFlags flags) throws GLib.Error;
+ }
+ [CCode (cheader_filename = "girepository.h")]
+ public class SignalInfo : GI.BaseInfo {
+ [CCode (has_construct_function = false)]
+ protected SignalInfo ();
+ public static GI.VFuncInfo get_class_closure (GI.SignalInfo info);
+ public static GLib.SignalFlags get_flags (GI.SignalInfo info);
+ public static bool true_stops_emit (GI.SignalInfo info);
+ }
+ [CCode (cheader_filename = "girepository.h")]
+ public class StructInfo : GI.BaseInfo {
+ [CCode (has_construct_function = false)]
+ protected StructInfo ();
+ public static GI.FunctionInfo find_method (GI.StructInfo info, string name);
+ public static size_t get_alignment (GI.StructInfo info);
+ public static GI.FieldInfo get_field (GI.StructInfo info, int n);
+ public static GI.FunctionInfo get_method (GI.StructInfo info, int n);
+ public static int get_n_fields (GI.StructInfo info);
+ public static int get_n_methods (GI.StructInfo info);
+ public static size_t get_size (GI.StructInfo info);
+ public static bool is_foreign (GI.StructInfo info);
+ public static bool is_gtype_struct (GI.StructInfo info);
+ }
+ [CCode (cheader_filename = "girepository.h")]
+ public class TypeInfo : GI.BaseInfo {
+ [CCode (has_construct_function = false)]
+ protected TypeInfo ();
+ public static int get_array_fixed_size (GI.TypeInfo info);
+ public static int get_array_length (GI.TypeInfo info);
+ public static GI.ArrayType get_array_type (GI.TypeInfo info);
+ public static GI.BaseInfo get_interface (GI.TypeInfo info);
+ public static GI.TypeInfo get_param_type (GI.TypeInfo info, int n);
+ public static GI.TypeTag get_tag (GI.TypeInfo info);
+ public static bool is_pointer (GI.TypeInfo info);
+ public static bool is_zero_terminated (GI.TypeInfo info);
+ }
+ [CCode (cheader_filename = "girepository.h")]
+ [Compact]
+ public class Typelib {
+ public void free ();
+ public unowned string get_namespace ();
+ public bool symbol (string symbol_name, void* symbol);
+ }
+ [CCode (cheader_filename = "girepository.h")]
+ public class UnionInfo : GI.BaseInfo {
+ [CCode (has_construct_function = false)]
+ protected UnionInfo ();
+ public static GI.FunctionInfo find_method (GI.UnionInfo info, string name);
+ public static size_t get_alignment (GI.UnionInfo info);
+ public static GI.ConstantInfo get_discriminator (GI.UnionInfo info, int n);
+ public static int get_discriminator_offset (GI.UnionInfo info);
+ public static GI.TypeInfo get_discriminator_type (GI.UnionInfo info);
+ public static GI.FieldInfo get_field (GI.UnionInfo info, int n);
+ public static GI.FunctionInfo get_method (GI.UnionInfo info, int n);
+ public static int get_n_fields (GI.UnionInfo info);
+ public static int get_n_methods (GI.UnionInfo info);
+ public static size_t get_size (GI.UnionInfo info);
+ public static bool is_discriminated (GI.UnionInfo info);
+ }
+ [CCode (cheader_filename = "girepository.h")]
+ [Compact]
+ public class UnresolvedInfo {
+ }
+ [CCode (cheader_filename = "girepository.h")]
+ public class VFuncInfo : GI.BaseInfo {
+ [CCode (has_construct_function = false)]
+ protected VFuncInfo ();
+ public static GI.VFuncInfoFlags get_flags (GI.VFuncInfo info);
+ public static GI.FunctionInfo get_invoker (GI.VFuncInfo info);
+ public static int get_offset (GI.VFuncInfo info);
+ public static GI.SignalInfo get_signal (GI.VFuncInfo info);
+ }
+ [CCode (cheader_filename = "girepository.h")]
+ public class ValueInfo : GI.BaseInfo {
+ [CCode (has_construct_function = false)]
+ protected ValueInfo ();
+ public static int64 get_value (GI.ValueInfo info);
+ }
+ [CCode (cheader_filename = "girepository.h")]
+ public struct Argument {
+ public bool v_boolean;
+ public int8 v_int8;
+ public uint8 v_uint8;
+ public int16 v_int16;
+ public uint16 v_uint16;
+ public int32 v_int32;
+ public uint32 v_uint32;
+ public int64 v_int64;
+ public uint64 v_uint64;
+ public float v_float;
+ public double v_double;
+ public short v_short;
+ public ushort v_ushort;
+ public int v_int;
+ public uint v_uint;
+ public long v_long;
+ public ulong v_ulong;
+ public ssize_t v_ssize;
+ public size_t v_size;
+ public weak string v_string;
+ public void* v_pointer;
+ }
+ [CCode (cheader_filename = "girepository.h", has_type_id = false)]
+ public struct AttributeIter {
+ }
+ [CCode (cheader_filename = "girepository.h", cprefix = "GI_ARRAY_TYPE_", has_type_id = false)]
+ public enum ArrayType {
+ C,
+ ARRAY,
+ PTR_ARRAY,
+ BYTE_ARRAY
+ }
+ [CCode (cheader_filename = "girepository.h", cprefix = "GI_DIRECTION_", has_type_id = false)]
+ public enum Direction {
+ IN,
+ OUT,
+ INOUT
+ }
+ [CCode (cheader_filename = "girepository.h", cprefix = "GI_FIELD_IS_", has_type_id = false)]
+ [Flags]
+ public enum FieldInfoFlags {
+ READABLE,
+ WRITABLE
+ }
+ [CCode (cheader_filename = "girepository.h", cprefix = "GI_FUNCTION_", has_type_id = false)]
+ [Flags]
+ public enum FunctionInfoFlags {
+ IS_METHOD,
+ IS_CONSTRUCTOR,
+ IS_GETTER,
+ IS_SETTER,
+ WRAPS_VFUNC,
+ THROWS
+ }
+ [CCode (cheader_filename = "girepository.h", cprefix = "GI_INFO_TYPE_", has_type_id = false)]
+ public enum InfoType {
+ INVALID,
+ FUNCTION,
+ CALLBACK,
+ STRUCT,
+ BOXED,
+ ENUM,
+ FLAGS,
+ OBJECT,
+ INTERFACE,
+ CONSTANT,
+ INVALID_0,
+ UNION,
+ VALUE,
+ SIGNAL,
+ VFUNC,
+ PROPERTY,
+ FIELD,
+ ARG,
+ TYPE,
+ UNRESOLVED;
+ public static unowned string to_string (GI.InfoType type);
+ }
+ [CCode (cheader_filename = "girepository.h", cprefix = "G_IREPOSITORY_ERROR_", has_type_id = false)]
+ public enum RepositoryError {
+ TYPELIB_NOT_FOUND,
+ NAMESPACE_MISMATCH,
+ NAMESPACE_VERSION_CONFLICT,
+ LIBRARY_NOT_FOUND
+ }
+ [CCode (cheader_filename = "girepository.h", cprefix = "G_IREPOSITORY_LOAD_FLAG_", has_type_id = false)]
+ [Flags]
+ public enum RepositoryLoadFlags {
+ [CCode (cname = "G_IREPOSITORY_LOAD_FLAG_LAZY")]
+ IREPOSITORY_LOAD_FLAG_LAZY
+ }
+ [CCode (cheader_filename = "girepository.h", cprefix = "GI_SCOPE_TYPE_", has_type_id = false)]
+ public enum ScopeType {
+ INVALID,
+ CALL,
+ ASYNC,
+ NOTIFIED
+ }
+ [CCode (cheader_filename = "girepository.h", cprefix = "GI_TRANSFER_", has_type_id = false)]
+ public enum Transfer {
+ NOTHING,
+ CONTAINER,
+ EVERYTHING
+ }
+ [CCode (cheader_filename = "girepository.h", cprefix = "GI_TYPE_TAG_", has_type_id = false)]
+ public enum TypeTag {
+ VOID,
+ BOOLEAN,
+ INT8,
+ UINT8,
+ INT16,
+ UINT16,
+ INT32,
+ UINT32,
+ INT64,
+ UINT64,
+ FLOAT,
+ DOUBLE,
+ GTYPE,
+ UTF8,
+ FILENAME,
+ ARRAY,
+ INTERFACE,
+ GLIST,
+ GSLIST,
+ GHASH,
+ ERROR,
+ UNICHAR;
+ public static unowned string to_string (GI.TypeTag type);
+ }
+ [CCode (cheader_filename = "girepository.h", cprefix = "GI_VFUNC_", has_type_id = false)]
+ [Flags]
+ public enum VFuncInfoFlags {
+ MUST_CHAIN_UP,
+ MUST_OVERRIDE,
+ MUST_NOT_OVERRIDE,
+ THROWS
+ }
+ [CCode (cheader_filename = "girepository.h", cprefix = "G_INVOKE_ERROR_", has_type_id = false)]
+ public enum nvokeError {
+ FAILED,
+ SYMBOL_NOT_FOUND,
+ ARGUMENT_MISMATCH
+ }
+ [CCode (cheader_filename = "girepository.h")]
+ public static GI.BaseInfo info_new (GI.InfoType type, GI.BaseInfo container, GI.Typelib typelib, uint32 offset);
+ [CCode (cheader_filename = "girepository.h")]
+ public static GLib.Quark invoke_error_quark ();
+}
--- /dev/null
+/* javascriptcore.vapi
+ *
+ * Copyright (C) 2010 Sam Thursfield <ssssam@gmail.com>
+ *
+ * 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
+ */
+
+/* NOTE: this binding is quite inaccurate and you will have to a bunch of fixing for some functions.
+ *
+ * This is a basic interface to JSCore, a more friendly binding is Seed. See
+ * http://live.gnome.org/Seed for more information.
+ */
+
+[CCode (lower_case_cprefix = "js_", cheader_filename = "JavaScriptCore/JavaScript.h")]
+namespace JSCore {
+ [Compact]
+ [CCode (cname = "void", free_function = "JSContextGroupRelease")]
+ public class ContextGroup {
+ [CCode (cname = "JSContextGroupCreate")]
+ public ContextGroup();
+
+ [CCode (cname = "JSContextCreateInGroup")]
+ public ContextGroup Retain ();
+ }
+
+
+ [Compact]
+ [CCode (cname = "void")]
+ public class Context {
+ /* Script Evaluation */
+ [CCode (cname = "JSEvaluateScript")]
+ public Value evaluate_script (String script,
+ Object? thisObject,
+ String? sourceURL,
+ int startingLineNumber,
+ out Value exception);
+
+ [CCode (cname = "JSCheckScriptSyntax")]
+ public bool check_script_syntax (JSCore.String script,
+ JSCore.String? sourceURL, int startingLineNumber,
+ out JSCore.Value exception);
+
+ [CCode (cname = "JSGarbageCollect")]
+ public void garbage_collect ();
+
+ [CCode (cname = "JSContextGetGlobalObject")]
+ public JSCore.Object get_global_object ();
+
+ [CCode (cname = "JSContextGetGroup")]
+ public ContextGroup get_group ();
+ }
+
+
+ /* Same as Context */
+ [Compact]
+ [CCode (cname = "void", free_function = "JSGlobalContextRelease")]
+ public class GlobalContext: Context {
+ [CCode (cname = "JSGlobalContextCreate")]
+ public GlobalContext (Class globalObjectClass);
+
+ [CCode (cname = "JSGlobalContextCreateInGroup")]
+ public GlobalContext.in_group (ContextGroup group, Class globalObjectClass);
+
+ [CCode (cname = "JSGlobalContextRetain")]
+ public GlobalContext retain ();
+ }
+
+
+ /* FIXME: not sure the significance of this. Vala strings are UTF-8 while it seems
+ * JSCore uses UCS-2 or UTF-16 ...
+ #if !defined(WIN32) && !defined(_WIN32) && !defined(__WINSCW__) \
+ && !(defined(__CC_ARM) || defined(__ARMCC__))
+ typedef unsigned short JSChar;
+ #else
+ typedef wchar_t JSChar;
+ #endif
+ */
+
+ [Compact]
+ [CCode (cname = "void", free_function = "JSStringRelease")]
+ public class String {
+ [CCode (cname = "JSStringCreateWithCharacters")]
+ public String.with_characters (ushort *chars, size_t num_chars);
+
+ [CCode (cname = "JSStringCreateWithUTF8CString")]
+ public String.with_utf8_c_string (string _string);
+
+ [CCode (cname = "JSStringRetain")]
+ public String retain ();
+
+ [CCode (cname = "JSStringGetLength")]
+ public size_t get_length ();
+
+ [CCode (cname = "JSStringGetCharactersPtr")]
+ public ushort *get_characters_ptr ();
+
+ [CCode (cname = "JSStringGetMaximumUTF8CStringSize")]
+ public size_t get_maximum_utf8_c_string_size ();
+
+ [CCode (cname = "JSStringGetUTF8CString")]
+ public size_t get_utf8_c_string (char *buffer, size_t buffer_size);
+
+ [CCode (cname = "JSStringIsEqual")]
+ public bool is_equal (String b);
+
+ [CCode (cname = "JSStringIsEqualToUTF8CString")]
+ public bool is_equal_to_utf8_c_string (string b);
+ }
+
+
+ [CCode (has_target = false)]
+ public delegate void ObjectInitializeCallback (Context ctx,
+ JSCore.Object object);
+
+ [CCode (has_target = false)]
+ public delegate void ObjectFinalizeCallback (JSCore.Object object);
+
+ [CCode (has_target = false)]
+ public delegate bool ObjectHasPropertyCallback (Context ctx,
+ JSCore.Object object,
+ JSCore.String propertyName);
+
+ [CCode (has_target = false)]
+ public delegate JSCore.Value ObjectGetPropertyCallback (Context ctx,
+ JSCore.Object object,
+ JSCore.String propertyName,
+ out JSCore.Value exception);
+
+ [CCode (has_target = false)]
+ public delegate bool ObjectSetPropertyCallback (Context ctx,
+ JSCore.Object object,
+ JSCore.String propertyName,
+ JSCore.Value _value,
+ out JSCore.Value exception);
+
+ [CCode (has_target = false)]
+ public delegate bool ObjectDeletePropertyCallback (Context ctx,
+ JSCore.Object object,
+ JSCore.String propertyName,
+ out JSCore.Value exception);
+
+ [CCode (has_target = false)]
+ public delegate void ObjectGetPropertyNamesCallback (Context ctx,
+ JSCore.Object object,
+ PropertyNameAccumulator propertyNames);
+
+ [CCode (has_target = false)]
+ public delegate JSCore.Value ObjectCallAsFunctionCallback (Context ctx,
+ JSCore.Object function,
+ JSCore.Object thisObject,
+ [CCode (array_length_pos=3.9, array_length_type="size_t")]
+ JSCore.Value[] arguments,
+ out JSCore.Value exception);
+
+ [CCode (has_target = false)]
+ public delegate JSCore.Object ObjectCallAsConstructorCallback (Context ctx,
+ JSCore.Object constructor,
+ [CCode (array_length_pos=2.9, array_length_type="size_t")]
+ JSCore.Value[] arguments,
+ out JSCore.Value exception);
+
+ [CCode (has_target = false)]
+ public delegate bool ObjectHasInstanceCallback (Context ctx,
+ JSCore.Object constructor,
+ JSCore.Value possibleInstance,
+ out JSCore.Value exception);
+
+ [CCode (has_target = false)]
+ public delegate JSCore.Value ObjectConvertToTypeCallback (Context ctx,
+ JSCore.Object object,
+ JSCore.Type type,
+ out JSCore.Value exception);
+
+ public struct StaticValue {
+ public string name;
+ public ObjectGetPropertyCallback getProperty;
+ public ObjectSetPropertyCallback setProperty;
+ public PropertyAttribute attributes;
+ }
+
+ [CCode (cname = "JSStaticFunction")]
+ public struct StaticFunction {
+ public string name;
+ public ObjectCallAsFunctionCallback callAsFunction;
+ public PropertyAttribute attributes;
+ }
+
+ [CCode (cname = "JSClassDefinition")]
+ public struct ClassDefinition {
+ public int version;
+ public ClassAttribute attributes;
+
+ public string className;
+ public JSCore.Class parentClass;
+
+ public StaticValue *staticValues;
+ public StaticFunction *staticFunction;
+
+ public ObjectInitializeCallback initialize;
+ public ObjectFinalizeCallback finalize;
+ public ObjectHasPropertyCallback hasProperty;
+ public ObjectGetPropertyCallback getProperty;
+ public ObjectSetPropertyCallback setProperty;
+ public ObjectDeletePropertyCallback deleteProperty;
+ public ObjectGetPropertyNamesCallback getPropertyNames;
+ public ObjectCallAsFunctionCallback callAsFunction;
+ public ObjectCallAsConstructorCallback callAsConstructor;
+ public ObjectHasInstanceCallback hasInstance;
+ public ObjectConvertToTypeCallback convertToType;
+ }
+
+ [CCode (cname="kJSClassDefinitionEmpty")]
+ extern ClassDefinition ClassDefinitionEmpty;
+
+ //typedef unsigned JSClassAttributes;
+ [CCode (cprefix="kJSClassAttribute")]
+ [Flags]
+ public enum ClassAttribute {
+ None, NoAutomaticPrototype
+ }
+
+ [Compact]
+ [CCode (cname = "void", free_function = "JSClassRelease")]
+ public class Class {
+ [CCode (cname="JSClassCreate")]
+ public Class (ClassDefinition definition);
+
+ [CCode (cname="JSClassRetain")]
+ public Class retain (Class js_class);
+ }
+
+
+ //typedef unsigned JSPropertyAttributes;
+ [CCode (cprefix="kJSPropertyAttribute")]
+ [Flags]
+ public enum PropertyAttribute {
+ None, ReadOnly, DontEnum, DontDelete
+ }
+
+ [Compact]
+ [CCode (cname = "void *", free_function = "JSPropertyNameArrayRelease")]
+ public class PropertyNameArray {
+ [CCode (cname = "JSPropertyNameArrayRetain")]
+ public PropertyNameArray retain ();
+
+ [CCode (cname = "JSPropertyNameArrayGetCount")]
+ public size_t get_count ();
+
+ [CCode (cname = "JSPropertyNameArrayGetNameAtIndex")]
+ public JSCore.String get_name_at_index (size_t index);
+ }
+
+ [Compact]
+ [CCode (cname = "void")]
+ public class PropertyNameAccumulator {
+ [CCode (cname = "JSPropertyNameAccumulatorAddName")]
+ public void add_name (String property_name);
+ }
+
+
+ [CCode (cprefix="kJSType")]
+ public enum Type {
+ Undefined, Null, Boolean, Number, String, Object
+ }
+
+ [Compact]
+ /* FIXME: free_function causes a warning */
+ [CCode (cname = "void", free_function = "")]
+ public class Value {
+ [CCode (cname = "JSValueMakeUndefined")]
+ public Value.undefined (Context ctx);
+
+ [CCode (cname = "JSValueMakeNull")]
+ public Value.null (Context ctx);
+
+ [CCode (cname = "JSValueMakeBoolean")]
+ public Value.boolean (Context ctx, bool boolean);
+
+ [CCode (cname = "JSValueMakeNumber")]
+ public Value.number (Context ctx, double number);
+
+ [CCode (cname = "JSValueMakeString")]
+ public Value.string (Context ctx, String js_string);
+
+ [CCode (cname = "JSValueGetType", instance_pos=1.1)]
+ public JSCore.Type get_type (Context ctx);
+
+ [CCode (cname = "JSValueIsUndefined", instance_pos=1.1)]
+ public bool is_undefined (Context ctx);
+
+ [CCode (cname = "JSValueIsNull", instance_pos=1.1)]
+ public bool is_null (Context ctx);
+
+ [CCode (cname = "JSValueIsBoolean", instance_pos=1.1)]
+ public bool is_boolean (Context ctx);
+
+ [CCode (cname = "JSValueIsNumber", instance_pos=1.1)]
+ public bool is_number (Context ctx);
+
+ [CCode (cname = "JSValueIsString", instance_pos=1.1)]
+ public bool is_string (Context ctx);
+
+ [CCode (cname = "JSValueIsObject", instance_pos=1.1)]
+ public bool is_object (Context ctx);
+
+ [CCode (cname = "JSValueIsNull", instance_pos=1.1)]
+ public bool is_object_of_class (Context ctx, Value js_value, Class js_class);
+
+ [CCode (cname = "JSValueIsEqual", instance_pos=1.1)]
+ public bool is_equal (Context ctx, Value b, Value *exception);
+
+ [CCode (cname = "JSValueIsStrictEqual", instance_pos=1.1)]
+ public bool is_strict_equal (Context ctx, Value b);
+
+ [CCode (cname = "JSValueIsInstanceOfConstructor", instance_pos=1.1)]
+ public bool is_instance_of_constructor (Context ctx, Value js_value, Object constructor,
+ Value *exception);
+
+ [CCode (cname = "JSValueToBoolean", instance_pos=1.1)]
+ public bool to_boolean (Context ctx);
+
+ [CCode (cname = "JSValueToNumber", instance_pos=1.1)]
+ public double to_number (Context ctx, Value *exception);
+
+ [CCode (cname = "JSValueToStringCopy", instance_pos=1.1)]
+ public JSCore.String to_string_copy (Context ctx, out Value *exception);
+
+ [CCode (cname = "JSValueToObject", instance_pos=1.1)]
+ public Object to_object (Context ctx, out Value *exception);
+
+ [CCode (cname = "JSValueProtect", instance_pos=1.1)]
+ public void protect (Context ctx);
+
+ [CCode (cname = "JSValueUnprotect", instance_pos=1.1)]
+ public void unprotect (Context ctx);
+
+
+ }
+
+
+ [Compact]
+ /* FIXME: causes a warning */
+ [CCode (cname = "JSObjectRef", free_function = "")]
+ public class Object: JSCore.Value {
+ [CCode (cname = "JSObjectMake")]
+ public Object (Context ctx, Class js_class, void *data);
+
+ [CCode (cname = "JSObjectMakeFunctionWithCallback")]
+ public Object.function_with_callback (Context ctx, JSCore.String name,
+ ObjectCallAsFunctionCallback callAsFunction);
+
+ [CCode (cname = "JSObjectMakeConstructor")]
+ public Object.constructor (Context ctx, JSCore.Class js_class,
+ ObjectCallAsConstructorCallback callAsConstructor);
+
+ [CCode (cname = "JSObjectMakeArray")]
+ public Object.array (Context ctx, size_t argument_count,
+ JSCore.Value[] arguments,
+ out JSCore.Value exception);
+
+ [CCode (cname = "JSObjectMakeDate")]
+ public Object.date (Context ctx, size_t argument_count,
+ JSCore.Value[] arguments,
+ out JSCore.Value exception);
+
+ [CCode (cname = "JSObjectMakeError")]
+ public Object.error (Context ctx, size_t argument_count,
+ JSCore.Value[] arguments,
+ out JSCore.Value exception);
+
+ [CCode (cname = "JSObjectMakeRegExp")]
+ public Object.regexp (Context ctx, size_t argument_count,
+ JSCore.Value[] arguments,
+ out JSCore.Value exception);
+
+ [CCode (cname = "JSObjectMakeFunction")]
+ public Object.function (Context ctx, JSCore.String name,
+ uint parameter_count, JSCore.String[] parameter_names,
+ JSCore.String body, JSCore.String source_url,
+ int starting_line_number, out JSCore.Value exception);
+
+ [CCode (cname = "JSObjectGetPrototype", instance_pos=1.1)]
+ public JSCore.Value get_prototype (Context ctx);
+
+ [CCode (cname = "JSObjectSetPrototype", instance_pos=1.1)]
+ public JSCore.Value set_prototype (Context ctx, JSCore.Value _value);
+
+ [CCode (cname = "JSObjectHasProperty", instance_pos=1.1)]
+ public bool has_property (Context ctx, JSCore.String propertyName);
+
+ [CCode (cname = "JSObjectGetProperty", instance_pos=1.1)]
+ public JSCore.Value get_property (Context ctx, JSCore.String propertyName,
+ out JSCore.Value exception);
+
+ [CCode (cname = "JSObjectSetProperty", instance_pos=1.1)]
+ public void set_property (Context ctx, JSCore.String property_name,
+ JSCore.Value _value, PropertyAttribute attributes,
+ out JSCore.Value exception);
+
+ [CCode (cname = "JSObjectDeleteProperty", instance_pos=1.1)]
+ public bool delete_property (Context ctx, JSCore.String property_name,
+ out JSCore.Value exception);
+
+ [CCode (cname = "JSObjectGetPropertyAtIndex", instance_pos=1.1)]
+ public JSCore.Value get_property_at_index (Context ctx, uint property_index,
+ out JSCore.Value exception);
+
+ [CCode (cname = "JSObjectSetPropertyAtIndex", instance_pos=1.1)]
+ public void set_property_at_index (Context ctx, uint property_index,
+ JSCore.Value _value,
+ out JSCore.Value exception);
+
+ [CCode (cname = "JSObjectGetPrivate")]
+ public void *get_private ();
+
+ [CCode (cname = "JSObjectSetPrivate")]
+ public bool set_private (void *data);
+
+ [CCode (cname = "JSObjectIsFunction", instance_pos=1.1)]
+ public bool is_function (Context ctx);
+
+ [CCode (cname = "JSObjectCallAsFunction", instance_pos=1.1)]
+ public unowned JSCore.Value call_as_function (Context ctx,
+ JSCore.Object thisObject,
+ [CCode (array_length_pos=2.9, array_length_type="size_t")]
+ JSCore.Value[] arguments,
+ out JSCore.Value exception);
+
+
+ [CCode (cname = "JSObjectIsConstructor", instance_pos=1.1)]
+ public bool is_constructor (Context ctx);
+
+ [CCode (cname = "JSObjectCallAsConstructor", instance_pos=1.1)]
+ public unowned JSCore.Object call_as_constructor (Context ctx,
+ [CCode (array_length_pos=1.9, array_length_type="size_t")]
+ JSCore.Value[]? arguments,
+ out JSCore.Value exception);
+
+ [CCode (cname = "JSObjectCopyPropertyNames", instance_pos=1.1)]
+ public unowned PropertyNameArray copy_property_names (Context ctx);
+
+ /* Handy for debugging */
+ public void dump (JSCore.Context ctx, GLib.FileStream stream) {
+ JSCore.String js_string = this.to_string_copy (ctx, null);
+ char *c_string = new char[1024];
+ js_string.get_utf8_c_string (c_string, 1023);
+
+ unowned PropertyNameArray property_names = this.copy_property_names (ctx);
+
+ stream.printf ("Object: %s, %i properties\n", (string)c_string, (int)property_names.get_count());
+ delete c_string;
+
+ for (var i=0; i<property_names.get_count(); i++) {
+ js_string = property_names.get_name_at_index (i);
+ c_string = new char[1024];
+ js_string.get_utf8_c_string (c_string, 1023);
+ stream.printf ("\t%i: %s\n", i, (string)c_string);
+ delete c_string;
+ }
+ }
+ }
+}
--- /dev/null
+libxml-2.0
--- /dev/null
+/* libgda-4.0.vapi generated by vapigen, do not modify. */
+
+[Deprecated (replacement = "bindings distributed with libgda-4.0", since = "4.2.13")]
+namespace Gda {
+ [CCode (cheader_filename = "libgda/libgda.h", copy_function = "gda_attributes_manager_copy")]
+ [Compact]
+ public class AttributesManager {
+ [CCode (has_construct_function = false)]
+ public AttributesManager (bool for_objects, Gda.AttributesManagerSignal signal_func, void* signal_data);
+ public void clear (void* ptr);
+ public void copy (void* from, Gda.AttributesManager to_mgr, void* to);
+ public void @foreach (void* ptr, Gda.AttributesManagerFunc func, void* data);
+ public GLib.Value @get (void* ptr, string att_name);
+ public void @set (void* ptr, string att_name, GLib.Value value);
+ public void set_full (void* ptr, string att_name, GLib.Value value, GLib.DestroyNotify destroy);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public class Batch : GLib.Object {
+ [CCode (has_construct_function = false)]
+ public Batch ();
+ public void add_statement (Gda.Statement stmt);
+ public unowned Gda.Batch copy ();
+ public static GLib.Quark error_quark ();
+ public bool get_parameters (out unowned Gda.Set out_params) throws GLib.Error;
+ public unowned GLib.SList<Gda.Statement> get_statements ();
+ public void remove_statement (Gda.Statement stmt);
+ public unowned string serialize ();
+ public virtual signal void changed (GLib.Object changed_stmt);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", copy_function = "gda_binary_copy", type_id = "gda_binary_get_type ()")]
+ [Compact]
+ public class Binary {
+ public long binary_length;
+ [CCode (array_length = false)]
+ public weak uchar[] data;
+ public static void* copy (void* boxed);
+ public unowned string to_string (uint maxlen);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", copy_function = "gda_blob_copy", type_id = "gda_blob_get_type ()")]
+ [Compact]
+ public class Blob {
+ public weak Gda.Binary data;
+ public weak Gda.BlobOp op;
+ public static void* copy (void* boxed);
+ public void set_op (Gda.BlobOp op);
+ public unowned string to_string (uint maxlen);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public class BlobOp : GLib.Object {
+ [CCode (has_construct_function = false)]
+ protected BlobOp ();
+ public virtual long get_length ();
+ public virtual long read (Gda.Blob blob, long offset, long size);
+ public bool read_all (Gda.Blob blob);
+ public virtual long write (Gda.Blob blob, long offset);
+ public virtual bool write_all (Gda.Blob blob);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public class Column : GLib.Object {
+ [CCode (has_construct_function = false)]
+ public Column ();
+ public unowned Gda.Column copy ();
+ public bool get_allow_null ();
+ public GLib.Value get_attribute (string attribute);
+ public bool get_auto_increment ();
+ public unowned string get_dbms_type ();
+ public GLib.Value get_default_value ();
+ public unowned string get_description ();
+ public GLib.Type get_g_type ();
+ public unowned string get_name ();
+ public int get_position ();
+ public void set_allow_null (bool allow);
+ public void set_attribute (string attribute, GLib.Value value, GLib.DestroyNotify destroy);
+ public void set_auto_increment (bool is_auto);
+ public void set_dbms_type (string dbms_type);
+ public void set_default_value (GLib.Value default_value);
+ public void set_description (string title);
+ public void set_g_type (GLib.Type type);
+ public void set_name (string name);
+ public void set_position (int position);
+ [NoAccessorMethod]
+ public string id { owned get; set; }
+ public virtual signal void g_type_changed (GLib.Type old_type, GLib.Type new_type);
+ public virtual signal void name_changed (string old_name);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public class Config : GLib.Object {
+ [CCode (has_construct_function = false)]
+ protected Config ();
+ public static bool can_modify_system_config ();
+ public static bool define_dsn (Gda.DsnInfo info) throws GLib.Error;
+ public static bool dsn_needs_authentication (string dsn_name);
+ public static GLib.Quark error_quark ();
+ public static unowned Gda.Config @get ();
+ public static Gda.DsnInfo get_dsn_info (string dsn_name);
+ public static Gda.DsnInfo get_dsn_info_at_index (int index);
+ public static int get_dsn_info_index (string dsn_name);
+ public static int get_nb_dsn ();
+ public static unowned Gda.ServerProvider get_provider (string provider_name) throws GLib.Error;
+ public static unowned Gda.ProviderInfo get_provider_info (string provider_name);
+ public static unowned Gda.DataModel list_dsn ();
+ public static unowned Gda.DataModel list_providers ();
+ public static bool remove_dsn (string dsn_name) throws GLib.Error;
+ [NoAccessorMethod]
+ public string system_filename { owned get; set; }
+ [NoAccessorMethod]
+ public string user_filename { owned get; set; }
+ public virtual signal void dsn_added (void* new_dsn);
+ public virtual signal void dsn_changed (void* dsn);
+ public virtual signal void dsn_removed (void* old_dsn);
+ public virtual signal void dsn_to_be_removed (void* old_dsn);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public class Connection : GLib.Object, Gda.Lockable {
+ [CCode (has_construct_function = false)]
+ protected Connection ();
+ public bool add_savepoint (string name) throws GLib.Error;
+ public bool async_cancel (uint task_id) throws GLib.Error;
+ public unowned GLib.Object async_fetch_result (uint task_id, out unowned Gda.Set last_insert_row) throws GLib.Error;
+ public uint async_statement_execute (Gda.Statement stmt, Gda.Set @params, Gda.StatementModelUsage model_usage, GLib.Type[] col_types, bool need_last_insert_row) throws GLib.Error;
+ public unowned GLib.SList<GLib.Object> batch_execute (Gda.Batch batch, Gda.Set @params, Gda.StatementModelUsage model_usage) throws GLib.Error;
+ public bool begin_transaction (string name, Gda.TransactionIsolation level) throws GLib.Error;
+ public void close ();
+ public void close_no_warning ();
+ public bool commit_transaction (string name) throws GLib.Error;
+ public unowned Gda.ServerOperation create_operation (Gda.ServerOperationType type, Gda.Set options) throws GLib.Error;
+ public unowned Gda.SqlParser create_parser ();
+ public bool delete_row_from_table (string table, string condition_column_name, GLib.Value condition_value) throws GLib.Error;
+ public bool delete_savepoint (string name) throws GLib.Error;
+ public static GLib.Quark error_quark ();
+ public int execute_non_select_command (string sql) throws GLib.Error;
+ public unowned Gda.DataModel execute_select_command (string sql) throws GLib.Error;
+ public unowned string get_authentication ();
+ public unowned string get_cnc_string ();
+ public unowned string get_dsn ();
+ public unowned GLib.List<Gda.ConnectionEvent> get_events ();
+ public unowned Gda.MetaStore get_meta_store ();
+ public unowned Gda.DataModel get_meta_store_data (Gda.ConnectionMetaType meta_type, int nb_filters) throws GLib.Error;
+ public Gda.DataModel get_meta_store_data_v (Gda.ConnectionMetaType meta_type, GLib.List<Gda.Holder> filters) throws GLib.Error;
+ public Gda.ConnectionOptions get_options ();
+ public unowned Gda.ServerProvider get_provider ();
+ public unowned string get_provider_name ();
+ public unowned Gda.TransactionStatus get_transaction_status ();
+ public bool insert_row_into_table (string table) throws GLib.Error;
+ public bool insert_row_into_table_v (string table, GLib.SList col_names, GLib.SList values) throws GLib.Error;
+ public bool is_opened ();
+ public bool open () throws GLib.Error;
+ public static unowned Gda.Connection open_from_dsn (string dsn, string? auth_string, Gda.ConnectionOptions options) throws GLib.Error;
+ public static unowned Gda.Connection open_from_string (string provider_name, string? cnc_string, string? auth_string, Gda.ConnectionOptions options) throws ConnectionError, ConfigError;
+ public unowned Gda.Statement parse_sql_string (string sql, out unowned Gda.Set @params) throws GLib.Error;
+ public bool perform_operation (Gda.ServerOperation op) throws GLib.Error;
+ public unowned string quote_sql_identifier (string id);
+ public unowned GLib.SList repetitive_statement_execute (Gda.RepetitiveStatement rstmt, Gda.StatementModelUsage model_usage, GLib.Type[] col_types, bool stop_on_error) throws GLib.Error;
+ public bool rollback_savepoint (string name) throws GLib.Error;
+ public bool rollback_transaction (string name) throws GLib.Error;
+ public unowned GLib.Object statement_execute (Gda.Statement stmt, Gda.Set @params, Gda.StatementModelUsage model_usage, out unowned Gda.Set last_insert_row) throws GLib.Error;
+ public int statement_execute_non_select (Gda.Statement stmt, Gda.Set? @params, out unowned Gda.Set? last_insert_row) throws GLib.Error;
+ public unowned Gda.DataModel statement_execute_select (Gda.Statement stmt, Gda.Set @params) throws GLib.Error;
+ public unowned Gda.DataModel statement_execute_select_full (Gda.Statement stmt, Gda.Set @params, Gda.StatementModelUsage model_usage, GLib.Type[] col_types) throws GLib.Error;
+ public unowned Gda.DataModel statement_execute_select_fullv (Gda.Statement stmt, Gda.Set @params, Gda.StatementModelUsage model_usage) throws GLib.Error;
+ public bool statement_prepare (Gda.Statement stmt) throws GLib.Error;
+ public unowned string statement_to_sql (Gda.Statement stmt, Gda.Set @params, Gda.StatementSqlFlag flags, GLib.SList<Gda.Holder> params_used) throws GLib.Error;
+ public static void string_split (string str, string out_cnc_params, string out_provider, string out_username, string out_password);
+ public bool supports_feature (Gda.ConnectionFeature feature);
+ public bool update_meta_store (Gda.MetaContext context) throws GLib.Error;
+ public bool update_row_in_table (string table, string condition_column_name, GLib.Value condition_value) throws GLib.Error;
+ public bool update_row_in_table_v (string table, string condition_column_name, GLib.Value condition_value, GLib.SList col_names, GLib.SList values) throws GLib.Error;
+ public unowned string value_to_sql_string (GLib.Value from);
+ [NoAccessorMethod]
+ public string auth_string { owned get; set; }
+ [NoAccessorMethod]
+ public string cnc_string { owned get; set; }
+ [NoAccessorMethod]
+ public string dsn { owned get; set; }
+ [NoAccessorMethod]
+ public int events_history_size { get; set; }
+ [NoAccessorMethod]
+ public bool is_wrapper { get; construct; }
+ [NoAccessorMethod]
+ public Gda.MetaStore meta_store { owned get; set; }
+ [NoAccessorMethod]
+ public bool monitor_wrapped_in_mainloop { get; set; }
+ [NoAccessorMethod]
+ public Gda.ConnectionOptions options { get; set; }
+ [NoAccessorMethod]
+ public Gda.ServerProvider provider { owned get; set; }
+ [NoAccessorMethod]
+ public void* thread_owner { get; set; }
+ public virtual signal void conn_closed ();
+ public virtual signal void conn_opened ();
+ public virtual signal void conn_to_close ();
+ public virtual signal void dsn_changed ();
+ public virtual signal void error (Gda.ConnectionEvent error);
+ public virtual signal void transaction_status_changed ();
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public class ConnectionEvent : GLib.Object {
+ [CCode (has_construct_function = false)]
+ public ConnectionEvent (Gda.ConnectionEventType type);
+ public long get_code ();
+ public unowned string get_description ();
+ public Gda.ConnectionEventType get_event_type ();
+ public Gda.ConnectionEventCode get_gda_code ();
+ public unowned string get_source ();
+ public unowned string get_sqlstate ();
+ public void set_code (long code);
+ public void set_description (string description);
+ public void set_event_type (Gda.ConnectionEventType type);
+ public void set_gda_code (Gda.ConnectionEventCode code);
+ public void set_source (string source);
+ public void set_sqlstate (string sqlstate);
+ [NoAccessorMethod]
+ public int type { get; set; }
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public class DataAccessWrapper : GLib.Object, Gda.DataModel {
+ [CCode (has_construct_function = false, type = "GdaDataModel*")]
+ public DataAccessWrapper (Gda.DataModel model);
+ [NoAccessorMethod]
+ public Gda.DataModel model { owned get; construct; }
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public class DataComparator : GLib.Object {
+ [CCode (has_construct_function = false, type = "GObject*")]
+ public DataComparator (Gda.DataModel old_model, Gda.DataModel new_model);
+ public bool compute_diff () throws GLib.Error;
+ public static GLib.Quark error_quark ();
+ public unowned Gda.Diff get_diff (int pos);
+ public int get_n_diffs ();
+ public void set_key_columns (int col_numbers, int nb_cols);
+ [NoAccessorMethod]
+ public Gda.DataModel new_model { owned get; set; }
+ [NoAccessorMethod]
+ public Gda.DataModel old_model { owned get; set; }
+ public virtual signal bool diff_computed (void* diff);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public class DataModelArray : GLib.Object, Gda.DataModel {
+ [CCode (has_construct_function = false, type = "GdaDataModel*")]
+ public DataModelArray (int cols);
+ public void clear ();
+ public static unowned Gda.DataModelArray copy_model (Gda.DataModel src) throws GLib.Error;
+ public unowned Gda.Row get_row (int row) throws GLib.Error;
+ public void set_n_columns (int cols);
+ [CCode (has_construct_function = false, sentinel = "", type = "GdaDataModel*")]
+ public DataModelArray.with_g_types (int cols, ...);
+ [NoAccessorMethod]
+ public uint n_columns { get; set; }
+ [NoAccessorMethod]
+ public bool read_only { get; set; }
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public class DataModelDir : GLib.Object, Gda.DataModel {
+ [CCode (has_construct_function = false, type = "GdaDataModel*")]
+ public DataModelDir (string basedir);
+ public void clean_errors ();
+ public unowned GLib.SList<GLib.Error> get_errors ();
+ [NoAccessorMethod]
+ public string basedir { owned get; construct; }
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public class DataModelImport : GLib.Object, Gda.DataModel {
+ [CCode (has_construct_function = false)]
+ protected DataModelImport ();
+ public void clean_errors ();
+ [CCode (has_construct_function = false, type = "GdaDataModel*")]
+ public DataModelImport.file (string filename, bool random_access, Gda.Set options);
+ public static bool from_file (Gda.DataModel model, string file, GLib.HashTable cols_trans, Gda.Set options) throws GLib.Error;
+ public static bool from_model (Gda.DataModel to, Gda.DataModel from, bool overwrite, GLib.HashTable cols_trans) throws GLib.Error;
+ public static bool from_string (Gda.DataModel model, string str, GLib.HashTable cols_trans, Gda.Set options) throws GLib.Error;
+ [CCode (cname = "gda_data_model_import_new_xml_node", has_construct_function = false, type = "GdaDataModel*")]
+ public DataModelImport.from_xml_node (Xml.Node node);
+ public unowned GLib.SList<GLib.Error> get_errors ();
+ [CCode (has_construct_function = false, type = "GdaDataModel*")]
+ public DataModelImport.mem (string data, bool random_access, Gda.Set options);
+ [NoAccessorMethod]
+ public string data_string { owned get; construct; }
+ [NoAccessorMethod]
+ public string filename { owned get; construct; }
+ [NoAccessorMethod]
+ public Gda.Set options { owned get; construct; }
+ [NoAccessorMethod]
+ public bool random_access { get; construct; }
+ [NoAccessorMethod]
+ public bool strict { get; set construct; }
+ [NoAccessorMethod]
+ public void* xml_node { get; construct; }
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public class DataModelIter : Gda.Set {
+ [CCode (has_construct_function = false)]
+ protected DataModelIter ();
+ public static GLib.Quark error_quark ();
+ public unowned Gda.Holder get_holder_for_field (int col);
+ public int get_row ();
+ public unowned GLib.Value? get_value_at (int col);
+ public unowned GLib.Value? get_value_for_field (string field_name);
+ public void invalidate_contents ();
+ public bool is_valid ();
+ public bool move_next ();
+ public static bool move_next_default (Gda.DataModel model, Gda.DataModelIter iter);
+ public bool move_prev ();
+ public static bool move_prev_default (Gda.DataModel model, Gda.DataModelIter iter);
+ public bool move_to_row (int row);
+ public static bool move_to_row_default (Gda.DataModel model, Gda.DataModelIter iter, int row);
+ public bool set_value_at (int col, GLib.Value value) throws GLib.Error;
+ [NoAccessorMethod]
+ public int current_row { get; set; }
+ [NoAccessorMethod]
+ public Gda.DataModel data_model { owned get; construct; }
+ [NoAccessorMethod]
+ public Gda.DataModel forced_model { owned get; set; }
+ [NoAccessorMethod]
+ public bool update_model { get; set; }
+ public virtual signal void end_of_data ();
+ public virtual signal void row_changed (int row);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public class DataProxy : GLib.Object, Gda.DataModel {
+ [CCode (has_construct_function = false, type = "GObject*")]
+ public DataProxy (Gda.DataModel model);
+ public void alter_value_attributes (int proxy_row, int col, Gda.ValueAttribute alter_flags);
+ public bool apply_all_changes () throws GLib.Error;
+ public bool apply_row_changes (int proxy_row) throws GLib.Error;
+ public bool cancel_all_changes ();
+ public void cancel_row_changes (int proxy_row, int col);
+ public void @delete (int proxy_row);
+ public static GLib.Quark error_quark ();
+ public unowned string get_filter_expr ();
+ public int get_filtered_n_rows ();
+ public int get_n_modified_rows ();
+ public int get_n_new_rows ();
+ public unowned Gda.DataModel get_proxied_model ();
+ public int get_proxied_model_n_cols ();
+ public int get_proxied_model_n_rows ();
+ public int get_proxied_model_row (int proxy_row);
+ public int get_sample_end ();
+ public int get_sample_size ();
+ public int get_sample_start ();
+ public Gda.ValueAttribute get_value_attributes (int proxy_row, int col);
+ public unowned GLib.SList<GLib.Value> get_values (int proxy_row, int cols_index, int n_cols);
+ public bool has_changed ();
+ public bool is_read_only ();
+ public bool row_has_changed (int proxy_row);
+ public bool row_is_deleted (int proxy_row);
+ public bool row_is_inserted (int proxy_row);
+ public bool set_filter_expr (string filter_expr) throws GLib.Error;
+ public bool set_ordering_column (int col) throws GLib.Error;
+ public void set_sample_size (int sample_size);
+ public void set_sample_start (int sample_start);
+ public void undelete (int proxy_row);
+ [NoAccessorMethod]
+ public bool defer_sync { get; set; }
+ [NoAccessorMethod]
+ public Gda.DataModel model { owned get; set construct; }
+ [NoAccessorMethod]
+ public bool prepend_null_entry { get; set; }
+ public int sample_size { get; set construct; }
+ public virtual signal void filter_changed ();
+ public virtual signal void row_changes_applied (int row, int proxied_row);
+ public virtual signal void row_delete_changed (int row, bool to_be_deleted);
+ public virtual signal void sample_changed (int sample_start, int sample_end);
+ public virtual signal void sample_size_changed (int sample_size);
+ public virtual signal unowned GLib.Error validate_row_changes (int row, int proxied_row);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public class DataSelect : GLib.Object, Gda.DataModel {
+ public int advertized_nrows;
+ public int nb_stored_rows;
+ public weak Gda.PStmt prep_stmt;
+ [CCode (has_construct_function = false)]
+ protected DataSelect ();
+ public bool compute_columns_attributes () throws GLib.Error;
+ public bool compute_modification_statements () throws GLib.Error;
+ public bool compute_row_selection_condition () throws GLib.Error;
+ public static GLib.Quark error_quark ();
+ [NoWrapper]
+ public virtual bool fetch_at (out unowned Gda.Row prow, int rownum) throws GLib.Error;
+ [NoWrapper]
+ public virtual int fetch_nb_rows ();
+ [NoWrapper]
+ public virtual bool fetch_next (out unowned Gda.Row prow, int rownum) throws GLib.Error;
+ [NoWrapper]
+ public virtual bool fetch_prev (out unowned Gda.Row prow, int rownum) throws GLib.Error;
+ [NoWrapper]
+ public virtual bool fetch_random (out unowned Gda.Row prow, int rownum) throws GLib.Error;
+ public unowned Gda.Connection get_connection ();
+ public unowned Gda.Row get_stored_row (int rownum);
+ public bool rerun () throws GLib.Error;
+ public void set_columns (GLib.SList columns);
+ public bool set_modification_statement (Gda.Statement mod_stmt) throws GLib.Error;
+ public bool set_modification_statement_sql (string sql) throws GLib.Error;
+ public bool set_row_selection_condition (Gda.SqlExpr expr) throws GLib.Error;
+ public bool set_row_selection_condition_sql (string sql_where) throws GLib.Error;
+ [NoWrapper]
+ public virtual bool store_all () throws GLib.Error;
+ public void take_row (Gda.Row row, int rownum);
+ [NoAccessorMethod]
+ public bool auto_reset { get; set; }
+ public Gda.Connection connection { get; construct; }
+ [NoAccessorMethod]
+ public Gda.Statement delete_stmt { owned get; set; }
+ [NoAccessorMethod]
+ public Gda.Set exec_params { owned get; construct; }
+ [NoAccessorMethod]
+ public Gda.Statement insert_stmt { owned get; set; }
+ [NoAccessorMethod]
+ public uint model_usage { get; construct; }
+ [NoAccessorMethod]
+ public Gda.PStmt prepared_stmt { owned get; set; }
+ [NoAccessorMethod]
+ public Gda.Statement select_stmt { owned get; }
+ [NoAccessorMethod]
+ public bool store_all_rows { get; set; }
+ [NoAccessorMethod]
+ public Gda.Statement update_stmt { owned get; set; }
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ [Compact]
+ public class Diff {
+ public int new_row;
+ public int old_row;
+ public Gda.DiffType type;
+ public weak GLib.HashTable values;
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", copy_function = "gda_geometricpoint_copy", free_function = "gda_geometricpoint_free", type_id = "gda_geometricpoint_get_type ()")]
+ [Compact]
+ public class GeometricPoint {
+ public double x;
+ public double y;
+ [CCode (cname = "gda_geometricpoint_copy")]
+ public static void* copy (void* boxed);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public class HandlerBin : GLib.Object, Gda.DataHandler {
+ [CCode (has_construct_function = false, type = "GdaDataHandler*")]
+ public HandlerBin ();
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ [Compact]
+ public class HandlerBinPriv {
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public class HandlerBoolean : GLib.Object, Gda.DataHandler {
+ [CCode (has_construct_function = false, type = "GdaDataHandler*")]
+ public HandlerBoolean ();
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ [Compact]
+ public class HandlerBooleanPriv {
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public class HandlerNumerical : GLib.Object, Gda.DataHandler {
+ [CCode (has_construct_function = false, type = "GdaDataHandler*")]
+ public HandlerNumerical ();
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ [Compact]
+ public class HandlerNumericalPriv {
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public class HandlerString : GLib.Object, Gda.DataHandler {
+ [CCode (has_construct_function = false, type = "GdaDataHandler*")]
+ public HandlerString ();
+ [CCode (has_construct_function = false, type = "GdaDataHandler*")]
+ public HandlerString.with_provider (Gda.ServerProvider prov, Gda.Connection cnc);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ [Compact]
+ public class HandlerStringPriv {
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public class HandlerTime : GLib.Object, Gda.DataHandler {
+ [CCode (has_construct_function = false, type = "GdaDataHandler*")]
+ public HandlerTime ();
+ public unowned string get_format (GLib.Type type);
+ public unowned string get_no_locale_str_from_value (GLib.Value value);
+ [CCode (has_construct_function = false, type = "GdaDataHandler*")]
+ public HandlerTime.no_locale ();
+ public void set_sql_spec (GLib.DateDMY first, GLib.DateDMY sec, GLib.DateDMY third, char separator, bool twodigits_years);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ [Compact]
+ public class HandlerTimePriv {
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public class HandlerType : GLib.Object, Gda.DataHandler {
+ [CCode (has_construct_function = false, type = "GdaDataHandler*")]
+ public HandlerType ();
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ [Compact]
+ public class HandlerTypePriv {
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public class Holder : GLib.Object {
+ [CCode (has_construct_function = false)]
+ public Holder (GLib.Type type);
+ [NoWrapper]
+ public virtual void att_changed (string att_name, GLib.Value att_value);
+ public unowned Gda.Holder copy ();
+ public static GLib.Quark error_quark ();
+ public void force_invalid ();
+ public GLib.Value get_attribute (string attribute);
+ public unowned Gda.Holder get_bind ();
+ public GLib.Value get_default_value ();
+ public GLib.Type get_g_type ();
+ public unowned string get_id ();
+ public bool get_not_null ();
+ public unowned Gda.DataModel get_source_model (int col);
+ public GLib.Value get_value ();
+ public unowned string get_value_str (Gda.DataHandler dh);
+ [CCode (has_construct_function = false)]
+ public Holder.@inline (GLib.Type type, string id);
+ public bool is_valid ();
+ public void set_attribute (string attribute, GLib.Value value, GLib.DestroyNotify destroy);
+ public bool set_bind (Gda.Holder bind_to) throws GLib.Error;
+ public void set_default_value (GLib.Value value);
+ public void set_not_null (bool not_null);
+ public bool set_source_model (Gda.DataModel model, int col) throws GLib.Error;
+ public bool set_value (GLib.Value value) throws GLib.Error;
+ public bool set_value_str (Gda.DataHandler dh, string value) throws GLib.Error;
+ public bool set_value_to_default ();
+ public GLib.Value take_static_value (GLib.Value value, bool value_changed) throws GLib.Error;
+ public bool take_value (GLib.Value value) throws GLib.Error;
+ public bool value_is_default ();
+ [NoAccessorMethod]
+ public string description { owned get; set; }
+ [NoAccessorMethod]
+ public Gda.Holder full_bind { owned get; set; }
+ [NoAccessorMethod]
+ public GLib.Type g_type { get; set construct; }
+ [NoAccessorMethod]
+ public string id { owned get; set; }
+ [NoAccessorMethod]
+ public string name { owned get; set; }
+ public bool not_null { get; set; }
+ [NoAccessorMethod]
+ public Gda.Holder simple_bind { owned get; set; }
+ [NoAccessorMethod]
+ public int source_column { get; set; }
+ public Gda.DataModel source_model { get; set; }
+ public virtual signal void attribute_changed (string p0, GLib.Value p1);
+ public virtual signal void changed ();
+ public virtual signal void source_changed ();
+ public virtual signal unowned GLib.Error validate_change (GLib.Value new_value);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ [Compact]
+ public class MetaContext {
+ public weak string column_names;
+ public GLib.Value column_values;
+ public int size;
+ public weak string table_name;
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ [Compact]
+ public class MetaDbObject {
+ public weak GLib.SList depend_list;
+ public void* extra;
+ public weak string obj_catalog;
+ public weak string obj_full_name;
+ public weak string obj_name;
+ public weak string obj_owner;
+ public weak string obj_schema;
+ public weak string obj_short_name;
+ public Gda.MetaDbObjectType obj_type;
+ public bool outdated;
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public class MetaStore : GLib.Object {
+ [CCode (has_construct_function = false)]
+ public MetaStore (string cnc_string);
+ public unowned Gda.DataModel create_modify_data_model (string table_name);
+ public bool declare_foreign_key (Gda.MetaStruct mstruct, string fk_name, string catalog, string schema, string table, string ref_catalog, string ref_schema, string ref_table, uint nb_cols, string colnames, string ref_colnames) throws GLib.Error;
+ public static GLib.Quark error_quark ();
+ public unowned Gda.DataModel extract (string select_sql) throws GLib.Error;
+ public bool get_attribute_value (string att_name, string att_value) throws GLib.Error;
+ public unowned Gda.Connection get_internal_connection ();
+ public int get_version ();
+ public bool modify (string table_name, Gda.DataModel new_data, string condition) throws GLib.Error;
+ public bool modify_with_context (Gda.MetaContext context, Gda.DataModel new_data) throws GLib.Error;
+ public bool schema_add_custom_object (string xml_description) throws GLib.Error;
+ public unowned GLib.SList schema_get_all_tables ();
+ public unowned GLib.SList schema_get_depend_tables (string table_name);
+ public unowned Gda.MetaStruct schema_get_structure () throws GLib.Error;
+ public bool schema_remove_custom_object (string obj_name) throws GLib.Error;
+ public bool set_attribute_value (string att_name, string att_value) throws GLib.Error;
+ public void set_identifiers_style (Gda.SqlIdentifierStyle style);
+ public void set_reserved_keywords_func (Gda.SqlReservedKeywordsFunc func);
+ public static unowned string sql_identifier_quote (string id, Gda.Connection cnc);
+ public bool undeclare_foreign_key (Gda.MetaStruct mstruct, string fk_name, string catalog, string schema, string table, string ref_catalog, string ref_schema, string ref_table) throws GLib.Error;
+ [CCode (has_construct_function = false)]
+ public MetaStore.with_file (string file_name);
+ public string catalog { construct; }
+ [NoAccessorMethod]
+ public Gda.Connection cnc { owned get; construct; }
+ public string cnc_string { construct; }
+ public string schema { construct; }
+ public virtual signal void meta_changed (GLib.SList<Gda.MetaStoreChange> changes);
+ public virtual signal void meta_reset ();
+ public virtual signal unowned GLib.Error suggest_update (Gda.MetaContext suggest);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ [Compact]
+ public class MetaStoreChange {
+ public Gda.MetaStoreChangeType c_type;
+ public weak GLib.HashTable keys;
+ public weak string table_name;
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public class MetaStruct : GLib.Object {
+ [CCode (has_construct_function = false)]
+ public MetaStruct (Gda.MetaStore store, Gda.MetaStructFeature features);
+ public unowned Gda.MetaDbObject complement (Gda.MetaDbObjectType type, GLib.Value catalog, GLib.Value schema, GLib.Value name) throws GLib.Error;
+ public bool complement_all () throws GLib.Error;
+ public bool complement_default () throws GLib.Error;
+ public bool complement_depend (Gda.MetaDbObject dbo) throws GLib.Error;
+ public bool complement_schema (GLib.Value catalog, GLib.Value schema) throws GLib.Error;
+ public unowned string dump_as_graph (Gda.MetaGraphInfo info) throws GLib.Error;
+ public static GLib.Quark error_quark ();
+ public GLib.SList<Gda.MetaDbObject> get_all_db_objects ();
+ public unowned Gda.MetaDbObject get_db_object (GLib.Value catalog, GLib.Value schema, GLib.Value name);
+ public unowned Gda.MetaTableColumn get_table_column (Gda.MetaTable table, GLib.Value col_name);
+ public bool sort_db_objects (Gda.MetaSortType sort_type) throws GLib.Error;
+ [NoAccessorMethod]
+ public uint features { get; construct; }
+ [NoAccessorMethod]
+ public Gda.MetaStore meta_store { owned get; construct; }
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ [Compact]
+ public class MetaTable {
+ public weak GLib.SList columns;
+ public weak GLib.SList fk_list;
+ public int pk_cols_array;
+ public int pk_cols_nb;
+ public weak GLib.SList reverse_fk_list;
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ [Compact]
+ public class MetaTableColumn {
+ public weak string column_name;
+ public weak string column_type;
+ public weak string default_value;
+ public GLib.Type gtype;
+ public bool nullok;
+ public bool pkey;
+ public void foreach_attribute (Gda.AttributesManagerFunc func, void* data);
+ public GLib.Value get_attribute (string attribute);
+ public void set_attribute (string attribute, GLib.Value value, GLib.DestroyNotify destroy);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ [Compact]
+ public class MetaTableForeignKey {
+ public int cols_nb;
+ public void* declared;
+ public weak Gda.MetaDbObject depend_on;
+ public int fk_cols_array;
+ public weak string fk_name;
+ public weak string fk_names_array;
+ public weak Gda.MetaDbObject meta_table;
+ public void* on_delete_policy;
+ public void* on_update_policy;
+ public int ref_pk_cols_array;
+ public weak string ref_pk_names_array;
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ [Compact]
+ public class MetaView {
+ public bool is_updatable;
+ public weak Gda.MetaTable table;
+ public weak string view_def;
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ [Compact]
+ public class Mutex {
+ [CCode (has_construct_function = false)]
+ public Mutex ();
+ public void @lock ();
+ public bool trylock ();
+ public void unlock ();
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", copy_function = "gda_numeric_copy", type_id = "gda_numeric_get_type ()")]
+ [Compact]
+ public class Numeric {
+ public weak string number;
+ public long precision;
+ public void* reserved;
+ public long width;
+ public static void* copy (void* boxed);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public class PStmt : GLib.Object {
+ public int ncols;
+ public weak GLib.SList param_ids;
+ public weak string sql;
+ public weak GLib.SList tmpl_columns;
+ [CCode (array_length = false)]
+ public weak GLib.Type[] types;
+ [CCode (has_construct_function = false)]
+ protected PStmt ();
+ public void copy_contents (Gda.PStmt dest);
+ public unowned Gda.Statement get_gda_statement ();
+ public void set_gda_statement (Gda.Statement stmt);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ [Compact]
+ public class ProviderInfo {
+ public weak Gda.Set auth_params;
+ public weak string description;
+ public weak Gda.Set dsn_params;
+ public weak string id;
+ public weak string location;
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", copy_function = "gda_quark_list_copy", type_id = "gda_quark_list_get_type ()")]
+ [Compact]
+ public class QuarkList {
+ [CCode (has_construct_function = false)]
+ public QuarkList ();
+ public void add_from_string (string str, bool cleanup);
+ public void clear ();
+ public unowned Gda.QuarkList copy ();
+ public unowned string find (string name);
+ public void @foreach (GLib.HFunc func);
+ [CCode (has_construct_function = false)]
+ public QuarkList.from_string (string str);
+ public void remove (string name);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public class RepetitiveStatement : GLib.Object {
+ [CCode (has_construct_function = false)]
+ public RepetitiveStatement (Gda.Statement stmt);
+ public bool append_set (Gda.Set values, bool make_copy);
+ public unowned GLib.SList get_all_sets ();
+ public bool get_template_set (out unowned Gda.Set @set) throws GLib.Error;
+ [NoAccessorMethod]
+ public Gda.Statement statement { owned get; construct; }
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public class Row : GLib.Object {
+ [CCode (has_construct_function = false)]
+ public Row (int count);
+ public int get_length ();
+ public GLib.Value get_value (int num);
+ public void invalidate_value (GLib.Value value);
+ public bool value_is_valid (GLib.Value value);
+ [NoAccessorMethod]
+ public int nb_values { set; }
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public class ServerOperation : GLib.Object {
+ [CCode (has_construct_function = false)]
+ public ServerOperation (Gda.ServerOperationType op_type, string xml_file);
+ public uint add_item_to_sequence (string seq_path);
+ public bool del_item_from_sequence (string item_path);
+ public static GLib.Quark error_quark ();
+ public unowned Gda.ServerOperationNode get_node_info (string path_format);
+ public unowned string get_node_parent (string path);
+ public unowned string get_node_path_portion (string path);
+ public Gda.ServerOperationNodeType get_node_type (string path, Gda.ServerOperationNodeStatus status);
+ public Gda.ServerOperationType get_op_type ();
+ public unowned string get_root_nodes ();
+ public unowned string get_sequence_item_names (string path);
+ public uint get_sequence_max_size (string path);
+ public uint get_sequence_min_size (string path);
+ public unowned string get_sequence_name (string path);
+ public uint get_sequence_size (string path);
+ public unowned string get_sql_identifier_at (Gda.Connection cnc, Gda.ServerProvider prov, string path_format);
+ public GLib.Value get_value_at (string path_format);
+ public bool is_valid (string xml_file) throws GLib.Error;
+ public bool load_data_from_xml (Xml.Node node) throws GLib.Error;
+ public static unowned string op_type_to_string (Gda.ServerOperationType type);
+ public bool perform_create_database (string provider) throws GLib.Error;
+ public bool perform_create_table () throws GLib.Error;
+ public bool perform_drop_database (string provider) throws GLib.Error;
+ public bool perform_drop_table () throws GLib.Error;
+ public static unowned Gda.ServerOperation prepare_create_database (string provider, string db_name) throws GLib.Error;
+ public static unowned Gda.ServerOperation prepare_create_table (Gda.Connection cnc, string table_name) throws GLib.Error;
+ public static unowned Gda.ServerOperation prepare_drop_database (string provider, string db_name) throws GLib.Error;
+ public static unowned Gda.ServerOperation prepare_drop_table (Gda.Connection cnc, string table_name) throws GLib.Error;
+ public unowned Xml.Node save_data_to_xml () throws GLib.Error;
+ [NoWrapper]
+ public virtual void seq_item_added (string seq_path, int item_index);
+ [NoWrapper]
+ public virtual void seq_item_remove (string seq_path, int item_index);
+ public bool set_value_at (string value, string path_format) throws GLib.Error;
+ public static Gda.ServerOperationType string_to_op_type (string str);
+ [NoAccessorMethod]
+ public Gda.Connection connection { owned get; construct; }
+ public int op_type { get; construct; }
+ [NoAccessorMethod]
+ public Gda.ServerProvider provider { owned get; construct; }
+ public string spec_filename { construct; }
+ public virtual signal void sequence_item_added (string p0, int p1);
+ public virtual signal void sequence_item_remove (string p0, int p1);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ [Compact]
+ public class ServerOperationNode {
+ public weak Gda.Column column;
+ public weak Gda.DataModel model;
+ public weak Gda.Holder param;
+ public weak Gda.Set plist;
+ public void* priv;
+ public Gda.ServerOperationNodeStatus status;
+ public Gda.ServerOperationNodeType type;
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public class ServerProvider : GLib.Object {
+ [CCode (has_construct_function = false)]
+ protected ServerProvider ();
+ [NoWrapper]
+ public virtual bool add_savepoint (Gda.Connection cnc, string name) throws GLib.Error;
+ [NoWrapper]
+ public virtual bool begin_transaction (Gda.Connection cnc, string name, Gda.TransactionIsolation level) throws GLib.Error;
+ [NoWrapper]
+ public virtual bool cancel (Gda.Connection cnc, uint task_id) throws GLib.Error;
+ [NoWrapper]
+ public virtual bool close_connection (Gda.Connection cnc);
+ [NoWrapper]
+ public virtual bool commit_transaction (Gda.Connection cnc, string name) throws GLib.Error;
+ [NoWrapper]
+ public virtual unowned Gda.Connection create_connection ();
+ public virtual unowned Gda.ServerOperation create_operation (Gda.Connection cnc, Gda.ServerOperationType type, Gda.Set options) throws GLib.Error;
+ public virtual unowned Gda.SqlParser create_parser (Gda.Connection cnc);
+ [NoWrapper]
+ public virtual bool delete_savepoint (Gda.Connection cnc, string name) throws GLib.Error;
+ public static GLib.Quark error_quark ();
+ public virtual unowned string escape_string (Gda.Connection cnc, string str);
+ public unowned string find_file (string inst_dir, string filename);
+ [NoWrapper]
+ public virtual unowned Gda.DataHandler get_data_handler (Gda.Connection cnc, GLib.Type g_type, string dbms_type);
+ public unowned Gda.DataHandler get_data_handler_dbms (Gda.Connection cnc, string for_type);
+ public unowned Gda.DataHandler get_data_handler_default (Gda.Connection cnc, GLib.Type type, string dbms_type);
+ public unowned Gda.DataHandler get_data_handler_g_type (Gda.Connection cnc, GLib.Type for_type);
+ [NoWrapper]
+ public virtual unowned string get_database (Gda.Connection cnc);
+ [NoWrapper]
+ public virtual unowned string get_def_dbms_type (Gda.Connection cnc, GLib.Type g_type);
+ public unowned string get_default_dbms_type (Gda.Connection cnc, GLib.Type type);
+ public virtual unowned string get_name ();
+ public static int get_schema_nb_columns (Gda.ConnectionSchema schema);
+ public virtual unowned string get_server_version (Gda.Connection cnc);
+ public virtual unowned string get_version ();
+ [NoWrapper]
+ public virtual bool handle_async (Gda.Connection cnc) throws GLib.Error;
+ public void handler_declare (Gda.DataHandler dh, Gda.Connection cnc, GLib.Type g_type, string dbms_type);
+ public unowned Gda.DataHandler handler_find (Gda.Connection cnc, GLib.Type g_type, string dbms_type);
+ [NoWrapper]
+ public virtual unowned string identifier_quote (Gda.Connection cnc, string id, bool for_meta_store, bool force_quotes);
+ public static bool init_schema_model (Gda.DataModel model, Gda.ConnectionSchema schema);
+ public unowned Gda.SqlParser internal_get_parser ();
+ [NoWrapper]
+ public virtual bool is_busy (Gda.Connection cnc) throws GLib.Error;
+ public static unowned string load_file_contents (string inst_dir, string data_dir, string filename);
+ [NoWrapper]
+ public virtual bool open_connection (Gda.Connection cnc, Gda.QuarkList @params, Gda.QuarkList auth, uint task_id, Gda.ServerProviderAsyncCallback async_cb, void* cb_data);
+ public virtual bool perform_operation (Gda.Connection cnc, Gda.ServerOperation op) throws GLib.Error;
+ public bool perform_operation_default (Gda.Connection cnc, Gda.ServerOperation op) throws GLib.Error;
+ public virtual unowned string render_operation (Gda.Connection cnc, Gda.ServerOperation op) throws GLib.Error;
+ [NoWrapper]
+ public virtual bool rollback_savepoint (Gda.Connection cnc, string name) throws GLib.Error;
+ [NoWrapper]
+ public virtual bool rollback_transaction (Gda.Connection cnc, string name) throws GLib.Error;
+ [NoWrapper]
+ public virtual unowned GLib.Object statement_execute (Gda.Connection cnc, Gda.Statement stmt, Gda.Set @params, Gda.StatementModelUsage model_usage, GLib.Type[] col_types, out unowned Gda.Set last_inserted_row, uint task_id, Gda.ServerProviderExecCallback exec_cb, void* cb_data) throws GLib.Error;
+ [NoWrapper]
+ public virtual bool statement_prepare (Gda.Connection cnc, Gda.Statement stmt) throws GLib.Error;
+ [NoWrapper]
+ public virtual unowned Gda.SqlStatement statement_rewrite (Gda.Connection cnc, Gda.Statement stmt, Gda.Set @params) throws GLib.Error;
+ [NoWrapper]
+ public virtual unowned string statement_to_sql (Gda.Connection cnc, Gda.Statement stmt, Gda.Set @params, Gda.StatementSqlFlag flags, GLib.SList params_used) throws GLib.Error;
+ public GLib.Value string_to_value (Gda.Connection cnc, string str, GLib.Type preferred_type, string dbms_type);
+ public virtual bool supports_feature (Gda.Connection cnc, Gda.ConnectionFeature feature);
+ public virtual bool supports_operation (Gda.Connection cnc, Gda.ServerOperationType type, Gda.Set options);
+ public static bool test_schema_model (Gda.DataModel model, Gda.ConnectionSchema schema) throws GLib.Error;
+ public virtual unowned string unescape_string (Gda.Connection cnc, string str);
+ public unowned string value_to_sql_string (Gda.Connection cnc, GLib.Value from);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ [Compact]
+ public class ServerProviderHandlerInfo {
+ public weak Gda.Connection cnc;
+ public weak string dbms_type;
+ public GLib.Type g_type;
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ [Compact]
+ public class ServerProviderInfo {
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ [Compact]
+ public class ServerProviderMeta {
+ public weak GLib.Callback character_sets;
+ public weak GLib.Callback check_columns;
+ public weak GLib.Callback collations;
+ public weak GLib.Callback columns;
+ public weak GLib.Callback constraints_dom;
+ public weak GLib.Callback constraints_ref;
+ public weak GLib.Callback constraints_tab;
+ public weak GLib.Callback domains;
+ public weak GLib.Callback el_types;
+ public weak GLib.Callback enums;
+ public weak GLib.Callback index_cols;
+ public weak GLib.Callback indexes_tab;
+ public weak GLib.Callback key_columns;
+ public weak GLib.Callback routine_col;
+ public weak GLib.Callback routine_par;
+ public weak GLib.Callback routines;
+ public weak GLib.Callback schemata;
+ public weak GLib.Callback tables_views;
+ public weak GLib.Callback triggers;
+ public weak GLib.Callback udt;
+ public weak GLib.Callback udt_cols;
+ public weak GLib.Callback view_cols;
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ [Compact]
+ public class ServerProviderXa {
+ public weak GLib.Callback xa_commit;
+ public weak GLib.Callback xa_end;
+ public weak GLib.Callback xa_prepare;
+ public weak GLib.Callback xa_recover;
+ public weak GLib.Callback xa_rollback;
+ public weak GLib.Callback xa_start;
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public class Set : GLib.Object {
+ public weak GLib.SList groups_list;
+ public weak GLib.SList nodes_list;
+ public weak GLib.SList sources_list;
+ [CCode (has_construct_function = false)]
+ public Set (GLib.SList<Gda.Holder> holders);
+ public bool add_holder (Gda.Holder holder);
+ public unowned Gda.Set copy ();
+ public static GLib.Quark error_quark ();
+ [CCode (has_construct_function = false)]
+ public Set.from_spec_node (Xml.Node xml_spec) throws GLib.Error;
+ [CCode (has_construct_function = false)]
+ public Set.from_spec_string (string xml_spec) throws GLib.Error;
+ public unowned Gda.SetGroup get_group (Gda.Holder holder);
+ public unowned Gda.Holder get_holder (string holder_id);
+ public GLib.Value get_holder_value (string holder_id);
+ public unowned Gda.SetNode get_node (Gda.Holder holder);
+ public unowned Gda.Holder get_nth_holder (int pos);
+ public unowned Gda.SetSource get_source (Gda.Holder holder);
+ public unowned Gda.SetSource get_source_for_model (Gda.DataModel model);
+ [CCode (has_construct_function = false)]
+ public Set.@inline (int nb);
+ public bool is_valid () throws GLib.Error;
+ public void merge_with_set (Gda.Set set_to_merge);
+ [CCode (has_construct_function = false)]
+ public Set.read_only (GLib.SList holders);
+ public void remove_holder (Gda.Holder holder);
+ public void replace_source_model (Gda.SetSource source, Gda.DataModel model);
+ public bool set_holder_value (string holder_id) throws GLib.Error;
+ [NoAccessorMethod]
+ public string description { owned get; set; }
+ public void* holders { construct; }
+ [NoAccessorMethod]
+ public string id { owned get; set; }
+ [NoAccessorMethod]
+ public string name { owned get; set; }
+ public virtual signal void holder_attr_changed (Gda.Holder holder, string attr_name, GLib.Value attr_value);
+ public virtual signal void holder_changed (Gda.Holder holder);
+ public virtual signal void holder_type_set (Gda.Holder holder);
+ public virtual signal void public_data_changed ();
+ public virtual signal void source_model_changed (void* source);
+ public virtual signal unowned GLib.Error validate_holder_change (Gda.Holder holder, GLib.Value new_value);
+ public virtual signal unowned GLib.Error validate_set ();
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ [Compact]
+ public class SetGroup {
+ public weak GLib.SList nodes;
+ public weak Gda.SetSource nodes_source;
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ [Compact]
+ public class SetNode {
+ public weak Gda.Holder holder;
+ public int source_column;
+ public weak Gda.DataModel source_model;
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ [Compact]
+ public class SetSource {
+ public weak Gda.DataModel data_model;
+ public weak GLib.SList nodes;
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ [Compact]
+ public class SqlAnyPart {
+ public weak Gda.SqlAnyPart parent;
+ public Gda.SqlAnyPartType type;
+ public bool check_structure () throws GLib.Error;
+ public bool @foreach (Gda.SqlForeachFunc func, void* data) throws GLib.Error;
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public class SqlBuilder : GLib.Object {
+ [CCode (has_construct_function = false)]
+ public SqlBuilder (Gda.SqlStatementType stmt_type);
+ [CCode (sentinel = "")]
+ public Gda.SqlBuilderId add_case (Gda.SqlBuilderId test_expr, Gda.SqlBuilderId else_expr, ...);
+ public Gda.SqlBuilderId add_case_v (Gda.SqlBuilderId test_expr, Gda.SqlBuilderId else_expr, Gda.SqlBuilderId when_array, Gda.SqlBuilderId then_array, int args_size);
+ public Gda.SqlBuilderId add_cond (Gda.SqlOperatorType op, Gda.SqlBuilderId op1, Gda.SqlBuilderId op2, Gda.SqlBuilderId op3);
+ public Gda.SqlBuilderId add_cond_v (Gda.SqlOperatorType op, Gda.SqlBuilderId op_ids, int op_ids_size);
+ [CCode (sentinel = "")]
+ public Gda.SqlBuilderId add_expr (Gda.DataHandler dh, GLib.Type type, ...);
+ public Gda.SqlBuilderId add_expr_value (Gda.DataHandler dh, GLib.Value value);
+ public Gda.SqlBuilderId add_field_id (string field_name, string table_name);
+ [CCode (sentinel = "")]
+ public void add_field_value (string field_name, GLib.Type type, ...);
+ public void add_field_value_as_gvalue (string field_name, GLib.Value value);
+ public void add_field_value_id (Gda.SqlBuilderId field_id, Gda.SqlBuilderId value_id);
+ [CCode (sentinel = "")]
+ public Gda.SqlBuilderId add_function (string func_name, ...);
+ public Gda.SqlBuilderId add_function_v (string func_name, Gda.SqlBuilderId args, int args_size);
+ public Gda.SqlBuilderId add_id (string str);
+ public Gda.SqlBuilderId add_param (string param_name, GLib.Type type, bool nullok);
+ public Gda.SqlBuilderId add_sub_select (Gda.SqlStatement sqlst);
+ public void compound_add_sub_select (Gda.SqlStatement sqlst);
+ public void compound_set_type (Gda.SqlStatementCompoundType compound_type);
+ public static GLib.Quark error_quark ();
+ public unowned Gda.SqlExpr export_expression (Gda.SqlBuilderId id);
+ public unowned Gda.SqlStatement get_sql_statement ();
+ public unowned Gda.Statement get_statement () throws GLib.Error;
+ public Gda.SqlBuilderId import_expression (Gda.SqlExpr expr);
+ public void join_add_field (Gda.SqlBuilderId join_id, string field_name);
+ public Gda.SqlBuilderId select_add_field (string field_name, string table_name, string alias);
+ public Gda.SqlBuilderId select_add_target (string table_name, string alias);
+ public Gda.SqlBuilderId select_add_target_id (Gda.SqlBuilderId table_id, string alias);
+ public void select_group_by (Gda.SqlBuilderId expr_id);
+ public Gda.SqlBuilderId select_join_targets (Gda.SqlBuilderId left_target_id, Gda.SqlBuilderId right_target_id, Gda.SqlSelectJoinType join_type, Gda.SqlBuilderId join_expr);
+ public void select_order_by (Gda.SqlBuilderId expr_id, bool asc, string collation_name);
+ public void select_set_distinct (bool distinct, Gda.SqlBuilderId expr_id);
+ public void select_set_having (Gda.SqlBuilderId cond_id);
+ public void select_set_limit (Gda.SqlBuilderId limit_count_expr_id, Gda.SqlBuilderId limit_offset_expr_id);
+ public void set_table (string table_name);
+ public void set_where (Gda.SqlBuilderId cond_id);
+ public Gda.SqlStatementType stmt_type { construct; }
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", copy_function = "gda_sql_case_copy")]
+ [Compact]
+ public class SqlCase {
+ public weak Gda.SqlAnyPart any;
+ public weak Gda.SqlExpr base_expr;
+ public weak Gda.SqlExpr else_expr;
+ public weak GLib.SList then_expr_list;
+ public weak GLib.SList when_expr_list;
+ [CCode (has_construct_function = false)]
+ public SqlCase (Gda.SqlAnyPart parent);
+ public unowned Gda.SqlCase copy ();
+ public unowned string serialize ();
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ [Compact]
+ public class SqlErrorType {
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", copy_function = "gda_sql_expr_copy", type_id = "gda_sql_expr_get_type ()")]
+ [Compact]
+ public class SqlExpr {
+ public weak Gda.SqlAnyPart any;
+ public weak Gda.SqlCase case_s;
+ public weak string cast_as;
+ public weak Gda.SqlOperation cond;
+ public weak Gda.SqlFunction func;
+ public weak Gda.SqlParamSpec param_spec;
+ public weak Gda.SqlAnyPart select;
+ public GLib.Value value;
+ public void* value_is_ident;
+ [CCode (has_construct_function = false)]
+ public SqlExpr (Gda.SqlAnyPart parent);
+ public unowned Gda.SqlExpr copy ();
+ public unowned string serialize ();
+ public void take_select (Gda.SqlStatement stmt);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", copy_function = "gda_sql_field_copy")]
+ [Compact]
+ public class SqlField {
+ public weak Gda.SqlAnyPart any;
+ public weak string field_name;
+ public weak Gda.MetaTableColumn validity_meta_table_column;
+ [CCode (has_construct_function = false)]
+ public SqlField (Gda.SqlAnyPart parent);
+ public unowned Gda.SqlField copy ();
+ public unowned string serialize ();
+ public void take_name (GLib.Value value);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", copy_function = "gda_sql_function_copy")]
+ [Compact]
+ public class SqlFunction {
+ public weak Gda.SqlAnyPart any;
+ public weak GLib.SList args_list;
+ public weak string function_name;
+ [CCode (has_construct_function = false)]
+ public SqlFunction (Gda.SqlAnyPart parent);
+ public void check_clean ();
+ public unowned Gda.SqlFunction copy ();
+ public unowned string serialize ();
+ public void take_args_list (owned GLib.SList args);
+ public void take_name (GLib.Value value);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", copy_function = "gda_sql_operation_copy")]
+ [Compact]
+ public class SqlOperation {
+ public weak Gda.SqlAnyPart any;
+ public weak GLib.SList operands;
+ public Gda.SqlOperatorType operator_type;
+ [CCode (has_construct_function = false)]
+ public SqlOperation (Gda.SqlAnyPart parent);
+ public unowned Gda.SqlOperation copy ();
+ public static Gda.SqlOperatorType operator_from_string (string op);
+ public static unowned string operator_to_string (Gda.SqlOperatorType op);
+ public unowned string serialize ();
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", copy_function = "gda_sql_param_spec_copy")]
+ [Compact]
+ public class SqlParamSpec {
+ public weak string descr;
+ public GLib.Type g_type;
+ public bool is_param;
+ public weak string name;
+ public bool nullok;
+ public void* validity_meta_dict;
+ [CCode (has_construct_function = false)]
+ public SqlParamSpec (GLib.Value simple_spec);
+ public unowned Gda.SqlParamSpec copy ();
+ public unowned string serialize ();
+ public void take_descr (GLib.Value value);
+ public void take_name (GLib.Value value);
+ public void take_nullok (GLib.Value value);
+ public void take_type (GLib.Value value);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public class SqlParser : GLib.Object, Gda.Lockable {
+ [CCode (has_construct_function = false)]
+ public SqlParser ();
+ [NoWrapper]
+ public virtual void* delim_alloc (GLib.Callback p1);
+ [NoWrapper]
+ public virtual void delim_free (void* p1, GLib.Callback p2);
+ [NoWrapper]
+ public virtual void delim_parse (void* p1, int p2, GLib.Value p3, Gda.SqlParserIface p4);
+ [NoWrapper]
+ public virtual void delim_trace (void* p1, string p2);
+ public static GLib.Quark error_quark ();
+ public unowned Gda.Batch parse_file_as_batch (string filename) throws GLib.Error;
+ public unowned Gda.Statement parse_string (string sql, out unowned string remain) throws GLib.Error;
+ public unowned Gda.Batch parse_string_as_batch (string sql, string remain) throws GLib.Error;
+ [NoWrapper]
+ public virtual void* parser_alloc (GLib.Callback p1);
+ [NoWrapper]
+ public virtual void parser_free (void* p1, GLib.Callback p2);
+ [NoWrapper]
+ public virtual void parser_parse (void* p1, int p2, GLib.Value p3, Gda.SqlParserIface p4);
+ [NoWrapper]
+ public virtual void parser_trace (void* p1, string p2);
+ public void set_overflow_error ();
+ public void set_syntax_error ();
+ [NoAccessorMethod]
+ public int column_error { get; }
+ [NoAccessorMethod]
+ public int line_error { get; }
+ [NoAccessorMethod]
+ public int mode { get; set; }
+ [NoAccessorMethod]
+ public int tokenizer_flavour { get; set; }
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ [Compact]
+ public class SqlRenderingContext {
+ public weak Gda.Connection cnc;
+ public Gda.StatementSqlFlag flags;
+ public weak Gda.Set @params;
+ public weak GLib.SList params_used;
+ public weak Gda.ServerProvider provider;
+ public weak Gda.SqlRenderingFunc render_begin;
+ public weak Gda.SqlRenderingFunc render_case;
+ public weak Gda.SqlRenderingFunc render_commit;
+ public weak Gda.SqlRenderingFunc render_compound;
+ public weak Gda.SqlRenderingFunc render_delete;
+ public weak Gda.SqlRenderingFunc render_delete_savepoint;
+ public weak Gda.SqlRenderingExpr render_expr;
+ public weak Gda.SqlRenderingFunc render_field;
+ public weak Gda.SqlRenderingFunc render_function;
+ public weak Gda.SqlRenderingFunc render_insert;
+ public weak Gda.SqlRenderingFunc render_operation;
+ public weak Gda.SqlRenderingPSpecFunc render_param_spec;
+ public weak Gda.SqlRenderingFunc render_rollback;
+ public weak Gda.SqlRenderingFunc render_rollback_savepoint;
+ public weak Gda.SqlRenderingFunc render_savepoint;
+ public weak Gda.SqlRenderingFunc render_select;
+ public weak Gda.SqlRenderingFunc render_select_field;
+ public weak Gda.SqlRenderingFunc render_select_from;
+ public weak Gda.SqlRenderingFunc render_select_join;
+ public weak Gda.SqlRenderingFunc render_select_order;
+ public weak Gda.SqlRenderingFunc render_select_target;
+ public weak Gda.SqlRenderingFunc render_table;
+ public weak Gda.SqlRenderingFunc render_unknown;
+ public weak Gda.SqlRenderingFunc render_update;
+ public weak Gda.SqlRenderingValue render_value;
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", copy_function = "gda_sql_select_field_copy")]
+ [Compact]
+ public class SqlSelectField {
+ public weak Gda.SqlAnyPart any;
+ public weak string @as;
+ public weak Gda.SqlExpr expr;
+ public weak string field_name;
+ public weak string table_name;
+ public weak Gda.MetaDbObject validity_meta_object;
+ public weak Gda.MetaTableColumn validity_meta_table_column;
+ [CCode (has_construct_function = false)]
+ public SqlSelectField (Gda.SqlAnyPart parent);
+ public unowned Gda.SqlSelectField copy ();
+ public unowned string serialize ();
+ public void take_alias (GLib.Value alias);
+ public void take_expr (Gda.SqlExpr expr);
+ public void take_star_value (GLib.Value value);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", copy_function = "gda_sql_select_from_copy")]
+ [Compact]
+ public class SqlSelectFrom {
+ public weak Gda.SqlAnyPart any;
+ public weak GLib.SList joins;
+ public weak GLib.SList targets;
+ [CCode (has_construct_function = false)]
+ public SqlSelectFrom (Gda.SqlAnyPart parent);
+ public unowned Gda.SqlSelectFrom copy ();
+ public unowned string serialize ();
+ public void take_new_join (Gda.SqlSelectJoin join);
+ public void take_new_target (Gda.SqlSelectTarget target);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", copy_function = "gda_sql_select_join_copy")]
+ [Compact]
+ public class SqlSelectJoin {
+ public weak Gda.SqlAnyPart any;
+ public weak Gda.SqlExpr expr;
+ public int position;
+ public Gda.SqlSelectJoinType type;
+ public weak GLib.SList use;
+ [CCode (has_construct_function = false)]
+ public SqlSelectJoin (Gda.SqlAnyPart parent);
+ public unowned Gda.SqlSelectJoin copy ();
+ public unowned string serialize ();
+ public static unowned string type_to_string (Gda.SqlSelectJoinType type);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", copy_function = "gda_sql_select_order_copy")]
+ [Compact]
+ public class SqlSelectOrder {
+ public weak Gda.SqlAnyPart any;
+ public bool asc;
+ public weak string collation_name;
+ public weak Gda.SqlExpr expr;
+ [CCode (has_construct_function = false)]
+ public SqlSelectOrder (Gda.SqlAnyPart parent);
+ public unowned Gda.SqlSelectOrder copy ();
+ public unowned string serialize ();
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", copy_function = "gda_sql_select_target_copy")]
+ [Compact]
+ public class SqlSelectTarget {
+ public weak Gda.SqlAnyPart any;
+ public weak string @as;
+ public weak Gda.SqlExpr expr;
+ public weak string table_name;
+ public weak Gda.MetaDbObject validity_meta_object;
+ [CCode (has_construct_function = false)]
+ public SqlSelectTarget (Gda.SqlAnyPart parent);
+ public unowned Gda.SqlSelectTarget copy ();
+ public unowned string serialize ();
+ public void take_alias (GLib.Value alias);
+ public void take_select (Gda.SqlStatement stmt);
+ public void take_table_name (GLib.Value value);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", copy_function = "gda_sql_statement_copy", type_id = "gda_sql_statement_get_type ()")]
+ [Compact]
+ public class SqlStatement {
+ public void* contents;
+ public weak string sql;
+ public Gda.SqlStatementType stmt_type;
+ public weak Gda.MetaStruct validity_meta_struct;
+ [CCode (has_construct_function = false)]
+ public SqlStatement (Gda.SqlStatementType type);
+ public void check_clean ();
+ public bool check_structure () throws GLib.Error;
+ public bool check_validity (Gda.Connection cnc) throws GLib.Error;
+ public bool check_validity_m (Gda.MetaStruct mstruct) throws GLib.Error;
+ public unowned Gda.SqlStatement copy ();
+ public static unowned Gda.SqlStatementContentsInfo get_contents_infos (Gda.SqlStatementType type);
+ public bool normalize (Gda.Connection cnc) throws GLib.Error;
+ public unowned string serialize ();
+ public static Gda.SqlStatementType string_to_type (string type);
+ public void trans_set_isol_level (Gda.TransactionIsolation level);
+ public void trans_take_mode (GLib.Value value);
+ public void trans_take_name (GLib.Value value);
+ public static unowned string type_to_string (Gda.SqlStatementType type);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ [Compact]
+ public class SqlStatementCheckValidityData {
+ public weak Gda.Connection cnc;
+ public weak Gda.MetaStruct mstruct;
+ public weak Gda.MetaStore store;
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ [Compact]
+ public class SqlStatementCompound {
+ public weak Gda.SqlAnyPart any;
+ public Gda.SqlStatementCompoundType compound_type;
+ public weak GLib.SList stmt_list;
+ public static void set_type (Gda.SqlStatement stmt, Gda.SqlStatementCompoundType type);
+ public static void take_stmt (Gda.SqlStatement stmt, Gda.SqlStatement s);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ [Compact]
+ public class SqlStatementContentsInfo {
+ public weak Gda.SqlForeachFunc check_structure_func;
+ public weak Gda.SqlForeachFunc check_validity_func;
+ public weak GLib.Callback @construct;
+ public weak GLib.Callback copy;
+ public weak GLib.Callback free;
+ public weak string name;
+ public weak GLib.Callback serialize;
+ public Gda.SqlStatementType type;
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ [Compact]
+ public class SqlStatementDelete {
+ public weak Gda.SqlAnyPart any;
+ public weak Gda.SqlExpr cond;
+ public weak Gda.SqlTable table;
+ public static void take_condition (Gda.SqlStatement stmt, Gda.SqlExpr cond);
+ public static void take_table_name (Gda.SqlStatement stmt, GLib.Value value);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ [Compact]
+ public class SqlStatementInsert {
+ public weak Gda.SqlAnyPart any;
+ public weak GLib.SList fields_list;
+ public weak string on_conflict;
+ public weak Gda.SqlAnyPart select;
+ public weak Gda.SqlTable table;
+ public weak GLib.SList values_list;
+ public static void take_1_values_list (Gda.SqlStatement stmt, owned GLib.SList<Gda.SqlExpr> list);
+ public static void take_extra_values_list (Gda.SqlStatement stmt, GLib.SList list);
+ public static void take_fields_list (Gda.SqlStatement stmt, owned GLib.SList<Gda.SqlField> list);
+ public static void take_on_conflict (Gda.SqlStatement stmt, GLib.Value value);
+ public static void take_select (Gda.SqlStatement stmt, Gda.SqlStatement select);
+ public static void take_table_name (Gda.SqlStatement stmt, GLib.Value value);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ [Compact]
+ public class SqlStatementSelect {
+ public weak Gda.SqlAnyPart any;
+ public bool distinct;
+ public weak Gda.SqlExpr distinct_expr;
+ public weak GLib.SList expr_list;
+ public weak Gda.SqlSelectFrom from;
+ public weak GLib.SList group_by;
+ public weak Gda.SqlExpr having_cond;
+ public weak Gda.SqlExpr limit_count;
+ public weak Gda.SqlExpr limit_offset;
+ public weak GLib.SList order_by;
+ public weak Gda.SqlExpr where_cond;
+ public static void take_distinct (Gda.SqlStatement stmt, bool distinct, Gda.SqlExpr distinct_expr);
+ public static void take_expr_list (Gda.SqlStatement stmt, owned GLib.SList<Gda.SqlSelectField> expr_list);
+ public static void take_from (Gda.SqlStatement stmt, Gda.SqlSelectFrom from);
+ public static void take_group_by (Gda.SqlStatement stmt, owned GLib.SList<Gda.SqlExpr> group_by);
+ public static void take_having_cond (Gda.SqlStatement stmt, Gda.SqlExpr expr);
+ public static void take_limits (Gda.SqlStatement stmt, Gda.SqlExpr count, Gda.SqlExpr offset);
+ public static void take_order_by (Gda.SqlStatement stmt, owned GLib.SList<Gda.SqlSelectOrder> order_by);
+ public static void take_where_cond (Gda.SqlStatement stmt, owned Gda.SqlExpr expr);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ [Compact]
+ public class SqlStatementTransaction {
+ public weak Gda.SqlAnyPart any;
+ public Gda.TransactionIsolation isolation_level;
+ public weak string trans_mode;
+ public weak string trans_name;
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ [Compact]
+ public class SqlStatementUnknown {
+ public weak Gda.SqlAnyPart any;
+ public weak GLib.SList expressions;
+ public static void take_expressions (Gda.SqlStatement stmt, owned GLib.SList<Gda.SqlExpr> expressions);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ [Compact]
+ public class SqlStatementUpdate {
+ public weak Gda.SqlAnyPart any;
+ public weak Gda.SqlExpr cond;
+ public weak GLib.SList expr_list;
+ public weak GLib.SList fields_list;
+ public weak string on_conflict;
+ public weak Gda.SqlTable table;
+ public static void take_condition (Gda.SqlStatement stmt, Gda.SqlExpr cond);
+ public static void take_on_conflict (Gda.SqlStatement stmt, GLib.Value value);
+ public static void take_set_value (Gda.SqlStatement stmt, GLib.Value fname, Gda.SqlExpr expr);
+ public static void take_table_name (Gda.SqlStatement stmt, GLib.Value value);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", copy_function = "gda_sql_table_copy")]
+ [Compact]
+ public class SqlTable {
+ public weak Gda.SqlAnyPart any;
+ public weak string table_name;
+ public weak Gda.MetaDbObject validity_meta_object;
+ [CCode (has_construct_function = false)]
+ public SqlTable (Gda.SqlAnyPart parent);
+ public unowned Gda.SqlTable copy ();
+ public unowned string serialize ();
+ public void take_name (GLib.Value value);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public class SqliteProvider : Gda.ServerProvider {
+ [CCode (has_construct_function = false)]
+ protected SqliteProvider ();
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public class Statement : GLib.Object {
+ [CCode (has_construct_function = false)]
+ public Statement ();
+ public bool check_structure () throws GLib.Error;
+ public bool check_validity (Gda.Connection cnc) throws GLib.Error;
+ public unowned Gda.Statement copy ();
+ public static GLib.Quark error_quark ();
+ public bool get_parameters (out unowned Gda.Set out_params) throws GLib.Error;
+ public Gda.SqlStatementType get_statement_type ();
+ public bool is_useless ();
+ public bool normalize (Gda.Connection cnc) throws GLib.Error;
+ public unowned Gda.SqlStatement rewrite_for_default_values (Gda.Set @params, bool remove) throws GLib.Error;
+ public unowned string serialize ();
+ public string to_sql_extended (Gda.Connection? cnc, Gda.Set? @params, Gda.StatementSqlFlag flags, GLib.SList<Gda.Holder>? params_used) throws GLib.Error;
+ public unowned string to_sql_real (Gda.SqlRenderingContext context) throws GLib.Error;
+ [NoAccessorMethod]
+ public void* structure { get; set; }
+ public virtual signal void checked (Gda.Connection cnc, bool checked);
+ public virtual signal void reset ();
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public class ThreadWrapper : GLib.Object {
+ [CCode (has_construct_function = false)]
+ public ThreadWrapper ();
+ public bool cancel (uint id);
+ public ulong connect_raw (void* instance, string sig_name, bool private_thread, bool private_job, Gda.ThreadWrapperCallback callback, void* data);
+ public void disconnect (ulong id);
+ public static GLib.Quark error_quark ();
+ public uint execute (Gda.ThreadWrapperFunc func, void* arg, GLib.DestroyNotify arg_destroy_func) throws GLib.Error;
+ public uint execute_void (Gda.ThreadWrapperVoidFunc func, void* arg, GLib.DestroyNotify arg_destroy_func) throws GLib.Error;
+ public void* fetch_result (bool may_lock, uint exp_id) throws GLib.Error;
+ public int get_waiting_size ();
+ public void iterate (bool may_block);
+ public void steal_signal (ulong id);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", copy_function = "gda_time_copy", type_id = "gda_time_get_type ()")]
+ [Compact]
+ public class Time {
+ public ulong fraction;
+ public ushort hour;
+ public ushort minute;
+ public ushort second;
+ public long timezone;
+ public static void* copy (void* boxed);
+ public bool valid ();
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", copy_function = "gda_timestamp_copy", type_id = "gda_timestamp_get_type ()")]
+ [Compact]
+ public class Timestamp {
+ public ushort day;
+ public ulong fraction;
+ public ushort hour;
+ public ushort minute;
+ public ushort month;
+ public ushort second;
+ public long timezone;
+ public short year;
+ public static void* copy (void* boxed);
+ public bool valid ();
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public class TransactionStatus : GLib.Object {
+ public weak GLib.List events;
+ public Gda.TransactionIsolation isolation_level;
+ public weak string name;
+ public Gda.TransactionStatusState state;
+ [CCode (has_construct_function = false)]
+ public TransactionStatus (string name);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ [Compact]
+ public class TransactionStatusEvent {
+ public weak Gda.ConnectionEvent conn_event;
+ public void* pl;
+ public weak Gda.TransactionStatus trans;
+ public Gda.TransactionStatusEventType type;
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public class Tree : GLib.Object {
+ [CCode (has_construct_function = false)]
+ public Tree ();
+ public void add_manager (Gda.TreeManager manager);
+ public void clean ();
+ public void dump (Gda.TreeNode node, GLib.FileStream stream);
+ public static GLib.Quark error_quark ();
+ public unowned Gda.TreeNode get_node (string tree_path, bool use_names);
+ public unowned Gda.TreeManager get_node_manager (Gda.TreeNode node);
+ public unowned string get_node_path (Gda.TreeNode node);
+ public unowned GLib.SList get_nodes_in_path (string tree_path, bool use_names);
+ public void set_attribute (string attribute, GLib.Value value, GLib.DestroyNotify destroy);
+ public bool update_all () throws GLib.Error;
+ public bool update_part (Gda.TreeNode node) throws GLib.Error;
+ [NoAccessorMethod]
+ public bool is_list { get; }
+ public virtual signal void node_changed (Gda.TreeNode node);
+ public virtual signal void node_deleted (string node_path);
+ public virtual signal void node_has_child_toggled (Gda.TreeNode node);
+ public virtual signal void node_inserted (Gda.TreeNode node);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public class TreeManager : GLib.Object {
+ [CCode (has_construct_function = false)]
+ protected TreeManager ();
+ public void add_manager (Gda.TreeManager sub);
+ public void add_new_node_attribute (string attribute, GLib.Value value);
+ public unowned Gda.TreeNode create_node (Gda.TreeNode parent, string name);
+ public static GLib.Quark error_quark ();
+ public unowned GLib.SList get_managers ();
+ public unowned Gda.TreeManagerNodeFunc get_node_create_func ();
+ public void set_node_create_func (Gda.TreeManagerNodeFunc func);
+ [NoWrapper]
+ public virtual unowned GLib.SList update_children (Gda.TreeNode node, GLib.SList children_nodes, bool out_error) throws GLib.Error;
+ [CCode (has_construct_function = false)]
+ public TreeManager.with_func (Gda.TreeManagerNodesFunc update_func);
+ [NoAccessorMethod]
+ public void* func { get; set construct; }
+ [NoAccessorMethod]
+ public bool recursive { get; set construct; }
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public class TreeMgrColumns : Gda.TreeManager {
+ [CCode (has_construct_function = false, type = "GdaTreeManager*")]
+ public TreeMgrColumns (Gda.Connection cnc, string schema, string table_name);
+ [NoAccessorMethod]
+ public Gda.Connection connection { owned get; construct; }
+ [NoAccessorMethod]
+ public Gda.MetaStore meta_store { owned get; construct; }
+ public string schema { construct; }
+ public string table_name { construct; }
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ [Compact]
+ public class TreeMgrColumnsPriv {
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public class TreeMgrLabel : Gda.TreeManager {
+ [CCode (has_construct_function = false, type = "GdaTreeManager*")]
+ public TreeMgrLabel (string label);
+ public string label { construct; }
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ [Compact]
+ public class TreeMgrLabelPriv {
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public class TreeMgrSchemas : Gda.TreeManager {
+ [CCode (has_construct_function = false, type = "GdaTreeManager*")]
+ public TreeMgrSchemas (Gda.Connection cnc);
+ [NoAccessorMethod]
+ public Gda.Connection connection { owned get; construct; }
+ [NoAccessorMethod]
+ public Gda.MetaStore meta_store { owned get; construct; }
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ [Compact]
+ public class TreeMgrSchemasPriv {
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public class TreeMgrSelect : Gda.TreeManager {
+ [CCode (has_construct_function = false, type = "GdaTreeManager*")]
+ public TreeMgrSelect (Gda.Connection cnc, Gda.Statement stmt, Gda.Set @params);
+ [NoAccessorMethod]
+ public Gda.Connection connection { owned get; construct; }
+ [NoAccessorMethod]
+ public Gda.Set @params { owned get; construct; }
+ [NoAccessorMethod]
+ public Gda.Statement statement { owned get; construct; }
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ [Compact]
+ public class TreeMgrSelectPriv {
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public class TreeMgrTables : Gda.TreeManager {
+ [CCode (has_construct_function = false, type = "GdaTreeManager*")]
+ public TreeMgrTables (Gda.Connection cnc, string schema);
+ [NoAccessorMethod]
+ public Gda.Connection connection { owned get; construct; }
+ [NoAccessorMethod]
+ public Gda.MetaStore meta_store { owned get; construct; }
+ public string schema { construct; }
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ [Compact]
+ public class TreeMgrTablesPriv {
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public class TreeNode : GLib.Object {
+ [CCode (has_construct_function = false)]
+ public TreeNode (string name);
+ [NoWrapper]
+ public virtual void dump_children (string prefix, GLib.StringBuilder in_string);
+ [NoWrapper]
+ public virtual unowned string dump_header ();
+ public static GLib.Quark error_quark ();
+ public GLib.Value fetch_attribute (string attribute);
+ public unowned Gda.TreeNode get_child_index (int index);
+ public unowned Gda.TreeNode get_child_name (string name);
+ public unowned GLib.SList get_children ();
+ public GLib.Value get_node_attribute (string attribute);
+ public unowned Gda.TreeNode get_parent ();
+ public void set_node_attribute (string attribute, GLib.Value value, GLib.DestroyNotify destroy);
+ [NoAccessorMethod]
+ public string name { owned get; set; }
+ public virtual signal void node_changed (Gda.TreeNode node);
+ public virtual signal void node_deleted (string relative_path);
+ public virtual signal void node_has_child_toggled (Gda.TreeNode node);
+ public virtual signal void node_inserted (Gda.TreeNode node);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ [Compact]
+ public class ValueList {
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public class VconnectionDataModel : Gda.VirtualConnection, Gda.Lockable {
+ [CCode (has_construct_function = false)]
+ protected VconnectionDataModel ();
+ public bool add (Gda.VconnectionDataModelSpec spec, GLib.DestroyNotify spec_free_func, string table_name) throws GLib.Error;
+ public bool add_model (Gda.DataModel model, string table_name) throws GLib.Error;
+ public void @foreach (Gda.VconnectionDataModelFunc func, void* data);
+ public unowned Gda.DataModel get_model (string table_name);
+ public unowned string get_table_name (Gda.DataModel model);
+ public bool remove (string table_name) throws GLib.Error;
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ [Compact]
+ public class VconnectionDataModelFilter {
+ public void* aConstraint;
+ public void* aConstraintUsage;
+ public void* aOrderBy;
+ public double estimatedCost;
+ public int idxNum;
+ public void* idxPointer;
+ public int nConstraint;
+ public int nOrderBy;
+ public bool orderByConsumed;
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ [Compact]
+ public class VconnectionDataModelSpec {
+ public weak Gda.VconnectionDataModelCreateColumnsFunc create_columns_func;
+ public weak Gda.VconnectionDataModelParseFilterFunc create_filter_func;
+ public weak Gda.VconnectionDataModelCreateFModelFunc create_filtered_model_func;
+ public weak Gda.VconnectionDataModelCreateModelFunc create_model_func;
+ public weak Gda.DataModel data_model;
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public class VconnectionHub : Gda.VconnectionDataModel, Gda.Lockable {
+ [CCode (has_construct_function = false)]
+ protected VconnectionHub ();
+ public bool add (Gda.Connection cnc, string ns) throws GLib.Error;
+ public void @foreach (Gda.VConnectionHubFunc func, void* data);
+ public unowned Gda.Connection get_connection (string ns);
+ public bool remove (Gda.Connection cnc) throws GLib.Error;
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public class VirtualConnection : Gda.Connection, Gda.Lockable {
+ [CCode (has_construct_function = false)]
+ protected VirtualConnection ();
+ public void* internal_get_provider_data ();
+ public void internal_set_provider_data (void* data, GLib.DestroyNotify destroy_func);
+ public static unowned Gda.Connection open (Gda.VirtualProvider virtual_provider) throws GLib.Error;
+ public static unowned Gda.Connection open_extended (Gda.VirtualProvider virtual_provider, Gda.ConnectionOptions options) throws GLib.Error;
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public class VirtualProvider : Gda.SqliteProvider {
+ [CCode (has_construct_function = false)]
+ protected VirtualProvider ();
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public class VproviderDataModel : Gda.VirtualProvider {
+ [CCode (has_construct_function = false, type = "GdaVirtualProvider*")]
+ public VproviderDataModel ();
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public class VproviderHub : Gda.VproviderDataModel {
+ [CCode (has_construct_function = false, type = "GdaVirtualProvider*")]
+ public VproviderHub ();
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public class XaTransaction : GLib.Object {
+ [CCode (has_construct_function = false)]
+ public XaTransaction (uint32 format, string global_transaction_id);
+ public bool begin () throws GLib.Error;
+ public bool commit (out GLib.SList<Gda.Connection> cnc_to_recover) throws GLib.Error;
+ public bool commit_recovered (out GLib.SList<Gda.Connection> cnc_to_recover) throws GLib.Error;
+ public static GLib.Quark error_quark ();
+ public bool register_connection (Gda.Connection cnc, string branch) throws GLib.Error;
+ public bool rollback () throws GLib.Error;
+ public static unowned Gda.XaTransactionId string_to_id (string str);
+ public void unregister_connection (Gda.Connection cnc);
+ [NoAccessorMethod]
+ public uint format_id { get; construct; }
+ [NoAccessorMethod]
+ public string transaction_id { owned get; construct; }
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ [Compact]
+ public class XaTransactionId {
+ public ushort bqual_length;
+ [CCode (array_length = false)]
+ public uint8[] data;
+ public uint32 format;
+ public ushort gtrid_length;
+ public unowned string to_string ();
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public interface DataHandler : GLib.Object {
+ public abstract bool accepts_g_type (GLib.Type type);
+ public static unowned Gda.DataHandler get_default (GLib.Type for_type);
+ public abstract unowned string get_descr ();
+ public abstract GLib.Value get_sane_init_value (GLib.Type type);
+ public abstract unowned string get_sql_from_value (GLib.Value value);
+ public abstract unowned string get_str_from_value (GLib.Value value);
+ public abstract GLib.Value get_value_from_sql (string sql, GLib.Type type);
+ public abstract GLib.Value get_value_from_str (string str, GLib.Type type);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public interface DataModel : GLib.Object {
+ [CCode (vfunc_name = "i_append_row")]
+ public virtual int append_row () throws GLib.Error;
+ [CCode (vfunc_name = "i_append_values")]
+ public virtual int append_values (GLib.List<GLib.Value> values) throws GLib.Error;
+ [CCode (vfunc_name = "i_create_iter")]
+ public virtual unowned Gda.DataModelIter create_iter ();
+ [CCode (vfunc_name = "i_describe_column")]
+ public virtual unowned Gda.Column describe_column (int col);
+ public void dump (GLib.FileStream to_stream);
+ public unowned string dump_as_string ();
+ public static GLib.Quark error_quark ();
+ public bool export_to_file (Gda.DataModelIOFormat format, string file, int cols, int nb_cols, int rows, int nb_rows, Gda.Set options) throws GLib.Error;
+ public unowned string export_to_string (Gda.DataModelIOFormat format, int cols, int nb_cols, int rows, int nb_rows, Gda.Set options);
+ public void freeze ();
+ [CCode (vfunc_name = "i_get_access_flags")]
+ public virtual Gda.DataModelAccessFlags get_access_flags ();
+ [CCode (vfunc_name = "i_get_attributes_at")]
+ public virtual Gda.ValueAttribute get_attributes_at (int col, int row);
+ public int get_column_index (string name);
+ public unowned string get_column_name (int col);
+ public unowned string get_column_title (int col);
+ [CCode (vfunc_name = "i_get_n_columns")]
+ public virtual int get_n_columns ();
+ [CCode (vfunc_name = "i_get_n_rows")]
+ public virtual int get_n_rows ();
+ public int get_row_from_values (GLib.SList<GLib.Value> values, int[] cols_index);
+ public unowned GLib.Value? get_typed_value_at (int col, int row, GLib.Type expected_type, bool nullok) throws GLib.Error;
+ public unowned GLib.Value? get_value_at (int col, int row) throws GLib.Error;
+ [CCode (vfunc_name = "i_remove_row")]
+ public virtual bool remove_row (int row) throws GLib.Error;
+ [CCode (vfunc_name = "i_send_hint")]
+ public virtual void send_hint (Gda.DataModelHint hint, GLib.Value hint_value);
+ public void set_column_name (int col, string name);
+ public void set_column_title (int col, string title);
+ [CCode (vfunc_name = "i_set_value_at")]
+ public virtual bool set_value_at (int col, int row, GLib.Value value) throws GLib.Error;
+ [CCode (vfunc_name = "i_set_values")]
+ public virtual bool set_values (int row, GLib.List<GLib.Value> values) throws GLib.Error;
+ public void thaw ();
+ public signal void changed ();
+ public signal void reset ();
+ public signal void row_inserted (int row);
+ public signal void row_removed (int row);
+ public signal void row_updated (int row);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public interface Lockable : GLib.Object {
+ [CCode (vfunc_name = "i_lock")]
+ public virtual void @lock ();
+ [CCode (vfunc_name = "i_trylock")]
+ public virtual bool trylock ();
+ [CCode (vfunc_name = "i_unlock")]
+ public virtual void unlock ();
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public struct DsnInfo {
+ public weak string name;
+ public weak string provider;
+ public weak string description;
+ public weak string cnc_string;
+ public weak string auth_string;
+ public bool is_system;
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ [SimpleType]
+ public struct SqlBuilderId : uint {
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ protected struct SqlParserIface {
+ public Gda.SqlParser parser;
+ public Gda.SqlStatement parsed_statement;
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_BATCH_CONFLICTING_PARAMETER_")]
+ public errordomain BatchError {
+ ERROR
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_CONFIG_")]
+ public errordomain ConfigError {
+ DSN_NOT_FOUND_ERROR,
+ PERMISSION_ERROR,
+ PROVIDER_NOT_FOUND_ERROR,
+ PROVIDER_CREATION_ERROR
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_CONNECTION_")]
+ public errordomain ConnectionError {
+ DSN_NOT_FOUND_ERROR,
+ PROVIDER_NOT_FOUND_ERROR,
+ PROVIDER_ERROR,
+ NO_CNC_SPEC_ERROR,
+ NO_PROVIDER_SPEC_ERROR,
+ OPEN_ERROR,
+ STATEMENT_TYPE_ERROR,
+ CANT_LOCK_ERROR,
+ TASK_NOT_FOUND_ERROR,
+ UNSUPPORTED_THREADS_ERROR,
+ CLOSED_ERROR
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_CONNECTION_EVENT_CODE_")]
+ public enum ConnectionEventCode {
+ CONSTRAINT_VIOLATION,
+ RESTRICT_VIOLATION,
+ NOT_NULL_VIOLATION,
+ FOREIGN_KEY_VIOLATION,
+ UNIQUE_VIOLATION,
+ CHECK_VIOLATION,
+ INSUFFICIENT_PRIVILEGES,
+ UNDEFINED_COLUMN,
+ UNDEFINED_FUNCTION,
+ UNDEFINED_TABLE,
+ DUPLICATE_COLUMN,
+ DUPLICATE_DATABASE,
+ DUPLICATE_FUNCTION,
+ DUPLICATE_SCHEMA,
+ DUPLICATE_TABLE,
+ DUPLICATE_ALIAS,
+ DUPLICATE_OBJECT,
+ SYNTAX_ERROR,
+ UNKNOWN
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_CONNECTION_EVENT_")]
+ public enum ConnectionEventType {
+ NOTICE,
+ WARNING,
+ ERROR,
+ COMMAND
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_CONNECTION_FEATURE_")]
+ public enum ConnectionFeature {
+ AGGREGATES,
+ BLOBS,
+ INDEXES,
+ INHERITANCE,
+ NAMESPACES,
+ PROCEDURES,
+ SEQUENCES,
+ SQL,
+ TRANSACTIONS,
+ SAVEPOINTS,
+ SAVEPOINTS_REMOVE,
+ TRIGGERS,
+ UPDATABLE_CURSOR,
+ USERS,
+ VIEWS,
+ XA_TRANSACTIONS,
+ MULTI_THREADING,
+ LAST
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_CONNECTION_META_")]
+ public enum ConnectionMetaType {
+ NAMESPACES,
+ TYPES,
+ TABLES,
+ VIEWS,
+ FIELDS,
+ INDEXES
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_CONNECTION_OPTIONS_")]
+ [Flags]
+ public enum ConnectionOptions {
+ NONE,
+ READ_ONLY,
+ SQL_IDENTIFIERS_CASE_SENSITIVE,
+ THREAD_SAFE,
+ THREAD_ISOLATED,
+ AUTO_META_DATA
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_CONNECTION_SCHEMA_")]
+ public enum ConnectionSchema {
+ AGGREGATES,
+ DATABASES,
+ FIELDS,
+ INDEXES,
+ LANGUAGES,
+ NAMESPACES,
+ PARENT_TABLES,
+ PROCEDURES,
+ SEQUENCES,
+ TABLES,
+ TRIGGERS,
+ TYPES,
+ USERS,
+ VIEWS,
+ CONSTRAINTS,
+ TABLE_CONTENTS
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_DATA_COMPARATOR_")]
+ public enum DataComparatorError {
+ MISSING_DATA_MODEL_ERROR,
+ COLUMN_TYPES_MISMATCH_ERROR,
+ MODEL_ACCESS_ERROR,
+ USER_CANCELLED_ERROR
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_DATA_MODEL_ACCESS_")]
+ [Flags]
+ public enum DataModelAccessFlags {
+ RANDOM,
+ CURSOR_FORWARD,
+ CURSOR_BACKWARD,
+ CURSOR,
+ INSERT,
+ UPDATE,
+ DELETE,
+ WRITE
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_DATA_MODEL_")]
+ public enum DataModelError {
+ ROW_OUT_OF_RANGE_ERROR,
+ COLUMN_OUT_OF_RANGE_ERROR,
+ VALUES_LIST_ERROR,
+ VALUE_TYPE_ERROR,
+ ROW_NOT_FOUND_ERROR,
+ ACCESS_ERROR,
+ FEATURE_NON_SUPPORTED_ERROR,
+ FILE_EXIST_ERROR,
+ XML_FORMAT_ERROR
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_DATA_MODEL_HINT_")]
+ public enum DataModelHint {
+ START_BATCH_UPDATE,
+ END_BATCH_UPDATE,
+ REFRESH
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_DATA_MODEL_IO_")]
+ public enum DataModelIOFormat {
+ DATA_ARRAY_XML,
+ TEXT_SEPARATED
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_DATA_MODEL_ITER_COLUMN_OUT_OF_RANGE_")]
+ public enum DataModelIterError {
+ ERROR
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_DATA_PROXY_")]
+ public enum DataProxyError {
+ COMMIT_ERROR,
+ COMMIT_CANCELLED,
+ READ_ONLY_VALUE,
+ READ_ONLY_ROW,
+ FILTER_ERROR
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_DATA_SELECT_")]
+ public enum DataSelectError {
+ MODIFICATION_STATEMENT_ERROR,
+ MISSING_MODIFICATION_STATEMENT_ERROR,
+ CONNECTION_ERROR,
+ ACCESS_ERROR,
+ SQL_ERROR,
+ SAFETY_LOCKED_ERROR
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_DIFF_")]
+ public enum DiffType {
+ ADD_ROW,
+ REMOVE_ROW,
+ MODIFY_ROW
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_EASY_CREATE_TABLE_")]
+ public enum EasyCreateTableFlag {
+ NOTHING_FLAG,
+ PKEY_FLAG,
+ NOT_NULL_FLAG,
+ UNIQUE_FLAG,
+ AUTOINC_FLAG,
+ FKEY_FLAG,
+ PKEY_AUTOINC_FLAG
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_EASY_")]
+ public enum EasyError {
+ OBJECT_NAME_ERROR,
+ INCORRECT_VALUE_ERROR,
+ OPERATION_ERROR
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_HOLDER_")]
+ public enum HolderError {
+ STRING_CONVERSION_ERROR,
+ VALUE_TYPE_ERROR,
+ VALUE_NULL_ERROR
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_META_DB_")]
+ public enum MetaDbObjectType {
+ UNKNOWN,
+ TABLE,
+ VIEW
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_META_FOREIGN_KEY_")]
+ public enum MetaForeignKeyPolicy {
+ UNKNOWN,
+ NONE,
+ NO_ACTION,
+ RESTRICT,
+ CASCADE,
+ SET_NULL,
+ SET_DEFAULT
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_META_GRAPH_")]
+ [Flags]
+ public enum MetaGraphInfo {
+ COLUMNS
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_META_SORT_")]
+ public enum MetaSortType {
+ ALHAPETICAL,
+ DEPENDENCIES
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_META_STORE_")]
+ public enum MetaStoreChangeType {
+ ADD,
+ REMOVE,
+ MODIFY
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_META_STORE_")]
+ public enum MetaStoreError {
+ INCORRECT_SCHEMA_ERROR,
+ UNSUPPORTED_PROVIDER_ERROR,
+ INTERNAL_ERROR,
+ META_CONTEXT_ERROR,
+ MODIFY_CONTENTS_ERROR,
+ EXTRACT_SQL_ERROR,
+ ATTRIBUTE_NOT_FOUND_ERROR,
+ ATTRIBUTE_ERROR,
+ SCHEMA_OBJECT_NOT_FOUND_ERROR,
+ SCHEMA_OBJECT_CONFLICT_ERROR,
+ SCHEMA_OBJECT_DESCR_ERROR,
+ TRANSACTION_ALREADY_STARTED_ERROR
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_META_STRUCT_")]
+ public enum MetaStructError {
+ UNKNOWN_OBJECT_ERROR,
+ DUPLICATE_OBJECT_ERROR,
+ INCOHERENCE_ERROR
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_META_STRUCT_FEATURE_")]
+ [Flags]
+ public enum MetaStructFeature {
+ NONE,
+ FOREIGN_KEYS,
+ VIEW_DEPENDENCIES,
+ ALL
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_", has_type_id = false)]
+ public enum PrefixDir {
+ NO_DIR,
+ BIN_DIR,
+ SBIN_DIR,
+ DATA_DIR,
+ LOCALE_DIR,
+ LIB_DIR,
+ LIBEXEC_DIR,
+ ETC_DIR
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_SERVER_OPERATION_CREATE_TABLE_")]
+ [Flags]
+ public enum ServerOperationCreateTableFlag {
+ NOTHING_FLAG,
+ PKEY_FLAG,
+ NOT_NULL_FLAG,
+ UNIQUE_FLAG,
+ AUTOINC_FLAG,
+ FKEY_FLAG,
+ PKEY_AUTOINC_FLAG
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_SERVER_OPERATION_")]
+ public enum ServerOperationError {
+ OBJECT_NAME_ERROR,
+ INCORRECT_VALUE_ERROR
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_SERVER_OPERATION_STATUS_")]
+ public enum ServerOperationNodeStatus {
+ OPTIONAL,
+ REQUIRED,
+ UNKNOWN
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_SERVER_OPERATION_NODE_")]
+ public enum ServerOperationNodeType {
+ PARAMLIST,
+ DATA_MODEL,
+ PARAM,
+ SEQUENCE,
+ SEQUENCE_ITEM,
+ DATA_MODEL_COLUMN,
+ UNKNOWN
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_SERVER_OPERATION_")]
+ public enum ServerOperationType {
+ CREATE_DB,
+ DROP_DB,
+ CREATE_TABLE,
+ DROP_TABLE,
+ RENAME_TABLE,
+ ADD_COLUMN,
+ DROP_COLUMN,
+ CREATE_INDEX,
+ DROP_INDEX,
+ CREATE_VIEW,
+ DROP_VIEW,
+ COMMENT_TABLE,
+ COMMENT_COLUMN,
+ CREATE_USER,
+ ALTER_USER,
+ DROP_USER,
+ LAST
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_SERVER_PROVIDER_")]
+ public enum ServerProviderError {
+ METHOD_NON_IMPLEMENTED_ERROR,
+ PREPARE_STMT_ERROR,
+ EMPTY_STMT_ERROR,
+ MISSING_PARAM_ERROR,
+ STATEMENT_EXEC_ERROR,
+ OPERATION_ERROR,
+ INTERNAL_ERROR,
+ BUSY_ERROR,
+ NON_SUPPORTED_ERROR,
+ SERVER_VERSION_ERROR,
+ DATA_ERROR,
+ DEFAULT_VALUE_HANDLING_ERROR
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_SET_")]
+ public enum SetError {
+ XML_SPEC_ERROR,
+ HOLDER_NOT_FOUND_ERROR,
+ INVALID_ERROR,
+ READ_ONLY_ERROR
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_SQL_ANY_")]
+ public enum SqlAnyPartType {
+ STMT_SELECT,
+ STMT_INSERT,
+ STMT_UPDATE,
+ STMT_DELETE,
+ STMT_COMPOUND,
+ STMT_BEGIN,
+ STMT_ROLLBACK,
+ STMT_COMMIT,
+ STMT_SAVEPOINT,
+ STMT_ROLLBACK_SAVEPOINT,
+ STMT_DELETE_SAVEPOINT,
+ STMT_UNKNOWN,
+ EXPR,
+ SQL_FIELD,
+ SQL_TABLE,
+ SQL_FUNCTION,
+ SQL_OPERATION,
+ SQL_CASE,
+ SQL_SELECT_FIELD,
+ SQL_SELECT_TARGET,
+ SQL_SELECT_JOIN,
+ SQL_SELECT_FROM,
+ SQL_SELECT_ORDER
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_SQL_BUILDER_")]
+ public enum SqlBuilderError {
+ WRONG_TYPE_ERROR,
+ MISUSE_ERROR
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_SQL_IDENTIFIERS_")]
+ [Flags]
+ public enum SqlIdentifierStyle {
+ LOWER_CASE,
+ UPPER_CASE
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_SQL_OPERATOR_TYPE_")]
+ public enum SqlOperatorType {
+ AND,
+ OR,
+ EQ,
+ IS,
+ LIKE,
+ BETWEEN,
+ GT,
+ LT,
+ GEQ,
+ LEQ,
+ DIFF,
+ REGEXP,
+ REGEXP_CI,
+ NOT_REGEXP,
+ NOT_REGEXP_CI,
+ SIMILAR,
+ ISNULL,
+ ISNOTNULL,
+ NOT,
+ IN,
+ NOTIN,
+ CONCAT,
+ PLUS,
+ MINUS,
+ STAR,
+ DIV,
+ REM,
+ BITAND,
+ BITOR,
+ BITNOT
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_SQL_PARSER_")]
+ public enum SqlParserError {
+ SYNTAX_ERROR,
+ OVERFLOW_ERROR,
+ EMPTY_SQL_ERROR
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_SQL_PARSER_FLAVOUR_")]
+ public enum SqlParserFlavour {
+ STANDARD,
+ SQLITE,
+ MYSQL,
+ ORACLE,
+ POSTGRESQL
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_SQL_PARSER_MODE_")]
+ public enum SqlParserMode {
+ PARSE,
+ DELIMIT
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_SQL_SELECT_JOIN_")]
+ public enum SqlSelectJoinType {
+ CROSS,
+ NATURAL,
+ INNER,
+ LEFT,
+ RIGHT,
+ FULL
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_SQL_STATEMENT_COMPOUND_")]
+ public enum SqlStatementCompoundType {
+ UNION,
+ UNION_ALL,
+ INTERSECT,
+ INTERSECT_ALL,
+ EXCEPT,
+ EXCEPT_ALL
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_SQL_STATEMENT_")]
+ public enum SqlStatementType {
+ SELECT,
+ INSERT,
+ UPDATE,
+ DELETE,
+ COMPOUND,
+ BEGIN,
+ ROLLBACK,
+ COMMIT,
+ SAVEPOINT,
+ ROLLBACK_SAVEPOINT,
+ DELETE_SAVEPOINT,
+ UNKNOWN,
+ NONE
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_STATEMENT_")]
+ public enum StatementError {
+ PARSE_ERROR,
+ SYNTAX_ERROR,
+ NO_CNC_ERROR,
+ CNC_CLOSED_ERROR,
+ EXEC_ERROR,
+ PARAM_TYPE_ERROR,
+ PARAM_ERROR
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_STATEMENT_MODEL_")]
+ [Flags]
+ public enum StatementModelUsage {
+ RANDOM_ACCESS,
+ CURSOR_FORWARD,
+ CURSOR_BACKWARD,
+ CURSOR,
+ ALLOW_NOPARAM
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_STATEMENT_SQL_")]
+ [Flags]
+ public enum StatementSqlFlag {
+ PARAMS_AS_VALUES,
+ PRETTY,
+ PARAMS_LONG,
+ PARAMS_SHORT,
+ PARAMS_AS_COLON,
+ PARAMS_AS_DOLLAR,
+ PARAMS_AS_QMARK,
+ PARAMS_AS_UQMARK
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_THREAD_WRAPPER_UNKNOWN_", has_type_id = false)]
+ public enum ThreadWrapperError {
+ ERROR
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_TRANSACTION_ISOLATION_")]
+ public enum TransactionIsolation {
+ UNKNOWN,
+ READ_COMMITTED,
+ READ_UNCOMMITTED,
+ REPEATABLE_READ,
+ SERIALIZABLE
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_TRANSACTION_STATUS_EVENT_")]
+ public enum TransactionStatusEventType {
+ SAVEPOINT,
+ SQL,
+ SUB_TRANSACTION
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_TRANSACTION_STATUS_STATE_")]
+ public enum TransactionStatusState {
+ OK,
+ FAILED
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_TREE_UNKNOWN_")]
+ public enum TreeError {
+ ERROR
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_TREE_MANAGER_UNKNOWN_")]
+ public enum TreeManagerError {
+ ERROR
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_TREE_NODE_UNKNOWN_")]
+ public enum TreeNodeError {
+ ERROR
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_VALUE_ATTR_")]
+ [Flags]
+ public enum ValueAttribute {
+ NONE,
+ IS_NULL,
+ CAN_BE_NULL,
+ IS_DEFAULT,
+ CAN_BE_DEFAULT,
+ IS_UNCHANGED,
+ ACTIONS_SHOWN,
+ DATA_NON_VALID,
+ HAS_VALUE_ORIG,
+ NO_MODIF,
+ UNUSED
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_XA_TRANSACTION_")]
+ public enum XaTransactionError {
+ ALREADY_REGISTERED_ERROR,
+ DTP_NOT_SUPPORTED_ERROR,
+ CONNECTION_BRANCH_LENGTH_ERROR
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public errordomain SqlError {
+ STRUCTURE_CONTENTS_ERROR,
+ MALFORMED_IDENTIFIER_ERROR,
+ MISSING_IDENTIFIER_ERROR,
+ VALIDATION_ERROR
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public delegate void AttributesManagerFunc (string att_name, GLib.Value value);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public delegate void AttributesManagerSignal (GLib.Object obj, string att_name, GLib.Value value);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public delegate void ServerProviderAsyncCallback (Gda.ServerProvider provider, Gda.Connection cnc, uint task_id, bool result_status, GLib.Error error);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public delegate void ServerProviderExecCallback (Gda.ServerProvider provider, Gda.Connection cnc, uint task_id, GLib.Object result_obj, GLib.Error error);
+ [CCode (cheader_filename = "libgda/libgda.h", has_target = false)]
+ public delegate bool SqlForeachFunc (Gda.SqlAnyPart p1, void* p2) throws GLib.Error;
+ [CCode (cheader_filename = "libgda/libgda.h", has_target = false)]
+ public delegate unowned string SqlRenderingExpr (Gda.SqlExpr expr, Gda.SqlRenderingContext context, bool is_default, bool is_null) throws GLib.Error;
+ [CCode (cheader_filename = "libgda/libgda.h", has_target = false)]
+ public delegate unowned string SqlRenderingFunc (Gda.SqlAnyPart node, Gda.SqlRenderingContext context) throws GLib.Error;
+ [CCode (cheader_filename = "libgda/libgda.h", has_target = false)]
+ public delegate unowned string SqlRenderingPSpecFunc (Gda.SqlParamSpec pspec, Gda.SqlExpr expr, Gda.SqlRenderingContext context, bool is_default, bool is_null) throws GLib.Error;
+ [CCode (cheader_filename = "libgda/libgda.h", has_target = false)]
+ public delegate unowned string SqlRenderingValue (GLib.Value value, Gda.SqlRenderingContext context) throws GLib.Error;
+ [CCode (cheader_filename = "libgda/libgda.h", has_target = false)]
+ public delegate bool SqlReservedKeywordsFunc (string word);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public delegate void ThreadWrapperCallback (Gda.ThreadWrapper wrapper, void* instance, string signame, int n_param_values, GLib.Value param_values, void* gda_reserved);
+ [CCode (cheader_filename = "libgda/libgda.h", has_target = false)]
+ public delegate void* ThreadWrapperFunc (void* arg) throws GLib.Error;
+ [CCode (cheader_filename = "libgda/libgda.h", has_target = false)]
+ public delegate void ThreadWrapperVoidFunc (void* arg) throws GLib.Error;
+ [CCode (cheader_filename = "libgda/libgda.h", has_target = false)]
+ public delegate unowned Gda.TreeNode TreeManagerNodeFunc (Gda.TreeManager manager, Gda.TreeNode parent, string name);
+ [CCode (cheader_filename = "libgda/libgda.h", has_target = false)]
+ public delegate unowned GLib.SList TreeManagerNodesFunc (Gda.TreeManager manager, Gda.TreeNode node, GLib.SList children_nodes, bool out_error) throws GLib.Error;
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public delegate void VConnectionHubFunc (Gda.Connection cnc, string ns);
+ [CCode (cheader_filename = "libgda/libgda.h", has_target = false)]
+ public delegate unowned GLib.List VconnectionDataModelCreateColumnsFunc (Gda.VconnectionDataModelSpec p1) throws GLib.Error;
+ [CCode (cheader_filename = "libgda/libgda.h", has_target = false)]
+ public delegate unowned Gda.DataModel VconnectionDataModelCreateFModelFunc (Gda.VconnectionDataModelSpec p1, int p2, string p3, int p4, out GLib.Value p5);
+ [CCode (cheader_filename = "libgda/libgda.h", has_target = false)]
+ public delegate unowned Gda.DataModel VconnectionDataModelCreateModelFunc (Gda.VconnectionDataModelSpec p1);
+ [CCode (cheader_filename = "libgda/libgda.h", has_target = false)]
+ public delegate void VconnectionDataModelFunc (Gda.DataModel p1, string p2, void* p3);
+ [CCode (cheader_filename = "libgda/libgda.h", has_target = false)]
+ public delegate void VconnectionDataModelParseFilterFunc (Gda.VconnectionDataModelSpec p1, Gda.VconnectionDataModelFilter p2);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public const string ATTRIBUTE_AUTO_INCREMENT;
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public const string ATTRIBUTE_DESCRIPTION;
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public const string ATTRIBUTE_IS_DEFAULT;
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public const string ATTRIBUTE_NAME;
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public const string ATTRIBUTE_NUMERIC_PRECISION;
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public const string ATTRIBUTE_NUMERIC_SCALE;
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public const string EXTRA_AUTO_INCREMENT;
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public const string SQLSTATE_GENERAL_ERROR;
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public const string SQLSTATE_NO_ERROR;
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public const int TIMEZONE_INVALID;
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public const int TYPE_NULL;
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static unowned string alphanum_to_text (string text);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static unowned string completion_list_get (Gda.Connection cnc, string sql, int start, int end);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static bool compute_dml_statements (Gda.Connection cnc, Gda.Statement select_stmt, bool require_pk, out unowned Gda.Statement insert_stmt, out unowned Gda.Statement update_stmt, out unowned Gda.Statement delete_stmt) throws GLib.Error;
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static unowned Gda.SqlStatement compute_select_statement_from_update (Gda.Statement update_stmt) throws GLib.Error;
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static unowned Gda.SqlExpr compute_unique_table_row_condition (Gda.SqlStatementSelect stsel, Gda.MetaTable mtable, bool require_pk) throws GLib.Error;
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static unowned Gda.SqlExpr compute_unique_table_row_condition_with_cnc (Gda.Connection cnc, Gda.SqlStatementSelect stsel, Gda.MetaTable mtable, bool require_pk) throws GLib.Error;
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static unowned string default_escape_string (string str);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static unowned string default_unescape_string (string str);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static bool delete_row_from_table (Gda.Connection cnc, string table, string condition_column_name, GLib.Value condition_value) throws GLib.Error;
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static void dsn_split (string str, string out_dsn, string out_username, string out_password);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static GLib.Quark easy_error_quark ();
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static int execute_non_select_command (Gda.Connection cnc, string sql) throws GLib.Error;
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static unowned Gda.DataModel execute_select_command (Gda.Connection cnc, string sql) throws GLib.Error;
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static GLib.Type g_type_from_string (string str);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static unowned string g_type_to_string (GLib.Type type);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static unowned string gbr_get_file_path (Gda.PrefixDir where);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static void gbr_init ();
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static unowned string get_application_exec_path (string app_name);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static unowned Gda.DataHandler get_default_handler (GLib.Type for_type);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static bool identifier_equal (string id1, string id2);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static uint identifier_hash (string id);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static void init ();
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static bool insert_row_into_table (Gda.Connection cnc, string table) throws GLib.Error;
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static bool insert_row_into_table_v (Gda.Connection cnc, string table, GLib.SList col_names, GLib.SList values) throws GLib.Error;
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static void locale_changed ();
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static void log_disable ();
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static void log_enable ();
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static void log_error (string format);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static bool log_is_enabled ();
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static void log_message (string format);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static bool parse_iso8601_date (GLib.Date gdate, string value);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static bool parse_iso8601_time (Gda.Time timegda, string value);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static bool parse_iso8601_timestamp (Gda.Timestamp timestamp, string value);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static unowned Gda.Statement parse_sql_string (Gda.Connection cnc, string sql, out unowned Gda.Set @params) throws GLib.Error;
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static bool perform_create_database (string provider, Gda.ServerOperation op) throws GLib.Error;
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static bool perform_create_table (Gda.ServerOperation op) throws GLib.Error;
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static bool perform_drop_database (string provider, Gda.ServerOperation op) throws GLib.Error;
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static bool perform_drop_table (Gda.ServerOperation op) throws GLib.Error;
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static unowned Gda.ServerOperation prepare_create_database (string provider, string db_name) throws GLib.Error;
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static unowned Gda.ServerOperation prepare_create_table (Gda.Connection cnc, string table_name) throws GLib.Error;
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static unowned Gda.ServerOperation prepare_drop_database (string provider, string db_name) throws GLib.Error;
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static unowned Gda.ServerOperation prepare_drop_table (Gda.Connection cnc, string table_name) throws GLib.Error;
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static bool rfc1738_decode (string str);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static unowned string rfc1738_encode (string str);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static unowned Gda.Statement select_alter_select_for_empty (Gda.Statement stmt) throws GLib.Error;
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static GLib.Type short_get_type ();
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static GLib.Quark sql_error_quark ();
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static unowned string sql_identifier_add_quotes (string str);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static bool sql_identifier_needs_quotes (string str);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static unowned string sql_identifier_quote (string id, Gda.Connection cnc, Gda.ServerProvider prov, bool meta_store_convention, bool force_quotes);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static unowned string sql_identifier_remove_quotes (string str);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static unowned string sql_identifier_split (string id);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static unowned string sql_value_stringify (GLib.Value value);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static unowned Gda.Binary string_to_binary (string str);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static unowned Gda.Blob string_to_blob (string str);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static unowned string text_to_alphanum (string text);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static bool update_row_in_table (Gda.Connection cnc, string table, string condition_column_name, GLib.Value condition_value) throws GLib.Error;
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static bool update_row_in_table_v (Gda.Connection cnc, string table, string condition_column_name, GLib.Value condition_value, GLib.SList col_names, GLib.SList values) throws GLib.Error;
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static GLib.Type ushort_get_type ();
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static bool utility_check_data_model (Gda.DataModel model, int nbcols);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static bool utility_data_model_dump_data_to_xml (Gda.DataModel model, Xml.Node parent, int cols, int nb_cols, int rows, int nb_rows, bool use_col_ids);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static unowned string utility_data_model_find_column_description (Gda.DataSelect model, string field_name);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static bool utility_holder_load_attributes (Gda.Holder holder, Xml.Node node, GLib.SList sources) throws GLib.Error;
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static int value_compare (GLib.Value value1, GLib.Value value2);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static GLib.Value value_copy (GLib.Value value);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static int value_differ (GLib.Value value1, GLib.Value value2);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static void value_free (GLib.Value value);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static unowned Gda.Binary value_get_binary (GLib.Value value);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static unowned Gda.Blob value_get_blob (GLib.Value value);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static unowned Gda.GeometricPoint value_get_geometric_point (GLib.Value value);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static unowned Gda.ValueList value_get_list (GLib.Value value);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static unowned Gda.Numeric value_get_numeric (GLib.Value value);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static short value_get_short (GLib.Value value);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static unowned Gda.Time value_get_time (GLib.Value value);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static unowned Gda.Timestamp value_get_timestamp (GLib.Value value);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static ushort value_get_ushort (GLib.Value value);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static bool value_is_null (GLib.Value value);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static bool value_is_number (GLib.Value value);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static GLib.Value value_new (GLib.Type type);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static GLib.Value value_new_binary (uchar[] val, long size);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static GLib.Value value_new_blob (uchar[] val, long size);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static GLib.Value value_new_blob_from_file (string filename);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static GLib.Value value_new_from_string (string as_string, GLib.Type type);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static GLib.Value value_new_from_xml (Xml.Node node);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static GLib.Value value_new_timestamp_from_timet (ulong val);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static void value_reset_with_type (GLib.Value value, GLib.Type type);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static void value_set_binary (GLib.Value value, Gda.Binary binary);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static void value_set_blob (GLib.Value value, Gda.Blob blob);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static bool value_set_from_string (GLib.Value value, string as_string, GLib.Type type);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static bool value_set_from_value (GLib.Value value, GLib.Value from);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static void value_set_geometric_point (GLib.Value value, Gda.GeometricPoint val);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static void value_set_list (GLib.Value value, Gda.ValueList val);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static void value_set_null (GLib.Value value);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static void value_set_numeric (GLib.Value value, Gda.Numeric val);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static void value_set_short (GLib.Value value, short val);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static void value_set_time (GLib.Value value, Gda.Time val);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static void value_set_timestamp (GLib.Value value, Gda.Timestamp val);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static void value_set_ushort (GLib.Value value, ushort val);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static unowned string value_stringify (GLib.Value value);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static void value_take_binary (GLib.Value value, Gda.Binary binary);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static void value_take_blob (GLib.Value value, Gda.Blob blob);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static unowned Xml.Node value_to_xml (GLib.Value value);
+}
--- /dev/null
+libxml-2.0
--- /dev/null
+/* libgda-5.0.vapi generated by vapigen-0.16, do not modify. */
+
+[CCode (cprefix = "Gda", gir_namespace = "Gda", gir_version = "5.0", lower_case_cprefix = "gda_")]
+namespace Gda {
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ [Compact]
+ public class AttributesManager {
+ public void clear (void* ptr);
+ public void copy (void* from, Gda.AttributesManager to_mgr, void* to);
+ public void free ();
+ public GLib.Value @get (void* ptr, string att_name);
+ public void @set (void* ptr, string att_name, GLib.Value value);
+ public void set_full (void* ptr, string att_name, GLib.Value value, GLib.DestroyNotify destroy);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", type_id = "gda_batch_get_type ()")]
+ public class Batch : GLib.Object {
+ [CCode (has_construct_function = false)]
+ public Batch ();
+ public void add_statement (Gda.Statement stmt);
+ public Gda.Batch copy ();
+ public static GLib.Quark error_quark ();
+ public bool get_parameters (out Gda.Set out_params) throws GLib.Error;
+ public unowned GLib.SList<Gda.Statement> get_statements ();
+ public void remove_statement (Gda.Statement stmt);
+ public string serialize ();
+ public virtual signal void changed (GLib.Object changed_stmt);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "gda_binary_get_type ()")]
+ [Compact]
+ public class Binary {
+ public long binary_length;
+ public uint8 data;
+ public static void* copy (void* boxed);
+ public static void free (owned void* boxed);
+ public string to_string (uint maxlen);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "gda_blob_get_type ()")]
+ [Compact]
+ public class Blob {
+ public weak Gda.Binary data;
+ public weak Gda.BlobOp op;
+ public static void* copy (void* boxed);
+ public static void free (owned void* boxed);
+ public void set_op (Gda.BlobOp? op);
+ public string to_string (uint maxlen);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", type_id = "gda_blob_op_get_type ()")]
+ public abstract class BlobOp : GLib.Object {
+ public void* _gda_reserved1;
+ [CCode (has_construct_function = false)]
+ protected BlobOp ();
+ public virtual long get_length ();
+ public virtual long read (Gda.Blob blob, long offset, long size);
+ public bool read_all (Gda.Blob blob);
+ public virtual long write (Gda.Blob blob, long offset);
+ public virtual bool write_all (Gda.Blob blob);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", type_id = "gda_column_get_type ()")]
+ public class Column : GLib.Object {
+ [CCode (has_construct_function = false)]
+ public Column ();
+ public Gda.Column copy ();
+ public bool get_allow_null ();
+ public GLib.Value get_attribute (string attribute);
+ public bool get_auto_increment ();
+ public unowned string get_dbms_type ();
+ public GLib.Value get_default_value ();
+ public unowned string get_description ();
+ public GLib.Type get_g_type ();
+ public unowned string get_name ();
+ public int get_position ();
+ public void set_allow_null (bool allow);
+ public void set_attribute (string attribute, GLib.Value? value, GLib.DestroyNotify? destroy);
+ public void set_auto_increment (bool is_auto);
+ public void set_dbms_type (string dbms_type);
+ public void set_default_value (GLib.Value? default_value);
+ public void set_description (string title);
+ public void set_g_type (GLib.Type type);
+ public void set_name (string name);
+ public void set_position (int position);
+ [NoAccessorMethod]
+ public string id { owned get; set; }
+ public virtual signal void g_type_changed (GLib.Type old_type, GLib.Type new_type);
+ public virtual signal void name_changed (string old_name);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", type_id = "gda_config_get_type ()")]
+ public class Config : GLib.Object {
+ [CCode (has_construct_function = false)]
+ protected Config ();
+ public static bool can_modify_system_config ();
+ public static bool define_dsn (Gda.DsnInfo info) throws GLib.Error;
+ public static bool dsn_needs_authentication (string dsn_name);
+ public static GLib.Quark error_quark ();
+ public static Gda.Config @get ();
+ public static Gda.DsnInfo get_dsn_info (string dsn_name);
+ public static Gda.DsnInfo get_dsn_info_at_index (int index);
+ public static int get_dsn_info_index (string dsn_name);
+ public static int get_nb_dsn ();
+ public static unowned Gda.ServerProvider get_provider (string provider_name) throws GLib.Error;
+ public static Gda.ProviderInfo get_provider_info (string provider_name);
+ public static Gda.DataModel list_dsn ();
+ public static Gda.DataModel list_providers ();
+ public static bool remove_dsn (string dsn_name) throws GLib.Error;
+ [NoAccessorMethod]
+ public string system_filename { owned get; set; }
+ [NoAccessorMethod]
+ public string user_filename { owned get; set; }
+ public virtual signal void dsn_added (void* new_dsn);
+ public virtual signal void dsn_changed (void* dsn);
+ public virtual signal void dsn_removed (void* old_dsn);
+ public virtual signal void dsn_to_be_removed (void* old_dsn);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", type_id = "gda_connection_get_type ()")]
+ public class Connection : GLib.Object, Gda.Lockable {
+ [CCode (has_construct_function = false)]
+ protected Connection ();
+ public void add_event (owned Gda.ConnectionEvent event);
+ public void add_prepared_statement (Gda.Statement gda_stmt, Gda.PStmt prepared_stmt);
+ public bool add_savepoint (string? name) throws GLib.Error;
+ public bool async_cancel (uint task_id) throws GLib.Error;
+ public GLib.Object async_fetch_result (uint task_id, out Gda.Set last_insert_row) throws GLib.Error;
+ public uint async_statement_execute (Gda.Statement stmt, Gda.Set? @params, Gda.StatementModelUsage model_usage, [CCode (array_length = false)] GLib.Type[]? col_types, bool need_last_insert_row) throws GLib.Error;
+ public GLib.SList<GLib.Object> batch_execute (Gda.Batch batch, Gda.Set? @params, Gda.StatementModelUsage model_usage) throws GLib.Error;
+ public bool begin_transaction (string? name, Gda.TransactionIsolation level) throws GLib.Error;
+ public void clear_events_list ();
+ public void close ();
+ public void close_no_warning ();
+ public bool commit_transaction (string? name) throws GLib.Error;
+ public Gda.ServerOperation create_operation (Gda.ServerOperationType type, Gda.Set? options) throws GLib.Error;
+ public Gda.SqlParser create_parser ();
+ public void del_prepared_statement (Gda.Statement gda_stmt);
+ public bool delete_row_from_table (string table, string condition_column_name, GLib.Value condition_value) throws GLib.Error;
+ public bool delete_savepoint (string? name) throws GLib.Error;
+ public static GLib.Quark error_quark ();
+ public int execute_non_select_command (string sql) throws GLib.Error;
+ public Gda.DataModel execute_select_command (string sql) throws GLib.Error;
+ [CCode (has_construct_function = false)]
+ public Connection.from_dsn (string dsn, string? auth_string, Gda.ConnectionOptions options) throws GLib.Error;
+ [CCode (has_construct_function = false)]
+ public Connection.from_string (string? provider_name, string cnc_string, string? auth_string, Gda.ConnectionOptions options) throws GLib.Error;
+ public unowned string get_authentication ();
+ public unowned string get_cnc_string ();
+ public unowned string get_dsn ();
+ public unowned GLib.List<Gda.ConnectionEvent> get_events ();
+ public unowned Gda.MetaStore get_meta_store ();
+ public Gda.DataModel get_meta_store_data_v (Gda.ConnectionMetaType meta_type, GLib.List<Gda.Holder> filters) throws GLib.Error;
+ public Gda.ConnectionOptions get_options ();
+ public unowned Gda.PStmt get_prepared_statement (Gda.Statement gda_stmt);
+ public unowned Gda.ServerProvider get_provider ();
+ public unowned string get_provider_name ();
+ public unowned Gda.TransactionStatus get_transaction_status ();
+ public bool insert_row_into_table_v (string table, GLib.SList<string> col_names, GLib.SList<GLib.Value?> values) throws GLib.Error;
+ public bool is_opened ();
+ public bool open () throws GLib.Error;
+ public static Gda.Connection open_from_dsn (string dsn, string? auth_string, Gda.ConnectionOptions options) throws GLib.Error;
+ public static Gda.Connection open_from_string (string? provider_name, string cnc_string, string? auth_string, Gda.ConnectionOptions options) throws ConnectionError, ConfigError;
+ public static Gda.Connection open_sqlite (string? directory, string filename, bool auto_unlink);
+ public Gda.Statement parse_sql_string (string sql, out Gda.Set @params) throws GLib.Error;
+ public bool perform_operation (Gda.ServerOperation op) throws GLib.Error;
+ public Gda.ConnectionEvent point_available_event (Gda.ConnectionEventType type);
+ public string quote_sql_identifier (string id);
+ public GLib.SList<GLib.Object> repetitive_statement_execute (Gda.RepetitiveStatement rstmt, Gda.StatementModelUsage model_usage, [CCode (array_length = false)] GLib.Type[]? col_types, bool stop_on_error) throws GLib.Error;
+ public bool rollback_savepoint (string? name) throws GLib.Error;
+ public bool rollback_transaction (string? name) throws GLib.Error;
+ public GLib.Object statement_execute (Gda.Statement stmt, Gda.Set? @params, Gda.StatementModelUsage model_usage, out Gda.Set last_insert_row) throws GLib.Error;
+ public int statement_execute_non_select (Gda.Statement stmt, Gda.Set? @params, out Gda.Set last_insert_row) throws GLib.Error;
+ public Gda.DataModel statement_execute_select (Gda.Statement stmt, Gda.Set? @params) throws GLib.Error;
+ public Gda.DataModel statement_execute_select_full (Gda.Statement stmt, Gda.Set? @params, Gda.StatementModelUsage model_usage, [CCode (array_length = false)] GLib.Type[]? col_types) throws GLib.Error;
+ public bool statement_prepare (Gda.Statement stmt) throws GLib.Error;
+ public string statement_to_sql (Gda.Statement stmt, Gda.Set? @params, Gda.StatementSqlFlag flags, out GLib.SList<weak Gda.Holder> params_used) throws GLib.Error;
+ public static void string_split (string string, string out_cnc_params, string out_provider, string out_username, string out_password);
+ public bool supports_feature (Gda.ConnectionFeature feature);
+ public bool update_meta_store (Gda.MetaContext? context) throws GLib.Error;
+ public bool update_row_in_table_v (string table, string condition_column_name, GLib.Value condition_value, GLib.SList<string> col_names, GLib.SList<GLib.Value?> values) throws GLib.Error;
+ public string value_to_sql_string (GLib.Value from);
+ [NoAccessorMethod]
+ public string auth_string { owned get; set; }
+ [NoAccessorMethod]
+ public string cnc_string { owned get; set; }
+ [NoAccessorMethod]
+ public string dsn { owned get; set; }
+ [NoAccessorMethod]
+ public int events_history_size { get; set; }
+ [NoAccessorMethod]
+ public bool execution_timer { get; set; }
+ [NoAccessorMethod]
+ public bool is_wrapper { get; construct; }
+ [NoAccessorMethod]
+ public Gda.MetaStore meta_store { owned get; set; }
+ [NoAccessorMethod]
+ public bool monitor_wrapped_in_mainloop { get; set; }
+ [NoAccessorMethod]
+ public Gda.ServerProvider provider { owned get; set; }
+ [NoAccessorMethod]
+ public void* thread_owner { get; set; }
+ public virtual signal void conn_closed ();
+ public virtual signal void conn_opened ();
+ public virtual signal void conn_to_close ();
+ public virtual signal void dsn_changed ();
+ public virtual signal void error (Gda.ConnectionEvent error);
+ public virtual signal void transaction_status_changed ();
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", type_id = "gda_connection_event_get_type ()")]
+ public class ConnectionEvent : GLib.Object {
+ [CCode (has_construct_function = false)]
+ protected ConnectionEvent ();
+ public long get_code ();
+ public unowned string get_description ();
+ public Gda.ConnectionEventType get_event_type ();
+ public Gda.ConnectionEventCode get_gda_code ();
+ public unowned string get_source ();
+ public unowned string get_sqlstate ();
+ public void set_code (long code);
+ public void set_description (string description);
+ public void set_event_type (Gda.ConnectionEventType type);
+ public void set_gda_code (Gda.ConnectionEventCode code);
+ public void set_source (string source);
+ public void set_sqlstate (string sqlstate);
+ [NoAccessorMethod]
+ public int type { get; set; }
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", type_id = "gda_data_access_wrapper_get_type ()")]
+ public class DataAccessWrapper : GLib.Object, Gda.DataModel {
+ [CCode (has_construct_function = false)]
+ protected DataAccessWrapper ();
+ public static Gda.DataModel @new (Gda.DataModel model);
+ public bool set_mapping ([CCode (array_length_cname = "mapping_size", array_length_pos = 1.1)] int[]? mapping);
+ [NoAccessorMethod]
+ public Gda.DataModel model { owned get; construct; }
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", type_id = "gda_data_comparator_get_type ()")]
+ public class DataComparator : GLib.Object {
+ [CCode (has_construct_function = false, type = "GObject*")]
+ public DataComparator (Gda.DataModel old_model, Gda.DataModel new_model);
+ public bool compute_diff () throws GLib.Error;
+ public static GLib.Quark error_quark ();
+ public Gda.Diff get_diff (int pos);
+ public int get_n_diffs ();
+ public void set_key_columns ([CCode (array_length_cname = "nb_cols", array_length_pos = 1.1)] int[] col_numbers);
+ [NoAccessorMethod]
+ public Gda.DataModel new_model { owned get; set; }
+ [NoAccessorMethod]
+ public Gda.DataModel old_model { owned get; set; }
+ public virtual signal bool diff_computed (void* diff);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", type_id = "gda_data_model_array_get_type ()")]
+ public class DataModelArray : GLib.Object, Gda.DataModel {
+ [CCode (has_construct_function = false)]
+ protected DataModelArray ();
+ public void clear ();
+ public unowned Gda.Row get_row (int row) throws GLib.Error;
+ public static Gda.DataModel @new (int cols);
+ public static Gda.DataModel new_with_g_types_v (int cols, [CCode (array_length = false)] GLib.Type[] types);
+ public void set_n_columns (int cols);
+ [NoAccessorMethod]
+ public uint n_columns { get; set; }
+ [NoAccessorMethod]
+ public bool read_only { get; set; }
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", type_id = "gda_data_model_dir_get_type ()")]
+ public class DataModelDir : GLib.Object, Gda.DataModel {
+ [CCode (has_construct_function = false)]
+ protected DataModelDir ();
+ public void clean_errors ();
+ public static Gda.DataModel @new (string basedir);
+ [NoAccessorMethod]
+ public string basedir { owned get; construct; }
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", type_id = "gda_data_model_dsn_list_get_type ()")]
+ public class DataModelDsnList : GLib.Object, Gda.DataModel {
+ [CCode (has_construct_function = false)]
+ protected DataModelDsnList ();
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", type_id = "gda_data_model_import_get_type ()")]
+ public class DataModelImport : GLib.Object, Gda.DataModel {
+ [CCode (has_construct_function = false)]
+ protected DataModelImport ();
+ public void clean_errors ();
+ public static Gda.DataModel new_file (string filename, bool random_access, Gda.Set? options);
+ public static Gda.DataModel new_mem (string data, bool random_access, Gda.Set? options);
+ public static Gda.DataModel new_xml_node ([CCode (type = "xmlNodePtr")] Xml.Node* node);
+ [NoAccessorMethod]
+ public string data_string { owned get; construct; }
+ [NoAccessorMethod]
+ public string filename { owned get; construct; }
+ [NoAccessorMethod]
+ public Gda.Set options { owned get; construct; }
+ [NoAccessorMethod]
+ public bool random_access { get; construct; }
+ [NoAccessorMethod]
+ public bool strict { get; set construct; }
+ [NoAccessorMethod]
+ public void* xml_node { get; construct; }
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", type_id = "gda_data_model_iter_get_type ()")]
+ public class DataModelIter : Gda.Set {
+ [CCode (has_construct_function = false)]
+ protected DataModelIter ();
+ public static GLib.Quark error_quark ();
+ public unowned Gda.Holder get_holder_for_field (int col);
+ public int get_row ();
+ public unowned GLib.Value? get_value_at (int col);
+ public unowned GLib.Value? get_value_at_e (int col) throws GLib.Error;
+ public unowned GLib.Value? get_value_for_field (string field_name);
+ public void invalidate_contents ();
+ public bool is_valid ();
+ public bool move_next ();
+ public bool move_prev ();
+ public bool move_to_row (int row);
+ public bool set_value_at (int col, GLib.Value value) throws GLib.Error;
+ [NoAccessorMethod]
+ public int current_row { get; set; }
+ [NoAccessorMethod]
+ public Gda.DataModel data_model { owned get; set construct; }
+ [NoAccessorMethod]
+ public Gda.DataModel forced_model { owned get; set; }
+ [NoAccessorMethod]
+ public bool update_model { get; set; }
+ public virtual signal void end_of_data ();
+ public virtual signal void row_changed (int row);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", type_id = "gda_data_model_ldap_get_type ()")]
+ public class DataModelLdap : GLib.Object, Gda.DataModel {
+ [CCode (has_construct_function = false)]
+ protected DataModelLdap ();
+ public static GLib.List<Gda.Column> compute_columns (Gda.Connection cnc, string? attributes);
+ [Deprecated (since = "5.2")]
+ public static Gda.DataModel @new (Gda.Connection cnc, string? base_dn, string? filter, string? attributes, Gda.LdapSearchScope scope);
+ [CCode (has_construct_function = false)]
+ public DataModelLdap.with_config (Gda.Connection cnc, string? base_dn, string? filter, string? attributes, Gda.LdapSearchScope scope);
+ public string attributes { construct; }
+ [NoAccessorMethod]
+ public string @base { owned get; construct; }
+ [NoAccessorMethod]
+ public string filter { owned get; construct; }
+ [NoAccessorMethod]
+ public int scope { get; construct; }
+ [NoAccessorMethod]
+ public bool use_rdn { get; set; }
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", type_id = "gda_data_pivot_get_type ()")]
+ public class DataPivot : GLib.Object, Gda.DataModel {
+ [CCode (has_construct_function = false)]
+ protected DataPivot ();
+ public bool add_data (Gda.DataPivotAggregate aggregate_type, string field, string? alias) throws GLib.Error;
+ public bool add_field (Gda.DataPivotFieldType field_type, string field, string? alias) throws GLib.Error;
+ public static GLib.Quark error_quark ();
+ public static Gda.DataModel @new (Gda.DataModel? model);
+ public bool populate () throws GLib.Error;
+ [NoAccessorMethod]
+ public Gda.DataModel model { owned get; set; }
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", type_id = "gda_data_proxy_get_type ()")]
+ public class DataProxy : GLib.Object, Gda.DataModel {
+ [CCode (has_construct_function = false, type = "GObject*")]
+ public DataProxy (Gda.DataModel model);
+ public void alter_value_attributes (int proxy_row, int col, Gda.ValueAttribute alter_flags);
+ public bool apply_all_changes () throws GLib.Error;
+ public bool apply_row_changes (int proxy_row) throws GLib.Error;
+ public bool cancel_all_changes ();
+ public void cancel_row_changes (int proxy_row, int col);
+ public void @delete (int proxy_row);
+ public static GLib.Quark error_quark ();
+ public unowned string get_filter_expr ();
+ public int get_filtered_n_rows ();
+ public int get_n_modified_rows ();
+ public int get_n_new_rows ();
+ public unowned Gda.DataModel get_proxied_model ();
+ public int get_proxied_model_n_cols ();
+ public int get_proxied_model_n_rows ();
+ public int get_proxied_model_row (int proxy_row);
+ public int get_sample_end ();
+ public int get_sample_size ();
+ public int get_sample_start ();
+ public Gda.ValueAttribute get_value_attributes (int proxy_row, int col);
+ public GLib.SList<weak GLib.Value?> get_values (int proxy_row, [CCode (array_length = false)] int[] cols_index, int n_cols);
+ public bool has_changed ();
+ public bool is_read_only ();
+ public bool row_has_changed (int proxy_row);
+ public bool row_is_deleted (int proxy_row);
+ public bool row_is_inserted (int proxy_row);
+ public bool set_filter_expr (string? filter_expr) throws GLib.Error;
+ public bool set_ordering_column (int col) throws GLib.Error;
+ public void set_sample_size (int sample_size);
+ public void set_sample_start (int sample_start);
+ public void undelete (int proxy_row);
+ [CCode (has_construct_function = false)]
+ public DataProxy.with_data_model (Gda.DataModel model);
+ [NoAccessorMethod]
+ public bool defer_sync { get; set; }
+ [NoAccessorMethod]
+ public Gda.DataModel model { owned get; set construct; }
+ [NoAccessorMethod]
+ public bool prepend_null_entry { get; set; }
+ public int sample_size { get; set construct; }
+ public virtual signal void filter_changed ();
+ public virtual signal void row_changes_applied (int row, int proxied_row);
+ public virtual signal void row_delete_changed (int row, bool to_be_deleted);
+ public virtual signal void sample_changed (int sample_start, int sample_end);
+ public virtual signal void sample_size_changed (int sample_size);
+ public virtual signal GLib.Error validate_row_changes (int row, int proxied_row);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", type_id = "gda_data_select_get_type ()")]
+ public abstract class DataSelect : GLib.Object, Gda.DataModel {
+ public int advertized_nrows;
+ public int nb_stored_rows;
+ public weak Gda.PStmt prep_stmt;
+ [CCode (has_construct_function = false)]
+ protected DataSelect ();
+ public bool compute_columns_attributes () throws GLib.Error;
+ public bool compute_modification_statements () throws GLib.Error;
+ public bool compute_modification_statements_ext (Gda.DataSelectConditionType cond_type) throws GLib.Error;
+ public bool compute_row_selection_condition () throws GLib.Error;
+ public static GLib.Quark error_quark ();
+ [NoWrapper]
+ public virtual bool fetch_at (Gda.Row prow, int rownum) throws GLib.Error;
+ [NoWrapper]
+ public virtual int fetch_nb_rows ();
+ [NoWrapper]
+ public virtual bool fetch_next (Gda.Row prow, int rownum) throws GLib.Error;
+ [NoWrapper]
+ public virtual bool fetch_prev (Gda.Row prow, int rownum) throws GLib.Error;
+ [NoWrapper]
+ public virtual bool fetch_random (Gda.Row prow, int rownum) throws GLib.Error;
+ public unowned Gda.Connection get_connection ();
+ public bool rerun () throws GLib.Error;
+ public bool set_modification_statement (Gda.Statement mod_stmt) throws GLib.Error;
+ public bool set_modification_statement_sql (string sql) throws GLib.Error;
+ public bool set_row_selection_condition_sql (string sql_where) throws GLib.Error;
+ [NoWrapper]
+ public virtual bool store_all () throws GLib.Error;
+ [NoAccessorMethod]
+ public bool auto_reset { get; set; }
+ public Gda.Connection connection { get; construct; }
+ [NoAccessorMethod]
+ public Gda.Statement delete_stmt { owned get; set; }
+ [NoAccessorMethod]
+ public Gda.Set exec_params { owned get; construct; }
+ [NoAccessorMethod]
+ public double execution_delay { get; set; }
+ [NoAccessorMethod]
+ public Gda.Statement insert_stmt { owned get; set; }
+ [NoAccessorMethod]
+ public uint model_usage { get; construct; }
+ [NoAccessorMethod]
+ public Gda.PStmt prepared_stmt { owned get; set; }
+ [NoAccessorMethod]
+ public Gda.Statement select_stmt { owned get; }
+ [NoAccessorMethod]
+ public bool store_all_rows { get; set; }
+ [NoAccessorMethod]
+ public Gda.Statement update_stmt { owned get; set; }
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "gda_default_get_type ()")]
+ [Compact]
+ public class Default {
+ public static string escape_string (string string);
+ public static string unescape_string (string string);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", lower_case_csuffix = "geometricpoint", type_id = "gda_geometricpoint_get_type ()")]
+ [Compact]
+ public class GeometricPoint {
+ public double x;
+ public double y;
+ public static void* copy (void* boxed);
+ public static void free (void* boxed);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", type_id = "gda_handler_bin_get_type ()")]
+ public class HandlerBin : GLib.Object, Gda.DataHandler {
+ [CCode (has_construct_function = false)]
+ protected HandlerBin ();
+ public static Gda.DataHandler @new ();
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ [Compact]
+ public class HandlerBinPriv {
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", type_id = "gda_handler_boolean_get_type ()")]
+ public class HandlerBoolean : GLib.Object, Gda.DataHandler {
+ [CCode (has_construct_function = false)]
+ protected HandlerBoolean ();
+ public static Gda.DataHandler @new ();
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ [Compact]
+ public class HandlerBooleanPriv {
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", type_id = "gda_handler_numerical_get_type ()")]
+ public class HandlerNumerical : GLib.Object, Gda.DataHandler {
+ [CCode (has_construct_function = false)]
+ protected HandlerNumerical ();
+ public static Gda.DataHandler @new ();
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ [Compact]
+ public class HandlerNumericalPriv {
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", type_id = "gda_handler_string_get_type ()")]
+ public class HandlerString : GLib.Object, Gda.DataHandler {
+ [CCode (has_construct_function = false)]
+ protected HandlerString ();
+ public static Gda.DataHandler @new ();
+ public static Gda.DataHandler new_with_provider (Gda.ServerProvider prov, Gda.Connection? cnc);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ [Compact]
+ public class HandlerStringPriv {
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", type_id = "gda_handler_time_get_type ()")]
+ public class HandlerTime : GLib.Object, Gda.DataHandler {
+ [CCode (has_construct_function = false)]
+ protected HandlerTime ();
+ public string get_format (GLib.Type type);
+ public string get_no_locale_str_from_value (GLib.Value value);
+ public static Gda.DataHandler @new ();
+ public static Gda.DataHandler new_no_locale ();
+ public void set_sql_spec (GLib.DateDMY first, GLib.DateDMY sec, GLib.DateDMY third, char separator, bool twodigits_years);
+ public void set_str_spec (GLib.DateDMY first, GLib.DateDMY sec, GLib.DateDMY third, char separator, bool twodigits_years);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ [Compact]
+ public class HandlerTimePriv {
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", type_id = "gda_handler_type_get_type ()")]
+ public class HandlerType : GLib.Object, Gda.DataHandler {
+ [CCode (has_construct_function = false)]
+ protected HandlerType ();
+ public static Gda.DataHandler @new ();
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ [Compact]
+ public class HandlerTypePriv {
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", type_id = "gda_holder_get_type ()")]
+ public class Holder : GLib.Object, Gda.Lockable {
+ [CCode (has_construct_function = false)]
+ public Holder (GLib.Type type);
+ [NoWrapper]
+ public virtual void att_changed (string att_name, GLib.Value att_value);
+ public Gda.Holder copy ();
+ public static GLib.Quark error_quark ();
+ public void force_invalid ();
+ public void force_invalid_e (owned GLib.Error? error);
+ public GLib.Value get_attribute (string attribute);
+ public unowned Gda.Holder get_bind ();
+ public GLib.Value get_default_value ();
+ public GLib.Type get_g_type ();
+ public unowned string get_id ();
+ public bool get_not_null ();
+ public unowned Gda.DataModel get_source_model (int col);
+ public unowned GLib.Value? get_value ();
+ public string get_value_str (Gda.DataHandler? dh);
+ public bool is_valid ();
+ public bool is_valid_e () throws GLib.Error;
+ public void set_attribute (string attribute, GLib.Value value, GLib.DestroyNotify destroy);
+ public bool set_bind (Gda.Holder bind_to) throws GLib.Error;
+ public void set_default_value (GLib.Value value);
+ public void set_not_null (bool not_null);
+ public bool set_source_model (Gda.DataModel model, int col) throws GLib.Error;
+ public bool set_value (GLib.Value? value) throws GLib.Error;
+ public bool set_value_str (Gda.DataHandler dh, string value) throws GLib.Error;
+ public bool set_value_to_default ();
+ public GLib.Value take_static_value (GLib.Value value, bool value_changed) throws GLib.Error;
+ public bool take_value (owned GLib.Value value) throws GLib.Error;
+ public bool value_is_default ();
+ [NoAccessorMethod]
+ public string description { owned get; set; }
+ [NoAccessorMethod]
+ public Gda.Holder full_bind { owned get; set; }
+ [NoAccessorMethod]
+ public GLib.Type g_type { get; set construct; }
+ [NoAccessorMethod]
+ public string id { owned get; set; }
+ [NoAccessorMethod]
+ public string name { owned get; set; }
+ public bool not_null { get; set; }
+ [NoAccessorMethod]
+ public Gda.Holder simple_bind { owned get; set; }
+ [NoAccessorMethod]
+ public int source_column { get; set; }
+ [NoAccessorMethod]
+ public Gda.DataModel source_model { owned get; set; }
+ [NoAccessorMethod]
+ public bool validate_changes { get; set; }
+ public signal void attribute_changed (string att_name, GLib.Value att_value);
+ public virtual signal void changed ();
+ public virtual signal void source_changed ();
+ public virtual signal GLib.Error validate_change (GLib.Value new_value);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "gda_meta_context_get_type ()")]
+ [Compact]
+ public class MetaContext {
+ [CCode (array_length_cname = "size")]
+ public weak string[] column_names;
+ [CCode (array_length_cname = "size")]
+ public weak GLib.Value[] column_values;
+ public int size;
+ public weak string table_name;
+ [CCode (has_construct_function = false)]
+ public MetaContext ();
+ public void free ();
+ public unowned string get_table ();
+ public void set_column (string column, GLib.Value value, Gda.Connection? cnc);
+ public void set_table (string table);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", type_id = "gda_meta_store_get_type ()")]
+ public class MetaStore : GLib.Object {
+ [CCode (has_construct_function = false)]
+ public MetaStore (string? cnc_string);
+ public Gda.DataModel create_modify_data_model (string table_name);
+ public bool declare_foreign_key (Gda.MetaStruct? mstruct, string fk_name, string? catalog, string? schema, string table, string? ref_catalog, string? ref_schema, string ref_table, [CCode (array_length_cname = "nb_cols", array_length_pos = 8.5, array_length_type = "guint")] string[] colnames, [CCode (array_length_cname = "nb_cols", array_length_pos = 8.5, array_length_type = "guint")] string[] ref_colnames) throws GLib.Error;
+ public static GLib.Quark error_quark ();
+ [CCode (cname = "gda_meta_store_extract_v")]
+ public Gda.DataModel extract (string select_sql, GLib.HashTable<string,GLib.Value?>? vars) throws GLib.Error;
+ public bool get_attribute_value (string att_name, out string att_value) throws GLib.Error;
+ public unowned Gda.Connection get_internal_connection ();
+ public int get_version ();
+ public bool modify_v (string table_name, Gda.DataModel? new_data, string? condition, [CCode (array_length_cname = "nvalues", array_length_pos = 3.5)] string[] value_names, [CCode (array_length_cname = "nvalues", array_length_pos = 3.5)] GLib.Value[] values) throws GLib.Error;
+ public bool modify_with_context (Gda.MetaContext context, Gda.DataModel? new_data) throws GLib.Error;
+ public bool schema_add_custom_object (string xml_description) throws GLib.Error;
+ public GLib.SList<weak string> schema_get_all_tables ();
+ public GLib.SList<weak string> schema_get_depend_tables (string table_name);
+ public Gda.MetaStruct schema_get_structure () throws GLib.Error;
+ public bool schema_remove_custom_object (string obj_name) throws GLib.Error;
+ public bool set_attribute_value (string att_name, string? att_value) throws GLib.Error;
+ public void set_identifiers_style (Gda.SqlIdentifierStyle style);
+ public void set_reserved_keywords_func (Gda.SqlReservedKeywordsFunc? func);
+ public static string sql_identifier_quote (string id, Gda.Connection cnc);
+ public bool undeclare_foreign_key (Gda.MetaStruct? mstruct, string fk_name, string? catalog, string? schema, string table, string? ref_catalog, string? ref_schema, string ref_table) throws GLib.Error;
+ [CCode (has_construct_function = false)]
+ public MetaStore.with_file (string file_name);
+ public string catalog { construct; }
+ [NoAccessorMethod]
+ public Gda.Connection cnc { owned get; construct; }
+ public string cnc_string { construct; }
+ public string schema { construct; }
+ public signal void meta_changed (GLib.SList<Gda.MetaStoreChange> changes);
+ public virtual signal void meta_reset ();
+ public virtual signal GLib.Error suggest_update (Gda.MetaContext suggest);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", type_id = "gda_meta_struct_get_type ()")]
+ public class MetaStruct : GLib.Object {
+ [CCode (has_construct_function = false)]
+ public MetaStruct (Gda.MetaStore store, Gda.MetaStructFeature features);
+ public Gda.MetaDbObject complement (Gda.MetaDbObjectType type, GLib.Value? catalog, GLib.Value? schema, GLib.Value name) throws GLib.Error;
+ public bool complement_all () throws GLib.Error;
+ public bool complement_default () throws GLib.Error;
+ public bool complement_depend (Gda.MetaDbObject dbo) throws GLib.Error;
+ public bool complement_schema (GLib.Value? catalog, GLib.Value? schema) throws GLib.Error;
+ public string dump_as_graph (Gda.MetaGraphInfo info) throws GLib.Error;
+ public static GLib.Quark error_quark ();
+ public GLib.SList<weak Gda.MetaDbObject?> get_all_db_objects ();
+ public Gda.MetaDbObject get_db_object (GLib.Value? catalog, GLib.Value? schema, GLib.Value name);
+ public bool sort_db_objects (Gda.MetaSortType sort_type) throws GLib.Error;
+ [NoAccessorMethod]
+ public uint features { get; construct; }
+ [NoAccessorMethod]
+ public Gda.MetaStore meta_store { owned get; construct; }
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "gda_null_get_type ()")]
+ [Compact]
+ public class Null {
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "gda_numeric_get_type ()")]
+ [Compact]
+ public class Numeric {
+ public weak string number;
+ public long precision;
+ public long width;
+ [CCode (has_construct_function = false)]
+ public Numeric ();
+ public Gda.Numeric copy ();
+ public void free ();
+ public double get_double ();
+ public long get_precision ();
+ public string? get_string ();
+ public long get_width ();
+ public void set_double (double number);
+ public void set_from_string (string str);
+ public void set_precision (long precision);
+ public void set_width (long width);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", type_id = "gda_pstmt_get_type ()")]
+ public abstract class PStmt : GLib.Object {
+ public int ncols;
+ public weak GLib.SList<string> param_ids;
+ public weak string sql;
+ public GLib.Type types;
+ [CCode (has_construct_function = false)]
+ protected PStmt ();
+ public void copy_contents (Gda.PStmt dest);
+ public unowned Gda.Statement get_gda_statement ();
+ public void set_gda_statement (Gda.Statement stmt);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "gda_quark_list_get_type ()")]
+ [Compact]
+ public class QuarkList {
+ [CCode (has_construct_function = false)]
+ public QuarkList ();
+ public void add_from_string (string string, bool cleanup);
+ public void clear ();
+ public Gda.QuarkList copy ();
+ public unowned string find (string name);
+ public void @foreach (GLib.HFunc func);
+ public void free ();
+ [CCode (has_construct_function = false)]
+ public QuarkList.from_string (string string);
+ public void protect_values ();
+ public void remove (string name);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", type_id = "gda_repetitive_statement_get_type ()")]
+ public class RepetitiveStatement : GLib.Object {
+ [CCode (has_construct_function = false)]
+ public RepetitiveStatement (Gda.Statement stmt);
+ public bool append_set (Gda.Set values, bool make_copy);
+ public GLib.SList<weak Gda.Set> get_all_sets ();
+ public bool get_template_set (Gda.Set @set) throws GLib.Error;
+ [NoAccessorMethod]
+ public Gda.Statement statement { owned get; construct; }
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", type_id = "gda_row_get_type ()")]
+ public class Row : GLib.Object {
+ [CCode (has_construct_function = false)]
+ public Row (int count);
+ public int get_length ();
+ public GLib.Value? get_value (int num);
+ public void invalidate_value (GLib.Value value);
+ public void invalidate_value_e (GLib.Value value, owned GLib.Error? error);
+ public bool value_is_valid (GLib.Value value);
+ public bool value_is_valid_e (GLib.Value value) throws GLib.Error;
+ [NoAccessorMethod]
+ public int nb_values { set; }
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", type_id = "gda_server_operation_get_type ()")]
+ public class ServerOperation : GLib.Object {
+ [CCode (has_construct_function = false)]
+ public ServerOperation (Gda.ServerOperationType op_type, string xml_file);
+ public uint add_item_to_sequence (string seq_path);
+ public bool del_item_from_sequence (string item_path);
+ public static GLib.Quark error_quark ();
+ public string get_node_parent (string path);
+ public string get_node_path_portion (string path);
+ public Gda.ServerOperationNodeType get_node_type (string path, Gda.ServerOperationNodeStatus? status);
+ public Gda.ServerOperationType get_op_type ();
+ [CCode (array_length = false, array_null_terminated = true)]
+ public string[] get_root_nodes ();
+ [CCode (array_length = false, array_null_terminated = true)]
+ public string[] get_sequence_item_names (string path);
+ public uint get_sequence_max_size (string path);
+ public uint get_sequence_min_size (string path);
+ public unowned string get_sequence_name (string path);
+ public uint get_sequence_size (string path);
+ public string get_sql_identifier_at_path (Gda.Connection? cnc, Gda.ServerProvider? prov, string path);
+ [CCode (cname = "gda_server_operation_get_value_at_path")]
+ public unowned GLib.Value? get_value_at (string path);
+ public bool is_valid (string? xml_file) throws GLib.Error;
+ public bool load_data_from_xml ([CCode (type = "xmlNodePtr")] Xml.Node* node) throws GLib.Error;
+ public static unowned string op_type_to_string (Gda.ServerOperationType type);
+ public bool perform_create_database (string? provider) throws GLib.Error;
+ public bool perform_create_table () throws GLib.Error;
+ public bool perform_drop_database (string? provider) throws GLib.Error;
+ public bool perform_drop_table () throws GLib.Error;
+ public static Gda.ServerOperation prepare_create_database (string provider, string? db_name) throws GLib.Error;
+ public static Gda.ServerOperation prepare_drop_database (string provider, string? db_name) throws GLib.Error;
+ public static Gda.ServerOperation prepare_drop_table (Gda.Connection cnc, string table_name) throws GLib.Error;
+ [NoWrapper]
+ public virtual void seq_item_added (string seq_path, int item_index);
+ [NoWrapper]
+ public virtual void seq_item_remove (string seq_path, int item_index);
+ [CCode (cname = "gda_server_operation_set_value_at_path")]
+ public bool set_value_at (string? value, string path) throws GLib.Error;
+ public static Gda.ServerOperationType string_to_op_type (string str);
+ [NoAccessorMethod]
+ public Gda.Connection connection { owned get; construct; }
+ public int op_type { get; construct; }
+ [NoAccessorMethod]
+ public Gda.ServerProvider provider { owned get; construct; }
+ public string spec_filename { construct; }
+ public signal void sequence_item_added (string seq_path, int item_index);
+ public signal void sequence_item_remove (string seq_path, int item_index);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", type_id = "gda_server_provider_get_type ()")]
+ public abstract class ServerProvider : GLib.Object {
+ [CCode (has_construct_function = false)]
+ protected ServerProvider ();
+ [NoWrapper]
+ public virtual bool add_savepoint (Gda.Connection cnc, string name) throws GLib.Error;
+ [NoWrapper]
+ public virtual bool begin_transaction (Gda.Connection cnc, string name, Gda.TransactionIsolation level) throws GLib.Error;
+ [NoWrapper]
+ public virtual bool cancel (Gda.Connection cnc, uint task_id) throws GLib.Error;
+ [NoWrapper]
+ public virtual bool close_connection (Gda.Connection cnc);
+ [NoWrapper]
+ public virtual bool commit_transaction (Gda.Connection cnc, string name) throws GLib.Error;
+ public virtual Gda.ServerOperation create_operation (Gda.Connection? cnc, Gda.ServerOperationType type, Gda.Set? options) throws GLib.Error;
+ public virtual Gda.SqlParser create_parser (Gda.Connection? cnc);
+ [NoWrapper]
+ public virtual bool delete_savepoint (Gda.Connection cnc, string name) throws GLib.Error;
+ public static GLib.Quark error_quark ();
+ public virtual string escape_string (Gda.Connection? cnc, string str);
+ public string find_file (string inst_dir, string filename);
+ public unowned Gda.DataHandler get_data_handler_dbms (Gda.Connection? cnc, string for_type);
+ public unowned Gda.DataHandler get_data_handler_default (Gda.Connection? cnc, GLib.Type type, string dbms_type);
+ public unowned Gda.DataHandler get_data_handler_g_type (Gda.Connection? cnc, GLib.Type for_type);
+ [NoWrapper]
+ public virtual unowned string get_database (Gda.Connection cnc);
+ [NoWrapper]
+ public virtual unowned string get_def_dbms_type (Gda.Connection cnc, GLib.Type g_type);
+ public unowned string get_default_dbms_type (Gda.Connection? cnc, GLib.Type type);
+ public virtual unowned string get_name ();
+ public virtual unowned string get_server_version (Gda.Connection cnc);
+ public virtual unowned string get_version ();
+ [NoWrapper]
+ public virtual bool handle_async (Gda.Connection cnc) throws GLib.Error;
+ public void handler_declare (Gda.DataHandler dh, Gda.Connection cnc, GLib.Type g_type, string dbms_type);
+ public unowned Gda.DataHandler handler_find (Gda.Connection cnc, GLib.Type g_type, string dbms_type);
+ [NoWrapper]
+ public virtual string identifier_quote (Gda.Connection cnc, string id, bool for_meta_store, bool force_quotes);
+ public unowned Gda.SqlParser internal_get_parser ();
+ [NoWrapper]
+ public virtual bool is_busy (Gda.Connection cnc) throws GLib.Error;
+ public static string load_file_contents (string inst_dir, string data_dir, string filename);
+ public bool perform_operation (Gda.Connection? cnc, Gda.ServerOperation op) throws GLib.Error;
+ public bool perform_operation_default (Gda.Connection? cnc, Gda.ServerOperation op) throws GLib.Error;
+ public virtual string render_operation (Gda.Connection? cnc, Gda.ServerOperation op) throws GLib.Error;
+ [NoWrapper]
+ public virtual bool rollback_savepoint (Gda.Connection cnc, string name) throws GLib.Error;
+ [NoWrapper]
+ public virtual bool rollback_transaction (Gda.Connection cnc, string name) throws GLib.Error;
+ [NoWrapper]
+ public virtual bool statement_prepare (Gda.Connection cnc, Gda.Statement stmt) throws GLib.Error;
+ public GLib.Value string_to_value (Gda.Connection? cnc, string string, GLib.Type preferred_type, string? dbms_type);
+ public virtual bool supports_feature (Gda.Connection? cnc, Gda.ConnectionFeature feature);
+ public virtual bool supports_operation (Gda.Connection? cnc, Gda.ServerOperationType type, Gda.Set? options);
+ public virtual string unescape_string (Gda.Connection? cnc, string str);
+ public string value_to_sql_string (Gda.Connection? cnc, GLib.Value from);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ [Compact]
+ public class ServerProviderInfo {
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", type_id = "gda_set_get_type ()")]
+ public class Set : GLib.Object {
+ public GLib.List<Gda.SetGroup> groups_list;
+ public GLib.List<Gda.SetNode> nodes_list;
+ public GLib.List<Gda.SetSource> sources_list;
+ [CCode (has_construct_function = false)]
+ public Set (GLib.SList<Gda.Holder> holders);
+ public bool add_holder (Gda.Holder holder);
+ public Gda.Set copy ();
+ public static GLib.Quark error_quark ();
+ [CCode (has_construct_function = false)]
+ public Set.from_spec_node ([CCode (type = "xmlNodePtr")] Xml.Node* xml_spec) throws GLib.Error;
+ [CCode (has_construct_function = false)]
+ public Set.from_spec_string (string xml_spec) throws GLib.Error;
+ public Gda.SetGroup get_group (Gda.Holder holder);
+ public unowned Gda.Holder get_holder (string holder_id);
+ public unowned GLib.Value? get_holder_value (string holder_id);
+ public Gda.SetNode get_node (Gda.Holder holder);
+ public unowned Gda.Holder get_nth_holder (int pos);
+ public Gda.SetSource get_source (Gda.Holder holder);
+ public Gda.SetSource get_source_for_model (Gda.DataModel model);
+ public bool is_valid () throws GLib.Error;
+ public void merge_with_set (Gda.Set set_to_merge);
+ [CCode (has_construct_function = false)]
+ public Set.read_only (GLib.SList<Gda.Holder> holders);
+ public void remove_holder (Gda.Holder holder);
+ public void replace_source_model (Gda.SetSource source, Gda.DataModel model);
+ [NoAccessorMethod]
+ public string description { owned get; set; }
+ public void* holders { construct; }
+ [NoAccessorMethod]
+ public string id { owned get; set; }
+ [NoAccessorMethod]
+ public string name { owned get; set; }
+ [NoAccessorMethod]
+ public bool validate_changes { get; set; }
+ public virtual signal void holder_attr_changed (Gda.Holder holder, string attr_name, GLib.Value attr_value);
+ public virtual signal void holder_changed (Gda.Holder holder);
+ public virtual signal void holder_type_set (Gda.Holder holder);
+ public virtual signal void public_data_changed ();
+ public virtual signal void source_model_changed (void* source);
+ public virtual signal GLib.Error validate_holder_change (Gda.Holder holder, GLib.Value new_value);
+ public virtual signal GLib.Error validate_set ();
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", type_id = "gda_short_get_type ()")]
+ public class Short {
+ [CCode (has_construct_function = false)]
+ protected Short ();
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", type_id = "gda_sql_builder_get_type ()")]
+ public class SqlBuilder : GLib.Object {
+ [CCode (has_construct_function = false)]
+ public SqlBuilder (Gda.SqlStatementType stmt_type);
+ public Gda.SqlBuilderId add_case_v (Gda.SqlBuilderId test_expr, Gda.SqlBuilderId else_expr, [CCode (array_length_cname = "args_size", array_length_pos = 4.1)] Gda.SqlBuilderId[] when_array, [CCode (array_length_cname = "args_size", array_length_pos = 4.1)] Gda.SqlBuilderId[] then_array);
+ public Gda.SqlBuilderId add_cond (Gda.SqlOperatorType op, Gda.SqlBuilderId op1, Gda.SqlBuilderId op2, Gda.SqlBuilderId op3);
+ public Gda.SqlBuilderId add_expr_value (Gda.DataHandler? dh, GLib.Value? value);
+ public Gda.SqlBuilderId add_field_id (string field_name, string? table_name);
+ public void add_field_value_as_gvalue (string field_name, GLib.Value? value);
+ public void add_field_value_id (Gda.SqlBuilderId field_id, Gda.SqlBuilderId value_id);
+ public Gda.SqlBuilderId add_function_v (string func_name, [CCode (array_length_cname = "args_size", array_length_pos = 2.1)] Gda.SqlBuilderId[] args);
+ public Gda.SqlBuilderId add_id (string str);
+ public Gda.SqlBuilderId add_param (string param_name, GLib.Type type, bool nullok);
+ public void compound_add_sub_select_from_builder (Gda.SqlBuilder subselect);
+ public void compound_set_type (Gda.SqlStatementCompoundType compound_type);
+ public static GLib.Quark error_quark ();
+ public Gda.Statement get_statement () throws GLib.Error;
+ public Gda.SqlBuilderId import_expression_from_builder (Gda.SqlBuilder query, Gda.SqlBuilderId expr_id);
+ public void join_add_field (Gda.SqlBuilderId join_id, string field_name);
+ public Gda.SqlBuilderId select_add_field (string field_name, string? table_name, string? alias);
+ public Gda.SqlBuilderId select_add_target (string table_name, string? alias);
+ public Gda.SqlBuilderId select_add_target_id (Gda.SqlBuilderId table_id, string? alias);
+ public Gda.SqlBuilderId select_join_targets (Gda.SqlBuilderId left_target_id, Gda.SqlBuilderId right_target_id, SqlSelectJoinType join_type, Gda.SqlBuilderId join_expr);
+ public void select_group_by (Gda.SqlBuilderId expr_id);
+ public void select_order_by (Gda.SqlBuilderId expr_id, bool asc, string? collation_name);
+ public void select_set_distinct (bool distinct, Gda.SqlBuilderId expr_id);
+ public void select_set_having (Gda.SqlBuilderId cond_id);
+ public void select_set_limit (Gda.SqlBuilderId limit_count_expr_id, Gda.SqlBuilderId limit_offset_expr_id);
+ public void set_table (string table_name);
+ public void set_where (Gda.SqlBuilderId cond_id);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", type_id = "gda_sql_parser_get_type ()")]
+ public class SqlParser : GLib.Object, Gda.Lockable {
+ [CCode (has_construct_function = false)]
+ public SqlParser ();
+ public static GLib.Quark error_quark ();
+ public Gda.Batch parse_file_as_batch (string filename) throws GLib.Error;
+ public Gda.Statement parse_string (string sql, out string remain) throws GLib.Error;
+ public Gda.Batch parse_string_as_batch (string sql, out string remain) throws GLib.Error;
+ public void set_overflow_error ();
+ public void set_syntax_error ();
+ [NoAccessorMethod]
+ public int column_error { get; }
+ [NoAccessorMethod]
+ public int line_error { get; }
+ [NoAccessorMethod]
+ public int mode { get; set; }
+ [NoAccessorMethod]
+ public int tokenizer_flavour { get; set; }
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ [Compact]
+ public class SqlStatement {
+ public void compound_set_type (Gda.SqlStatementCompoundType type);
+ public void compound_take_stmt (Gda.SqlStatement s);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ [Compact]
+ public class SqlStatementDelete {
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ [Compact]
+ public class SqlStatementInsert {
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ [Compact]
+ public class SqlStatementSelect {
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ [Compact]
+ public class SqlStatementTransaction {
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ [Compact]
+ public class SqlStatementUnknown {
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ [Compact]
+ public class SqlStatementUpdate {
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", type_id = "gda_statement_get_type ()")]
+ public class Statement : GLib.Object {
+ [CCode (has_construct_function = false)]
+ public Statement ();
+ public bool check_structure () throws GLib.Error;
+ public bool check_validity (Gda.Connection? cnc) throws GLib.Error;
+ public Gda.Statement copy ();
+ public static GLib.Quark error_quark ();
+ public bool get_parameters (out Gda.Set out_params) throws GLib.Error;
+ public Gda.SqlStatementType get_statement_type ();
+ public bool is_useless ();
+ public bool normalize (Gda.Connection cnc) throws GLib.Error;
+ public string serialize ();
+ public string to_sql_extended (Gda.Connection? cnc, Gda.Set? @params, Gda.StatementSqlFlag flags, out GLib.SList<weak Gda.Holder> params_used) throws GLib.Error;
+ public string to_sql_real (Gda.SqlRenderingContext context) throws GLib.Error;
+ [NoAccessorMethod]
+ public void* structure { get; set; }
+ public virtual signal void checked (Gda.Connection cnc, bool checked);
+ public virtual signal void reset ();
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", type_id = "gda_thread_wrapper_get_type ()")]
+ public class ThreadWrapper : GLib.Object {
+ [CCode (has_construct_function = false)]
+ public ThreadWrapper ();
+ public bool cancel (uint id);
+ public ulong connect_raw (void* instance, string sig_name, bool private_thread, bool private_job, Gda.ThreadWrapperCallback callback);
+ public void disconnect (ulong id);
+ public static GLib.Quark error_quark ();
+ public uint execute_void ([CCode (destroy_notify_pos = 2.1)] owned Gda.ThreadWrapperVoidFunc func, void* arg) throws GLib.Error;
+ public void* fetch_result (bool may_lock, uint exp_id) throws GLib.Error;
+ public unowned GLib.IOChannel get_io_channel ();
+ public int get_waiting_size ();
+ public void iterate (bool may_block);
+ public void steal_signal (ulong id);
+ public void unset_io_channel ();
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "gda_time_get_type ()")]
+ [Compact]
+ public class Time {
+ public ulong fraction;
+ public ushort hour;
+ public ushort minute;
+ public ushort second;
+ public long timezone;
+ public static void* copy (void* boxed);
+ public static void free (void* boxed);
+ public bool valid ();
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "gda_timestamp_get_type ()")]
+ [Compact]
+ public class Timestamp {
+ public ushort day;
+ public ulong fraction;
+ public ushort hour;
+ public ushort minute;
+ public ushort month;
+ public ushort second;
+ public long timezone;
+ public short year;
+ public static void* copy (void* boxed);
+ public static void free (void* boxed);
+ public bool valid ();
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", type_id = "gda_transaction_status_get_type ()")]
+ public class TransactionStatus : GLib.Object {
+ public GLib.List<Gda.TransactionStatusEvent> events;
+ public Gda.TransactionIsolation isolation_level;
+ public weak string name;
+ public Gda.TransactionStatusState state;
+ [CCode (has_construct_function = false)]
+ public TransactionStatus (string name);
+ public Gda.TransactionStatus find (string str, Gda.TransactionStatusEvent destev);
+ public Gda.TransactionStatus find_current (Gda.TransactionStatusEvent destev, bool unnamed_only);
+ public void free_events (Gda.TransactionStatusEvent event, bool free_after);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", type_id = "gda_tree_get_type ()")]
+ public class Tree : GLib.Object {
+ [CCode (has_construct_function = false)]
+ public Tree ();
+ public void add_manager (Gda.TreeManager manager);
+ public void clean ();
+ public void dump (Gda.TreeNode? node, void* stream);
+ public static GLib.Quark error_quark ();
+ public unowned Gda.TreeNode get_node (string tree_path, bool use_names);
+ public unowned Gda.TreeManager get_node_manager (Gda.TreeNode node);
+ public string get_node_path (Gda.TreeNode node);
+ public GLib.SList<weak Gda.TreeNode> get_nodes_in_path (string? tree_path, bool use_names);
+ public void set_attribute (string attribute, GLib.Value value, GLib.DestroyNotify destroy);
+ public bool update_all () throws GLib.Error;
+ public bool update_children (Gda.TreeNode? node) throws GLib.Error;
+ public bool update_part (Gda.TreeNode node) throws GLib.Error;
+ [NoAccessorMethod]
+ public bool is_list { get; }
+ public virtual signal void node_changed (Gda.TreeNode node);
+ public virtual signal void node_deleted (string node_path);
+ public virtual signal void node_has_child_toggled (Gda.TreeNode node);
+ public virtual signal void node_inserted (Gda.TreeNode node);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", type_id = "gda_tree_manager_get_type ()")]
+ public class TreeManager : GLib.Object {
+ [CCode (has_construct_function = false)]
+ protected TreeManager ();
+ public void add_manager (Gda.TreeManager sub);
+ public void add_new_node_attribute (string attribute, GLib.Value? value);
+ public Gda.TreeNode create_node (Gda.TreeNode? parent, string? name);
+ public static GLib.Quark error_quark ();
+ public unowned GLib.SList<Gda.TreeManager> get_managers ();
+ [NoAccessorMethod]
+ public void* func { get; set construct; }
+ [NoAccessorMethod]
+ public bool recursive { get; set construct; }
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", type_id = "gda_tree_mgr_columns_get_type ()")]
+ public class TreeMgrColumns : Gda.TreeManager {
+ [CCode (has_construct_function = false, type = "GdaTreeManager*")]
+ public TreeMgrColumns (Gda.Connection cnc, string schema, string table_name);
+ [NoAccessorMethod]
+ public Gda.Connection connection { owned get; construct; }
+ [NoAccessorMethod]
+ public Gda.MetaStore meta_store { owned get; construct; }
+ public string schema { construct; }
+ public string table_name { construct; }
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ [Compact]
+ public class TreeMgrColumnsPriv {
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", type_id = "gda_tree_mgr_label_get_type ()")]
+ public class TreeMgrLabel : Gda.TreeManager {
+ [CCode (has_construct_function = false, type = "GdaTreeManager*")]
+ public TreeMgrLabel (string label);
+ public string label { construct; }
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ [Compact]
+ public class TreeMgrLabelPriv {
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", type_id = "gda_tree_mgr_ldap_get_type ()")]
+ public class TreeMgrLdap : Gda.TreeManager {
+ [CCode (has_construct_function = false, type = "GdaTreeManager*")]
+ public TreeMgrLdap (Gda.Connection cnc, string? dn);
+ [NoAccessorMethod]
+ public string dn { owned get; construct; }
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ [Compact]
+ public class TreeMgrLdapPriv {
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", type_id = "gda_tree_mgr_schemas_get_type ()")]
+ public class TreeMgrSchemas : Gda.TreeManager {
+ [CCode (has_construct_function = false, type = "GdaTreeManager*")]
+ public TreeMgrSchemas (Gda.Connection cnc);
+ [NoAccessorMethod]
+ public Gda.Connection connection { owned get; construct; }
+ [NoAccessorMethod]
+ public Gda.MetaStore meta_store { owned get; construct; }
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ [Compact]
+ public class TreeMgrSchemasPriv {
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", type_id = "gda_tree_mgr_select_get_type ()")]
+ public class TreeMgrSelect : Gda.TreeManager {
+ [CCode (has_construct_function = false, type = "GdaTreeManager*")]
+ public TreeMgrSelect (Gda.Connection cnc, Gda.Statement stmt, Gda.Set @params);
+ [NoAccessorMethod]
+ public Gda.Connection connection { owned get; construct; }
+ [NoAccessorMethod]
+ public Gda.Set @params { owned get; construct; }
+ [NoAccessorMethod]
+ public Gda.Statement statement { owned get; construct; }
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ [Compact]
+ public class TreeMgrSelectPriv {
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", type_id = "gda_tree_mgr_tables_get_type ()")]
+ public class TreeMgrTables : Gda.TreeManager {
+ [CCode (has_construct_function = false, type = "GdaTreeManager*")]
+ public TreeMgrTables (Gda.Connection cnc, string? schema);
+ [NoAccessorMethod]
+ public Gda.Connection connection { owned get; construct; }
+ [NoAccessorMethod]
+ public Gda.MetaStore meta_store { owned get; construct; }
+ public string schema { construct; }
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ [Compact]
+ public class TreeMgrTablesPriv {
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", type_id = "gda_tree_node_get_type ()")]
+ public class TreeNode : GLib.Object {
+ [CCode (has_construct_function = false)]
+ public TreeNode (string? name);
+ [NoWrapper]
+ public virtual void dump_children (string prefix, GLib.StringBuilder in_string);
+ [NoWrapper]
+ public virtual string dump_header ();
+ public static GLib.Quark error_quark ();
+ public GLib.Value fetch_attribute (string attribute);
+ public unowned Gda.TreeNode get_child_index (int index);
+ public unowned Gda.TreeNode get_child_name (string name);
+ public GLib.SList<weak Gda.TreeNode> get_children ();
+ public GLib.Value get_node_attribute (string attribute);
+ public unowned Gda.TreeNode get_parent ();
+ public void set_node_attribute (string attribute, GLib.Value? value, GLib.DestroyNotify destroy);
+ [NoAccessorMethod]
+ public string name { owned get; set; }
+ public virtual signal void node_changed (Gda.TreeNode node);
+ public virtual signal void node_deleted (string relative_path);
+ public virtual signal void node_has_child_toggled (Gda.TreeNode node);
+ public virtual signal void node_inserted (Gda.TreeNode node);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", type_id = "gda_ushort_get_type ()")]
+ public class UShort {
+ [CCode (has_construct_function = false)]
+ protected UShort ();
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", type_id = "gda_xa_transaction_get_type ()")]
+ public class XaTransaction : GLib.Object {
+ [CCode (has_construct_function = false)]
+ public XaTransaction (uint32 format, string global_transaction_id);
+ public bool begin () throws GLib.Error;
+ public bool commit (out GLib.SList<Gda.Connection> cnc_to_recover) throws GLib.Error;
+ public bool commit_recovered (out GLib.SList<Gda.Connection> cnc_to_recover) throws GLib.Error;
+ public static GLib.Quark error_quark ();
+ public bool register_connection (Gda.Connection cnc, string branch) throws GLib.Error;
+ public bool rollback () throws GLib.Error;
+ public void unregister_connection (Gda.Connection cnc);
+ [NoAccessorMethod]
+ public uint format_id { get; construct; }
+ [NoAccessorMethod]
+ public string transaction_id { owned get; construct; }
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", type_id = "gda_data_handler_get_type ()")]
+ public interface DataHandler : GLib.Object {
+ public abstract bool accepts_g_type (GLib.Type type);
+ public static unowned Gda.DataHandler get_default (GLib.Type for_type);
+ public abstract unowned string get_descr ();
+ public abstract GLib.Value? get_sane_init_value (GLib.Type type);
+ public abstract string get_sql_from_value (GLib.Value? value);
+ public abstract string get_str_from_value (GLib.Value? value);
+ public abstract GLib.Value? get_value_from_sql (string? sql, GLib.Type type);
+ public abstract GLib.Value? get_value_from_str (string? str, GLib.Type type);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", type_id = "gda_data_model_get_type ()")]
+ public interface DataModel : GLib.Object {
+ public bool add_data_from_xml_node ([CCode (type = "xmlNodePtr")] Xml.Node* node) throws GLib.Error;
+ [CCode (vfunc_name = "i_append_row")]
+ public abstract int append_row () throws GLib.Error;
+ public Gda.DataModelArray array_copy_model () throws GLib.Error;
+ public Gda.DataModelArray array_copy_model_ext ([CCode (array_length_cname = "ncols", array_length_pos = 0.5)] int[] cols) throws GLib.Error;
+ [CCode (vfunc_name = "i_create_iter")]
+ public abstract Gda.DataModelIter create_iter ();
+ [CCode (vfunc_name = "i_describe_column")]
+ public abstract unowned Gda.Column describe_column (int col);
+ public void dump (void* to_stream);
+ public string dump_as_string ();
+ public static GLib.Quark error_quark ();
+ public bool export_to_file (Gda.DataModelIOFormat format, string file, [CCode (array_length_cname = "nb_cols", array_length_pos = 3.5)] int[]? cols, [CCode (array_length_cname = "nb_rows", array_length_pos = 4.5)] int[]? rows, Gda.Set options) throws GLib.Error;
+ public string export_to_string (Gda.DataModelIOFormat format, [CCode (array_length_cname = "nb_cols", array_length_pos = 2.5)] int[]? cols, [CCode (array_length_cname = "nb_rows", array_length_pos = 3.5)] int[]? rows, Gda.Set options);
+ public void freeze ();
+ [CCode (vfunc_name = "i_get_access_flags")]
+ public abstract Gda.DataModelAccessFlags get_access_flags ();
+ [CCode (vfunc_name = "i_get_attributes_at")]
+ public abstract Gda.ValueAttribute get_attributes_at (int col, int row);
+ public int get_column_index (string name);
+ public unowned string get_column_name (int col);
+ public unowned string get_column_title (int col);
+ [CCode (array_length = false, array_null_terminated = true, vfunc_name = "i_get_exceptions")]
+ public abstract unowned GLib.Error[] get_exceptions ();
+ [CCode (vfunc_name = "i_get_n_columns")]
+ public abstract int get_n_columns ();
+ [CCode (vfunc_name = "i_get_n_rows")]
+ public abstract int get_n_rows ();
+ [CCode (vfunc_name = "i_get_notify")]
+ public abstract bool get_notify ();
+ public unowned GLib.Value? get_typed_value_at (int col, int row, GLib.Type expected_type, bool nullok) throws GLib.Error;
+ [CCode (vfunc_name = "i_get_value_at")]
+ public abstract unowned GLib.Value? get_value_at (int col, int row) throws GLib.Error;
+ public bool import_from_file (string file, GLib.HashTable<int,int>? cols_trans, Gda.Set options) throws GLib.Error;
+ public bool import_from_model (Gda.DataModel from, bool overwrite, GLib.HashTable<int,int>? cols_trans) throws GLib.Error;
+ public bool import_from_string (string string, GLib.HashTable<int,int>? cols_trans, Gda.Set options) throws GLib.Error;
+ [CCode (vfunc_name = "i_iter_at_row")]
+ [Deprecated (since = "5.2")]
+ public abstract bool iter_at_row (Gda.DataModelIter iter, int row);
+ [CCode (vfunc_name = "i_iter_next")]
+ [Deprecated (since = "5.2")]
+ public abstract bool iter_next (Gda.DataModelIter iter);
+ [CCode (vfunc_name = "i_iter_prev")]
+ [Deprecated (since = "5.2")]
+ public abstract bool iter_prev (Gda.DataModelIter iter);
+ [CCode (vfunc_name = "i_iter_set_value")]
+ [Deprecated (since = "5.2")]
+ public abstract bool iter_set_value (Gda.DataModelIter iter, int col, GLib.Value value) throws GLib.Error;
+ [CCode (vfunc_name = "i_remove_row")]
+ public abstract bool remove_row (int row) throws GLib.Error;
+ [CCode (vfunc_name = "i_send_hint")]
+ public abstract void send_hint (Gda.DataModelHint hint, GLib.Value? hint_value);
+ public void set_column_name (int col, string name);
+ public void set_column_title (int col, string title);
+ [CCode (vfunc_name = "i_set_notify")]
+ [Deprecated (since = "5.2")]
+ public abstract void set_notify (bool do_notify_changes);
+ [CCode (vfunc_name = "i_set_value_at")]
+ public abstract bool set_value_at (int col, int row, GLib.Value value) throws GLib.Error;
+ public void thaw ();
+ public virtual signal void access_changed ();
+ public virtual signal void changed ();
+ [HasEmitter]
+ public virtual signal void reset ();
+ [HasEmitter]
+ public virtual signal void row_inserted (int row);
+ [HasEmitter]
+ public virtual signal void row_removed (int row);
+ [HasEmitter]
+ public virtual signal void row_updated (int row);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", type_id = "gda_lockable_get_type ()")]
+ public interface Lockable : GLib.Object {
+ [NoWrapper]
+ public abstract void i_lock ();
+ [NoWrapper]
+ public abstract bool i_trylock ();
+ [NoWrapper]
+ public abstract void i_unlock ();
+ public void @lock ();
+ public bool trylock ();
+ public void unlock ();
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", has_type_id = false)]
+ public struct DataMetaWrapper {
+ public weak GLib.Object object;
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", has_type_id = false)]
+ public struct DataMetaWrapperClass {
+ public weak GLib.ObjectClass parent_class;
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", has_type_id = false)]
+ public struct Diff {
+ public Gda.DiffType type;
+ public int old_row;
+ public int new_row;
+ public weak GLib.HashTable<void*,void*> values;
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", has_type_id = false)]
+ public struct DsnInfo {
+ public weak string name;
+ public weak string provider;
+ public weak string description;
+ public weak string cnc_string;
+ public weak string auth_string;
+ public bool is_system;
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", has_type_id = false)]
+ public struct MetaDbObject {
+ public Gda.MetaDbObjectType obj_type;
+ public bool outdated;
+ public weak string obj_catalog;
+ public weak string obj_schema;
+ public weak string obj_name;
+ public weak string obj_short_name;
+ public weak string obj_full_name;
+ public weak string obj_owner;
+ public GLib.List<Gda.MetaDbObject> depend_list;
+ [CCode (cname = "extra.meta_table")]
+ public Gda.MetaTable extra_meta_table;
+ [CCode (cname = "extra.meta_view")]
+ public Gda.MetaView extra_meta_view;
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", has_type_id = false)]
+ public struct MetaStoreChange {
+ public Gda.MetaStoreChangeType c_type;
+ public weak string table_name;
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", has_type_id = false)]
+ public struct MetaTable {
+ public GLib.List<Gda.MetaTableColumn> columns;
+ public int pk_cols_array;
+ public int pk_cols_nb;
+ public GLib.List<Gda.MetaTableForeignKey> reverse_fk_list;
+ public GLib.List<Gda.MetaTableForeignKey> fk_list;
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", has_type_id = false)]
+ public struct MetaTableColumn {
+ public weak string column_name;
+ public weak string column_type;
+ public GLib.Type gtype;
+ public bool pkey;
+ public bool nullok;
+ public weak string default_value;
+ public void foreach_attribute (Gda.AttributesManagerFunc func);
+ public GLib.Value get_attribute (string attribute);
+ public void set_attribute (string attribute, GLib.Value? value, GLib.DestroyNotify? destroy);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", has_type_id = false)]
+ public struct MetaTableForeignKey {
+ public Gda.MetaDbObject meta_table;
+ public Gda.MetaDbObject depend_on;
+ public int cols_nb;
+ public int fk_cols_array;
+ public weak string fk_names_array;
+ public int ref_pk_cols_array;
+ public weak string ref_pk_names_array;
+ public weak string fk_name;
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", has_type_id = false)]
+ public struct MetaView {
+ public Gda.MetaTable table;
+ public weak string view_def;
+ public bool is_updatable;
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public struct Mutex : GLib.RecMutex {
+ public static void free (Gda.Mutex mutex);
+ public static void @lock (Gda.Mutex mutex);
+ public static bool trylock (Gda.Mutex mutex);
+ public static void unlock (Gda.Mutex mutex);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", has_type_id = false)]
+ public struct ProviderInfo {
+ public weak string id;
+ public weak string location;
+ public weak string description;
+ public weak Gda.Set dsn_params;
+ public weak Gda.Set auth_params;
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", has_type_id = false)]
+ public struct ServerProviderHandlerInfo {
+ public weak Gda.Connection cnc;
+ public GLib.Type g_type;
+ public weak string dbms_type;
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", has_type_id = false)]
+ public struct SetGroup {
+ public GLib.List<Gda.SetNode> nodes;
+ public Gda.SetSource nodes_source;
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", has_type_id = false)]
+ public struct SetNode {
+ public weak Gda.Holder holder;
+ public weak Gda.DataModel source_model;
+ public int source_column;
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", has_type_id = false)]
+ public struct SetSource {
+ public weak Gda.DataModel data_model;
+ public GLib.List<Gda.SetNode> nodes;
+ }
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ [SimpleType]
+ public struct SqlBuilderId : uint {
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", has_type_id = false)]
+ public struct SqlRenderingContext {
+ public Gda.StatementSqlFlag flags;
+ public weak Gda.Set @params;
+ public GLib.List<Gda.Holder> params_used;
+ public weak Gda.ServerProvider provider;
+ public weak Gda.Connection cnc;
+ public weak Gda.SqlRenderingValue render_value;
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", has_type_id = false)]
+ public struct ThreadNotification {
+ public Gda.ThreadNotificationType type;
+ public uint job_id;
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", has_type_id = false)]
+ public struct TransactionStatusEvent {
+ public weak Gda.TransactionStatus trans;
+ public Gda.TransactionStatusEventType type;
+ public weak Gda.ConnectionEvent conn_event;
+ [CCode (cname = "pl.svp_name")]
+ public weak string pl_svp_name;
+ [CCode (cname = "pl.sql")]
+ public weak string pl_sql;
+ [CCode (cname = "pl.sub_trans")]
+ public weak Gda.TransactionStatus pl_sub_trans;
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", has_type_id = false)]
+ public struct XaTransactionId {
+ public uint32 format;
+ public ushort gtrid_length;
+ public ushort bqual_length;
+ [CCode (array_length = false, array_null_terminated = true)]
+ public weak char[] data;
+ public string to_string ();
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cname = "_GdaServerOperationNode", has_type_id = false)]
+ public struct _ServerOperationNode {
+ public Gda.ServerOperationNodeType type;
+ public Gda.ServerOperationNodeStatus status;
+ public weak Gda.Set plist;
+ public weak Gda.DataModel model;
+ public weak Gda.Column column;
+ public weak Gda.Holder param;
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cname = "_GdaSqlParserIface", has_type_id = false)]
+ public struct _SqlParserIface {
+ public weak Gda.SqlParser parser;
+ public weak Gda.SqlStatement parsed_statement;
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_BATCH_CONFLICTING_PARAMETER_")]
+ public errordomain BatchError {
+ [CCode (cname = "GDA_BATCH_CONFLICTING_PARAMETER_ERROR")]
+ BATCH_CONFLICTING_PARAMETER_ERROR
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_CONFIG_")]
+ public errordomain ConfigError {
+ DSN_NOT_FOUND_ERROR,
+ PERMISSION_ERROR,
+ PROVIDER_NOT_FOUND_ERROR,
+ PROVIDER_CREATION_ERROR
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_CONNECTION_")]
+ public errordomain ConnectionError {
+ DSN_NOT_FOUND_ERROR,
+ PROVIDER_NOT_FOUND_ERROR,
+ PROVIDER_ERROR,
+ NO_CNC_SPEC_ERROR,
+ NO_PROVIDER_SPEC_ERROR,
+ OPEN_ERROR,
+ STATEMENT_TYPE_ERROR,
+ CANT_LOCK_ERROR,
+ TASK_NOT_FOUND_ERROR,
+ UNSUPPORTED_THREADS_ERROR,
+ CLOSED_ERROR,
+ META_DATA_CONTEXT_ERROR
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_CONNECTION_EVENT_CODE_")]
+ public enum ConnectionEventCode {
+ CONSTRAINT_VIOLATION,
+ RESTRICT_VIOLATION,
+ NOT_NULL_VIOLATION,
+ FOREIGN_KEY_VIOLATION,
+ UNIQUE_VIOLATION,
+ CHECK_VIOLATION,
+ INSUFFICIENT_PRIVILEGES,
+ UNDEFINED_COLUMN,
+ UNDEFINED_FUNCTION,
+ UNDEFINED_TABLE,
+ DUPLICATE_COLUMN,
+ DUPLICATE_DATABASE,
+ DUPLICATE_FUNCTION,
+ DUPLICATE_SCHEMA,
+ DUPLICATE_TABLE,
+ DUPLICATE_ALIAS,
+ DUPLICATE_OBJECT,
+ SYNTAX_ERROR,
+ UNKNOWN
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_CONNECTION_EVENT_")]
+ public enum ConnectionEventType {
+ NOTICE,
+ WARNING,
+ ERROR,
+ COMMAND
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_CONNECTION_FEATURE_")]
+ public enum ConnectionFeature {
+ AGGREGATES,
+ BLOBS,
+ INDEXES,
+ INHERITANCE,
+ NAMESPACES,
+ PROCEDURES,
+ SEQUENCES,
+ SQL,
+ TRANSACTIONS,
+ SAVEPOINTS,
+ SAVEPOINTS_REMOVE,
+ TRIGGERS,
+ UPDATABLE_CURSOR,
+ USERS,
+ VIEWS,
+ XA_TRANSACTIONS,
+ MULTI_THREADING,
+ LAST
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_CONNECTION_META_")]
+ public enum ConnectionMetaType {
+ NAMESPACES,
+ TYPES,
+ TABLES,
+ VIEWS,
+ FIELDS,
+ INDEXES
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_CONNECTION_OPTIONS_")]
+ [Flags]
+ public enum ConnectionOptions {
+ NONE,
+ READ_ONLY,
+ SQL_IDENTIFIERS_CASE_SENSITIVE,
+ THREAD_SAFE,
+ THREAD_ISOLATED,
+ AUTO_META_DATA
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_DATA_COMPARATOR_")]
+ public enum DataComparatorError {
+ MISSING_DATA_MODEL_ERROR,
+ COLUMN_TYPES_MISMATCH_ERROR,
+ MODEL_ACCESS_ERROR,
+ USER_CANCELLED_ERROR
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_DATA_META_WRAPPER_MODE_")]
+ public enum DataMetaWrapperMode {
+ LC,
+ UC
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_DATA_MODEL_ACCESS_")]
+ [Flags]
+ public enum DataModelAccessFlags {
+ RANDOM,
+ CURSOR_FORWARD,
+ CURSOR_BACKWARD,
+ CURSOR,
+ INSERT,
+ UPDATE,
+ DELETE,
+ WRITE
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_DATA_MODEL_HINT_")]
+ public enum DataModelHint {
+ START_BATCH_UPDATE,
+ END_BATCH_UPDATE,
+ REFRESH
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_DATA_MODEL_IO_")]
+ public enum DataModelIOFormat {
+ DATA_ARRAY_XML,
+ TEXT_SEPARATED
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_DATA_MODEL_ITER_COLUMN_OUT_OF_RANGE_")]
+ public enum DataModelIterError {
+ [CCode (cname = "GDA_DATA_MODEL_ITER_COLUMN_OUT_OF_RANGE_ERROR")]
+ DATA_MODEL_ITER_COLUMN_OUT_OF_RANGE_ERROR
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_DATA_PIVOT_")]
+ public enum DataPivotAggregate {
+ AVG,
+ COUNT,
+ MAX,
+ MIN,
+ SUM
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_DATA_PIVOT_")]
+ public enum DataPivotError {
+ INTERNAL_ERROR,
+ SOURCE_MODEL_ERROR,
+ FIELD_FORMAT_ERROR,
+ USAGE_ERROR,
+ OVERFLOW_ERROR
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_DATA_PIVOT_FIELD_")]
+ public enum DataPivotFieldType {
+ ROW,
+ COLUMN
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_DATA_PROXY_")]
+ public enum DataProxyError {
+ COMMIT_ERROR,
+ COMMIT_CANCELLED,
+ READ_ONLY_VALUE,
+ READ_ONLY_ROW,
+ FILTER_ERROR
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_DATA_SELECT_COND_")]
+ public enum DataSelectConditionType {
+ PK,
+ ALL_COLUMNS
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_DATA_SELECT_")]
+ public enum DataSelectError {
+ MODIFICATION_STATEMENT_ERROR,
+ MISSING_MODIFICATION_STATEMENT_ERROR,
+ CONNECTION_ERROR,
+ ACCESS_ERROR,
+ SQL_ERROR,
+ SAFETY_LOCKED_ERROR
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_DIFF_")]
+ public enum DiffType {
+ ADD_ROW,
+ REMOVE_ROW,
+ MODIFY_ROW
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_HOLDER_")]
+ public enum HolderError {
+ STRING_CONVERSION_ERROR,
+ VALUE_TYPE_ERROR,
+ VALUE_NULL_ERROR
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_LDAP_SEARCH_")]
+ public enum LdapSearchScope {
+ BASE,
+ ONELEVEL,
+ SUBTREE
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_META_DB_")]
+ public enum MetaDbObjectType {
+ UNKNOWN,
+ TABLE,
+ VIEW
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_META_FOREIGN_KEY_")]
+ public enum MetaForeignKeyPolicy {
+ UNKNOWN,
+ NONE,
+ NO_ACTION,
+ RESTRICT,
+ CASCADE,
+ SET_NULL,
+ SET_DEFAULT
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_META_GRAPH_")]
+ [Flags]
+ public enum MetaGraphInfo {
+ [CCode (cname = "GDA_META_GRAPH_COLUMNS")]
+ META_GRAPH_COLUMNS
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_META_SORT_")]
+ public enum MetaSortType {
+ ALHAPETICAL,
+ DEPENDENCIES
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_META_STORE_")]
+ public enum MetaStoreChangeType {
+ ADD,
+ REMOVE,
+ MODIFY
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_META_STORE_")]
+ public enum MetaStoreError {
+ INCORRECT_SCHEMA_ERROR,
+ UNSUPPORTED_PROVIDER_ERROR,
+ INTERNAL_ERROR,
+ META_CONTEXT_ERROR,
+ MODIFY_CONTENTS_ERROR,
+ EXTRACT_SQL_ERROR,
+ ATTRIBUTE_NOT_FOUND_ERROR,
+ ATTRIBUTE_ERROR,
+ SCHEMA_OBJECT_NOT_FOUND_ERROR,
+ SCHEMA_OBJECT_CONFLICT_ERROR,
+ SCHEMA_OBJECT_DESCR_ERROR,
+ TRANSACTION_ALREADY_STARTED_ERROR
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_META_STRUCT_")]
+ public enum MetaStructError {
+ UNKNOWN_OBJECT_ERROR,
+ DUPLICATE_OBJECT_ERROR,
+ INCOHERENCE_ERROR,
+ XML_ERROR
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_META_STRUCT_FEATURE_")]
+ [Flags]
+ public enum MetaStructFeature {
+ NONE,
+ FOREIGN_KEYS,
+ VIEW_DEPENDENCIES,
+ ALL
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_SERVER_OPERATION_CREATE_TABLE_")]
+ [Flags]
+ public enum ServerOperationCreateTableFlag {
+ NOTHING_FLAG,
+ PKEY_FLAG,
+ NOT_NULL_FLAG,
+ UNIQUE_FLAG,
+ AUTOINC_FLAG,
+ FKEY_FLAG,
+ PKEY_AUTOINC_FLAG
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_SERVER_OPERATION_")]
+ public enum ServerOperationError {
+ OBJECT_NAME_ERROR,
+ INCORRECT_VALUE_ERROR,
+ XML_ERROR
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_SERVER_OPERATION_STATUS_")]
+ public enum ServerOperationNodeStatus {
+ OPTIONAL,
+ REQUIRED,
+ UNKNOWN
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_SERVER_OPERATION_NODE_")]
+ public enum ServerOperationNodeType {
+ PARAMLIST,
+ DATA_MODEL,
+ PARAM,
+ SEQUENCE,
+ SEQUENCE_ITEM,
+ DATA_MODEL_COLUMN,
+ UNKNOWN
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_SERVER_OPERATION_")]
+ public enum ServerOperationType {
+ CREATE_DB,
+ DROP_DB,
+ CREATE_TABLE,
+ DROP_TABLE,
+ RENAME_TABLE,
+ ADD_COLUMN,
+ DROP_COLUMN,
+ CREATE_INDEX,
+ DROP_INDEX,
+ CREATE_VIEW,
+ DROP_VIEW,
+ COMMENT_TABLE,
+ COMMENT_COLUMN,
+ CREATE_USER,
+ ALTER_USER,
+ DROP_USER,
+ LAST
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_SERVER_PROVIDER_")]
+ public enum ServerProviderError {
+ METHOD_NON_IMPLEMENTED_ERROR,
+ PREPARE_STMT_ERROR,
+ EMPTY_STMT_ERROR,
+ MISSING_PARAM_ERROR,
+ STATEMENT_EXEC_ERROR,
+ OPERATION_ERROR,
+ INTERNAL_ERROR,
+ BUSY_ERROR,
+ NON_SUPPORTED_ERROR,
+ SERVER_VERSION_ERROR,
+ DATA_ERROR,
+ DEFAULT_VALUE_HANDLING_ERROR,
+ MISUSE_ERROR,
+ FILE_NOT_FOUND_ERROR
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_SET_")]
+ public enum SetError {
+ XML_SPEC_ERROR,
+ HOLDER_NOT_FOUND_ERROR,
+ INVALID_ERROR,
+ READ_ONLY_ERROR,
+ IMPLEMENTATION_ERROR
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_SQL_BUILDER_")]
+ public enum SqlBuilderError {
+ WRONG_TYPE_ERROR,
+ MISUSE_ERROR
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_SQL_IDENTIFIERS_")]
+ [Flags]
+ public enum SqlIdentifierStyle {
+ LOWER_CASE,
+ UPPER_CASE
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_SQL_OPERATOR_TYPE_")]
+ public enum SqlOperatorType {
+ AND,
+ OR,
+ EQ,
+ IS,
+ LIKE,
+ BETWEEN,
+ GT,
+ LT,
+ GEQ,
+ LEQ,
+ DIFF,
+ REGEXP,
+ REGEXP_CI,
+ NOT_REGEXP,
+ NOT_REGEXP_CI,
+ SIMILAR,
+ ISNULL,
+ ISNOTNULL,
+ NOT,
+ IN,
+ NOTIN,
+ CONCAT,
+ PLUS,
+ MINUS,
+ STAR,
+ DIV,
+ REM,
+ BITAND,
+ BITOR,
+ BITNOT,
+ ILIKE
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_SQL_PARSER_")]
+ public enum SqlParserError {
+ SYNTAX_ERROR,
+ OVERFLOW_ERROR,
+ EMPTY_SQL_ERROR
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_SQL_PARSER_FLAVOUR_")]
+ public enum SqlParserFlavour {
+ STANDARD,
+ SQLITE,
+ MYSQL,
+ ORACLE,
+ POSTGRESQL
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_SQL_PARSER_MODE_")]
+ public enum SqlParserMode {
+ PARSE,
+ DELIMIT
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_SQL_SELECT_JOIN_")]
+ public enum SqlSelectJoinType {
+ CROSS,
+ NATURAL,
+ INNER,
+ LEFT,
+ RIGHT,
+ FULL;
+ public static unowned string to_string (Gda.SqlSelectJoinType type);
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_SQL_STATEMENT_COMPOUND_")]
+ public enum SqlStatementCompoundType {
+ UNION,
+ UNION_ALL,
+ INTERSECT,
+ INTERSECT_ALL,
+ EXCEPT,
+ EXCEPT_ALL
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_SQL_STATEMENT_")]
+ public enum SqlStatementType {
+ SELECT,
+ INSERT,
+ UPDATE,
+ DELETE,
+ COMPOUND,
+ BEGIN,
+ ROLLBACK,
+ COMMIT,
+ SAVEPOINT,
+ ROLLBACK_SAVEPOINT,
+ DELETE_SAVEPOINT,
+ UNKNOWN,
+ NONE
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_STATEMENT_")]
+ public enum StatementError {
+ PARSE_ERROR,
+ SYNTAX_ERROR,
+ NO_CNC_ERROR,
+ CNC_CLOSED_ERROR,
+ EXEC_ERROR,
+ PARAM_TYPE_ERROR,
+ PARAM_ERROR
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_STATEMENT_MODEL_")]
+ [Flags]
+ public enum StatementModelUsage {
+ RANDOM_ACCESS,
+ CURSOR_FORWARD,
+ CURSOR_BACKWARD,
+ CURSOR,
+ ALLOW_NOPARAM
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_STATEMENT_SQL_")]
+ [Flags]
+ public enum StatementSqlFlag {
+ PARAMS_AS_VALUES,
+ PRETTY,
+ PARAMS_LONG,
+ PARAMS_SHORT,
+ PARAMS_AS_COLON,
+ PARAMS_AS_DOLLAR,
+ PARAMS_AS_QMARK,
+ PARAMS_AS_UQMARK
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_THREAD_NOTIFICATION_")]
+ public enum ThreadNotificationType {
+ JOB,
+ SIGNAL
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_THREAD_WRAPPER_UNKNOWN_")]
+ public enum ThreadWrapperError {
+ [CCode (cname = "GDA_THREAD_WRAPPER_UNKNOWN_ERROR")]
+ THREAD_WRAPPER_UNKNOWN_ERROR
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_TRANSACTION_ISOLATION_")]
+ public enum TransactionIsolation {
+ UNKNOWN,
+ READ_COMMITTED,
+ READ_UNCOMMITTED,
+ REPEATABLE_READ,
+ SERIALIZABLE
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_TRANSACTION_STATUS_EVENT_")]
+ public enum TransactionStatusEventType {
+ SAVEPOINT,
+ SQL,
+ SUB_TRANSACTION
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_TRANSACTION_STATUS_STATE_")]
+ public enum TransactionStatusState {
+ OK,
+ FAILED
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_TREE_UNKNOWN_")]
+ public enum TreeError {
+ [CCode (cname = "GDA_TREE_UNKNOWN_ERROR")]
+ TREE_UNKNOWN_ERROR
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_TREE_MANAGER_UNKNOWN_")]
+ public enum TreeManagerError {
+ [CCode (cname = "GDA_TREE_MANAGER_UNKNOWN_ERROR")]
+ TREE_MANAGER_UNKNOWN_ERROR
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_TREE_NODE_UNKNOWN_")]
+ public enum TreeNodeError {
+ [CCode (cname = "GDA_TREE_NODE_UNKNOWN_ERROR")]
+ TREE_NODE_UNKNOWN_ERROR
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_VALUE_ATTR_")]
+ [Flags]
+ public enum ValueAttribute {
+ NONE,
+ IS_NULL,
+ CAN_BE_NULL,
+ IS_DEFAULT,
+ CAN_BE_DEFAULT,
+ IS_UNCHANGED,
+ ACTIONS_SHOWN,
+ DATA_NON_VALID,
+ HAS_VALUE_ORIG,
+ NO_MODIF,
+ UNUSED
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_XA_TRANSACTION_")]
+ public enum XaTransactionError {
+ ALREADY_REGISTERED_ERROR,
+ DTP_NOT_SUPPORTED_ERROR,
+ CONNECTION_BRANCH_LENGTH_ERROR
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_DATA_MODEL_")]
+ public errordomain DataModelError {
+ ROW_OUT_OF_RANGE_ERROR,
+ COLUMN_OUT_OF_RANGE_ERROR,
+ VALUES_LIST_ERROR,
+ VALUE_TYPE_ERROR,
+ ROW_NOT_FOUND_ERROR,
+ ACCESS_ERROR,
+ FEATURE_NON_SUPPORTED_ERROR,
+ FILE_EXIST_ERROR,
+ XML_FORMAT_ERROR,
+ TRUNCATED_ERROR,
+ OTHER_ERROR;
+ public static GLib.Quark quark ();
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", cprefix = "GDA_SQL_")]
+ public errordomain SqlError {
+ STRUCTURE_CONTENTS_ERROR,
+ MALFORMED_IDENTIFIER_ERROR,
+ MISSING_IDENTIFIER_ERROR,
+ VALIDATION_ERROR;
+ public static GLib.Quark quark ();
+ }
+ [CCode (cheader_filename = "libgda/libgda.h", has_target = false)]
+ public delegate void AttributesManagerFunc (string att_name, GLib.Value value, void* data);
+ [CCode (cheader_filename = "libgda/libgda.h", has_target = false)]
+ public delegate void AttributesManagerSignal (GLib.Object obj, string att_name, GLib.Value value, void* data);
+ [CCode (cheader_filename = "libgda/libgda.h", has_target = false)]
+ public delegate void ServerProviderAsyncCallback (Gda.ServerProvider provider, Gda.Connection cnc, uint task_id, bool result_status, GLib.Error error, void* data);
+ [CCode (cheader_filename = "libgda/libgda.h", has_target = false)]
+ public delegate void ServerProviderExecCallback (Gda.ServerProvider provider, Gda.Connection cnc, uint task_id, GLib.Object result_obj, GLib.Error error, void* data);
+ [CCode (cheader_filename = "libgda/libgda.h", has_target = false)]
+ public delegate string SqlRenderingValue (GLib.Value value, Gda.SqlRenderingContext context) throws GLib.Error;
+ [CCode (cheader_filename = "libgda/libgda.h", has_target = false)]
+ public delegate bool SqlReservedKeywordsFunc (string word);
+ [CCode (cheader_filename = "libgda/libgda.h", has_target = false)]
+ public delegate void ThreadWrapperCallback (Gda.ThreadWrapper wrapper, void* instance, string signame, int n_param_values, GLib.Value param_values, void* gda_reserved, void* data);
+ [CCode (cheader_filename = "libgda/libgda.h", has_target = false)]
+ public delegate void ThreadWrapperVoidFunc (void* arg) throws GLib.Error;
+ [CCode (cheader_filename = "libgda/libgda.h", cname = "GDA_ATTRIBUTE_AUTO_INCREMENT")]
+ public const string ATTRIBUTE_AUTO_INCREMENT;
+ [CCode (cheader_filename = "libgda/libgda.h", cname = "GDA_ATTRIBUTE_DESCRIPTION")]
+ public const string ATTRIBUTE_DESCRIPTION;
+ [CCode (cheader_filename = "libgda/libgda.h", cname = "GDA_ATTRIBUTE_IS_DEFAULT")]
+ public const string ATTRIBUTE_IS_DEFAULT;
+ [CCode (cheader_filename = "libgda/libgda.h", cname = "GDA_ATTRIBUTE_NAME")]
+ public const string ATTRIBUTE_NAME;
+ [CCode (cheader_filename = "libgda/libgda.h", cname = "GDA_ATTRIBUTE_NUMERIC_PRECISION")]
+ public const string ATTRIBUTE_NUMERIC_PRECISION;
+ [CCode (cheader_filename = "libgda/libgda.h", cname = "GDA_ATTRIBUTE_NUMERIC_SCALE")]
+ public const string ATTRIBUTE_NUMERIC_SCALE;
+ [CCode (cheader_filename = "libgda/libgda.h", cname = "GDA_ATTRIBUTE_TREE_NODE_UNKNOWN_CHILDREN")]
+ public const string ATTRIBUTE_TREE_NODE_UNKNOWN_CHILDREN;
+ [CCode (cheader_filename = "libgda/libgda.h", cname = "GDA_EXTRA_AUTO_INCREMENT")]
+ public const string EXTRA_AUTO_INCREMENT;
+ [CCode (cheader_filename = "libgda/libgda.h", cname = "GDA_SQLSTATE_GENERAL_ERROR")]
+ public const string SQLSTATE_GENERAL_ERROR;
+ [CCode (cheader_filename = "libgda/libgda.h", cname = "GDA_SQLSTATE_NO_ERROR")]
+ public const string SQLSTATE_NO_ERROR;
+ [CCode (cheader_filename = "libgda/libgda.h", cname = "GDA_TIMEZONE_INVALID")]
+ public const int TIMEZONE_INVALID;
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static string alphanum_to_text (string text);
+ [CCode (array_length = false, array_null_terminated = true, cheader_filename = "libgda/libgda.h")]
+ public static string[] completion_list_get (Gda.Connection cnc, string sql, int start, int end);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static bool compute_dml_statements (Gda.Connection cnc, Gda.Statement select_stmt, bool require_pk, owned Gda.Statement? insert_stmt, owned Gda.Statement? update_stmt, owned Gda.Statement? delete_stmt) throws GLib.Error;
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static unowned Gda.DataHandler data_handler_get_default (GLib.Type for_type);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static void dsn_split (string string, string out_dsn, string out_username, string out_password);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static GLib.Type g_type_from_string (string str);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static unowned string g_type_to_string (GLib.Type type);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static bool identifier_equal (string id1, string id2);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static uint identifier_hash (string id);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static void log_disable ();
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static void log_enable ();
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static bool log_is_enabled ();
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static bool parse_iso8601_date (GLib.Date gdate, string value);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static bool parse_iso8601_time (Gda.Time timegda, string value);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static bool parse_iso8601_timestamp (Gda.Timestamp timestamp, string value);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static bool rewrite_statement_for_null_parameters (Gda.Statement stmt, Gda.Set @params, owned Gda.Statement? out_stmt) throws GLib.Error;
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static bool rfc1738_decode (string string);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static string rfc1738_encode (string string);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static Gda.Statement select_alter_select_for_empty (Gda.Statement stmt) throws GLib.Error;
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static string sql_identifier_quote (string id, Gda.Connection? cnc, Gda.ServerProvider? prov, bool meta_store_convention, bool force_quotes);
+ [CCode (array_length = false, array_null_terminated = true, cheader_filename = "libgda/libgda.h")]
+ public static string[] sql_identifier_split (string id);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static Gda.SqlOperatorType sql_operation_operator_from_string (string op);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static unowned string sql_operation_operator_to_string (Gda.SqlOperatorType op);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static Gda.Binary string_to_binary (string? str);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static Gda.Blob string_to_blob (string str);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static string text_to_alphanum (string text);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static bool utility_check_data_model_v (Gda.DataModel model, [CCode (array_length_cname = "nbcols", array_length_pos = 1.5)] GLib.Type[] types);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static bool utility_data_model_dump_data_to_xml (Gda.DataModel model, [CCode (type = "xmlNodePtr")] Xml.Node* parent, [CCode (array_length_cname = "nb_cols", array_length_pos = 3.5)] int[]? cols, [CCode (array_length_cname = "nb_rows", array_length_pos = 4.5)] int[]? rows, bool use_col_ids);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static unowned string utility_data_model_find_column_description (Gda.DataSelect model, string field_name);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static bool utility_holder_load_attributes (Gda.Holder holder, [CCode (type = "xmlNodePtr")] Xml.Node* node, GLib.SList<Gda.DataModel> sources) throws GLib.Error;
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static int value_compare (GLib.Value value1, GLib.Value value2);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static int value_differ (GLib.Value value1, GLib.Value value2);
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public static string value_stringify (GLib.Value value);
+}
--- /dev/null
+/* seed.vapi generated by vapigen, do not modify. */
+
+namespace Seed {
+ [CCode (cheader_filename = "seed.h")]
+ [Compact]
+ public class Class {
+ }
+ [CCode (cheader_filename = "seed.h", ref_function = "seed_context_ref", unref_function = "seed_context_unref")]
+ [Compact]
+ public class Context {
+ public static void collect (Seed.GlobalContext ctx);
+ public static unowned Seed.GlobalContext create (Seed.ContextGroup group, Seed.Class global_class);
+ public unowned Seed.Object get_global_object ();
+ }
+ [CCode (cheader_filename = "seed.h")]
+ [Compact]
+ public class ContextGroup {
+ }
+ [CCode (cheader_filename = "seed.h", free_function = "seed_engine_destroy")]
+ [Compact]
+ public class Engine {
+ public weak Seed.GlobalContext context;
+ public weak Seed.Value global;
+ public weak Seed.ContextGroup group;
+ public weak string search_path;
+ public unowned Seed.Value expose_gobject (string js_name, GLib.Object object, string gir_namespace, Seed.Exception exception);
+ public unowned Seed.Value expose_namespace (string namespace_name, Seed.Exception exception);
+ public unowned string get_search_path ();
+ public void set_search_path (string path);
+ }
+ [CCode (cheader_filename = "seed.h")]
+ [Compact]
+ public class Exception {
+ public static unowned string get_file (Seed.Context ctx, Seed.Exception exception);
+ public static uint get_line (Seed.Context ctx, Seed.Exception exception);
+ public static unowned string get_message (Seed.Context ctx, Seed.Exception exception);
+ public static unowned string get_name (Seed.Context ctx, Seed.Exception exception);
+ public static unowned string to_string (Seed.Context ctx, Seed.Exception exception);
+ }
+ [CCode (cheader_filename = "seed.h")]
+ [Compact]
+ public class GlobalContext {
+ }
+ [CCode (cheader_filename = "seed.h")]
+ [Compact]
+ public class Object {
+ public static unowned Seed.Value call (Seed.Context ctx, Seed.Object object, Seed.Object this_object, size_t argument_count, Seed.Value[] arguments, Seed.Exception exception);
+ public static unowned string copy_property_names (Seed.Context ctx, Seed.Object object);
+ public void* get_private ();
+ public static unowned Seed.Value get_property (Seed.Context ctx, Seed.Object object, string name);
+ public static unowned Seed.Value get_property_at_index (Seed.Context ctx, Seed.Object object, int index, Seed.Exception exception);
+ public static unowned Seed.Object get_prototype (Seed.Context ctx, Seed.Object obj);
+ public static bool is_of_class (Seed.Context ctx, Seed.Object obj, Seed.Class klass);
+ public void set_private (void* value);
+ public static bool set_property (Seed.Context ctx, Seed.Object object, string name, Seed.Value value);
+ public static void set_property_at_index (Seed.Context ctx, Seed.Object object, int index, Seed.Value value, Seed.Exception exception);
+ }
+ [CCode (cheader_filename = "seed.h", free_function = "seed_script_destroy")]
+ [Compact]
+ public class Script {
+ public unowned Seed.Exception exception ();
+ [CCode (has_construct_function = false)]
+ public Script.from_file (Seed.Context ctx, string file);
+ }
+ [CCode (cheader_filename = "seed.h", ref_function = "seed_string_ref", unref_function = "seed_string_unref")]
+ [Compact]
+ public class String {
+ public size_t get_maximum_size ();
+ public bool is_equal (Seed.String b);
+ public bool is_equal_utf8 (string b);
+ public size_t to_utf8_buffer (string buffer, size_t buffer_size);
+ }
+ [CCode (cheader_filename = "seed.h")]
+ [Compact]
+ public class Value {
+ public static unowned Seed.Value from_binary_string (Seed.Context ctx, string[] bytes, Seed.Exception exception);
+ public static unowned Seed.Value from_boolean (Seed.Context ctx, bool val, Seed.Exception exception);
+ public static unowned Seed.Value from_char (Seed.Context ctx, char val, Seed.Exception exception);
+ public static unowned Seed.Value from_double (Seed.Context ctx, double val, Seed.Exception exception);
+ public static unowned Seed.Value from_filename (Seed.Context ctx, Seed.Value val, Seed.Value exception);
+ public static unowned Seed.Value from_float (Seed.Context ctx, float val, Seed.Exception exception);
+ public static unowned Seed.Value from_gvalue (Seed.Context ctx, GLib.Value gval, Seed.Exception exception);
+ public static unowned Seed.Value from_int (Seed.Context ctx, int val, Seed.Exception exception);
+ public static unowned Seed.Value from_int64 (Seed.Context ctx, int64 val, Seed.Exception exception);
+ public static unowned Seed.Value from_long (Seed.Context ctx, long val, Seed.Exception exception);
+ public static unowned Seed.Value from_object (Seed.Context ctx, GLib.Object val, Seed.Exception exception);
+ public static unowned Seed.Value from_string (Seed.Context ctx, string val, Seed.Exception exception);
+ public static unowned Seed.Value from_uchar (Seed.Context ctx, uchar val, Seed.Exception exception);
+ public static unowned Seed.Value from_uint (Seed.Context ctx, uint val, Seed.Exception exception);
+ public static unowned Seed.Value from_uint64 (Seed.Context ctx, uint64 val, Seed.Exception exception);
+ public static unowned Seed.Value from_ulong (Seed.Context ctx, ulong val, Seed.Exception exception);
+ public static bool is_function (Seed.Context ctx, Seed.Object value);
+ public static bool is_null (Seed.Context ctx, Seed.Value value);
+ public static bool is_number (Seed.Context ctx, Seed.Value value);
+ public static bool is_object (Seed.Context ctx, Seed.Value value);
+ public static bool is_object_of_class (Seed.Context ctx, Seed.Value value, Seed.Class klass);
+ public static bool is_string (Seed.Context ctx, Seed.Value value);
+ public static bool is_undefined (Seed.Context ctx, Seed.Value value);
+ public static void protect (Seed.Context ctx, Seed.Value value);
+ public static bool to_boolean (Seed.Context ctx, Seed.Value val, Seed.Exception exception);
+ public static char to_char (Seed.Context ctx, Seed.Value val, Seed.Exception exception);
+ public static double to_double (Seed.Context ctx, Seed.Value val, Seed.Exception exception);
+ public static unowned string to_filename (Seed.Context ctx, Seed.Value val, Seed.Value exception);
+ public static float to_float (Seed.Context ctx, Seed.Value val, Seed.Exception exception);
+ public static bool to_format (Seed.Context ctx, string format, Seed.Value values, Seed.Value exception);
+ public static bool to_gvalue (Seed.Context ctx, Seed.Value val, GLib.Type type, GLib.Value gval, Seed.Exception exception);
+ public static int to_int (Seed.Context ctx, Seed.Value val, Seed.Exception exception);
+ public static int64 to_int64 (Seed.Context ctx, Seed.Value val, Seed.Exception exception);
+ public static long to_long (Seed.Context ctx, Seed.Value val, Seed.Exception exception);
+ public static unowned GLib.Object to_object (Seed.Context ctx, Seed.Value val, Seed.Exception exception);
+ public static unowned string to_string (Seed.Context ctx, Seed.Value val, Seed.Exception exception);
+ public static uchar to_uchar (Seed.Context ctx, Seed.Value val, Seed.Exception exception);
+ public static uint to_uint (Seed.Context ctx, Seed.Value val, Seed.Exception exception);
+ public static uint64 to_uint64 (Seed.Context ctx, Seed.Value val, Seed.Exception exception);
+ public static ulong to_ulong (Seed.Context ctx, Seed.Value val, Seed.Exception exception);
+ public static void unprotect (Seed.Context ctx, Seed.Value value);
+ }
+ [CCode (cheader_filename = "seed.h")]
+ [Compact]
+ public class seed_class_definition {
+ public Seed.ClassAttributes attributes;
+ public weak Seed.ObjectCallAsConstructorCallback call_as_constructor;
+ public weak Seed.ObjectCallAsFunctionCallback call_as_function;
+ public weak string class_name;
+ public weak Seed.ObjectConvertToTypeCallback convert_to_type;
+ public weak Seed.ObjectDeletePropertyCallback delete_property;
+ public weak Seed.ObjectFinalizeCallback finalize;
+ public weak Seed.ObjectGetPropertyCallback get_property;
+ public weak Seed.ObjectGetPropertyNamesCallback get_property_names;
+ public weak Seed.ObjectHasInstanceCallback has_instance;
+ public weak Seed.ObjectHasPropertyCallback has_property;
+ public weak Seed.ObjectInitializeCallback initialize;
+ public weak Seed.Class parent_class;
+ public weak Seed.ObjectSetPropertyCallback set_property;
+ public weak Seed.seed_static_function static_functions;
+ public weak Seed.seed_static_value static_values;
+ public int version;
+ }
+ [CCode (cheader_filename = "seed.h")]
+ [Compact]
+ public class seed_static_function {
+ public Seed.PropertyAttributes attributes;
+ public weak Seed.ObjectCallAsFunctionCallback callback;
+ public weak string name;
+ }
+ [CCode (cheader_filename = "seed.h")]
+ [Compact]
+ public class seed_static_value {
+ public Seed.PropertyAttributes attributes;
+ public weak Seed.ObjectGetPropertyCallback get_property;
+ public weak string name;
+ public weak Seed.ObjectSetPropertyCallback set_property;
+ }
+ [CCode (cheader_filename = "seed.h", cprefix = "SEED_CLASS_ATTRIBUTE_", has_type_id = false)]
+ public enum ClassAttributes {
+ NONE,
+ NO_SHARED_PROTOTYPE
+ }
+ [CCode (cheader_filename = "seed.h", cprefix = "SEED_PROPERTY_ATTRIBUTE_", has_type_id = false)]
+ public enum PropertyAttributes {
+ NONE,
+ READ_ONLY,
+ DONT_ENUM,
+ DONT_DELETE
+ }
+ [CCode (cheader_filename = "seed.h", cprefix = "SEED_TYPE_", has_type_id = false)]
+ public enum Type {
+ UNDEFINED,
+ NULL,
+ BOOLEAN,
+ NUMBER,
+ STRING,
+ OBJECT
+ }
+ [CCode (cheader_filename = "seed.h", has_target = false)]
+ public delegate unowned Seed.Value FunctionCallback (Seed.Context ctx, Seed.Object function, Seed.Object this_object, size_t argument_count, Seed.Value[] arguments, Seed.Exception exception);
+ [CCode (cheader_filename = "seed.h", has_target = false)]
+ public delegate unowned Seed.Object ModuleInitCallback (Seed.Engine eng);
+ [CCode (cheader_filename = "seed.h", has_target = false)]
+ public delegate unowned Seed.Value ObjectCallAsConstructorCallback (Seed.Context ctx, Seed.Object constructor, size_t argument_count, Seed.Value[] arguments, Seed.Exception exception);
+ [CCode (cheader_filename = "seed.h", has_target = false)]
+ public delegate unowned Seed.Value ObjectCallAsFunctionCallback (Seed.Context ctx, Seed.Object function, Seed.Object this_object, size_t argument_count, Seed.Value[] arguments, Seed.Exception exception);
+ [CCode (cheader_filename = "seed.h", has_target = false)]
+ public delegate unowned Seed.Value ObjectConvertToTypeCallback (Seed.Context ctx, Seed.Object object, Seed.Type type, Seed.Exception exception);
+ [CCode (cheader_filename = "seed.h", has_target = false)]
+ public delegate bool ObjectDeletePropertyCallback (Seed.Context ctx, Seed.Object object, Seed.String property_name, Seed.Exception e);
+ [CCode (cheader_filename = "seed.h", has_target = false)]
+ public delegate void ObjectFinalizeCallback (Seed.Object object);
+ [CCode (cheader_filename = "seed.h", has_target = false)]
+ public delegate unowned Seed.Value ObjectGetPropertyCallback (Seed.Context ctx, Seed.Object object, Seed.String property_name, Seed.Exception e);
+ [CCode (cheader_filename = "seed.h", has_target = false)]
+ public delegate void ObjectGetPropertyNamesCallback ();
+ [CCode (cheader_filename = "seed.h", has_target = false)]
+ public delegate bool ObjectHasInstanceCallback (Seed.Context ctx, Seed.Object constructor, Seed.Object instance_p, Seed.Exception exception);
+ [CCode (cheader_filename = "seed.h", has_target = false)]
+ public delegate bool ObjectHasPropertyCallback (Seed.Context ctx, Seed.Object object, Seed.String str);
+ [CCode (cheader_filename = "seed.h", has_target = false)]
+ public delegate void ObjectInitializeCallback (Seed.Context ctx, Seed.Object object);
+ [CCode (cheader_filename = "seed.h", has_target = false)]
+ public delegate bool ObjectSetPropertyCallback (Seed.Context ctx, Seed.Object object, Seed.String property_name, Seed.Value value, Seed.Exception e);
+ [CCode (cheader_filename = "seed.h")]
+ public static unowned Seed.Object closure_get_callable (GLib.Closure c);
+ [CCode (cheader_filename = "seed.h")]
+ public static unowned Seed.Value closure_invoke (GLib.Closure closure, Seed.Value args, uint argc, Seed.Exception exception);
+ [CCode (cheader_filename = "seed.h")]
+ public static unowned Seed.Value closure_invoke_with_context (Seed.Context ctx, GLib.Closure closure, Seed.Value args, uint argc, Seed.Exception exception);
+ [CCode (cheader_filename = "seed.h")]
+ public static unowned GLib.Closure closure_new (Seed.Context ctx, Seed.Object function, string description);
+ [CCode (cheader_filename = "seed.h")]
+ public static void closure_warn_exception (GLib.Closure c, Seed.Context ctx, Seed.Exception exception);
+ [CCode (cheader_filename = "seed.h")]
+ public static unowned Seed.Class create_class (Seed.seed_class_definition def);
+ [CCode (cheader_filename = "seed.h")]
+ public static void create_function (Seed.Context ctx, string name, Seed.FunctionCallback func, Seed.Object obj);
+ [CCode (cheader_filename = "seed.h")]
+ public static unowned Seed.Value evaluate (Seed.Context ctx, Seed.Script s, Seed.Object this_object);
+ [CCode (cheader_filename = "seed.h")]
+ public static unowned GLib.OptionGroup get_option_group ();
+ [CCode (cheader_filename = "seed.h")]
+ public static void importer_add_global (Seed.Context ctx, string name);
+ [CCode (cheader_filename = "seed.h")]
+ public static void importer_set_search_path (Seed.Context ctx, string search_path);
+ [CCode (cheader_filename = "seed.h")]
+ public static unowned Seed.Engine init (int argc, string argv);
+ [CCode (cheader_filename = "seed.h")]
+ public static unowned Seed.Engine init_constrained (int argc, string argv);
+ [CCode (cheader_filename = "seed.h")]
+ public static unowned Seed.Engine init_constrained_with_context_and_group (int argc, string argv, Seed.GlobalContext context, Seed.ContextGroup group);
+ [CCode (cheader_filename = "seed.h")]
+ public static unowned Seed.Engine init_with_context (int argc, string? argv, Seed.GlobalContext context);
+ [CCode (cheader_filename = "seed.h")]
+ public static unowned Seed.Engine init_with_context_and_group (int argc, string argv, Seed.GlobalContext context, Seed.ContextGroup group);
+ [CCode (cheader_filename = "seed.h")]
+ public static unowned Seed.Engine init_with_context_group (int argc, string argv, Seed.ContextGroup group);
+ [CCode (cheader_filename = "seed.h")]
+ public static unowned Seed.Object make_array (Seed.Context ctx, Seed.Value elements, size_t num_elements, Seed.Exception exception);
+ [CCode (cheader_filename = "seed.h")]
+ public static unowned Seed.Object make_constructor (Seed.Context ctx, Seed.Class klass, Seed.ObjectCallAsConstructorCallback constructor);
+ [CCode (cheader_filename = "seed.h")]
+ public static void make_exception (Seed.Context ctx, Seed.Exception exception, string name, string message);
+ [CCode (cheader_filename = "seed.h")]
+ public static unowned Seed.Object make_function (Seed.Context ctx, Seed.FunctionCallback func, string name);
+ [CCode (cheader_filename = "seed.h")]
+ public static unowned Seed.Value make_null (Seed.Context ctx);
+ [CCode (cheader_filename = "seed.h")]
+ public static unowned Seed.Object make_object (Seed.Context ctx, Seed.Class klass, void* private_object);
+ [CCode (cheader_filename = "seed.h")]
+ public static unowned Seed.Value make_pointer (Seed.Context ctx, void* pointer);
+ [CCode (cheader_filename = "seed.h")]
+ public static unowned Seed.Script make_script (Seed.Context ctx, string js, string source_url, int line_number);
+ [CCode (cheader_filename = "seed.h")]
+ public static unowned Seed.Value make_undefined (Seed.Context ctx);
+ [CCode (cheader_filename = "seed.h")]
+ public static void* pointer_get_pointer (Seed.Context ctx, Seed.Value pointer);
+ [CCode (cheader_filename = "seed.h")]
+ public static void prepare_global_context (Seed.Context ctx);
+ [CCode (cheader_filename = "seed.h")]
+ public static void signal_connect (Seed.Context ctx, GLib.Object object, string @signal, string script);
+ [CCode (cheader_filename = "seed.h")]
+ public static void signal_connect_value (Seed.Context ctx, GLib.Object object, string @signal, Seed.Value function);
+ [CCode (cheader_filename = "seed.h")]
+ public static unowned Seed.Value simple_evaluate (Seed.Context ctx, string source, Seed.Exception exception);
+}
--- /dev/null
+/* webkit2gtk-4.0.vapi generated by vapigen, do not modify. */
+
+[CCode (cprefix = "WebKit", gir_namespace = "WebKit2", gir_version = "3.0", lower_case_cprefix = "webkit_")]
+namespace WebKit {
+ [CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_authentication_request_get_type ()")]
+ public class AuthenticationRequest : GLib.Object {
+ [CCode (has_construct_function = false)]
+ protected AuthenticationRequest ();
+ public void authenticate (WebKit.Credential? credential);
+ public bool can_save_credentials ();
+ public void cancel ();
+ public unowned string get_host ();
+ public uint get_port ();
+ public WebKit.Credential get_proposed_credential ();
+ public unowned string get_realm ();
+ public WebKit.AuthenticationScheme get_scheme ();
+ public bool is_for_proxy ();
+ public bool is_retry ();
+ public signal void cancelled ();
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_back_forward_list_get_type ()")]
+ public class BackForwardList : GLib.Object {
+ [CCode (has_construct_function = false)]
+ protected BackForwardList ();
+ public unowned WebKit.BackForwardListItem get_back_item ();
+ public GLib.List<weak WebKit.BackForwardListItem> get_back_list ();
+ public GLib.List<weak WebKit.BackForwardListItem> get_back_list_with_limit (uint limit);
+ public unowned WebKit.BackForwardListItem get_current_item ();
+ public unowned WebKit.BackForwardListItem get_forward_item ();
+ public GLib.List<weak WebKit.BackForwardListItem> get_forward_list ();
+ public GLib.List<weak WebKit.BackForwardListItem> get_forward_list_with_limit (uint limit);
+ public uint get_length ();
+ public unowned WebKit.BackForwardListItem get_nth_item (int index);
+ public signal void changed (WebKit.BackForwardListItem? item_added, void* items_removed);
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_back_forward_list_item_get_type ()")]
+ public class BackForwardListItem : GLib.InitiallyUnowned {
+ [CCode (has_construct_function = false)]
+ protected BackForwardListItem ();
+ public unowned string get_original_uri ();
+ public unowned string get_title ();
+ public unowned string get_uri ();
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_context_menu_get_type ()")]
+ public class ContextMenu : GLib.Object {
+ [CCode (has_construct_function = false)]
+ public ContextMenu ();
+ public void append (WebKit.ContextMenuItem item);
+ public unowned WebKit.ContextMenuItem first ();
+ public unowned WebKit.ContextMenuItem get_item_at_position (uint position);
+ public unowned GLib.List<WebKit.ContextMenuItem> get_items ();
+ public uint get_n_items ();
+ public void insert (WebKit.ContextMenuItem item, int position);
+ public unowned WebKit.ContextMenuItem last ();
+ public void move_item (WebKit.ContextMenuItem item, int position);
+ public void prepend (WebKit.ContextMenuItem item);
+ public void remove (WebKit.ContextMenuItem item);
+ public void remove_all ();
+ [CCode (has_construct_function = false)]
+ public ContextMenu.with_items (GLib.List<WebKit.ContextMenuItem> items);
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_context_menu_item_get_type ()")]
+ public class ContextMenuItem : GLib.InitiallyUnowned {
+ [CCode (has_construct_function = false)]
+ public ContextMenuItem (Gtk.Action action);
+ [CCode (has_construct_function = false)]
+ public ContextMenuItem.from_stock_action (WebKit.ContextMenuAction action);
+ [CCode (has_construct_function = false)]
+ public ContextMenuItem.from_stock_action_with_label (WebKit.ContextMenuAction action, string label);
+ public unowned Gtk.Action get_action ();
+ public WebKit.ContextMenuAction get_stock_action ();
+ public unowned WebKit.ContextMenu get_submenu ();
+ public bool is_separator ();
+ [CCode (has_construct_function = false)]
+ public ContextMenuItem.separator ();
+ public void set_submenu (WebKit.ContextMenu? submenu);
+ [CCode (has_construct_function = false)]
+ public ContextMenuItem.with_submenu (string label, WebKit.ContextMenu submenu);
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_cookie_manager_get_type ()")]
+ public class CookieManager : GLib.Object {
+ [CCode (has_construct_function = false)]
+ protected CookieManager ();
+ public void delete_all_cookies ();
+ public void delete_cookies_for_domain (string domain);
+ public async WebKit.CookieAcceptPolicy get_accept_policy (GLib.Cancellable? cancellable) throws GLib.Error;
+ [CCode (array_length = false, array_null_terminated = true)]
+ public async string[] get_domains_with_cookies (GLib.Cancellable? cancellable) throws GLib.Error;
+ public void set_accept_policy (WebKit.CookieAcceptPolicy policy);
+ public void set_persistent_storage (string filename, WebKit.CookiePersistentStorage storage);
+ public signal void changed ();
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "webkit_credential_get_type ()")]
+ [Compact]
+ public class Credential {
+ [CCode (has_construct_function = false)]
+ public Credential (string username, string password, WebKit.CredentialPersistence persistence);
+ public WebKit.Credential copy ();
+ public void free ();
+ public unowned string get_password ();
+ public WebKit.CredentialPersistence get_persistence ();
+ public unowned string get_username ();
+ public bool has_password ();
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_download_get_type ()")]
+ public class Download : GLib.Object {
+ [CCode (has_construct_function = false)]
+ protected Download ();
+ public void cancel ();
+ public unowned string get_destination ();
+ public double get_elapsed_time ();
+ public double get_estimated_progress ();
+ public uint64 get_received_data_length ();
+ public unowned WebKit.URIRequest get_request ();
+ public unowned WebKit.URIResponse get_response ();
+ public unowned WebKit.WebView get_web_view ();
+ public void set_destination (string uri);
+ public string destination { get; }
+ public double estimated_progress { get; }
+ public WebKit.URIResponse response { get; }
+ public signal void created_destination (string destination);
+ public virtual signal bool decide_destination (string suggested_filename);
+ public signal void failed (void* error);
+ public signal void finished ();
+ public signal void received_data (uint64 data_length);
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_favicon_database_get_type ()")]
+ public class FaviconDatabase : GLib.Object {
+ [CCode (has_construct_function = false)]
+ protected FaviconDatabase ();
+ public void clear ();
+ public async Cairo.Surface get_favicon (string page_uri, GLib.Cancellable? cancellable) throws GLib.Error;
+ public string get_favicon_uri (string page_uri);
+ public signal void favicon_changed (string page_uri, string favicon_uri);
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_file_chooser_request_get_type ()")]
+ public class FileChooserRequest : GLib.Object {
+ [CCode (has_construct_function = false)]
+ protected FileChooserRequest ();
+ public void cancel ();
+ [CCode (array_length = false, array_null_terminated = true)]
+ public unowned string[] get_mime_types ();
+ public unowned Gtk.FileFilter get_mime_types_filter ();
+ public bool get_select_multiple ();
+ [CCode (array_length = false, array_null_terminated = true)]
+ public unowned string[] get_selected_files ();
+ public void select_files ([CCode (array_length = false, array_null_terminated = true)] string[] files);
+ [NoAccessorMethod]
+ public Gtk.FileFilter filter { owned get; }
+ [CCode (array_length = false, array_null_terminated = true)]
+ public string[] mime_types { get; }
+ public bool select_multiple { get; }
+ [CCode (array_length = false, array_null_terminated = true)]
+ public string[] selected_files { get; }
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_find_controller_get_type ()")]
+ public class FindController : GLib.Object {
+ [CCode (has_construct_function = false)]
+ protected FindController ();
+ public void count_matches (string search_text, uint32 find_options, uint max_match_count);
+ public uint get_max_match_count ();
+ public uint32 get_options ();
+ public unowned string get_search_text ();
+ public unowned WebKit.WebView get_web_view ();
+ public void search (string search_text, uint32 find_options, uint max_match_count);
+ public void search_finish ();
+ public void search_next ();
+ public void search_previous ();
+ public uint max_match_count { get; }
+ public WebKit.FindOptions options { get; }
+ [NoAccessorMethod]
+ public string text { owned get; }
+ public WebKit.WebView web_view { get; construct; }
+ public signal void counted_matches (uint match_count);
+ public signal void failed_to_find_text ();
+ public signal void found_text (uint match_count);
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_form_submission_request_get_type ()")]
+ public class FormSubmissionRequest : GLib.Object {
+ [CCode (has_construct_function = false)]
+ protected FormSubmissionRequest ();
+ public unowned GLib.HashTable<void*,void*> get_text_fields ();
+ public void submit ();
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_geolocation_permission_request_get_type ()")]
+ public class GeolocationPermissionRequest : GLib.Object, WebKit.PermissionRequest {
+ [CCode (has_construct_function = false)]
+ protected GeolocationPermissionRequest ();
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_hit_test_result_get_type ()")]
+ public class HitTestResult : GLib.Object {
+ [CCode (has_construct_function = false)]
+ protected HitTestResult ();
+ public bool context_is_editable ();
+ public bool context_is_image ();
+ public bool context_is_link ();
+ public bool context_is_media ();
+ public bool context_is_scrollbar ();
+ public uint get_context ();
+ public unowned string get_image_uri ();
+ public unowned string get_link_label ();
+ public unowned string get_link_title ();
+ public unowned string get_link_uri ();
+ public unowned string get_media_uri ();
+ public uint context { get; construct; }
+ public string image_uri { get; construct; }
+ public string link_label { get; construct; }
+ public string link_title { get; construct; }
+ public string link_uri { get; construct; }
+ public string media_uri { get; construct; }
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", ref_function = "webkit_javascript_result_ref", type_id = "webkit_javascript_result_get_type ()", unref_function = "webkit_javascript_result_unref")]
+ [Compact]
+ public class JavascriptResult {
+ public WebKit.JavascriptResult @ref ();
+ public void unref ();
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", ref_function = "webkit_mime_info_ref", type_id = "webkit_mime_info_get_type ()", unref_function = "webkit_mime_info_unref")]
+ [Compact]
+ public class MimeInfo {
+ public unowned string get_description ();
+ [CCode (array_length = false, array_null_terminated = true)]
+ public unowned string[] get_extensions ();
+ public unowned string get_mime_type ();
+ public WebKit.MimeInfo @ref ();
+ public void unref ();
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "webkit_navigation_action_get_type ()")]
+ [Compact]
+ public class NavigationAction {
+ public WebKit.NavigationAction copy ();
+ public void free ();
+ public uint get_modifiers ();
+ public uint get_mouse_button ();
+ public WebKit.NavigationType get_navigation_type ();
+ public unowned WebKit.URIRequest get_request ();
+ public bool is_user_gesture ();
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_navigation_policy_decision_get_type ()")]
+ public class NavigationPolicyDecision : WebKit.PolicyDecision {
+ [CCode (has_construct_function = false)]
+ protected NavigationPolicyDecision ();
+ public unowned string get_frame_name ();
+ public uint get_modifiers ();
+ public uint get_mouse_button ();
+ public WebKit.NavigationType get_navigation_type ();
+ public unowned WebKit.URIRequest get_request ();
+ public string frame_name { get; }
+ public uint modifiers { get; }
+ public uint mouse_button { get; }
+ public WebKit.NavigationType navigation_type { get; }
+ public WebKit.URIRequest request { get; }
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_plugin_get_type ()")]
+ public class Plugin : GLib.Object {
+ [CCode (has_construct_function = false)]
+ protected Plugin ();
+ public unowned string get_description ();
+ public unowned GLib.List<WebKit.MimeInfo> get_mime_info_list ();
+ public unowned string get_name ();
+ public unowned string get_path ();
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_policy_decision_get_type ()")]
+ public abstract class PolicyDecision : GLib.Object {
+ [CCode (has_construct_function = false)]
+ protected PolicyDecision ();
+ public void download ();
+ public void ignore ();
+ public void use ();
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_print_operation_get_type ()")]
+ public class PrintOperation : GLib.Object {
+ [CCode (has_construct_function = false)]
+ public PrintOperation (WebKit.WebView web_view);
+ public unowned Gtk.PageSetup get_page_setup ();
+ public unowned Gtk.PrintSettings get_print_settings ();
+ public void print ();
+ public WebKit.PrintOperationResponse run_dialog (Gtk.Window? parent);
+ public void set_page_setup (Gtk.PageSetup page_setup);
+ public void set_print_settings (Gtk.PrintSettings print_settings);
+ public Gtk.PageSetup page_setup { get; set; }
+ public Gtk.PrintSettings print_settings { get; set; }
+ [NoAccessorMethod]
+ public WebKit.WebView web_view { owned get; construct; }
+ public signal void failed (void* error);
+ public signal void finished ();
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_response_policy_decision_get_type ()")]
+ public class ResponsePolicyDecision : WebKit.PolicyDecision {
+ [CCode (has_construct_function = false)]
+ protected ResponsePolicyDecision ();
+ public unowned WebKit.URIRequest get_request ();
+ public unowned WebKit.URIResponse get_response ();
+ public bool is_mime_type_supported ();
+ public WebKit.URIRequest request { get; }
+ public WebKit.URIResponse response { get; }
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "webkit_script_dialog_get_type ()")]
+ [Compact]
+ public class ScriptDialog {
+ public void confirm_set_confirmed (bool confirmed);
+ public WebKit.ScriptDialogType get_dialog_type ();
+ public unowned string get_message ();
+ public unowned string prompt_get_default_text ();
+ public void prompt_set_text (string text);
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_security_manager_get_type ()")]
+ public class SecurityManager : GLib.Object {
+ [CCode (has_construct_function = false)]
+ protected SecurityManager ();
+ public void register_uri_scheme_as_cors_enabled (string scheme);
+ public void register_uri_scheme_as_display_isolated (string scheme);
+ public void register_uri_scheme_as_empty_document (string scheme);
+ public void register_uri_scheme_as_local (string scheme);
+ public void register_uri_scheme_as_no_access (string scheme);
+ public void register_uri_scheme_as_secure (string scheme);
+ public bool uri_scheme_is_cors_enabled (string scheme);
+ public bool uri_scheme_is_display_isolated (string scheme);
+ public bool uri_scheme_is_empty_document (string scheme);
+ public bool uri_scheme_is_local (string scheme);
+ public bool uri_scheme_is_no_access (string scheme);
+ public bool uri_scheme_is_secure (string scheme);
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_settings_get_type ()")]
+ public class Settings : GLib.Object {
+ [CCode (has_construct_function = false)]
+ public Settings ();
+ public bool get_allow_modal_dialogs ();
+ public bool get_auto_load_images ();
+ public unowned string get_cursive_font_family ();
+ public unowned string get_default_charset ();
+ public unowned string get_default_font_family ();
+ public uint32 get_default_font_size ();
+ public uint32 get_default_monospace_font_size ();
+ public bool get_draw_compositing_indicators ();
+ public bool get_enable_accelerated_2d_canvas ();
+ public bool get_enable_caret_browsing ();
+ public bool get_enable_developer_extras ();
+ public bool get_enable_dns_prefetching ();
+ public bool get_enable_frame_flattening ();
+ public bool get_enable_fullscreen ();
+ public bool get_enable_html5_database ();
+ public bool get_enable_html5_local_storage ();
+ public bool get_enable_hyperlink_auditing ();
+ public bool get_enable_java ();
+ public bool get_enable_javascript ();
+ public bool get_enable_media_stream ();
+ public bool get_enable_mediasource ();
+ public bool get_enable_offline_web_application_cache ();
+ public bool get_enable_page_cache ();
+ public bool get_enable_plugins ();
+ public bool get_enable_private_browsing ();
+ public bool get_enable_resizable_text_areas ();
+ public bool get_enable_site_specific_quirks ();
+ public bool get_enable_smooth_scrolling ();
+ public bool get_enable_spatial_navigation ();
+ public bool get_enable_tabs_to_links ();
+ public bool get_enable_webaudio ();
+ public bool get_enable_webgl ();
+ public bool get_enable_write_console_messages_to_stdout ();
+ public bool get_enable_xss_auditor ();
+ public unowned string get_fantasy_font_family ();
+ public bool get_javascript_can_access_clipboard ();
+ public bool get_javascript_can_open_windows_automatically ();
+ public bool get_load_icons_ignoring_image_load_setting ();
+ public bool get_media_playback_allows_inline ();
+ public bool get_media_playback_requires_user_gesture ();
+ public uint32 get_minimum_font_size ();
+ public unowned string get_monospace_font_family ();
+ public unowned string get_pictograph_font_family ();
+ public bool get_print_backgrounds ();
+ public unowned string get_sans_serif_font_family ();
+ public unowned string get_serif_font_family ();
+ public unowned string get_user_agent ();
+ public bool get_zoom_text_only ();
+ public void set_allow_modal_dialogs (bool allowed);
+ public void set_auto_load_images (bool enabled);
+ public void set_cursive_font_family (string cursive_font_family);
+ public void set_default_charset (string default_charset);
+ public void set_default_font_family (string default_font_family);
+ public void set_default_font_size (uint32 font_size);
+ public void set_default_monospace_font_size (uint32 font_size);
+ public void set_draw_compositing_indicators (bool enabled);
+ public void set_enable_accelerated_2d_canvas (bool enabled);
+ public void set_enable_caret_browsing (bool enabled);
+ public void set_enable_developer_extras (bool enabled);
+ public void set_enable_dns_prefetching (bool enabled);
+ public void set_enable_frame_flattening (bool enabled);
+ public void set_enable_fullscreen (bool enabled);
+ public void set_enable_html5_database (bool enabled);
+ public void set_enable_html5_local_storage (bool enabled);
+ public void set_enable_hyperlink_auditing (bool enabled);
+ public void set_enable_java (bool enabled);
+ public void set_enable_javascript (bool enabled);
+ public void set_enable_media_stream (bool enabled);
+ public void set_enable_mediasource (bool enabled);
+ public void set_enable_offline_web_application_cache (bool enabled);
+ public void set_enable_page_cache (bool enabled);
+ public void set_enable_plugins (bool enabled);
+ public void set_enable_private_browsing (bool enabled);
+ public void set_enable_resizable_text_areas (bool enabled);
+ public void set_enable_site_specific_quirks (bool enabled);
+ public void set_enable_smooth_scrolling (bool enabled);
+ public void set_enable_spatial_navigation (bool enabled);
+ public void set_enable_tabs_to_links (bool enabled);
+ public void set_enable_webaudio (bool enabled);
+ public void set_enable_webgl (bool enabled);
+ public void set_enable_write_console_messages_to_stdout (bool enabled);
+ public void set_enable_xss_auditor (bool enabled);
+ public void set_fantasy_font_family (string fantasy_font_family);
+ public void set_javascript_can_access_clipboard (bool enabled);
+ public void set_javascript_can_open_windows_automatically (bool enabled);
+ public void set_load_icons_ignoring_image_load_setting (bool enabled);
+ public void set_media_playback_allows_inline (bool enabled);
+ public void set_media_playback_requires_user_gesture (bool enabled);
+ public void set_minimum_font_size (uint32 font_size);
+ public void set_monospace_font_family (string monospace_font_family);
+ public void set_pictograph_font_family (string pictograph_font_family);
+ public void set_print_backgrounds (bool print_backgrounds);
+ public void set_sans_serif_font_family (string sans_serif_font_family);
+ public void set_serif_font_family (string serif_font_family);
+ public void set_user_agent (string? user_agent);
+ public void set_user_agent_with_application_details (string? application_name, string? application_version);
+ public void set_zoom_text_only (bool zoom_text_only);
+ public bool allow_modal_dialogs { get; set construct; }
+ public bool auto_load_images { get; set construct; }
+ public string cursive_font_family { get; set construct; }
+ public string default_charset { get; set construct; }
+ public string default_font_family { get; set construct; }
+ public uint default_font_size { get; set construct; }
+ public uint default_monospace_font_size { get; set construct; }
+ public bool draw_compositing_indicators { get; set construct; }
+ public bool enable_accelerated_2d_canvas { get; set construct; }
+ public bool enable_caret_browsing { get; set construct; }
+ public bool enable_developer_extras { get; set construct; }
+ public bool enable_dns_prefetching { get; set construct; }
+ public bool enable_frame_flattening { get; set construct; }
+ public bool enable_fullscreen { get; set construct; }
+ public bool enable_html5_database { get; set construct; }
+ public bool enable_html5_local_storage { get; set construct; }
+ public bool enable_hyperlink_auditing { get; set construct; }
+ public bool enable_java { get; set construct; }
+ public bool enable_javascript { get; set construct; }
+ public bool enable_media_stream { get; set construct; }
+ public bool enable_mediasource { get; set construct; }
+ public bool enable_offline_web_application_cache { get; set construct; }
+ public bool enable_page_cache { get; set construct; }
+ public bool enable_plugins { get; set construct; }
+ public bool enable_private_browsing { get; set construct; }
+ public bool enable_resizable_text_areas { get; set construct; }
+ public bool enable_site_specific_quirks { get; set construct; }
+ public bool enable_smooth_scrolling { get; set construct; }
+ public bool enable_spatial_navigation { get; set construct; }
+ public bool enable_tabs_to_links { get; set construct; }
+ public bool enable_webaudio { get; set construct; }
+ public bool enable_webgl { get; set construct; }
+ public bool enable_write_console_messages_to_stdout { get; set construct; }
+ public bool enable_xss_auditor { get; set construct; }
+ public string fantasy_font_family { get; set construct; }
+ public bool javascript_can_access_clipboard { get; set construct; }
+ public bool javascript_can_open_windows_automatically { get; set construct; }
+ public bool load_icons_ignoring_image_load_setting { get; set construct; }
+ public bool media_playback_allows_inline { get; set construct; }
+ public bool media_playback_requires_user_gesture { get; set construct; }
+ public uint minimum_font_size { get; set construct; }
+ public string monospace_font_family { get; set construct; }
+ public string pictograph_font_family { get; set construct; }
+ public bool print_backgrounds { get; set construct; }
+ public string sans_serif_font_family { get; set construct; }
+ public string serif_font_family { get; set construct; }
+ public string user_agent { get; set construct; }
+ public bool zoom_text_only { get; set construct; }
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_uri_request_get_type ()")]
+ public class URIRequest : GLib.Object {
+ [CCode (has_construct_function = false)]
+ public URIRequest (string uri);
+ public unowned Soup.MessageHeaders get_http_headers ();
+ public unowned string get_uri ();
+ public void set_uri (string uri);
+ public string uri { get; set construct; }
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_uri_response_get_type ()")]
+ public class URIResponse : GLib.Object {
+ [CCode (has_construct_function = false)]
+ protected URIResponse ();
+ public uint64 get_content_length ();
+ public unowned string get_mime_type ();
+ public uint get_status_code ();
+ public unowned string get_suggested_filename ();
+ public unowned string get_uri ();
+ public uint64 content_length { get; }
+ public string mime_type { get; }
+ public uint status_code { get; }
+ public string suggested_filename { get; }
+ public string uri { get; }
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_uri_scheme_request_get_type ()")]
+ public class URISchemeRequest : GLib.Object {
+ [CCode (has_construct_function = false)]
+ protected URISchemeRequest ();
+ public void finish (GLib.InputStream stream, int64 stream_length, string? mime_type);
+ public void finish_error (GLib.Error error);
+ public unowned string get_path ();
+ public unowned string get_scheme ();
+ public unowned string get_uri ();
+ public unowned WebKit.WebView get_web_view ();
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_user_content_manager_get_type ()")]
+ public class UserContentManager : GLib.Object {
+ [CCode (has_construct_function = false)]
+ public UserContentManager ();
+ public void add_style_sheet (WebKit.UserStyleSheet stylesheet);
+ public void remove_all_style_sheets ();
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", ref_function = "webkit_user_style_sheet_ref", type_id = "webkit_user_style_sheet_get_type ()", unref_function = "webkit_user_style_sheet_unref")]
+ [Compact]
+ public class UserStyleSheet {
+ [CCode (has_construct_function = false)]
+ public UserStyleSheet (string source, WebKit.UserContentInjectedFrames injected_frames, WebKit.UserStyleLevel level, [CCode (array_length = false, array_null_terminated = true)] string[]? whitelist, [CCode (array_length = false, array_null_terminated = true)] string[]? blacklist);
+ public WebKit.UserStyleSheet @ref ();
+ public void unref ();
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_web_context_get_type ()")]
+ public class WebContext : GLib.Object {
+ [CCode (has_construct_function = false)]
+ protected WebContext ();
+ public void allow_tls_certificate_for_host (GLib.TlsCertificate certificate, string host);
+ public void clear_cache ();
+ public WebKit.Download download_uri (string uri);
+ public WebKit.CacheModel get_cache_model ();
+ public unowned WebKit.CookieManager get_cookie_manager ();
+ public static unowned WebKit.WebContext get_default ();
+ public unowned WebKit.FaviconDatabase get_favicon_database ();
+ public unowned string get_favicon_database_directory ();
+ public async GLib.List<WebKit.Plugin> get_plugins (GLib.Cancellable? cancellable) throws GLib.Error;
+ public WebKit.ProcessModel get_process_model ();
+ public unowned WebKit.SecurityManager get_security_manager ();
+ public bool get_spell_checking_enabled ();
+ [CCode (array_length = false, array_null_terminated = true)]
+ public unowned string[] get_spell_checking_languages ();
+ public WebKit.TLSErrorsPolicy get_tls_errors_policy ();
+ public void prefetch_dns (string hostname);
+ public void register_uri_scheme (string scheme, owned WebKit.URISchemeRequestCallback callback);
+ public void set_additional_plugins_directory (string directory);
+ public void set_cache_model (WebKit.CacheModel cache_model);
+ public void set_disk_cache_directory (string directory);
+ public void set_favicon_database_directory (string? path);
+ public void set_preferred_languages ([CCode (array_length = false, array_null_terminated = true)] string[]? languages);
+ public void set_process_model (WebKit.ProcessModel process_model);
+ public void set_spell_checking_enabled (bool enabled);
+ public void set_spell_checking_languages ([CCode (array_length = false, array_null_terminated = true)] string[] languages);
+ public void set_tls_errors_policy (WebKit.TLSErrorsPolicy policy);
+ public void set_web_extensions_directory (string directory);
+ public void set_web_extensions_initialization_user_data (GLib.Variant user_data);
+ public signal void download_started (WebKit.Download download);
+ public signal void initialize_web_extensions ();
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_web_inspector_get_type ()")]
+ public class WebInspector : GLib.Object {
+ [CCode (has_construct_function = false)]
+ protected WebInspector ();
+ public void close ();
+ public uint get_attached_height ();
+ public unowned string get_inspected_uri ();
+ public unowned WebKit.WebViewBase get_web_view ();
+ public bool is_attached ();
+ public void show ();
+ public uint attached_height { get; }
+ public string inspected_uri { get; }
+ [HasEmitter]
+ public signal bool attach ();
+ public signal bool bring_to_front ();
+ public signal void closed ();
+ [HasEmitter]
+ public signal bool detach ();
+ public signal bool open_window ();
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_web_resource_get_type ()")]
+ public class WebResource : GLib.Object {
+ [CCode (has_construct_function = false)]
+ protected WebResource ();
+ public async uint8[] get_data (GLib.Cancellable? cancellable) throws GLib.Error;
+ public unowned WebKit.URIResponse get_response ();
+ public unowned string get_uri ();
+ public WebKit.URIResponse response { get; }
+ public string uri { get; }
+ public signal void failed (void* error);
+ public signal void finished ();
+ public signal void received_data (uint64 data_length);
+ public signal void sent_request (WebKit.URIRequest request, WebKit.URIResponse redirected_response);
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_web_view_get_type ()")]
+ public class WebView : WebKit.WebViewBase, Atk.Implementor, Gtk.Buildable {
+ [CCode (has_construct_function = false, type = "GtkWidget*")]
+ public WebView ();
+ public async bool can_execute_editing_command (string command, GLib.Cancellable? cancellable) throws GLib.Error;
+ public bool can_go_back ();
+ public bool can_go_forward ();
+ public bool can_show_mime_type (string mime_type);
+ public WebKit.Download download_uri (string uri);
+ public void execute_editing_command (string command);
+ public unowned WebKit.BackForwardList get_back_forward_list ();
+ public unowned WebKit.WebContext get_context ();
+ public unowned string get_custom_charset ();
+ public double get_estimated_load_progress ();
+ public unowned Cairo.Surface get_favicon ();
+ public unowned WebKit.FindController get_find_controller ();
+ public unowned WebKit.WebInspector get_inspector ();
+ public unowned WebKit.WebResource get_main_resource ();
+ public uint64 get_page_id ();
+ public unowned WebKit.Settings get_settings ();
+ public async Cairo.Surface get_snapshot (WebKit.SnapshotRegion region, WebKit.SnapshotOptions options, GLib.Cancellable? cancellable) throws GLib.Error;
+ public unowned string get_title ();
+ public bool get_tls_info (out unowned GLib.TlsCertificate certificate, out GLib.TlsCertificateFlags errors);
+ public unowned string get_uri ();
+ public unowned WebKit.UserContentManager get_user_content_manager ();
+ public unowned WebKit.WindowProperties get_window_properties ();
+ public double get_zoom_level ();
+ public void go_back ();
+ public void go_forward ();
+ public void go_to_back_forward_list_item (WebKit.BackForwardListItem list_item);
+ public void load_alternate_html (string content, string content_uri, string? base_uri);
+ public void load_bytes (GLib.Bytes bytes, string? mime_type, string? encoding, string? base_uri);
+ public void load_html (string content, string? base_uri);
+ public void load_plain_text (string plain_text);
+ public void load_request (WebKit.URIRequest request);
+ public void load_uri (string uri);
+ public Gtk.Widget new_with_related_view ();
+ public void reload ();
+ public void reload_bypass_cache ();
+ public async WebKit.JavascriptResult run_javascript (string script, GLib.Cancellable? cancellable) throws GLib.Error;
+ public async WebKit.JavascriptResult run_javascript_from_gresource (string resource, GLib.Cancellable? cancellable) throws GLib.Error;
+ public async GLib.InputStream save (WebKit.SaveMode save_mode, GLib.Cancellable? cancellable) throws GLib.Error;
+ public async bool save_to_file (GLib.File file, WebKit.SaveMode save_mode, GLib.Cancellable? cancellable) throws GLib.Error;
+ public void set_custom_charset (string? charset);
+ public void set_settings (WebKit.Settings settings);
+ public void set_zoom_level (double zoom_level);
+ public void stop_loading ();
+ [CCode (has_construct_function = false, type = "GtkWidget*")]
+ public WebView.with_context (WebKit.WebContext context);
+ [CCode (has_construct_function = false, type = "GtkWidget*")]
+ public WebView.with_settings (WebKit.Settings settings);
+ [CCode (has_construct_function = false, type = "GtkWidget*")]
+ public WebView.with_user_content_manager (WebKit.UserContentManager user_content_manager);
+ public double estimated_load_progress { get; }
+ public void* favicon { get; }
+ [NoAccessorMethod]
+ public bool is_loading { get; }
+ public WebKit.WebView related_view { construct; }
+ public WebKit.Settings settings { set construct; }
+ public string title { get; }
+ public string uri { get; }
+ public WebKit.UserContentManager user_content_manager { get; construct; }
+ [NoAccessorMethod]
+ public WebKit.WebContext web_context { owned get; construct; }
+ public double zoom_level { get; set; }
+ public virtual signal bool authenticate (WebKit.AuthenticationRequest request);
+ public virtual signal void close ();
+ public virtual signal bool context_menu (WebKit.ContextMenu context_menu, Gdk.Event event, WebKit.HitTestResult hit_test_result);
+ public virtual signal void context_menu_dismissed ();
+ public signal Gtk.Widget create (WebKit.NavigationAction navigation_action);
+ public virtual signal bool decide_policy (WebKit.PolicyDecision decision, WebKit.PolicyDecisionType type);
+ public virtual signal bool enter_fullscreen ();
+ public virtual signal void insecure_content_detected (WebKit.InsecureContentEvent event);
+ public virtual signal bool leave_fullscreen ();
+ public virtual signal void load_changed (WebKit.LoadEvent load_event);
+ public virtual signal bool load_failed (WebKit.LoadEvent load_event, string failing_uri, void* error);
+ public virtual signal bool load_failed_with_tls_errors (GLib.TlsCertificate certificate, GLib.TlsCertificateFlags errors, string host);
+ public virtual signal void mouse_target_changed (WebKit.HitTestResult hit_test_result, uint modifiers);
+ public virtual signal bool permission_request (WebKit.PermissionRequest permission_request);
+ public virtual signal bool print (WebKit.PrintOperation print_operation);
+ public virtual signal void ready_to_show ();
+ public virtual signal void resource_load_started (WebKit.WebResource resource, WebKit.URIRequest request);
+ public virtual signal void run_as_modal ();
+ public virtual signal bool run_file_chooser (WebKit.FileChooserRequest request);
+ public virtual signal bool script_dialog (WebKit.ScriptDialog dialog);
+ public virtual signal void submit_form (WebKit.FormSubmissionRequest request);
+ public virtual signal bool web_process_crashed ();
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_web_view_base_get_type ()")]
+ public class WebViewBase : Gtk.Container, Atk.Implementor, Gtk.Buildable {
+ [CCode (has_construct_function = false)]
+ protected WebViewBase ();
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_window_properties_get_type ()")]
+ public class WindowProperties : GLib.Object {
+ [CCode (has_construct_function = false)]
+ protected WindowProperties ();
+ public bool get_fullscreen ();
+ public Gdk.Rectangle get_geometry ();
+ public bool get_locationbar_visible ();
+ public bool get_menubar_visible ();
+ public bool get_resizable ();
+ public bool get_scrollbars_visible ();
+ public bool get_statusbar_visible ();
+ public bool get_toolbar_visible ();
+ public bool fullscreen { get; construct; }
+ public Cairo.RectangleInt geometry { get; construct; }
+ public bool locationbar_visible { get; construct; }
+ public bool menubar_visible { get; construct; }
+ public bool resizable { get; construct; }
+ public bool scrollbars_visible { get; construct; }
+ public bool statusbar_visible { get; construct; }
+ public bool toolbar_visible { get; construct; }
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_permission_request_get_type ()")]
+ public interface PermissionRequest : GLib.Object {
+ public abstract void allow ();
+ public abstract void deny ();
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", cprefix = "WEBKIT_AUTHENTICATION_SCHEME_", type_id = "webkit_authentication_scheme_get_type ()")]
+ public enum AuthenticationScheme {
+ DEFAULT,
+ HTTP_BASIC,
+ HTTP_DIGEST,
+ HTML_FORM,
+ NTLM,
+ NEGOTIATE,
+ CLIENT_CERTIFICATE_REQUESTED,
+ SERVER_TRUST_EVALUATION_REQUESTED,
+ UNKNOWN
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", cprefix = "WEBKIT_CACHE_MODEL_", type_id = "webkit_cache_model_get_type ()")]
+ public enum CacheModel {
+ DOCUMENT_VIEWER,
+ WEB_BROWSER,
+ DOCUMENT_BROWSER
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", cprefix = "WEBKIT_CONTEXT_MENU_ACTION_", type_id = "webkit_context_menu_action_get_type ()")]
+ public enum ContextMenuAction {
+ NO_ACTION,
+ OPEN_LINK,
+ OPEN_LINK_IN_NEW_WINDOW,
+ DOWNLOAD_LINK_TO_DISK,
+ COPY_LINK_TO_CLIPBOARD,
+ OPEN_IMAGE_IN_NEW_WINDOW,
+ DOWNLOAD_IMAGE_TO_DISK,
+ COPY_IMAGE_TO_CLIPBOARD,
+ COPY_IMAGE_URL_TO_CLIPBOARD,
+ OPEN_FRAME_IN_NEW_WINDOW,
+ GO_BACK,
+ GO_FORWARD,
+ STOP,
+ RELOAD,
+ COPY,
+ CUT,
+ PASTE,
+ DELETE,
+ SELECT_ALL,
+ INPUT_METHODS,
+ UNICODE,
+ SPELLING_GUESS,
+ NO_GUESSES_FOUND,
+ IGNORE_SPELLING,
+ LEARN_SPELLING,
+ IGNORE_GRAMMAR,
+ FONT_MENU,
+ BOLD,
+ ITALIC,
+ UNDERLINE,
+ OUTLINE,
+ INSPECT_ELEMENT,
+ OPEN_VIDEO_IN_NEW_WINDOW,
+ OPEN_AUDIO_IN_NEW_WINDOW,
+ COPY_VIDEO_LINK_TO_CLIPBOARD,
+ COPY_AUDIO_LINK_TO_CLIPBOARD,
+ TOGGLE_MEDIA_CONTROLS,
+ TOGGLE_MEDIA_LOOP,
+ ENTER_VIDEO_FULLSCREEN,
+ MEDIA_PLAY,
+ MEDIA_PAUSE,
+ MEDIA_MUTE,
+ DOWNLOAD_VIDEO_TO_DISK,
+ DOWNLOAD_AUDIO_TO_DISK,
+ CUSTOM
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", cprefix = "WEBKIT_COOKIE_POLICY_ACCEPT_", type_id = "webkit_cookie_accept_policy_get_type ()")]
+ public enum CookieAcceptPolicy {
+ ALWAYS,
+ NEVER,
+ NO_THIRD_PARTY
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", cprefix = "WEBKIT_COOKIE_PERSISTENT_STORAGE_", type_id = "webkit_cookie_persistent_storage_get_type ()")]
+ public enum CookiePersistentStorage {
+ TEXT,
+ SQLITE
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", cprefix = "WEBKIT_CREDENTIAL_PERSISTENCE_", type_id = "webkit_credential_persistence_get_type ()")]
+ public enum CredentialPersistence {
+ NONE,
+ FOR_SESSION,
+ PERMANENT
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", cprefix = "WEBKIT_FIND_OPTIONS_", type_id = "webkit_find_options_get_type ()")]
+ [Flags]
+ public enum FindOptions {
+ NONE,
+ CASE_INSENSITIVE,
+ AT_WORD_STARTS,
+ TREAT_MEDIAL_CAPITAL_AS_WORD_START,
+ BACKWARDS,
+ WRAP_AROUND
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", cprefix = "WEBKIT_HIT_TEST_RESULT_CONTEXT_", type_id = "webkit_hit_test_result_context_get_type ()")]
+ [Flags]
+ public enum HitTestResultContext {
+ DOCUMENT,
+ LINK,
+ IMAGE,
+ MEDIA,
+ EDITABLE,
+ SCROLLBAR
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", cprefix = "WEBKIT_INSECURE_CONTENT_", type_id = "webkit_insecure_content_event_get_type ()")]
+ public enum InsecureContentEvent {
+ RUN,
+ DISPLAYED
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", cprefix = "WEBKIT_LOAD_", type_id = "webkit_load_event_get_type ()")]
+ public enum LoadEvent {
+ STARTED,
+ REDIRECTED,
+ COMMITTED,
+ FINISHED
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", cprefix = "WEBKIT_NAVIGATION_TYPE_", type_id = "webkit_navigation_type_get_type ()")]
+ public enum NavigationType {
+ LINK_CLICKED,
+ FORM_SUBMITTED,
+ BACK_FORWARD,
+ RELOAD,
+ FORM_RESUBMITTED,
+ OTHER
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", cprefix = "WEBKIT_POLICY_DECISION_TYPE_", type_id = "webkit_policy_decision_type_get_type ()")]
+ public enum PolicyDecisionType {
+ NAVIGATION_ACTION,
+ NEW_WINDOW_ACTION,
+ RESPONSE
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", cprefix = "WEBKIT_PRINT_OPERATION_RESPONSE_", type_id = "webkit_print_operation_response_get_type ()")]
+ public enum PrintOperationResponse {
+ PRINT,
+ CANCEL
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", cprefix = "WEBKIT_PROCESS_MODEL_", type_id = "webkit_process_model_get_type ()")]
+ public enum ProcessModel {
+ SHARED_SECONDARY_PROCESS,
+ MULTIPLE_SECONDARY_PROCESSES
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", cprefix = "WEBKIT_SAVE_MODE_", type_id = "webkit_save_mode_get_type ()")]
+ public enum SaveMode {
+ MHTML
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", cprefix = "WEBKIT_SCRIPT_DIALOG_", type_id = "webkit_script_dialog_type_get_type ()")]
+ public enum ScriptDialogType {
+ ALERT,
+ CONFIRM,
+ PROMPT
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", cprefix = "WEBKIT_SNAPSHOT_OPTIONS_", type_id = "webkit_snapshot_options_get_type ()")]
+ [Flags]
+ public enum SnapshotOptions {
+ NONE,
+ INCLUDE_SELECTION_HIGHLIGHTING
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", cprefix = "WEBKIT_SNAPSHOT_REGION_", type_id = "webkit_snapshot_region_get_type ()")]
+ public enum SnapshotRegion {
+ VISIBLE,
+ FULL_DOCUMENT
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", cprefix = "WEBKIT_TLS_ERRORS_POLICY_", type_id = "webkit_tls_errors_policy_get_type ()")]
+ public enum TLSErrorsPolicy {
+ IGNORE,
+ FAIL
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", cprefix = "WEBKIT_USER_CONTENT_INJECT_", type_id = "webkit_user_content_injected_frames_get_type ()")]
+ public enum UserContentInjectedFrames {
+ ALL_FRAMES,
+ TOP_FRAME
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", cprefix = "WEBKIT_USER_STYLE_LEVEL_", type_id = "webkit_user_style_level_get_type ()")]
+ public enum UserStyleLevel {
+ USER,
+ AUTHOR
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", cprefix = "WEBKIT_DOWNLOAD_ERROR_")]
+ public errordomain DownloadError {
+ NETWORK,
+ CANCELLED_BY_USER,
+ DESTINATION;
+ public static GLib.Quark quark ();
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", cprefix = "WEBKIT_FAVICON_DATABASE_ERROR_")]
+ public errordomain FaviconDatabaseError {
+ NOT_INITIALIZED,
+ FAVICON_NOT_FOUND,
+ FAVICON_UNKNOWN;
+ public static GLib.Quark quark ();
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", cprefix = "WEBKIT_JAVASCRIPT_ERROR_SCRIPT_")]
+ public errordomain JavascriptError {
+ FAILED;
+ public static GLib.Quark quark ();
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", cprefix = "WEBKIT_NETWORK_ERROR_")]
+ public errordomain NetworkError {
+ FAILED,
+ TRANSPORT,
+ UNKNOWN_PROTOCOL,
+ CANCELLED,
+ FILE_DOES_NOT_EXIST;
+ public static GLib.Quark quark ();
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", cprefix = "WEBKIT_PLUGIN_ERROR_")]
+ public errordomain PluginError {
+ FAILED,
+ CANNOT_FIND_PLUGIN,
+ CANNOT_LOAD_PLUGIN,
+ JAVA_UNAVAILABLE,
+ CONNECTION_CANCELLED,
+ WILL_HANDLE_LOAD;
+ public static GLib.Quark quark ();
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", cprefix = "WEBKIT_POLICY_ERROR_")]
+ public errordomain PolicyError {
+ FAILED,
+ CANNOT_SHOW_MIME_TYPE,
+ CANNOT_SHOW_URI,
+ FRAME_LOAD_INTERRUPTED_BY_POLICY_CHANGE,
+ CANNOT_USE_RESTRICTED_PORT;
+ public static GLib.Quark quark ();
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", cprefix = "WEBKIT_PRINT_ERROR_")]
+ public errordomain PrintError {
+ GENERAL,
+ PRINTER_NOT_FOUND,
+ INVALID_PAGE_RANGE;
+ public static GLib.Quark quark ();
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", cprefix = "WEBKIT_SNAPSHOT_ERROR_FAILED_TO_")]
+ public errordomain SnapshotError {
+ CREATE;
+ public static GLib.Quark quark ();
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", instance_pos = 1.9)]
+ public delegate void URISchemeRequestCallback (WebKit.URISchemeRequest request);
+ [CCode (cheader_filename = "webkit2/webkit2.h", cname = "WEBKIT_EDITING_COMMAND_COPY")]
+ public const string EDITING_COMMAND_COPY;
+ [CCode (cheader_filename = "webkit2/webkit2.h", cname = "WEBKIT_EDITING_COMMAND_CUT")]
+ public const string EDITING_COMMAND_CUT;
+ [CCode (cheader_filename = "webkit2/webkit2.h", cname = "WEBKIT_EDITING_COMMAND_PASTE")]
+ public const string EDITING_COMMAND_PASTE;
+ [CCode (cheader_filename = "webkit2/webkit2.h", cname = "WEBKIT_EDITING_COMMAND_REDO")]
+ public const string EDITING_COMMAND_REDO;
+ [CCode (cheader_filename = "webkit2/webkit2.h", cname = "WEBKIT_EDITING_COMMAND_SELECT_ALL")]
+ public const string EDITING_COMMAND_SELECT_ALL;
+ [CCode (cheader_filename = "webkit2/webkit2.h", cname = "WEBKIT_EDITING_COMMAND_UNDO")]
+ public const string EDITING_COMMAND_UNDO;
+ [CCode (cheader_filename = "webkit2/webkit2.h", cname = "WEBKIT_MAJOR_VERSION")]
+ public const int MAJOR_VERSION;
+ [CCode (cheader_filename = "webkit2/webkit2.h", cname = "WEBKIT_MICRO_VERSION")]
+ public const int MICRO_VERSION;
+ [CCode (cheader_filename = "webkit2/webkit2.h", cname = "WEBKIT_MINOR_VERSION")]
+ public const int MINOR_VERSION;
+ [CCode (cheader_filename = "webkit2/webkit2.h")]
+ public static uint get_major_version ();
+ [CCode (cheader_filename = "webkit2/webkit2.h")]
+ public static uint get_micro_version ();
+ [CCode (cheader_filename = "webkit2/webkit2.h")]
+ public static uint get_minor_version ();
+}
--- /dev/null
+/* webkit2gtk-4.0.vapi generated by vapigen, do not modify. */
+
+[CCode (cprefix = "WebKit", gir_namespace = "WebKit2", gir_version = "4.0", lower_case_cprefix = "webkit_")]
+namespace WebKit {
+ [CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_authentication_request_get_type ()")]
+ public class AuthenticationRequest : GLib.Object {
+ [CCode (has_construct_function = false)]
+ protected AuthenticationRequest ();
+ public void authenticate (WebKit.Credential? credential);
+ public bool can_save_credentials ();
+ public void cancel ();
+ public unowned string get_host ();
+ public uint get_port ();
+ public WebKit.Credential get_proposed_credential ();
+ public unowned string get_realm ();
+ public WebKit.AuthenticationScheme get_scheme ();
+ public bool is_for_proxy ();
+ public bool is_retry ();
+ public signal void cancelled ();
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_back_forward_list_get_type ()")]
+ public class BackForwardList : GLib.Object {
+ [CCode (has_construct_function = false)]
+ protected BackForwardList ();
+ public unowned WebKit.BackForwardListItem get_back_item ();
+ public GLib.List<weak WebKit.BackForwardListItem> get_back_list ();
+ public GLib.List<weak WebKit.BackForwardListItem> get_back_list_with_limit (uint limit);
+ public unowned WebKit.BackForwardListItem get_current_item ();
+ public unowned WebKit.BackForwardListItem get_forward_item ();
+ public GLib.List<weak WebKit.BackForwardListItem> get_forward_list ();
+ public GLib.List<weak WebKit.BackForwardListItem> get_forward_list_with_limit (uint limit);
+ public uint get_length ();
+ public unowned WebKit.BackForwardListItem get_nth_item (int index);
+ public signal void changed (WebKit.BackForwardListItem? item_added, void* items_removed);
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_back_forward_list_item_get_type ()")]
+ public class BackForwardListItem : GLib.InitiallyUnowned {
+ [CCode (has_construct_function = false)]
+ protected BackForwardListItem ();
+ public unowned string get_original_uri ();
+ public unowned string get_title ();
+ public unowned string get_uri ();
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_color_chooser_request_get_type ()")]
+ public class ColorChooserRequest : GLib.Object {
+ [CCode (has_construct_function = false)]
+ protected ColorChooserRequest ();
+ public void cancel ();
+ public void finish ();
+ public Gdk.Rectangle get_element_rectangle ();
+ public Gdk.RGBA get_rgba ();
+ public void set_rgba (Gdk.RGBA rgba);
+ public Gdk.RGBA rgba { get; set construct; }
+ public signal void finished ();
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_context_menu_get_type ()")]
+ public class ContextMenu : GLib.Object {
+ [CCode (has_construct_function = false)]
+ public ContextMenu ();
+ public void append (WebKit.ContextMenuItem item);
+ public unowned WebKit.ContextMenuItem first ();
+ public unowned WebKit.ContextMenuItem get_item_at_position (uint position);
+ public unowned GLib.List<WebKit.ContextMenuItem> get_items ();
+ public uint get_n_items ();
+ public unowned GLib.Variant get_user_data ();
+ public void insert (WebKit.ContextMenuItem item, int position);
+ public unowned WebKit.ContextMenuItem last ();
+ public void move_item (WebKit.ContextMenuItem item, int position);
+ public void prepend (WebKit.ContextMenuItem item);
+ public void remove (WebKit.ContextMenuItem item);
+ public void remove_all ();
+ public void set_user_data (GLib.Variant user_data);
+ [CCode (has_construct_function = false)]
+ public ContextMenu.with_items (GLib.List<WebKit.ContextMenuItem> items);
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_context_menu_item_get_type ()")]
+ public class ContextMenuItem : GLib.InitiallyUnowned {
+ [CCode (has_construct_function = false)]
+ public ContextMenuItem (Gtk.Action action);
+ [CCode (has_construct_function = false)]
+ public ContextMenuItem.from_stock_action (WebKit.ContextMenuAction action);
+ [CCode (has_construct_function = false)]
+ public ContextMenuItem.from_stock_action_with_label (WebKit.ContextMenuAction action, string label);
+ public unowned Gtk.Action get_action ();
+ public WebKit.ContextMenuAction get_stock_action ();
+ public unowned WebKit.ContextMenu get_submenu ();
+ public bool is_separator ();
+ [CCode (has_construct_function = false)]
+ public ContextMenuItem.separator ();
+ public void set_submenu (WebKit.ContextMenu? submenu);
+ [CCode (has_construct_function = false)]
+ public ContextMenuItem.with_submenu (string label, WebKit.ContextMenu submenu);
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_cookie_manager_get_type ()")]
+ public class CookieManager : GLib.Object {
+ [CCode (has_construct_function = false)]
+ protected CookieManager ();
+ public void delete_all_cookies ();
+ public void delete_cookies_for_domain (string domain);
+ public async WebKit.CookieAcceptPolicy get_accept_policy (GLib.Cancellable? cancellable) throws GLib.Error;
+ [CCode (array_length = false, array_null_terminated = true)]
+ public async string[] get_domains_with_cookies (GLib.Cancellable? cancellable) throws GLib.Error;
+ public void set_accept_policy (WebKit.CookieAcceptPolicy policy);
+ public void set_persistent_storage (string filename, WebKit.CookiePersistentStorage storage);
+ public signal void changed ();
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "webkit_credential_get_type ()")]
+ [Compact]
+ public class Credential {
+ [CCode (has_construct_function = false)]
+ public Credential (string username, string password, WebKit.CredentialPersistence persistence);
+ public WebKit.Credential copy ();
+ public void free ();
+ public unowned string get_password ();
+ public WebKit.CredentialPersistence get_persistence ();
+ public unowned string get_username ();
+ public bool has_password ();
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_download_get_type ()")]
+ public class Download : GLib.Object {
+ [CCode (has_construct_function = false)]
+ protected Download ();
+ public void cancel ();
+ public bool get_allow_overwrite ();
+ public unowned string get_destination ();
+ public double get_elapsed_time ();
+ public double get_estimated_progress ();
+ public uint64 get_received_data_length ();
+ public unowned WebKit.URIRequest get_request ();
+ public unowned WebKit.URIResponse get_response ();
+ public unowned WebKit.WebView get_web_view ();
+ public void set_allow_overwrite (bool allowed);
+ public void set_destination (string uri);
+ public bool allow_overwrite { get; set; }
+ public string destination { get; }
+ public double estimated_progress { get; }
+ public WebKit.URIResponse response { get; }
+ public signal void created_destination (string destination);
+ public virtual signal bool decide_destination (string suggested_filename);
+ public signal void failed (void* error);
+ public signal void finished ();
+ public signal void received_data (uint64 data_length);
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_favicon_database_get_type ()")]
+ public class FaviconDatabase : GLib.Object {
+ [CCode (has_construct_function = false)]
+ protected FaviconDatabase ();
+ public void clear ();
+ public async Cairo.Surface get_favicon (string page_uri, GLib.Cancellable? cancellable) throws GLib.Error;
+ public string get_favicon_uri (string page_uri);
+ public signal void favicon_changed (string page_uri, string favicon_uri);
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_file_chooser_request_get_type ()")]
+ public class FileChooserRequest : GLib.Object {
+ [CCode (has_construct_function = false)]
+ protected FileChooserRequest ();
+ public void cancel ();
+ [CCode (array_length = false, array_null_terminated = true)]
+ public unowned string[] get_mime_types ();
+ public unowned Gtk.FileFilter get_mime_types_filter ();
+ public bool get_select_multiple ();
+ [CCode (array_length = false, array_null_terminated = true)]
+ public unowned string[] get_selected_files ();
+ public void select_files ([CCode (array_length = false, array_null_terminated = true)] string[] files);
+ [NoAccessorMethod]
+ public Gtk.FileFilter filter { owned get; }
+ [CCode (array_length = false, array_null_terminated = true)]
+ public string[] mime_types { get; }
+ public bool select_multiple { get; }
+ [CCode (array_length = false, array_null_terminated = true)]
+ public string[] selected_files { get; }
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_find_controller_get_type ()")]
+ public class FindController : GLib.Object {
+ [CCode (has_construct_function = false)]
+ protected FindController ();
+ public void count_matches (string search_text, uint32 find_options, uint max_match_count);
+ public uint get_max_match_count ();
+ public uint32 get_options ();
+ public unowned string get_search_text ();
+ public unowned WebKit.WebView get_web_view ();
+ public void search (string search_text, uint32 find_options, uint max_match_count);
+ public void search_finish ();
+ public void search_next ();
+ public void search_previous ();
+ public uint max_match_count { get; }
+ public WebKit.FindOptions options { get; }
+ [NoAccessorMethod]
+ public string text { owned get; }
+ public WebKit.WebView web_view { get; construct; }
+ public signal void counted_matches (uint match_count);
+ public signal void failed_to_find_text ();
+ public signal void found_text (uint match_count);
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_form_submission_request_get_type ()")]
+ public class FormSubmissionRequest : GLib.Object {
+ [CCode (has_construct_function = false)]
+ protected FormSubmissionRequest ();
+ public unowned GLib.HashTable<void*,void*> get_text_fields ();
+ public void submit ();
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_geolocation_permission_request_get_type ()")]
+ public class GeolocationPermissionRequest : GLib.Object, WebKit.PermissionRequest {
+ [CCode (has_construct_function = false)]
+ protected GeolocationPermissionRequest ();
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_hit_test_result_get_type ()")]
+ public class HitTestResult : GLib.Object {
+ [CCode (has_construct_function = false)]
+ protected HitTestResult ();
+ public bool context_is_editable ();
+ public bool context_is_image ();
+ public bool context_is_link ();
+ public bool context_is_media ();
+ public bool context_is_scrollbar ();
+ public bool context_is_selection ();
+ public uint get_context ();
+ public unowned string get_image_uri ();
+ public unowned string get_link_label ();
+ public unowned string get_link_title ();
+ public unowned string get_link_uri ();
+ public unowned string get_media_uri ();
+ public uint context { get; construct; }
+ public string image_uri { get; construct; }
+ public string link_label { get; construct; }
+ public string link_title { get; construct; }
+ public string link_uri { get; construct; }
+ public string media_uri { get; construct; }
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", ref_function = "webkit_javascript_result_ref", type_id = "webkit_javascript_result_get_type ()", unref_function = "webkit_javascript_result_unref")]
+ [Compact]
+ public class JavascriptResult {
+ public WebKit.JavascriptResult @ref ();
+ public void unref ();
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", ref_function = "webkit_mime_info_ref", type_id = "webkit_mime_info_get_type ()", unref_function = "webkit_mime_info_unref")]
+ [Compact]
+ public class MimeInfo {
+ public unowned string get_description ();
+ [CCode (array_length = false, array_null_terminated = true)]
+ public unowned string[] get_extensions ();
+ public unowned string get_mime_type ();
+ public WebKit.MimeInfo @ref ();
+ public void unref ();
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "webkit_navigation_action_get_type ()")]
+ [Compact]
+ public class NavigationAction {
+ public WebKit.NavigationAction copy ();
+ public void free ();
+ public uint get_modifiers ();
+ public uint get_mouse_button ();
+ public WebKit.NavigationType get_navigation_type ();
+ public unowned WebKit.URIRequest get_request ();
+ public bool is_user_gesture ();
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_navigation_policy_decision_get_type ()")]
+ public class NavigationPolicyDecision : WebKit.PolicyDecision {
+ [CCode (has_construct_function = false)]
+ protected NavigationPolicyDecision ();
+ public unowned string get_frame_name ();
+ [Deprecated (since = "2.6")]
+ public uint get_modifiers ();
+ [Deprecated (since = "2.6")]
+ public uint get_mouse_button ();
+ public unowned WebKit.NavigationAction get_navigation_action ();
+ [Deprecated (since = "2.6")]
+ public WebKit.NavigationType get_navigation_type ();
+ [Deprecated (since = "2.6")]
+ public unowned WebKit.URIRequest get_request ();
+ public string frame_name { get; }
+ [Deprecated (since = "2.6")]
+ public uint modifiers { get; }
+ [Deprecated (since = "2.6")]
+ public uint mouse_button { get; }
+ public WebKit.NavigationAction navigation_action { get; }
+ [Deprecated (since = "2.6")]
+ public WebKit.NavigationType navigation_type { get; }
+ [Deprecated (since = "2.6")]
+ public WebKit.URIRequest request { get; }
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_notification_get_type ()")]
+ public class Notification : GLib.Object {
+ [CCode (has_construct_function = false)]
+ protected Notification ();
+ public void close ();
+ public unowned string get_body ();
+ public uint64 get_id ();
+ public unowned string get_title ();
+ public string body { get; }
+ public uint64 id { get; }
+ public string title { get; }
+ public signal void closed ();
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_notification_permission_request_get_type ()")]
+ public class NotificationPermissionRequest : GLib.Object, WebKit.PermissionRequest {
+ [CCode (has_construct_function = false)]
+ protected NotificationPermissionRequest ();
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_plugin_get_type ()")]
+ public class Plugin : GLib.Object {
+ [CCode (has_construct_function = false)]
+ protected Plugin ();
+ public unowned string get_description ();
+ public unowned GLib.List<WebKit.MimeInfo> get_mime_info_list ();
+ public unowned string get_name ();
+ public unowned string get_path ();
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_policy_decision_get_type ()")]
+ public abstract class PolicyDecision : GLib.Object {
+ [CCode (has_construct_function = false)]
+ protected PolicyDecision ();
+ public void download ();
+ public void ignore ();
+ public void use ();
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_print_operation_get_type ()")]
+ public class PrintOperation : GLib.Object {
+ [CCode (has_construct_function = false)]
+ public PrintOperation (WebKit.WebView web_view);
+ public unowned Gtk.PageSetup get_page_setup ();
+ public unowned Gtk.PrintSettings get_print_settings ();
+ public void print ();
+ public WebKit.PrintOperationResponse run_dialog (Gtk.Window? parent);
+ public void set_page_setup (Gtk.PageSetup page_setup);
+ public void set_print_settings (Gtk.PrintSettings print_settings);
+ public Gtk.PageSetup page_setup { get; set; }
+ public Gtk.PrintSettings print_settings { get; set; }
+ [NoAccessorMethod]
+ public WebKit.WebView web_view { owned get; construct; }
+ public signal void failed (void* error);
+ public signal void finished ();
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_response_policy_decision_get_type ()")]
+ public class ResponsePolicyDecision : WebKit.PolicyDecision {
+ [CCode (has_construct_function = false)]
+ protected ResponsePolicyDecision ();
+ public unowned WebKit.URIRequest get_request ();
+ public unowned WebKit.URIResponse get_response ();
+ public bool is_mime_type_supported ();
+ public WebKit.URIRequest request { get; }
+ public WebKit.URIResponse response { get; }
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "webkit_script_dialog_get_type ()")]
+ [Compact]
+ public class ScriptDialog {
+ public void confirm_set_confirmed (bool confirmed);
+ public WebKit.ScriptDialogType get_dialog_type ();
+ public unowned string get_message ();
+ public unowned string prompt_get_default_text ();
+ public void prompt_set_text (string text);
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_security_manager_get_type ()")]
+ public class SecurityManager : GLib.Object {
+ [CCode (has_construct_function = false)]
+ protected SecurityManager ();
+ public void register_uri_scheme_as_cors_enabled (string scheme);
+ public void register_uri_scheme_as_display_isolated (string scheme);
+ public void register_uri_scheme_as_empty_document (string scheme);
+ public void register_uri_scheme_as_local (string scheme);
+ public void register_uri_scheme_as_no_access (string scheme);
+ public void register_uri_scheme_as_secure (string scheme);
+ public bool uri_scheme_is_cors_enabled (string scheme);
+ public bool uri_scheme_is_display_isolated (string scheme);
+ public bool uri_scheme_is_empty_document (string scheme);
+ public bool uri_scheme_is_local (string scheme);
+ public bool uri_scheme_is_no_access (string scheme);
+ public bool uri_scheme_is_secure (string scheme);
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_settings_get_type ()")]
+ public class Settings : GLib.Object {
+ [CCode (has_construct_function = false)]
+ public Settings ();
+ public bool get_allow_modal_dialogs ();
+ public bool get_auto_load_images ();
+ public unowned string get_cursive_font_family ();
+ public unowned string get_default_charset ();
+ public unowned string get_default_font_family ();
+ public uint32 get_default_font_size ();
+ public uint32 get_default_monospace_font_size ();
+ public bool get_draw_compositing_indicators ();
+ public bool get_enable_accelerated_2d_canvas ();
+ public bool get_enable_caret_browsing ();
+ public bool get_enable_developer_extras ();
+ public bool get_enable_dns_prefetching ();
+ public bool get_enable_frame_flattening ();
+ public bool get_enable_fullscreen ();
+ public bool get_enable_html5_database ();
+ public bool get_enable_html5_local_storage ();
+ public bool get_enable_hyperlink_auditing ();
+ public bool get_enable_java ();
+ public bool get_enable_javascript ();
+ public bool get_enable_media_stream ();
+ public bool get_enable_mediasource ();
+ public bool get_enable_offline_web_application_cache ();
+ public bool get_enable_page_cache ();
+ public bool get_enable_plugins ();
+ public bool get_enable_private_browsing ();
+ public bool get_enable_resizable_text_areas ();
+ public bool get_enable_site_specific_quirks ();
+ public bool get_enable_smooth_scrolling ();
+ public bool get_enable_spatial_navigation ();
+ public bool get_enable_tabs_to_links ();
+ public bool get_enable_webaudio ();
+ public bool get_enable_webgl ();
+ public bool get_enable_write_console_messages_to_stdout ();
+ public bool get_enable_xss_auditor ();
+ public unowned string get_fantasy_font_family ();
+ public bool get_javascript_can_access_clipboard ();
+ public bool get_javascript_can_open_windows_automatically ();
+ public bool get_load_icons_ignoring_image_load_setting ();
+ public bool get_media_playback_allows_inline ();
+ public bool get_media_playback_requires_user_gesture ();
+ public uint32 get_minimum_font_size ();
+ public unowned string get_monospace_font_family ();
+ public unowned string get_pictograph_font_family ();
+ public bool get_print_backgrounds ();
+ public unowned string get_sans_serif_font_family ();
+ public unowned string get_serif_font_family ();
+ public unowned string get_user_agent ();
+ public bool get_zoom_text_only ();
+ public void set_allow_modal_dialogs (bool allowed);
+ public void set_auto_load_images (bool enabled);
+ public void set_cursive_font_family (string cursive_font_family);
+ public void set_default_charset (string default_charset);
+ public void set_default_font_family (string default_font_family);
+ public void set_default_font_size (uint32 font_size);
+ public void set_default_monospace_font_size (uint32 font_size);
+ public void set_draw_compositing_indicators (bool enabled);
+ public void set_enable_accelerated_2d_canvas (bool enabled);
+ public void set_enable_caret_browsing (bool enabled);
+ public void set_enable_developer_extras (bool enabled);
+ public void set_enable_dns_prefetching (bool enabled);
+ public void set_enable_frame_flattening (bool enabled);
+ public void set_enable_fullscreen (bool enabled);
+ public void set_enable_html5_database (bool enabled);
+ public void set_enable_html5_local_storage (bool enabled);
+ public void set_enable_hyperlink_auditing (bool enabled);
+ public void set_enable_java (bool enabled);
+ public void set_enable_javascript (bool enabled);
+ public void set_enable_media_stream (bool enabled);
+ public void set_enable_mediasource (bool enabled);
+ public void set_enable_offline_web_application_cache (bool enabled);
+ public void set_enable_page_cache (bool enabled);
+ public void set_enable_plugins (bool enabled);
+ public void set_enable_private_browsing (bool enabled);
+ public void set_enable_resizable_text_areas (bool enabled);
+ public void set_enable_site_specific_quirks (bool enabled);
+ public void set_enable_smooth_scrolling (bool enabled);
+ public void set_enable_spatial_navigation (bool enabled);
+ public void set_enable_tabs_to_links (bool enabled);
+ public void set_enable_webaudio (bool enabled);
+ public void set_enable_webgl (bool enabled);
+ public void set_enable_write_console_messages_to_stdout (bool enabled);
+ public void set_enable_xss_auditor (bool enabled);
+ public void set_fantasy_font_family (string fantasy_font_family);
+ public void set_javascript_can_access_clipboard (bool enabled);
+ public void set_javascript_can_open_windows_automatically (bool enabled);
+ public void set_load_icons_ignoring_image_load_setting (bool enabled);
+ public void set_media_playback_allows_inline (bool enabled);
+ public void set_media_playback_requires_user_gesture (bool enabled);
+ public void set_minimum_font_size (uint32 font_size);
+ public void set_monospace_font_family (string monospace_font_family);
+ public void set_pictograph_font_family (string pictograph_font_family);
+ public void set_print_backgrounds (bool print_backgrounds);
+ public void set_sans_serif_font_family (string sans_serif_font_family);
+ public void set_serif_font_family (string serif_font_family);
+ public void set_user_agent (string? user_agent);
+ public void set_user_agent_with_application_details (string? application_name, string? application_version);
+ public void set_zoom_text_only (bool zoom_text_only);
+ public bool allow_modal_dialogs { get; set construct; }
+ public bool auto_load_images { get; set construct; }
+ public string cursive_font_family { get; set construct; }
+ public string default_charset { get; set construct; }
+ public string default_font_family { get; set construct; }
+ public uint default_font_size { get; set construct; }
+ public uint default_monospace_font_size { get; set construct; }
+ public bool draw_compositing_indicators { get; set construct; }
+ public bool enable_accelerated_2d_canvas { get; set construct; }
+ public bool enable_caret_browsing { get; set construct; }
+ public bool enable_developer_extras { get; set construct; }
+ public bool enable_dns_prefetching { get; set construct; }
+ public bool enable_frame_flattening { get; set construct; }
+ public bool enable_fullscreen { get; set construct; }
+ public bool enable_html5_database { get; set construct; }
+ public bool enable_html5_local_storage { get; set construct; }
+ public bool enable_hyperlink_auditing { get; set construct; }
+ public bool enable_java { get; set construct; }
+ public bool enable_javascript { get; set construct; }
+ public bool enable_media_stream { get; set construct; }
+ public bool enable_mediasource { get; set construct; }
+ public bool enable_offline_web_application_cache { get; set construct; }
+ public bool enable_page_cache { get; set construct; }
+ public bool enable_plugins { get; set construct; }
+ public bool enable_private_browsing { get; set construct; }
+ public bool enable_resizable_text_areas { get; set construct; }
+ public bool enable_site_specific_quirks { get; set construct; }
+ public bool enable_smooth_scrolling { get; set construct; }
+ public bool enable_spatial_navigation { get; set construct; }
+ public bool enable_tabs_to_links { get; set construct; }
+ public bool enable_webaudio { get; set construct; }
+ public bool enable_webgl { get; set construct; }
+ public bool enable_write_console_messages_to_stdout { get; set construct; }
+ public bool enable_xss_auditor { get; set construct; }
+ public string fantasy_font_family { get; set construct; }
+ public bool javascript_can_access_clipboard { get; set construct; }
+ public bool javascript_can_open_windows_automatically { get; set construct; }
+ public bool load_icons_ignoring_image_load_setting { get; set construct; }
+ public bool media_playback_allows_inline { get; set construct; }
+ public bool media_playback_requires_user_gesture { get; set construct; }
+ public uint minimum_font_size { get; set construct; }
+ public string monospace_font_family { get; set construct; }
+ public string pictograph_font_family { get; set construct; }
+ public bool print_backgrounds { get; set construct; }
+ public string sans_serif_font_family { get; set construct; }
+ public string serif_font_family { get; set construct; }
+ public string user_agent { get; set construct; }
+ public bool zoom_text_only { get; set construct; }
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_uri_request_get_type ()")]
+ public class URIRequest : GLib.Object {
+ [CCode (has_construct_function = false)]
+ public URIRequest (string uri);
+ public unowned Soup.MessageHeaders get_http_headers ();
+ public unowned string get_uri ();
+ public void set_uri (string uri);
+ public string uri { get; set construct; }
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_uri_response_get_type ()")]
+ public class URIResponse : GLib.Object {
+ [CCode (has_construct_function = false)]
+ protected URIResponse ();
+ public uint64 get_content_length ();
+ public unowned Soup.MessageHeaders get_http_headers ();
+ public unowned string get_mime_type ();
+ public uint get_status_code ();
+ public unowned string get_suggested_filename ();
+ public unowned string get_uri ();
+ public uint64 content_length { get; }
+ public Soup.MessageHeaders http_headers { get; }
+ public string mime_type { get; }
+ public uint status_code { get; }
+ public string suggested_filename { get; }
+ public string uri { get; }
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_uri_scheme_request_get_type ()")]
+ public class URISchemeRequest : GLib.Object {
+ [CCode (has_construct_function = false)]
+ protected URISchemeRequest ();
+ public void finish (GLib.InputStream stream, int64 stream_length, string? mime_type);
+ public void finish_error (GLib.Error error);
+ public unowned string get_path ();
+ public unowned string get_scheme ();
+ public unowned string get_uri ();
+ public unowned WebKit.WebView get_web_view ();
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_user_content_manager_get_type ()")]
+ public class UserContentManager : GLib.Object {
+ [CCode (has_construct_function = false)]
+ public UserContentManager ();
+ public void add_script (WebKit.UserScript script);
+ public void add_style_sheet (WebKit.UserStyleSheet stylesheet);
+ public bool register_script_message_handler (string name);
+ public void remove_all_scripts ();
+ public void remove_all_style_sheets ();
+ public void unregister_script_message_handler (string name);
+ public signal void script_message_received (WebKit.JavascriptResult js_result);
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_user_media_permission_request_get_type ()")]
+ public class UserMediaPermissionRequest : GLib.Object, WebKit.PermissionRequest {
+ [CCode (has_construct_function = false)]
+ protected UserMediaPermissionRequest ();
+ [NoAccessorMethod]
+ public bool is_for_audio_device { get; }
+ [NoAccessorMethod]
+ public bool is_for_video_device { get; }
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", ref_function = "webkit_user_script_ref", type_id = "webkit_user_script_get_type ()", unref_function = "webkit_user_script_unref")]
+ [Compact]
+ public class UserScript {
+ [CCode (has_construct_function = false)]
+ public UserScript (string source, WebKit.UserContentInjectedFrames injected_frames, WebKit.UserScriptInjectionTime injection_time, [CCode (array_length = false, array_null_terminated = true)] string[]? whitelist, [CCode (array_length = false, array_null_terminated = true)] string[]? blacklist);
+ public WebKit.UserScript @ref ();
+ public void unref ();
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", ref_function = "webkit_user_style_sheet_ref", type_id = "webkit_user_style_sheet_get_type ()", unref_function = "webkit_user_style_sheet_unref")]
+ [Compact]
+ public class UserStyleSheet {
+ [CCode (has_construct_function = false)]
+ public UserStyleSheet (string source, WebKit.UserContentInjectedFrames injected_frames, WebKit.UserStyleLevel level, [CCode (array_length = false, array_null_terminated = true)] string[]? whitelist, [CCode (array_length = false, array_null_terminated = true)] string[]? blacklist);
+ public WebKit.UserStyleSheet @ref ();
+ public void unref ();
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_web_context_get_type ()")]
+ public class WebContext : GLib.Object {
+ [CCode (has_construct_function = false)]
+ public WebContext ();
+ public void allow_tls_certificate_for_host (GLib.TlsCertificate certificate, string host);
+ public void clear_cache ();
+ public WebKit.Download download_uri (string uri);
+ public WebKit.CacheModel get_cache_model ();
+ public unowned WebKit.CookieManager get_cookie_manager ();
+ public static unowned WebKit.WebContext get_default ();
+ public unowned WebKit.FaviconDatabase get_favicon_database ();
+ public unowned string get_favicon_database_directory ();
+ public async GLib.List<WebKit.Plugin> get_plugins (GLib.Cancellable? cancellable) throws GLib.Error;
+ public WebKit.ProcessModel get_process_model ();
+ public unowned WebKit.SecurityManager get_security_manager ();
+ public bool get_spell_checking_enabled ();
+ [CCode (array_length = false, array_null_terminated = true)]
+ public unowned string[] get_spell_checking_languages ();
+ public WebKit.TLSErrorsPolicy get_tls_errors_policy ();
+ public void prefetch_dns (string hostname);
+ public void register_uri_scheme (string scheme, owned WebKit.URISchemeRequestCallback callback);
+ public void set_additional_plugins_directory (string directory);
+ public void set_cache_model (WebKit.CacheModel cache_model);
+ public void set_disk_cache_directory (string directory);
+ public void set_favicon_database_directory (string? path);
+ public void set_preferred_languages ([CCode (array_length = false, array_null_terminated = true)] string[]? languages);
+ public void set_process_model (WebKit.ProcessModel process_model);
+ public void set_spell_checking_enabled (bool enabled);
+ public void set_spell_checking_languages ([CCode (array_length = false, array_null_terminated = true)] string[] languages);
+ public void set_tls_errors_policy (WebKit.TLSErrorsPolicy policy);
+ public void set_web_extensions_directory (string directory);
+ public void set_web_extensions_initialization_user_data (GLib.Variant user_data);
+ [NoAccessorMethod]
+ public string local_storage_directory { owned get; construct; }
+ public virtual signal void download_started (WebKit.Download download);
+ public virtual signal void initialize_web_extensions ();
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_web_inspector_get_type ()")]
+ public class WebInspector : GLib.Object {
+ [CCode (has_construct_function = false)]
+ protected WebInspector ();
+ public void close ();
+ public uint get_attached_height ();
+ public bool get_can_attach ();
+ public unowned string get_inspected_uri ();
+ public unowned WebKit.WebViewBase get_web_view ();
+ public bool is_attached ();
+ public void show ();
+ public uint attached_height { get; }
+ public bool can_attach { get; }
+ public string inspected_uri { get; }
+ [HasEmitter]
+ public signal bool attach ();
+ public signal bool bring_to_front ();
+ public signal void closed ();
+ [HasEmitter]
+ public signal bool detach ();
+ public signal bool open_window ();
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_web_resource_get_type ()")]
+ public class WebResource : GLib.Object {
+ [CCode (has_construct_function = false)]
+ protected WebResource ();
+ public async uint8[] get_data (GLib.Cancellable? cancellable) throws GLib.Error;
+ public unowned WebKit.URIResponse get_response ();
+ public unowned string get_uri ();
+ public WebKit.URIResponse response { get; }
+ public string uri { get; }
+ public signal void failed (void* error);
+ public signal void failed_with_tls_errors (GLib.TlsCertificate certificate, GLib.TlsCertificateFlags errors);
+ public signal void finished ();
+ public signal void received_data (uint64 data_length);
+ public signal void sent_request (WebKit.URIRequest request, WebKit.URIResponse redirected_response);
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_web_view_get_type ()")]
+ public class WebView : WebKit.WebViewBase, Atk.Implementor, Gtk.Buildable {
+ [CCode (has_construct_function = false, type = "GtkWidget*")]
+ public WebView ();
+ public async bool can_execute_editing_command (string command, GLib.Cancellable? cancellable) throws GLib.Error;
+ public bool can_go_back ();
+ public bool can_go_forward ();
+ public bool can_show_mime_type (string mime_type);
+ public WebKit.Download download_uri (string uri);
+ public void execute_editing_command (string command);
+ public unowned WebKit.BackForwardList get_back_forward_list ();
+ public Gdk.RGBA get_background_color ();
+ public unowned WebKit.WebContext get_context ();
+ public unowned string get_custom_charset ();
+ public double get_estimated_load_progress ();
+ public unowned Cairo.Surface get_favicon ();
+ public unowned WebKit.FindController get_find_controller ();
+ public unowned WebKit.WebInspector get_inspector ();
+ public unowned WebKit.WebResource get_main_resource ();
+ public uint64 get_page_id ();
+ public unowned WebKit.Settings get_settings ();
+ public async Cairo.Surface get_snapshot (WebKit.SnapshotRegion region, WebKit.SnapshotOptions options, GLib.Cancellable? cancellable) throws GLib.Error;
+ public unowned string get_title ();
+ public bool get_tls_info (out unowned GLib.TlsCertificate certificate, out GLib.TlsCertificateFlags errors);
+ public unowned string get_uri ();
+ public unowned WebKit.UserContentManager get_user_content_manager ();
+ public unowned WebKit.WindowProperties get_window_properties ();
+ public double get_zoom_level ();
+ public void go_back ();
+ public void go_forward ();
+ public void go_to_back_forward_list_item (WebKit.BackForwardListItem list_item);
+ public bool is_editable ();
+ public void load_alternate_html (string content, string content_uri, string? base_uri);
+ public void load_bytes (GLib.Bytes bytes, string? mime_type, string? encoding, string? base_uri);
+ public void load_html (string content, string? base_uri);
+ public void load_plain_text (string plain_text);
+ public void load_request (WebKit.URIRequest request);
+ public void load_uri (string uri);
+ public Gtk.Widget new_with_related_view ();
+ public void reload ();
+ public void reload_bypass_cache ();
+ public async WebKit.JavascriptResult run_javascript (string script, GLib.Cancellable? cancellable) throws GLib.Error;
+ public async WebKit.JavascriptResult run_javascript_from_gresource (string resource, GLib.Cancellable? cancellable) throws GLib.Error;
+ public async GLib.InputStream save (WebKit.SaveMode save_mode, GLib.Cancellable? cancellable) throws GLib.Error;
+ public async bool save_to_file (GLib.File file, WebKit.SaveMode save_mode, GLib.Cancellable? cancellable) throws GLib.Error;
+ public void set_background_color (Gdk.RGBA rgba);
+ public void set_custom_charset (string? charset);
+ public void set_editable (bool editable);
+ public void set_settings (WebKit.Settings settings);
+ public void set_zoom_level (double zoom_level);
+ public void stop_loading ();
+ [CCode (has_construct_function = false, type = "GtkWidget*")]
+ public WebView.with_context (WebKit.WebContext context);
+ [CCode (has_construct_function = false, type = "GtkWidget*")]
+ public WebView.with_settings (WebKit.Settings settings);
+ [CCode (has_construct_function = false, type = "GtkWidget*")]
+ public WebView.with_user_content_manager (WebKit.UserContentManager user_content_manager);
+ [NoAccessorMethod]
+ public bool editable { get; set; }
+ public double estimated_load_progress { get; }
+ public void* favicon { get; }
+ [NoAccessorMethod]
+ public bool is_loading { get; }
+ [NoAccessorMethod]
+ public bool is_playing_audio { get; }
+ public WebKit.WebView related_view { construct; }
+ public WebKit.Settings settings { set construct; }
+ public string title { get; }
+ public string uri { get; }
+ public WebKit.UserContentManager user_content_manager { get; construct; }
+ [NoAccessorMethod]
+ public WebKit.WebContext web_context { owned get; construct; }
+ public double zoom_level { get; set; }
+ public virtual signal bool authenticate (WebKit.AuthenticationRequest request);
+ public virtual signal void close ();
+ public virtual signal bool context_menu (WebKit.ContextMenu context_menu, Gdk.Event event, WebKit.HitTestResult hit_test_result);
+ public virtual signal void context_menu_dismissed ();
+ public signal Gtk.Widget create (WebKit.NavigationAction navigation_action);
+ public virtual signal bool decide_policy (WebKit.PolicyDecision decision, WebKit.PolicyDecisionType type);
+ public virtual signal bool enter_fullscreen ();
+ public virtual signal void insecure_content_detected (WebKit.InsecureContentEvent event);
+ public virtual signal bool leave_fullscreen ();
+ public virtual signal void load_changed (WebKit.LoadEvent load_event);
+ public virtual signal bool load_failed (WebKit.LoadEvent load_event, string failing_uri, void* error);
+ public virtual signal bool load_failed_with_tls_errors (string failing_uri, GLib.TlsCertificate certificate, GLib.TlsCertificateFlags errors);
+ public virtual signal void mouse_target_changed (WebKit.HitTestResult hit_test_result, uint modifiers);
+ public virtual signal bool permission_request (WebKit.PermissionRequest permission_request);
+ public virtual signal bool print (WebKit.PrintOperation print_operation);
+ public virtual signal void ready_to_show ();
+ public virtual signal void resource_load_started (WebKit.WebResource resource, WebKit.URIRequest request);
+ public virtual signal void run_as_modal ();
+ public virtual signal bool run_color_chooser (WebKit.ColorChooserRequest request);
+ public virtual signal bool run_file_chooser (WebKit.FileChooserRequest request);
+ public virtual signal bool script_dialog (WebKit.ScriptDialog dialog);
+ public virtual signal bool show_notification (WebKit.Notification notification);
+ public virtual signal void submit_form (WebKit.FormSubmissionRequest request);
+ public virtual signal bool web_process_crashed ();
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_web_view_base_get_type ()")]
+ public class WebViewBase : Gtk.Container, Atk.Implementor, Gtk.Buildable {
+ [CCode (has_construct_function = false)]
+ protected WebViewBase ();
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_window_properties_get_type ()")]
+ public class WindowProperties : GLib.Object {
+ [CCode (has_construct_function = false)]
+ protected WindowProperties ();
+ public bool get_fullscreen ();
+ public Gdk.Rectangle get_geometry ();
+ public bool get_locationbar_visible ();
+ public bool get_menubar_visible ();
+ public bool get_resizable ();
+ public bool get_scrollbars_visible ();
+ public bool get_statusbar_visible ();
+ public bool get_toolbar_visible ();
+ public bool fullscreen { get; construct; }
+ public Cairo.RectangleInt geometry { get; construct; }
+ public bool locationbar_visible { get; construct; }
+ public bool menubar_visible { get; construct; }
+ public bool resizable { get; construct; }
+ public bool scrollbars_visible { get; construct; }
+ public bool statusbar_visible { get; construct; }
+ public bool toolbar_visible { get; construct; }
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_permission_request_get_type ()")]
+ public interface PermissionRequest : GLib.Object {
+ public abstract void allow ();
+ public abstract void deny ();
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", cprefix = "WEBKIT_AUTHENTICATION_SCHEME_", type_id = "webkit_authentication_scheme_get_type ()")]
+ public enum AuthenticationScheme {
+ DEFAULT,
+ HTTP_BASIC,
+ HTTP_DIGEST,
+ HTML_FORM,
+ NTLM,
+ NEGOTIATE,
+ CLIENT_CERTIFICATE_REQUESTED,
+ SERVER_TRUST_EVALUATION_REQUESTED,
+ UNKNOWN
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", cprefix = "WEBKIT_CACHE_MODEL_", type_id = "webkit_cache_model_get_type ()")]
+ public enum CacheModel {
+ DOCUMENT_VIEWER,
+ WEB_BROWSER,
+ DOCUMENT_BROWSER
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", cprefix = "WEBKIT_CONTEXT_MENU_ACTION_", type_id = "webkit_context_menu_action_get_type ()")]
+ public enum ContextMenuAction {
+ NO_ACTION,
+ OPEN_LINK,
+ OPEN_LINK_IN_NEW_WINDOW,
+ DOWNLOAD_LINK_TO_DISK,
+ COPY_LINK_TO_CLIPBOARD,
+ OPEN_IMAGE_IN_NEW_WINDOW,
+ DOWNLOAD_IMAGE_TO_DISK,
+ COPY_IMAGE_TO_CLIPBOARD,
+ COPY_IMAGE_URL_TO_CLIPBOARD,
+ OPEN_FRAME_IN_NEW_WINDOW,
+ GO_BACK,
+ GO_FORWARD,
+ STOP,
+ RELOAD,
+ COPY,
+ CUT,
+ PASTE,
+ DELETE,
+ SELECT_ALL,
+ INPUT_METHODS,
+ UNICODE,
+ SPELLING_GUESS,
+ NO_GUESSES_FOUND,
+ IGNORE_SPELLING,
+ LEARN_SPELLING,
+ IGNORE_GRAMMAR,
+ FONT_MENU,
+ BOLD,
+ ITALIC,
+ UNDERLINE,
+ OUTLINE,
+ INSPECT_ELEMENT,
+ OPEN_VIDEO_IN_NEW_WINDOW,
+ OPEN_AUDIO_IN_NEW_WINDOW,
+ COPY_VIDEO_LINK_TO_CLIPBOARD,
+ COPY_AUDIO_LINK_TO_CLIPBOARD,
+ TOGGLE_MEDIA_CONTROLS,
+ TOGGLE_MEDIA_LOOP,
+ ENTER_VIDEO_FULLSCREEN,
+ MEDIA_PLAY,
+ MEDIA_PAUSE,
+ MEDIA_MUTE,
+ DOWNLOAD_VIDEO_TO_DISK,
+ DOWNLOAD_AUDIO_TO_DISK,
+ CUSTOM
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", cprefix = "WEBKIT_COOKIE_POLICY_ACCEPT_", type_id = "webkit_cookie_accept_policy_get_type ()")]
+ public enum CookieAcceptPolicy {
+ ALWAYS,
+ NEVER,
+ NO_THIRD_PARTY
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", cprefix = "WEBKIT_COOKIE_PERSISTENT_STORAGE_", type_id = "webkit_cookie_persistent_storage_get_type ()")]
+ public enum CookiePersistentStorage {
+ TEXT,
+ SQLITE
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", cprefix = "WEBKIT_CREDENTIAL_PERSISTENCE_", type_id = "webkit_credential_persistence_get_type ()")]
+ public enum CredentialPersistence {
+ NONE,
+ FOR_SESSION,
+ PERMANENT
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", cprefix = "WEBKIT_FIND_OPTIONS_", type_id = "webkit_find_options_get_type ()")]
+ [Flags]
+ public enum FindOptions {
+ NONE,
+ CASE_INSENSITIVE,
+ AT_WORD_STARTS,
+ TREAT_MEDIAL_CAPITAL_AS_WORD_START,
+ BACKWARDS,
+ WRAP_AROUND
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", cprefix = "WEBKIT_HIT_TEST_RESULT_CONTEXT_", type_id = "webkit_hit_test_result_context_get_type ()")]
+ [Flags]
+ public enum HitTestResultContext {
+ DOCUMENT,
+ LINK,
+ IMAGE,
+ MEDIA,
+ EDITABLE,
+ SCROLLBAR,
+ SELECTION
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", cprefix = "WEBKIT_INSECURE_CONTENT_", type_id = "webkit_insecure_content_event_get_type ()")]
+ public enum InsecureContentEvent {
+ RUN,
+ DISPLAYED
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", cprefix = "WEBKIT_LOAD_", type_id = "webkit_load_event_get_type ()")]
+ public enum LoadEvent {
+ STARTED,
+ REDIRECTED,
+ COMMITTED,
+ FINISHED
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", cprefix = "WEBKIT_NAVIGATION_TYPE_", type_id = "webkit_navigation_type_get_type ()")]
+ public enum NavigationType {
+ LINK_CLICKED,
+ FORM_SUBMITTED,
+ BACK_FORWARD,
+ RELOAD,
+ FORM_RESUBMITTED,
+ OTHER
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", cprefix = "WEBKIT_POLICY_DECISION_TYPE_", type_id = "webkit_policy_decision_type_get_type ()")]
+ public enum PolicyDecisionType {
+ NAVIGATION_ACTION,
+ NEW_WINDOW_ACTION,
+ RESPONSE
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", cprefix = "WEBKIT_PRINT_OPERATION_RESPONSE_", type_id = "webkit_print_operation_response_get_type ()")]
+ public enum PrintOperationResponse {
+ PRINT,
+ CANCEL
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", cprefix = "WEBKIT_PROCESS_MODEL_", type_id = "webkit_process_model_get_type ()")]
+ public enum ProcessModel {
+ SHARED_SECONDARY_PROCESS,
+ MULTIPLE_SECONDARY_PROCESSES
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", cprefix = "WEBKIT_SAVE_MODE_", type_id = "webkit_save_mode_get_type ()")]
+ public enum SaveMode {
+ MHTML
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", cprefix = "WEBKIT_SCRIPT_DIALOG_", type_id = "webkit_script_dialog_type_get_type ()")]
+ public enum ScriptDialogType {
+ ALERT,
+ CONFIRM,
+ PROMPT
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", cprefix = "WEBKIT_SNAPSHOT_OPTIONS_", type_id = "webkit_snapshot_options_get_type ()")]
+ [Flags]
+ public enum SnapshotOptions {
+ NONE,
+ INCLUDE_SELECTION_HIGHLIGHTING,
+ TRANSPARENT_BACKGROUND
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", cprefix = "WEBKIT_SNAPSHOT_REGION_", type_id = "webkit_snapshot_region_get_type ()")]
+ public enum SnapshotRegion {
+ VISIBLE,
+ FULL_DOCUMENT
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", cprefix = "WEBKIT_TLS_ERRORS_POLICY_", type_id = "webkit_tls_errors_policy_get_type ()")]
+ public enum TLSErrorsPolicy {
+ IGNORE,
+ FAIL
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", cprefix = "WEBKIT_USER_CONTENT_INJECT_", type_id = "webkit_user_content_injected_frames_get_type ()")]
+ public enum UserContentInjectedFrames {
+ ALL_FRAMES,
+ TOP_FRAME
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", cprefix = "WEBKIT_USER_SCRIPT_INJECT_AT_DOCUMENT_", type_id = "webkit_user_script_injection_time_get_type ()")]
+ public enum UserScriptInjectionTime {
+ START,
+ END
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", cprefix = "WEBKIT_USER_STYLE_LEVEL_", type_id = "webkit_user_style_level_get_type ()")]
+ public enum UserStyleLevel {
+ USER,
+ AUTHOR
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", cprefix = "WEBKIT_DOWNLOAD_ERROR_")]
+ public errordomain DownloadError {
+ NETWORK,
+ CANCELLED_BY_USER,
+ DESTINATION;
+ public static GLib.Quark quark ();
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", cprefix = "WEBKIT_FAVICON_DATABASE_ERROR_")]
+ public errordomain FaviconDatabaseError {
+ NOT_INITIALIZED,
+ FAVICON_NOT_FOUND,
+ FAVICON_UNKNOWN;
+ public static GLib.Quark quark ();
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", cprefix = "WEBKIT_JAVASCRIPT_ERROR_SCRIPT_")]
+ public errordomain JavascriptError {
+ FAILED;
+ public static GLib.Quark quark ();
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", cprefix = "WEBKIT_NETWORK_ERROR_")]
+ public errordomain NetworkError {
+ FAILED,
+ TRANSPORT,
+ UNKNOWN_PROTOCOL,
+ CANCELLED,
+ FILE_DOES_NOT_EXIST;
+ public static GLib.Quark quark ();
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", cprefix = "WEBKIT_PLUGIN_ERROR_")]
+ public errordomain PluginError {
+ FAILED,
+ CANNOT_FIND_PLUGIN,
+ CANNOT_LOAD_PLUGIN,
+ JAVA_UNAVAILABLE,
+ CONNECTION_CANCELLED,
+ WILL_HANDLE_LOAD;
+ public static GLib.Quark quark ();
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", cprefix = "WEBKIT_POLICY_ERROR_")]
+ public errordomain PolicyError {
+ FAILED,
+ CANNOT_SHOW_MIME_TYPE,
+ CANNOT_SHOW_URI,
+ FRAME_LOAD_INTERRUPTED_BY_POLICY_CHANGE,
+ CANNOT_USE_RESTRICTED_PORT;
+ public static GLib.Quark quark ();
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", cprefix = "WEBKIT_PRINT_ERROR_")]
+ public errordomain PrintError {
+ GENERAL,
+ PRINTER_NOT_FOUND,
+ INVALID_PAGE_RANGE;
+ public static GLib.Quark quark ();
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", cprefix = "WEBKIT_SNAPSHOT_ERROR_FAILED_TO_")]
+ public errordomain SnapshotError {
+ CREATE;
+ public static GLib.Quark quark ();
+ }
+ [CCode (cheader_filename = "webkit2/webkit2.h", instance_pos = 1.9)]
+ public delegate void URISchemeRequestCallback (WebKit.URISchemeRequest request);
+ [CCode (cheader_filename = "webkit2/webkit2.h", cname = "WEBKIT_EDITING_COMMAND_COPY")]
+ public const string EDITING_COMMAND_COPY;
+ [CCode (cheader_filename = "webkit2/webkit2.h", cname = "WEBKIT_EDITING_COMMAND_CUT")]
+ public const string EDITING_COMMAND_CUT;
+ [CCode (cheader_filename = "webkit2/webkit2.h", cname = "WEBKIT_EDITING_COMMAND_PASTE")]
+ public const string EDITING_COMMAND_PASTE;
+ [CCode (cheader_filename = "webkit2/webkit2.h", cname = "WEBKIT_EDITING_COMMAND_REDO")]
+ public const string EDITING_COMMAND_REDO;
+ [CCode (cheader_filename = "webkit2/webkit2.h", cname = "WEBKIT_EDITING_COMMAND_SELECT_ALL")]
+ public const string EDITING_COMMAND_SELECT_ALL;
+ [CCode (cheader_filename = "webkit2/webkit2.h", cname = "WEBKIT_EDITING_COMMAND_UNDO")]
+ public const string EDITING_COMMAND_UNDO;
+ [CCode (cheader_filename = "webkit2/webkit2.h", cname = "WEBKIT_MAJOR_VERSION")]
+ public const int MAJOR_VERSION;
+ [CCode (cheader_filename = "webkit2/webkit2.h", cname = "WEBKIT_MICRO_VERSION")]
+ public const int MICRO_VERSION;
+ [CCode (cheader_filename = "webkit2/webkit2.h", cname = "WEBKIT_MINOR_VERSION")]
+ public const int MINOR_VERSION;
+ [CCode (cheader_filename = "webkit2/webkit2.h")]
+ public static uint get_major_version ();
+ [CCode (cheader_filename = "webkit2/webkit2.h")]
+ public static uint get_micro_version ();
+ [CCode (cheader_filename = "webkit2/webkit2.h")]
+ public static uint get_minor_version ();
+ [CCode (cheader_filename = "webkit2/webkit2.h")]
+ public static bool user_media_permission_is_for_audio_device (WebKit.UserMediaPermissionRequest request);
+ [CCode (cheader_filename = "webkit2/webkit2.h")]
+ public static bool user_media_permission_is_for_video_device (WebKit.UserMediaPermissionRequest request);
+}