From 6017d6af7b309f6b654109ed8c0e88f7c6d58ae3 Mon Sep 17 00:00:00 2001 From: "John (J5) Palmieri" Date: Thu, 10 Nov 2005 19:18:10 +0000 Subject: [PATCH 01/17] First import of the next generation libnotify API --- AUTHORS | 2 + COPYING | 504 ++++++++++++ ChangeLog | 335 ++++++++ Doxyfile.in | 1079 ++++++++++++++++++++++++++ INSTALL | 229 ++++++ Makefile.am | 24 + NEWS | 0 README | 0 SPECIFICATION | 3 + autogen.sh | 58 ++ configure.ac | 156 ++++ docs/ChangeLog | 81 ++ docs/notification-spec-0.8.xml | 1187 +++++++++++++++++++++++++++++ docs/notification-spec.xml | 1219 ++++++++++++++++++++++++++++++ libnotify.pc.in | 11 + libnotify.spec.in | 0 libnotify/Makefile.am | 22 + libnotify/Makefile.in | 504 ++++++++++++ libnotify/dbus-compat.h | 144 ++++ libnotify/notify.c | 108 +++ libnotify/notify.h | 68 ++ libnotify/notifycommon.h | 23 + libnotify/notifynotification.c | 770 +++++++++++++++++++ libnotify/notifynotification.h | 118 +++ libnotify/notifynotification.xml | 8 + tests/Makefile.am | 50 ++ tests/applet-critical.png | Bin 0 -> 1411 bytes tests/dewdop_leaf.jpg | Bin 0 -> 51555 bytes tests/test-basic.c | 42 + tests/test-default-action.c | 73 ++ tests/test-error.c | 48 ++ tests/test-image.c | 109 +++ tests/test-markup.c | 43 ++ tests/test-multi-actions.c | 104 +++ tests/test-replace-widget.c | 62 ++ tests/test-replace.c | 40 + tests/test-xy-stress.c | 86 +++ tests/test-xy.c | 44 ++ tools/Makefile.am | 11 + tools/notify-send.c | 144 ++++ 40 files changed, 7509 insertions(+) create mode 100644 AUTHORS create mode 100644 COPYING create mode 100644 ChangeLog create mode 100644 Doxyfile.in create mode 100644 INSTALL create mode 100644 Makefile.am create mode 100644 NEWS create mode 100644 README create mode 100644 SPECIFICATION create mode 100755 autogen.sh create mode 100644 configure.ac create mode 100644 docs/ChangeLog create mode 100644 docs/notification-spec-0.8.xml create mode 100644 docs/notification-spec.xml create mode 100644 libnotify.pc.in create mode 100644 libnotify.spec.in create mode 100644 libnotify/Makefile.am create mode 100644 libnotify/Makefile.in create mode 100644 libnotify/dbus-compat.h create mode 100644 libnotify/notify.c create mode 100644 libnotify/notify.h create mode 100644 libnotify/notifycommon.h create mode 100644 libnotify/notifynotification.c create mode 100644 libnotify/notifynotification.h create mode 100644 libnotify/notifynotification.xml create mode 100644 tests/Makefile.am create mode 100644 tests/applet-critical.png create mode 100644 tests/dewdop_leaf.jpg create mode 100644 tests/test-basic.c create mode 100644 tests/test-default-action.c create mode 100644 tests/test-error.c create mode 100644 tests/test-image.c create mode 100644 tests/test-markup.c create mode 100644 tests/test-multi-actions.c create mode 100644 tests/test-replace-widget.c create mode 100644 tests/test-replace.c create mode 100644 tests/test-xy-stress.c create mode 100644 tests/test-xy.c create mode 100644 tools/Makefile.am create mode 100644 tools/notify-send.c diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..d1999d8 --- /dev/null +++ b/AUTHORS @@ -0,0 +1,2 @@ +Christian Hammond +Mike Hearn diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..b1e3f5a --- /dev/null +++ b/COPYING @@ -0,0 +1,504 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! + + diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000..e5b1561 --- /dev/null +++ b/ChangeLog @@ -0,0 +1,335 @@ +Thu Nov 10 14:00:00 EST 2005 John (J5) Palmieri + + * Complete rewrite and first import to libnotify-ng module in SVN + +Mon Jul 04 02:13:56 PDT 2005 Christian Hammond + + * tests/Makefile.am: + * tests/test-markup.c: + A tests/test-xy-stress.c: + * configure.ac: + - Conditionally build gdk-dependent test apps if we have gdk. + - Added a X, Y stress test that will be used to help test + accurately positioning the arrows. + +Thu Jun 30 21:09:18 PDT 2005 Christian Hammond + + * tests/Makefile.am: + - Don't install the test programs during make install. + +Thu Jun 30 21:03:30 PDT 2005 Christian Hammond + + * libnotify/notify.c: + * libnotify/notify.h: + * tests/test-animation.c: + * tests/test-basic.c: + * tests/test-default-action.c: + * tests/test-error.c: + * tests/test-image.c: + * tests/test-markup.c: + * tests/test-multi-actions.c: + * tests/test-replace.c: + * tools/notify-send.c: + - Added support for hints in the API. + +Mon Jun 20 06:13:02 PDT 2005 Christian Hammond + + * libnotify/notify.c: + - Be a little better at not crashing. Just a bit better. There's + still another crash I'm trying to track down. + +Mon Jun 20 04:53:29 PDT 2005 Christian Hammond + + * libnotify/notify.c: + - Close the right container in D-BUS 0.3x. + +Mon Jun 20 02:49:27 PDT 2005 Christian Hammond + + * libnotify/Makefile.am: + A libnotify/dbus-compat.h: + - Add dbus-compat.h. + +Mon Jun 20 02:43:26 PDT 2005 Christian Hammond + + * libnotify/notify.c: + * configure.ac: + - Add support for compiling under D-BUS 0.3x. Actually running + has not yet been tested! + +Fri Apr 01 09:21:26 PST 2005 Christian Hammond + + * libnotify/notify.c: + - Updated to work with 0.6 of the notification spec. + +Sat Nov 06 15:40:48 PST 2004 Christian Hammond + + * libnotify/notify.h: + - Move our TODO list to the Doxygen @todo commands, so we'll get it + in a nice little page of its own in the API docs. + +Sat Nov 06 15:35:52 PST 2004 Christian Hammond + + * libnotify/notify.h: + - Move the emacs mode string out of the Doxygen comment and into its + own. + +Sat Nov 06 15:11:53 PST 2004 Christian Hammond + + * libnotify/notify.h: + A Doxyfile.in: + * Makefile.am: + * configure.ac: + - Add a Doxyfile.in and update things so we can get doxygen + docs. + +Wed Nov 03 23:39:23 PST 2004 Christian Hammond + + * libnotify/notify.c: + - Use glib's memory allocation stuff instead of libc's. + +Wed Nov 03 23:34:10 PST 2004 Christian Hammond + + * libnotify/notify.c: + * libnotify/notify.h: + * tests/test-animation.c: + * tests/test-image.c: + - Patch from Mike Hearn to do a bunch of stuff, like handling icons + and animations better. + +Wed Nov 03 01:19:42 PST 2004 Christian Hammond + + * configure.ac: + A libnotify.spec.in: + - Fix make distcheck. + +Wed Sep 29 22:34:03 PDT 2004 Christian Hammond + + * libnotify/notify.c: + * tools/notify-send.c: + - Don't flush the D-BUS connection, and make sure we disconnect from it. + +Wed Sep 29 21:53:15 PDT 2004 Christian Hammond + + * libnotify/notify.c: + * libnotify/notify.h: + * tests/test-animation.c: + * tests/test-basic.c: + * tests/test-default-action.c: + * tests/test-error.c: + * tests/test-image.c: + * tests/test-markup.c: + * tests/test-multi-actions.c: + * tests/test-replace.c: + * tools/notify-send.c: + - Updated to match the spec. + +Sat Sep 25 12:59:26 PDT 2004 Christian Hammond + + * libnotify/notify.c: + * tests/test-animation.c: + * tests/test-default-action.c: + - Fixed to compile. + +Wed Sep 01 00:39:23 PDT 2004 Christian Hammond + + * docs/ChangeLog: + * SPECIFICATION: + - Moved specification documentation. + - Moved specification ChangeLog. + +Wed Sep 01 00:30:53 PDT 2004 Christian Hammond + + * docs/notification-spec.xml: + - Finishing adding the rest of the signals to the spec. + +Sun Aug 29 22:27:42 PDT 2004 Christian Hammond + + A docs/notification-spec.ps: + A docs/notification-spec.xml: + - Added the notification spec in docbook format. It's not finished. + I'm just tired of working on it. + +Wed Jul 14 02:11:48 GMT 2004 Mike Hearn + * libnotify/notify.c: Use pointers instead of GINT_TO_POINTER + * tools/test-replace.c: Test replacing notifications + +Tue Jul 13 23:58:54 GMT 2004 Mike Hearn + * SPECIFICATION: CloseNotification sends NotificationClosed signal. + +Mon Jul 5 00:12:03 GMT 2004 Mike Hearn + * tools/notify-send.c (main): Treat expiry times < current time + as timeouts from current instant + +Sun Jul 4 22:54:44 GMT 2004 Mike Hearn + * libnotify/notify.c: Use a direct hash rather than an int hash + +Sun Jul 04 14:32:46 PDT 2004 Christian Hammond + + * libnotify/notify.c: + - Don't make IDs of 0 bad. They just want to be loved, too. + +Sun Jul 04 14:08:59 PDT 2004 Christian Hammond + + * libnotify/notify.c: + * libnotify/notify.h: + * tools/notify-send.c: + * SPECIFICATION: + - Changed timeouts to expire times. + - Install notify-send. + +Sun Jul 04 13:46:32 PDT 2004 Christian Hammond + + * tools/notify-send.c: + - Don't initialize the library until we're ready to talk to it. + +Sun Jul 04 13:34:14 PDT 2004 Christian Hammond + + * libnotify/notify.c: + * SPECIFICATION: + - Added the urgency level to the spec, and made it a byte. + +Sun Jul 04 13:28:51 PDT 2004 Christian Hammond + + A tools/: + R tests/: + * Makefile.am: + * configure.ac: + - Renamed tests to tools. + +Sun Jul 04 13:28:00 PDT 2004 Christian Hammond + + * tests/Makefile.am: + A tests/notify-send.c: + - Added the notify-send tool. + +Sat Jul 03 12:35:35 PDT 2004 Christian Hammond + + * libnotify/notify.c: + * libnotify/notify.h: + - Added support for GetCapabilities. + +Sat Jul 03 12:27:58 PDT 2004 Christian Hammond + + * libnotify/notify.c: + * libnotify/notify.h: + - Add support for GetServerInformation. + +Sat Jul 03 12:21:05 PDT 2004 Christian Hammond + + * libnotify/notify.c: + - Remove the application info sent on calls to Notify for now, + until/if something gets added to the spec about it. + +Sat Jul 03 12:14:48 PDT 2004 Christian Hammond + + * libnotify/notify.c: + * libnotify/notify.h: + - Removed the last of the request implementation. + - More work toward migrating the code to the specification. + - Simplified the action implementation a little bit. + +Sat Jul 03 11:26:03 PDT 2004 Christian Hammond + + * libnotify/notify.c: + * libnotify/notify.h: + - Cleaned up some things and updated some stuff to be compliant with + the spec. More will come soon. + +Thu Jul 1 23:46:28 GMT 2004 Mike Hearn + * SPECIFICATION: Add info on icons/sounds, add some + protocol requests. Change "buttons" in the overview to "actions". + +Wed Jun 30 14:03:51 GMT 2004 Mike Hearn + * SPECIFICATION: Initial version + +Wed Jun 30 13:28:18 GMT 2004 Mike Hearn + * libnotify/notify.[ch]: Add file variables for emacs to match + the settings Christian is using. + +Wed Jun 30 02:53:36 PDT 2004 Christian Hammond + + * libnotify/notify.c: + - Free up the handle memory for a closed notification. + +Tue Jun 29 19:33:43 PDT 2004 Christian Hammond + + * libnotify/notify.c: + * libnotify/notify.h: + - Due to the new icon struct, a lot of redundant functions have now + been removed. + +Tue Jun 29 19:26:58 PDT 2004 Christian Hammond + + * libnotify/notify.c: + * libnotify/notify.h: + - Added a NotifyIcon struct and the beginnings of the API. + +Tue Jun 29 18:49:38 PDT 2004 Christian Hammond + + * libnotify/notify.c: + * libnotify/notify.h: + - Replaced the guint32 ID numbers that were passed around to represent + notifications and requests and replaced them with an opaque data + structure that abstracts that and other stuff. + +Tue Jun 29 18:21:05 PDT 2004 Christian Hammond + + * libnotify/notify.c: + - Changed 8 space to 4 space tabs. + +Tue Jun 29 14:49:51 PDT 2004 Christian Hammond + + * libnotify/notify.c: + - Patch by Mike Hearn to add a print_error() function for dumping + extra info when we have an error. + +Sun Jun 27 21:50:33 PDT 2004 Christian Hammond + + * configure.ac: + - Pass 0.0.1 as the version number to AC_INIT(). + +Sun Jun 27 21:39:13 PDT 2004 Christian Hammond + + * libnotify/notify.c: + - Added support for the NotificationClosed and RequestClosed signals, + along with request callbacks. I wonder if any of this works. + +Sun Jun 27 20:23:00 PDT 2004 Christian Hammond + + * libnotify/notify.c: + - Keep track of request IDs so that we can do callback stuff in a bit. + +Sun Jun 27 20:02:09 PDT 2004 Christian Hammond + + * libnotify/notify.c: + - Send the list of button texts as a string array, rather than appending + each one individually. + +Sun Jun 27 18:30:19 PDT 2004 Christian Hammond + + * libnotify/notify.c: + * libnotify/notify.h: + - Split notify_close() into notify_close_notification() and + notify_close_request(). + - Implement notify_send_request() and + notify_send_request_with_icon_data(), and add versions of those + functions that take a va_list for the buttons. + +Sun Jun 27 16:46:32 PDT 2004 Christian Hammond + + * libnotify/notify.c: + - Added a utility function for doing most of the D-BUS message + creation. + - Implemented notify_close_notification() and notify_close_request(). + +Sun Jun 27 16:38:42 PDT 2004 Christian Hammond + + * libnotify/notify.c: + - Make sure we include our config.h if we have one. + +Sun Jun 27 16:37:30 PDT 2004 Christian Hammond + + * libnotify/notify.c: + * libnotify/notify.h: + - Added the initial header file and connection code. + diff --git a/Doxyfile.in b/Doxyfile.in new file mode 100644 index 0000000..3627336 --- /dev/null +++ b/Doxyfile.in @@ -0,0 +1,1079 @@ +# Doxyfile 1.3.4 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project +# +# All text after a hash (#) is considered a comment and will be ignored +# The format is: +# TAG = value [value, ...] +# For lists items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (" ") + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded +# by quotes) that should identify the project. + +PROJECT_NAME = @PACKAGE@ + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# This could be handy for archiving the generated documentation or +# if some version control system is used. + +PROJECT_NUMBER = @VERSION@ + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location +# where doxygen was started. If left blank the current directory will be used. + +OUTPUT_DIRECTORY = docs + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, Dutch, +# Finnish, French, German, Greek, Hungarian, Italian, Japanese, Japanese-en +# (Japanese with English messages), Korean, Norwegian, Polish, Portuguese, +# Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian. + +OUTPUT_LANGUAGE = English + +# This tag can be used to specify the encoding used in the generated output. +# The encoding is not always determined by the language that is chosen, +# but also whether or not the output is meant for Windows or non-Windows users. +# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES +# forces the Windows encoding (this is the default for the Windows binary), +# whereas setting the tag to NO uses a Unix-style encoding (the default for +# all platforms other than Windows). + +USE_WINDOWS_ENCODING = NO + +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). +# Set to NO to disable this. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. + +REPEAT_BRIEF = YES + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief +# description. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all inherited +# members of a class in the documentation of that class as if those members were +# ordinary class members. Constructors, destructors and assignment operators of +# the base classes will not be shown. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set +# to NO the shortest path that makes the file name unique will be used. + +FULL_PATH_NAMES = NO + +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. It is allowed to use relative paths in the argument list. + +STRIP_FROM_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful is your file systems +# doesn't support long names like on DOS, Mac, or CD-ROM. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like the Qt-style comments (thus requiring an +# explict @brief command for a brief description. + +JAVADOC_AUTOBRIEF = YES + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed +# description. Set this tag to YES if you prefer the old behaviour instead. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the DETAILS_AT_TOP tag is set to YES then Doxygen +# will output the detailed description near the top, like JavaDoc. +# If set to NO, the detailed description appears after the member +# documentation. + +DETAILS_AT_TOP = NO + +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it +# reimplements. + +INHERIT_DOCS = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. + +DISTRIBUTE_GROUP_DOC = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# Doxygen uses this value to replace tabs by spaces in code fragments. + +TAB_SIZE = 4 + +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". +# You can put \n's in the value part of an alias to insert newlines. + +ALIASES = "Copyright=\par Copyright:\n" + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources +# only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list +# of all members will be omitted, etc. + +OPTIMIZE_OUTPUT_FOR_C = YES + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources +# only. Doxygen will then generate output that is more tailored for Java. +# For instance, namespaces will be presented as packages, qualified scopes +# will look different, etc. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using +# the \nosubgrouping command. + +SUBGROUPING = YES + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless +# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES + +EXTRACT_ALL = NO + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# will be included in the documentation. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_STATIC tag is set to YES all static members of a file +# will be included in the documentation. + +EXTRACT_STATIC = NO + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. +# If set to NO only classes defined in header files are included. + +EXTRACT_LOCAL_CLASSES = YES + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. +# This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various +# overviews. This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the +# documentation. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the +# function's detailed documentation block. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. +# Set it to YES to include the internal documentation. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# users are advised to set this option to NO. + +CASE_SENSE_NAMES = YES + +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the +# documentation. If set to YES the scope will be hidden. + +HIDE_SCOPE_NAMES = NO + +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation +# of that file. + +SHOW_INCLUDE_FILES = YES + +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# is inserted in the documentation for inline members. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in +# declaration order. + +SORT_MEMBER_DOCS = YES + +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo +# commands in the documentation. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test +# commands in the documentation. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug +# commands in the documentation. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting +# \deprecated commands in the documentation. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional +# documentation sections, marked by \if sectionname ... \endif. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or define consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and defines in the +# documentation can be controlled using \showinitializer or \hideinitializer +# command in the documentation regardless of this setting. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the +# list will mention the files that were used to generate the documentation. + +SHOW_USED_FILES = YES + +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated +# by doxygen. Possible values are YES and NO. If left blank NO is used. + +QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank +# NO is used. + +WARNINGS = YES + +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# automatically be disabled. + +WARN_IF_UNDOCUMENTED = NO + +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some +# parameters in a documented function, or documenting parameters that +# don't exist or using markup commands wrongly. + +WARN_IF_DOC_ERROR = YES + +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written +# to stderr. + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories +# with spaces. + +INPUT = libnotify + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp +# *.h++ *.idl *.odl *.cs *.php *.php3 *.inc + +FILE_PATTERNS = *.h + +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. +# If left blank NO is used. + +RECURSIVE = NO + +# The EXCLUDE tag can be used to specify files and/or directories that should +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. + +EXCLUDE = + +# The EXCLUDE_SYMLINKS tag can be used select whether or not files or directories +# that are symbolic links (a Unix filesystem feature) are excluded from the input. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. + +EXCLUDE_PATTERNS = *private* + +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see +# the \include command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank all files are included. + +EXAMPLE_PATTERNS = + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. +# Possible values are YES and NO. If left blank NO is used. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see +# the \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command , where +# is the value of the INPUT_FILTER tag, and is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. + +INPUT_FILTER = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source +# files to browse (i.e. when SOURCE_BROWSER is set to YES). + +FILTER_SOURCE_FILES = NO + +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. + +SOURCE_BROWSER = YES + +# Setting the INLINE_SOURCES tag to YES will include the body +# of functions and classes directly in the documentation. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code +# fragments. Normal C and C++ comments will always remain visible. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES (the default) +# then for each documented function all documented +# functions referencing it will be listed. + +REFERENCED_BY_RELATION = YES + +# If the REFERENCES_RELATION tag is set to YES (the default) +# then for each documented function all documented entities +# called/used by that function will be listed. + +REFERENCES_RELATION = YES + +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for +# which an include is specified. Set to NO to disable this. + +VERBATIM_HEADERS = YES + +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project +# contains a lot of classes, structs, unions or interfaces. + +ALPHABETICAL_INDEX = YES + +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# in which this list will be split (can be a number in the range [1..20]) + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# should be ignored while generating the index headers. + +IGNORE_PREFIX = Notify _Notify + +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# generate HTML output. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `html' will be used as the default path. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# doxygen will generate files with .html extension. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a +# standard header. + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a +# standard footer. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet + +HTML_STYLESHEET = + +# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, +# files or namespaces will be aligned in HTML using tables. If set to +# NO a bullet list will be used. + +HTML_ALIGN_MEMBERS = YES + +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) +# of the generated HTML documentation. + +GENERATE_HTMLHELP = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be +# written to the html output dir. + +CHM_FILE = + +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run +# the HTML help compiler on the generated index.hhp. + +HHC_LOCATION = + +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that +# it should be included in the master .chm file (NO). + +GENERATE_CHI = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table of contents is generated (YES) or a +# normal table of contents (NO) in the .chm file. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members +# to the contents of the HTML help documentation and to the tree view. + +TOC_EXPAND = NO + +# The DISABLE_INDEX tag can be used to turn on/off the condensed index at +# top of each HTML page. The value NO (the default) enables the index and +# the value YES disables it. + +DISABLE_INDEX = NO + +# This tag can be used to set the number of enum values (range [1..20]) +# that doxygen will group on one line in the generated HTML documentation. + +ENUM_VALUES_PER_LINE = 4 + +# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be +# generated containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, +# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are +# probably better off using the HTML help feature. + +GENERATE_TREEVIEW = NO + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be +# used to set the initial width (in pixels) of the frame in which the tree +# is shown. + +TREEVIEW_WIDTH = 250 + +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- + +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# generate Latex output. + +GENERATE_LATEX = NO + +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `latex' will be used as the default path. + +LATEX_OUTPUT = latex + +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# invoked. If left blank `latex' will be used as the default command name. + +LATEX_CMD_NAME = latex + +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to +# generate index for LaTeX. If left blank `makeindex' will be used as the +# default command name. + +MAKEINDEX_CMD_NAME = makeindex + +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_LATEX = NO + +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, a4wide, letter, legal and +# executive. If left blank a4wide will be used. + +PAPER_TYPE = a4wide + +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# packages that should be included in the LaTeX output. + +EXTRA_PACKAGES = + +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a +# standard header. Notice: only use this tag if you know what you are doing! + +LATEX_HEADER = + +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references +# This makes the output suitable for online browsing using a pdf viewer. + +PDF_HYPERLINKS = NO + +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a +# higher quality PDF documentation. + +USE_PDFLATEX = NO + +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. +# This option is also used when generating formulas in HTML. + +LATEX_BATCHMODE = NO + +# If LATEX_HIDE_INDICES is set to YES then doxygen will not +# include the index chapters (such as File Index, Compound Index, etc.) +# in the output. + +LATEX_HIDE_INDICES = NO + +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- + +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# The RTF output is optimised for Word 97 and may not look very pretty with +# other RTF readers or editors. + +GENERATE_RTF = NO + +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `rtf' will be used as the default path. + +RTF_OUTPUT = rtf + +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_RTF = NO + +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using WORD or other +# programs which support those fields. +# Note: wordpad (write) and others do not support links. + +RTF_HYPERLINKS = NO + +# Load stylesheet definitions from file. Syntax is similar to doxygen's +# config file, i.e. a series of assigments. You only have to provide +# replacements, missing definitions are set to their default value. + +RTF_STYLESHEET_FILE = + +# Set optional variables used in the generation of an rtf document. +# Syntax is similar to doxygen's config file. + +RTF_EXTENSIONS_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- + +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# generate man pages + +GENERATE_MAN = NO + +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `man' will be used as the default path. + +MAN_OUTPUT = man + +# The MAN_EXTENSION tag determines the extension that is added to +# the generated man pages (default is the subroutine's section .3) + +MAN_EXTENSION = .3 + +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, +# then it will generate one additional man file for each entity +# documented in the real man page(s). These additional files +# only source the real man page, but without them the man command +# would be unable to find the correct page. The default is NO. + +MAN_LINKS = NO + +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- + +# If the GENERATE_XML tag is set to YES Doxygen will +# generate an XML file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the +# moment. + +GENERATE_XML = NO + +# The XML_OUTPUT tag is used to specify where the XML pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `xml' will be used as the default path. + +XML_OUTPUT = xml + +# The XML_SCHEMA tag can be used to specify an XML schema, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_SCHEMA = + +# The XML_DTD tag can be used to specify an XML DTD, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_DTD = + +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- + +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will +# generate an AutoGen Definitions (see autogen.sf.net) file +# that captures the structure of the code including all +# documentation. Note that this feature is still experimental +# and incomplete at the moment. + +GENERATE_AUTOGEN_DEF = NO + +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- + +# If the GENERATE_PERLMOD tag is set to YES Doxygen will +# generate a Perl module file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the +# moment. + +GENERATE_PERLMOD = NO + +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate +# the necessary Makefile rules, Perl scripts and LaTeX code to be able +# to generate PDF and DVI output from the Perl module output. + +PERLMOD_LATEX = NO + +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be +# nicely formatted so it can be parsed by a human reader. This is useful +# if you want to understand what is going on. On the other hand, if this +# tag is set to NO the size of the Perl module output will be much smaller +# and Perl will parse it just the same. + +PERLMOD_PRETTY = YES + +# The names of the make variables in the generated doxyrules.make file +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. +# This is useful so different doxyrules.make files included by the same +# Makefile don't overwrite each other's variables. + +PERLMOD_MAKEVAR_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- + +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include +# files. + +ENABLE_PREPROCESSING = YES + +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. Macro expansion can be done in a controlled +# way by setting EXPAND_ONLY_PREDEF to YES. + +MACRO_EXPANSION = YES + +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the +# PREDEFINED and EXPAND_AS_PREDEFINED tags. + +EXPAND_ONLY_PREDEF = YES + +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# in the INCLUDE_PATH (see below) will be search if a #include is found. + +SEARCH_INCLUDES = YES + +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by +# the preprocessor. + +INCLUDE_PATH = + +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will +# be used. + +INCLUDE_FILE_PATTERNS = + +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. + +PREDEFINED = "__attribute__(x)=" \ + _DOXYGEN_ + +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. +# Use the PREDEFINED tag if you want to use a different macro definition. + +EXPAND_AS_DEFINED = + +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then +# doxygen's preprocessor will remove all function-like macros that are alone +# on a line, have an all uppercase name, and do not end with a semicolon. Such +# function macros are typically used for boiler-plate code, and will confuse the +# parser if not removed. + +SKIP_FUNCTION_MACROS = YES + +#--------------------------------------------------------------------------- +# Configuration::addtions related to external references +#--------------------------------------------------------------------------- + +# The TAGFILES option can be used to specify one or more tagfiles. +# Optionally an initial location of the external documentation +# can be added for each tagfile. The format of a tag file without +# this location is as follows: +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where "loc1" and "loc2" can be relative or absolute paths or +# URLs. If a location is present for each tag, the installdox tool +# does not have to be run to correct the links. +# Note that each tag file must have a unique name +# (where the name does NOT include the path) +# If a tag file is not located in the directory in which doxygen +# is run, you must also specify the path to the tagfile here. + +TAGFILES = + +# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# a tag file that is based on the input files it reads. + +GENERATE_TAGFILE = + +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes +# will be listed. + +ALLEXTERNALS = NO + +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will +# be listed. + +EXTERNAL_GROUPS = YES + +# The PERL_PATH should be the absolute path and name of the perl script +# interpreter (i.e. the result of `which perl'). + +PERL_PATH = /usr/bin/perl + +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- + +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base or +# super classes. Setting the tag to NO turns the diagrams off. Note that this +# option is superceded by the HAVE_DOT option below. This is only a fallback. It is +# recommended to install and use dot, since it yields more powerful graphs. + +CLASS_DIAGRAMS = YES + +# If set to YES, the inheritance and collaboration graphs will hide +# inheritance and usage relations if the target is undocumented +# or is not a class. + +HIDE_UNDOC_RELATIONS = YES + +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# have no effect if this option is set to NO (the default) + +HAVE_DOT = YES + +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect inheritance relations. Setting this tag to YES will force the +# the CLASS_DIAGRAMS tag to NO. + +CLASS_GRAPH = YES + +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect implementation dependencies (inheritance, containment, and +# class references variables) of the class with other documented classes. + +COLLABORATION_GRAPH = YES + +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# collaboration diagrams in a style similiar to the OMG's Unified Modeling +# Language. + +UML_LOOK = YES + +# If set to YES, the inheritance and collaboration graphs will show the +# relations between templates and their instances. + +TEMPLATE_RELATIONS = NO + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT +# tags are set to YES then doxygen will generate a graph for each documented +# file showing the direct and indirect include dependencies of the file with +# other documented files. + +INCLUDE_GRAPH = NO + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each +# documented header file showing the documented files that directly or +# indirectly include this file. + +INCLUDED_BY_GRAPH = NO + +# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will +# generate a call dependency graph for every global function or class method. +# Note that enabling this option will significantly increase the time of a run. +# So in most cases it will be better to enable call graphs for selected +# functions only using the \callgraph command. + +CALL_GRAPH = NO + +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen +# will graphical hierarchy of all classes instead of a textual one. + +GRAPHICAL_HIERARCHY = YES + +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# generated by dot. Possible values are png, jpg, or gif +# If left blank png will be used. + +DOT_IMAGE_FORMAT = png + +# The tag DOT_PATH can be used to specify the path where the dot tool can be +# found. If left blank, it is assumed the dot tool can be found on the path. + +DOT_PATH = + +# The DOTFILE_DIRS tag can be used to specify one or more directories that +# contain dot files that are included in the documentation (see the +# \dotfile command). + +DOTFILE_DIRS = + +# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width +# (in pixels) of the graphs generated by dot. If a graph becomes larger than +# this value, doxygen will try to truncate the graph, so that it fits within +# the specified constraint. Beware that most browsers cannot cope with very +# large images. + +MAX_DOT_GRAPH_WIDTH = 1024 + +# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height +# (in pixels) of the graphs generated by dot. If a graph becomes larger than +# this value, doxygen will try to truncate the graph, so that it fits within +# the specified constraint. Beware that most browsers cannot cope with very +# large images. + +MAX_DOT_GRAPH_HEIGHT = 1024 + +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the +# graphs generated by dot. A depth value of 3 means that only nodes reachable +# from the root by following a path via at most 3 edges will be shown. Nodes that +# lay further from the root node will be omitted. Note that setting this option to +# 1 or 2 may greatly reduce the computation time needed for large code bases. Also +# note that a graph may be further truncated if the graph's image dimensions are +# not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH and MAX_DOT_GRAPH_HEIGHT). +# If 0 is used for the depth value (the default), the graph is not depth-constrained. + +MAX_DOT_GRAPH_DEPTH = 0 + +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will +# generate a legend page explaining the meaning of the various boxes and +# arrows in the dot generated graphs. + +GENERATE_LEGEND = YES + +# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will +# remove the intermediate dot files that are used to generate +# the various graphs. + +DOT_CLEANUP = YES + +#--------------------------------------------------------------------------- +# Configuration::addtions related to the search engine +#--------------------------------------------------------------------------- + +# The SEARCHENGINE tag specifies whether or not a search engine should be +# used. If set to NO the values of all tags below this one will be ignored. + +SEARCHENGINE = NO diff --git a/INSTALL b/INSTALL new file mode 100644 index 0000000..54caf7c --- /dev/null +++ b/INSTALL @@ -0,0 +1,229 @@ +Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software +Foundation, Inc. + + This file is free documentation; the Free Software Foundation gives +unlimited permission to copy, distribute and modify it. + +Basic Installation +================== + + These are generic installation instructions. + + 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 only 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. If you're + using `csh' on an old version of System V, you might need to type + `sh ./configure' instead to prevent `csh' from trying to execute + `configure' itself. + + Running `configure' takes awhile. 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. + + 4. Type `make install' to install the programs and any data files and + documentation. + + 5. 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. + +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=c89 CFLAGS=-O2 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 must use a version of `make' that +supports the `VPATH' variable, such as 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 `..'. + + If you have to use a `make' that does not support the `VPATH' +variable, you have 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. + +Installation Names +================== + + By default, `make install' will install the package's files in +`/usr/local/bin', `/usr/local/man', etc. You can specify an +installation prefix other than `/usr/local' by giving `configure' the +option `--prefix=PATH'. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +give `configure' the option `--exec-prefix=PATH', the package will use +PATH as the prefix for installing programs and libraries. +Documentation and other data files will still use the regular prefix. + + In addition, if you use an unusual directory layout you can give +options like `--bindir=PATH' 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. + + 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'. + +Optional Features +================= + + 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. + +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 `--target=TYPE' option 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 + +will cause the specified gcc to be used as the C compiler (unless it is +overridden in the site shell script). + +`configure' Invocation +====================== + + `configure' recognizes the following options to control how it +operates. + +`--help' +`-h' + Print a summary of the options to `configure', and exit. + +`--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. + +`configure' also accepts some other, not widely useful, options. Run +`configure --help' for more details. + diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..f9446f5 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,24 @@ +SUBDIRS = libnotify tools tests + +pcdata_DATA = libnotify.pc +pcdatadir = $(libdir)/pkgconfig + +EXTRA_DIST = \ + AUTHORS NEWS INSTALL COPYING README \ + ChangeLog \ + Doxyfile.in \ + autogen.sh \ + configure.ac \ + libnotify.pc.in \ + libnotify.spec.in + +dist-hook: libnotify.spec + cp libnotify.spec $(distdir) + +$(OBJECTS): libtool +libtool: $(LIBTOOL_DEPS) + $(SHELL) ./config.status --recheck + +doxygen: + @echo "Running doxygen..." + @doxygen Doxyfile diff --git a/NEWS b/NEWS new file mode 100644 index 0000000..e69de29 diff --git a/README b/README new file mode 100644 index 0000000..e69de29 diff --git a/SPECIFICATION b/SPECIFICATION new file mode 100644 index 0000000..06563f2 --- /dev/null +++ b/SPECIFICATION @@ -0,0 +1,3 @@ +This document has moved. + +Please see docs/ for the new version of the specification. diff --git a/autogen.sh b/autogen.sh new file mode 100755 index 0000000..7479df1 --- /dev/null +++ b/autogen.sh @@ -0,0 +1,58 @@ +#!/bin/sh +# Run this to generate all the initial makefiles, etc. + +DIE=0 + +PACKAGE=libnotify + +echo "Generating configuration files for $PACKAGE, please wait..." + +(autoconf --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "You must have autoconf installed to compile $PACKAGE." + echo "Download the appropriate package for your distribution," + echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" + DIE=1 +} + +(libtool --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "You must have libtool installed to compile $PACKAGE." + echo "Download the appropriate package for your distribution," + echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" + DIE=1 +} + +(automake --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "You must have automake installed to compile $PACKAGE." + echo "Download the appropriate package for your distribution," + echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" + DIE=1 +} + +[ $DIE -eq 1 ] && exit 1; + +echo " libtoolize --copy --force" +libtoolize --copy --force +echo " aclocal $ACLOCAL_FLAGS" +aclocal $ACLOCAL_FLAGS +echo " autoheader" +autoheader +echo " automake --add-missing" +automake --add-missing +echo " autoconf" +autoconf + +if [ -x config.status -a -z "$*" ]; then + ./config.status --recheck +else + if test -z "$*"; then + echo "I am going to run ./configure with no arguments - if you wish" + echo "to pass any to it, please specify them on the $0 command line." + echo "If you do not wish to run ./configure, press Ctrl-C now." + trap 'echo "configure aborted" ; exit 0' 1 2 15 + sleep 1 + fi + ./configure "$@"; +fi diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..f961b50 --- /dev/null +++ b/configure.ac @@ -0,0 +1,156 @@ +dnl Process this file with autoconf to create configure. + +dnl ################################################################ +dnl # Initialize autoconf +dnl ################################################################ +AC_INIT(libnotify, 0.0.1.j5.1, chipx86@gnupdate.org) +AC_PREREQ(2.50) +AC_CONFIG_SRCDIR(config.h.in) +AC_COPYRIGHT([Copyright 2004 Christian Hammond]) + + +dnl ################################################################ +dnl # Version information +dnl ################################################################ +LIBGALAGO_MAJOR_VERSION=0 +LIBGALAGO_MINOR_VERSION=0 +LIBGALAGO_MICRO_VERSION=1 +LIBGALAGO_DEVEL_VERSION=j5.1 + +LIBGALAGO_VERSION=$LIBGALAGO_MAJOR_VERSION.$LIBGALAGO_MINOR_VERSION.$LIBGALAGO_MICRO_VERSION + +if test "x$LIBGALAGO_DEVEL_VERSION" != "x0"; then + if test "x$LIBGALAGO_MICRO_VERSION" = "x0"; then + LIBGALAGO_MICRO_VERSION=$LIBGALAGO_DEVEL_VERSION + LIBGALAGO_VERSION=$LIBGALAGO_MAJOR_VERSION.$LIBGALAGO_MINOR_VERSION.$LIBGALAGO_DEVEL_VERSION + else + LIBGALAGO_VERSION=$LIBGALAGO_VERSION.$LIBGALAGO_DEVEL_VERSION + fi +fi + +AC_DEFINE_UNQUOTED(LIBGALAGO_MAJOR_VERSION, $LIBGALAGO_MAJOR_VERSION, + [libnotify major version.]) +AC_DEFINE_UNQUOTED(LIBGALAGO_MINOR_VERSION, $LIBGALAGO_MINOR_VERSION, + [libnotify minor version.]) +AC_DEFINE_UNQUOTED(LIBGALAGO_MICRO_VERSION, $LIBGALAGO_MICRO_VERSION, + [libnotify micro version.]) +AC_DEFINE_UNQUOTED(LIBGALAGO_VERSION, "$LIBGALAGO_VERSION", + [libnotify version.]) + +dnl ################################################################ +dnl # libtool versioning +dnl ################################################################ +dnl # +dnl # +1 : 0 : +1 == new interface that does not break old one. +dnl # +1 : 0 : 0 == removed an interface. Breaks old apps. +dnl # ? : +1 : ? == internal changes that doesn't break anything. +dnl # +dnl # CURRENT : REVISION : AGE +dnl # +LT_CURRENT=0 +LT_REVISION=0 +LT_AGE=0 + +LT_RELEASE=$LIBGALAGO_MAJOR_VERSION.$LIBGALAGO_MINOR_VERSION.$LIBGALAGO_MICRO_VERSION + +AC_SUBST(LT_RELEASE) +AC_SUBST(LT_CURRENT) +AC_SUBST(LT_REVISION) +AC_SUBST(LT_AGE) + +dnl ################################################################ +dnl # Initialize automake +dnl ################################################################ +VERSION=$LIBGALAGO_VERSION +PACKAGE=libnotify + +AM_INIT_AUTOMAKE($PACKAGE, $VERSION) + +dnl ################################################################ +dnl # Specify a header configuration file +dnl ################################################################ +AM_CONFIG_HEADER(config.h) + +dnl ################################################################ +dnl # Check for some standard stuff. +dnl ################################################################ +AC_PROG_CC +#AC_ARG_PROGRAM +AC_PROG_CPP +AC_PROG_MAKE_SET +AC_PROG_LN_S +AC_PROG_INSTALL + +AC_C_CONST +AC_TYPE_SIZE_T +AC_EXEEXT + +AM_PROG_LIBTOOL + +AC_CHECK_LIB([popt], [poptGetArg], , AC_MSG_ERROR([Popt is required])) + +pkg_modules="gtk+-2.0 >= 2.2.2 glib-2.0 >= 2.2.2, dbus-1 >= 0.35, dbus-glib-1 >= 0.35" +PKG_CHECK_MODULES(PACKAGE, [$pkg_modules]) +AC_SUBST(PACKAGE_CFLAGS) +AC_SUBST(PACKAGE_LIBS) + +gdk_modules="gdk-2.0 gdk-pixbuf-2.0" +PKG_CHECK_MODULES(GDK, [$gdk_modules], have_gdk=yes, +[ + have_gdk=no + + AC_WARN("Some test apps will not be built") +]) + +AM_CONDITIONAL(HAVE_GDK, test "x$have_gdk" = "xyes") + +AC_SUBST(GDK_CFLAGS) +AC_SUBST(GDK_LIBS) + +dnl +dnl Check the D-BUS version. +dnl + +AC_MSG_CHECKING([dbus version]) +DBUS_VERSION=`$PKG_CONFIG --modversion dbus-1` +DBUS_MAJOR_VER=`echo $DBUS_VERSION | cut -d. -f 1` +DBUS_MINOR_VER=`echo $DBUS_VERSION | cut -d. -f 2` +DBUS_MICRO_VER=`echo $DBUS_VERSION | cut -d. -f 3` + +AC_MSG_RESULT($DBUS_VERSION) +AC_DEFINE_UNQUOTED(DBUS_MAJOR_VER, $DBUS_MAJOR_VER, [D-BUS major version.]) +AC_DEFINE_UNQUOTED(DBUS_MINOR_VER, $DBUS_MINOR_VER, [D-BUS minor version.]) +AC_DEFINE_UNQUOTED(DBUS_MICRO_VER, $DBUS_MICRO_VER, [D-BUS micro version.]) + +AC_DEFINE_UNQUOTED(DBUS_API_SUBJECT_TO_CHANGE, ,DBUS API is subject to change) + +dnl # Use wall if we have GCC +if test "x$GCC" = "xyes"; then + CFLAGS="$CFLAGS -Wall" +fi + +AC_SUBST(CFLAGS) + +dnl ################################################################ +dnl # Output the Makefiles +dnl ################################################################ +AC_CONFIG_FILES([ +Doxyfile +Makefile +libnotify.pc +libnotify.spec +libnotify/Makefile +tests/Makefile +tools/Makefile +]) + +AC_OUTPUT + +echo +echo $PACKAGE v$VERSION + +echo +echo "Now type make to compile" +echo "Then su to root and type: make install" +echo + diff --git a/docs/ChangeLog b/docs/ChangeLog new file mode 100644 index 0000000..3027087 --- /dev/null +++ b/docs/ChangeLog @@ -0,0 +1,81 @@ +Fri Apr 01 09:11:38 PST 2005 Christian Hammond + + * notification-spec.xml: + - Removed all references to NIL, and explained briefly how each + parameter can be made empty. + - Bumped to version 0.6. + +Fri Oct 01 23:44:40 PDT 2004 Christian Hammond + + * notification-spec.xml: + - Added a "suppress-sound" hint. + - Added a "sound" capability. + - Renamed the "soundfile" hint to "sound-file." + - Bumped to version 0.5. + +Wed Sep 29 22:35:16 PDT 2004 Christian Hammond + + * notification-spec.xml: + - Version 0.4. + +Sat Sep 25 00:08:45 PDT 2004 Christian Hammond + + * notification-spec.xml: + - Added tag support in the markup section. + - Detailed what markup is and what it is not, and its restrictions. + - Removed the High urgency level. + - Gave a better categorization to notification type formats. + - Added new notification types. + - Fixed notification expiration so it's a timeout rather than a + timestamp. + +Fri Sep 03 22:26:31 PDT 2004 Christian Hammond + + * notification-spec.xml: + - Changed the app_icon parameter of Notify to take a byte array, + string, or NIL, so that it's the same as loading a single frame + of a set of images. + - Renamed "Icons and Sounds" to just "Icons." + - Changed the wording about the fallback in case the notification + server can't do actions. + +Thu Sep 02 09:18:38 PDT 2004 Christian Hammond + + * notification-spec.xml: + - Removed the sound information. + - Fixed several typos and references to KNotify. + - Removed the PID hint. + - Added some D-BUS Error stuff. + +Thu Sep 02 01:19:07 PDT 2004 Christian Hammond + + * notification-spec.xml: + - Wrote the section about hints. + +Thu Sep 02 01:05:01 PDT 2004 Christian Hammond + + * notification-spec.xml: + - Wrote about urgency levels. + +Thu Sep 02 00:53:17 PDT 2004 Christian Hammond + + * notification-spec.xml: + - NotificationClosed now returns a reason of 3 when CloseNotification + is called. 4 is now Undefined/Reserved. + +Wed Sep 01 01:04:45 PDT 2004 Christian Hammond + + * notification-spec.xml: + - Marked up parameters. + +Wed Sep 01 00:50:51 PDT 2004 Christian Hammond + + * notification-spec.xml: + - Moved the notification components into a table. + +Wed Sep 01 00:38:46 PDT 2004 Christian Hammond + + * notification-spec.xml: + - Added vertical alignment of top to the tables. + + diff --git a/docs/notification-spec-0.8.xml b/docs/notification-spec-0.8.xml new file mode 100644 index 0000000..1e48191 --- /dev/null +++ b/docs/notification-spec-0.8.xml @@ -0,0 +1,1187 @@ + + +
+ + Desktop Notifications Specification + Version 0.7 + 28 July 2005 + + + Mike + Hearn + +
+ mike@navi.cx +
+
+
+ + Christian + Hammond + +
+ chipx86@chipx86.com +
+
+
+
+ + + 0.8 + 23 September 2005 + J5 + + Major overhaul of spec to work with the newer D-Bus recursive type system. + Simplify protocol. + Changed the verbage notification type to category + + + + 0.7 + 28 July 2005 + cdh + + Added "x" and "y" hints. Talk about the variant type for hint values. + + + + 0.6 + 1 April 2005 + cdh + + Updated to work with D-BUS 0.31+. + + + + 0.5 + 2 October 2004 + cdh + + Added a "suppress-sound" hint. Added a "sound" capability. Renamed the + "soundfile" hint to sound-file". + + + + 0.4 + 29 September 2004 + cdh + + Added image support in markup, and made the restrictions on markup more + clear. Removed the High urgency. Added new notification types. Fixed + notification expiration. + + + + 0.3 + 15 September 2004 + cdh + Added hint and notification type sections + + + 0.2 + foo + mh + Added replaces field to protocol + + + 0.1 + foo + mh + Initial version + + +
+ + + Introduction + + This is a draft standard for a desktop notifications service, through + which applications can generate passive popups (sometimes known as + "poptarts") to notify the user in an asynchronous manner of events. + + + This specification explicitly does not include other types of + notification presentation such as modal message boxes, window manager + decorations or window list annotations. + + + Example use cases include: + + + + + Presence changes in IM programs: for instance, MSN Messenger on + Windows pioneered the use of passive popups to indicate presence + changes. + + + Scheduled alarm + Completed file transfer + New mail notification + Low disk space/battery warnings + + + + + Basic Design + + In order to ensure that multiple notifications can easily be + displayed at once, and to provide a convenient implementation, all + notifications are controlled by a single session-scoped service which + exposes a D-BUS interface. + + + On startup, a conforming implementation should take the + org.freedesktop.Notifications service on + the session bus. This service will be referred to as the "notification + server" or just "the server" in this document. It can optionally be + activated automatically by the bus process, however this is not required + and notification server clients must not assume that it is available. + + + The server should implement the + org.freedesktop.Notifications interface on + an object with the path "/org/freedesktop/Notifications". + This is the only interface required by this version of the specification. + + + A notification has the following components: + + + Notification Components + + + + Component + Description + + + + + Application Name + + This is the optional name of the application sending the notification. + This should be the application's formal name, rather than some sort + of ID. An example would be "FredApp E-Mail Client," rather than + "fredapp-email-client." + + + + Replaces ID + + An optional ID of an existing notification that this + notification is intended to replace. + + + + Application Icon + + The application icon. This is represented either as a URI + (file:// is the only location supported right now) + or a name in an icon theme. + + + + Summary + + This is a single line overview of the notification. For instance, + "You have mail" or "A friend has come online". It should generally + not be longer than 40 characters, though this is not a requirement, + and server implementations should word wrap if necessary. The summary + must be encoded using UTF-8. + + + + Body + + + This is a multi-line body of text. Each line is a paragraph, server + implementations are free to word wrap them as they see fit. + + + The body may contain simple markup as specified in + . It must be encoded using UTF-8. + + + If the body is omitted, just the summary is displayed. + + + + + Actions + + The actions send a request message back to the notification client + when invoked. This functionality may not be implemented by the + notification server, conforming clients should check if it is available + before using it (see the GetCapabilities message in + ). An implementation is free to ignore any + requested by the client. As an example one possible rendering of + actions would be as buttons in the notification popup. + + Actions are sent over as a list of pairs. Each even element in the list + (starting at index 0) represents the identifier for the action. Each odd + element in the list is the localized string that will be displayed to the user. + + + + Hints + See . + + Beyond the core protocol is the hints table. A couple of core elements have + been moved to hints mostly because in a huge number of cases their default values + would be sufficent. The elements moved to hints are: + + * Category ID - An optional ID representing the type of notification (the name has + been changed from Notification Type ID in pervious versions). See . + + * Urgency Level - The urgency of the notification. See . + (Defaults to 1 - Normal) + + * Icon Data - Instead of overloading the icon field we now have an icon_data field that + is used when icon is blank. + + + Expiration Timeout + + + The timeout time in milliseconds since the display of the notification at + which the notification should automatically close. + + + If -1, the notification's expiration time is dependent on the + notification server's settings, and may vary for the type of + notification. + + If 0, the notification never expires. + + + + + +
+ + Each notification displayed is allocated a unique ID by the server. + This is unique within the session. While the notification server is + running, the ID will not be recycled unless the capacity of a uint32 is + exceeded. + + + This can be used to hide the notification before the expiration timeout + is reached. It can also be used to atomically replace the notification + with another. This allows you to (for instance) modify the contents of + a notification while it's on-screen. + +
+ + + Backwards Compatibility + + Clients should try and avoid making assumptions about the presentation and + abilities of the notification server. The message content is the most + important thing. + + + Clients can check with the server what capabilities are supported + using the GetCapabilities message. See + . + + + If a client requires a response from a passive popup, it should be + coded such that a non-focus-stealing message box can be used in the + case that the notification server does not support this feature. + + + + + Markup + + Body text may contain markup. The markup is XML-based, and consists + of a small subset of HTML along with a few additional tags. + + + The following tags should be supported by the notification server. + Though it is optional, it is recommended. Notification servers that do + not support these tags should filter them out. + + + + + + + b ... + b + + Bold + + + + i ... + i + + Italic + + + + u ... + u + + Underline + + + + a href="..." ... + a + + Hyperlink + + + + img src="..." alt="..." + + Image + + + + + + A full-blown HTML implementation is not required of this spec, and + notifications should never take advantage of tags that are not listed + above. As notifications are not a substitute for web browsers or complex + dialogs, advanced layout is not necessary, and may in fact limit the + number of systems that notification services can run on, due to memory + usage and screen space. Such examples are PDAs, certain cell phones, and + slow PCs or laptops with little memory. + + + For the same reason, a full XML or XHTML implementation using XSLT or + CSS stylesheets is not part of this specification. Information that + must be presented in a more complex form should use an application-specific + dialog, a web browser, or some other display mechanism. + + + The tags specified above mark up the content in a way that allows them + to be stripped out on some implementations without impacting the actual + content. + + + + Hyperlinks + + Hyperlinks allow for linking one or more words to a URI. There is no + requirement to allow for images to be linked, and it is highly suggested + that implementations do not allow this, as there is no clean-looking, + standard visual indicator for a hyperlinked image. + + + Hyperlinked text should appear in the standard blue underline format. + + + Hyperlinks cannot function as a replacement for actions. They are + used to link to local directories or remote sites using standard URI + schemes. + + + Implementations are not required to support hyperlinks. + + + + + Images + + Images may be placed in the notification, but this should be done with + caution. The image should never exceed 200x100, but this should be thought + of as a maximum size. Images should always have alternative text + provided through the alt="..." attribute. + + + Image data cannot be embedded in the message itself. Images referenced + must always be local files. + + + Implementations are not required to support images. + + + + + + Icons + + A notification can optionaly have an icon specified by the Application Icon + field or by the icon_data hints field. + + + The icon_data field should be a raw image data structure of signature (iiibiiay) + which describes the width, height, rowstride, has alpha, bits per sample, channels + and image data respectively. + + + + + Categories + + Notifications can optionally have a type indicator. Although neither + client or nor server must support this, some may choose to. Those servers + implementing categories may use them to intelligently display + the notification in a certain way, or group notifications of similar + types. + + + Categories are in + class.specific form. + class specifies the generic type of notification, and + specific specifies the more specific type of + notification. + + + If a specific type of notification does not exist for your notification, + but the generic kind does, a notification of type + class is acceptable. + + + Third parties, when defining their own categories, should discuss + the possibility of standardizing on the hint with other parties, preferably + in a place such as the + xdg + mailing list at + freedesktop.org. If it + warrants a standard, it will be added to the table above. If no + consensus is reached, the category should be in the form of + "x-vendor.class.name." + + + The following table lists standard notifications as defined by this spec. + More will be added in time. + + + Categories + + + + Type + Description + + + + + "device" + + A generic device-related notification that doesn't fit into + any other category. + + + + "device.added" + A device, such as a USB device, was added to the system. + + + "device.error" + A device had some kind of error. + + + "device.removed" + + A device, such as a USB device, was removed from the system. + + + + "email" + + A generic e-mail-related notification that doesn't fit into any + other category. + + + + "email.arrived" + A new e-mail notification. + + + "email.bounced" + A notification stating that an e-mail has bounced. + + + "im" + + A generic instant message-related notification that doesn't fit + into any other category. + + + + "im.error" + An instant message error notification. + + + "im.received" + A received instant message notification. + + + "network" + + A generic network notification that doesn't fit into any other + category. + + + + "network.connected" + + A network connection notification, such as successful sign-on to a + network service. This should not be confused with + device.added for new network devices. + + + + "network.disconnected" + + A network disconnected notification. This should not be confused with + device.removed for disconnected network devices. + + + + "network.error" + + A network-related or connection-related error. + + + + "presence" + + A generic presence change notification that doesn't fit into + any other category, such as going away or idle. + + + + "presence.offline" + An offline presence change notification. + + + "presence.online" + An online presence change notification. + + + "transfer" + + A generic file transfer or download notification that doesn't fit + into any other category. + + + + "transfer.complete" + A file transfer or download complete notification. + + + "transfer.error" + A file transfer or download error. + + + +
+
+ + + Urgency Levels + + Notifications have an urgency level associated with them. This defines + the importance of the notification. For example, "Joe Bob signed on" + would be a low urgency. "You have new mail" or "A USB device was unplugged" + would be a normal urgency. "Your computer is on fire" would be a critical + urgency. + + Urgency levels are defined as follows: + + Urgency Levels + + + + Type + Description + + + + + 0 + Low + + + 1 + Normal + + + 2 + Critical + + + +
+ + Developers must use their own judgement when deciding the urgency of a + notification. Typically, if the majority of programs are using the same + level for a specific type of urgency, other applications should follow + them. + + + For low and normal urgencies, server implementations may display the + notifications how they choose. They should, however, have a sane + expiration timeout dependent on the urgency level. + + + Critical notifications should not automatically expire, as they are + things that the user will most likely want to know about. They should + only be closed when the user dismisses them, for example, by clicking on + the notification. + +
+ + + Hints + + Hints are a way to provide extra data to a notification server that + the server may be able to make use of. + + + Neither clients nor notification servers are required to support any + hints. Both sides should assume that hints are not passed, and should + ignore any hints they do not understand. + + + Third parties, when defining their own hints, should discuss the + possibility of standardizing on the hint with other parties, preferably + in a place such as the + xdg + mailing list at + freedesktop.org. If it + warrants a standard, it will be added to the table above. If no + consensus is reached, the hint name should be in the form of + "x-vendor-name." + + + The value type for the hint dictionary in D-BUS is of the + DBUS_TYPE_VARIANT container type. This allows different + data types (string, integer, boolean, etc.) to be used for hints. When + adding a dictionary of hints, this type must be used, rather than putting + the actual hint value in as the dictionary value. + + + The following table lists the standard hints as defined by this + specification. Future hints may be proposed and added to this list + over time. Once again, implementations are not required to support these. + + + Standard Hints + + + + Name + Value Type + Description + + + + + "urgency" + byte + + The urgency level. + + + + "category" + string + + The type of notification this is. + + + + "image_data" + (iiibiiay) + + This is a raw data image format which describes the width, height, rowstride, + has alpha, bits per sample, channels and image data respectively. We use this + value if the icon field is left blank. + + + + "sound-file" + string + + The path to a sound file to play when the notification pops up. + + + + "suppress-sound" + boolean + + Causes the server to suppress playing any sounds, if it has that + ability. This is usually set when the client itself is going to + play its own sound. + + + + "x" + int + + Specifies the X location on the screen that the notification should + point to. The "y" hint must also be specified. + + + + "y" + int + + Specifies the Y location on the screen that the notification should + point to. The "x" hint must also be specified. + + + + +
+
+ + + D-BUS Protocol + + The following messages must be supported by all + implementations. + + + + Message commands + + + <literal>org.freedesktop.Notifications.GetCapabilities</literal> + + + STRING_ARRAY + org.freedesktop.Notifications.GetCapabilities + + + + + + This message takes no parameters. + + + It returns an array of strings. Each string describes an optional + capability implemented by the server. The following values are + defined by this spec: + + + Server Capabilities + + + + "actions" + + The server will provide the specified actions to the user. Even if + this cap is missing, actions may still be specified by the client, + however the server is free to ignore them. + + + + "body" + + Supports body text. Some implementations may only show the + summary (for instance, onscreen displays, marquee/scrollers) + + + + "body-hyperlinks" + + The server supports hyperlinks in the notifications. + + + + "body-images" + + The server supports images in the notifications. + + + + "body-markup" + + Supports markup in the body text. If marked up text is sent + to a server that does not give this cap, the markup will show + through as regular text so must be stripped clientside. + + + + "icon-multi" + + The server will render an animation of all the frames in a given + image array. The client may still specify multiple frames even if + this cap and/or "icon-static" is missing, however + the server is free to ignore them and use only the primary frame. + + + + "icon-static" + + Supports display of exactly 1 frame of any given image array. + This value is mutually exclusive with + "icon-multi", it is a protocol error for the + server to specify both. + + + + "sound" + + The server supports sounds on notifications. If returned, the + server must support the "sound-file" and + "suppress-sound" hints. + + + + +
+ + New vendor-specific caps may be specified as long as they start with + "x-vendor". For instance, + "x-gnome-foo-cap". Capability names must not + contain spaces. They are limited to alpha-numeric characters and dashes + ("-"). + +
+ + + <literal>org.freedesktop.Notifications.Notify</literal> + + + UINT32 + org.freedesktop.Notifications.Notify + + STRING app_name + UINT32 replaces_id + STRING app_icon + STRING summary + STRING body + ARRAY actions + DICT hints + INT32 expire_timeout + + + + Sends a notification to the notification server. + + + Notify Parameters + + + + Name + Type + Description + + + + + app_name + STRING + + The optional name of the application sending the notification. + Can be blank. + + + + replaces_id + UINT32 + + The optional notification ID that this notification replaces. The + server must atomically (ie with no flicker or other visual cues) + replace the given notification with this one. This allows clients to + effectively modify the notification while it's active. A value of + value of 0 means that this notification won't replace any + existing notifications. + + + + app_icon + STRING + + The optional program icon of the calling application. See . + Can be an empty string, indicating no icon. + + + + summary + STRING + The summary text briefly describing the notification. + + + body + STRING + The optional detailed body text. Can be empty. + + + actions + ARRAY + + Actions are sent over as a list of pairs. Each even element in the list + (starting at index 0) represents the identifier for the action. Each odd + element in the list is the localized string that will be displayed to the user. + + + + hints + DICT + + Optional hints that can be passed to the server from the client + program. Although clients and servers should never assume each other + supports any specific hints, they can be used to pass along + information, such as the process PID or window ID, that the server + may be able to make use of. See . Can be + empty. + + + + expire_timeout + INT32 + + + The timeout time in milliseconds since the display of the notification at + which the notification should automatically close. + + + If -1, the notification's expiration time is dependent on the + notification server's settings, and may vary for the type of + notification. + + If 0, never expire. + + + + + +
+ + If replaces_id is 0, the return value is a + UINT32 that represent the notification. It is unique, and will not be + reused unless a MAXINT number of notifications + have been generated. An acceptable implementation may just use an + incrementing counter for the ID. The returned ID is always greater than + zero. Servers must make sure not to return zero as an ID. + + + If replaces_id is not 0, the returned value + is the same value as replaces_id. + +
+ + + <literal>org.freedesktop.Notifications.CloseNotification</literal> + + + void + org.freedesktop.Notifications.CloseNotification + + UINT32 id + + + + Causes a notification to be forcefully closed and removed from the user's + view. It can be used, for example, in the event that what the + notification pertains to is no longer relevant, or to cancel a + notification with no expiration time. + + + The NotificationClosed signal is emitted by this + method. + + + If the notification no longer exists, an empty D-BUS Error message is + sent back. + + + + + <literal>org.freedesktop.Notifications.GetServerInformation</literal> + + + + void + org.freedesktop.Notifications.GetServerInformation + + out STRING name + out STRING vendor + out STRING version + + + + This message returns the information on the server. Specifically, + the server name, vendor, and version number. + + + GetServerInformation Return Values + + + + Name + Type + Description + + + + + name + STRING + The product name of the server. + + + vendor + STRING + + The vendor name. For example, "KDE," "GNOME," + "freedesktop.org," or "Microsoft." + + + + version + STRING + The server's version number. + + + +
+
+
+ + + Signals + + + <literal>org.freedesktop.Notifications.NotificationClosed</literal> + + + + org.freedesktop.Notifications.NotificationClosed + + UINT32 id + UINT32 reason + + + + A completed notification is one that has timed out, or has been + dismissed by the user. + + + NotificationClosed Parameters + + + + Name + Type + Description + + + + + id + UINT32 + The ID of the notification that was closed. + + + reason + UINT32 + + The reason the notification was closed. + 1 - The notification expired. + 2 - The notification was dismissed by the user. + 3 - The notification was closed by a call to + CloseNotification. + 4 - Undefined/reserved reasons. + + + + +
+ + The ID specified in the signal is invalidated + before the signal is sent and may not be used + in any further communications with the server. + +
+ + + <literal>org.freedesktop.Notifications.ActionInvoked</literal> + + + + org.freedesktop.Notifications.ActionInvoked + + UINT32 id + + UINT32 action_id + + + + This signal is emitted when one of the following occurs: + + + + + The user performs some global "invoking" action upon a notification. + For instance, clicking somewhere on the notification itself. + + + + + The user invokes a specific action as specified in the original + Notify request. For example, clicking on an action button. + + + + + ActionInvoked Parameters + + + + Name + Type + Description + + + + + id + UINT32 + + The ID of the notification emitting the ActionInvoked signal. + + + + + action_id + UINT32 + + The ID of the action invoked. A value of 0 means that the default + action was invoked, i.e., clicking the notification itself. + IDs greater than zero are the action IDs as defined by the + calling application. + + + + + +
+ + + Clients should not assume the server will generate this signal. Some + servers may not support user interaction at all, or may not support + the concept of being able to "invoke" a notification. + + +
+
+
+
diff --git a/docs/notification-spec.xml b/docs/notification-spec.xml new file mode 100644 index 0000000..484a212 --- /dev/null +++ b/docs/notification-spec.xml @@ -0,0 +1,1219 @@ + + + + +
+ + Desktop Notifications Specification + Version 0.5 + 2 October 2004 + + + Mike + Hearn + +
+ mike@navi.cx +
+
+
+ + Christian + Hammond + +
+ chipx86@chipx86.com +
+
+
+
+ + + 0.6 + 1 April 2005 + cdh + + Updated to work with D-BUS 0.31+. + + + + 0.5 + 2 October 2004 + cdh + + Added a "suppress-sound" hint. Added a "sound" capability. Renamed the + "soundfile" hint to sound-file". + + + + 0.4 + 29 September 2004 + cdh + + Added image support in markup, and made the restrictions on markup more + clear. Removed the High urgency. Added new notification types. Fixed + notification expiration. + + + + 0.3 + 15 September 2004 + cdh + Added hint and notification type sections + + + 0.2 + foo + mh + Added replaces field to protocol + + + 0.1 + foo + mh + Initial version + + +
+ + + Introduction + + This is a draft standard for a desktop notifications service, through + which applications can generate passive popups (sometimes known as + "poptarts") to notify the user in an asynchronous manner of events. + + + This specification explicitly does not include other types of + notification presentation such as modal message boxes, window manager + decorations or window list annotations. + + + Example use cases include: + + + + + Presence changes in IM programs: for instance, MSN Messenger on + Windows pioneered the use of passive popups to indicate presence + changes. + + + Scheduled alarm + Completed file transfer + New mail notification + Low disk space/battery warnings + + + + + Basic Design + + In order to ensure that multiple notifications can easily be + displayed at once, and to provide a convenient implementation, all + notifications are controlled by a single session-scoped service which + exposes a D-BUS interface. + + + On startup, a conforming implementation should take the + org.freedesktop.Notifications service on + the session bus. This service will be referred to as the "notification + server" or just "the server" in this document. It can optionally be + activated automatically by the bus process, however this is not required + and notification server clients must not assume that it is available. + + + The server should implement the + org.freedesktop.Notifications interface on + an object with the path "/org/freedesktop/Notifications". + This is the only interface required by this version of the specification. + + + A notification has the following components: + + + Notification Components + + + + Component + Description + + + + + Application Name + + This is the optional name of the application sending the notification. + This should be the application's formal name, rather than some sort + of ID. An example would be "FredApp E-Mail Client," rather than + "fredapp-email-client." + + + + Application Icon + + The application icon. This is represented either as a path or a name + in an icon theme. + + + + Replaces ID + + An optional ID of an existing notification that this + notification is intended to replace. + + + + Notification Type ID + + An optional ID representing the notification type. See + . + + + + Urgency Level + + The urgency of the notification. See . + + + + Summary + + This is a single line overview of the notification. For instance, + "You have mail" or "A friend has come online". It should generally + not be longer than 40 characters, though this is not a requirement, + and server implementations should word wrap if necessary. The summary + must be encoded using UTF-8. + + + + Body + + + This is a multi-line body of text. Each line is a paragraph, server + implementations are free to word wrap them as they see fit. + + + The body may contain simple markup as specified in + . It must be encoded using UTF-8. + + + If the body is omitted, just the summary is displayed. + + + + + Images + See . + + + Actions + + The actions send a request message back to the notification client + when invoked. This functionality may not be implemented by the + notification server, conforming clients should check if it is available + before using it (see the GetCapabilities message in + . An implementation is free to ignore any + requested by the client. As an example one possible rendering of + actions would be as buttons in the notification popup. + + + + Hints + See . + + + Expires + + + A boolean flag indicating whether or not this notification should + automatically expire. + + + + + Expiration Timeout + + + The timeout time in seconds since the display of the notification at + which the notification should automatically close. This is ignored + if the expires flag is set to false. + + + If zero, the notification's expiration time is dependent on the + notification server's settings, and may vary for the type of + notification. + + + + + +
+ + Each notification displayed is allocated a unique ID by the server. + This is unique within the session. While the notification server is + running, the ID will not be recycled unless the capacity of a uint32 is + exceeded. + + + This can be used to hide the notification before the expiration timeout + is reached. It can also be used to atomically replace the notification + with another. This allows you to (for instance) modify the contents of + a notification while it's on-screen. + +
+ + + Backwards Compatibility + + Clients should try and avoid making assumptions about the presentation and + abilities of the notification server. The message content is the most + important thing. + + + Clients can check with the server what capabilities are supported + using the GetCapabilities message. See + . + + + If a client requires a response from a passive popup, it should be + coded such that a non-focus-stealing message box can be used in the + case that the notification server does not support this feature. + + + + + Markup + + Body text may contain markup. The markup is XML-based, and consists + of a small subset of HTML along with a few additional tags. + + + The following tags should be supported by the notification server. + Though it is optional, it is recommended. Notification servers that do + not support these tags should filter them out. + + + + + + + b ... + b + + Bold + + + + i ... + i + + Italic + + + + u ... + u + + Underline + + + + a href="..." ... + a + + Hyperlink + + + + img src="..." alt="..." + + Image + + + + + + A full-blown HTML implementation is not required of this spec, and + notifications should never take advantage of tags that are not listed + above. As notifications are not a substitute for web browsers or complex + dialogs, advanced layout is not necessary, and may in fact limit the + number of systems that notification services can run on, due to memory + usage and screen space. Such examples are PDAs, certain cell phones, and + slow PCs or laptops with little memory. + + + For the same reason, a full XML or XHTML implementation using XSLT or + CSS stylesheets is not part of this specification. Information that + must be presented in a more complex form should use an application-specific + dialog, a web browser, or some other display mechanism. + + + The tags specified above mark up the content in a way that allows them + to be stripped out on some implementations without impacting the actual + content. + + + + Hyperlinks + + Hyperlinks allow for linking one or more words to a URI. There is no + requirement to allow for images to be linked, and it is highly suggested + that implementations do not allow this, as there is no clean-looking, + standard visual indicator for a hyperlinked image. + + + Hyperlinked text should appear in the standard blue underline format. + + + Hyperlinks cannot function as a replacement for actions. They are + used to link to local directories or remote sites using standard URI + schemes. + + + Implementations are not required to support hyperlinks. + + + + + Images + + Images may be placed in the notification, but this should be done with + caution. The image should never exceed 200x100, but this should be thought + of as a maximum size. Images should always have alternative text + provided through the alt="..." attribute. + + + Image data cannot be embedded in the message itself. Images referenced + must always be local files. + + + Implementations are not required to support images. + + + + + + Icons + + A notification can optionally include an array of images for use as an + icon representing the notification. The array of images specifies frames + in an animation, which always loop. Implementations are free to ignore the + images data, and implementations that support images need not support + animation. + + + If the image array has more than one element, a "primary frame" can + be specified. If not specified, it defaults to the first frame. For + implementations that support images but not animation, only the primary + frame will be used. + + + Each element of the array must have the same type as the first + element. Mixtures of strings and blobs are not allowed. The element + types can be one of the following: + + + + + + Element + Type + Description + + + + + Icon Theme Name + String + + Any string that does not begin with the / + character is assumed to be an icon theme name and is looked up + according to the spec. The best size to fit the servers chosen + presentation will be used. This is the recommended way of specifying + images. + + + + Absolute Path + String + + Any string that begins with a / will be used as + an absolute file path. Implementations should support at minimum + files of type image/png and image/svg. + + + + Image Data + Binary Data + + A data stream may be embedded in the message. This is assumed to be + of type image/png. + + + + + + + + + Notification Types + + Notifications can optionally have a type indicator. Although neither + client or nor server must support this, some may choose to. Those servers + implementing notification types may use them to intelligently display + the notification in a certain way, or group notifications of similar + types. + + + Notification types are in + class.specific form. + class specifies the generic type of notification, and + specific specifies the more specific type of + notification. + + + If a specific type of notification does not exist for your notification, + but the generic kind does, a notification of type + class is acceptable. + + + Third parties, when defining their own notification types, should discuss + the possibility of standardizing on the hint with other parties, preferably + in a place such as the + xdg + mailing list at + freedesktop.org. If it + warrants a standard, it will be added to the table above. If no + consensus is reached, the notification type should be in the form of + "x-vendor.class.name." + + + The following table lists standard notifications as defined by this spec. + More will be added in time. + + + Notification Types + + + + Type + Description + + + + + "device" + + A generic device-related notification that doesn't fit into + any other category. + + + + "device.added" + A device, such as a USB device, was added to the system. + + + "device.error" + A device had some kind of error. + + + "device.removed" + + A device, such as a USB device, was removed from the system. + + + + "email" + + A generic e-mail-related notification that doesn't fit into any + other category. + + + + "email.arrived" + A new e-mail notification. + + + "email.bounced" + A notification stating that an e-mail has bounced. + + + "im" + + A generic instant message-related notification that doesn't fit + into any other category. + + + + "im.error" + An instant message error notification. + + + "im.received" + A received instant message notification. + + + "network" + + A generic network notification that doesn't fit into any other + category. + + + + "network.connected" + + A network connection notification, such as successful sign-on to a + network service. This should not be confused with + device.added for new network devices. + + + + "network.disconnected" + + A network disconnected notification. This should not be confused with + device.removed for disconnected network devices. + + + + "network.error" + + A network-related or connection-related error. + + + + "presence" + + A generic presence change notification that doesn't fit into + any other category, such as going away or idle. + + + + "presence.offline" + An offline presence change notification. + + + "presence.online" + An online presence change notification. + + + "transfer" + + A generic file transfer or download notification that doesn't fit + into any other category. + + + + "transfer.complete" + A file transfer or download complete notification. + + + "transfer.error" + A file transfer or download error. + + + +
+
+ + + Urgency Levels + + Notifications have an urgency level associated with them. This defines + the importance of the notification. For example, "Joe Bob signed on" + would be a low urgency. "You have new mail" or "A USB device was unplugged" + would be a normal urgency. "Your computer is on fire" would be a critical + urgency. + + Urgency levels are defined as follows: + + Urgency Levels + + + + Type + Description + + + + + 0 + Low + + + 1 + Normal + + + 2 + Critical + + + +
+ + Developers must use their own judgement when deciding the urgency of a + notification. Typically, if the majority of programs are using the same + level for a specific type of urgency, other applications should follow + them. + + + For low and normal urgencies, server implementations may display the + notifications how they choose. They should, however, have a sane + expiration timeout dependent on the urgency level. + + + Critical notifications should not automatically expire, as they are + things that the user will most likely want to know about. They should + only be closed when the user dismisses them, for example, by clicking on + the notification. + +
+ + + Hints + + Hints are a way to provide extra data to a notification server that + the server may be able to make use of. + + + Neither clients nor notification servers are required to support any + hints. Both sides should assume that hints are not passed, and should + ignore any hints they do not understand. + + + Third parties, when defining their own hints, should discuss the + possibility of standardizing on the hint with other parties, preferably + in a place such as the + xdg + mailing list at + freedesktop.org. If it + warrants a standard, it will be added to the table above. If no + consensus is reached, the hint name should be in the form of + "x-vendor-name." + + + The following table lists the standard hints as defined by this + specification. Future hints may be proposed and added to this list + over time. Once again, implementations are not required to support these. + + + Standard Hints + + + + Name + Value Type + Description + + + + + "sound-file" + string + + The path to a sound file to play when the notification pops up. + + + + "suppress-sound" + boolean + + Causes the server to suppress playing any sounds, if it has that + ability. This is usually set when the client itself is going to + play its own sound. + + + + +
+
+ + + D-BUS Protocol + + The following messages must be supported by all + implementations. + + + + Message commands + + + <literal>org.freedesktop.Notifications.GetCapabilities</literal> + + + STRING_ARRAY + org.freedesktop.Notifications.GetCapabilities + + + + + + This message takes no parameters. + + + It returns an array of strings. Each string describes an optional + capability implemented by the server. The following values are + defined by this spec: + + + Server Capabilities + + + + "actions" + + The server will provide the specified actions to the user. Even if + this cap is missing, actions may still be specified by the client, + however the server is free to ignore them. + + + + "body" + + Supports body text. Some implementations may only show the + summary (for instance, onscreen displays, marquee/scrollers) + + + + "body-hyperlinks" + + The server supports hyperlinks in the notifications. + + + + "body-images" + + The server supports images in the notifications. + + + + "body-markup" + + Supports markup in the body text. If marked up text is sent + to a server that does not give this cap, the markup will show + through as regular text so must be stripped clientside. + + + + "icon-multi" + + The server will render an animation of all the frames in a given + image array. The client may still specify multiple frames even if + this cap and/or "icon-static" is missing, however + the server is free to ignore them and use only the primary frame. + + + + "icon-static" + + Supports display of exactly 1 frame of any given image array. + This value is mutually exclusive with + "icon-multi", it is a protocol error for the + server to specify both. + + + + "sound" + + The server supports sounds on notifications. If returned, the + server must support the "sound-file" and + "suppress-sound" hints. + + + + +
+ + New vendor-specific caps may be specified as long as they start with + "x-vendor". For instance, + "x-gnome-foo-cap". Capability names must not + contain spaces. They are limited to alpha-numeric characters and dashes + ("-"). + +
+ + + <literal>org.freedesktop.Notifications.Notify</literal> + + + UINT32 + org.freedesktop.Notifications.Notify + + STRING app_name + BYTE_ARRAY_OR_STRING app_icon + UINT32 replaces_id + STRING notification_type + BYTE urgency_level + STRING summary + STRING body + ARRAY images + DICT actions + DICT hints + BOOL expires + UINT32 expire_timeout + + + + Sends a notification to the notification server. + + + Notify Parameters + + + + Name + Type + Description + + + + + app_name + STRING + + The optional name of the application sending the notification. + Can be blank. + + + + app_icon + BYTE_ARRAY or STRING + + The optional program icon of the calling application. This is in + the same format as an image frame. See . + Can be an empty string, indicating no icon. + + + + replaces_id + UINT32 + + The optional notification ID that this notification replaces. The + server must atomically (ie with no flicker or other visual cues) + replace the given notification with this one. This allows clients to + effectively modify the notification while it's active. A value of + value of 0 means that this notification won't replace any + existing notifications. + + + + notification_type + STRING + + The optional notification type ID, for potential server + categorization and logging purposes. See + . Can be empty. + + + + urgency_level + BYTE + The urgency level. See . + + + summary + STRING + The summary text briefly describing the notification. + + + body + STRING + The optional detailed body text. Can be empty. + + + images + ARRAY + + The optional array of images. See . Can + be empty. + + + + actions + DICT + + A dictionary key of actions. Each key is the localized name of the + action, as it should appear to the user, and maps to a UINT32 value + containing a program-specific action code. This code will be reported + back to the program if the action is invoked by the user. Can be + empty. + + + + hints + DICT + + Optional hints that can be passed to the server from the client + program. Although clients and servers should never assume each other + supports any specific hints, they can be used to pass along + information, such as the process PID or window ID, that the server + may be able to make use of. See . Can be + empty. + + + + expires + BOOL + + A boolean flag indicating whether or not this notification should + automatically expire. + + + + expire_timeout + UINT32 + + + The timeout time in seconds since the display of the notification at + which the notification should automatically close. This is ignored + if the expires flag is set to false. + + + If zero, the notification's expiration time is dependent on the + notification server's settings, and may vary for the type of + notification. + + + + + +
+ + If replaces_id is 0, the return value is a + UINT32 that represent the notification. It is unique, and will not be + reused unless a MAXINT number of notifications + have been generated. An acceptable implementation may just use an + incrementing counter for the ID. The returned ID is always greater than + zero. Servers must make sure not to return zero as an ID. + + + If replaces_id is not 0, the returned value + is the same value as replaces_id. + +
+ + + <literal>org.freedesktop.Notifications.CloseNotification</literal> + + + void + org.freedesktop.Notifications.CloseNotification + + UINT32 id + + + + Causes a notification to be forcefully closed and removed from the user's + view. It can be used, for example, in the event that what the + notification pertains to is no longer relevant, or to cancel a + notification with no expiration time. + + + The NotificationClosed signal is emitted by this + method. + + + If the notification no longer exists, an empty D-BUS Error message is + sent back. + + + + + <literal>org.freedesktop.Notifications.GetServerInformation</literal> + + + + void + org.freedesktop.Notifications.GetServerInformation + + out STRING name + out STRING vendor + out STRING version + + + + This message returns the information on the server. Specifically, + the server name, vendor, and version number. + + + GetServerInformation Return Values + + + + Name + Type + Description + + + + + name + STRING + The product name of the server. + + + vendor + STRING + + The vendor name. For example, "KDE," "GNOME," + "freedesktop.org," or "Microsoft." + + + + version + STRING + The server's version number. + + + +
+
+
+ + + Signals + + + <literal>org.freedesktop.Notifications.NotificationClosed</literal> + + + + org.freedesktop.Notifications.NotificationClosed + + UINT32 id + UINT32 reason + + + + A completed notification is one that has timed out, or has been + dismissed by the user. + + + NotificationClosed Parameters + + + + Name + Type + Description + + + + + id + UINT32 + The ID of the notification that was closed. + + + reason + UINT32 + + The reason the notification was closed. + 1 - The notification expired. + 2 - The notification was dismissed by the user. + 3 - The notification was closed by a call to + CloseNotification. + 4 - Undefined/reserved reasons. + + + + +
+ + The ID specified in the signal is invalidated + before the signal is sent and may not be used + in any further communications with the server. + +
+ + + <literal>org.freedesktop.Notifications.ActionInvoked</literal> + + + + org.freedesktop.Notifications.ActionInvoked + + UINT32 id + + UINT32 action_id + + + + This signal is emitted when one of the following occurs: + + + + + The user performs some global "invoking" action upon a notification. + For instance, clicking somewhere on the notification itself. + + + + + The user invokes a specific action as specified in the original + Notify request. For example, clicking on an action button. + + + + + ActionInvoked Parameters + + + + Name + Type + Description + + + + + id + UINT32 + + The ID of the notification emitting the ActionInvoked signal. + + + + + action_id + UINT32 + + The ID of the action invoked. A value of 0 means that the default + action was invoked, i.e., clicking the notification itself. + IDs greater than zero are the action IDs as defined by the + calling application. + + + + + +
+ + + Clients should not assume the server will generate this signal. Some + servers may not support user interaction at all, or may not support + the concept of being able to "invoke" a notification. + + +
+
+
+
diff --git a/libnotify.pc.in b/libnotify.pc.in new file mode 100644 index 0000000..198d324 --- /dev/null +++ b/libnotify.pc.in @@ -0,0 +1,11 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: libnotify +Description: Notifications Library +Version: @VERSION@ +Libs: -L${libdir} -lnotify @PACKAGE_LIBS@ +Cflags: -I${includedir} @PACKAGE_CFLAGS@ + diff --git a/libnotify.spec.in b/libnotify.spec.in new file mode 100644 index 0000000..e69de29 diff --git a/libnotify/Makefile.am b/libnotify/Makefile.am new file mode 100644 index 0000000..0748d1d --- /dev/null +++ b/libnotify/Makefile.am @@ -0,0 +1,22 @@ +notifyincdir = $(includedir)/libnotify + +lib_LTLIBRARIES = libnotify.la + +notifyinc_HEADERS = \ + notify.h \ + notifynotification.h \ + notifycommon.h + +libnotify_la_SOURCES = \ + dbus-compat.h \ + notify.c \ + notifynotification.c + +libnotify_la_LIBADD = \ + $(PACKAGE_LIBS) + +libnotify_la_LDFLAGS = \ + -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) + +INCLUDES = \ + $(PACKAGE_CFLAGS) diff --git a/libnotify/Makefile.in b/libnotify/Makefile.in new file mode 100644 index 0000000..3b4c7eb --- /dev/null +++ b/libnotify/Makefile.in @@ -0,0 +1,504 @@ +# Makefile.in generated by automake 1.9.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = .. +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = libnotify +DIST_COMMON = $(notifyinc_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(notifyincdir)" +libLTLIBRARIES_INSTALL = $(INSTALL) +LTLIBRARIES = $(lib_LTLIBRARIES) +am__DEPENDENCIES_1 = +libnotify_la_DEPENDENCIES = $(am__DEPENDENCIES_1) +am_libnotify_la_OBJECTS = notify.lo notifynotification.lo +libnotify_la_OBJECTS = $(am_libnotify_la_OBJECTS) +DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +SOURCES = $(libnotify_la_SOURCES) +DIST_SOURCES = $(libnotify_la_SOURCES) +notifyincHEADERS_INSTALL = $(INSTALL_HEADER) +HEADERS = $(notifyinc_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +GDK_CFLAGS = @GDK_CFLAGS@ +GDK_LIBS = @GDK_LIBS@ +HAVE_GDK_FALSE = @HAVE_GDK_FALSE@ +HAVE_GDK_TRUE = @HAVE_GDK_TRUE@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_AGE = @LT_AGE@ +LT_CURRENT = @LT_CURRENT@ +LT_RELEASE = @LT_RELEASE@ +LT_REVISION = @LT_REVISION@ +MAKEINFO = @MAKEINFO@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ +PACKAGE_LIBS = @PACKAGE_LIBS@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +RANLIB = @RANLIB@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +ac_ct_RANLIB = @ac_ct_RANLIB@ +ac_ct_STRIP = @ac_ct_STRIP@ +ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@ +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ +am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +datadir = @datadir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +notifyincdir = $(includedir)/libnotify +lib_LTLIBRARIES = libnotify.la +notifyinc_HEADERS = \ + notify.h \ + notifynotification.h \ + notifycommon.h + +libnotify_la_SOURCES = \ + dbus-compat.h \ + notify.c \ + notifynotification.c + +libnotify_la_LIBADD = \ + $(PACKAGE_LIBS) + +libnotify_la_LDFLAGS = \ + -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) + +INCLUDES = \ + $(PACKAGE_CFLAGS) + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libnotify/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu libnotify/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +install-libLTLIBRARIES: $(lib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f=$(am__strip_dir) \ + echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ + $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ + else :; fi; \ + done + +uninstall-libLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ + $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ + done + +clean-libLTLIBRARIES: + -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libnotify.la: $(libnotify_la_OBJECTS) $(libnotify_la_DEPENDENCIES) + $(LINK) -rpath $(libdir) $(libnotify_la_LDFLAGS) $(libnotify_la_OBJECTS) $(libnotify_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/notify.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/notifynotification.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +uninstall-info-am: +install-notifyincHEADERS: $(notifyinc_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(notifyincdir)" || $(mkdir_p) "$(DESTDIR)$(notifyincdir)" + @list='$(notifyinc_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(notifyincHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(notifyincdir)/$$f'"; \ + $(notifyincHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(notifyincdir)/$$f"; \ + done + +uninstall-notifyincHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(notifyinc_HEADERS)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(notifyincdir)/$$f'"; \ + rm -f "$(DESTDIR)$(notifyincdir)/$$f"; \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(notifyincdir)"; do \ + test -z "$$dir" || $(mkdir_p) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-libtool distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-notifyincHEADERS + +install-exec-am: install-libLTLIBRARIES + +install-info: install-info-am + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES \ + uninstall-notifyincHEADERS + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libLTLIBRARIES clean-libtool ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-exec \ + install-exec-am install-info install-info-am \ + install-libLTLIBRARIES install-man install-notifyincHEADERS \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-info-am uninstall-libLTLIBRARIES \ + uninstall-notifyincHEADERS + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libnotify/dbus-compat.h b/libnotify/dbus-compat.h new file mode 100644 index 0000000..2a2d198 --- /dev/null +++ b/libnotify/dbus-compat.h @@ -0,0 +1,144 @@ +/** + * @file libnotify/dbus-compat.h Private D-BUS Compatibility API + * + * @Copyright (C) 2005 Christian Hammond. + * + * 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., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ +#ifndef _NOTIFY_DBUS_COMPAT_H_ +#define _NOTIFY_DBUS_COMPAT_H_ + +#define NOTIFY_CHECK_DBUS_VERSION(major, minor) \ + (DBUS_MAJOR_VER > (major) || \ + (DBUS_MAJOR_VER == (major) && DBUS_MINOR_VER >= (minor))) + +#if NOTIFY_CHECK_DBUS_VERSION(0, 30) +# define _notify_dbus_message_iter_append_byte(iter, val) \ + dbus_message_iter_append_basic((iter), DBUS_TYPE_BYTE, &(val)) +# define _notify_dbus_message_iter_append_boolean(iter, val) \ + dbus_message_iter_append_basic((iter), DBUS_TYPE_BOOLEAN, &(val)) +# define _notify_dbus_message_iter_append_string(iter, val) \ + dbus_message_iter_append_basic((iter), DBUS_TYPE_STRING, &(val)) +# define _notify_dbus_message_iter_append_int32(iter, val) \ + dbus_message_iter_append_basic((iter), DBUS_TYPE_INT32, &(val)) +# define _notify_dbus_message_iter_append_uint32(iter, val) \ + dbus_message_iter_append_basic((iter), DBUS_TYPE_UINT32, &(val)) +# define _notify_dbus_message_iter_append_double(iter, val) \ + dbus_message_iter_append_basic((iter), DBUS_TYPE_DOUBLE, &(val)) + +# define _notify_dbus_message_iter_append_byte_array(iter, data, len) \ + dbus_message_iter_append_fixed_array((iter), DBUS_TYPE_BYTE, &(data), \ + (len)) +# define _notify_dbus_message_iter_append_boolean_array(iter, data, len) \ + dbus_message_iter_append_fixed_array((iter), DBUS_TYPE_BOOLEAN, &(data), \ + (len)) +# define _notify_dbus_message_iter_append_int32_array(iter, data, len) \ + dbus_message_iter_append_fixed_array((iter), DBUS_TYPE_INT32, &(data), \ + (len)) +# define _notify_dbus_message_iter_append_uint32_array(iter, data, len) \ + dbus_message_iter_append_fixed_array((iter), DBUS_TYPE_UINT32, &(data), \ + (len)) +# define _notify_dbus_message_iter_append_string_array(iter, data, len) \ + dbus_message_iter_append_fixed_array((iter), DBUS_TYPE_STRING, \ + &(data), (len)) + +# define _notify_dbus_message_iter_get_byte(iter, retvar) \ + dbus_message_iter_get_basic((iter), &(retvar)) +# define _notify_dbus_message_iter_get_boolean(iter, retvar) \ + dbus_message_iter_get_basic((iter), &(retvar)) +# define _notify_dbus_message_iter_get_string(iter, retvar) \ + dbus_message_iter_get_basic((iter), &(retvar)) +# define _notify_dbus_message_iter_get_int32(iter, retvar) \ + dbus_message_iter_get_basic((iter), &(retvar)) +# define _notify_dbus_message_iter_get_uint32(iter, retvar) \ + dbus_message_iter_get_basic((iter), &(retvar)) +# define _notify_dbus_message_iter_get_double(iter, retvar) \ + dbus_message_iter_get_basic((iter), &(retvar)) + +# define _notify_dbus_message_iter_get_byte_array \ + dbus_message_iter_get_fixed_array +# define _notify_dbus_message_iter_get_boolean_array \ + dbus_message_iter_get_fixed_array +# define _notify_dbus_message_iter_get_int32_array \ + dbus_message_iter_get_fixed_array +# define _notify_dbus_message_iter_get_uint32_array \ + dbus_message_iter_get_fixed_array +# define _notify_dbus_message_iter_get_string_array(iter, array, num_items) \ + dbus_message_iter_get_fixed_array((iter), (array), (num_items)) + +#else /* D-BUS < 0.30 */ +# define DBUS_INTERFACE_DBUS DBUS_INTERFACE_ORG_FREEDESKTOP_DBUS +# define DBUS_SERVICE_DBUS DBUS_SERVICE_ORG_FREEDESKTOP_DBUS +# define DBUS_PATH_DBUS DBUS_PATH_ORG_FREEDESKTOP_DBUS +# define DBUS_ERROR_SERVICE_UNKNOWN DBUS_ERROR_SERVICE_DOES_NOT_EXIST + +# define dbus_bus_start_service_by_name dbus_bus_activate_service + +# define dbus_message_iter_close_container(iter, container_iter) + +# define dbus_message_iter_init_append(msg, iter) \ + dbus_message_iter_init(msg, iter) + +# define _notify_dbus_message_iter_append_byte(iter, val) \ + dbus_message_iter_append_byte((iter), (val)) +# define _notify_dbus_message_iter_append_boolean(iter, val) \ + dbus_message_iter_append_boolean((iter), (val)) +# define _notify_dbus_message_iter_append_string(iter, val) \ + dbus_message_iter_append_string((iter), (val)) +# define _notify_dbus_message_iter_append_int32(iter, val) \ + dbus_message_iter_append_int32((iter), (val)) +# define _notify_dbus_message_iter_append_uint32(iter, val) \ + dbus_message_iter_append_uint32((iter), (val)) +# define _notify_dbus_message_iter_append_double(iter, val) \ + dbus_message_iter_append_double((iter), (val)) + +# define _notify_dbus_message_iter_append_byte_array(iter, data, len) \ + dbus_message_iter_append_byte_array((iter), (data), (len)) +# define _notify_dbus_message_iter_append_boolean_array(iter, data, len) \ + dbus_message_iter_append_boolean_array((iter), (data), (len)) +# define _notify_dbus_message_iter_append_int32_array(iter, data, len) \ + dbus_message_iter_append_int32_array((iter), (data), (len)) +# define _notify_dbus_message_iter_append_uint32_array(iter, data, len) \ + dbus_message_iter_append_uint32_array((iter), (data), (len)) +# define _notify_dbus_message_iter_append_string_array(iter, data, len) \ + dbus_message_iter_append_string_array((iter), (const char **)(data), (len)) + +# define _notify_dbus_message_iter_get_byte(iter, retvar) \ + retvar = dbus_message_iter_get_byte((iter)) +# define _notify_dbus_message_iter_get_boolean(iter, retvar) \ + retvar = dbus_message_iter_get_boolean((iter)) +# define _notify_dbus_message_iter_get_string(iter, retvar) \ + retvar = dbus_message_iter_get_string((iter)) +# define _notify_dbus_message_iter_get_int32(iter, retvar) \ + retvar = dbus_message_iter_get_int32((iter)) +# define _notify_dbus_message_iter_get_uint32(iter, retvar) \ + retvar = dbus_message_iter_get_uint32((iter)) +# define _notify_dbus_message_iter_get_double(iter, retvar) \ + retvar = dbus_message_iter_get_double((iter)) + +# define _notify_dbus_message_iter_get_byte_array(iter, data, len) \ + dbus_message_iter_get_byte_array((iter), (data), (len)) +# define _notify_dbus_message_iter_get_boolean_array(iter, data, len) \ + dbus_message_iter_get_boolean_array((iter), (data), (len)) +# define _notify_dbus_message_iter_get_int32_array(iter, data, len) \ + dbus_message_iter_get_int32_array((iter), (data), (len)) +# define _notify_dbus_message_iter_get_uint32_array(iter, data, len) \ + dbus_message_iter_get_uint32_array((iter), (data), (len)) +# define _notify_dbus_message_iter_get_string_array(iter, data, len) \ + dbus_message_iter_get_string_array((iter), (data), (len)) +#endif + +#endif /* NOTIFY_DBUS_COMPAT_H_ */ diff --git a/libnotify/notify.c b/libnotify/notify.c new file mode 100644 index 0000000..e99723b --- /dev/null +++ b/libnotify/notify.c @@ -0,0 +1,108 @@ +/* -*- mode: c-mode; tab-width: 4; indent-tabs-mode: t; -*- */ +/** + * @file libnotify/notify.c Notifications library + * + * @Copyright (C) 2004 Christian Hammond + * @Copyright (C) 2004 Mike Hearn + * + * 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., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#ifndef DBUS_API_SUBJECT_TO_CHANGE +# define DBUS_API_SUBJECT_TO_CHANGE 1 +#endif + +#include "notify.h" +#include "dbus-compat.h" +#include +#include +#include +#include +#include +#include + +static gboolean _initted = FALSE; +static gchar *_app_name = NULL; +#ifdef __GNUC__ +# define format_func __attribute__((format(printf, 1, 2))) +#else /* no format string checking with this compiler */ +# define format_func +#endif + +static void format_func +print_error (char *message, ...) +{ + char buf[1024]; + va_list args; + + va_start (args, message); + vsnprintf (buf, sizeof (buf), message, args); + va_end (args); + + fprintf (stderr, "%s(%d): libnotify: %s", + (getenv ("_") ? getenv ("_") : ""), getpid (), buf); +} + +gboolean +notify_init (const char *app_name) +{ + g_return_val_if_fail (app_name != NULL, FALSE); + g_return_val_if_fail (*app_name != '\0', FALSE); + + if (_initted) + return TRUE; + + _app_name = g_strdup (app_name); + + g_type_init (); + +#ifdef HAVE_ATEXIT + atexit (notify_uninit); +#endif /* HAVE_ATEXIT */ + + _initted = TRUE; + + return TRUE; +} + +const gchar * +_notify_get_app_name (void) +{ + return _app_name; +} + +void +notify_uninit (void) +{ + + if (_app_name != NULL) + { + g_free (_app_name); + _app_name = NULL; + } + + /* TODO: keep track of all notifications and destroy them here? */ +} + +gboolean +notify_is_initted (void) +{ + return _initted; +} diff --git a/libnotify/notify.h b/libnotify/notify.h new file mode 100644 index 0000000..017cb19 --- /dev/null +++ b/libnotify/notify.h @@ -0,0 +1,68 @@ +/* -*- mode: c-mode; tab-width: 4; indent-tabs-mode: t; -*- */ +/** + * @file libnotify/notify.h Notifications library + * + * @Copyright (C) 2004 Christian Hammond + * + * 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., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + * + * @todo We talk about URIs, but they are actually file paths not URIs + * @todo Un-glibify? + */ + +#ifndef _LIBNOTIFY_NOTIFY_H_ +#define _LIBNOTIFY_NOTIFY_H_ + +#include +#include + +#include "notifycommon.h" +#include "notifynotification.h" + +/**************************************************************************/ +/** @name libnotify Base API */ +/**************************************************************************/ +/*@{*/ + +/** + * Initializes the notifications library. + * + * @param app_name The application name. + * + * @return TRUE if the library initialized properly and a connection to a + * notification server was made. + */ +gboolean notify_init(const char *app_name); + +/** + * Uninitializes the notifications library. + * + * This will be automatically called on exit unless previously called. + */ +void notify_uninit(void); + +/** + * Returns whether or not the notification library is initialized. + * + * @return TRUE if the library is initialized, or FALSE. + */ +gboolean notify_is_initted(void); + +const gchar *_notify_get_app_name(void); +/*@}*/ + + +#endif /* _LIBNOTIFY_NOTIFY_H_ */ diff --git a/libnotify/notifycommon.h b/libnotify/notifycommon.h new file mode 100644 index 0000000..b2ad943 --- /dev/null +++ b/libnotify/notifycommon.h @@ -0,0 +1,23 @@ +#ifndef _LIBNOTIFY_NOTIFY_COMMON_H_ +#define _LIBNOTIFY_NOTIFY_COMMON_H_ +#include + +#define NOTIFY_TIMEOUT_DEFAULT -1 +#define NOTIFY_TIMEOUT_NEVER 0 + +#define NOTIFY_DBUS_NAME "org.freedesktop.Notifications" +#define NOTIFY_DBUS_CORE_INTERFACE "org.freedesktop.Notifications" +#define NOTIFY_DBUS_CORE_OBJECT "/org/freedesktop/Notifications" + +/** + * Notification urgency levels. + */ +typedef enum +{ + NOTIFY_URGENCY_LOW, /**< Low urgency. */ + NOTIFY_URGENCY_NORMAL, /**< Normal urgency. */ + NOTIFY_URGENCY_CRITICAL, /**< Critical urgency. */ + +} NotifyUrgency; + +#endif /* _LIBNOTIFY_NOTIFY_H_ */ diff --git a/libnotify/notifynotification.c b/libnotify/notifynotification.c new file mode 100644 index 0000000..7174380 --- /dev/null +++ b/libnotify/notifynotification.c @@ -0,0 +1,770 @@ +/* + * This program 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 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with main.c; if not, write to: + * The Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ +#include "config.h" +#include +#include + +#include "notify.h" +#include "notifynotification.h" + +static void notify_notification_class_init (NotifyNotificationClass * klass); +static void notify_notification_init (NotifyNotification * sp); +static void notify_notification_finalize (GObject * object); + +struct NotifyNotificationPrivate +{ + guint32 id; + + gchar *summary; + gchar *message; + + /*NULL to use icon data + anything else to have server lookup icon */ + gchar *icon_name; + + /*-1 = use server default + 0 = never timeout + >0 = Number of milliseconds before we timeout + */ + gint timeout; + + GSList *actions; + GHashTable *hints; + + GtkWidget *attached_widget; + gint widget_old_x; + gint widget_old_y; + + gpointer user_data; + GDestroyNotify user_data_free_func; + + gboolean updates_pending; + + DBusGProxy *proxy; +}; + +#if 0 +typedef enum +{ + LAST_SIGNAL +} NotifyNotificationSignalType; +#endif + +typedef struct +{ + NotifyNotification *object; +} NotifyNotificationSignal; + +/* static guint notify_notification_signals[LAST_SIGNAL] = { 0 }; */ +static GObjectClass *parent_class = NULL; + +GType +notify_notification_get_type () +{ + static GType type = 0; + + if (type == 0) + { + static const GTypeInfo our_info = { + sizeof (NotifyNotificationClass), + NULL, + NULL, + (GClassInitFunc) notify_notification_class_init, + NULL, + NULL, + sizeof (NotifyNotification), + 0, + (GInstanceInitFunc) notify_notification_init, + }; + + type = g_type_register_static (G_TYPE_OBJECT, + "NotifyNotification", &our_info, 0); + } + + return type; +} + +static void +notify_notification_class_init (NotifyNotificationClass * klass) +{ + GObjectClass *object_class = G_OBJECT_CLASS (klass); + + parent_class = g_type_class_peek_parent (klass); + object_class->finalize = notify_notification_finalize; + + /* Create signals here: + notify_notification_signals[SIGNAL_TYPE_EXAMPLE] = g_signal_new(...) + */ +} + +static void +_g_value_free (GValue * value) +{ + g_value_unset (value); + g_free (value); +} + +static void +notify_notification_init (NotifyNotification * obj) +{ + obj->priv = g_new0 (NotifyNotificationPrivate, 1); + + obj->priv->id = 0; + + obj->priv->summary = NULL; + obj->priv->message = NULL; + obj->priv->icon_name = NULL; + obj->priv->timeout = NOTIFY_TIMEOUT_DEFAULT; + + obj->priv->actions = NULL; + obj->priv->hints = g_hash_table_new_full (g_str_hash, + g_str_equal, + g_free, + (GDestroyNotify) _g_value_free); + + obj->priv->attached_widget = NULL; + obj->priv->user_data = NULL; + obj->priv->user_data_free_func = NULL; + + obj->priv->updates_pending = FALSE; + + obj->priv->widget_old_x = 0; + obj->priv->widget_old_y = 0; + + obj->priv->proxy = NULL; +} + +static void +notify_notification_finalize (GObject * object) +{ + NotifyNotification *obj; + NotifyNotificationPrivate *priv; + + obj = NOTIFY_NOTIFICATION (object); + priv = obj->priv; + + g_free (priv->summary); + g_free (priv->message); + g_free (priv->icon_name); + + if (priv->actions != NULL) + { + g_slist_foreach (priv->actions, (GFunc) g_free, NULL); + g_slist_free (priv->actions); + } + + if (priv->hints != NULL) + g_hash_table_destroy (priv->hints); + + if (priv->attached_widget != NULL) + gtk_widget_unref (priv->attached_widget); + + if (priv->user_data_free_func != NULL) + priv->user_data_free_func (priv->user_data); + + g_free (obj->priv); + G_OBJECT_CLASS (parent_class)->finalize (object); +} + +static gboolean +_notify_notification_update_applet_hints (NotifyNotification * n) +{ + NotifyNotificationPrivate *priv; + gboolean update_pending; + + update_pending = FALSE; + priv = n->priv; + + if (priv->attached_widget != NULL) + { + gint x, y, h, w; + GtkWidget *widget; + GtkRequisition requisition; + + widget = priv->attached_widget; + + gtk_widget_size_request (widget, &requisition); + w = requisition.width; + h = requisition.height; + + gdk_window_get_origin (widget->window, &x, &y); + if (GTK_WIDGET_NO_WINDOW (widget)) + { + x += widget->allocation.x; + y += widget->allocation.y; + } + + x += widget->allocation.width / 2; + y += widget->allocation.height / 2; + + if (x != priv->widget_old_x) + { + notify_notification_set_hint_int32 (n, "x", x); + priv->widget_old_x = x; + + update_pending = TRUE; + } + + if (y != priv->widget_old_y) + { + notify_notification_set_hint_int32 (n, "y", y); + priv->widget_old_y = y; + + update_pending = TRUE; + } + } + + return update_pending; +} + +#if 0 + +/* This is left here just incase we revisit autoupdating + One thought would be to check for updates every time the icon + is redrawn but we still have to deal with the race conditions + that could occure between the server and the client so we will + leave this alone for now. +*/ +static gboolean +_idle_check_updates (void *user_data) +{ + NotifyNotification *n; + NotifyNotificationPrivate *priv; + + n = NOTIFY_NOTIFICATION (user_data); + priv = n->priv; + + if (priv->is_visible) + { + priv->updates_pending = _notify_notification_update_applet_hints (n); + if (priv->updates_pending) + { + /* Try again if we fail on next idle */ + priv->updates_pending = !notify_notification_show (n, NULL); + } + } + else + { + priv->updates_pending = FALSE; + } + + n = NOTIFY_NOTIFICATION (user_data); + priv = n->priv; + + return TRUE; +} +#endif + +GdkFilterReturn +_catch (GdkXEvent * xevent, GdkEvent * event, gpointer data) +{ + static int i = 1; + printf ("here, %i\n", i); + i++; + return GDK_FILTER_CONTINUE; +} + +NotifyNotification * +notify_notification_new (const gchar * summary, + const gchar * message, + const gchar * icon, GtkWidget * attach) +{ + NotifyNotification *obj; + + g_assert (summary != NULL); + g_assert (message != NULL); + + obj = NOTIFY_NOTIFICATION (g_object_new (NOTIFY_TYPE_NOTIFICATION, NULL)); + + obj->priv->summary = g_strdup (summary); + obj->priv->message = g_strdup (message); + obj->priv->icon_name = g_strdup (icon); + + if (attach != NULL) + { + gtk_widget_ref (attach); + obj->priv->attached_widget = attach; + } + + return obj; +} + +NotifyNotification * +notify_notification_ref (NotifyNotification * notification) +{ + return NOTIFY_NOTIFICATION (g_object_ref (G_OBJECT (notification))); +} + +void +notify_notification_unref (NotifyNotification * notification) +{ + g_object_unref (G_OBJECT (notification)); +} + +gboolean +notify_notification_update (NotifyNotification * notification, + const gchar * summary, + const gchar * message, const gchar * icon) +{ + NotifyNotificationPrivate *priv; + + priv = notification->priv; + g_free (priv->summary); + g_free (priv->message); + g_free (priv->icon_name); + + priv->summary = g_strdup (summary); + priv->message = g_strdup (message); + priv->icon_name = g_strdup (icon); + + priv->updates_pending = TRUE; + + /*TODO: return false on OOM */ + return TRUE; +} + +void +notify_notification_attach_to_widget (NotifyNotification * notification, + GtkWidget * attach) +{ + NotifyNotificationPrivate *priv; + + priv = notification->priv; + + if (priv->attached_widget != NULL) + gtk_widget_unref (priv->attached_widget); + + if (attach != NULL) + priv->attached_widget = gtk_widget_ref (attach); + else + priv->attached_widget = NULL; + +} + +gboolean +notify_notification_set_user_data (NotifyNotification * notification, + void *user_data, GFreeFunc free_func) +{ + NotifyNotificationPrivate *priv; + + priv = notification->priv; + + if (priv->user_data) + if (priv->user_data_free_func) + priv->user_data_free_func (priv->user_data); + + priv->user_data = user_data; + priv->user_data_free_func = priv->user_data; + + /* TODO: return FALSE on OOM */ + return TRUE; +} + +static DBusHandlerResult +filter_func (DBusConnection *connection, + DBusMessage *message, + void *user_data) +{ + g_message ("member %s", dbus_message_get_member (message)); + + return DBUS_HANDLER_RESULT_HANDLED; +} + +gboolean +notify_notification_show (NotifyNotification * notification, GError ** error) +{ + NotifyNotificationPrivate *priv; + GError *tmp_error; + + g_return_val_if_fail (error == NULL || *error == NULL, FALSE); + + + priv = notification->priv; + + tmp_error = NULL; + + if (priv->proxy == NULL) + { + DBusGConnection *bus; + bus = dbus_g_bus_get (DBUS_BUS_SESSION, &tmp_error); + if (tmp_error != NULL) + { + g_propagate_error (error, tmp_error); + return FALSE; + } + + /* Register the object here because + * we need to start listening for signals + */ + dbus_g_connection_register_g_object (bus, "/org/freedesktop/NotifyNotification", G_OBJECT (notification)); + + priv->proxy = dbus_g_proxy_new_for_name (bus, + NOTIFY_DBUS_NAME, + NOTIFY_DBUS_CORE_OBJECT, + NOTIFY_DBUS_CORE_INTERFACE); + dbus_g_connection_unref (bus); + } + + /*if attached to a widget modify x and y in hints */ + _notify_notification_update_applet_hints (notification); + + /*TODO: make this nonblocking */ + dbus_g_proxy_call (priv->proxy, "Notify", &tmp_error, + G_TYPE_STRING, _notify_get_app_name (), + G_TYPE_STRING, + (priv->icon_name != NULL) ? priv->icon_name : "", + G_TYPE_UINT, priv->id, G_TYPE_STRING, priv->summary, + G_TYPE_STRING, priv->message, + dbus_g_type_get_collection ("GSList", G_TYPE_STRING), + priv->actions, dbus_g_type_get_map ("GHashTable", + G_TYPE_STRING, + G_TYPE_VALUE), + priv->hints, G_TYPE_INT, priv->timeout, G_TYPE_INVALID, + G_TYPE_UINT, &priv->id, G_TYPE_INVALID); + + if (tmp_error != NULL) + { + g_propagate_error (error, tmp_error); + return FALSE; + } + + return TRUE; +} + +void +notify_notification_set_timeout (NotifyNotification * notification, + gint timeout) +{ + notification->priv->timeout = timeout; +} + +gboolean +notify_notification_set_category (NotifyNotification * notification, + const char *category) +{ + return notify_notification_set_hint_string (notification, + "category", category); +} + +gboolean +notify_notification_set_urgency (NotifyNotification * notification, + NotifyUrgency l) +{ + return notify_notification_set_hint_byte (notification, + "urgency", (guchar) l); +} + +static gboolean +_gvalue_array_append_int (GValueArray * array, gint i) +{ + GValue *value; + + value = g_new0 (GValue, 1); + if (!value) + return FALSE; + + g_value_init (value, G_TYPE_INT); + g_value_set_int (value, i); + + g_value_array_append (array, value); + + return TRUE; +} + +static gboolean +_gvalue_array_append_bool (GValueArray * array, gboolean b) +{ + GValue *value; + + value = g_new0 (GValue, 1); + if (!value) + return FALSE; + + g_value_init (value, G_TYPE_BOOLEAN); + g_value_set_boolean (value, b); + + g_value_array_append (array, value); + + return TRUE; +} + +static gboolean +_gvalue_array_append_byte_array (GValueArray * array, + guchar * bytes, gsize len) +{ + GArray *byte_array; + GValue *value; + + byte_array = g_array_sized_new (FALSE, FALSE, sizeof (guchar), len); + if (!byte_array) + return FALSE; + + byte_array = g_array_append_vals (byte_array, bytes, len); + + value = g_new0 (GValue, 1); + if (!value) + { + g_array_free (byte_array, TRUE); + return FALSE; + } + + g_value_init (value, dbus_g_type_get_collection ("GArray", G_TYPE_UCHAR)); + g_value_set_boxed_take_ownership (value, byte_array); + + g_value_array_append (array, value); + + return TRUE; +} + + + +gboolean +notify_notification_set_icon_data_from_pixbuf (NotifyNotification * + notification, GdkPixbuf * icon) +{ + gint width; + gint height; + gint rowstride; + gboolean alpha; + gint bits_per_sample; + gint n_channels; + guchar *image; + gsize image_len; + gchar *key_dup; + + GValueArray *image_struct; + GValue *value; + NotifyNotificationPrivate *priv; + + priv = notification->priv; + + width = gdk_pixbuf_get_width (icon); + height = gdk_pixbuf_get_height (icon); + rowstride = gdk_pixbuf_get_rowstride (icon); + n_channels = gdk_pixbuf_get_n_channels (icon); + bits_per_sample = gdk_pixbuf_get_bits_per_sample (icon); + alpha = gdk_pixbuf_get_has_alpha (icon); + image_len = + (height - 1) * rowstride + + width * ((n_channels * bits_per_sample + 7) / 8); + + image = gdk_pixbuf_get_pixels (icon); + + image_struct = g_value_array_new (8); + + if (!image_struct) + goto fail; + + _gvalue_array_append_int (image_struct, width); + _gvalue_array_append_int (image_struct, height); + _gvalue_array_append_int (image_struct, rowstride); + _gvalue_array_append_bool (image_struct, alpha); + _gvalue_array_append_int (image_struct, bits_per_sample); + _gvalue_array_append_int (image_struct, n_channels); + _gvalue_array_append_byte_array (image_struct, image, image_len); + + value = g_new0 (GValue, 1); + if (!value) + goto fail; + + g_value_init (value, G_TYPE_VALUE_ARRAY); + g_value_set_boxed (value, image_struct); + + key_dup = g_strdup ("icon_data"); + if (!key_dup) + goto fail; + + g_hash_table_insert (priv->hints, key_dup, value); + + return TRUE; + +fail: + if (image_struct != NULL) + g_value_array_free (image_struct); + return FALSE; +} + +gboolean +notify_notification_set_hint_int32 (NotifyNotification * notification, + const gchar * key, gint value) +{ + NotifyNotificationPrivate *priv; + GValue *hint_value; + gchar *key_dup; + + priv = notification->priv; + + hint_value = g_new0 (GValue, 1); + g_value_init (hint_value, G_TYPE_INT); + g_value_set_int (hint_value, value); + + key_dup = g_strdup (key); + + g_hash_table_insert (priv->hints, key_dup, hint_value); + + /* TODO: return FALSE on OOM */ + return TRUE; +} + +gboolean +notify_notification_set_hint_double (NotifyNotification * notification, + const gchar * key, gdouble value) +{ + NotifyNotificationPrivate *priv; + GValue *hint_value; + gchar *key_dup; + + priv = notification->priv; + + hint_value = g_new0 (GValue, 1); + g_value_init (hint_value, G_TYPE_FLOAT); + g_value_set_float (hint_value, value); + + key_dup = g_strdup (key); + + g_hash_table_insert (priv->hints, key_dup, hint_value); + + /* TODO: return FALSE on OOM */ + return TRUE; +} + +gboolean +notify_notification_set_hint_byte (NotifyNotification * notification, + const gchar * key, guchar value) +{ + NotifyNotificationPrivate *priv; + GValue *hint_value; + gchar *key_dup; + + priv = notification->priv; + + hint_value = g_new0 (GValue, 1); + g_value_init (hint_value, G_TYPE_UCHAR); + g_value_set_uchar (hint_value, value); + + key_dup = g_strdup (key); + + g_hash_table_insert (priv->hints, key_dup, hint_value); + + /* TODO: return FALSE on OOM */ + return TRUE; +} + +gboolean +notify_notification_set_hint_byte_array (NotifyNotification * notification, + const gchar * key, + const guchar * value, gsize len) +{ + NotifyNotificationPrivate *priv; + GValue *hint_value; + gchar *key_dup; + GArray *byte_array; + + priv = notification->priv; + + byte_array = g_array_sized_new (FALSE, FALSE, sizeof (guchar), len); + byte_array = g_array_append_vals (byte_array, value, len); + + hint_value = g_new0 (GValue, 1); + g_value_init (hint_value, + dbus_g_type_get_collection ("GArray", G_TYPE_UCHAR)); + g_value_set_boxed_take_ownership (hint_value, byte_array); + key_dup = g_strdup (key); + + g_hash_table_insert (priv->hints, key_dup, hint_value); + + /* TODO: return FALSE on OOM */ + return TRUE; +} + + +gboolean +notify_notification_set_hint_string (NotifyNotification * notification, + const gchar * key, const gchar * value) +{ + NotifyNotificationPrivate *priv; + GValue *hint_value; + gchar *key_dup; + + priv = notification->priv; + + hint_value = g_new0 (GValue, 1); + g_value_init (hint_value, G_TYPE_STRING); + g_value_set_string (hint_value, value); + + key_dup = g_strdup (key); + + g_hash_table_insert (priv->hints, key_dup, hint_value); + + /* TODO: return FALSE on OOM */ + return TRUE; +} + +gboolean +notify_notification_add_action (NotifyNotification * notification, + const char *action, + const char *label, + NotifyActionCallback callback) +{ + /* TODO: implement actions which will also set up a dbus listener + for those actions + */ + return FALSE; +} + +gboolean +notify_notification_close (NotifyNotification * notification, GError ** error) +{ + NotifyNotificationPrivate *priv; + GError *tmp_error; + + g_return_val_if_fail (error == NULL || *error == NULL, FALSE); + + priv = notification->priv; + + tmp_error = NULL; + + if (priv->proxy == NULL) + { + DBusGConnection *bus; + + bus = dbus_g_bus_get (DBUS_BUS_SESSION, &tmp_error); + if (tmp_error != NULL) + { + g_propagate_error (error, tmp_error); + return FALSE; + } + + priv->proxy = dbus_g_proxy_new_for_name (bus, + NOTIFY_DBUS_NAME, + NOTIFY_DBUS_CORE_OBJECT, + NOTIFY_DBUS_CORE_INTERFACE); + dbus_g_connection_unref (bus); + } + + dbus_g_proxy_call (priv->proxy, "CloseNotification", &tmp_error, + G_TYPE_UINT, priv->id, G_TYPE_INVALID, G_TYPE_INVALID); + + if (tmp_error != NULL) + { + g_propagate_error (error, tmp_error); + return FALSE; + } + + return TRUE; +} diff --git a/libnotify/notifynotification.h b/libnotify/notifynotification.h new file mode 100644 index 0000000..85b6c10 --- /dev/null +++ b/libnotify/notifynotification.h @@ -0,0 +1,118 @@ +/* + * This program 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 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with main.c; if not, write to: + * The Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef NOTIFY_NOTIFICATION_H +#define NOTIFY_NOTIFICATION_H +#include "config.h" + +#include +#include +#include + +#include "notifycommon.h" + +G_BEGIN_DECLS + +#define NOTIFY_TYPE_NOTIFICATION (notify_notification_get_type ()) +#define NOTIFY_NOTIFICATION(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), NOTIFY_TYPE_NOTIFICATION, NotifyNotification)) +#define NOTIFY_NOTIFICATION_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), NOTIFY_TYPE_NOTIFICATION, NotifyNotificationClass)) +#define NOTIFY_IS_NOTIFICATION(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), NOTIFY_TYPE_NOTIFICATION)) +#define NOTIFY_IS_NOTIFICATION_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), NOTIFY_TYPE_NOTIFICATION)) +#define NOTIFY_NOTIFICATION_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), NOTIFY_TYPE_NOTIFICATION, NotifyNotificationClass)) + +typedef struct NotifyNotificationPrivate NotifyNotificationPrivate; + +typedef struct { + GObject parent; + NotifyNotificationPrivate *priv; +} NotifyNotification; + +typedef struct { + GObjectClass parent_class; + /* Add Signal Functions Here */ +} NotifyNotificationClass; + +typedef void (*NotifyActionCallback )(NotifyNotification *, gchar *); + +GType notify_notification_get_type(); +NotifyNotification *notify_notification_new (const gchar *summary, + const gchar *message, + const gchar *icon, + GtkWidget *attach); + +gboolean notify_notification_update (NotifyNotification *notification, + const gchar *summary, + const gchar *message, + const gchar *icon); + +void notify_notification_attach_to_widget (NotifyNotification *notification, + GtkWidget *attach); + +gboolean notify_notification_set_user_data (NotifyNotification *notification, + void *user_data, + GFreeFunc free_func); + +gboolean notify_notification_show (NotifyNotification *notification, + GError **error); + +void notify_notification_set_timeout (NotifyNotification *notification, + gint timeout); + +gboolean notify_notification_set_category (NotifyNotification *notification, + const char *category); + +gboolean notify_notification_set_urgency (NotifyNotification *notification, + NotifyUrgency l); + +gboolean notify_notification_set_icon_data_from_pixbuf (NotifyNotification *notification, + GdkPixbuf *icon); + + +gboolean notify_notification_set_hint_int32 (NotifyNotification *notification, + const gchar *key, + gint value); + +gboolean notify_notification_set_hint_double (NotifyNotification *notification, + const gchar *key, + gdouble value); + +gboolean notify_notification_set_hint_string (NotifyNotification *notification, + const gchar *key, + const gchar *value); + +gboolean notify_notification_set_hint_byte (NotifyNotification *notification, + const gchar *key, + guchar value); + +gboolean notify_notification_set_hint_byte_array ( + NotifyNotification *notification, + const gchar *key, + const guchar *value, + gsize len); + +gboolean notify_notification_add_action (NotifyNotification *notification, + const char *action, + const char *label, + NotifyActionCallback callback); + +gboolean notify_notification_hide (NotifyNotification *notification, + GError **error); + +NotifyNotification *notify_notification_ref (NotifyNotification *notification); +void notify_notification_unref (NotifyNotification *notification); +#endif /* NOTIFY_NOTIFICATION_H */ diff --git a/libnotify/notifynotification.xml b/libnotify/notifynotification.xml new file mode 100644 index 0000000..cba9db3 --- /dev/null +++ b/libnotify/notifynotification.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/tests/Makefile.am b/tests/Makefile.am new file mode 100644 index 0000000..dba6243 --- /dev/null +++ b/tests/Makefile.am @@ -0,0 +1,50 @@ +if HAVE_GDK +gdk_tests = \ + test-xy-stress + +test_xy_stress_SOURCES = test-xy-stress.c +else +gdk_tests = +endif + +noinst_PROGRAMS = \ + test-replace \ + test-replace-widget \ + test-default-action \ + test-multi-actions \ + test-image \ + test-basic \ + test-error \ + test-markup \ + test-xy \ + $(gdk_tests) + +common_ldflags = \ + $(top_builddir)/libnotify/libnotify.la \ + $(PACKAGE_LIBS) \ + $(GDK_LIBS) + +test_replace_SOURCES = test-replace.c +test_replace_LDADD = $(common_ldflags) +test_replace_widget_SOURCES = test-replace-widget.c +test_replace_widget_LDADD = $(common_ldflags) +test_default_action_SOURCES = test-default-action.c +test_default_action_LDADD = $(common_ldflags) +test_multi_actions_SOURCES = test-multi-actions.c +test_multi_actions_LDADD = $(common_ldflags) +test_image_SOURCES = test-image.c +test_image_LDADD = $(common_ldflags) +test_basic_SOURCES = test-basic.c +test_basic_LDADD = $(common_ldflags) +test_error_SOURCES = test-error.c +test_error_LDADD = $(common_ldflags) + +test_markup_SOURCES = test-markup.c +test_markup_LDADD = $(common_ldflags) + +test_xy_SOURCES = test-xy.c +test_xy_LDADD = $(common_ldflags) + +test_xy_stress_LDADD = $(common_ldflags) + +INCLUDES = $(PACKAGE_CFLAGS) $(GDK_CFLAGS) diff --git a/tests/applet-critical.png b/tests/applet-critical.png new file mode 100644 index 0000000000000000000000000000000000000000..493807460af07e662eb10b5f821dc4fabf9a7c2f GIT binary patch literal 1411 zcmV-}1$_F6P)c0YtQkQ8hWt|#z^5Y8{YyBI49 zfa+`)1UY))88Vl0@r93Q0TU><;Pio7?d6jT3+->#>y`VxkMcCds|tCpy*PH)(=Oca!>#*|EhaWz8bmz`m?3_%jmAqCX>UIfg zHC(R;pM6GkIHa7W{x5Ny{lxpL3B0)Y+kH2=Edl71%k+%d-6@wZy}z`yXTH@cMTZZ| zxY^{dZ@%j-9udn0Q)^u$;wck_yvJXp(@9g^$AgTjBW6E_{ zx$x9ed*++Xa`X6cfh;+9$RnJ1?>+usXS!Xa(I99vkak=4=6UHYWA?lPfBesP z*S@{@&OQ^o-tE$Y)30~C2Rn^Mxq19J^(UVMz)mJexy)D9Xtya_3vrA(hm^}Kgkk9i zaHs{RQ3!tc`R9!T)#}U7?$}YQJ^eKGC!RpO#|;L!!GQHESMCb!UA;;K1ZfJ>DLzSX z-XlT45s~UQ;FYygYt6vHb1!u|Z3jU#KM&So`+Z!mhrM-+bTGIpI2(-+?~yE~wHBwILcsuDps7S< zcqpht=s|*33m3#D_o?L_sND%^{G_$xUg@1mLWqThO45DIV1BoKs))sDi8;l{emJeQi zmFnCa0Hf7a_E#!oxuH-c1yTtxB2-ivqSnB_1K{k9EX&mx+<1%~4zXKX6yq`3XoR`$^(CTF2T>0CoWb*u4uby#af_ z9t0&HgqSd7(rhr9n`2@vL8VG{#}11A038gFJfmI|jMdw7syDxY!{J*Cs{o-?g~UP~ zCSzFn5SH4i_bsSKf%oD(gwE2c)~E#`I^HH2k7%SZ))x9V@6&T|Z2-@PXJ(-QAr_=6 z6c$=AiQ(PrP`(P?KsB86E@%`*5GD!XbV3+Un5L=y*xK}*>fkc`atNo|KVR4cKxgaD zQy^7g{`#SWaTh&%*@x2@j5zt&aH#;~&YXA9H+{dL?q{1;xB$MK&{ Rt?d8+002ovPDHLkV1kiIpc?=H literal 0 HcmV?d00001 diff --git a/tests/dewdop_leaf.jpg b/tests/dewdop_leaf.jpg new file mode 100644 index 0000000000000000000000000000000000000000..7a8f741aaf9adc97eb208aa73ed4ba05c513b4b5 GIT binary patch literal 51555 zcmb4qXIK+!)a_72REivt8j5lR1Psz!D2jk0MWlBnM5IUwMLO6(sUp2A2uK%@-oywI zB18ziNC^Q#6Cz+h%6&QC_uS|Hy`xSh(=v~<_q*3#YrRLKM>Eh_UF}=i5Dg6tbQAo6 zjwT>Yh>?NeB*O{DlP6D}I>mUJiJh70%o!%`f6lS8^YIAq^YOr7g8#xr1TRVm!C;~a zmnE)B$;!$Kh$yKlN+aMhveL&lp*eNx6w?_dE@oyf=?kz6(*NJf(PxN_k^Uot1|7{s zh?b3pj*aH%E5r*ybl_pZ01j9*iQ0gq$PfJ5jOG`^bM^6XNglK5l=;;5s zAa(8jIinL7z1XFnFbE~QJAeJ|zcQL=a0&N+H~W8Y2QC5k1BWiL{r5ZICjb3CK8J>l zmJZyE{@gWiv-|8`(nsSE6F3Tfgbh-M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AIBs#B%Y)odDJ<&aJQ4Tp=+sN9-f?`+8KZaj`b!R|k90$Y*8Q+Cb=#IjH z+@qBMdhAQw#W0dE^)$%zYyk{H6m;2O`sKn|LI4*digZW@iZc8dgkSQq2&Ee`2!#-J z5tKxoX-LOFJzfOULLZw4jt5-m%QAc|_2eRN)&3MEua?Xhfl%>Af!GxTv%gAZ=x=P# zSCu=(VED*(n?Zuhy_3VzQCpS;Rs~Pey6f#~8c0WesgqsHr7ssi0j(tfa@RW2n`}pq zI#SWFx0_jsfM{v{$wX7O)68nDFlU#gEsRJ3VEkkNOh9Q63?{c|H`Xy^KPwKQP4a8U z<-Vz(_O9Gg0Y_5s{P3KDWr4y*c#~RAMtH>b5pW_WSN4J4ApCVT!{SoA!&bO}9#!x` zZH*!wfJkIR?kf(6wZrPv?5cqqO%4!DaF8RF>wDR=i_#h_L}^nIY-M39d@myDdK{)G zN%zaNa`w|MU48o_aD*<#P_yrvO6|U}H5Q8~Qkg zI~%S5!HJVhTw&p1Oiauirw?JVF8KgWJf9!o<{0q?hx1iLw?Q(KdJYMeipk|P!tVXh zlEro0+TWivW@f4@;LEFTb*_9wMzbShVaz(1Q6>#aeyDWOF64C4 + * + * 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., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#include +#include +#include + +int main() { + NotifyNotification *n; + + notify_init("Basics"); + + n = notify_notification_new ("Summary", + "Content", + NULL, NULL); + notify_notification_set_timeout (n, 3000); //3 seconds + + if (!notify_notification_show (n, NULL)) { + fprintf(stderr, "failed to send notification\n"); + return 1; + } + + return 0; +} diff --git a/tests/test-default-action.c b/tests/test-default-action.c new file mode 100644 index 0000000..e906991 --- /dev/null +++ b/tests/test-default-action.c @@ -0,0 +1,73 @@ +/* + * @file tests/test-default-action.c Unit test: default action + * + * @Copyright (C) 2004 Mike Hearn + * + * 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., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#include +#include +#include +#include +#include +#include + +#define DBUS_API_SUBJECT_TO_CHANGE 1 + +#include +#include +#include +#include + +static GMainLoop *loop; + +static void callback(NotifyNotification *n, const char *action, void *user_data) +{ + assert (action != NULL); + assert (strcmp ("default", action) == 0); + + notify_notification_close (n, NULL); + + g_main_loop_quit(loop); +} + +int +main() +{ + NotifyNotification *n; + + if (!notify_init("Default Action Test")) exit(1); + + DBusConnection *conn = dbus_bus_get(DBUS_BUS_SESSION, NULL); + loop = g_main_loop_new(NULL, FALSE); + + dbus_connection_setup_with_g_main(conn, NULL); + + n = notify_notification_new ("Matt is online", "", NULL, NULL); + notify_notification_set_timeout (n, NOTIFY_TIMEOUT_NEVER); + notify_notification_add_action (n, "default", "Do Default Action", callback); + notify_notification_set_category (n, "presence.online"); + + if (!notify_notification_show (n, NULL)) { + fprintf(stderr, "failed to send notification\n"); + return 1; + } + + g_main_loop_run(loop); + + return 0; +} diff --git a/tests/test-error.c b/tests/test-error.c new file mode 100644 index 0000000..c1ef835 --- /dev/null +++ b/tests/test-error.c @@ -0,0 +1,48 @@ +/* + * @file tests/test-default-action.c Unit test: error handling + * + * @Copyright (C) 2004 Mike Hearn + * + * 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., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#include +#include +#include + +int main() { + NotifyNotification *n; + + g_type_init (); + + notify_init("Error Handling"); + + n = notify_notification_new ("Summary", + "Content", + NULL, NULL); + notify_notification_set_timeout (n, 3000); //3 seconds + + /* TODO: Create an error condition */ + + + if (!notify_notification_show (n, NULL)) { + fprintf(stderr, "failed to send notification\n"); + return 1; + } + + + return 0; +} diff --git a/tests/test-image.c b/tests/test-image.c new file mode 100644 index 0000000..151e609 --- /dev/null +++ b/tests/test-image.c @@ -0,0 +1,109 @@ +/* + * @file tests/test-image.c Unit test: images + * + * @Copyright (C) 2004 Mike Hearn + * + * 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., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define DBUS_API_SUBJECT_TO_CHANGE 1 + +#include +#include +#include +#include +#include + +GMainLoop *loop; +NotifyNotification *n; + +int main(int argc, char *argv[]) { + char file[PATH_MAX]; + int size; + char *uri; + GdkPixbuf *icon; + gchar *buf; + gsize buf_size; + GtkWidget *helper; + + gtk_init (&argc, &argv); + + if (!notify_init("Images Test")) exit(1); + + n = notify_notification_new ("Icon Test", "Testing stock icon", "stock_help", NULL); + notify_notification_set_timeout (n, NOTIFY_TIMEOUT_NEVER); + if (!notify_notification_show (n, NULL)) { + fprintf(stderr, "failed to send notification\n"); + return 1; + } + + g_usleep (5000000); //5 seconds + + size = readlink("/proc/self/cwd", file, PATH_MAX - 1); + file[size] = '\0'; + uri = g_strdup_printf ("file://%s/%s", file, "applet-critical.png"); + + printf("sending %s\n", uri); + + notify_notification_update (n, "Alert!", "Testing URI icons", uri); + + if (!notify_notification_show (n, NULL)) { + fprintf(stderr, "failed to send notification\n"); + return 1; + } + + g_usleep (5000000); //5 seconds + + notify_notification_update (n, "Raw image test", "Testing sending raw pixbufs", NULL); + + /* This is just a hack to get a stock icon's pixbuf + in a realworld app if you were sending bitmapped data + you would know the file location and open it up with + a method that could generate a bmp for you*/ + helper = gtk_button_new(); + icon = gtk_widget_render_icon (helper, + GTK_STOCK_DIALOG_QUESTION, + GTK_ICON_SIZE_DIALOG, + ""); + + + notify_notification_set_icon_data_from_pixbuf (n, + icon); + + if (!notify_notification_show (n, NULL)) { + fprintf(stderr, "failed to send notification\n"); + return 1; + } + + + gtk_widget_destroy (helper); + g_object_unref ((GObject *)icon); + + g_usleep (5000000); //5 seconds + return 0; +} diff --git a/tests/test-markup.c b/tests/test-markup.c new file mode 100644 index 0000000..1471bde --- /dev/null +++ b/tests/test-markup.c @@ -0,0 +1,43 @@ +/* + * @file tests/test-markup.c Unit test: markup + * + * @Copyright (C) 2004 Mike Hearn + * + * 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., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#include +#include +#include + +int main() { + NotifyNotification *n; + + notify_init("Markup"); + + n = notify_notification_new ("Summary", + "Some bold, underlined, italic, " + "linked text", + NULL, NULL); + notify_notification_set_timeout (n, 3000); //3 seconds + + if (!notify_notification_show (n, NULL)) { + fprintf(stderr, "failed to send notification\n"); + return 1; + } + + return 0; +} diff --git a/tests/test-multi-actions.c b/tests/test-multi-actions.c new file mode 100644 index 0000000..95519bc --- /dev/null +++ b/tests/test-multi-actions.c @@ -0,0 +1,104 @@ +/* + * @file tests/test-multi-actions.c Unit test: multiple actions + * + * @Copyright (C) 2004 Mike Hearn + * + * 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., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#include +#include +#include +#include +#include +#include + +#define DBUS_API_SUBJECT_TO_CHANGE 1 + +#include +#include +#include +#include + +GMainLoop *loop; + +static void help_callback(NotifyNotification *n, const char *action, void *user_data) +{ + assert( action != NULL ); + assert( strcmp (action, "help") == 0 ); + + printf("You clicked Help\n"); + + notify_notification_close(n, NULL); + + g_main_loop_quit(loop); +} + +static void ignore_callback(NotifyNotification *n, const char *action, void *user_data) +{ + assert( action != NULL ); + assert( strcmp (action, "ignore") == 0 ); + + printf("You clicked Ignore\n"); + + notify_notification_close(n, NULL); + + g_main_loop_quit(loop); +} + + +static void empty_callback(NotifyNotification *n, const char *action, void *user_data) +{ + assert( action != NULL ); + assert( strcmp (action, "empty") == 0 ); + + printf("You clicked Empty Trash\n"); + + notify_notification_close(n, NULL); + + g_main_loop_quit(loop); +} + + +int main() { + NotifyNotification *n; + + if (!notify_init("Multi Action Test")) exit(1); + + DBusConnection *conn = dbus_bus_get(DBUS_BUS_SESSION, NULL); + loop = g_main_loop_new(NULL, FALSE); + + dbus_connection_setup_with_g_main(conn, NULL); + + n = notify_notification_new ("Low disk space", + "You can free up some disk space by " + "emptying the trash can.", + NULL, NULL); + notify_notification_set_timeout (n, NOTIFY_TIMEOUT_NEVER); + notify_notification_add_action (n, "help", "Help", help_callback); + notify_notification_add_action (n, "ignore", "Ignore", ignore_callback); + notify_notification_add_action (n, "empty", "Empty Trash", empty_callback); + notify_notification_set_category (n, "device"); + + if (!notify_notification_show (n, NULL)) { + fprintf(stderr, "failed to send notification\n"); + return 1; + } + + g_main_loop_run(loop); + + return 0; +} diff --git a/tests/test-replace-widget.c b/tests/test-replace-widget.c new file mode 100644 index 0000000..bfb2083 --- /dev/null +++ b/tests/test-replace-widget.c @@ -0,0 +1,62 @@ +#include +#include +#include +#include +#include + + +static int count = 0; + +void on_exposed (GtkWidget *widget, GdkEventExpose *ev, void *user_data) { + NotifyNotification *n = NOTIFY_NOTIFICATION (user_data); + + g_signal_handlers_disconnect_by_func(widget, on_exposed, user_data); + + notify_notification_show (n, NULL); +} + +void on_clicked (GtkButton *button, void *user_data) { + GError *error; + gchar *buf; + NotifyNotification *n = NOTIFY_NOTIFICATION (user_data); + + count++; + buf = g_strdup_printf ("You clicked the button %i times", count); + + notify_notification_update (n, "Widget Attachment Test", + buf, NULL); + + notify_notification_show (n, NULL); + g_free (buf); +} + +int main(int argc, char *argv[]) { + NotifyNotification *n; + GtkWidget *window; + GtkWidget *button; + + GError *error; + error = NULL; + + gtk_init (&argc, &argv); + notify_init("Replace Test"); + + window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + button = gtk_button_new_with_label ("click here to change notification"); + gtk_container_add (GTK_CONTAINER(window), button); + + gtk_widget_show_all (window); + + + n = notify_notification_new ("Widget Attachment Test", "Button has not been clicked yet", + NULL, //no icon + button); //attach to button + + + notify_notification_set_timeout (n, 0); //don't timeout + + g_signal_connect (button, "clicked", (GCallback *)on_clicked, n); + g_signal_connect_after (button, "expose-event", (GCallback *)on_exposed, n); + + gtk_main(); +} diff --git a/tests/test-replace.c b/tests/test-replace.c new file mode 100644 index 0000000..ec8cbe5 --- /dev/null +++ b/tests/test-replace.c @@ -0,0 +1,40 @@ +#include +#include +#include +#include + +int main() { + NotifyNotification *n; + GError *error; + error = NULL; + + g_type_init (); + + notify_init("Replace Test"); + + n = notify_notification_new ("Summary", "First message", + NULL, //no icon + NULL); //don't attach to widget + + + notify_notification_set_timeout (n, 0); //don't timeout + + if (!notify_notification_show (n, &error)) { + fprintf(stderr, "failed to send notification: %s\n", error->message); + g_error_free (error); + return 1; + } + + sleep(3); + + notify_notification_update (n, "Second Summary", + "First mesage was replaced", NULL); + + if (!notify_notification_show (n, &error)) { + fprintf(stderr, "failed to send notification: %s\n", error->message); + g_error_free (error); + return 1; + } + + return 0; +} diff --git a/tests/test-xy-stress.c b/tests/test-xy-stress.c new file mode 100644 index 0000000..0888cf6 --- /dev/null +++ b/tests/test-xy-stress.c @@ -0,0 +1,86 @@ +/* + * @file tests/test-xy.c Unit test: X, Y hints + * + * @Copyright (C) 2005 Christian Hammond + * + * 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., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#include +#include +#include +#include + +static void +emit_notification(int x, int y) +{ + static char buffer[BUFSIZ]; + NotifyNotification *n; + + g_snprintf(buffer, sizeof(buffer), + "This notification should point to %d, %d.", x, y); + + n = notify_notification_new ("X, Y Test", + buffer, + NULL, NULL); + + notify_notification_set_hint_int32 (n, "x", x); + notify_notification_set_hint_int32 (n, "y", y); + + if (!notify_notification_show (n, NULL)) { + fprintf(stderr, "failed to send notification\n"); + return 1; + } +} + +int +main(int argc, char **argv) +{ + GdkDisplay *display; + GdkScreen *screen; + int screen_x2, screen_y2; + + gdk_init(&argc, &argv); + + notify_init("XY"); + + display = gdk_display_get_default(); + screen = gdk_display_get_default_screen(display); + screen_x2 = gdk_screen_get_width(screen) - 1; + screen_y2 = gdk_screen_get_height(screen) - 1; + + emit_notification(0, 0); + g_usleep (1000000); + emit_notification(screen_x2, 0); + g_usleep (1000000); + emit_notification(5, 150); + g_usleep (1000000); + emit_notification(screen_x2 - 5, 150); + g_usleep (1000000); + emit_notification(0, screen_y2 / 2); + g_usleep (1000000); + emit_notification(screen_x2, screen_y2 / 2); + g_usleep (1000000); + emit_notification(5, screen_y2 - 150); + g_usleep (1000000); + emit_notification(screen_x2 - 5, screen_y2 - 150); + g_usleep (1000000); + emit_notification(0, screen_y2); + g_usleep (1000000); + emit_notification(screen_x2, screen_y2); + + return 0; +} diff --git a/tests/test-xy.c b/tests/test-xy.c new file mode 100644 index 0000000..f9daf8e --- /dev/null +++ b/tests/test-xy.c @@ -0,0 +1,44 @@ +/* + * @file tests/test-xy.c Unit test: X, Y hints + * + * @Copyright (C) 2005 Christian Hammond + * + * 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., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#include +#include +#include + +int main() { + NotifyNotification *n; + + notify_init("XY"); + + n = notify_notification_new ("X, Y Test", + "This notification should point to 150, 10", + NULL, NULL); + + notify_notification_set_hint_int32 (n, "x", 150); + notify_notification_set_hint_int32 (n, "y", 10); + + if (!notify_notification_show (n, NULL)) { + fprintf(stderr, "failed to send notification\n"); + return 1; + } + + return 0; +} diff --git a/tools/Makefile.am b/tools/Makefile.am new file mode 100644 index 0000000..7cba1c9 --- /dev/null +++ b/tools/Makefile.am @@ -0,0 +1,11 @@ +bin_PROGRAMS = notify-send + +common_ldflags = \ + $(top_builddir)/libnotify/libnotify.la \ + $(PACKAGE_LIBS) \ + -lpopt + +notify_send_SOURCES = notify-send.c +notify_send_LDADD = $(common_ldflags) + +INCLUDES = $(PACKAGE_CFLAGS) diff --git a/tools/notify-send.c b/tools/notify-send.c new file mode 100644 index 0000000..7771fb5 --- /dev/null +++ b/tools/notify-send.c @@ -0,0 +1,144 @@ +/** + * @file notify-send.c A tool for sending notifications. + * + * Copyright (C) 2004 Christian Hammond. + * + * 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 2 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, write to the Free + * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ +#include +#include +#include +#include +#include +#include +#include + +#define N_(x) (x) + +int +main(int argc, const char **argv) +{ + const gchar *summary = NULL; + const gchar *body = NULL; + const gchar *type = NULL; + char *urgency_str = NULL; + gchar *icon_str = NULL; + gchar *icons = NULL; + NotifyUrgency urgency = NOTIFY_URGENCY_NORMAL; + long expire_timeout = NOTIFY_TIMEOUT_DEFAULT; + char ch; + poptContext opt_ctx; + const char **args; + NotifyNotification *notify; + GError *error = NULL; + + g_type_init (); + + struct poptOption options[] = + { + { "urgency", 'u', POPT_ARG_STRING | POPT_ARGFLAG_STRIP, &urgency_str, + 0, N_("Specifies the urgency level (low, normal, critical)."), + NULL }, + { "expire-time", 't', POPT_ARG_INT | POPT_ARGFLAG_STRIP, + &expire_timeout, 0, + N_("Specifies the timeout in seconds at which to expire the " + "notification."), + NULL }, + { "icon", 'i', POPT_ARG_STRING | POPT_ARGFLAG_STRIP, &icons, 0, + N_("Specifies an icon filename or stock icon to display."), + N_("ICON1,ICON2,...") }, + { "type", 't', POPT_ARG_STRING | POPT_ARGFLAG_STRIP, &type, 0, + N_("Specifies the notification type."), + N_("ICON1,ICON2,...") }, + POPT_AUTOHELP + POPT_TABLEEND + }; + + opt_ctx = poptGetContext("notify-send", argc, argv, options, 0); + poptSetOtherOptionHelp(opt_ctx, "[OPTIONS]* [body]"); + + while ((ch = poptGetNextOpt(opt_ctx)) >= 0) + ; + + if (ch < -1 || (args = poptGetArgs(opt_ctx)) == NULL) + { + poptPrintUsage(opt_ctx, stderr, 0); + exit(1); + } + + if (args[0] != NULL) + summary = args[0]; + + if (summary == NULL) + { + poptPrintUsage(opt_ctx, stderr, 0); + exit(1); + } + + if (args[1] != NULL) + { + body = args[1]; + + if (args[2] != NULL) + { + poptPrintUsage(opt_ctx, stderr, 0); + exit(1); + } + } + + if (icons != NULL) + { + char *c; + + /* XXX */ + if ((c = strchr(icons, ',')) != NULL) + *c = '\0'; + + icon_str = icons; + + } + + if (urgency_str != NULL) + { + if (!strcasecmp(urgency_str, "low")) + urgency = NOTIFY_URGENCY_LOW; + else if (!strcasecmp(urgency_str, "normal")) + urgency = NOTIFY_URGENCY_NORMAL; + else if (!strcasecmp(urgency_str, "critical")) + urgency = NOTIFY_URGENCY_CRITICAL; + else + { + poptPrintHelp(opt_ctx, stderr, 0); + exit(1); + } + } + + if (!notify_init("notify-send")) + exit(1); + + + notify = notify_notification_new (summary, body, icon_str, NULL); + notify_notification_set_category (notify, type); + notify_notification_set_urgency (notify, urgency); + notify_notification_set_timeout (notify, expire_timeout); + + notify_notification_show (notify, error); + + poptFreeContext(opt_ctx); + notify_uninit(); + + return 0; +} From 23a10eccbf86aea951c23b444d1800231c1a6f52 Mon Sep 17 00:00:00 2001 From: "John (J5) Palmieri" Date: Tue, 15 Nov 2005 15:07:35 +0000 Subject: [PATCH 02/17] changed version to 0.0.2 --- configure.ac | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index f961b50..56bcb0e 100644 --- a/configure.ac +++ b/configure.ac @@ -3,7 +3,7 @@ dnl Process this file with autoconf to create configure. dnl ################################################################ dnl # Initialize autoconf dnl ################################################################ -AC_INIT(libnotify, 0.0.1.j5.1, chipx86@gnupdate.org) +AC_INIT(libnotify, 0.0.2, chipx86@gnupdate.org) AC_PREREQ(2.50) AC_CONFIG_SRCDIR(config.h.in) AC_COPYRIGHT([Copyright 2004 Christian Hammond]) @@ -14,8 +14,8 @@ dnl # Version information dnl ################################################################ LIBGALAGO_MAJOR_VERSION=0 LIBGALAGO_MINOR_VERSION=0 -LIBGALAGO_MICRO_VERSION=1 -LIBGALAGO_DEVEL_VERSION=j5.1 +LIBGALAGO_MICRO_VERSION=2 +LIBGALAGO_DEVEL_VERSION=0 LIBGALAGO_VERSION=$LIBGALAGO_MAJOR_VERSION.$LIBGALAGO_MINOR_VERSION.$LIBGALAGO_MICRO_VERSION From 941757b593e8ab6d8f184404c918bb1fa70021c8 Mon Sep 17 00:00:00 2001 From: "John (J5) Palmieri" Date: Tue, 15 Nov 2005 18:43:13 +0000 Subject: [PATCH 03/17] Bump version to not conflict with the older libnotify packages --- AUTHORS | 1 + configure.ac | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/AUTHORS b/AUTHORS index d1999d8..5f37798 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,2 +1,3 @@ Christian Hammond Mike Hearn +John (J5) Palmieri diff --git a/configure.ac b/configure.ac index 56bcb0e..62d2142 100644 --- a/configure.ac +++ b/configure.ac @@ -3,7 +3,7 @@ dnl Process this file with autoconf to create configure. dnl ################################################################ dnl # Initialize autoconf dnl ################################################################ -AC_INIT(libnotify, 0.0.2, chipx86@gnupdate.org) +AC_INIT(libnotify, 0.3.0, chipx86@gnupdate.org) AC_PREREQ(2.50) AC_CONFIG_SRCDIR(config.h.in) AC_COPYRIGHT([Copyright 2004 Christian Hammond]) @@ -13,8 +13,8 @@ dnl ################################################################ dnl # Version information dnl ################################################################ LIBGALAGO_MAJOR_VERSION=0 -LIBGALAGO_MINOR_VERSION=0 -LIBGALAGO_MICRO_VERSION=2 +LIBGALAGO_MINOR_VERSION=3 +LIBGALAGO_MICRO_VERSION=0 LIBGALAGO_DEVEL_VERSION=0 LIBGALAGO_VERSION=$LIBGALAGO_MAJOR_VERSION.$LIBGALAGO_MINOR_VERSION.$LIBGALAGO_MICRO_VERSION From 38c83b0ef58b36fd171a5fd87a86798ce880eaa9 Mon Sep 17 00:00:00 2001 From: "John (J5) Palmieri" Date: Fri, 2 Dec 2005 20:36:46 +0000 Subject: [PATCH 04/17] * libnotify/notifynotification.c (SIGNAL_TYPE_CLOSED): "closed" glib signal added (notify_notification_clear_hints): New API for clearing out the hints hash (notify_notification_ref, notify_notification_unref): removed - use g_object_ref/unref * tests/*: Various changes to the test binaries --- libnotify/notifynotification.c | 81 +++++++++++++++++++++++----------- libnotify/notifynotification.h | 3 ++ tests/test-basic.c | 2 +- tests/test-image.c | 4 ++ tests/test-xy-stress.c | 66 ++++++++++++++++----------- tests/test-xy.c | 2 +- 6 files changed, 104 insertions(+), 54 deletions(-) diff --git a/libnotify/notifynotification.c b/libnotify/notifynotification.c index 7174380..66e849e 100644 --- a/libnotify/notifynotification.c +++ b/libnotify/notifynotification.c @@ -25,11 +25,13 @@ static void notify_notification_class_init (NotifyNotificationClass * klass); static void notify_notification_init (NotifyNotification * sp); static void notify_notification_finalize (GObject * object); +static void _close_signal_handler (DBusGProxy *proxy, + guint32 id, + NotifyNotification *notification); struct NotifyNotificationPrivate { guint32 id; - gchar *summary; gchar *message; @@ -58,19 +60,18 @@ struct NotifyNotificationPrivate DBusGProxy *proxy; }; -#if 0 typedef enum { + SIGNAL_TYPE_CLOSED, LAST_SIGNAL } NotifyNotificationSignalType; -#endif typedef struct { NotifyNotification *object; } NotifyNotificationSignal; -/* static guint notify_notification_signals[LAST_SIGNAL] = { 0 }; */ +static guint notify_notification_signals[LAST_SIGNAL] = { 0 }; static GObjectClass *parent_class = NULL; GType @@ -107,9 +108,16 @@ notify_notification_class_init (NotifyNotificationClass * klass) parent_class = g_type_class_peek_parent (klass); object_class->finalize = notify_notification_finalize; - /* Create signals here: - notify_notification_signals[SIGNAL_TYPE_EXAMPLE] = g_signal_new(...) - */ + /* Create signals here: */ + notify_notification_signals[SIGNAL_TYPE_CLOSED] = + g_signal_new ("closed", + G_TYPE_FROM_CLASS (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (NotifyNotificationClass, closed), + NULL, NULL, + g_cclosure_marshal_VOID__VOID, + G_TYPE_NONE, + 0); } static void @@ -177,6 +185,10 @@ notify_notification_finalize (GObject * object) if (priv->user_data_free_func != NULL) priv->user_data_free_func (priv->user_data); + dbus_g_proxy_disconnect_signal (priv->proxy, "NotificationClosed", + _close_signal_handler, + object); + g_free (obj->priv); G_OBJECT_CLASS (parent_class)->finalize (object); } @@ -304,18 +316,6 @@ notify_notification_new (const gchar * summary, return obj; } -NotifyNotification * -notify_notification_ref (NotifyNotification * notification) -{ - return NOTIFY_NOTIFICATION (g_object_ref (G_OBJECT (notification))); -} - -void -notify_notification_unref (NotifyNotification * notification) -{ - g_object_unref (G_OBJECT (notification)); -} - gboolean notify_notification_update (NotifyNotification * notification, const gchar * summary, @@ -385,8 +385,22 @@ filter_func (DBusConnection *connection, return DBUS_HANDLER_RESULT_HANDLED; } +static void +_close_signal_handler (DBusGProxy *proxy, + guint32 id, + NotifyNotification *notification) +{ + printf ("Got the NotificationClosed signal (id = %i, notification->id = %i)\n" +, id, notification->priv->id); + + if (id == notification->priv->id) + g_signal_emit (notification, + notify_notification_signals[SIGNAL_TYPE_CLOSED], + 0); +} + gboolean -notify_notification_show (NotifyNotification * notification, GError ** error) +notify_notification_show (NotifyNotification *notification, GError **error) { NotifyNotificationPrivate *priv; GError *tmp_error; @@ -408,15 +422,17 @@ notify_notification_show (NotifyNotification * notification, GError ** error) return FALSE; } - /* Register the object here because - * we need to start listening for signals - */ - dbus_g_connection_register_g_object (bus, "/org/freedesktop/NotifyNotification", G_OBJECT (notification)); - priv->proxy = dbus_g_proxy_new_for_name (bus, NOTIFY_DBUS_NAME, NOTIFY_DBUS_CORE_OBJECT, NOTIFY_DBUS_CORE_INTERFACE); + + dbus_g_proxy_add_signal (priv->proxy, "NotificationClosed", + G_TYPE_UINT, NULL); + dbus_g_proxy_connect_signal (priv->proxy, "NotificationClosed", + _close_signal_handler, + notification, NULL); + dbus_g_connection_unref (bus); } @@ -715,8 +731,21 @@ notify_notification_set_hint_string (NotifyNotification * notification, return TRUE; } +static gboolean +_remove_all (void) +{ + return TRUE; +} + +void +notify_notification_clear_hints (NotifyNotification *notification) +{ + g_hash_table_foreach_remove (notification->priv->hints, + (GHRFunc) _remove_all, NULL); +} + gboolean -notify_notification_add_action (NotifyNotification * notification, +notify_notification_add_action (NotifyNotification *notification, const char *action, const char *label, NotifyActionCallback callback) diff --git a/libnotify/notifynotification.h b/libnotify/notifynotification.h index 85b6c10..4c53e4b 100644 --- a/libnotify/notifynotification.h +++ b/libnotify/notifynotification.h @@ -45,6 +45,7 @@ typedef struct { typedef struct { GObjectClass parent_class; /* Add Signal Functions Here */ + void (*closed) (void); } NotifyNotificationClass; typedef void (*NotifyActionCallback )(NotifyNotification *, gchar *); @@ -105,6 +106,8 @@ gboolean notify_notification_set_hint_byte_array ( const guchar *value, gsize len); +void notify_notification_clear_hints (NotifyNotification *notification); + gboolean notify_notification_add_action (NotifyNotification *notification, const char *action, const char *label, diff --git a/tests/test-basic.c b/tests/test-basic.c index e04a5fa..cc2b83d 100644 --- a/tests/test-basic.c +++ b/tests/test-basic.c @@ -29,7 +29,7 @@ int main() { notify_init("Basics"); n = notify_notification_new ("Summary", - "Content", + "Content that is very long 8374983278r32j4 rhjjfh dw8f 43jhf 8ds7 ur2389f jdbjkt h8924yf jkdbjkt 892hjfiHER98HEJIF BDSJHF hjdhF JKLH 890YRHEJHFU 89HRJKSHFJ YE8UI HR3UIH89EFHIUEUF9DHFUIBuiew f89hsajiJ FHJKDSKJFH SDJKFH KJASDFJK HKJADSHFK JSAHF89WE HUIIUG JG kjG JKGJGHJg JHG H J HJGJHDG HJKJG hgd hgjhf df h3eui fusidyaiu rh f98ehkrnm e8rv9y 43heh vijdhjkewdkjsjfjk sdhkjf hdkj fadskj hfkjdsh", NULL, NULL); notify_notification_set_timeout (n, 3000); //3 seconds diff --git a/tests/test-image.c b/tests/test-image.c index 151e609..a026d19 100644 --- a/tests/test-image.c +++ b/tests/test-image.c @@ -56,6 +56,10 @@ int main(int argc, char *argv[]) { if (!notify_init("Images Test")) exit(1); n = notify_notification_new ("Icon Test", "Testing stock icon", "stock_help", NULL); + + notify_notification_set_hint_int32 (n, "x", 300); + notify_notification_set_hint_int32 (n, "y", 24); + notify_notification_set_timeout (n, NOTIFY_TIMEOUT_NEVER); if (!notify_notification_show (n, NULL)) { fprintf(stderr, "failed to send notification\n"); diff --git a/tests/test-xy-stress.c b/tests/test-xy-stress.c index 0888cf6..66dbc1b 100644 --- a/tests/test-xy-stress.c +++ b/tests/test-xy-stress.c @@ -24,6 +24,16 @@ #include #include +#include +#include + +static void +_handle_closed (GObject *o) +{ + g_message ("closing"); + g_object_unref (o); +} + static void emit_notification(int x, int y) { @@ -40,47 +50,51 @@ emit_notification(int x, int y) notify_notification_set_hint_int32 (n, "x", x); notify_notification_set_hint_int32 (n, "y", y); + g_signal_connect (n, "closed", _handle_closed, NULL); + if (!notify_notification_show (n, NULL)) { fprintf(stderr, "failed to send notification\n"); return 1; } } -int -main(int argc, char **argv) +static gboolean +_popup_random_bubble (void) { GdkDisplay *display; GdkScreen *screen; + int screen_x2, screen_y2; - - gdk_init(&argc, &argv); - - notify_init("XY"); + int x, y; display = gdk_display_get_default(); screen = gdk_display_get_default_screen(display); screen_x2 = gdk_screen_get_width(screen) - 1; screen_y2 = gdk_screen_get_height(screen) - 1; - emit_notification(0, 0); - g_usleep (1000000); - emit_notification(screen_x2, 0); - g_usleep (1000000); - emit_notification(5, 150); - g_usleep (1000000); - emit_notification(screen_x2 - 5, 150); - g_usleep (1000000); - emit_notification(0, screen_y2 / 2); - g_usleep (1000000); - emit_notification(screen_x2, screen_y2 / 2); - g_usleep (1000000); - emit_notification(5, screen_y2 - 150); - g_usleep (1000000); - emit_notification(screen_x2 - 5, screen_y2 - 150); - g_usleep (1000000); - emit_notification(0, screen_y2); - g_usleep (1000000); - emit_notification(screen_x2, screen_y2); + x = g_random_int_range (0, screen_x2); + y = g_random_int_range (0, screen_y2); + emit_notification(x, y); - return 0; + return TRUE; +} + +int +main(int argc, char **argv) +{ + GMainLoop *loop; + DBusConnection *conn; + + gdk_init(&argc, &argv); + + notify_init("XY"); + + conn = dbus_bus_get (DBUS_BUS_SESSION, NULL); + + dbus_connection_setup_with_g_main (conn, NULL); + + g_timeout_add (1000, _popup_random_bubble, NULL); + + loop = g_main_loop_new (NULL, FALSE); + g_main_loop_run (loop); } diff --git a/tests/test-xy.c b/tests/test-xy.c index f9daf8e..612a04f 100644 --- a/tests/test-xy.c +++ b/tests/test-xy.c @@ -32,7 +32,7 @@ int main() { "This notification should point to 150, 10", NULL, NULL); - notify_notification_set_hint_int32 (n, "x", 150); + notify_notification_set_hint_int32 (n, "x", 30); notify_notification_set_hint_int32 (n, "y", 10); if (!notify_notification_show (n, NULL)) { From 4a3be1113e2218e9c1b82c079a3e229eac5614f1 Mon Sep 17 00:00:00 2001 From: "John (J5) Palmieri" Date: Fri, 2 Dec 2005 21:03:40 +0000 Subject: [PATCH 05/17] * libnotify/notifynotification.c (notify_notification_show_and_forget): new method that shows and then unrefs the NotifyNotification object. use this if you just want to fire off a quick notification. * various compiler warning cleanups --- ChangeLog | 19 ++++++++++++ libnotify/notifynotification.c | 55 ++++++++++++++++++++++++---------- 2 files changed, 59 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index e5b1561..04d1b8c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,22 @@ +Fri Dec 02 2005 John (J5) Palmieri + + * libnotify/notifynotification.c (notify_notification_show_and_forget): + new method that shows and then unrefs the NotifyNotification object. + use this if you just want to fire off a quick notification. + + * various compiler warning cleanups + +Fri Dec 02 2005 John (J5) Palmieri + + * libnotify/notifynotification.c (SIGNAL_TYPE_CLOSED): "closed" glib + signal added + (notify_notification_clear_hints): New API for clearing out the + hints hash + (notify_notification_ref, notify_notification_unref): removed - use + g_object_ref/unref + + * tests/*: Various changes to the test binaries + Thu Nov 10 14:00:00 EST 2005 John (J5) Palmieri * Complete rewrite and first import to libnotify-ng module in SVN diff --git a/libnotify/notifynotification.c b/libnotify/notifynotification.c index 66e849e..050e79c 100644 --- a/libnotify/notifynotification.c +++ b/libnotify/notifynotification.c @@ -186,7 +186,7 @@ notify_notification_finalize (GObject * object) priv->user_data_free_func (priv->user_data); dbus_g_proxy_disconnect_signal (priv->proxy, "NotificationClosed", - _close_signal_handler, + (GCallback) _close_signal_handler, object); g_free (obj->priv); @@ -375,16 +375,6 @@ notify_notification_set_user_data (NotifyNotification * notification, return TRUE; } -static DBusHandlerResult -filter_func (DBusConnection *connection, - DBusMessage *message, - void *user_data) -{ - g_message ("member %s", dbus_message_get_member (message)); - - return DBUS_HANDLER_RESULT_HANDLED; -} - static void _close_signal_handler (DBusGProxy *proxy, guint32 id, @@ -399,8 +389,10 @@ _close_signal_handler (DBusGProxy *proxy, 0); } -gboolean -notify_notification_show (NotifyNotification *notification, GError **error) +static gboolean +_notify_notification_show_internal (NotifyNotification *notification, + GError **error, + gboolean ignore_reply) { NotifyNotificationPrivate *priv; GError *tmp_error; @@ -430,7 +422,7 @@ notify_notification_show (NotifyNotification *notification, GError **error) dbus_g_proxy_add_signal (priv->proxy, "NotificationClosed", G_TYPE_UINT, NULL); dbus_g_proxy_connect_signal (priv->proxy, "NotificationClosed", - _close_signal_handler, + (GCallback) _close_signal_handler, notification, NULL); dbus_g_connection_unref (bus); @@ -440,7 +432,8 @@ notify_notification_show (NotifyNotification *notification, GError **error) _notify_notification_update_applet_hints (notification); /*TODO: make this nonblocking */ - dbus_g_proxy_call (priv->proxy, "Notify", &tmp_error, + if (!ignore_reply) + dbus_g_proxy_call (priv->proxy, "Notify", &tmp_error, G_TYPE_STRING, _notify_get_app_name (), G_TYPE_STRING, (priv->icon_name != NULL) ? priv->icon_name : "", @@ -452,6 +445,19 @@ notify_notification_show (NotifyNotification *notification, GError **error) G_TYPE_VALUE), priv->hints, G_TYPE_INT, priv->timeout, G_TYPE_INVALID, G_TYPE_UINT, &priv->id, G_TYPE_INVALID); + else + dbus_g_proxy_call_no_reply (priv->proxy, "Notify", + G_TYPE_STRING, _notify_get_app_name (), + G_TYPE_STRING, + (priv->icon_name != NULL) ? priv->icon_name : "", + G_TYPE_UINT, priv->id, G_TYPE_STRING, priv->summary, + G_TYPE_STRING, priv->message, + dbus_g_type_get_collection ("GSList", G_TYPE_STRING), + priv->actions, dbus_g_type_get_map ("GHashTable", + G_TYPE_STRING, + G_TYPE_VALUE), + priv->hints, G_TYPE_INT, priv->timeout, G_TYPE_INVALID); + if (tmp_error != NULL) { @@ -462,6 +468,25 @@ notify_notification_show (NotifyNotification *notification, GError **error) return TRUE; } + + +gboolean +notify_notification_show (NotifyNotification *notification, GError **error) +{ + return _notify_notification_show_internal (notification, error, FALSE); +} + +gboolean +notify_notification_show_and_forget (NotifyNotification *notification, GError **error) +{ + gboolean result; + + result = _notify_notification_show_internal (notification, error, TRUE); + g_object_unref (G_OBJECT (notification)); + + return result; +} + void notify_notification_set_timeout (NotifyNotification * notification, gint timeout) From 0e3f35c15e77f8e9c0787c44e7eea44a039a4d03 Mon Sep 17 00:00:00 2001 From: "John (J5) Palmieri" Date: Fri, 2 Dec 2005 22:46:52 +0000 Subject: [PATCH 06/17] * libnotify/notifynotification.c (notify_notification_add_action): implement adding actions (_action_signal_handler): handle actions coming from the server (notify_notifcation_clear_actions): new method for clearning out the actions list and hash --- ChangeLog | 8 ++++ libnotify/notifynotification.c | 79 ++++++++++++++++++++++++++++++++-- libnotify/notifynotification.h | 10 +++-- 3 files changed, 91 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 04d1b8c..90d4050 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Fri Dec 02 2005 John (J5) Palmieri + + * libnotify/notifynotification.c (notify_notification_add_action): + implement adding actions + (_action_signal_handler): handle actions coming from the server + (notify_notifcation_clear_actions): new method for clearning out + the actions list and hash + Fri Dec 02 2005 John (J5) Palmieri * libnotify/notifynotification.c (notify_notification_show_and_forget): diff --git a/libnotify/notifynotification.c b/libnotify/notifynotification.c index 050e79c..c31d07d 100644 --- a/libnotify/notifynotification.c +++ b/libnotify/notifynotification.c @@ -29,6 +29,11 @@ static void _close_signal_handler (DBusGProxy *proxy, guint32 id, NotifyNotification *notification); +static void _action_signal_handler (DBusGProxy *proxy, + guint32 id, + gchar *action, + NotifyNotification *notification); + struct NotifyNotificationPrivate { guint32 id; @@ -46,6 +51,7 @@ struct NotifyNotificationPrivate gint timeout; GSList *actions; + GHashTable *action_map; GHashTable *hints; GtkWidget *attached_widget; @@ -145,6 +151,12 @@ notify_notification_init (NotifyNotification * obj) g_free, (GDestroyNotify) _g_value_free); + + obj->priv->action_map = g_hash_table_new_full (g_str_hash, + g_str_equal, + g_free, + NULL); + obj->priv->attached_widget = NULL; obj->priv->user_data = NULL; obj->priv->user_data_free_func = NULL; @@ -170,12 +182,16 @@ notify_notification_finalize (GObject * object) g_free (priv->message); g_free (priv->icon_name); + if (priv->actions != NULL) { g_slist_foreach (priv->actions, (GFunc) g_free, NULL); g_slist_free (priv->actions); } + if (priv->action_map != NULL) + g_hash_table_destroy (priv->action_map); + if (priv->hints != NULL) g_hash_table_destroy (priv->hints); @@ -189,6 +205,10 @@ notify_notification_finalize (GObject * object) (GCallback) _close_signal_handler, object); + dbus_g_proxy_disconnect_signal (priv->proxy, "ActionInvoked", + (GCallback) _action_signal_handler, + object); + g_free (obj->priv); G_OBJECT_CLASS (parent_class)->finalize (object); } @@ -389,6 +409,32 @@ _close_signal_handler (DBusGProxy *proxy, 0); } +static void +_action_signal_handler (DBusGProxy *proxy, + guint32 id, + gchar *action, + NotifyNotification *notification) +{ + g_assert (NOTIFY_IS_NOTIFICATION (notification)); + + printf ("Got the ActionInvoked signal for action %s (id = %i, notification->id = %i)\n", + action, id, notification->priv->id); + + if (id == notification->priv->id) + { + NotifyActionCallback callback; + + callback = (NotifyActionCallback) g_hash_table_lookup (notification->priv->action_map, + action); + + if (callback == NULL) + g_warning ("Recieved unknown action %s", action); + else + callback (notification, action); + + } +} + static gboolean _notify_notification_show_internal (NotifyNotification *notification, GError **error, @@ -425,6 +471,13 @@ _notify_notification_show_internal (NotifyNotification *notification, (GCallback) _close_signal_handler, notification, NULL); + dbus_g_proxy_add_signal (priv->proxy, "ActionInvoked", + G_TYPE_UINT, G_TYPE_STRING, NULL); + dbus_g_proxy_connect_signal (priv->proxy, "ActionInvoked", + (GCallback) _action_signal_handler, + notification, NULL); + + dbus_g_connection_unref (bus); } @@ -769,15 +822,35 @@ notify_notification_clear_hints (NotifyNotification *notification) (GHRFunc) _remove_all, NULL); } +void +notify_notification_clear_actions (NotifyNotification *notification) +{ + g_hash_table_foreach_remove (notification->priv->action_map, (GHRFunc) _remove_all, NULL); + + if (notification->priv->actions != NULL) + { + g_slist_foreach (notification->priv->actions, (GFunc) g_free, NULL); + g_slist_free (notification->priv->actions); + } + + notification->priv->actions = NULL; +} + gboolean notify_notification_add_action (NotifyNotification *notification, const char *action, const char *label, NotifyActionCallback callback) { - /* TODO: implement actions which will also set up a dbus listener - for those actions - */ + NotifyNotificationPrivate *priv; + + priv = notification->priv; + + priv->actions = g_slist_append (priv->actions, g_strdup (action)); + priv->actions = g_slist_append (priv->actions, g_strdup (label)); + + g_hash_table_insert (priv->action_map, g_strdup (action), callback); + return FALSE; } diff --git a/libnotify/notifynotification.h b/libnotify/notifynotification.h index 4c53e4b..c0da83f 100644 --- a/libnotify/notifynotification.h +++ b/libnotify/notifynotification.h @@ -71,6 +71,9 @@ gboolean notify_notification_set_user_data (NotifyNotification *notification, gboolean notify_notification_show (NotifyNotification *notification, GError **error); +gboolean notify_notification_show_and_forget (NotifyNotification *notification, + GError **error); + void notify_notification_set_timeout (NotifyNotification *notification, gint timeout); @@ -112,9 +115,10 @@ gboolean notify_notification_add_action (NotifyNotification *notification, const char *action, const char *label, NotifyActionCallback callback); - -gboolean notify_notification_hide (NotifyNotification *notification, - GError **error); + +void notify_notification_clear_actions (NotifyNotification *notification); +gboolean notify_notification_close (NotifyNotification *notification, + GError **error); NotifyNotification *notify_notification_ref (NotifyNotification *notification); void notify_notification_unref (NotifyNotification *notification); From aaf003b59080b8eb70758a4e86408d622e114a00 Mon Sep 17 00:00:00 2001 From: "John (J5) Palmieri" Date: Fri, 9 Dec 2005 19:35:13 +0000 Subject: [PATCH 07/17] * libnotify/notifymarshal.[c|h]: new files where GLib callback marshalers are added * libnotify/notifynotification.ci (notify_notifiaction_init): Add a marshaller for signals with uint, string parameters (_gslist_to_string_array): new internal method that coverts a GSList to a NULL terminated array of strings (_notify_notification_show_internal): send the actions list as an array of strings, not a GSList which does not work with the bindings * libnotify/Makefile.am: notifymarshal.[c|h] added * tests/test-multi-actions.c: working example of using actions --- libnotify/Makefile.am | 6 ++-- libnotify/Makefile.in | 10 ++++-- libnotify/notifymarshal.c | 56 +++++++++++++++++++++++++++++++++ libnotify/notifymarshal.h | 36 +++++++++++++++++++++ libnotify/notifynotification.c | 57 ++++++++++++++++++++++++++++------ 5 files changed, 151 insertions(+), 14 deletions(-) create mode 100644 libnotify/notifymarshal.c create mode 100644 libnotify/notifymarshal.h diff --git a/libnotify/Makefile.am b/libnotify/Makefile.am index 0748d1d..70154c3 100644 --- a/libnotify/Makefile.am +++ b/libnotify/Makefile.am @@ -5,12 +5,14 @@ lib_LTLIBRARIES = libnotify.la notifyinc_HEADERS = \ notify.h \ notifynotification.h \ - notifycommon.h + notifycommon.h \ + notifymarshal.h libnotify_la_SOURCES = \ dbus-compat.h \ notify.c \ - notifynotification.c + notifynotification.c \ + notifymarshal.c libnotify_la_LIBADD = \ $(PACKAGE_LIBS) diff --git a/libnotify/Makefile.in b/libnotify/Makefile.in index 3b4c7eb..cfd2584 100644 --- a/libnotify/Makefile.in +++ b/libnotify/Makefile.in @@ -58,7 +58,8 @@ libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) am__DEPENDENCIES_1 = libnotify_la_DEPENDENCIES = $(am__DEPENDENCIES_1) -am_libnotify_la_OBJECTS = notify.lo notifynotification.lo +am_libnotify_la_OBJECTS = notify.lo notifynotification.lo \ + notifymarshal.lo libnotify_la_OBJECTS = $(am_libnotify_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp @@ -191,12 +192,14 @@ lib_LTLIBRARIES = libnotify.la notifyinc_HEADERS = \ notify.h \ notifynotification.h \ - notifycommon.h + notifycommon.h \ + notifymarshal.h libnotify_la_SOURCES = \ dbus-compat.h \ notify.c \ - notifynotification.c + notifynotification.c \ + notifymarshal.c libnotify_la_LIBADD = \ $(PACKAGE_LIBS) @@ -277,6 +280,7 @@ distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/notify.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/notifymarshal.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/notifynotification.Plo@am__quote@ .c.o: diff --git a/libnotify/notifymarshal.c b/libnotify/notifymarshal.c new file mode 100644 index 0000000..40fa0b6 --- /dev/null +++ b/libnotify/notifymarshal.c @@ -0,0 +1,56 @@ +/* + * This program 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 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with main.c; if not, write to: + * The Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#include "notifymarshal.h" + +void +_notify_marshal_VOID__UINT_STRING (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data) +{ + typedef void (*GMarshalFunc_VOID__UINT_STRING) (gpointer data1, + gpointer arg_1, + gpointer arg_2, + gpointer data2); + register GMarshalFunc_VOID__UINT_STRING callback; + register GCClosure *cc = (GCClosure*) closure; + register gpointer data1, data2; + + g_return_if_fail (n_param_values == 3); + + if (G_CCLOSURE_SWAP_DATA (closure)) + { + data1 = closure->data; + data2 = g_value_peek_pointer (param_values + 0); + } + else + { + data1 = g_value_peek_pointer (param_values + 0); + data2 = closure->data; + } + callback = (GMarshalFunc_VOID__UINT_STRING) (marshal_data ? marshal_data : cc->callback); + + callback (data1, + g_value_get_uint (param_values + 1), + g_value_get_string (param_values + 2), + data2); +} + diff --git a/libnotify/notifymarshal.h b/libnotify/notifymarshal.h new file mode 100644 index 0000000..8f441f0 --- /dev/null +++ b/libnotify/notifymarshal.h @@ -0,0 +1,36 @@ +/* + * This program 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 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with main.c; if not, write to: + * The Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef __notify_marshal_MARSHAL_H__ +#define __notify_marshal_MARSHAL_H__ + +#include + +G_BEGIN_DECLS + +void +_notify_marshal_VOID__UINT_STRING (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); + + +G_END_DECLS +#endif diff --git a/libnotify/notifynotification.c b/libnotify/notifynotification.c index c31d07d..71fe584 100644 --- a/libnotify/notifynotification.c +++ b/libnotify/notifynotification.c @@ -21,6 +21,7 @@ #include "notify.h" #include "notifynotification.h" +#include "notifymarshal.h" static void notify_notification_class_init (NotifyNotificationClass * klass); static void notify_notification_init (NotifyNotification * sp); @@ -124,6 +125,13 @@ notify_notification_class_init (NotifyNotificationClass * klass) g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); + + dbus_g_object_register_marshaller (_notify_marshal_VOID__UINT_STRING, + G_TYPE_NONE, + G_TYPE_UINT, + G_TYPE_STRING, + G_TYPE_INVALID); + } static void @@ -167,6 +175,7 @@ notify_notification_init (NotifyNotification * obj) obj->priv->widget_old_y = 0; obj->priv->proxy = NULL; + } static void @@ -417,9 +426,6 @@ _action_signal_handler (DBusGProxy *proxy, { g_assert (NOTIFY_IS_NOTIFICATION (notification)); - printf ("Got the ActionInvoked signal for action %s (id = %i, notification->id = %i)\n", - action, id, notification->priv->id); - if (id == notification->priv->id) { NotifyActionCallback callback; @@ -435,6 +441,31 @@ _action_signal_handler (DBusGProxy *proxy, } } +static gchar ** +_gslist_to_string_array (GSList *list) +{ + GSList *element; + GArray *a; + gsize len; + gchar **result; + + len = g_slist_length (list); + + a = g_array_sized_new (TRUE, FALSE, sizeof (gchar *), len); + + element = list; + while (element != NULL) + { + g_array_append_val (a, element->data); + + element = g_slist_next (element); + } + + result = (gchar **)g_array_free (a, FALSE); + + return result; +} + static gboolean _notify_notification_show_internal (NotifyNotification *notification, GError **error, @@ -442,6 +473,8 @@ _notify_notification_show_internal (NotifyNotification *notification, { NotifyNotificationPrivate *priv; GError *tmp_error; + gchar **action_array; + int i; g_return_val_if_fail (error == NULL || *error == NULL, FALSE); @@ -466,13 +499,13 @@ _notify_notification_show_internal (NotifyNotification *notification, NOTIFY_DBUS_CORE_INTERFACE); dbus_g_proxy_add_signal (priv->proxy, "NotificationClosed", - G_TYPE_UINT, NULL); + G_TYPE_UINT, G_TYPE_INVALID); dbus_g_proxy_connect_signal (priv->proxy, "NotificationClosed", (GCallback) _close_signal_handler, notification, NULL); dbus_g_proxy_add_signal (priv->proxy, "ActionInvoked", - G_TYPE_UINT, G_TYPE_STRING, NULL); + G_TYPE_UINT, G_TYPE_STRING, G_TYPE_INVALID); dbus_g_proxy_connect_signal (priv->proxy, "ActionInvoked", (GCallback) _action_signal_handler, notification, NULL); @@ -484,6 +517,8 @@ _notify_notification_show_internal (NotifyNotification *notification, /*if attached to a widget modify x and y in hints */ _notify_notification_update_applet_hints (notification); + action_array = _gslist_to_string_array (priv->actions); + /*TODO: make this nonblocking */ if (!ignore_reply) dbus_g_proxy_call (priv->proxy, "Notify", &tmp_error, @@ -492,8 +527,8 @@ _notify_notification_show_internal (NotifyNotification *notification, (priv->icon_name != NULL) ? priv->icon_name : "", G_TYPE_UINT, priv->id, G_TYPE_STRING, priv->summary, G_TYPE_STRING, priv->message, - dbus_g_type_get_collection ("GSList", G_TYPE_STRING), - priv->actions, dbus_g_type_get_map ("GHashTable", + G_TYPE_STRV, + action_array, dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_VALUE), priv->hints, G_TYPE_INT, priv->timeout, G_TYPE_INVALID, @@ -505,12 +540,16 @@ _notify_notification_show_internal (NotifyNotification *notification, (priv->icon_name != NULL) ? priv->icon_name : "", G_TYPE_UINT, priv->id, G_TYPE_STRING, priv->summary, G_TYPE_STRING, priv->message, - dbus_g_type_get_collection ("GSList", G_TYPE_STRING), - priv->actions, dbus_g_type_get_map ("GHashTable", + G_TYPE_STRV, + action_array, dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_VALUE), priv->hints, G_TYPE_INT, priv->timeout, G_TYPE_INVALID); + + + /*don't free the elements because they are owned by priv->actions */ + g_free (action_array); if (tmp_error != NULL) { From 9c670744bd64d76de33d6f272c411e6a279b3b33 Mon Sep 17 00:00:00 2001 From: "John (J5) Palmieri" Date: Tue, 13 Dec 2005 22:16:51 +0000 Subject: [PATCH 08/17] - must have just checked in the src directory here is the rest --- ChangeLog | 17 +++++++++++++++++ tests/test-basic.c | 4 ++-- tests/test-multi-actions.c | 6 +++--- 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 90d4050..c90910e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,20 @@ +Fri Dec 09 2005 John (J5) Palmieri + + * libnotify/notifymarshal.[c|h]: new files where GLib callback + marshalers are added + + * libnotify/notifynotification.c (notify_notifiaction_init): Add a + marshaller for signals with uint, string parameters + (_gslist_to_string_array): new internal method that coverts + a GSList to a NULL terminated array of strings + (_notify_notification_show_internal): send the actions list as an + array of strings, not a GSList which does not work with the bindings + + * libnotify/Makefile.am: notifymarshal.[c|h] added + + * tests/test-multi-actions.c: working example of using actions + + Fri Dec 02 2005 John (J5) Palmieri * libnotify/notifynotification.c (notify_notification_add_action): diff --git a/tests/test-basic.c b/tests/test-basic.c index cc2b83d..4599b08 100644 --- a/tests/test-basic.c +++ b/tests/test-basic.c @@ -29,11 +29,11 @@ int main() { notify_init("Basics"); n = notify_notification_new ("Summary", - "Content that is very long 8374983278r32j4 rhjjfh dw8f 43jhf 8ds7 ur2389f jdbjkt h8924yf jkdbjkt 892hjfiHER98HEJIF BDSJHF hjdhF JKLH 890YRHEJHFU 89HRJKSHFJ YE8UI HR3UIH89EFHIUEUF9DHFUIBuiew f89hsajiJ FHJKDSKJFH SDJKFH KJASDFJK HKJADSHFK JSAHF89WE HUIIUG JG kjG JKGJGHJg JHG H J HJGJHDG HJKJG hgd hgjhf df h3eui fusidyaiu rh f98ehkrnm e8rv9y 43heh vijdhjkewdkjsjfjk sdhkjf hdkj fadskj hfkjdsh", + "Content that is very long 8374983278r32j4 rhjjfh dw8f 43jhf 8ds7 ur2389f jdbjkt h8924yf jkdbjkt 892hjfiHER98HEJIF BDSJHF hjdhF JKLH 890YRHEJHFU 89HRJKSHdd dddd ddddd dddd ddddd dddd ddddd dddd dddd ddd ddd dddd Fdd d ddddd dddddddd ddddddddhjkewdkjsjfjk sdhkjf hdkj dadasdadsa adsd asd sd saasd fadskfkhsjf hsdkhfkshfjkhsd kjfhsjdkhfj ksdhfkjshkjfsd sadhfjkhaskd jfhsdajkfhkjs dhfkjsdhfkjs adhjkfhasdkj fhdsakjhfjk asdhkjkfhd akfjshjfsk afhjkasdhf jkhsdaj hf kjsdfahkfh sakjhfksdah kfdashkjf ksdahfj shdjdh", NULL, NULL); notify_notification_set_timeout (n, 3000); //3 seconds - if (!notify_notification_show (n, NULL)) { + if (!notify_notification_show_and_forget (n, NULL)) { fprintf(stderr, "failed to send notification\n"); return 1; } diff --git a/tests/test-multi-actions.c b/tests/test-multi-actions.c index 95519bc..5a4ed7b 100644 --- a/tests/test-multi-actions.c +++ b/tests/test-multi-actions.c @@ -35,7 +35,7 @@ GMainLoop *loop; -static void help_callback(NotifyNotification *n, const char *action, void *user_data) +static void help_callback(NotifyNotification *n, const char *action) { assert( action != NULL ); assert( strcmp (action, "help") == 0 ); @@ -47,7 +47,7 @@ static void help_callback(NotifyNotification *n, const char *action, void *user_ g_main_loop_quit(loop); } -static void ignore_callback(NotifyNotification *n, const char *action, void *user_data) +static void ignore_callback(NotifyNotification *n, const char *action) { assert( action != NULL ); assert( strcmp (action, "ignore") == 0 ); @@ -60,7 +60,7 @@ static void ignore_callback(NotifyNotification *n, const char *action, void *use } -static void empty_callback(NotifyNotification *n, const char *action, void *user_data) +static void empty_callback(NotifyNotification *n, const char *action) { assert( action != NULL ); assert( strcmp (action, "empty") == 0 ); From 5cd10607b1769ab57e9cbb17aed5ca4646cdd341 Mon Sep 17 00:00:00 2001 From: "John (J5) Palmieri" Date: Tue, 13 Dec 2005 22:42:48 +0000 Subject: [PATCH 09/17] * Release 0.3.0 * tests/Makefile.am, tools/Makefile.am: patch from Rodney Dawes fixing make distcheck * tools/notify-send.c: use show_and_forget --- ChangeLog | 9 +++++++++ tests/Makefile.am | 4 +++- tools/Makefile.am | 3 ++- tools/notify-send.c | 3 +-- 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index c90910e..a54be41 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +Tue Dec 13 2005 John (J5) Palmieri + + * Release 0.3.0 + + * tests/Makefile.am, tools/Makefile.am: patch from Rodney + Dawes fixing make distcheck + + * tools/notify-send.c: use show_and_forget + Fri Dec 09 2005 John (J5) Palmieri * libnotify/notifymarshal.[c|h]: new files where GLib callback diff --git a/tests/Makefile.am b/tests/Makefile.am index dba6243..9f4195a 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -47,4 +47,6 @@ test_xy_LDADD = $(common_ldflags) test_xy_stress_LDADD = $(common_ldflags) -INCLUDES = $(PACKAGE_CFLAGS) $(GDK_CFLAGS) +INCLUDES = $(PACKAGE_CFLAGS) \ + $(GDK_CFLAGS) \ + -I$(top_srcdir) diff --git a/tools/Makefile.am b/tools/Makefile.am index 7cba1c9..8edb788 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -8,4 +8,5 @@ common_ldflags = \ notify_send_SOURCES = notify-send.c notify_send_LDADD = $(common_ldflags) -INCLUDES = $(PACKAGE_CFLAGS) +INCLUDES = $(PACKAGE_CFLAGS) \ + -I$(top_srcdir) diff --git a/tools/notify-send.c b/tools/notify-send.c index 7771fb5..d40e4cf 100644 --- a/tools/notify-send.c +++ b/tools/notify-send.c @@ -43,7 +43,6 @@ main(int argc, const char **argv) poptContext opt_ctx; const char **args; NotifyNotification *notify; - GError *error = NULL; g_type_init (); @@ -135,7 +134,7 @@ main(int argc, const char **argv) notify_notification_set_urgency (notify, urgency); notify_notification_set_timeout (notify, expire_timeout); - notify_notification_show (notify, error); + notify_notification_show_and_forget (notify, NULL); poptFreeContext(opt_ctx); notify_uninit(); From 83f6529c18617061a48169fa0799b7703013f563 Mon Sep 17 00:00:00 2001 From: "John (J5) Palmieri" Date: Wed, 14 Dec 2005 23:10:41 +0000 Subject: [PATCH 10/17] - Add content to teh NEWS file --- NEWS | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/NEWS b/NEWS index e69de29..1ce32fb 100644 --- a/NEWS +++ b/NEWS @@ -0,0 +1,4 @@ +libnotify 0.3.0 +=== + +* First release of the new GObject based API and simpler wire protocol From fb513c854db07505f9f198560d7a18e9ed6db18f Mon Sep 17 00:00:00 2001 From: Christian Hammond Date: Mon, 9 Jan 2006 18:16:48 +0000 Subject: [PATCH 11/17] Clean up lots of warnings. --- ChangeLog | 14 +++++ libnotify/Makefile.in | 4 +- libnotify/notify.c | 2 + libnotify/notifynotification.c | 2 - tests/test-default-action.c | 5 +- tests/test-image.c | 70 +++++++++++++------------ tests/test-multi-actions.c | 67 ++++++++++++++---------- tests/test-replace-widget.c | 96 +++++++++++++++++----------------- tests/test-xy-stress.c | 56 ++++++++++---------- 9 files changed, 175 insertions(+), 141 deletions(-) diff --git a/ChangeLog b/ChangeLog index a54be41..855cef6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +Mon Jan 09 10:15:57 PST 2006 Christian Hammond + + * libnotify/Makefile.in: + * libnotify/notify.c: + * libnotify/notifynotification.c: + * tests/test-default-action.c: + * tests/test-image.c: + * tests/test-multi-actions.c: + * tests/test-replace-widget.c: + * tests/test-xy-stress.c: + - Clean up lots of warnings. + +========================= 0.3.0 ========================= + Tue Dec 13 2005 John (J5) Palmieri * Release 0.3.0 diff --git a/libnotify/Makefile.in b/libnotify/Makefile.in index cfd2584..518eb47 100644 --- a/libnotify/Makefile.in +++ b/libnotify/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. +# Makefile.in generated by automake 1.9.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -15,6 +15,8 @@ @SET_MAKE@ +SOURCES = $(libnotify_la_SOURCES) + srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ diff --git a/libnotify/notify.c b/libnotify/notify.c index e99723b..5efc785 100644 --- a/libnotify/notify.c +++ b/libnotify/notify.c @@ -46,6 +46,7 @@ static gchar *_app_name = NULL; # define format_func #endif +#if 0 static void format_func print_error (char *message, ...) { @@ -59,6 +60,7 @@ print_error (char *message, ...) fprintf (stderr, "%s(%d): libnotify: %s", (getenv ("_") ? getenv ("_") : ""), getpid (), buf); } +#endif gboolean notify_init (const char *app_name) diff --git a/libnotify/notifynotification.c b/libnotify/notifynotification.c index 71fe584..ad6f773 100644 --- a/libnotify/notifynotification.c +++ b/libnotify/notifynotification.c @@ -474,11 +474,9 @@ _notify_notification_show_internal (NotifyNotification *notification, NotifyNotificationPrivate *priv; GError *tmp_error; gchar **action_array; - int i; g_return_val_if_fail (error == NULL || *error == NULL, FALSE); - priv = notification->priv; tmp_error = NULL; diff --git a/tests/test-default-action.c b/tests/test-default-action.c index e906991..41511bc 100644 --- a/tests/test-default-action.c +++ b/tests/test-default-action.c @@ -26,7 +26,7 @@ #include #include -#define DBUS_API_SUBJECT_TO_CHANGE 1 +#define DBUS_API_SUBJECT_TO_CHANGE #include #include @@ -59,7 +59,8 @@ main() n = notify_notification_new ("Matt is online", "", NULL, NULL); notify_notification_set_timeout (n, NOTIFY_TIMEOUT_NEVER); - notify_notification_add_action (n, "default", "Do Default Action", callback); + notify_notification_add_action (n, "default", "Do Default Action", + (NotifyActionCallback)callback); notify_notification_set_category (n, "presence.online"); if (!notify_notification_show (n, NULL)) { diff --git a/tests/test-image.c b/tests/test-image.c index a026d19..e7b845e 100644 --- a/tests/test-image.c +++ b/tests/test-image.c @@ -1,12 +1,12 @@ /* * @file tests/test-image.c Unit test: images * - * @Copyright (C) 2004 Mike Hearn + * @Copyright(C) 2004 Mike Hearn * * 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. + * 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 @@ -31,7 +31,7 @@ #include #include -#define DBUS_API_SUBJECT_TO_CHANGE 1 +#define DBUS_API_SUBJECT_TO_CHANGE #include #include @@ -42,72 +42,78 @@ GMainLoop *loop; NotifyNotification *n; -int main(int argc, char *argv[]) { +int +main(int argc, char *argv[]) +{ char file[PATH_MAX]; int size; - char *uri; + char *uri; GdkPixbuf *icon; - gchar *buf; - gsize buf_size; GtkWidget *helper; - gtk_init (&argc, &argv); + gtk_init(&argc, &argv); - if (!notify_init("Images Test")) exit(1); + if (!notify_init("Images Test")) + exit(1); - n = notify_notification_new ("Icon Test", "Testing stock icon", "stock_help", NULL); + n = notify_notification_new("Icon Test", "Testing stock icon", + "stock_help", NULL); - notify_notification_set_hint_int32 (n, "x", 300); - notify_notification_set_hint_int32 (n, "y", 24); + notify_notification_set_hint_int32(n, "x", 300); + notify_notification_set_hint_int32(n, "y", 24); + notify_notification_set_timeout(n, NOTIFY_TIMEOUT_NEVER); - notify_notification_set_timeout (n, NOTIFY_TIMEOUT_NEVER); - if (!notify_notification_show (n, NULL)) { + if (!notify_notification_show(n, NULL)) + { fprintf(stderr, "failed to send notification\n"); return 1; } - g_usleep (5000000); //5 seconds + g_usleep(5000000); // 5 seconds size = readlink("/proc/self/cwd", file, PATH_MAX - 1); file[size] = '\0'; - uri = g_strdup_printf ("file://%s/%s", file, "applet-critical.png"); + uri = g_strdup_printf("file://%s/%s", file, "applet-critical.png"); printf("sending %s\n", uri); - notify_notification_update (n, "Alert!", "Testing URI icons", uri); + notify_notification_update(n, "Alert!", "Testing URI icons", uri); - if (!notify_notification_show (n, NULL)) { + if (!notify_notification_show(n, NULL)) + { fprintf(stderr, "failed to send notification\n"); return 1; } - g_usleep (5000000); //5 seconds + g_usleep(5000000); // 5 seconds - notify_notification_update (n, "Raw image test", "Testing sending raw pixbufs", NULL); + notify_notification_update(n, "Raw image test", + "Testing sending raw pixbufs", NULL); - /* This is just a hack to get a stock icon's pixbuf - in a realworld app if you were sending bitmapped data - you would know the file location and open it up with - a method that could generate a bmp for you*/ + /* + * This is just a hack to get a stock icon's pixbuf in a realworld app + * if you were sending bitmapped data you would know the file location + * and open it up with a method that could generate a bmp for you + */ helper = gtk_button_new(); - icon = gtk_widget_render_icon (helper, + icon = gtk_widget_render_icon(helper, GTK_STOCK_DIALOG_QUESTION, GTK_ICON_SIZE_DIALOG, ""); + notify_notification_set_icon_data_from_pixbuf(n, icon); - notify_notification_set_icon_data_from_pixbuf (n, - icon); - - if (!notify_notification_show (n, NULL)) { + if (!notify_notification_show(n, NULL)) + { fprintf(stderr, "failed to send notification\n"); return 1; } - gtk_widget_destroy (helper); - g_object_unref ((GObject *)icon); + gtk_widget_destroy(helper); + g_object_unref(G_OBJECT(icon)); + + g_usleep(5000000); // 5 seconds - g_usleep (5000000); //5 seconds return 0; } diff --git a/tests/test-multi-actions.c b/tests/test-multi-actions.c index 5a4ed7b..c5da12f 100644 --- a/tests/test-multi-actions.c +++ b/tests/test-multi-actions.c @@ -1,12 +1,12 @@ /* * @file tests/test-multi-actions.c Unit test: multiple actions * - * @Copyright (C) 2004 Mike Hearn + * @Copyright(C) 2004 Mike Hearn * * 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. + * 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 @@ -23,22 +23,22 @@ #include #include #include -#include #include -#define DBUS_API_SUBJECT_TO_CHANGE 1 +#define DBUS_API_SUBJECT_TO_CHANGE #include #include #include #include -GMainLoop *loop; +static GMainLoop *loop; -static void help_callback(NotifyNotification *n, const char *action) +static void +help_callback(NotifyNotification *n, const char *action) { - assert( action != NULL ); - assert( strcmp (action, "help") == 0 ); + g_assert(action != NULL); + g_assert(strcmp(action, "help") == 0); printf("You clicked Help\n"); @@ -47,10 +47,11 @@ static void help_callback(NotifyNotification *n, const char *action) g_main_loop_quit(loop); } -static void ignore_callback(NotifyNotification *n, const char *action) +static void +ignore_callback(NotifyNotification *n, const char *action) { - assert( action != NULL ); - assert( strcmp (action, "ignore") == 0 ); + g_assert(action != NULL); + g_assert(strcmp(action, "ignore") == 0); printf("You clicked Ignore\n"); @@ -59,11 +60,11 @@ static void ignore_callback(NotifyNotification *n, const char *action) g_main_loop_quit(loop); } - -static void empty_callback(NotifyNotification *n, const char *action) +static void +empty_callback(NotifyNotification *n, const char *action) { - assert( action != NULL ); - assert( strcmp (action, "empty") == 0 ); + g_assert(action != NULL); + g_assert(strcmp(action, "empty") == 0); printf("You clicked Empty Trash\n"); @@ -73,27 +74,35 @@ static void empty_callback(NotifyNotification *n, const char *action) } -int main() { - NotifyNotification *n; +int +main(int argc, char **argv) +{ + NotifyNotification *n; + DBusConnection *conn; - if (!notify_init("Multi Action Test")) exit(1); + if (!notify_init("Multi Action Test")) + exit(1); - DBusConnection *conn = dbus_bus_get(DBUS_BUS_SESSION, NULL); + conn = dbus_bus_get(DBUS_BUS_SESSION, NULL); loop = g_main_loop_new(NULL, FALSE); dbus_connection_setup_with_g_main(conn, NULL); - n = notify_notification_new ("Low disk space", - "You can free up some disk space by " - "emptying the trash can.", - NULL, NULL); - notify_notification_set_timeout (n, NOTIFY_TIMEOUT_NEVER); - notify_notification_add_action (n, "help", "Help", help_callback); - notify_notification_add_action (n, "ignore", "Ignore", ignore_callback); - notify_notification_add_action (n, "empty", "Empty Trash", empty_callback); - notify_notification_set_category (n, "device"); + n = notify_notification_new("Low disk space", + "You can free up some disk space by " + "emptying the trash can.", + NULL, NULL); + notify_notification_set_timeout(n, NOTIFY_TIMEOUT_NEVER); + notify_notification_add_action(n, "help", "Help", + (NotifyActionCallback)help_callback); + notify_notification_add_action(n, "ignore", "Ignore", + (NotifyActionCallback)ignore_callback); + notify_notification_add_action(n, "empty", "Empty Trash", + (NotifyActionCallback)empty_callback); + notify_notification_set_category(n, "device"); - if (!notify_notification_show (n, NULL)) { + if (!notify_notification_show(n, NULL)) + { fprintf(stderr, "failed to send notification\n"); return 1; } diff --git a/tests/test-replace-widget.c b/tests/test-replace-widget.c index bfb2083..f041afe 100644 --- a/tests/test-replace-widget.c +++ b/tests/test-replace-widget.c @@ -4,59 +4,61 @@ #include #include - static int count = 0; -void on_exposed (GtkWidget *widget, GdkEventExpose *ev, void *user_data) { - NotifyNotification *n = NOTIFY_NOTIFICATION (user_data); +static void +on_exposed(GtkWidget *widget, GdkEventExpose *ev, void *user_data) +{ + NotifyNotification *n = NOTIFY_NOTIFICATION(user_data); - g_signal_handlers_disconnect_by_func(widget, on_exposed, user_data); + g_signal_handlers_disconnect_by_func(widget, on_exposed, user_data); - notify_notification_show (n, NULL); -} - -void on_clicked (GtkButton *button, void *user_data) { - GError *error; - gchar *buf; - NotifyNotification *n = NOTIFY_NOTIFICATION (user_data); - - count++; - buf = g_strdup_printf ("You clicked the button %i times", count); - - notify_notification_update (n, "Widget Attachment Test", - buf, NULL); - - notify_notification_show (n, NULL); - g_free (buf); + notify_notification_show(n, NULL); } -int main(int argc, char *argv[]) { - NotifyNotification *n; - GtkWidget *window; - GtkWidget *button; +static void +on_clicked(GtkButton *button, void *user_data) +{ + gchar *buf; + NotifyNotification *n = NOTIFY_NOTIFICATION(user_data); - GError *error; - error = NULL; + count++; + buf = g_strdup_printf("You clicked the button %i times", count); + notify_notification_update(n, "Widget Attachment Test", buf, NULL); + g_free(buf); - gtk_init (&argc, &argv); - notify_init("Replace Test"); - - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); - button = gtk_button_new_with_label ("click here to change notification"); - gtk_container_add (GTK_CONTAINER(window), button); - - gtk_widget_show_all (window); - - - n = notify_notification_new ("Widget Attachment Test", "Button has not been clicked yet", - NULL, //no icon - button); //attach to button - - - notify_notification_set_timeout (n, 0); //don't timeout - - g_signal_connect (button, "clicked", (GCallback *)on_clicked, n); - g_signal_connect_after (button, "expose-event", (GCallback *)on_exposed, n); - - gtk_main(); + notify_notification_show(n, NULL); +} + +int +main(int argc, char *argv[]) +{ + NotifyNotification *n; + GtkWidget *window; + GtkWidget *button; + + gtk_init(&argc, &argv); + notify_init("Replace Test"); + + window = gtk_window_new(GTK_WINDOW_TOPLEVEL); + button = gtk_button_new_with_label("click here to change notification"); + gtk_container_add(GTK_CONTAINER(window), button); + + gtk_widget_show_all(window); + + n = notify_notification_new("Widget Attachment Test", + "Button has not been clicked yet", + NULL, //no icon + button); //attach to button + + notify_notification_set_timeout(n, 0); //don't timeout + + g_signal_connect(G_OBJECT(button), "clicked", + G_CALLBACK(on_clicked), n); + g_signal_connect_after(G_OBJECT(button), "expose-event", + G_CALLBACK(on_exposed), n); + + gtk_main(); + + return 0; } diff --git a/tests/test-xy-stress.c b/tests/test-xy-stress.c index 66dbc1b..333e908 100644 --- a/tests/test-xy-stress.c +++ b/tests/test-xy-stress.c @@ -1,12 +1,12 @@ /* * @file tests/test-xy.c Unit test: X, Y hints * - * @Copyright (C) 2005 Christian Hammond + * @Copyright(C) 2005 Christian Hammond * * 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. + * 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 @@ -26,40 +26,39 @@ #include #include +#include static void -_handle_closed (GObject *o) +_handle_closed(GObject *obj) { - g_message ("closing"); - g_object_unref (o); + g_message("closing"); + g_object_unref(obj); } static void emit_notification(int x, int y) { - static char buffer[BUFSIZ]; + char *buffer; NotifyNotification *n; - g_snprintf(buffer, sizeof(buffer), - "This notification should point to %d, %d.", x, y); + buffer = g_strdup_printf("This notification should point to %d, %d.", + x, y); - n = notify_notification_new ("X, Y Test", - buffer, - NULL, NULL); + n = notify_notification_new("X, Y Test", buffer, NULL, NULL); + g_free(buffer); - notify_notification_set_hint_int32 (n, "x", x); - notify_notification_set_hint_int32 (n, "y", y); + notify_notification_set_hint_int32(n, "x", x); + notify_notification_set_hint_int32(n, "y", y); - g_signal_connect (n, "closed", _handle_closed, NULL); + g_signal_connect(G_OBJECT(n), "closed", + G_CALLBACK(_handle_closed), NULL); - if (!notify_notification_show (n, NULL)) { + if (!notify_notification_show(n, NULL)) fprintf(stderr, "failed to send notification\n"); - return 1; - } } static gboolean -_popup_random_bubble (void) +_popup_random_bubble(gpointer unused) { GdkDisplay *display; GdkScreen *screen; @@ -72,8 +71,8 @@ _popup_random_bubble (void) screen_x2 = gdk_screen_get_width(screen) - 1; screen_y2 = gdk_screen_get_height(screen) - 1; - x = g_random_int_range (0, screen_x2); - y = g_random_int_range (0, screen_y2); + x = g_random_int_range(0, screen_x2); + y = g_random_int_range(0, screen_y2); emit_notification(x, y); return TRUE; @@ -82,19 +81,20 @@ _popup_random_bubble (void) int main(int argc, char **argv) { - GMainLoop *loop; - DBusConnection *conn; - + GMainLoop *loop; + DBusConnection *conn; + gdk_init(&argc, &argv); notify_init("XY"); - conn = dbus_bus_get (DBUS_BUS_SESSION, NULL); + conn = dbus_bus_get(DBUS_BUS_SESSION, NULL); + dbus_connection_setup_with_g_main(conn, NULL); - dbus_connection_setup_with_g_main (conn, NULL); + g_timeout_add(1000, _popup_random_bubble, NULL); - g_timeout_add (1000, _popup_random_bubble, NULL); + loop = g_main_loop_new(NULL, FALSE); + g_main_loop_run(loop); - loop = g_main_loop_new (NULL, FALSE); - g_main_loop_run (loop); + return 0; } From 1ea5eae50a54db84363d1a52c2777c5bc49089fd Mon Sep 17 00:00:00 2001 From: Christian Hammond Date: Mon, 9 Jan 2006 19:14:10 +0000 Subject: [PATCH 12/17] Generate the marshal files automatically. We shouldn't be doing it by hand. --- ChangeLog | 12 ++++++++ configure.ac | 3 ++ libnotify/Makefile.am | 26 ++++++++++++++-- libnotify/Makefile.in | 37 +++++++++++++++++----- libnotify/notify-marshal.list | 1 + libnotify/notifymarshal.c | 56 ---------------------------------- libnotify/notifymarshal.h | 36 ---------------------- libnotify/notifynotification.c | 4 +-- 8 files changed, 70 insertions(+), 105 deletions(-) create mode 100644 libnotify/notify-marshal.list delete mode 100644 libnotify/notifymarshal.c delete mode 100644 libnotify/notifymarshal.h diff --git a/ChangeLog b/ChangeLog index 855cef6..d5da3d7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +Mon Jan 09 11:13:15 PST 2006 Christian Hammond + + * libnotify/Makefile.am: + * libnotify/Makefile.in: + A libnotify/notify-marshal.list: + D libnotify/notifymarshal.c: + D libnotify/notifymarshal.h: + * libnotify/notifynotification.c: + * configure.ac: + - Generate the marshal files automatically. We shouldn't be doing it + by hand. + Mon Jan 09 10:15:57 PST 2006 Christian Hammond * libnotify/Makefile.in: diff --git a/configure.ac b/configure.ac index 62d2142..c7c385f 100644 --- a/configure.ac +++ b/configure.ac @@ -107,6 +107,9 @@ AM_CONDITIONAL(HAVE_GDK, test "x$have_gdk" = "xyes") AC_SUBST(GDK_CFLAGS) AC_SUBST(GDK_LIBS) +GLIB_GENMARSHAL=`pkg-config --variable=glib_genmarshal glib-2.0` +AC_SUBST(GLIB_GENMARSHAL) + dnl dnl Check the D-BUS version. dnl diff --git a/libnotify/Makefile.am b/libnotify/Makefile.am index 70154c3..6a00b29 100644 --- a/libnotify/Makefile.am +++ b/libnotify/Makefile.am @@ -1,18 +1,23 @@ notifyincdir = $(includedir)/libnotify +MARSHAL_PREFIX = notify_marshal +MARSHAL_FILE = notify-marshal + lib_LTLIBRARIES = libnotify.la notifyinc_HEADERS = \ notify.h \ notifynotification.h \ - notifycommon.h \ - notifymarshal.h + notifycommon.h + +noinst_HEADERS = \ + notify-marshal.h libnotify_la_SOURCES = \ dbus-compat.h \ notify.c \ notifynotification.c \ - notifymarshal.c + notify-marshal.c libnotify_la_LIBADD = \ $(PACKAGE_LIBS) @@ -20,5 +25,20 @@ libnotify_la_LIBADD = \ libnotify_la_LDFLAGS = \ -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) +notify-marshal.h: notify-marshal.list + $(GLIB_GENMARSHAL) --prefix=$(MARSHAL_PREFIX) notify-marshal.list \ + --header > notify-marshal.h + +notify-marshal.c: notify-marshal.list + $(GLIB_GENMARSHAL) --prefix=$(MARSHAL_PREFIX) notify-marshal.list \ + --body > notify-marshal.c + +EXTRA_DIST = \ + notify-marshal.list + +CLEANFILES = \ + notify-marshal.c \ + notify-marshal.h + INCLUDES = \ $(PACKAGE_CFLAGS) diff --git a/libnotify/Makefile.in b/libnotify/Makefile.in index 518eb47..13b568a 100644 --- a/libnotify/Makefile.in +++ b/libnotify/Makefile.in @@ -40,8 +40,8 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = libnotify -DIST_COMMON = $(notifyinc_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in +DIST_COMMON = $(noinst_HEADERS) $(notifyinc_HEADERS) \ + $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -61,7 +61,7 @@ LTLIBRARIES = $(lib_LTLIBRARIES) am__DEPENDENCIES_1 = libnotify_la_DEPENDENCIES = $(am__DEPENDENCIES_1) am_libnotify_la_OBJECTS = notify.lo notifynotification.lo \ - notifymarshal.lo + notify-marshal.lo libnotify_la_OBJECTS = $(am_libnotify_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp @@ -77,7 +77,7 @@ LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ SOURCES = $(libnotify_la_SOURCES) DIST_SOURCES = $(libnotify_la_SOURCES) notifyincHEADERS_INSTALL = $(INSTALL_HEADER) -HEADERS = $(notifyinc_HEADERS) +HEADERS = $(noinst_HEADERS) $(notifyinc_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -112,6 +112,7 @@ F77 = @F77@ FFLAGS = @FFLAGS@ GDK_CFLAGS = @GDK_CFLAGS@ GDK_LIBS = @GDK_LIBS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ HAVE_GDK_FALSE = @HAVE_GDK_FALSE@ HAVE_GDK_TRUE = @HAVE_GDK_TRUE@ INSTALL_DATA = @INSTALL_DATA@ @@ -190,18 +191,22 @@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ notifyincdir = $(includedir)/libnotify +MARSHAL_PREFIX = notify_marshal +MARSHAL_FILE = notify-marshal lib_LTLIBRARIES = libnotify.la notifyinc_HEADERS = \ notify.h \ notifynotification.h \ - notifycommon.h \ - notifymarshal.h + notifycommon.h + +noinst_HEADERS = \ + notify-marshal.h libnotify_la_SOURCES = \ dbus-compat.h \ notify.c \ notifynotification.c \ - notifymarshal.c + notify-marshal.c libnotify_la_LIBADD = \ $(PACKAGE_LIBS) @@ -209,6 +214,13 @@ libnotify_la_LIBADD = \ libnotify_la_LDFLAGS = \ -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) +EXTRA_DIST = \ + notify-marshal.list + +CLEANFILES = \ + notify-marshal.c \ + notify-marshal.h + INCLUDES = \ $(PACKAGE_CFLAGS) @@ -281,8 +293,8 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/notify-marshal.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/notify.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/notifymarshal.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/notifynotification.Plo@am__quote@ .c.o: @@ -432,6 +444,7 @@ install-strip: mostlyclean-generic: clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) @@ -505,6 +518,14 @@ uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES \ uninstall-info-am uninstall-libLTLIBRARIES \ uninstall-notifyincHEADERS + +notify-marshal.h: notify-marshal.list + $(GLIB_GENMARSHAL) --prefix=$(MARSHAL_PREFIX) notify-marshal.list \ + --header > notify-marshal.h + +notify-marshal.c: notify-marshal.list + $(GLIB_GENMARSHAL) --prefix=$(MARSHAL_PREFIX) notify-marshal.list \ + --body > notify-marshal.c # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/libnotify/notify-marshal.list b/libnotify/notify-marshal.list new file mode 100644 index 0000000..5ab45bf --- /dev/null +++ b/libnotify/notify-marshal.list @@ -0,0 +1 @@ +VOID:UINT,STRING diff --git a/libnotify/notifymarshal.c b/libnotify/notifymarshal.c deleted file mode 100644 index 40fa0b6..0000000 --- a/libnotify/notifymarshal.c +++ /dev/null @@ -1,56 +0,0 @@ -/* - * This program 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 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with main.c; if not, write to: - * The Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include "notifymarshal.h" - -void -_notify_marshal_VOID__UINT_STRING (GClosure *closure, - GValue *return_value, - guint n_param_values, - const GValue *param_values, - gpointer invocation_hint, - gpointer marshal_data) -{ - typedef void (*GMarshalFunc_VOID__UINT_STRING) (gpointer data1, - gpointer arg_1, - gpointer arg_2, - gpointer data2); - register GMarshalFunc_VOID__UINT_STRING callback; - register GCClosure *cc = (GCClosure*) closure; - register gpointer data1, data2; - - g_return_if_fail (n_param_values == 3); - - if (G_CCLOSURE_SWAP_DATA (closure)) - { - data1 = closure->data; - data2 = g_value_peek_pointer (param_values + 0); - } - else - { - data1 = g_value_peek_pointer (param_values + 0); - data2 = closure->data; - } - callback = (GMarshalFunc_VOID__UINT_STRING) (marshal_data ? marshal_data : cc->callback); - - callback (data1, - g_value_get_uint (param_values + 1), - g_value_get_string (param_values + 2), - data2); -} - diff --git a/libnotify/notifymarshal.h b/libnotify/notifymarshal.h deleted file mode 100644 index 8f441f0..0000000 --- a/libnotify/notifymarshal.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * This program 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 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with main.c; if not, write to: - * The Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifndef __notify_marshal_MARSHAL_H__ -#define __notify_marshal_MARSHAL_H__ - -#include - -G_BEGIN_DECLS - -void -_notify_marshal_VOID__UINT_STRING (GClosure *closure, - GValue *return_value, - guint n_param_values, - const GValue *param_values, - gpointer invocation_hint, - gpointer marshal_data); - - -G_END_DECLS -#endif diff --git a/libnotify/notifynotification.c b/libnotify/notifynotification.c index ad6f773..08ac75e 100644 --- a/libnotify/notifynotification.c +++ b/libnotify/notifynotification.c @@ -21,7 +21,7 @@ #include "notify.h" #include "notifynotification.h" -#include "notifymarshal.h" +#include "notify-marshal.h" static void notify_notification_class_init (NotifyNotificationClass * klass); static void notify_notification_init (NotifyNotification * sp); @@ -126,7 +126,7 @@ notify_notification_class_init (NotifyNotificationClass * klass) G_TYPE_NONE, 0); - dbus_g_object_register_marshaller (_notify_marshal_VOID__UINT_STRING, + dbus_g_object_register_marshaller (notify_marshal_VOID__UINT_STRING, G_TYPE_NONE, G_TYPE_UINT, G_TYPE_STRING, From 8757fda57676b29bfc2e8029feebe6f3155c611c Mon Sep 17 00:00:00 2001 From: Christian Hammond Date: Wed, 11 Jan 2006 06:47:39 +0000 Subject: [PATCH 13/17] Patch by David Trowbridge to make sure that marshal files actually get built. --- ChangeLog | 5 +++++ libnotify/Makefile.am | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/ChangeLog b/ChangeLog index d5da3d7..1d11900 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Tue Jan 10 16:20:27 MST 2006 David Trowbridge + + * libnotify/Makefile.am: + - Make sure marshal files actually get built + Mon Jan 09 11:13:15 PST 2006 Christian Hammond * libnotify/Makefile.am: diff --git a/libnotify/Makefile.am b/libnotify/Makefile.am index 6a00b29..0f4f2a2 100644 --- a/libnotify/Makefile.am +++ b/libnotify/Makefile.am @@ -25,6 +25,10 @@ libnotify_la_LIBADD = \ libnotify_la_LDFLAGS = \ -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) +BUILT_SOURCES = \ + notify-marshal.c \ + notify-marshal.h + notify-marshal.h: notify-marshal.list $(GLIB_GENMARSHAL) --prefix=$(MARSHAL_PREFIX) notify-marshal.list \ --header > notify-marshal.h From 4ddb4eff82af0a87ea5d6f3a0f1b2c44cdf3b11f Mon Sep 17 00:00:00 2001 From: Christian Hammond Date: Wed, 11 Jan 2006 06:48:15 +0000 Subject: [PATCH 14/17] Makefile.in should never have been in the repository. --- libnotify/Makefile.in | 531 ------------------------------------------ 1 file changed, 531 deletions(-) delete mode 100644 libnotify/Makefile.in diff --git a/libnotify/Makefile.in b/libnotify/Makefile.in deleted file mode 100644 index 13b568a..0000000 --- a/libnotify/Makefile.in +++ /dev/null @@ -1,531 +0,0 @@ -# Makefile.in generated by automake 1.9.5 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - - -SOURCES = $(libnotify_la_SOURCES) - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = .. -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = libnotify -DIST_COMMON = $(noinst_HEADERS) $(notifyinc_HEADERS) \ - $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(notifyincdir)" -libLTLIBRARIES_INSTALL = $(INSTALL) -LTLIBRARIES = $(lib_LTLIBRARIES) -am__DEPENDENCIES_1 = -libnotify_la_DEPENDENCIES = $(am__DEPENDENCIES_1) -am_libnotify_la_OBJECTS = notify.lo notifynotification.lo \ - notify-marshal.lo -libnotify_la_OBJECTS = $(am_libnotify_la_OBJECTS) -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -SOURCES = $(libnotify_la_SOURCES) -DIST_SOURCES = $(libnotify_la_SOURCES) -notifyincHEADERS_INSTALL = $(INSTALL_HEADER) -HEADERS = $(noinst_HEADERS) $(notifyinc_HEADERS) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -ECHO = @ECHO@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ -GDK_CFLAGS = @GDK_CFLAGS@ -GDK_LIBS = @GDK_LIBS@ -GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ -HAVE_GDK_FALSE = @HAVE_GDK_FALSE@ -HAVE_GDK_TRUE = @HAVE_GDK_TRUE@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -LT_AGE = @LT_AGE@ -LT_CURRENT = @LT_CURRENT@ -LT_RELEASE = @LT_RELEASE@ -LT_REVISION = @LT_REVISION@ -MAKEINFO = @MAKEINFO@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ -PACKAGE_LIBS = @PACKAGE_LIBS@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -RANLIB = @RANLIB@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -ac_ct_RANLIB = @ac_ct_RANLIB@ -ac_ct_STRIP = @ac_ct_STRIP@ -ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -datadir = @datadir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -notifyincdir = $(includedir)/libnotify -MARSHAL_PREFIX = notify_marshal -MARSHAL_FILE = notify-marshal -lib_LTLIBRARIES = libnotify.la -notifyinc_HEADERS = \ - notify.h \ - notifynotification.h \ - notifycommon.h - -noinst_HEADERS = \ - notify-marshal.h - -libnotify_la_SOURCES = \ - dbus-compat.h \ - notify.c \ - notifynotification.c \ - notify-marshal.c - -libnotify_la_LIBADD = \ - $(PACKAGE_LIBS) - -libnotify_la_LDFLAGS = \ - -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) - -EXTRA_DIST = \ - notify-marshal.list - -CLEANFILES = \ - notify-marshal.c \ - notify-marshal.h - -INCLUDES = \ - $(PACKAGE_CFLAGS) - -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libnotify/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu libnotify/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-libLTLIBRARIES: $(lib_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - if test -f $$p; then \ - f=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ - else :; fi; \ - done - -uninstall-libLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - p=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ - $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ - done - -clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libnotify.la: $(libnotify_la_OBJECTS) $(libnotify_la_DEPENDENCIES) - $(LINK) -rpath $(libdir) $(libnotify_la_LDFLAGS) $(libnotify_la_OBJECTS) $(libnotify_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/notify-marshal.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/notify.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/notifynotification.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool -uninstall-info-am: -install-notifyincHEADERS: $(notifyinc_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(notifyincdir)" || $(mkdir_p) "$(DESTDIR)$(notifyincdir)" - @list='$(notifyinc_HEADERS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(notifyincHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(notifyincdir)/$$f'"; \ - $(notifyincHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(notifyincdir)/$$f"; \ - done - -uninstall-notifyincHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(notifyinc_HEADERS)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(notifyincdir)/$$f'"; \ - rm -f "$(DESTDIR)$(notifyincdir)/$$f"; \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ - if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) $(HEADERS) -installdirs: - for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(notifyincdir)"; do \ - test -z "$$dir" || $(mkdir_p) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-libtool distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-notifyincHEADERS - -install-exec-am: install-libLTLIBRARIES - -install-info: install-info-am - -install-man: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES \ - uninstall-notifyincHEADERS - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libLTLIBRARIES clean-libtool ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-exec \ - install-exec-am install-info install-info-am \ - install-libLTLIBRARIES install-man install-notifyincHEADERS \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am \ - uninstall-info-am uninstall-libLTLIBRARIES \ - uninstall-notifyincHEADERS - - -notify-marshal.h: notify-marshal.list - $(GLIB_GENMARSHAL) --prefix=$(MARSHAL_PREFIX) notify-marshal.list \ - --header > notify-marshal.h - -notify-marshal.c: notify-marshal.list - $(GLIB_GENMARSHAL) --prefix=$(MARSHAL_PREFIX) notify-marshal.list \ - --body > notify-marshal.c -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: From 9e586d627d309a254dc8605784c744ba2edd6a1d Mon Sep 17 00:00:00 2001 From: Christian Hammond Date: Wed, 11 Jan 2006 06:49:50 +0000 Subject: [PATCH 15/17] Shush, SVN. From 959eeb5bcd4f66a9389cab184ed27e6802c4529b Mon Sep 17 00:00:00 2001 From: Christian Hammond Date: Wed, 11 Jan 2006 06:56:38 +0000 Subject: [PATCH 16/17] Fix some C99 usage. --- ChangeLog | 6 ++++++ tests/test-default-action.c | 3 ++- tools/notify-send.c | 4 ++-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1d11900..c6320e9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Tue Jan 10 22:55:35 PST 2006 Christian Hammond + + * tests/test-default-action.c: + * tools/notify-send.c: + - Fix some C99 usage. + Tue Jan 10 16:20:27 MST 2006 David Trowbridge * libnotify/Makefile.am: diff --git a/tests/test-default-action.c b/tests/test-default-action.c index 41511bc..d452aa0 100644 --- a/tests/test-default-action.c +++ b/tests/test-default-action.c @@ -49,10 +49,11 @@ int main() { NotifyNotification *n; + DBusConnection *conn; if (!notify_init("Default Action Test")) exit(1); - DBusConnection *conn = dbus_bus_get(DBUS_BUS_SESSION, NULL); + conn = dbus_bus_get(DBUS_BUS_SESSION, NULL); loop = g_main_loop_new(NULL, FALSE); dbus_connection_setup_with_g_main(conn, NULL); diff --git a/tools/notify-send.c b/tools/notify-send.c index d40e4cf..2a459ae 100644 --- a/tools/notify-send.c +++ b/tools/notify-send.c @@ -44,8 +44,6 @@ main(int argc, const char **argv) const char **args; NotifyNotification *notify; - g_type_init (); - struct poptOption options[] = { { "urgency", 'u', POPT_ARG_STRING | POPT_ARGFLAG_STRIP, &urgency_str, @@ -66,6 +64,8 @@ main(int argc, const char **argv) POPT_TABLEEND }; + g_type_init (); + opt_ctx = poptGetContext("notify-send", argc, argv, options, 0); poptSetOtherOptionHelp(opt_ctx, "[OPTIONS]* [body]"); From 39f0b92be1846283cd70f18b2f7cd5a038524b79 Mon Sep 17 00:00:00 2001 From: Christian Hammond Date: Wed, 11 Jan 2006 07:33:55 +0000 Subject: [PATCH 17/17] Require D-BUS 0.36+. --- ChangeLog | 5 +++++ configure.ac | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index c6320e9..342b74f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Tue Jan 10 23:33:47 PST 2006 Christian Hammond + + * configure.ac: + - Require D-BUS 0.36+. + Tue Jan 10 22:55:35 PST 2006 Christian Hammond * tests/test-default-action.c: diff --git a/configure.ac b/configure.ac index c7c385f..8759927 100644 --- a/configure.ac +++ b/configure.ac @@ -89,7 +89,8 @@ AM_PROG_LIBTOOL AC_CHECK_LIB([popt], [poptGetArg], , AC_MSG_ERROR([Popt is required])) -pkg_modules="gtk+-2.0 >= 2.2.2 glib-2.0 >= 2.2.2, dbus-1 >= 0.35, dbus-glib-1 >= 0.35" +REQ_DBUS_VERSION=0.36 +pkg_modules="gtk+-2.0 >= 2.2.2 glib-2.0 >= 2.2.2, dbus-1 >= $REQ_DBUS_VERSION, dbus-glib-1 >= $REQ_DBUS_VERSION" PKG_CHECK_MODULES(PACKAGE, [$pkg_modules]) AC_SUBST(PACKAGE_CFLAGS) AC_SUBST(PACKAGE_LIBS)