home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / df3os2.zip / DESKTOP.H < prev    next >
C/C++ Source or Header  |  1993-09-23  |  2KB  |  60 lines

  1. // ---------- desktop.h
  2.  
  3. #ifndef DESKTOP_H
  4. #define DESKTOP_H
  5.  
  6. #include <dir.h>
  7. #include "screen.h"
  8. #include "cursor.h"
  9. #include "keyboard.h"
  10. #include "mouse.h"
  11. #include "speaker.h"
  12. #include "clock.h"
  13. #include "frame.h"
  14.  
  15. class DFWindow;
  16. class Application;
  17. class Dialog;
  18.  
  19. class DeskTop {
  20.     Application *apwnd;     // application window
  21.     DFWindow *infocus;      // current window with the focus
  22.     DFWindow *focuscapture; // current window with captured focus
  23.     int drive;                // drive upon open
  24.     char *path;                // subdirectory upon open
  25.     // ------- the desktop devices
  26.     Screen   sysscreen;     // the system screen
  27.     Mouse    sysmouse;      // the system mouse
  28.     Keyboard syskeyboard;   // the system keyboard
  29.     Cursor   syscursor;     // the system cursor
  30.     Clock    sysclock;      // the system clock
  31.     Speaker  sysspeaker;    // the system speaker
  32.     Frame    sysframe;        // dummy for moving and sizing
  33.     DFWindow *inWindow(DFWindow *wnd, int x, int y);
  34. public:
  35.     DeskTop();
  36.     ~DeskTop();
  37.     Application *ApplWnd() { return apwnd; }
  38.     void SetApplication(Application *ApWnd) { apwnd = ApWnd; }
  39.     Bool DispatchEvents();
  40.     DFWindow *InFocus()      { return infocus; }
  41.     DFWindow *FocusCapture() { return focuscapture; }
  42.     void SetFocus(DFWindow *wnd) { infocus = wnd; }
  43.     void SetFocusCapture(DFWindow *wnd) { focuscapture = wnd; }
  44.     DFWindow *inWindow(int x, int y)
  45.         { return inWindow((DFWindow *)apwnd, x, y); }
  46.     // ------- the desktop devices
  47.     Mouse&    mouse()       { return sysmouse;    }
  48.     Screen&   screen()      { return sysscreen;   }
  49.     Keyboard& keyboard()    { return syskeyboard; }
  50.     Cursor&   cursor()      { return syscursor;   }
  51.     Clock&    clock()       { return sysclock;    }
  52.     Speaker&  speaker()     { return sysspeaker;  }
  53.     Frame&    frame()       { return sysframe; }
  54. };
  55.  
  56. extern DeskTop desktop;
  57.  
  58. #endif
  59.  
  60.