summaryrefslogtreecommitdiffstats
path: root/source/cWindow.h
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-03-19 10:37:10 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-03-19 10:37:10 +0100
commit1e90dad2456f383c2624acc85ab62445440e1156 (patch)
tree3792ac31a9304e20a9dab67c4235a40ec1d3b385 /source/cWindow.h
parentSocketThreads: proper thread finishing sequence (doesn't trigger AppVerifier checks :) (diff)
downloadcuberite-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.h33
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