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

FXMessageChannel.h
1 /********************************************************************************
2 * *
3 * 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 *
4 * *
5 *********************************************************************************
6 * Copyright (C) 2006,2017 by Jeroen van der Zijp. All Rights Reserved. *
7 *********************************************************************************
8 * This library is free software; you can redistribute it and/or modify *
9 * it under the terms of the GNU Lesser General Public License as published by *
10 * the Free Software Foundation; either version 3 of the License, or *
11 * (at your option) any later version. *
12 * *
13 * This library is distributed in the hope that it will be useful, *
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16 * GNU Lesser General Public License for more details. *
17 * *
18 * You should have received a copy of the GNU Lesser General Public License *
19 * along with this program. If not, see <http://www.gnu.org/licenses/> *
20 ********************************************************************************/
21 #ifndef FXMESSAGECHANNEL_H
22 #define FXMESSAGECHANNEL_H
23 
24 #ifndef FXOBJECT_H
25 #include "FXObject.h"
26 #endif
27 
28 namespace FX {
29 
30 class FXApp;
31 
32 
51 class FXAPI FXMessageChannel : public FXObject {
52  FXDECLARE(FXMessageChannel)
53 private:
54  FXApp *app;
55 protected:
56  FXInputHandle h[3];
57  FXMutex m;
58 protected:
60 private:
62  FXMessageChannel& operator=(const FXMessageChannel&);
63 public:
64  enum{
65  ID_IO_READ=1,
66  ID_LAST
67  };
68 public:
69  long onMessage(FXObject*,FXSelector,void*);
70 public:
71 
74 
76  FXApp* getApp() const { return app; }
77 
79  FXbool message(FXObject* tgt,FXSelector msg,const void* data=NULL,FXint size=0);
80 
82  virtual ~FXMessageChannel();
83  };
84 
85 }
86 
87 #endif
88 
89 

Copyright © 1997-2016 Jeroen van der Zijp