544 |
544 |
545 /* window.cpp */ |
545 /* window.cpp */ |
546 void CallWindowEventNP(Window *w, int event); |
546 void CallWindowEventNP(Window *w, int event); |
547 void CallWindowTickEvent(); |
547 void CallWindowTickEvent(); |
548 |
548 |
549 void SetWindowDirty(const Window *w); |
|
550 void SendWindowMessage(WindowClass wnd_class, WindowNumber wnd_num, int msg, int wparam, int lparam); |
|
551 void SendWindowMessageClass(WindowClass wnd_class, int msg, int wparam, int lparam); |
|
552 |
|
553 Window *FindWindowById(WindowClass cls, WindowNumber number); |
|
554 void DeletePlayerWindows(PlayerID pi); |
|
555 void ChangeWindowOwner(PlayerID old_player, PlayerID new_player); |
|
556 Window *BringWindowToFrontById(WindowClass cls, WindowNumber number); |
549 Window *BringWindowToFrontById(WindowClass cls, WindowNumber number); |
557 Window *FindWindowFromPt(int x, int y); |
550 Window *FindWindowFromPt(int x, int y); |
558 |
551 |
559 bool IsWindowOfPrototype(const Window *w, const Widget *widget); |
552 bool IsWindowOfPrototype(const Window *w, const Widget *widget); |
560 void AssignWidgetToWindow(Window *w, const Widget *widget); |
553 void AssignWidgetToWindow(Window *w, const Widget *widget); |
564 |
557 |
565 Window *AllocateWindowDesc(const WindowDesc *desc, void *data = NULL); |
558 Window *AllocateWindowDesc(const WindowDesc *desc, void *data = NULL); |
566 Window *AllocateWindowDescFront(const WindowDesc *desc, int window_number, void *data = NULL); |
559 Window *AllocateWindowDescFront(const WindowDesc *desc, int window_number, void *data = NULL); |
567 |
560 |
568 void DrawWindowViewport(const Window *w); |
561 void DrawWindowViewport(const Window *w); |
569 void ResizeWindow(Window *w, int x, int y); |
562 |
570 |
|
571 void InitWindowSystem(); |
|
572 void UnInitWindowSystem(); |
|
573 void ResetWindowSystem(); |
|
574 int GetMenuItemIndex(const Window *w, int x, int y); |
563 int GetMenuItemIndex(const Window *w, int x, int y); |
575 void InputLoop(); |
|
576 void InvalidateThisWindowData(Window *w); |
|
577 void InvalidateWindowData(WindowClass cls, WindowNumber number); |
|
578 void RelocateAllWindows(int neww, int newh); |
564 void RelocateAllWindows(int neww, int newh); |
579 |
565 |
580 /* misc_gui.cpp */ |
566 /* misc_gui.cpp */ |
581 void GuiShowTooltipsWithArgs(StringID str, uint paramcount, const uint64 params[]); |
567 void GuiShowTooltipsWithArgs(StringID str, uint paramcount, const uint64 params[]); |
582 static inline void GuiShowTooltips(StringID str) |
568 static inline void GuiShowTooltips(StringID str) |
620 WSM_SIZING = 2, |
606 WSM_SIZING = 2, |
621 WSM_PRESIZE = 3, |
607 WSM_PRESIZE = 3, |
622 }; |
608 }; |
623 |
609 |
624 Window *GetCallbackWnd(); |
610 Window *GetCallbackWnd(); |
625 void DeleteNonVitalWindows(); |
|
626 void DeleteAllNonVitalWindows(); |
|
627 void HideVitalWindows(); |
|
628 void ShowVitalWindows(); |
|
629 Window **FindWindowZPosition(const Window *w); |
611 Window **FindWindowZPosition(const Window *w); |
630 |
612 |
631 void ScrollbarClickHandler(Window *w, const Widget *wi, int x, int y); |
613 void ScrollbarClickHandler(Window *w, const Widget *wi, int x, int y); |
632 |
614 |
633 void ResizeButtons(Window *w, byte left, byte right); |
615 void ResizeButtons(Window *w, byte left, byte right); |