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,2024 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 
52 class FXAPI FXMessageChannel : public FXObject {
53  FXDECLARE(FXMessageChannel)
54 private:
55  FXApp *app;
56 protected:
57  FXInputHandle h[3];
58  FXMutex m;
59 protected:
61 private:
63  FXMessageChannel& operator=(const FXMessageChannel&);
64 public:
65  enum{
66  ID_IO_READ=1,
67  ID_LAST
68  };
69 public:
70  long onMessage(FXObject*,FXSelector,void*);
71 public:
72 
78 
82  FXApp* getApp() const { return app; }
83 
91  FXbool message(FXObject* tgt,FXSelector msg,const void* data=nullptr,FXint size=0);
92 
97  virtual ~FXMessageChannel();
98  };
99 
100 }
101 
102 #endif
103 
104 
The Application object is the central point of a FOX user-interface.
Definition: FXApp.h:134
Definition: FX4Splitter.h:28
FXApp * getApp() const
Get application pointer.
Definition: FXMessageChannel.h:82
FXMessageChannel manages a messaging channel between a worker thread and the main user-interface thre...
Definition: FXMessageChannel.h:52
Object is the base class for all objects in FOX; in order to receive messages from the user interface...
Definition: FXObject.h:138
FXMutex provides a mutex which can be used to enforce critical sections around updates of data shared...
Definition: FXMutex.h:31

Copyright © 1997-2022 Jeroen van der Zijp