Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members

/home/jeroen/FOX/fox/fox-1.7.33/include/FXMessageChannel.h
00001 /********************************************************************************
00002 *                                                                               *
00003 *         I n t e r - T h r e a d    M e s s a g i n g    C h a n n e l         *
00004 *                                                                               *
00005 *********************************************************************************
00006 * Copyright (C) 2006,2012 by Jeroen van der Zijp.   All Rights Reserved.        *
00007 *********************************************************************************
00008 * This library is free software; you can redistribute it and/or modify          *
00009 * it under the terms of the GNU Lesser General Public License as published by   *
00010 * the Free Software Foundation; either version 3 of the License, or             *
00011 * (at your option) any later version.                                           *
00012 *                                                                               *
00013 * This library is distributed in the hope that it will be useful,               *
00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of                *
00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                 *
00016 * GNU Lesser General Public License for more details.                           *
00017 *                                                                               *
00018 * You should have received a copy of the GNU Lesser General Public License      *
00019 * along with this program.  If not, see <http://www.gnu.org/licenses/>          *
00020 ********************************************************************************/
00021 #ifndef FXMESSAGECHANNEL_H
00022 #define FXMESSAGECHANNEL_H
00023 
00024 #ifndef FXOBJECT_H
00025 #include "FXObject.h"
00026 #endif
00027 
00028 
00029 namespace FX {
00030 
00031 class FXApp;
00032 
00033 
00052 class FXAPI FXMessageChannel : public FXObject {
00053   FXDECLARE(FXMessageChannel)
00054 private:
00055   FXApp *app;
00056 protected:
00057   FXInputHandle h[3];
00058   FXMutex       m;
00059 protected:
00060   FXMessageChannel();
00061 private:
00062   FXMessageChannel(const FXMessageChannel&);
00063   FXMessageChannel& operator=(const FXMessageChannel&);
00064 public:
00065   enum{
00066     ID_IO_READ=1,
00067     ID_LAST
00068     };
00069 public:
00070   long onMessage(FXObject*,FXSelector,void*);
00071 public:
00072 
00074   FXMessageChannel(FXApp* a);
00075 
00077   FXApp* getApp() const { return app; }
00078 
00080   FXbool message(FXObject* tgt,FXSelector msg,const void* data=NULL,FXint size=0);
00081 
00083   virtual ~FXMessageChannel();
00084   };
00085 
00086 }
00087 
00088 #endif
00089 
00090 

Copyright © 1997-2011 Jeroen van der Zijp