libkmid.h

00001 /*  libkmid.h     - class KMidSimpleAPI that makes it easy to use libkmid
00002             and a C wrapper.
00003     This file is part of LibKMid 0.9.5
00004     Copyright (C) 2000  Antonio Larrosa Jimenez
00005     LibKMid's homepage : http://www.arrakis.es/~rlarrosa/libkmid.html
00006  
00007     This library is free software; you can redistribute it and/or
00008     modify it under the terms of the GNU Library General Public
00009     License as published by the Free Software Foundation; either
00010     version 2 of the License, or (at your option) any later version.
00011  
00012     This library is distributed in the hope that it will be useful,
00013     but WITHOUT ANY WARRANTY; without even the implied warranty of
00014     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015     Library General Public License for more details.
00016  
00017     You should have received a copy of the GNU Library General Public License
00018     along with this library; see the file COPYING.LIB.  If not, write to
00019     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00020     Boston, MA 02110-1301, USA.
00021  
00022     Send comments and bug fixes to Antonio Larrosa <larrosa@kde.org>
00023  
00024 ***************************************************************************/
00025 #ifndef _LIBKMID_H
00026 #define _LIBKMID_H 
00027 
00028 #ifdef __cplusplus
00029 
00030 #include <kdelibs_export.h>
00031 
00056 class KMID_EXPORT KMidSimpleAPI 
00057 {
00058   private:
00059     class KMidSimpleAPIPrivate;
00060     KMidSimpleAPIPrivate *d;
00061 
00062   public:
00063 
00073     static int kMidInit(void);
00074 
00078     static int kMidLoad(const char *filename);
00079 
00094     static int kMidPlay(int loop=0);
00095 
00102     static int kMidStop(void);
00103 
00108     static void kMidDestruct(void);
00109 
00114     static int kMidIsPlaying(void);
00115 
00123     static int kMidDevices(void);
00124 
00134     static const char *kMidName(int i);
00135 
00145     static const char *kMidType(int i);
00146 
00153     static void kMidSetDevice(int i);
00154 
00164     static void kMidSetMidiMapper(const char *mapfilename);
00165 
00169     static const char *kMidVersion(void);
00170 
00178     static const char *kMidCopyright(void);
00179 
00180 };
00181 
00182 
00183 
00184 extern "C" {
00185 
00186 #else
00187 #define KMID_EXPORT
00188 #endif
00189 
00190  
00191 KMID_EXPORT  int    kMidInit(void);
00192 KMID_EXPORT  int    kMidLoad(const char *filename);
00193 KMID_EXPORT  int    kMidPlay(void);
00194 KMID_EXPORT  int    kMidStop(void);
00195 KMID_EXPORT  void   kMidDestruct(void);
00196 KMID_EXPORT  int    kMidIsPlaying(void);
00197 KMID_EXPORT  int    kMidDevices(void);
00198 KMID_EXPORT  const char * kMidName(int i);
00199 KMID_EXPORT  const char * kMidType(int i);
00200 KMID_EXPORT  void   kMidSetDevice(int i);
00201 KMID_EXPORT  void   kMidSetMidiMapper(const char *mapfilename);
00202 KMID_EXPORT  const char * kMidVersion(void);
00203 KMID_EXPORT  const char * kMidCopyright(void);
00204 
00205 
00206 
00207 #ifdef __cplusplus
00208 
00209 }
00210 
00214 extern struct kMidData 
00215 {
00216   class DeviceManager *midi;
00217   class MidiPlayer *player;
00218   class MidiMapper *map;
00219   struct PlayerController *pctl;
00220   int pctlsmID;
00221   int pid;
00222 } kMid;
00223 #endif
00224 
00225 
00226 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys