From 8c955a4150f09eda11f2e97730ee30aa5548cdbe Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Tue, 1 Apr 1997 05:58:02 +0000 Subject: [PATCH] Implement new primitive to get at the OS/2 PM "system values". --- v7/src/microcode/os2pm.c | 11 +++- v7/src/microcode/os2pm.scm | 8 ++- v7/src/microcode/pros2pm.c | 11 +++- v7/src/runtime/os2winp.scm | 104 +++++++++++++++++++++++++++++++++++-- 4 files changed, 127 insertions(+), 7 deletions(-) diff --git a/v7/src/microcode/os2pm.c b/v7/src/microcode/os2pm.c index c1367449e..a8036f962 100644 --- a/v7/src/microcode/os2pm.c +++ b/v7/src/microcode/os2pm.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: os2pm.c,v 1.29 1997/01/01 10:13:19 cph Exp $ +$Id: os2pm.c,v 1.30 1997/04/01 05:57:25 cph Exp $ Copyright (c) 1994-97 Massachusetts Institute of Technology @@ -1427,6 +1427,15 @@ window_set_capture (window_t * window, int capturep) return (WinSetCapture (HWND_DESKTOP, NULLHANDLE)); } } + +static LONG +window_query_sys_value (qid_t qid, HWND window, LONG id) +{ + LONG value = (WinQuerySysValue (window, id)); + if (value == 0) + window_error (WinQuerySysValue); + return (value); +} /* Text Cursors */ diff --git a/v7/src/microcode/os2pm.scm b/v7/src/microcode/os2pm.scm index 1c9ad7342..a06423d4d 100644 --- a/v7/src/microcode/os2pm.scm +++ b/v7/src/microcode/os2pm.scm @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Id: os2pm.scm,v 1.6 1995/11/04 02:24:08 cph Exp $ +$Id: os2pm.scm,v 1.7 1997/04/01 05:57:39 cph Exp $ -Copyright (c) 1995 Massachusetts Institute of Technology +Copyright (c) 1995-97 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -834,6 +834,10 @@ MIT in each case. */ (value ("BOOL" successp)) (arguments window (int capturep))) +(define-pm-procedure window_query_sys_value + (value ("LONG" sysval)) + (arguments qid ("HWND" window) ("LONG" id))) + ;;; Text Cursors (define-pm-procedure window_move_cursor diff --git a/v7/src/microcode/pros2pm.c b/v7/src/microcode/pros2pm.c index 34e9774b0..50213bdd9 100644 --- a/v7/src/microcode/pros2pm.c +++ b/v7/src/microcode/pros2pm.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: pros2pm.c,v 1.19 1997/01/01 10:09:20 cph Exp $ +$Id: pros2pm.c,v 1.20 1997/04/01 05:58:02 cph Exp $ Copyright (c) 1994-97 Massachusetts Institute of Technology @@ -351,6 +351,15 @@ DEFINE_PRIMITIVE ("OS2-WINDOW-HANDLE-FROM-ID", Prim_OS2_window_handle_from_id, 2 (arg_ulong_integer (2))))); } +DEFINE_PRIMITIVE ("OS2WIN-QUERY-SYS-VALUE", Prim_OS2_window_query_sys_value, 2, 2, 0) +{ + PRIMITIVE_HEADER (2); + PRIMITIVE_RETURN + (ulong_to_integer (OS2_window_query_sys_value (pm_qid, + (HWND_ARG (1)), + (arg_integer (2))))); +} + DEFINE_PRIMITIVE ("OS2-MAP-WINDOW-POINT", Prim_OS2_map_window_point, 3, 3, 0) { PRIMITIVE_HEADER (3); diff --git a/v7/src/runtime/os2winp.scm b/v7/src/runtime/os2winp.scm index 52e54e899..42cc633ad 100644 --- a/v7/src/runtime/os2winp.scm +++ b/v7/src/runtime/os2winp.scm @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Id: os2winp.scm,v 1.13 1995/11/04 02:25:38 cph Exp $ +$Id: os2winp.scm,v 1.14 1997/04/01 05:57:03 cph Exp $ -Copyright (c) 1995 Massachusetts Institute of Technology +Copyright (c) 1995-97 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -105,6 +105,7 @@ MIT in each case. |# (os2win-open-event-qid 0) (os2win-popup-menu 7) (os2win-ps 1) + (os2win-query-sys-value 2) (os2win-scroll 7) (os2win-set-capture 2) (os2win-set-grid 3) @@ -569,4 +570,101 @@ MIT in each case. |# (define-integrable IDI_SHIELD1 22) (define-integrable IDI_SHIELD2 23) (define-integrable IDI_SHIELD3 24) -(define-integrable IDI_SHIELD4 25) \ No newline at end of file +(define-integrable IDI_SHIELD4 25) + +(define-integrable SV_SWAPBUTTON 0) +(define-integrable SV_DBLCLKTIME 1) +(define-integrable SV_CXDBLCLK 2) +(define-integrable SV_CYDBLCLK 3) +(define-integrable SV_CXSIZEBORDER 4) +(define-integrable SV_CYSIZEBORDER 5) +(define-integrable SV_ALARM 6) +;;; 7-8 +(define-integrable SV_CURSORRATE 9) +(define-integrable SV_FIRSTSCROLLRATE 10) +(define-integrable SV_SCROLLRATE 11) +(define-integrable SV_NUMBEREDLISTS 12) +(define-integrable SV_WARNINGFREQ 13) +(define-integrable SV_NOTEFREQ 14) +(define-integrable SV_ERRORFREQ 15) +(define-integrable SV_WARNINGDURATION 16) +(define-integrable SV_NOTEDURATION 17) +(define-integrable SV_ERRORDURATION 18) +;;; 19 +(define-integrable SV_CXSCREEN 20) +(define-integrable SV_CYSCREEN 21) +(define-integrable SV_CXVSCROLL 22) +(define-integrable SV_CYHSCROLL 23) +(define-integrable SV_CYVSCROLLARROW 24) +(define-integrable SV_CXHSCROLLARROW 25) +(define-integrable SV_CXBORDER 26) +(define-integrable SV_CYBORDER 27) +(define-integrable SV_CXDLGFRAME 28) +(define-integrable SV_CYDLGFRAME 29) +(define-integrable SV_CYTITLEBAR 30) +(define-integrable SV_CYVSLIDER 31) +(define-integrable SV_CXHSLIDER 32) +(define-integrable SV_CXMINMAXBUTTON 33) +(define-integrable SV_CYMINMAXBUTTON 34) +(define-integrable SV_CYMENU 35) +(define-integrable SV_CXFULLSCREEN 36) +(define-integrable SV_CYFULLSCREEN 37) +(define-integrable SV_CXICON 38) +(define-integrable SV_CYICON 39) +(define-integrable SV_CXPOINTER 40) +(define-integrable SV_CYPOINTER 41) +(define-integrable SV_DEBUG 42) +(define-integrable SV_CMOUSEBUTTONS 43) +(define-integrable SV_CPOINTERBUTTONS 43) +(define-integrable SV_POINTERLEVEL 44) +(define-integrable SV_CURSORLEVEL 45) +(define-integrable SV_TRACKRECTLEVEL 46) +(define-integrable SV_CTIMERS 47) +(define-integrable SV_MOUSEPRESENT 48) +(define-integrable SV_CXBYTEALIGN 49) +(define-integrable SV_CXALIGN 49) +(define-integrable SV_CYBYTEALIGN 50) +(define-integrable SV_CYALIGN 50) +;;; 51-55 +(define-integrable SV_NOTRESERVED 56) +(define-integrable SV_EXTRAKEYBEEP 57) +(define-integrable SV_SETLIGHTS 58) +(define-integrable SV_INSERTMODE 59) +;;; 60-63 +(define-integrable SV_MENUROLLDOWNDELAY 64) +(define-integrable SV_MENUROLLUPDELAY 65) +(define-integrable SV_ALTMNEMONIC 66) +(define-integrable SV_TASKLISTMOUSEACCESS 67) +(define-integrable SV_CXICONTEXTWIDTH 68) +(define-integrable SV_CICONTEXTLINES 69) +(define-integrable SV_CHORDTIME 70) +(define-integrable SV_CXCHORD 71) +(define-integrable SV_CYCHORD 72) +(define-integrable SV_CXMOTIONSTART 73) +(define-integrable SV_CYMOTIONSTART 74) +(define-integrable SV_BEGINDRAG 75) +(define-integrable SV_ENDDRAG 76) +(define-integrable SV_SINGLESELECT 77) +(define-integrable SV_OPEN 78) +(define-integrable SV_CONTEXTMENU 79) +(define-integrable SV_CONTEXTHELP 80) +(define-integrable SV_TEXTEDIT 81) +(define-integrable SV_BEGINSELECT 82) +(define-integrable SV_ENDSELECT 83) +(define-integrable SV_BEGINDRAGKB 84) +(define-integrable SV_ENDDRAGKB 85) +(define-integrable SV_SELECTKB 86) +(define-integrable SV_OPENKB 87) +(define-integrable SV_CONTEXTMENUKB 88) +(define-integrable SV_CONTEXTHELPKB 89) +(define-integrable SV_TEXTEDITKB 90) +(define-integrable SV_BEGINSELECTKB 91) +(define-integrable SV_ENDSELECTKB 92) +(define-integrable SV_ANIMATION 93) +(define-integrable SV_ANIMATIONSPEED 94) +(define-integrable SV_MONOICONS 95) +(define-integrable SV_KBDALTERED 96) +(define-integrable SV_PRINTSCREEN 97) +(define-integrable SV_LOCKSTARTINPUT 98) +;;; 99-104 +(define-integrable SV_CSYSVALUES 105) \ No newline at end of file -- 2.25.1