1
0

wasabi_std_wnd.h 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. #ifndef _STD_WIN_H
  2. #define _STD_WIN_H
  3. #include <bfc/platform/platform.h>
  4. #include <bfc/wasabi_std.h>
  5. #define ROOTSTRING L"RootWnd"
  6. #define BASEWNDCLASSNAME L"BaseWindow_" ROOTSTRING
  7. #ifdef __cplusplus
  8. class ifc_window;
  9. namespace Wasabi
  10. {
  11. namespace Std
  12. {
  13. namespace Wnd {
  14. OSWINDOWHANDLE createWnd(RECT* r, int nochild, int acceptdrops, OSWINDOWHANDLE parent, OSMODULEHANDLE module, ifc_window* rw);
  15. void destroyWnd(OSWINDOWHANDLE wnd);
  16. int isValidWnd(OSWINDOWHANDLE wnd);
  17. void setWndPos(OSWINDOWHANDLE wnd, OSWINDOWHANDLE zorder, int x, int y, int w, int h,
  18. int nozorder, int noactive, int nocopybits, int nomove, int noresize);
  19. void bringToFront(OSWINDOWHANDLE wnd);
  20. void sendToBack(OSWINDOWHANDLE wnd);
  21. int isWndVisible(OSWINDOWHANDLE wnd);
  22. void showWnd(OSWINDOWHANDLE wnd, int noactivate = FALSE);
  23. void hideWnd(OSWINDOWHANDLE wnd);
  24. int isPopup(OSWINDOWHANDLE wnd);
  25. void setEnabled(OSWINDOWHANDLE wnd, int enabled);
  26. void setFocus(OSWINDOWHANDLE wnd);
  27. OSWINDOWHANDLE getFocus();
  28. void setTopmost(OSWINDOWHANDLE, int topmost);
  29. void invalidateRect(OSWINDOWHANDLE wnd, RECT* r = NULL);
  30. void invalidateRegion(OSWINDOWHANDLE wnd, OSREGIONHANDLE region);
  31. void validateRect(OSWINDOWHANDLE wnd, RECT* r = NULL);
  32. void validateRegion(OSWINDOWHANDLE wnd, OSREGIONHANDLE region);
  33. void update(OSWINDOWHANDLE wnd);
  34. int getUpdateRect(OSWINDOWHANDLE wnd, RECT* r);
  35. void getUpdateRegion(OSWINDOWHANDLE wnd, OSREGIONHANDLE region);
  36. int haveGetRandomRegion();
  37. void getRandomRegion(HDC hdc, OSREGIONHANDLE region); // sorry, HDC
  38. void setWndRegion(OSWINDOWHANDLE wnd, OSREGIONHANDLE region, int redraw = FALSE);
  39. int isDesktopAlphaAvailable();
  40. int isTransparencyAvailable();
  41. void setLayeredWnd(OSWINDOWHANDLE wnd, int layered);
  42. int isLayeredWnd(OSWINDOWHANDLE wnd);
  43. void setLayeredAlpha(OSWINDOWHANDLE wnd, int amount);
  44. void updateLayeredWnd(OSWINDOWHANDLE wnd, int x, int y, int w, int h, HDC surfdc, int alpha);
  45. void moveLayeredWnd(OSWINDOWHANDLE wnd, int x, int y);
  46. void getClientRect(OSWINDOWHANDLE wnd, RECT* r);
  47. void getWindowRect(OSWINDOWHANDLE wnd, RECT* r);
  48. void clientToScreen(OSWINDOWHANDLE wnd, int* x, int* y);
  49. void screenToClient(OSWINDOWHANDLE wnd, int* x, int* y);
  50. void setParent(OSWINDOWHANDLE child, OSWINDOWHANDLE newparent);
  51. OSWINDOWHANDLE getParent(OSWINDOWHANDLE wnd);
  52. // void reparent(OSWINDOWHANDLE child, OSWINDOWHANDLE newparent);
  53. OSWINDOWHANDLE getTopmostChild(OSWINDOWHANDLE wnd);
  54. void setCapture(OSWINDOWHANDLE wnd);
  55. void releaseCapture();
  56. OSWINDOWHANDLE getCapture();
  57. void revokeDragNDrop(OSWINDOWHANDLE wnd);
  58. void setWndName(OSWINDOWHANDLE wnd, const wchar_t* name);
  59. void getWndName(OSWINDOWHANDLE wnd, wchar_t* name, int maxlen);
  60. void setIcon(OSWINDOWHANDLE wnd, OSICONHANDLE icon, int large = FALSE);
  61. OSWINDOWHANDLE getActiveWindow();
  62. void setActiveWindow(OSWINDOWHANDLE wnd);
  63. void clipOSChildren(OSWINDOWHANDLE wnd, OSREGIONHANDLE reg);
  64. int alphaStretchBlit(HDC destHDC, int dstx, int dsty, int dstw, int dsth, HDC sourceHDC, int srcx, int srcy, int srcw, int srch);
  65. OSWINDOWHANDLE getWindowFromPoint(POINT pt);
  66. };
  67. }
  68. }
  69. #endif
  70. #endif