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 
38 #include <dcopobject.h>
39 
40 
41 class KNotesAppIface : virtual public DCOPObject
42 {
43  K_DCOP
44 k_dcop:
52  virtual TQString newNote( const TQString& name = TQString(),
53  const TQString& text = TQString() ) = 0;
54 
63  virtual TQString newNoteFromClipboard( const TQString& name = TQString() ) = 0;
64 
69  virtual ASYNC killNote( const TQString& noteId ) = 0;
70 
76  virtual ASYNC killNote( const TQString& noteId, bool force ) = 0;
77 
82  virtual TQMap<TQString,TQString> notes() const = 0;
83 
89  virtual ASYNC setName( const TQString& noteId, const TQString& newName ) = 0;
90 
96  virtual ASYNC setText( const TQString& noteId, const TQString& newText ) = 0;
97 
103  virtual TQString fgColor( const TQString& noteId ) const = 0;
104 
110  virtual TQString bgColor( const TQString& noteId ) const = 0;
111 
118  virtual ASYNC setColor( const TQString& noteId, const TQString& fgColor,
119  const TQString& bgColor ) = 0;
120 
126  virtual TQString name( const TQString& noteId ) const = 0;
127 
133  virtual TQString text( const TQString& noteId ) const = 0;
134 
135 
136  /******** HERE STARTS THE KNotesAppIface DCOP INTERFACE EXTENSION ********/
137 
142  virtual ASYNC showNote( const TQString& noteId ) const = 0;
143 
148  virtual ASYNC hideNote( const TQString& noteId ) const = 0;
149 
153  virtual ASYNC showAllNotes() const = 0;
154 
158  virtual ASYNC hideAllNotes() const = 0;
159 
165  virtual int width( const TQString& noteId ) const = 0;
166 
172  virtual int height( const TQString& noteId ) const = 0;
173 
180  virtual ASYNC move( const TQString& noteId, int x, int y ) const = 0;
181 
188  virtual ASYNC resize( const TQString& noteId, int width, int height ) const = 0;
189 
194  virtual ASYNC sync( const TQString& app ) = 0;
195 
203  virtual bool isNew( const TQString& app, const TQString& noteId ) const = 0;
204 
212  virtual bool isModified( const TQString& app, const TQString& noteId ) const = 0;
213 };
214 
215 #endif