knotes

KNotesAppIface.h
1 /*******************************************************************
2  KNotesIface.h -- This file defines the DCOP interface for KNotes.
3 
4  Copyright (C) 2004 by Michael Brade <brade@kde.org>
5 
6  This program is free software; you can redistribute it and/or
7  modify it under the terms of the GNU General Public License
8  as published by the Free Software Foundation; either version 2
9  of the License, or (at your option) any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with this program; if not, write to the Free Software
18  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 
20  In addition, as a special exception, the copyright holders give
21  permission to link the code of this program with any edition of
22  the TQt library by Trolltech AS, Norway (or with modified versions
23  of TQt that use the same license as TQt), and distribute linked
24  combinations including the two. You must obey the GNU General
25  Public License in all respects for all of the code used other than
26  TQt. If you modify this file, you may extend this exception to
27  your version of the file, but you are not obligated to do so. If
28  you do not wish to do so, delete this exception statement from
29  your version.
30 *******************************************************************/
31 
32 #ifndef __KNotesAppIface_h__
33 #define __KNotesAppIface_h__
34 
35 #include <tqstring.h>
36 #include <tqmap.h>
37 #include <tqdatetime.h>
38 
39 #include <dcopobject.h>
40 
41 
42 class KNotesAppIface : virtual public DCOPObject
43 {
44  K_DCOP
45 k_dcop:
53  virtual TQString newNote( const TQString& name = TQString(),
54  const TQString& text = TQString() ) = 0;
55 
64  virtual TQString newNoteFromClipboard( const TQString& name = TQString() ) = 0;
65 
70  virtual ASYNC killNote( const TQString& noteId ) = 0;
71 
77  virtual ASYNC killNote( const TQString& noteId, bool force ) = 0;
78 
83  virtual TQMap<TQString,TQString> notes() const = 0;
84 
90  virtual ASYNC setName( const TQString& noteId, const TQString& newName ) = 0;
91 
97  virtual ASYNC setText( const TQString& noteId, const TQString& newText ) = 0;
98 
104  virtual TQString fgColor( const TQString& noteId ) const = 0;
105 
111  virtual TQString bgColor( const TQString& noteId ) const = 0;
112 
119  virtual ASYNC setColor( const TQString& noteId, const TQString& fgColor,
120  const TQString& bgColor ) = 0;
121 
127  virtual TQString name( const TQString& noteId ) const = 0;
128 
134  virtual TQString text( const TQString& noteId ) const = 0;
135 
136 
137  /******** HERE STARTS THE KNotesAppIface DCOP INTERFACE EXTENSION ********/
138 
143  virtual ASYNC showNote( const TQString& noteId ) const = 0;
144 
149  virtual ASYNC hideNote( const TQString& noteId ) const = 0;
150 
154  virtual ASYNC showAllNotes() const = 0;
155 
159  virtual ASYNC hideAllNotes() const = 0;
160 
166  virtual int width( const TQString& noteId ) const = 0;
167 
173  virtual int height( const TQString& noteId ) const = 0;
174 
181  virtual ASYNC move( const TQString& noteId, int x, int y ) const = 0;
182 
189  virtual ASYNC resize( const TQString& noteId, int width, int height ) const = 0;
190 
195  virtual ASYNC sync( const TQString& app ) = 0;
196 
204  virtual bool isNew( const TQString& app, const TQString& noteId ) const = 0;
205 
213  virtual bool isModified( const TQString& app, const TQString& noteId ) const = 0;
214 
219  virtual TQDateTime getLastModified( const TQString& noteId ) const = 0;
220 };
221 
222 #endif