ultimatepp/rainbow/Turtle/Ctrl.h
cxl c364742944 .developing Turtle
git-svn-id: svn://ultimatepp.org/upp/trunk@6812 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2014-01-26 21:32:54 +00:00

109 lines
3 KiB
C

//$ class Ctrl {
private:
static Ptr<Ctrl> desktop;
static Vector<Ctrl *> topctrl;
static Point fbCursorPos;
static Image fbCursorImage;
static Rect fbCaretRect;
static int fbCaretTm;
static bool fbEndSession;
static int64 fbEventLoop;
static int64 fbEndSessionLoop;
static Ctrl& Desktop();
static void TimerAndPaint();
static bool ProcessEvent(const String& event);
static bool quit;
static int main_pid;
static Vector<int> pid;
static TcpSocket socket;
static WebSocket websocket;
static int64 update_serial;
static int64 recieved_update_serial;
static Vector<Rect> invalid;
static BiVector<String> event_queue;
static Size DesktopSize;
static void AddInvalid(const Rect& r);
void AddInvalid() { AddInvalid(GetScreenRect()); }
static void InvalidateDesktop();
int FindTopCtrl() const;
static Rect GetClipBound(const Vector<Rect>& inv, const Rect& r);
static void DoPaint();
static void SyncTopWindows();
// static void AddInvalid(const Rect& rect);
void DestroyWnd();
void NewTop() { top = new Top; top->owner_window = NULL; }
void PutForeground();
static void MouseEventFB(Ptr<Ctrl> t, int event, Point p, int zdelta);
static void DrawLine(const Vector<Rect>& clip, int x, int y, int cx, int cy, bool horz,
const byte *pattern, int animation);
static void DragRectDraw0(const Vector<Rect>& clip, const Rect& rect, int n,
const byte *pattern, int animation);
static void ReadKeyMods(CParser& p);
static void DoMouseButton(int event, CParser& p);
static void DoMouseFB(int event, Point p, int zdelta, CParser& cp);
static void Reply();
friend struct PaintProxy__;
friend class TopWindowFrame;
friend class SystemDraw;
friend struct DnDLoop;
void SetOpen(bool b) { isopen = b; }
static void Signal(int signal);
static void Broadcast(int signal);
static void Put8(int x) { turtle_stream.Put(x); }
static void Put16(int x);
static void Put32(int x);
static void Put(Point p);
static void Put(Size sz);
static void Put(const Rect& r);
static void Put(const String& s);
public:
static bool DoKeyFB(dword key, int cnt);
static String host;
static int port;
static bool debugmode;
static String ip;
static Time stat_started;
static int64 stat_data_send;
static bool StartSession();
static Callback WhenDisconnect;
static void EndSession();
static void SetDesktop(Ctrl& q);
static Ctrl *GetDesktop() { return desktop; }
static void SetDesktopSize(Size sz);
void DragRectDraw(const Rect& rect1, const Rect& rect2, const Rect& clip, int n,
Color color, int type, int animation);
static Ctrl *FindMouseTopCtrl();
static void PaintScene(SystemDraw& draw);
enum { DRAWDRAGRECT_SCREEN = 0x8000 };
//$ };