home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / mitsch75.zip / scheme-7_5_17-src.zip / scheme-7.5.17 / src / microcode / os2pm.h < prev    next >
C/C++ Source or Header  |  1999-01-02  |  4KB  |  114 lines

  1. /* -*-C-*-
  2.  
  3. $Id: os2pm.h,v 1.13 1999/01/02 06:11:34 cph Exp $
  4.  
  5. Copyright (c) 1994-1999 Massachusetts Institute of Technology
  6.  
  7. This program is free software; you can redistribute it and/or modify
  8. it under the terms of the GNU General Public License as published by
  9. the Free Software Foundation; either version 2 of the License, or (at
  10. your option) any later version.
  11.  
  12. This program is distributed in the hope that it will be useful, but
  13. WITHOUT ANY WARRANTY; without even the implied warranty of
  14. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  15. General Public License for more details.
  16.  
  17. You should have received a copy of the GNU General Public License
  18. along with this program; if not, write to the Free Software
  19. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  20. */
  21.  
  22. #ifndef SCM_OS2PM_H
  23. #define SCM_OS2PM_H
  24.  
  25. typedef unsigned short psid_t;
  26. #define PSID_NONE 0
  27.  
  28. typedef unsigned short wid_t;
  29. #define WID_NONE 0
  30.  
  31. typedef unsigned short bid_t;
  32. #define BID_NONE 0
  33.  
  34. typedef struct
  35. {
  36.   unsigned short width;
  37.   unsigned short height;
  38.   unsigned short descender;
  39. } font_metrics_t;
  40. #define FONT_METRICS_WIDTH(m) ((m) -> width)
  41. #define FONT_METRICS_HEIGHT(m) ((m) -> height)
  42. #define FONT_METRICS_DESCENDER(m) ((m) -> descender)
  43.  
  44. typedef struct
  45. {
  46.   DECLARE_MSG_HEADER_FIELDS;
  47.   wid_t wid;
  48.   ULONG msg;
  49.   MPARAM mp1;
  50.   MPARAM mp2;
  51. } sm_pm_event_t;
  52. #define SM_PM_EVENT_WID(m) (((sm_pm_event_t *) (m)) -> wid)
  53. #define SM_PM_EVENT_MSG(m) (((sm_pm_event_t *) (m)) -> msg)
  54. #define SM_PM_EVENT_MP1(m) (((sm_pm_event_t *) (m)) -> mp1)
  55. #define SM_PM_EVENT_MP2(m) (((sm_pm_event_t *) (m)) -> mp2)
  56.  
  57. typedef struct
  58. {
  59.   DECLARE_MSG_HEADER_FIELDS;
  60.   wid_t wid;
  61.   unsigned short xl;
  62.   unsigned short xh;
  63.   unsigned short yl;
  64.   unsigned short yh;
  65. } sm_paint_event_t;
  66. #define SM_PAINT_EVENT_WID(m) (((sm_paint_event_t *) (m)) -> wid)
  67. #define SM_PAINT_EVENT_XL(m) (((sm_paint_event_t *) (m)) -> xl)
  68. #define SM_PAINT_EVENT_XH(m) (((sm_paint_event_t *) (m)) -> xh)
  69. #define SM_PAINT_EVENT_YL(m) (((sm_paint_event_t *) (m)) -> yl)
  70. #define SM_PAINT_EVENT_YH(m) (((sm_paint_event_t *) (m)) -> yh)
  71.  
  72. typedef enum
  73. {
  74.   state_top,
  75.   state_bottom,
  76.   state_show,
  77.   state_hide,
  78.   state_activate,
  79.   state_deactivate,
  80.   state_minimize,
  81.   state_maximize,
  82.   state_restore,
  83.   state_supremum
  84. } window_state_t;
  85.  
  86. extern msg_t * OS2_read_pm_tqueue (tqueue_t *, int);
  87. extern void OS2_write_pm_tqueue (tqueue_t *, msg_t *);
  88.  
  89. /* This machine-generated file contains most of the procedure prototypes.  */
  90. #include "os2pm-ed.h"
  91.  
  92. extern int OS2_psid_validp (psid_t);
  93. extern int OS2_wid_validp (wid_t);
  94. extern int OS2_bid_validp (bid_t);
  95. extern psid_t OS2_window_client_ps (wid_t);
  96. extern qid_t OS2_create_pm_qid (tqueue_t *);
  97. extern void OS2_window_permanent (wid_t);
  98. extern void OS2_window_mousetrack (wid_t, int);
  99. extern HWND OS2_window_frame_handle (wid_t);
  100. extern HWND OS2_window_client_handle (wid_t);
  101. extern int OS2_memory_ps_p (psid_t);
  102. extern bid_t OS2_ps_get_bitmap (psid_t);
  103.  
  104. extern void OS2_window_pos (wid_t, short *, short *);
  105. extern void OS2_window_size (wid_t, unsigned short *, unsigned short *);
  106. extern void OS2_window_frame_size (wid_t, unsigned short *, unsigned short *);
  107. extern bid_t OS2_ps_set_bitmap (psid_t, bid_t);
  108. extern font_metrics_t * OS2_ps_set_font (psid_t, unsigned short, const char *);
  109.  
  110. extern int OS2_translate_wm_char
  111.   (MPARAM, MPARAM, unsigned short *, unsigned short *, unsigned char *);
  112.  
  113. #endif /* SCM_OS2PM_H */
  114.