guiobj.h 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423
  1. #ifndef __GUIOBJ_H
  2. #define __GUIOBJ_H
  3. #include <api/timer/timerclient.h>
  4. #include <api/wnd/api_window.h>
  5. #include <bfc/string/StringW.h>
  6. #include <bfc/depview.h>
  7. #include <api/skin/xmlobject.h>
  8. #include <api/script/objects/guiobjectx.h>
  9. #include <api/config/items/cfgitem.h>
  10. #include <api/wnd/wndclass/guiobjwnd.h>
  11. #include <api/script/objcontroller.h>
  12. class Layout;
  13. class FindObjectCallback;
  14. class ScriptObject;
  15. class SkinCursor;
  16. #ifndef _REDOCK_STRUCT_DEFINED
  17. #define _REDOCK_STRUCT_DEFINED
  18. typedef struct
  19. {
  20. Layout *l;
  21. RECT original_rect;
  22. }
  23. redock_struct;
  24. #endif
  25. class GuiObjectScriptController : public ScriptObjectControllerI
  26. {
  27. public:
  28. virtual const wchar_t *getClassName();
  29. virtual const wchar_t *getAncestorClassName();
  30. virtual ScriptObjectController *getAncestorController();
  31. virtual int getNumFunctions();
  32. virtual const function_descriptor_struct *getExportedFunctions();
  33. virtual GUID getClassGuid();
  34. virtual ScriptObject *instantiate();
  35. virtual void destroy(ScriptObject *o);
  36. virtual void *encapsulate(ScriptObject *o);
  37. virtual void deencapsulate(void *o);
  38. virtual int getInstantiable();
  39. private:
  40. static function_descriptor_struct exportedFunction[];
  41. };
  42. extern GuiObjectScriptController *guiController;
  43. #define GUIOBJECT_SCRIPTPARENT RootObject
  44. #define TARGET_FROZEN 0
  45. #define TARGET_RUNNING 1
  46. #define TARGETTIMER_ID 0x1879
  47. #define ANCHOR_NONE 0
  48. #define ANCHOR_LEFT 1
  49. #define ANCHOR_TOP 2
  50. #define ANCHOR_RIGHT 4
  51. #define ANCHOR_BOTTOM 8
  52. class GuiObjectI;
  53. class GuiObjectTimer : public TimerClientDI
  54. {
  55. public:
  56. GuiObjectTimer() { obj = NULL; }
  57. virtual ~GuiObjectTimer() { }
  58. public:
  59. virtual void timerclient_timerCallback(int id);
  60. virtual void setGuiObjectI(GuiObjectI *o) { obj = o; }
  61. private:
  62. GuiObjectI *obj;
  63. };
  64. class GuiObjectI : public GuiObjectX, public DependentViewerTPtr<CfgItem>
  65. {
  66. public:
  67. GuiObjectI(ScriptObject *o);
  68. virtual ~GuiObjectI();
  69. virtual ifc_window *guiobject_getRootWnd();
  70. virtual void guiobject_setRootWnd(ifc_window *w);
  71. virtual void guiobject_onInit();
  72. virtual void guiobject_getGuiPosition(int *x, int *y, int *w, int *h, int *rx, int *ry, int *rw, int *rh);
  73. virtual void guiobject_setGuiPosition(int *x, int *y, int *w, int *h, int *rx, int *ry, int *rw, int *rh);
  74. virtual int guiobject_getAnchoragePosition(int *x1, int *y1, int *x2, int *y2, int *anchor);
  75. virtual void guiobject_setAnchoragePosition(int *x1, int *y1, int *x2, int *y2, int *anchor);
  76. virtual void guiobject_validateAnchorage();
  77. virtual void guiobject_setParentGroup(Group *g);
  78. virtual ScriptObject *guiobject_getScriptObject();
  79. virtual RootObject *guiobject_getRootObject();
  80. virtual Group *guiobject_getParentGroup();
  81. virtual GuiObject *guiobject_getParent();
  82. virtual void guiobject_setTabOrder(int a);
  83. virtual void guiobject_setId(const wchar_t *id);
  84. virtual const wchar_t *guiobject_getId();
  85. virtual void guiobject_setTargetX(int tx);
  86. virtual void guiobject_setTargetY(int ty);
  87. virtual void guiobject_setTargetW(int tw);
  88. virtual void guiobject_setTargetH(int th);
  89. virtual void guiobject_setTargetA(int th);
  90. virtual void guiobject_setTargetSpeed(float s);
  91. virtual void guiobject_gotoTarget(void);
  92. virtual void guiobject_cancelTarget();
  93. virtual void guiobject_reverseTarget(int reverse);
  94. virtual int guiobject_getAutoWidth();
  95. virtual int guiobject_getAutoHeight();
  96. virtual int guiobject_movingToTarget();
  97. virtual void guiobject_bringToFront();
  98. virtual void guiobject_bringToBack();
  99. virtual void guiobject_bringAbove(GuiObject *o);
  100. virtual void guiobject_bringBelow(GuiObject *o);
  101. virtual void guiobject_setClickThrough(int ct);
  102. virtual int guiobject_isClickThrough();
  103. virtual void guiobject_setAutoSysMetricsX(int a);
  104. virtual void guiobject_setAutoSysMetricsY(int a);
  105. virtual void guiobject_setAutoSysMetricsW(int a);
  106. virtual void guiobject_setAutoSysMetricsH(int a);
  107. virtual int guiobject_getAutoSysMetricsX();
  108. virtual int guiobject_getAutoSysMetricsY();
  109. virtual int guiobject_getAutoSysMetricsW();
  110. virtual int guiobject_getAutoSysMetricsH();
  111. virtual int guiobject_getRegionOp();
  112. virtual void guiobject_setRegionOp(int op);
  113. virtual int guiobject_isRectRgn();
  114. virtual void guiobject_setRectRgn(int rrgn);
  115. virtual void guiobject_onLeftButtonDown(int x, int y);
  116. virtual void guiobject_onLeftButtonUp(int x, int y);
  117. virtual void guiobject_onRightButtonDown(int x, int y);
  118. virtual void guiobject_onRightButtonUp(int x, int y);
  119. virtual void guiobject_onLeftButtonDblClk(int x, int y);
  120. virtual void guiobject_onRightButtonDblClk(int x, int y);
  121. virtual int guiobject_onMouseWheelUp(int click, int lines);
  122. virtual int guiobject_onMouseWheelDown(int click, int lines);
  123. virtual void guiobject_onMouseMove(int x, int y);
  124. virtual void guiobject_onEnterArea();
  125. virtual void guiobject_onLeaveArea();
  126. virtual void guiobject_onEnable(int en);
  127. virtual void guiobject_setEnabled(int en);
  128. virtual void guiobject_onResize(int x, int y, int w, int h);
  129. virtual void guiobject_onSetVisible(int v);
  130. virtual void guiobject_onTargetReached();
  131. virtual void guiobject_setAlpha(int a);
  132. virtual void guiobject_setActiveAlpha(int a);
  133. virtual void guiobject_setInactiveAlpha(int a);
  134. virtual int guiobject_getAlpha();
  135. virtual int guiobject_getActiveAlpha();
  136. virtual int guiobject_getInactiveAlpha();
  137. virtual int guiobject_isActive();
  138. virtual void guiobject_onStartup();
  139. virtual int guiobject_setXmlParam(const wchar_t *param, const wchar_t *value);
  140. virtual const wchar_t *guiobject_getXmlParam(const wchar_t *param);
  141. virtual int guiobject_setXmlParamById(int id, const wchar_t *value);
  142. virtual svc_xuiObject *guiobject_getXuiService();
  143. virtual void guiobject_setXuiService(svc_xuiObject *svc);
  144. virtual waServiceFactory *guiobject_getXuiServiceFactory();
  145. virtual void guiobject_setXuiServiceFactory(waServiceFactory *fac);
  146. virtual GuiObject *guiobject_getTopParent();
  147. virtual Layout *guiobject_getParentLayout();
  148. virtual int guiobject_runModal();
  149. virtual void guiobject_endModal(int retcode);
  150. virtual void guiobject_popParentLayout();
  151. virtual void guiobject_registerStatusCB(GuiStatusCallback *cb);
  152. virtual void guiobject_setStatusText(const wchar_t *txt, int overlay = FALSE);
  153. virtual void guiobject_addAppCmds(AppCmds *commands);
  154. virtual void guiobject_removeAppCmds(AppCmds *commands);
  155. virtual void guiobject_pushCompleted(int max = 100);
  156. virtual void guiobject_incCompleted(int add = 1);
  157. virtual void guiobject_setCompleted(int pos);
  158. virtual void guiobject_popCompleted();
  159. virtual GuiObject *guiobject_findObject(const wchar_t *id);
  160. virtual GuiObject *guiobject_findObjectXY(int x, int y); // in client coordinates relative to this object
  161. virtual GuiObject *guiobject_findObjectByInterface(GUID interface_guid);
  162. virtual GuiObject *guiobject_findObjectByCallback(FindObjectCallback *cb);
  163. virtual void guiobject_setMover(int m);
  164. virtual int guiobject_getMover();
  165. virtual void guiobject_onCancelCapture();
  166. virtual void guiobject_onChar(wchar_t c);
  167. virtual void guiobject_onKeyDown(int vkcode);
  168. virtual void guiobject_onKeyUp(int vkcode);
  169. virtual FOURCC guiobject_getDropTarget();
  170. virtual void guiobject_setDropTarget(const wchar_t *strval);
  171. virtual void onTargetTimer();
  172. #ifdef USEAPPBAR
  173. virtual int guiobject_getAppBar();
  174. virtual void guiobject_setAppBar(int en);
  175. virtual void setAppBar(const wchar_t *en);
  176. #endif
  177. virtual void guiobject_setCfgAttrib(CfgItem *item, const wchar_t *name);
  178. virtual int viewer_onEvent(CfgItem *item, int event, intptr_t param, void *ptr, size_t ptrlen);
  179. virtual CfgItem *guiobject_getCfgItem();
  180. const wchar_t *guiobject_getCfgAttrib();
  181. virtual int guiobject_getCfgInt();
  182. virtual void guiobject_setCfgInt(int i);
  183. virtual float guiobject_getCfgFloat();
  184. virtual void guiobject_setCfgFloat(float f);
  185. virtual const wchar_t *guiobject_getCfgString();
  186. virtual void guiobject_setCfgString(const wchar_t *s);
  187. virtual int guiobject_hasCfgAttrib();
  188. virtual const wchar_t *guiobject_getName();
  189. virtual void guiobject_onAccelerator(const wchar_t *accel);
  190. virtual int guiobject_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);
  191. virtual int guiobject_wantFocus();
  192. virtual void guiobject_setNoDoubleClick(int no);
  193. virtual void guiobject_setNoLeftClick(int no);
  194. virtual void guiobject_setNoRightClick(int no);
  195. virtual void guiobject_setNoMouseMove(int no);
  196. virtual void guiobject_setNoContextMenu(int no);
  197. virtual void guiobject_setCursor(const wchar_t *c);
  198. virtual int guiobject_wantTranslation();
  199. virtual int guiobject_dragEnter(ifc_window *sourceWnd);
  200. virtual int guiobject_dragOver(int x, int y, ifc_window *sourceWnd);
  201. virtual int guiobject_dragLeave(ifc_window *sourceWnd);
  202. private:
  203. void setCfgAttr(const wchar_t *strvalue);
  204. virtual void dataChanged();
  205. void snapAdjust(ifc_window *w, RECT *r, int way);
  206. void infoMenu(GuiObject *o, int x, int y);
  207. int targetx, targety, targetw, targeth, targeta, targetspeed;
  208. int start_time;
  209. int targetstatus;
  210. void startTargetTimer();
  211. void stopTargetTimer();
  212. void ensureTimerOk();
  213. int autosysmetricsx, autosysmetricsy, autosysmetricsw, autosysmetricsh;
  214. int startx, starty, startw, starth, starta;
  215. int in_area;
  216. StringW guiobject_id;
  217. int clickthrough;
  218. StringW autonotify;
  219. ifc_window *my_root_wnd;
  220. ScriptObject *my_script_object;
  221. GuiObjectTimer timer;
  222. int gui_x;
  223. int gui_y;
  224. int gui_w;
  225. int gui_h;
  226. int gui_rx;
  227. int gui_ry;
  228. int gui_rw;
  229. int gui_rh;
  230. int mover, moving;
  231. FOURCC droptarget;
  232. Group *p_group;
  233. POINT anchor;
  234. svc_xuiObject *xuisvc;
  235. waServiceFactory *xuifac;
  236. PtrList<StringW> notifylist;
  237. int wantfocus;
  238. int anchor_x1, anchor_y1, anchor_x2, anchor_y2, anchorage, anchorage_invalidated;
  239. int reversetarget;
  240. SkinCursor *cursor;
  241. redock_struct redock;
  242. int dodragcheck;
  243. int m_lastnondocked_x, m_lastnondocked_y;
  244. #ifdef USEAPPBAR
  245. int m_dock_side;
  246. int m_initial_dock_side;
  247. #endif
  248. StringW cfgattrname;
  249. StringW cfgguid;
  250. CfgItem *cfgitem;
  251. int translate;
  252. };
  253. class GuiObject_ScriptMethods
  254. {
  255. public:
  256. static scriptVar getId(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  257. static scriptVar show(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  258. static scriptVar hide(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  259. static scriptVar isvisible(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  260. static scriptVar getAlpha(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  261. static scriptVar setAlpha(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar a);
  262. static scriptVar getActiveAlpha(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  263. static scriptVar setActiveAlpha(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar a);
  264. static scriptVar getInactiveAlpha(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  265. static scriptVar setInactiveAlpha(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar a);
  266. static scriptVar resize(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar x, scriptVar y, scriptVar w, scriptVar h);
  267. static scriptVar onResize(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar x, scriptVar y, scriptVar w, scriptVar h);
  268. static scriptVar init(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar parentGroup);
  269. static scriptVar bringToFront(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  270. static scriptVar bringToBack(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  271. static scriptVar bringAbove(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar obj);
  272. static scriptVar bringBelow(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar obj);
  273. static scriptVar getIdVar(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  274. static scriptVar onLeftButtonDown(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar x, scriptVar y);
  275. static scriptVar onLeftButtonUp(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar x, scriptVar y);
  276. static scriptVar onRightButtonDown(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar x, scriptVar y);
  277. static scriptVar onRightButtonUp(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar x, scriptVar y);
  278. static scriptVar onRightButtonDblClk(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar x, scriptVar y);
  279. static scriptVar onLeftButtonDblClk(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar x, scriptVar y);
  280. static scriptVar onMouseWheelUp(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar clicked, scriptVar lines);
  281. static scriptVar onMouseWheelDown(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar clicked, scriptVar lines);
  282. static scriptVar onMouseMove(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar x, scriptVar y);
  283. static scriptVar onEnterArea(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  284. static scriptVar onLeaveArea(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  285. static scriptVar onChar(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar c);
  286. static scriptVar onKeyDown(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar c);
  287. static scriptVar onKeyUp(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar c);
  288. static scriptVar setEnabled(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar a);
  289. static scriptVar getEnabled(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  290. static scriptVar onEnable(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar v);
  291. static scriptVar isMouseOver(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar x, scriptVar y);
  292. static scriptVar getLeft(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  293. static scriptVar getTop(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  294. static scriptVar getWidth(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  295. static scriptVar getHeight(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  296. static scriptVar setTargetX(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar a);
  297. static scriptVar setTargetY(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar a);
  298. static scriptVar setTargetW(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar a);
  299. static scriptVar setTargetH(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar a);
  300. static scriptVar setTargetA(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar a);
  301. static scriptVar setTargetSpeed(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar a);
  302. static scriptVar gotoTarget(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  303. static scriptVar onTargetReached(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  304. static scriptVar cancelTarget(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  305. static scriptVar reverseTarget(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar r);
  306. static scriptVar movingToTarget(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  307. static scriptVar setXmlParam(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar param, scriptVar value);
  308. static scriptVar getXmlParam(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar param);
  309. static scriptVar onSetVisible(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar v);
  310. static scriptVar onStartup(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  311. static scriptVar getGuiX(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  312. static scriptVar getGuiY(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  313. static scriptVar getGuiW(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  314. static scriptVar getGuiH(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  315. static scriptVar getGuiRelatX(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  316. static scriptVar getGuiRelatY(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  317. static scriptVar getGuiRelatW(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  318. static scriptVar getGuiRelatH(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  319. static scriptVar isActive(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  320. static scriptVar getParent(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  321. static scriptVar getTopParent(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  322. static scriptVar getParentLayout(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  323. static scriptVar runModal(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  324. static scriptVar endModal(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar retcode);
  325. static scriptVar popParentLayout(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  326. static scriptVar setStatusText(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar text, scriptVar overlay);
  327. static scriptVar findObject(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar id);
  328. static scriptVar findObjectXY(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar x, scriptVar y);
  329. static scriptVar getName(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  330. static scriptVar getMover(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  331. static scriptVar setMover(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar is);
  332. static scriptVar setDropTarget(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar targ);
  333. static scriptVar onCfgChanged(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  334. static scriptVar cfgGetInt(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  335. static scriptVar cfgSetInt(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar v);
  336. static scriptVar cfgGetString(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  337. static scriptVar cfgSetString(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar v);
  338. static scriptVar cfgGetFloat(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  339. static scriptVar cfgSetFloat(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar v);
  340. static scriptVar cfgGetGuid(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  341. static scriptVar cfgGetAttributeName(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  342. static scriptVar clientToScreenX(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar x);
  343. static scriptVar clientToScreenY(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar y);
  344. static scriptVar clientToScreenW(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar x);
  345. static scriptVar clientToScreenH(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar y);
  346. static scriptVar screenToClientX(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar x);
  347. static scriptVar screenToClientY(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar y);
  348. static scriptVar screenToClientW(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar x);
  349. static scriptVar screenToClientH(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar y);
  350. static scriptVar getAutoWidth(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  351. static scriptVar getAutoHeight(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  352. static scriptVar setFocus(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  353. static scriptVar onGetFocus(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  354. static scriptVar onKillFocus(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  355. static scriptVar onAccelerator(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar accel);
  356. static scriptVar sendAction(SCRIPT_FUNCTION_PARAMS, ScriptObject *obj, scriptVar action, scriptVar param, scriptVar x, scriptVar y, scriptVar p1, scriptVar p2);
  357. static scriptVar onAction(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar action, scriptVar param, scriptVar x, scriptVar y, scriptVar p1, scriptVar p2, scriptVar source);
  358. static scriptVar isMouseOverRect(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  359. static scriptVar getInterface(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar interfaceguid);
  360. static scriptVar onDragEnter(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  361. static scriptVar onDragOver(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar x, scriptVar y);
  362. static scriptVar onDragLeave(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  363. };
  364. extern const wchar_t guiobjectXuiStr[];
  365. extern char guiobjectXuiSvcName[];
  366. class GuiObjectXuiSvc : public XuiObjectSvc<GuiObjectWnd, guiobjectXuiStr, guiobjectXuiSvcName> {};
  367. #endif