KNotesAppIface.h
00001 /******************************************************************* 00002 KNotesIface.h -- This file defines the DCOP interface for KNotes. 00003 00004 Copyright (C) 2004 by Michael Brade <brade@kde.org> 00005 00006 This program is free software; you can redistribute it and/or 00007 modify it under the terms of the GNU General Public License 00008 as published by the Free Software Foundation; either version 2 00009 of the License, or (at your option) any later version. 00010 00011 This program is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 GNU General Public License for more details. 00015 00016 You should have received a copy of the GNU General Public License 00017 along with this program; if not, write to the Free Software 00018 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00019 00020 In addition, as a special exception, the copyright holders give 00021 permission to link the code of this program with any edition of 00022 the TQt library by Trolltech AS, Norway (or with modified versions 00023 of TQt that use the same license as TQt), and distribute linked 00024 combinations including the two. You must obey the GNU General 00025 Public License in all respects for all of the code used other than 00026 TQt. If you modify this file, you may extend this exception to 00027 your version of the file, but you are not obligated to do so. If 00028 you do not wish to do so, delete this exception statement from 00029 your version. 00030 *******************************************************************/ 00031 00032 #ifndef __KNotesAppIface_h__ 00033 #define __KNotesAppIface_h__ 00034 00035 #include <tqstring.h> 00036 #include <tqmap.h> 00037 #include <tqdatetime.h> 00038 00039 #include <dcopobject.h> 00040 00041 00042 class KNotesAppIface : virtual public DCOPObject 00043 { 00044 K_DCOP 00045 k_dcop: 00053 virtual TQString newNote( const TQString& name = TQString(), 00054 const TQString& text = TQString() ) = 0; 00055 00064 virtual TQString newNoteFromClipboard( const TQString& name = TQString() ) = 0; 00065 00070 virtual ASYNC killNote( const TQString& noteId ) = 0; 00071 00077 virtual ASYNC killNote( const TQString& noteId, bool force ) = 0; 00078 00083 virtual TQMap<TQString,TQString> notes() const = 0; 00084 00090 virtual ASYNC setName( const TQString& noteId, const TQString& newName ) = 0; 00091 00097 virtual ASYNC setText( const TQString& noteId, const TQString& newText ) = 0; 00098 00104 virtual TQString fgColor( const TQString& noteId ) const = 0; 00105 00111 virtual TQString bgColor( const TQString& noteId ) const = 0; 00112 00119 virtual ASYNC setColor( const TQString& noteId, const TQString& fgColor, 00120 const TQString& bgColor ) = 0; 00121 00127 virtual TQString name( const TQString& noteId ) const = 0; 00128 00134 virtual TQString text( const TQString& noteId ) const = 0; 00135 00136 00137 /******** HERE STARTS THE KNotesAppIface DCOP INTERFACE EXTENSION ********/ 00138 00143 virtual ASYNC showNote( const TQString& noteId ) const = 0; 00144 00149 virtual ASYNC hideNote( const TQString& noteId ) const = 0; 00150 00154 virtual ASYNC showAllNotes() const = 0; 00155 00159 virtual ASYNC hideAllNotes() const = 0; 00160 00166 virtual int width( const TQString& noteId ) const = 0; 00167 00173 virtual int height( const TQString& noteId ) const = 0; 00174 00181 virtual ASYNC move( const TQString& noteId, int x, int y ) const = 0; 00182 00189 virtual ASYNC resize( const TQString& noteId, int width, int height ) const = 0; 00190 00195 virtual ASYNC sync( const TQString& app ) = 0; 00196 00204 virtual bool isNew( const TQString& app, const TQString& noteId ) const = 0; 00205 00213 virtual bool isModified( const TQString& app, const TQString& noteId ) const = 0; 00214 00219 virtual TQDateTime getLastModified( const TQString& noteId ) const = 0; 00220 }; 00221 00222 #endif
