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 00038 #include <dcopobject.h> 00039 00040 00041 class KNotesAppIface : virtual public DCOPObject 00042 { 00043 K_DCOP 00044 k_dcop: 00052 virtual TQString newNote( const TQString& name = TQString(), 00053 const TQString& text = TQString() ) = 0; 00054 00063 virtual TQString newNoteFromClipboard( const TQString& name = TQString() ) = 0; 00064 00069 virtual ASYNC killNote( const TQString& noteId ) = 0; 00070 00076 virtual ASYNC killNote( const TQString& noteId, bool force ) = 0; 00077 00082 virtual TQMap<TQString,TQString> notes() const = 0; 00083 00089 virtual ASYNC setName( const TQString& noteId, const TQString& newName ) = 0; 00090 00096 virtual ASYNC setText( const TQString& noteId, const TQString& newText ) = 0; 00097 00103 virtual TQString fgColor( const TQString& noteId ) const = 0; 00104 00110 virtual TQString bgColor( const TQString& noteId ) const = 0; 00111 00118 virtual ASYNC setColor( const TQString& noteId, const TQString& fgColor, 00119 const TQString& bgColor ) = 0; 00120 00126 virtual TQString name( const TQString& noteId ) const = 0; 00127 00133 virtual TQString text( const TQString& noteId ) const = 0; 00134 00135 00136 /******** HERE STARTS THE KNotesAppIface DCOP INTERFACE EXTENSION ********/ 00137 00142 virtual ASYNC showNote( const TQString& noteId ) const = 0; 00143 00148 virtual ASYNC hideNote( const TQString& noteId ) const = 0; 00149 00153 virtual ASYNC showAllNotes() const = 0; 00154 00158 virtual ASYNC hideAllNotes() const = 0; 00159 00165 virtual int width( const TQString& noteId ) const = 0; 00166 00172 virtual int height( const TQString& noteId ) const = 0; 00173 00180 virtual ASYNC move( const TQString& noteId, int x, int y ) const = 0; 00181 00188 virtual ASYNC resize( const TQString& noteId, int width, int height ) const = 0; 00189 00194 virtual ASYNC sync( const TQString& app ) = 0; 00195 00203 virtual bool isNew( const TQString& app, const TQString& noteId ) const = 0; 00204 00212 virtual bool isModified( const TQString& app, const TQString& noteId ) const = 0; 00213 }; 00214 00215 #endif