home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / classlib.zip / pm.zip / usr / include / pm / window.h < prev    next >
C/C++ Source or Header  |  1994-08-31  |  1KB  |  60 lines

  1. #ifndef _WINDOW_H_
  2. #define _WINDOW_H_
  3.  
  4. #define INCL_PM
  5. #include <objc/os2.h>
  6. #include <objc/Object.h>
  7.  
  8. #define WINDOW_CLASS "ObjcWindow"
  9.  
  10. @interface Window : Object
  11. {
  12.   HWND    window;
  13.  
  14.   Window *child;
  15.   Window *sibling;
  16. }
  17.  
  18. // initializers and destructors
  19. - init;
  20. - associate: (HWND) hwnd;
  21. - free;
  22.  
  23. // methods concerning window hierarchy
  24. - createObjects;
  25. - insertChild: aChild;
  26. - insertSibling: aSibling;
  27. - findFromID: (USHORT) anId;
  28. - findFromHWND: (HWND) aHwnd;
  29.  
  30. // methods for access to window words
  31. - (char *) text: (char *) buffer;
  32. - (int) textLength;
  33. - setText: (const char *) buffer;
  34. - setSize: (USHORT) x : (USHORT) y : (USHORT) w : (USHORT) h;
  35. - size: (PSWP) aSize;
  36. - (USHORT) width;   // width of window
  37. - (USHORT) height;  // height of window
  38. - (USHORT) xoffset; // horizontal offset of lower left corner
  39. - (USHORT) yoffset; // vertical offset of lower left corner
  40.  
  41. // methods for access to instance variables
  42. - (HWND) window;
  43. - (USHORT) pmId;
  44.  
  45. // methods for access to PM messages
  46. - enable;     // enable window
  47. - disable;    // disable window
  48. - activate;   // activate window
  49. - deactivate; // deactivate window
  50.  
  51. // message loop
  52. - (MRESULT) handleMessage: (ULONG) msg
  53.             withParams: (MPARAM) mp1 and: (MPARAM) mp2;
  54.  
  55. @end
  56.  
  57. MRESULT EXPENTRY __windowFunction (HWND hwnd,ULONG msg,MPARAM mp1,MPARAM mp2);
  58.  
  59. #endif
  60.