1
0

api_window.h 32 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277
  1. #ifndef __WASABI_API_WINDOW_H
  2. #define __WASABI_API_WINDOW_H
  3. #include <bfc/dispatch.h>
  4. #include <api/wnd/drag.h>
  5. #include <api/wnd/cursor.h>
  6. #include <api/wnd/accessible.h>
  7. #include <tataki/canvas/Canvas.h>
  8. #include <api/dependency/api_dependent.h>
  9. #include <api/timer/timerclient.h>
  10. #include <api/script/objects/guiobject.h>
  11. enum WndPreferences {
  12. SUGGESTED_X,
  13. SUGGESTED_Y,
  14. SUGGESTED_W,
  15. SUGGESTED_H,
  16. MINIMUM_W,
  17. MINIMUM_H,
  18. MAXIMUM_W,
  19. MAXIMUM_H,
  20. };
  21. enum GetTab {
  22. TAB_GETCURRENT,
  23. TAB_GETNEXT,
  24. TAB_GETPREVIOUS,
  25. TAB_GETFIRST,
  26. TAB_GETLAST,
  27. };
  28. #define MAXIMIZE_WIDTH 1
  29. #define MAXIMIZE_HEIGHT 2
  30. #define RESTORE_X 1
  31. #define RESTORE_Y 2
  32. #define RESTORE_HEIGHT 4
  33. #define RESTORE_WIDTH 8
  34. // popWindowRect flags
  35. #define PWR_X 1
  36. #define PWR_Y 2
  37. #define PWR_WIDTH 4
  38. #define PWR_HEIGHT 8
  39. #define PWR_DIMENTIONS (PWR_WIDTH|PWR_HEIGHT)
  40. #define PWR_POSITION (PWR_X|PWR_Y)
  41. class FindObjectCallback;
  42. class NOVTABLE ifc_window : public Dispatchable
  43. {
  44. protected:
  45. ifc_window() {} // protect constructor
  46. public:
  47. static const GUID *depend_getClassGuid() {
  48. // {11981849-61F7-4158-8283-DA7DD006D732}
  49. static const GUID ret =
  50. { 0x11981849, 0x61f7, 0x4158, { 0x82, 0x83, 0xda, 0x7d, 0xd0, 0x6, 0xd7, 0x32 } };
  51. return &ret;
  52. }
  53. // this passes thru to the windows WndProc, if there is one -- NONPORTABLE
  54. #if defined (_WIN32) || defined (_WIN64)
  55. virtual LRESULT wndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)=0;
  56. #elif defined(__APPLE__)
  57. virtual OSStatus eventHandler(EventHandlerCallRef inHandlerCallRef, EventRef inEvent, void *inUserData)=0;
  58. #endif
  59. // get the OSWINDOWHANDLE (if there is one)
  60. OSWINDOWHANDLE gethWnd() { return getOsWindowHandle(); } // stay back compatibile
  61. OSWINDOWHANDLE getOsWindowHandle();
  62. OSMODULEHANDLE getOsModuleHandle();
  63. void performBatchProcesses(); // this is called after wndProc is called (under win32) to recompute batch operations such as calculating window regions, cascaderepainting, etc. this prevents N children from independently calling repaintTree for the whole gui on overlaping zones of the framebuffer. under OSes other than win32, this should be called after you've executed all your window events for this poll
  64. TimerClient *getTimerClient();
  65. const wchar_t *getRootWndName();
  66. const wchar_t *getId();
  67. int init(ifc_window *parent, int nochild=FALSE);
  68. int isInited(); // are we post init() ? USE THIS INSTEAD OF gethWnd()==1
  69. int isPostOnInit(); // are we post onInit() ? USE THIS INSTEAD OF ISINITED TO KNOW IF YOU CAN CALL ONRESIZE (if a function can be called by onInit and other parts of the code at the same time)
  70. int setVirtual(int i);
  71. int isClickThrough();
  72. int onMouseMove(int x, int y);
  73. int onLeftButtonUp(int x, int y);
  74. int onRightButtonUp(int x, int y);
  75. int onLeftButtonDown(int x, int y);
  76. int onRightButtonDown(int x, int y);
  77. int onLeftButtonDblClk(int x, int y);
  78. int onRightButtonDblClk(int x, int y);
  79. // fetch the DragInterface of the api_window here, can be NULL
  80. DragInterface *getDragInterface();
  81. int getCursorType(int x, int y);
  82. OSCURSORHANDLE getCustomCursor(int x, int y);
  83. // returns deepest child for point or yourself if no child there
  84. ifc_window *rootWndFromPoint(POINT *pt);
  85. void getClientRect(RECT *);
  86. void getNonClientRect(RECT *rect);
  87. // the onscreen coordinates
  88. int getWindowRect(RECT *r);
  89. void setVisible(int show);
  90. void setCloaked(int cloak);
  91. void onSetVisible(int show);
  92. int isVisible(int within=0);
  93. void *getInterface(GUID interface_guid);
  94. // painting stuff
  95. void invalidate();
  96. void invalidateRect(RECT *r);
  97. void invalidateRgn(api_region *r);
  98. void invalidateFrom(ifc_window *who);
  99. void invalidateRectFrom(RECT *r, ifc_window *who);
  100. void invalidateRgnFrom(api_region *r, ifc_window *who);
  101. void onChildInvalidate(api_region *r, ifc_window *who);
  102. void validate();
  103. void validateRect(RECT *r);
  104. void validateRgn(api_region *reg);
  105. int paintTree(ifc_canvas *canvas, api_region *r);
  106. int paint(Canvas *canvas=NULL, api_region *r=NULL);
  107. Canvas *getFrameBuffer();
  108. ifc_window *getParent();
  109. ifc_window *getRootParent();
  110. ifc_window *getDesktopParent();
  111. void setParent(ifc_window *newparent);
  112. int onSiblingInvalidateRgn(api_region *r, ifc_window *who, int who_idx, int my_idx);
  113. int wantSiblingInvalidations();
  114. int wantAutoContextMenu();
  115. int wantActivation();
  116. void activate();
  117. int cascadeRepaintFrom(ifc_window *who, int pack=1);
  118. int cascadeRepaintRgnFrom(api_region *reg, ifc_window *who, int pack=1);
  119. int cascadeRepaintRectFrom(RECT *r, ifc_window *who, int pack=1);
  120. int cascadeRepaint(int pack=1);
  121. int cascadeRepaintRgn(api_region *reg, int pack=1);
  122. int cascadeRepaintRect(RECT *r, int pack=1);
  123. void repaint();
  124. ifc_window *getBaseTextureWindow();
  125. int childNotify(ifc_window *child, int msg, intptr_t p1, intptr_t p2);
  126. int getPreferences(int what);
  127. void setPreferences(int what, int v);
  128. api_region *getRegion();
  129. void invalidateWindowRegion();
  130. api_region *getComposedRegion();
  131. api_region *getSubtractorRegion();
  132. int getRegionOp();
  133. void setRegionOp(int op);
  134. int isRectRgn();
  135. void setRectRgn(int rrgn);
  136. void setStartHidden(int sh);
  137. void setClickThrough(int ct);
  138. void focusNext();
  139. void focusPrevious();
  140. void setWindowTitle(const wchar_t *name);
  141. double getRenderRatio();
  142. void setRenderRatio(double r);
  143. void setRatioLinked(int l); // 1 = getRenderRatio asks parent, 0 = returns this ratio, default is 1, 0 should only be used for non virtuals
  144. int handleRatio();
  145. void resize(int x, int y, int w, int h, int wantcb=1);
  146. inline void resizeToRect(RECT *r)
  147. {
  148. resize(r->left, r->top, r->right - r->left, r->bottom - r->top);
  149. }
  150. void move(int x, int y);
  151. void notifyDeferredMove(int x, int y);
  152. void getPosition(POINT *pt);
  153. ifc_window *getForwardWnd();
  154. // children registration/enumeration
  155. void registerRootWndChild(ifc_window *child);
  156. void unregisterRootWndChild(ifc_window *child);
  157. ifc_window *findRootWndChild(int x, int y, int only_virtuals=0);
  158. ifc_window *enumRootWndChildren(int _enum);
  159. int getNumRootWndChildren();
  160. // virtual child stuff
  161. int isVirtual();
  162. void bringVirtualToFront(ifc_window *w);
  163. void bringVirtualToBack(ifc_window *w);
  164. void bringVirtualAbove(ifc_window *w, ifc_window *b);
  165. void bringVirtualBelow(ifc_window *w, ifc_window *b);
  166. int checkDoubleClick(int button, int x, int y);
  167. void onCancelCapture();
  168. void cancelCapture();
  169. void setVirtualChildCapture(ifc_window *child);
  170. ifc_window *getVirtualChildCapture();
  171. ifc_window *getCurVirtualChildFocus();
  172. ifc_window *getTab(int what=TAB_GETCURRENT);
  173. bool ptInRegion(int x, int y);
  174. void clientToScreen(int *x, int *y); // so rootWndFromPoint can map ratio
  175. void screenToClient(int *x, int *y); // ..
  176. int getNotifyId();
  177. int onActivate();
  178. int onDeactivate();
  179. int isActive();
  180. int handleTransparency();
  181. int handleDesktopAlpha();
  182. void setEnabled(int e);
  183. int onEnable(int e);
  184. int isEnabled(int within=0);
  185. int getPaintingAlpha();
  186. void getAlpha(int *activealpha=NULL, int *inactivealpha=NULL);
  187. void setAlpha(int activealpha, int inactivealpha=-1); // -1 means same as activealpha
  188. void setTip(const wchar_t *tip);
  189. int runModal();
  190. void endModal(int retcode);
  191. void bringToFront();
  192. void bringToBack();
  193. void setFocus();
  194. int gotFocus();
  195. ifc_window *getNextVirtualFocus(ifc_window *w);
  196. void setVirtualChildFocus(ifc_window *w);
  197. void setVirtualTabOrder(ifc_window *w, int a);
  198. int getVirtualTabOrder(ifc_window *w);
  199. int wantFocus();
  200. void setTabOrder(int a);
  201. int getTabOrder();
  202. void setAutoTabOrder();
  203. void setVirtualAutoTabOrder(ifc_window *w);
  204. int onAcceleratorEvent(const wchar_t *name);
  205. int onChar(unsigned int c);
  206. int onKeyDown(int keycode);
  207. int onKeyUp(int keycode);
  208. int onSysKeyDown(int keyCode, int keyData);
  209. int onSysKeyUp(int keyCode, int keyData);
  210. int onKillFocus();
  211. int onGetFocus();
  212. void onSetRootFocus(ifc_window *w);
  213. ifc_dependent *getDependencyPtr();
  214. void addMinMaxEnforcer(ifc_window *w);
  215. void removeMinMaxEnforcer(ifc_window *w);
  216. ifc_window *enumMinMaxEnforcer(int n);
  217. int getNumMinMaxEnforcers();
  218. void signalMinMaxEnforcerChanged();
  219. int onAction(const wchar_t *action, const wchar_t *param=NULL, int x=-1, int y=-1, intptr_t p1=0, intptr_t p2=0, void *data=NULL, size_t datalen=0, ifc_window *source=NULL);
  220. void setRenderBaseTexture(int r);
  221. int getRenderBaseTexture();
  222. void renderBaseTexture(ifc_canvas *c, const RECT *r, int alpha=255);
  223. GuiObject *getGuiObject(); // not guaranteed non null
  224. int getFlag(int flag);
  225. // see basewnd.h for codes. this is to force an event
  226. int triggerEvent(int event, intptr_t p1=0, intptr_t p2=0);
  227. int allowDeactivation();
  228. void setAllowDeactivation(int allow);
  229. ifc_window *findWindow(const wchar_t *id);
  230. ifc_window *findWindowByInterface(GUID interface_guid);
  231. ifc_window *findWindowByCallback(FindObjectCallback *cb);
  232. ifc_window *findWindowChain(FindObjectCallback *cb, ifc_window *wcaller);
  233. ifc_window *enumTab(int i);
  234. int getNumTabs();
  235. int getFocusOnClick();
  236. void setFocusOnClick(int i);
  237. void setNoDoubleClicks(int no);
  238. void setNoLeftClicks(int no);
  239. void setNoRightClicks(int no);
  240. void setNoMouseMoves(int no);
  241. void setNoContextMenus(int no);
  242. int wantDoubleClicks();
  243. int wantLeftClicks();
  244. int wantRightClicks();
  245. int wantMouseMoves();
  246. int wantContextMenus();
  247. void setDefaultCursor(Cursor *c);
  248. Accessible *getAccessibleObject(int createifnotexist=1);
  249. int accessibility_getState();
  250. #ifndef WA3COMPATIBILITY
  251. void setDropTarget(void *dt);
  252. void *getDropTarget();
  253. #endif
  254. #ifdef EXPERIMENTAL_INDEPENDENT_AOT
  255. void setAlwaysOnTop(int i);
  256. int getAlwaysOnTop();
  257. #endif
  258. void maximize(int axis=MAXIMIZE_WIDTH|MAXIMIZE_HEIGHT);
  259. void restore(int what=RESTORE_X|RESTORE_Y|RESTORE_WIDTH|RESTORE_HEIGHT);
  260. int getRestoredRect(RECT *r);
  261. int isMinimized();
  262. enum {
  263. Event_SETVISIBLE=100, // param 2 is 1 or 0
  264. Event_ONPAINT=200, // param 2 is PaintCallback::BEFOREPAINT or PaintCallback::AFTERPAINT
  265. Event_ONINVALIDATE=300,
  266. };
  267. enum {
  268. BATCHPROCESSES = 50,
  269. GETOSWINDOWHANDLE = 100,
  270. GETOSMODULEHANDLE = 105,
  271. GETROOTWNDNAME = 110,
  272. GETID = 120,
  273. GETDRAGINTERFACE = 200,
  274. FROMPOINT = 300,
  275. GETWINDOWRECT = 400,
  276. ISVISIBLE = 501,
  277. ONMETRICCHANGE = 700,
  278. PAINTTREE = 900,
  279. PAINT = 910,
  280. GETFRAMEBUFFER = 920,
  281. GETPARENT = 1000,
  282. GETROOTPARENT = 1001,
  283. SETPARENT = 1002,
  284. GETDESKTOPPARENT = 1003,
  285. CHILDNOTIFY = 1200,
  286. GETPREFERENCES = 1300,
  287. SETPREFERENCES = 1310,
  288. CLICKTHROUGH = 1500,
  289. GETFORWARDWND = 1501,
  290. SETCLICKTHROUGH = 1502,
  291. CLIENTSCREEN = 1600,
  292. SCREENCLIENT = 1601,
  293. INIT = 1700,
  294. ISINITED = 1701,
  295. ISPOSTONINIT = 1702,
  296. SETVIRTUAL = 1704,
  297. GETCURSORTYPE = 1800,
  298. GETCUSTOMCURSOR = 1801,
  299. GETINTERFACE = 1850,
  300. GETCLIENTRECT = 1900,
  301. GETNONCLIENTRECT = 1901,
  302. SETVISIBLE = 2000,
  303. ONSETVISIBLE = 2001,
  304. SETCLOAKED = 2002,
  305. INVALIDATE = 2100,
  306. INVALIDATERECT = 2101,
  307. INVALIDATERGN = 2102,
  308. INVALIDATEFROM = 2103,
  309. INVALIDATERECTFROM = 2104,
  310. INVALIDATERGNFROM = 2105,
  311. VALIDATE = 2200,
  312. VALIDATERECT = 2201,
  313. VALIDATERGN = 2202,
  314. ONSIBINVALIDATE = 2300,
  315. WANTSIBINVALIDATE = 2301,
  316. ONCHILDINVALIDATE = 2302,
  317. CASCADEREPAINTFROM = 2400,
  318. CASCADEREPAINTRECTFROM = 2401,
  319. CASCADEREPAINTRGNFROM = 2402,
  320. CASCADEREPAINT = 2403,
  321. CASCADEREPAINTRECT = 2405,
  322. CASCADEREPAINTRGN = 2406,
  323. REPAINT = 2500,
  324. GETTEXTUREWND = 2600,
  325. ONACTIVATE = 2700,
  326. ACTIVATE = 2710,
  327. ONDEACTIVATE = 2800,
  328. ISACTIVATED = 2801,
  329. GETPOSITION = 2900,
  330. GETREGION = 3000,
  331. GETREGIONOP = 3001,
  332. INVALWNDRGN = 3002,
  333. GETCOMPOSEDRGN = 3003,
  334. GETSUBTRACTORRGN = 3010,
  335. SETREGIONOP = 3004,
  336. SETRECTRGN = 3005,
  337. ISRECTRGN = 3006,
  338. //SETPARAM = 3200, // deprecated, use the xmlobject interface
  339. HANDLETRANSPARENCY = 3300,
  340. HANDLEDESKTOPALPHA = 3400,
  341. SETSTARTHIDDEN = 3500,
  342. GETRENDERRATIO = 3600,
  343. SETRENDERRATIO = 3610,
  344. SETRATIOLINKED = 3615,
  345. HANDLERATIO = 3620,
  346. //_RESIZE = 3700, // deprecated, cut
  347. _RESIZE = 3701,
  348. _MOVE = 3710,
  349. NOTIFYDEFERREDMOVE = 3720,
  350. CHECKDBLCLK = 3800,
  351. REGISTERROOTWNDCHILD = 3960,
  352. UNREGISTERROOTWNDCHILD = 3965,
  353. FINDROOTWNDCHILD= 3970,
  354. ENUMROOTWNDCHILDREN = 3975,
  355. GETNUMROOTWNDCHILDREN = 3980,
  356. ISVIRTUAL = 3950,
  357. BRINGVTOFRONT = 4000,
  358. BRINGVTOBACK = 4010,
  359. BRINGVABOVE = 4020,
  360. BRINGVBELOW = 4030,
  361. SETVCAPTURE = 4100,
  362. GETVCAPTURE = 4110,
  363. SETVTIMER = 4200,
  364. KILLVTIMER = 4210,
  365. PTINREGION = 4400,
  366. ONLBDBLCLK = 4500,
  367. ONRBDBLCLK = 4510,
  368. ONLBUP = 4520,
  369. ONRBUP = 4530,
  370. ONLBDOWN = 4540,
  371. ONRBDOWN = 4550,
  372. ONMOUSEMOVE = 4560,
  373. CLIENTTOSCREEN = 4600,
  374. SCREENTOCLIENT = 4610,
  375. GETNOTIFYID = 4700,
  376. SETENABLED = 4800,
  377. ISENABLED = 4810,
  378. ONENABLE = 4811,
  379. SETALPHA = 4900,
  380. GETALPHA = 4910,
  381. GETPAINTALPHA = 4911,
  382. SETTOOLTIP = 4920,
  383. RUNMODAL = 5000,
  384. ENDMODAL = 5010,
  385. WANTAUTOCONTEXTMENU = 5100,
  386. ONCANCELCAPTURE = 5200,
  387. CANCELCAPTURE = 5210,
  388. BRINGTOFRONT = 5300,
  389. BRINGTOBACK = 5310,
  390. SETFOCUS = 5401,
  391. GOTFOCUS = 5410,
  392. GETNEXTVFOCUS = 5420,
  393. SETVFOCUS = 5430,
  394. ONKILLFOCUS = 5440,
  395. ONGETFOCUS = 5450,
  396. WANTFOCUS = 5460,
  397. ONKEYDOWN = 5500,
  398. ONKEYUP = 5510,
  399. ONCHAR = 5520,
  400. ONACCELERATOREVENT = 5530,
  401. GETTIMERCLIENT = 5600,
  402. GETDEPENDENCYPTR = 6000,
  403. ADDMINMAXENFORCER = 6400,
  404. REMOVEMINMAXENFORCER = 6410,
  405. GETNUMMINMAXENFORCERS = 6420,
  406. ENUMMINMAXENFORCER = 6430,
  407. SIGNALMINMAXCHANGED = 6440,
  408. ROOTWNDONACTION = 6300,
  409. SETRENDERBASETEXTURE = 6600,
  410. GETRENDERBASETEXTURE = 6610,
  411. RENDERBASETEXTURE=6611,
  412. GETGUIOBJECT = 6620,
  413. ONSYSKEYDOWN = 6630,
  414. ONSYSKEYUP = 6640,
  415. GETFLAG = 6650,
  416. TRIGGEREVENT = 6660,
  417. SETALLOWDEACTIVATE = 6700,
  418. ALLOWDEACTIVATE=6710,
  419. FINDWND_BYID=6800,
  420. FINDWND_BYGUID=6810,
  421. FINDWND_BYCB=6820,
  422. FINDWNDCHAIN=6830,
  423. SETTABORDER=6900,
  424. GETTABORDER=6910,
  425. SETAUTOTABORDER=6920,
  426. GETTAB=6940,
  427. SETVIRTUALTABORDER=7000,
  428. GETVIRTUALTABORDER=7010,
  429. SETVIRTUALAUTOTABORDER=7020,
  430. GETCURVIRTUALCHILDFOCUS=7030,
  431. FOCUSNEXT=7100,
  432. FOCUSPREVIOUS=7110,
  433. SETWINDOWTITLE=7120,
  434. GETNUMTABS = 7200,
  435. ENUMTAB = 7210,
  436. ONSETROOTFOCUS = 7300,
  437. GETFOCUSONCLICK = 7400,
  438. SETFOCUSONCLICK = 7410,
  439. SETNODOUBLECLICKS = 7500,
  440. SETNOLEFTCLICKS = 7510,
  441. SETNORIGHTCLICKS = 7520,
  442. SETNOMOUSEMOVES = 7530,
  443. SETNOCONTEXTMENUS = 7540,
  444. WANTDOUBLECLICKS = 7600,
  445. WANTLEFTCLICKS = 7610,
  446. WANTRIGHTCLICKS = 7620,
  447. WANTMOUSEMOVES = 7630,
  448. WANTCONTEXTMENUS = 7640,
  449. WANTACTIVATION = 7700,
  450. SETDEFAULTCURSOR = 7800,
  451. GETACCESSIBLEOBJECT = 8000,
  452. ACCGETSTATE = 8104,
  453. #ifdef EXPERIMENTAL_INDEPENDENT_AOT
  454. SETALWAYSONTOP = 8500,
  455. GETALWAYSONTOP = 8501,
  456. #endif
  457. #ifndef WA3COMPATIBILITY
  458. GETDROPTARGET = 8800,
  459. SETDROPTARGET = 8810,
  460. #endif
  461. ISMINIMIZED = 8900,
  462. MAXIMIZE = 9200,
  463. RESTORE = 9210,
  464. GETRESTOREDRECT = 9220,
  465. };
  466. };
  467. // helper functions definitions
  468. inline OSWINDOWHANDLE ifc_window::getOsWindowHandle() {
  469. return _call(GETOSWINDOWHANDLE, (OSWINDOWHANDLE)NULL);
  470. }
  471. inline OSMODULEHANDLE ifc_window::getOsModuleHandle() {
  472. return _call(GETOSMODULEHANDLE, (OSMODULEHANDLE)NULL);
  473. }
  474. inline void ifc_window::performBatchProcesses() {
  475. _voidcall(BATCHPROCESSES);
  476. }
  477. inline const wchar_t *ifc_window::getRootWndName()
  478. {
  479. return _call(GETROOTWNDNAME, (const wchar_t *)NULL);
  480. }
  481. inline const wchar_t *ifc_window::getId() {
  482. return _call(GETID, (const wchar_t *)NULL);
  483. }
  484. inline DragInterface *ifc_window::getDragInterface() {
  485. return _call(GETDRAGINTERFACE, (DragInterface*)0);
  486. }
  487. inline ifc_window *ifc_window::rootWndFromPoint(POINT *pt) {
  488. return _call(FROMPOINT, (ifc_window*)0, pt);
  489. }
  490. inline int ifc_window::getWindowRect(RECT *r) {
  491. return _voidcall(GETWINDOWRECT, r);
  492. }
  493. inline int ifc_window::isVisible(int within) {
  494. return _call(ISVISIBLE, 0, within);
  495. }
  496. inline int ifc_window::paintTree(ifc_canvas *canvas, api_region *r) {
  497. return _call(PAINTTREE, 0, canvas, r);
  498. }
  499. inline Canvas *ifc_window::getFrameBuffer() {
  500. return _call(GETFRAMEBUFFER, (Canvas *)NULL);
  501. }
  502. inline int ifc_window::paint(Canvas *canvas, api_region *r) {
  503. return _call(PAINT, 0, canvas, r);
  504. }
  505. inline ifc_window *ifc_window::getParent() {
  506. return _call(GETPARENT, (ifc_window *)0);
  507. }
  508. inline ifc_window *ifc_window::getRootParent() {
  509. return _call(GETROOTPARENT, (ifc_window *)0);
  510. }
  511. inline ifc_window *ifc_window::getDesktopParent() {
  512. return _call(GETDESKTOPPARENT, (ifc_window *)0);
  513. }
  514. inline void ifc_window::setParent(ifc_window *parent) {
  515. _voidcall(SETPARENT, parent);
  516. }
  517. inline int ifc_window::childNotify(ifc_window *child, int msg, intptr_t p1, intptr_t p2) {
  518. return _call(CHILDNOTIFY, 0, child, msg, p1, p2);
  519. }
  520. inline int ifc_window::getPreferences(int what) {
  521. return _call(GETPREFERENCES, 0, what);
  522. }
  523. inline void ifc_window::setPreferences(int what, int v) {
  524. _voidcall(SETPREFERENCES, what, v);
  525. }
  526. inline void ifc_window::cancelCapture() {
  527. _voidcall(CANCELCAPTURE, 0);
  528. }
  529. inline void ifc_window::onCancelCapture() {
  530. _voidcall(ONCANCELCAPTURE, 0);
  531. }
  532. inline int ifc_window::isClickThrough() {
  533. return _call(CLICKTHROUGH, 0);
  534. }
  535. inline void ifc_window::setClickThrough(int ct) {
  536. _voidcall(SETCLICKTHROUGH, ct);
  537. }
  538. inline ifc_window *ifc_window::getForwardWnd() {
  539. return _call(GETFORWARDWND, this);
  540. }
  541. inline void ifc_window::clientToScreen(int *x, int *y) {
  542. _voidcall(CLIENTSCREEN, x, y);
  543. }
  544. inline void ifc_window::screenToClient(int *x, int *y) {
  545. _voidcall(SCREENCLIENT, x, y);
  546. }
  547. inline int ifc_window::init(ifc_window *parent, int nochild) {
  548. return _call(INIT, 0, parent, nochild);
  549. }
  550. inline int ifc_window::isInited() {
  551. return _call(ISINITED, 0);
  552. }
  553. inline int ifc_window::isPostOnInit() {
  554. return _call(ISPOSTONINIT, 0);
  555. }
  556. inline int ifc_window::setVirtual(int i) {
  557. return _call(SETVIRTUAL, 0, i);
  558. }
  559. inline int ifc_window::getCursorType(int x, int y) {
  560. return _call(GETCURSORTYPE, 0, x, y);
  561. }
  562. inline OSCURSORHANDLE ifc_window::getCustomCursor(int x, int y) {
  563. return _call(GETCUSTOMCURSOR, (OSCURSORHANDLE)NULL, x, y);
  564. }
  565. inline void ifc_window::getClientRect(RECT *r) {
  566. _voidcall(GETCLIENTRECT, r);
  567. }
  568. inline void ifc_window::getNonClientRect(RECT *rect) {
  569. _voidcall(GETNONCLIENTRECT, rect);
  570. }
  571. inline void ifc_window::getPosition(POINT *pt) {
  572. _voidcall(GETPOSITION, pt);
  573. }
  574. inline void ifc_window::setVisible(int show) {
  575. _voidcall(SETVISIBLE, show);
  576. }
  577. inline void ifc_window::setCloaked(int cloak) {
  578. _voidcall(SETCLOAKED, cloak);
  579. }
  580. inline void ifc_window::onSetVisible(int show) {
  581. _voidcall(ONSETVISIBLE, show);
  582. }
  583. inline void ifc_window::invalidate() {
  584. _voidcall(INVALIDATE);
  585. }
  586. inline void ifc_window::invalidateRect(RECT *r) {
  587. _voidcall(INVALIDATERECT, r);
  588. }
  589. inline void ifc_window::invalidateRgn(api_region *r) {
  590. _voidcall(INVALIDATERGN, r);
  591. }
  592. inline void ifc_window::onChildInvalidate(api_region *r, ifc_window *who) {
  593. _voidcall(ONCHILDINVALIDATE, r, who);
  594. }
  595. inline void ifc_window::invalidateFrom(ifc_window *who) {
  596. _voidcall(INVALIDATEFROM, who);
  597. }
  598. inline void ifc_window::invalidateRectFrom(RECT *r, ifc_window *who) {
  599. _voidcall(INVALIDATERECTFROM, r, who);
  600. }
  601. inline void ifc_window::invalidateRgnFrom(api_region *r, ifc_window *who) {
  602. _voidcall(INVALIDATERGNFROM, r, who);
  603. }
  604. inline void ifc_window::validate() {
  605. _voidcall(VALIDATE);
  606. }
  607. inline void ifc_window::validateRect(RECT *r) {
  608. _voidcall(VALIDATERECT, r);
  609. }
  610. inline void ifc_window::validateRgn(api_region *reg) {
  611. _voidcall(VALIDATERGN, reg);
  612. }
  613. inline int ifc_window::onSiblingInvalidateRgn(api_region *r, ifc_window *who, int who_idx, int my_idx) {
  614. return _call(ONSIBINVALIDATE, 0, r, who, who_idx, my_idx);
  615. }
  616. inline int ifc_window::wantSiblingInvalidations() {
  617. return _call(WANTSIBINVALIDATE, 0);
  618. }
  619. inline int ifc_window::cascadeRepaintFrom(ifc_window *who, int pack) {
  620. return _call(CASCADEREPAINTFROM, 0, who, pack);
  621. }
  622. inline int ifc_window::cascadeRepaintRgnFrom(api_region *reg, ifc_window *who, int pack) {
  623. return _call(CASCADEREPAINTRGNFROM, 0, reg, who, pack);
  624. }
  625. inline int ifc_window::cascadeRepaintRectFrom(RECT *r, ifc_window *who, int pack) {
  626. return _call(CASCADEREPAINTRECTFROM, 0, r, who, pack);
  627. }
  628. inline int ifc_window::cascadeRepaint(int pack) {
  629. return _call(CASCADEREPAINT, 0, pack);
  630. }
  631. inline int ifc_window::cascadeRepaintRgn(api_region *reg, int pack) {
  632. return _call(CASCADEREPAINTRGN, 0, reg, pack);
  633. }
  634. inline int ifc_window::cascadeRepaintRect(RECT *r, int pack) {
  635. return _call(CASCADEREPAINTRECT, 0, r, pack);
  636. }
  637. inline void ifc_window::repaint() {
  638. _voidcall(REPAINT);
  639. }
  640. inline ifc_window *ifc_window::getBaseTextureWindow() {
  641. return _call(GETTEXTUREWND, (ifc_window *)0);
  642. }
  643. inline int ifc_window::onActivate() {
  644. return _call(ONACTIVATE, 0);
  645. }
  646. inline void ifc_window::activate() {
  647. _voidcall(ACTIVATE);
  648. }
  649. inline int ifc_window::onDeactivate() {
  650. return _call(ONDEACTIVATE, 0);
  651. }
  652. inline int ifc_window::isActive() {
  653. return _call(ISACTIVATED, 0);
  654. }
  655. inline api_region *ifc_window::getRegion() {
  656. return _call(GETREGION, (api_region *)NULL);
  657. }
  658. inline int ifc_window::handleTransparency() {
  659. return _call(HANDLETRANSPARENCY, 0);
  660. }
  661. inline int ifc_window::handleDesktopAlpha() {
  662. return _call(HANDLEDESKTOPALPHA, 0);
  663. }
  664. inline void ifc_window::setStartHidden(int sh) {
  665. _voidcall(SETSTARTHIDDEN, sh);
  666. }
  667. inline double ifc_window::getRenderRatio() {
  668. return _call(GETRENDERRATIO, 1.0);
  669. }
  670. inline void ifc_window::setRenderRatio(double r) {
  671. _voidcall(SETRENDERRATIO, r);
  672. }
  673. inline void ifc_window::setRatioLinked(int l) {
  674. _voidcall(SETRATIOLINKED, l);
  675. }
  676. inline int ifc_window::handleRatio() {
  677. return _call(HANDLERATIO, 0);
  678. }
  679. inline void ifc_window::resize(int x, int y, int w, int h, int wantcb) {
  680. _voidcall(_RESIZE, x, y, w, h, wantcb);
  681. }
  682. inline void ifc_window::move(int x, int y) {
  683. _voidcall(_MOVE, x, y);
  684. }
  685. inline void ifc_window::notifyDeferredMove(int x, int y) {
  686. _voidcall(NOTIFYDEFERREDMOVE, x, y);
  687. }
  688. inline int ifc_window::checkDoubleClick(int button, int x, int y) {
  689. return _call(CHECKDBLCLK, 0, button, x, y);
  690. }
  691. inline void ifc_window::registerRootWndChild(ifc_window *child) {
  692. _voidcall(REGISTERROOTWNDCHILD, child);
  693. }
  694. inline void ifc_window::unregisterRootWndChild(ifc_window *child) {
  695. _voidcall(UNREGISTERROOTWNDCHILD, child);
  696. }
  697. inline ifc_window *ifc_window::findRootWndChild(int x, int y, int only_virtuals) {
  698. return _call(FINDROOTWNDCHILD, (ifc_window *)NULL, x, y, only_virtuals);
  699. }
  700. inline ifc_window *ifc_window::enumRootWndChildren(int _enum) {
  701. return _call(ENUMROOTWNDCHILDREN, (ifc_window *)NULL, _enum);
  702. }
  703. inline int ifc_window::getNumRootWndChildren() {
  704. return _call(GETNUMROOTWNDCHILDREN, 0);
  705. }
  706. inline int ifc_window::isVirtual() {
  707. return _call(ISVIRTUAL, 0);
  708. }
  709. inline void ifc_window::bringVirtualToFront(ifc_window *w) {
  710. _voidcall(BRINGVTOFRONT, w);
  711. }
  712. inline void ifc_window::bringVirtualToBack(ifc_window *w) {
  713. _voidcall(BRINGVTOBACK, w);
  714. }
  715. inline void ifc_window::bringVirtualAbove(ifc_window *w, ifc_window *b) {
  716. _voidcall(BRINGVABOVE, w, b);
  717. }
  718. inline void ifc_window::bringVirtualBelow(ifc_window *w, ifc_window *b) {
  719. _voidcall(BRINGVBELOW, w, b);
  720. }
  721. inline void ifc_window::setVirtualChildCapture(ifc_window *child) {
  722. _voidcall(SETVCAPTURE, child);
  723. }
  724. inline ifc_window *ifc_window::getVirtualChildCapture() {
  725. return _call(GETVCAPTURE, (ifc_window *)NULL);
  726. }
  727. inline bool ifc_window::ptInRegion(int x, int y) {
  728. return _call(PTINREGION, (bool)false, x, y);
  729. }
  730. inline int ifc_window::onLeftButtonDblClk(int x, int y) {
  731. return _call(ONLBDBLCLK, 0, x, y);
  732. }
  733. inline int ifc_window::onRightButtonDblClk(int x, int y) {
  734. return _call(ONRBDBLCLK, 0, x, y);
  735. }
  736. inline int ifc_window::onLeftButtonUp(int x, int y) {
  737. return _call(ONLBUP, 0, x, y);
  738. }
  739. inline int ifc_window::onRightButtonUp(int x, int y) {
  740. return _call(ONRBUP, 0, x, y);
  741. }
  742. inline int ifc_window::onLeftButtonDown(int x, int y) {
  743. return _call(ONLBDOWN, 0, x, y);
  744. }
  745. inline int ifc_window::onRightButtonDown(int x, int y) {
  746. return _call(ONRBDOWN, 0, x, y);
  747. }
  748. inline int ifc_window::onMouseMove(int x, int y) {
  749. return _call(ONMOUSEMOVE, 0, x, y);
  750. }
  751. inline int ifc_window::getNotifyId() {
  752. return _call(GETNOTIFYID, 0);
  753. }
  754. inline void *ifc_window::getInterface(GUID interface_guid) {
  755. return _call(GETINTERFACE, (void *)NULL, interface_guid);
  756. }
  757. inline void ifc_window::setEnabled(int e) {
  758. _voidcall(SETENABLED, e);
  759. }
  760. inline int ifc_window::isEnabled(int within) {
  761. return _call(ISENABLED, 0, within);
  762. }
  763. inline int ifc_window::onEnable(int e) {
  764. return _voidcall(ONENABLE, e);
  765. }
  766. inline void ifc_window::setAlpha(int activealpha, int inactivealpha) {
  767. _voidcall(SETALPHA, activealpha, inactivealpha);
  768. }
  769. inline void ifc_window::getAlpha(int *active, int *inactive) {
  770. _voidcall(GETALPHA, active, inactive);
  771. }
  772. inline int ifc_window::getPaintingAlpha() {
  773. return _call(GETPAINTALPHA, 255);
  774. }
  775. inline void ifc_window::setTip(const wchar_t *tip) {
  776. _voidcall(SETTOOLTIP, tip);
  777. }
  778. inline int ifc_window::runModal() {
  779. return _call(RUNMODAL, 0);
  780. }
  781. inline void ifc_window::endModal(int retcode) {
  782. _voidcall(ENDMODAL, retcode);
  783. }
  784. inline int ifc_window::wantAutoContextMenu() {
  785. return _call(WANTAUTOCONTEXTMENU, 0);
  786. }
  787. inline int ifc_window::wantActivation() {
  788. return _call(WANTACTIVATION, 1);
  789. }
  790. inline void ifc_window::bringToFront() {
  791. _voidcall(BRINGTOFRONT);
  792. }
  793. inline void ifc_window::bringToBack() {
  794. _voidcall(BRINGTOBACK);
  795. }
  796. inline void ifc_window::setFocus() {
  797. _voidcall(SETFOCUS);
  798. }
  799. inline int ifc_window::gotFocus() {
  800. return _call(GOTFOCUS, 0);
  801. }
  802. inline int ifc_window::onGetFocus() {
  803. return _call(ONGETFOCUS, 0);
  804. }
  805. inline int ifc_window::onKillFocus() {
  806. return _call(ONKILLFOCUS, 0);
  807. }
  808. inline ifc_window *ifc_window::getNextVirtualFocus(ifc_window *cur) {
  809. return _call(GETNEXTVFOCUS, (ifc_window *)NULL, cur);
  810. }
  811. inline int ifc_window::wantFocus() {
  812. return _call(WANTFOCUS, 0);
  813. }
  814. inline int ifc_window::onAcceleratorEvent(const wchar_t *name) {
  815. return _call(ONACCELERATOREVENT, 0, name);
  816. }
  817. inline int ifc_window::onChar(unsigned int c) {
  818. return _call(ONCHAR, 0, c);
  819. }
  820. inline int ifc_window::onKeyDown(int keycode) {
  821. return _call(ONKEYDOWN, 0, keycode);
  822. }
  823. inline int ifc_window::onKeyUp(int keycode) {
  824. return _call(ONKEYUP, 0, keycode);
  825. }
  826. inline int ifc_window::onSysKeyDown(int keycode, int keydata) {
  827. return _call(ONSYSKEYDOWN, 0, keycode, keydata);
  828. }
  829. inline int ifc_window::onSysKeyUp(int keycode, int keydata) {
  830. return _call(ONSYSKEYUP, 0, keycode, keydata);
  831. }
  832. inline void ifc_window::setVirtualChildFocus(ifc_window *w) {
  833. _voidcall(SETVFOCUS, w);
  834. }
  835. inline int ifc_window::getRegionOp() {
  836. return _call(GETREGIONOP, 0);
  837. }
  838. inline void ifc_window::invalidateWindowRegion() {
  839. _voidcall(INVALWNDRGN);
  840. }
  841. inline api_region *ifc_window::getComposedRegion() {
  842. return _call(GETCOMPOSEDRGN, (api_region *)NULL);
  843. }
  844. inline api_region *ifc_window::getSubtractorRegion() {
  845. return _call(GETSUBTRACTORRGN, (api_region *)NULL);
  846. }
  847. inline void ifc_window::setRegionOp(int op) {
  848. _voidcall(SETREGIONOP, op);
  849. }
  850. inline void ifc_window::setRectRgn(int rrgn) {
  851. _voidcall(SETRECTRGN, rrgn);
  852. }
  853. inline int ifc_window::isRectRgn() {
  854. return _call(ISRECTRGN, 0);
  855. }
  856. inline TimerClient *ifc_window::getTimerClient() {
  857. return _call(GETTIMERCLIENT, (TimerClient *)NULL);
  858. }
  859. inline ifc_dependent *ifc_window::getDependencyPtr() {
  860. return _call(GETDEPENDENCYPTR, (ifc_dependent *)NULL);
  861. }
  862. inline void ifc_window::addMinMaxEnforcer(ifc_window *w) {
  863. _voidcall(ADDMINMAXENFORCER, w);
  864. }
  865. inline void ifc_window::removeMinMaxEnforcer(ifc_window *w) {
  866. _voidcall(REMOVEMINMAXENFORCER, w);
  867. }
  868. inline ifc_window *ifc_window::enumMinMaxEnforcer(int n) {
  869. return _call(ENUMMINMAXENFORCER, (ifc_window *)NULL, n);
  870. }
  871. inline int ifc_window::getNumMinMaxEnforcers() {
  872. return _call(GETNUMMINMAXENFORCERS, 0);
  873. }
  874. inline void ifc_window::signalMinMaxEnforcerChanged() {
  875. _voidcall(SIGNALMINMAXCHANGED, 0);
  876. }
  877. inline int ifc_window::onAction(const wchar_t *action, const wchar_t *param, int x, int y, intptr_t p1, intptr_t p2, void *data, size_t datalen, ifc_window *source) {
  878. return _call(ROOTWNDONACTION, 0, action, param, x, y, p1, p2, data, datalen, source);
  879. }
  880. inline void ifc_window::setRenderBaseTexture(int i) {
  881. _voidcall(SETRENDERBASETEXTURE, i);
  882. }
  883. inline int ifc_window::getRenderBaseTexture() {
  884. return _call(GETRENDERBASETEXTURE, 0);
  885. }
  886. inline void ifc_window::renderBaseTexture(ifc_canvas *c, const RECT *r, int alpha)
  887. {
  888. _voidcall(RENDERBASETEXTURE, c, r, alpha);
  889. }
  890. inline GuiObject *ifc_window::getGuiObject() {
  891. return _call(GETGUIOBJECT, (GuiObject *) NULL);
  892. }
  893. inline int ifc_window::triggerEvent(int event, intptr_t p1, intptr_t p2) {
  894. return _call(TRIGGEREVENT, 0, event, p1, p2);
  895. }
  896. inline int ifc_window::getFlag(int flag) {
  897. return _call(GETFLAG, 0, flag);
  898. }
  899. inline int ifc_window::allowDeactivation() {
  900. return _call(ALLOWDEACTIVATE, 1);
  901. }
  902. inline void ifc_window::setAllowDeactivation(int allow) {
  903. _voidcall(SETALLOWDEACTIVATE, allow);
  904. }
  905. inline ifc_window *ifc_window::findWindow(const wchar_t *id) {
  906. return _call(FINDWND_BYID, (ifc_window *)NULL, id);
  907. }
  908. inline ifc_window *ifc_window::findWindowByInterface(GUID interface_guid) {
  909. return _call(FINDWND_BYGUID, (ifc_window *)NULL, interface_guid);
  910. }
  911. inline ifc_window *ifc_window::findWindowByCallback(FindObjectCallback *cb) {
  912. return _call(FINDWND_BYCB, (ifc_window *)NULL, cb);
  913. }
  914. inline ifc_window *ifc_window::findWindowChain(FindObjectCallback *cb, ifc_window *wcaller) {
  915. return _call(FINDWNDCHAIN, (ifc_window *)NULL, cb, wcaller);
  916. }
  917. inline void ifc_window::setTabOrder(int a) {
  918. _voidcall(SETTABORDER, a);
  919. }
  920. inline int ifc_window::getTabOrder() {
  921. return _call(GETTABORDER, -1);
  922. }
  923. inline void ifc_window::setAutoTabOrder() {
  924. _voidcall(SETAUTOTABORDER, 0);
  925. }
  926. inline void ifc_window::setVirtualTabOrder(ifc_window *w, int a) {
  927. _voidcall(SETVIRTUALTABORDER, w, a);
  928. }
  929. inline int ifc_window::getVirtualTabOrder(ifc_window *w) {
  930. return _call(GETVIRTUALTABORDER, 0, w);
  931. }
  932. inline void ifc_window::setVirtualAutoTabOrder(ifc_window *w) {
  933. _voidcall(SETVIRTUALAUTOTABORDER, w);
  934. }
  935. inline ifc_window *ifc_window::getCurVirtualChildFocus() {
  936. return _call(GETCURVIRTUALCHILDFOCUS, (ifc_window *)NULL);
  937. }
  938. inline ifc_window *ifc_window::getTab(int what) {
  939. return _call(GETTAB, (ifc_window *)NULL, what);
  940. }
  941. inline void ifc_window::focusNext() {
  942. _voidcall(FOCUSNEXT);
  943. }
  944. inline void ifc_window::focusPrevious() {
  945. _voidcall(FOCUSPREVIOUS);
  946. }
  947. inline void ifc_window::setWindowTitle(const wchar_t *title){
  948. _voidcall(SETWINDOWTITLE, title);
  949. }
  950. inline int ifc_window::getNumTabs() {
  951. return _call(GETNUMTABS, 0);
  952. }
  953. inline ifc_window *ifc_window::enumTab(int i) {
  954. return _call(ENUMTAB, (ifc_window *)NULL, i);
  955. }
  956. inline void ifc_window::onSetRootFocus(ifc_window *w) {
  957. _voidcall(ONSETROOTFOCUS, w);
  958. }
  959. inline int ifc_window::getFocusOnClick() {
  960. return _call(GETFOCUSONCLICK, 0);
  961. }
  962. inline void ifc_window::setFocusOnClick(int i) {
  963. _voidcall(SETFOCUSONCLICK, i);
  964. }
  965. inline void ifc_window::setNoDoubleClicks(int no) {
  966. _voidcall(SETNODOUBLECLICKS, no);
  967. }
  968. inline void ifc_window::setNoLeftClicks(int no) {
  969. _voidcall(SETNOLEFTCLICKS, no);
  970. }
  971. inline void ifc_window::setNoRightClicks(int no) {
  972. _voidcall(SETNORIGHTCLICKS, no);
  973. }
  974. inline void ifc_window::setNoMouseMoves(int no) {
  975. _voidcall(SETNOMOUSEMOVES, no);
  976. }
  977. inline void ifc_window::setNoContextMenus(int no) {
  978. _voidcall(SETNOCONTEXTMENUS, no);
  979. }
  980. inline int ifc_window::wantDoubleClicks() {
  981. return _call(WANTDOUBLECLICKS, 1);
  982. }
  983. inline int ifc_window::wantRightClicks() {
  984. return _call(WANTLEFTCLICKS, 1);
  985. }
  986. inline int ifc_window::wantLeftClicks() {
  987. return _call(WANTRIGHTCLICKS, 1);
  988. }
  989. inline int ifc_window::wantMouseMoves() {
  990. return _call(WANTMOUSEMOVES, 1);
  991. }
  992. inline int ifc_window::wantContextMenus() {
  993. return _call(WANTCONTEXTMENUS, 1);
  994. }
  995. inline void ifc_window::setDefaultCursor(Cursor *c) {
  996. _voidcall(SETDEFAULTCURSOR, c);
  997. }
  998. inline Accessible *ifc_window::getAccessibleObject(int createifnotexist) {
  999. return _call(GETACCESSIBLEOBJECT, (Accessible*)NULL, createifnotexist);
  1000. }
  1001. inline int ifc_window::accessibility_getState() {
  1002. return _call(ACCGETSTATE, 0);
  1003. }
  1004. #ifdef EXPERIMENTAL_INDEPENDENT_AOT
  1005. inline void ifc_window::setAlwaysOnTop(int i) {
  1006. _voidcall(SETALWAYSONTOP, i);
  1007. }
  1008. inline int ifc_window::getAlwaysOnTop() {
  1009. return _call(GETALWAYSONTOP, 0);
  1010. }
  1011. #endif
  1012. #ifndef WA3COMPATIBILITY
  1013. inline void ifc_window::setDropTarget(void *dt) {
  1014. _voidcall(SETDROPTARGET, dt);
  1015. }
  1016. inline void *ifc_window::getDropTarget() {
  1017. return _call(GETDROPTARGET, (void *)NULL);
  1018. }
  1019. #endif
  1020. inline int ifc_window::isMinimized() {
  1021. return _call(ISMINIMIZED, 0);
  1022. }
  1023. inline void ifc_window::maximize(int axis) {
  1024. _voidcall(MAXIMIZE, axis);
  1025. }
  1026. inline void ifc_window::restore(int what) {
  1027. _voidcall(RESTORE, what);
  1028. }
  1029. inline int ifc_window::getRestoredRect(RECT *r)
  1030. {
  1031. return _call(GETRESTOREDRECT, 0, r);
  1032. }
  1033. #endif