diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-03-19 10:37:10 +0100 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-03-19 10:37:10 +0100 |
commit | 1e90dad2456f383c2624acc85ab62445440e1156 (patch) | |
tree | 3792ac31a9304e20a9dab67c4235a40ec1d3b385 /source/cWindow.h | |
parent | SocketThreads: proper thread finishing sequence (doesn't trigger AppVerifier checks :) (diff) | |
download | cuberite-1e90dad2456f383c2624acc85ab62445440e1156.tar cuberite-1e90dad2456f383c2624acc85ab62445440e1156.tar.gz cuberite-1e90dad2456f383c2624acc85ab62445440e1156.tar.bz2 cuberite-1e90dad2456f383c2624acc85ab62445440e1156.tar.lz cuberite-1e90dad2456f383c2624acc85ab62445440e1156.tar.xz cuberite-1e90dad2456f383c2624acc85ab62445440e1156.tar.zst cuberite-1e90dad2456f383c2624acc85ab62445440e1156.zip |
Diffstat (limited to '')
-rw-r--r-- | source/cWindow.h | 33 |
1 files changed, 23 insertions, 10 deletions
diff --git a/source/cWindow.h b/source/cWindow.h index a6885a7cc..d9f4226a6 100644 --- a/source/cWindow.h +++ b/source/cWindow.h @@ -6,6 +6,14 @@ class cPlayer; class cItem;
class cWindowOwner;
class cClientHandle;
+class cPacket;
+
+typedef std::list<cPlayer *> cPlayerList;
+
+
+
+
+
class cWindow
{
public:
@@ -49,25 +57,30 @@ public: void SetOwner( cWindowOwner* a_Owner ) { m_Owner = a_Owner; }
void SendWholeWindow( cClientHandle* a_Client );
+ void BroadcastWholeWindow(void);
+ void Broadcast(const cPacket & a_Packet);
- const std::string & GetWindowTitle() const { return m_WindowTitle; }
+ const AString & GetWindowTitle() const { return m_WindowTitle; }
void SetWindowTitle( const std::string & a_WindowTitle ) { m_WindowTitle = a_WindowTitle; }
- const std::list<cPlayer*> & GetOpenedBy() const { return m_OpenedBy; }
-
void OwnerDestroyed();
+
private:
+
void Destroy();
int m_WindowID;
int m_WindowType;
- std::string m_WindowTitle;
+ AString m_WindowTitle;
- cWindowOwner* m_Owner;
+ cWindowOwner * m_Owner;
- std::list<cPlayer*> m_OpenedBy;
- bool m_bInventoryVisible;
- int m_NumSlots;
- cItem* m_Slots;
- cItem* m_DraggingItem;
+ cCriticalSection m_CS;
+ cPlayerList m_OpenedBy;
+
+ bool m_bInventoryVisible;
+ int m_NumSlots;
+ cItem * m_Slots;
+ cItem * m_DraggingItem;
+ bool m_IsDestroyed;
};
\ No newline at end of file |