Guest User

Untitled

a guest
Jan 3rd, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. EvtSpec wspecs[] = { { 'mous', mous_down }, { 'mous', mous_moved }, { 'mous', mous_wheel },
  2. { 'keyb', keyb_down }, { 'keyb', keyb_rep },
  3. { 'wind', win_resize }, { 'wind', win_active } , { 'wind', win_notactive } };
  4. targ = GetWindowEventTarget(wref);
  5. err = InstallEventHandler(targ, upp, 8, wspecs, disp, nil);
  6.  
  7. err = GetRootControl(wref, root);
  8. targ = GetControlEventTarget(root);
  9. err = InstallEventHandler(targ, upp, 1, cspecs, disp, nil);
  10.  
  11. switch (eclass) {
  12. case 'wind':
  13. if (ekind == win_resize) {
  14. OSResize();
  15. return true;
  16. }
  17.  
  18. if (ekind == win_active) {
  19. ActivateWindow(fWindow, true);
  20. return true;
  21. }
  22.  
  23. if (ekind == win_notactive) {
  24. ActivateWindow(fWindow, false);
  25. return true;
  26. }
  27. break;
Add Comment
Please, Sign In to add comment